]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltdl.m4 (HAVE_LIBDL): Look for dlopen in -lsvld.
authorAlexandre Oliva <aoliva@redhat.com>
Mon, 4 Sep 2000 01:41:57 +0000 (01:41 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Mon, 4 Sep 2000 01:41:57 +0000 (01:41 +0000)
* ltconfig.in: Likewise.

ChangeLog
ltconfig.in
ltdl.m4

index c3e1c2998c62b83d6a782b95460d01fd0abfa8e1..c83549e57e0b3c9ca98bd66254c83098e686a08f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-09-03  Alexandre Oliva  <aoliva@redhat.com>
 
+       * ltdl.m4 (HAVE_LIBDL): Look for dlopen in -lsvld.
+       * ltconfig.in: Likewise.
+
        * tests/mdemo-exec.test: Modify failure message.
 
        * ltmain.in (newdlprefiles): Use dlname if it's available and
index 86d4878936a063c144c5ce011cd208a60584f252..db8bf2029c063ba8939c9032ccd280779b4fbd15 100755 (executable)
@@ -1556,6 +1556,45 @@ if test "X$ac_cv_func_dlopen" = Xyes; then
   lt_cv_dlopen="dlopen"
 else
   echo "$ac_t""no" 1>&6
+echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
+echo "$progname:@LINENO@: checking for dlopen in -lsvld" >&5
+if test "X${ac_cv_lib_svld_dlopen+set}" = Xset; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lsvld  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line @LINENO@ "ltconfig"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen();
+
+int main() {
+dlopen()
+; return 0; }
+EOF
+if { (eval echo $progname:@LINENO@: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_lib_svld_dlopen=yes
+else
+  echo "$progname: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_lib_svld_dlopen=no
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if test "X$ac_cv_lib_svld_dlopen" = Xyes; then
+  echo "$ac_t""yes" 1>&6
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  echo "$ac_t""no" 1>&6
 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
 echo "$progname:@LINENO@: checking for dld_link in -ldld" >&5
 if test "X${ac_cv_lib_dld_dld_link+set}" = Xset; then
@@ -1697,6 +1736,8 @@ fi
 
 fi
 
+fi
+
 fi
 
   if test "x$lt_cv_dlopen" != xno; then
diff --git a/ltdl.m4 b/ltdl.m4
index 3a7562c51888f51f2bf47f259ecdfe96891bf0c5..a2bcb46aef47a19d2b3891fea45d9b2cf0c09dd6 100644 (file)
--- a/ltdl.m4
+++ b/ltdl.m4
@@ -161,7 +161,10 @@ AC_DEFUN(AC_LTDL_DLLIB,
 AC_CHECK_LIB(dl, dlopen, [AC_DEFINE(HAVE_LIBDL, 1,
    [Define if you have the libdl library or equivalent. ]) LIBADD_DL="-ldl"],
 [AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_LIBDL, 1,
-   [Define if you have the libdl library or equivalent.])])])
+   [Define if you have the libdl library or equivalent.])],
+[AC_CHECK_LIB(svld, dlopen, [AC_DEFINE(HAVE_LIBDL, 1,
+   [Define if you have the libdl library or equivalent.]) LIBADD_DL="-lsvld"]
+)])])
 AC_CHECK_FUNC(shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1,
    [Define if you have the shl_load function.])],
 [AC_CHECK_LIB(dld, shl_load,