On 03/14/2009 05:45 PM, Ralf Wildenhues wrote:
> tags forwarded
> thanks
>
> Adding bug-libtool in Cc:, this should be fixed upstream.
> (I'll look at it when I get back to Libtool, unless beaten to).
>   

It doesn't seem to be fixed, I just checked latest snapshot.
Attached is a patch that fixes the problem (AC_SEARCH_LIBS sets LIBS, so
we must
save/restore LIBS before it, not only for AC_CHECK_FUNCS).

Best regards,
--Edwin
diff --git a/m4/ltdl.m4 b/m4/ltdl.m4
index aeae738..ca70368 100644
--- a/m4/ltdl.m4
+++ b/m4/ltdl.m4
@@ -637,6 +637,7 @@ AC_SUBST([LT_DLLOADERS])
 AC_LANG_PUSH([C])
 
 LIBADD_DLOPEN=
+lt_save_LIBS="$LIBS"
 AC_SEARCH_LIBS([dlopen], [dl],
 	[AC_DEFINE([HAVE_LIBDL], [1],
 		   [Define if you have the libdl library or equivalent.])
@@ -660,11 +661,10 @@ AC_SEARCH_LIBS([dlopen], [dl],
 		LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
 if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
 then
-  lt_save_LIBS="$LIBS"
   LIBS="$LIBS $LIBADD_DLOPEN"
   AC_CHECK_FUNCS([dlerror])
-  LIBS="$lt_save_LIBS"
 fi
+LIBS="$lt_save_LIBS"
 AC_SUBST([LIBADD_DLOPEN])
 
 LIBADD_SHL_LOAD=

Reply via email to