Re: [AD] 4.0.1 release

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


On 2002-03-11, Peter Wang <tjaden@xxxxxxxxxx> wrote:
> (1) configure now tests for dlopen in libdl before libc.  But, libdl
> is for use with libc.so.4.  The default libc is libc.so.6, which has
> dlopen built in.  If you link with libdl, it pulls in libc.so.4, so
> there is a conflict between the libcs, and somewhere it segfaults.
> I'll send a patch for configure.in soon.

Attached.  Matthew (or anyone with FreeBSD), please test on a clean
Allegro.  Strange you didn't write about this problem in your other
message though.
Index: aclocal.m4
===================================================================
RCS file: /cvsroot/alleg/allegro/aclocal.m4,v
retrieving revision 1.27
diff -u -r1.27 aclocal.m4
--- aclocal.m4	3 Mar 2002 11:20:28 -0000	1.27
+++ aclocal.m4	12 Mar 2002 05:49:31 -0000
@@ -181,9 +181,13 @@
       LDFLAGS="$allegro_save_LDFLAGS"])
     if test $allegro_cv_support_export_dynamic = yes; then
       allegro_support_modules=yes
-      dnl Use libdl if found, else assume dl* functions in libc.
-      AC_CHECK_LIB(dl, dlopen,
-        [LIBS="-ldl $LIBS"])
+      dnl Look for dl* functions first in libc, then in libdl.
+      dnl This order is required for FreeBSD (and *BSD?).
+      AC_CHECK_FUNC(dlopen,
+        allegro_support_modules=yes,
+        AC_CHECK_LIB(dl, dlopen,
+          [LIBS="-ldl $LIBS"; allegro_support_modules=yes],
+          AC_MSG_WARN([Could not find dlopen -- modules disabled])))
       LDFLAGS="-Wl,-export-dynamic $LDFLAGS"
     fi])
 fi


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