From: Gary V. Vaughan Date: Fri, 2 Feb 2001 20:15:26 +0000 (+0000) Subject: * ltdl.m4 (AC_LTDL_SYS_DLOPEN_DEPLIBS): If we know that the host X-Git-Tag: multi-language-merge-point~80 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d3a04da122ff3887f5e32077aa8bdc5ba4be440d;p=thirdparty%2Flibtool.git * ltdl.m4 (AC_LTDL_SYS_DLOPEN_DEPLIBS): If we know that the host architecture automatically loads deplibs, then... * libltdl/ltdl.c (load_deplibs): ...don't manually load each one. --- diff --git a/ChangeLog b/ChangeLog index 0c1481a61..c8ce78bd8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-02-02 Gary V. Vaughan + + * ltdl.m4 (AC_LTDL_SYS_DLOPEN_DEPLIBS): If we know that the host + architecture automatically loads deplibs, then... + * libltdl/ltdl.c (load_deplibs): ...don't manually load each one. + 2001-02-02 Robert Boehne * ltconfig.in: Removed a line break that caused sh.test diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 85f076930..e39e518c0 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -1565,11 +1565,16 @@ load_deplibs(handle, deplibs) lt_dlhandle handle; char *deplibs; { + int ret = 0; + +#if LTDL_DLOPEN_DEPLIBS + char *p, *save_search_path; + int depcount = 0; int i; - int ret = 1, depcount = 0; char **names = 0; + ret = 1; handle->depcount = 0; if (!deplibs) { @@ -1700,11 +1705,11 @@ load_deplibs(handle, deplibs) if (handle->deplibs[j]) { ++j; + } } - } handle->depcount = j; /* Number of successfully loaded deplibs */ - ret = 0; + ret = 0; } cleanup_names: @@ -1719,6 +1724,7 @@ load_deplibs(handle, deplibs) /* restore the old search path */ LT_DLFREE (user_search_path); user_search_path = save_search_path; +#endif return ret; } diff --git a/ltdl.m4 b/ltdl.m4 index 61935d195..f97f87332 100644 --- a/ltdl.m4 +++ b/ltdl.m4 @@ -49,6 +49,7 @@ AC_REQUIRE([AC_LTDL_DLPREOPEN])dnl AC_REQUIRE([AC_LTDL_DLLIB])dnl AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl AC_REQUIRE([AC_LTDL_DLSYM_USCORE])dnl +AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS])dnl ]) AC_DEFUN(AC_LTDL_ENABLE_INSTALL, @@ -68,6 +69,29 @@ rm -f conftest rm -f conftest ]) +# AC_LTDL_SYS_DLOPEN_DEPLIBS +# -------------------------- +AC_DEFUN(AC_LTDL_SYS_DLOPEN_DEPLIBS, +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_CACHE_CHECK([whether deplibs are loaded by dlopen], + libltdl_cv_sys_dlopen_deplibs, [dnl + # PORTME does your system automatically load deplibs for dlopen()? + libltdl_cv_sys_dlopen_deplibs=unknown + case "$host_os" in + linux*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + solaris*) + libltdl_cv_sys_dlopen_deplibs=yes + ;; + esac +]) +if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then + AC_DEFINE(LTDL_DLOPEN_DEPLIBS, 1, + [Define if the OS needs help to load dependent libraries for dlopen(). ]) +fi +])# AC_LTDL_SYS_DLOPEN_DEPLIBS + AC_DEFUN(AC_LTDL_SHLIBEXT, [AC_REQUIRE([AC_LTDL_SNARF_CONFIG])dnl AC_CACHE_CHECK([which extension is used for shared libraries],