From: Assar Westerlund Date: Thu, 13 Sep 2001 20:06:35 +0000 (+0000) Subject: * ltdl.m4 (AC_LTDL_DLLIB): call dlopen with arguments so the test X-Git-Tag: release-1-4-3~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=accbb8e8d1981cbd72205f2b500f2b0f1484dcf8;p=thirdparty%2Flibtool.git * ltdl.m4 (AC_LTDL_DLLIB): call dlopen with arguments so the test does not fail due to a prototype in dlfcn.h --- diff --git a/ChangeLog b/ChangeLog index e05e00996..bf9fc3dc8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +001-09-13 Assar Westerlund + + * ltdl.m4 (AC_LTDL_DLLIB): call dlopen with arguments so the test + does not fail due to a prototype in dlfcn.h + 2001-09-11 Gary V. Vaughan * libltdl/Makefile.am (OBJECTS): In addition to making $(OBJECTS) diff --git a/ltdl.m4 b/ltdl.m4 index 615c4bc3f..d1db42a84 100644 --- a/ltdl.m4 +++ b/ltdl.m4 @@ -196,13 +196,26 @@ fi # ------------- AC_DEFUN(AC_LTDL_DLLIB, [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_CHECK_FUNC(dlopen, [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_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 +# 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" + ]) + ]) + ]) + 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, @@ -213,7 +226,6 @@ AC_CHECK_FUNC(shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1, 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"]) -AC_SUBST(LIBADD_DL) if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then LIBS_SAVE="$LIBS"