[AD] less shared dependencies

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


It turns out that something I thought ELF couldn't do but DLLs
could is equally possible in ELF.  I'm not sure why it didn't
work last time I tried it, but when a simple test worked I
applied it to Allegro.

It is, after all, possible for the shared Allegro library to
reference the lower level shared libraries itself.  This means
that Allegro game binaries need only refer to the Allegro
library (and libc) specifically, by major version number.  This
greatly enhances binary portability (potentially), because such
a binary is dependent only on the Allegro and libc versions --
it'll work on whatever versions of the other libraries the user
has installed, provided they built their copy of Allegro
locally.

I said `potentially' because it's not totally safe at the moment
-- we need to check that the shared libraries generated by
different configurations of Allegro are compatible (i.e. a
binary created against one configuration can be run with
another).  The obvious problem is that things built into the
binary (the header files and the static (assembler) routines)
may not match the things taken from the shared library.  This
might need a bit of checking, especially in the case of the
static bit of the library.

I'm not putting this in CVS yet in case there are any problems
with it, but here's a patch.  It just changes the way the
library is built and the output of allegro-config; all the
library executables are still individually linked against all
those libraries.  This should change if we keep this new system,
but is still necessary when using a static Allegro library.


diff -u -r1.1.1.1 allegro-config.in
--- misc/allegro-config.in      2000/05/14 20:16:49     1.1.1.1
+++ misc/allegro-config.in      2000/08/13 23:59:28
@@ -136,6 +136,6 @@
    if test "$static_libs" = "yes"; then
       echo $libdirs -l${lib_type} $allegro_libs
    else
-      echo $libdirs -l${lib_type}-${version} -l${lib_type}_unsharable $allegro_libs
+      echo $libdirs -l${lib_type}-${version} -l${lib_type}_unsharable #$allegro_libs
    fi
 fi
diff -u -r1.1.1.1 deplib.sh
--- misc/deplib.sh      2000/05/14 20:16:49     1.1.1.1
+++ misc/deplib.sh      2000/08/13 23:54:29
@@ -23,7 +23,7 @@
     echo "\$(LIBDIR)/${sharelib}: ${shareobj}"
     echo "     rm -f \$@"
     # gf: This bit is obviously gcc-specific
-    echo "     gcc -shared -o \$@ ${shareobj}"
+    echo "     gcc -shared -o \$@ ${shareobj} \$(LDFLAGS) \$(LIBS)"
     echo ""
     echo "\$(LIBDIR)/${unsharelib}: ${unshareobj}"
     echo "     rm -f \$@"


George

-- 
Random project update:
09/05/2000: Libnet 0.10.8 uploaded -- a few bugfixes
        http://www.canvaslink.com/libnet/  (try changes-0.10.8.txt)



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/