]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltdl.m4 (AC_LTDL_DLLIB): Even though HP-UX 10.20 and 11.00
authorAlbert Chin-A-Young <china@thewrittenword.com>
Sat, 22 Sep 2001 16:53:56 +0000 (16:53 +0000)
committerGary V. Vaughan <gary@gnu.org>
Sat, 22 Sep 2001 16:53:56 +0000 (16:53 +0000)
support shl_load *and* dlopen, dlopen works correctly only
with a patch. Because we want to avoid the situation where we
build on a system with the patch but deploy on a system without,
use shl_load exclusively if found.

ChangeLog
ltdl.m4

index 4d482c0e532d75e17902c573efdd9b438d7d659b..39a60510ec060c5e82bb720bcd1a33f93bd25e33 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2001-09-22  Albert Chin-A-Young  <china@thewrittenword.com>
+
+       * ltdl.m4 (AC_LTDL_DLLIB): Even though HP-UX 10.20 and 11.00
+       support shl_load *and* dlopen, dlopen works correctly only
+       with a patch. Because we want to avoid the situation where we
+       build on a system with the patch but deploy on a system without,
+       use shl_load exclusively if found.
+
 2001-09-21  Gary V. Vaughan  <gary@gnu.org>
 
        From Tor Lillqvist <tml@iki.fi>:
diff --git a/ltdl.m4 b/ltdl.m4
index d1db42a84107c581cd21d87cfe3088f7c6a5f2c9..229bede154a00b88e9fae8c75d645b984ec1d74b 100644 (file)
--- a/ltdl.m4
+++ b/ltdl.m4
@@ -197,35 +197,39 @@ fi
 AC_DEFUN(AC_LTDL_DLLIB,
 [LIBADD_DL=
 AC_SUBST(LIBADD_DL)
-AC_CHECK_LIB([dl], [dlopen],
-      [AC_DEFINE([HAVE_LIBDL], [1],
-         [Define if you have the libdl library or equivalent.])
-       LIBADD_DL="-ldl"],
-  [AC_TRY_LINK([#if HAVE_DLFCN_H
+
+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],
+       [AC_DEFINE([HAVE_SHL_LOAD], [1],
+                  [Define if you have the shl_load function.])
+       LIBADD_DL="$LIBADD_DL -ldld"],
+    [AC_CHECK_LIB([dl], [dlopen],
+         [AC_DEFINE([HAVE_LIBDL], [1],
+                    [Define if you have the libdl library or equivalent.])
+         LIBADD_DL="-ldl"],
+      [AC_TRY_LINK([#if HAVE_DLFCN_H
 #  include <dlfcn.h>
 #endif
-    ],
-    [dlopen(0, 0);],
-    [AC_DEFINE(HAVE_LIBDL, 1,
-      [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"
+      ],
+       [dlopen(0, 0);],
+           [AC_DEFINE([HAVE_LIBDL], [1],
+                      [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_LIB([dld], [dld_link],
+               [AC_DEFINE([HAVE_DLD], [1],
+                          [Define if you have the GNU dld library.])
+               LIBADD_DL="$LIBADD_DL -ldld"
+          ])
+        ])
       ])
     ])
   ])
-
-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,
-  [AC_DEFINE(HAVE_SHL_LOAD, 1,
-     [Define if you have the shl_load function.])
-   LIBADD_DL="$LIBADD_DL -ldld"])
 ])
-AC_CHECK_LIB(dld, dld_link, [AC_DEFINE(HAVE_DLD, 1,
-  [Define if you have the GNU dld library.])dnl
-test "x$ac_cv_lib_dld_shl_load" = yes || LIBADD_DL="$LIBADD_DL -ldld"])
 
 if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then
  LIBS_SAVE="$LIBS"