Patch 3 of 10 attached ...
Rationale:
The test for being able to dlopen yourself is flawed. It was using
$link_static_flag, which is only present in the generated libtool.
During autoconfiscation, the variable is called $lt_prog_compiler_static.
This was causing false positives becuase -Bstatic/-static were not being
passed through to the link editor, and thus we were actually testing
a dynamic a.out. Since $lt_prog_compiler_static most likely uses $wl,
ensure that wl is set to $lt_prog_compiler_wl before running the test,
so that $lt_prog_compiler_static expands correctly.

2005-10-24  Kean Johnston  <[EMAIL PROTECTED]>

        * libtool.m4(AC_LIBTOOL_DLOPEN_SELF): Set wl if its not already
        set so expansion of export_dynamic_flag_spec works.
        Use lt_prog_compile_static, not link_static_flag.

Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.115
diff -u -3 -p -r1.314.2.115 libtool.m4
--- libtool.m4  9 Oct 2005 06:26:21 -0000       1.314.2.115
+++ libtool.m4  30 Oct 2005 21:22:24 -0000
@@ -932,6 +943,7 @@ else
 
   case $lt_cv_dlopen in
   dlopen)
+    test -z "$wl" && wl=$lt_prog_compiler_wl
     save_CPPFLAGS="$CPPFLAGS"
     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
@@ -949,7 +961,7 @@ else
     ])
 
     if test "x$lt_cv_dlopen_self" = xyes; then
-      LDFLAGS="$LDFLAGS $link_static_flag"
+      LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
          lt_cv_dlopen_self_static, [dnl
          _LT_AC_TRY_DLOPEN_SELF(

Reply via email to