From: Albert Chin-A-Young Date: Sat, 22 Sep 2001 16:53:56 +0000 (+0000) Subject: * ltdl.m4 (AC_LTDL_DLLIB): Even though HP-UX 10.20 and 11.00 X-Git-Tag: release-1-4-3~46 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ff54e1e737dd6814f2d7ca3b8c148c219b86f7ba;p=thirdparty%2Flibtool.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 4d482c0e5..39a60510e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-09-22 Albert Chin-A-Young + + * 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 From Tor Lillqvist : diff --git a/ltdl.m4 b/ltdl.m4 index d1db42a84..229bede15 100644 --- 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 #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"