How would I build a program in linux to be able to dynamically link to libs in the parent folder for people that may not have allegro libs to begin with? So, if someone where to download a tar of all the files, libs included, needed for the program, they would be able to run it?

Hey Kazzmir, I may have to go Peter's route. I use fmod, and I can't figure out how to compile that statically. I do have one question, though. I tried to have a makefile call the export call and then open the game, but it doesn't actually call the export call. How can I create a script that does this. Do I need to create a RPM?

michi@tux ~ $ gcc test.c `allegro-config --libs --static` -static/usr/lib/liballeg.a(umodules.o): In function `_unix_load_modules':: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking/usr/lib/liballeg.a(file.o): In function `canonicalize_filename':: warning: Using 'getpwent' in statically linked applications requires at runtim e the shared libraries from the glibc version used for linking/usr/lib/liballeg.a(file.o): In function `canonicalize_filename':: warning: Using 'setpwent' in statically linked applications requires at runtim e the shared libraries from the glibc version used for linking/usr/lib/liballeg.a(file.o): In function `canonicalize_filename':: warning: Using 'endpwent' in statically linked applications requires at runtim e the shared libraries from the glibc version used for linking/usr/lib/libX11.a(GetDflt.o): In function `GetHomeDir':: warning: Using 'getpwnam_r' in statically linked applications requires at runt ime the shared libraries from the glibc version used for linking/usr/lib/libX11.a(GetDflt.o): In function `GetHomeDir':: warning: Using 'getpwuid_r' in statically linked applications requires at runt ime the shared libraries from the glibc version used for linking/usr/lib/libX11.a(x11_trans.o): In function `_X11TransSocketOpen':: warning: Using 'getaddrinfo' in statically linked applications requires at run time the shared libraries from the glibc version used for linking/usr/lib/libX11.a(x11_trans.o): In function `_X11TransSocketUNIXConnect':: warning: Using 'gethostbyname' in statically linked applications requires at r untime the shared libraries from the glibc version used for linking/usr/lib/libX11.a(x11_trans.o): In function `_X11TransSocketINETConnect':: warning: Using 'getservbyname' in statically linked applications requires at r untime the shared libraries from the glibc version used for linking/usr/lib/libXcursor.a(cursor.o): In function `XcursorImageLoadCursor':: undefined reference to `XRenderFindStandardFormat'/usr/lib/libXcursor.a(cursor.o): In function `XcursorImageLoadCursor':: undefined reference to `XRenderCreatePicture'/usr/lib/libXcursor.a(cursor.o): In function `XcursorImageLoadCursor':: undefined reference to `XRenderCreateCursor'/usr/lib/libXcursor.a(cursor.o): In function `XcursorImageLoadCursor':: undefined reference to `XRenderFreePicture'/usr/lib/libXcursor.a(cursor.o): In function `XcursorImagesLoadCursor':: undefined reference to `XFixesSetCursorName'/usr/lib/libXcursor.a(cursor.o): In function `XcursorImagesLoadCursor':: undefined reference to `XRenderCreateAnimCursor'/usr/lib/libXcursor.a(display.o): In function `_XcursorGetDisplayInfo':: undefined reference to `XRenderQueryExtension'/usr/lib/libXcursor.a(display.o): In function `_XcursorGetDisplayInfo':: undefined reference to `XRenderQueryVersion'/usr/lib/libX11.a(ConnDis.o): In function `_X11TransConnectDisplay':: undefined reference to `XauDisposeAuth'/usr/lib/libX11.a(ConnDis.o): In function `_X11TransConnectDisplay':: undefined reference to `XauGetBestAuthByAddr'/usr/lib/libX11.a(ConnDis.o): In function `_X11TransConnectDisplay':: undefined reference to `XdmcpWrap'

[EDIT]Actually I have solved some errors now by using:

GCC said:

gcc test.c `allegro-config --static` -static -lXrender -lXau -lXdmcp/usr/lib/liballeg.a(umodules.o): In function `_unix_load_modules':: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking/usr/lib/liballeg.a(file.o): In function `canonicalize_filename':: warning: Using 'getpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking/usr/lib/liballeg.a(file.o): In function `canonicalize_filename':: warning: Using 'setpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking/usr/lib/liballeg.a(file.o): In function `canonicalize_filename':: warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking/usr/lib/libX11.a(GetDflt.o): In function `GetHomeDir':: warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking/usr/lib/libX11.a(GetDflt.o): In function `GetHomeDir':: warning: Using 'getpwuid_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking/usr/lib/libX11.a(x11_trans.o): In function `_X11TransSocketOpen':: warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking/usr/lib/libX11.a(x11_trans.o): In function `_X11TransSocketUNIXConnect':: warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking/usr/lib/libX11.a(x11_trans.o): In function `_X11TransSocketINETConnect':: warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking/usr/lib/libXcursor.a(cursor.o): In function `XcursorImagesLoadCursor':: undefined reference to `XFixesSetCursorName'

/usr/lib/liballeg.a(umodules.o): In function `_unix_load_modules':: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

Well, although you are statically linking, some drivers will be built as dynamically linked modules. You can distribute them and set ALLEGRO_MODULES env. variable as appropriate, or pass --enable-modules=no option to ./configure but then you might not be able to run your program where for example alsa is not present.