* TODO: Removed the item describing the change below, and added a

similar item to remind us to change the ltdl.m4 macros again when
_LT_AC_LTCONFIG_HACK is divided into proper macros.
* ltdl.m4 (AC_LTDL_SNARF_CONFIG):  Removed.  No longet required
now that ltconfig has migrated to libtool.m4.
(AC_LTDL_SHLIBEXT): Require _LT_AC_LTCONFIG_HACK.
(AC_LTDL_SHLIBPATH): ditto.
(AC_LTDL_SYSSEARCHPATH): ditto.
This commit is contained in:
Gary V. Vaughan 2000-09-16 20:08:07 +00:00
parent 2ccd27d360
commit 7361cdafc0
3 changed files with 58 additions and 39 deletions

View File

@ -1,6 +1,15 @@
2000-09-16 Gary V. Vaughan <gvv@techie.com>
* ltdl.m4 (AC_LTDL_DLPREOPEN): require the libtool.m4 symbol_pipe
* TODO: Removed the item describing the change below, and added a
similar item to remind us to change the ltdl.m4 macros again when
_LT_AC_LTCONFIG_HACK is divided into proper macros.
* ltdl.m4 (AC_LTDL_SNARF_CONFIG): Removed. No longet required
now that ltconfig has migrated to libtool.m4.
(AC_LTDL_SHLIBEXT): Require _LT_AC_LTCONFIG_HACK.
(AC_LTDL_SHLIBPATH): ditto.
(AC_LTDL_SYSSEARCHPATH): ditto.
* ltdl.m4 (AC_LTDL_DLPREOPEN): Require the libtool.m4 symbol_pipe
macro.
(AC_LTDL_SYMBOL_USCORE): ditto.
(AC_LTDL_GLOBAL_SYMBOL_PIPE): Removed, since it is a duplicate

13
TODO
View File

@ -18,15 +18,16 @@ be desirable.
* Lists of exported symbols should be stored in the pseudo library
so that the size of lt_preloaded_symbols can be reduced.
* The definitions for AC_LTDL_SHLIBEXT and AC_LTDL_SHLIBPATH should not
rely on the output of ./libtool --config. This involves moving the code
which sets the variables library_names_spec and shlibpath_var from
ltconfig.in to libtool.m4, and AC_REQUIRING the newly moved macros in
the respective ltdl.m4 macros.
In the future:
**************
* The definitions for AC_LTDL_SHLIBEXT, AC_LTDL_SHLIBPATH and
AC_LTDL_SYSSEARCHPATH should not rely on the _LT_AC_LTCONFIG_HACK
macro. This involves moving the code which sets the variables
library_names_spec, shlibpath_var and sys_lib_dlsearch_path_spec from
into a separate macro, and AC_REQUIRING the newly extracted macro in the
respective ltdl.m4 macros.
* Godmar Back writes:
libltdl uses such stdio functions as fopen, fgets, feof, fclose, and others.
These functions are not async-signal-safe. While this does not make

73
ltdl.m4
View File

@ -22,15 +22,16 @@
# serial 1 AC_LIB_LTDL
# AC_LIB_LTDL
# -----------
AC_DEFUN(AC_LIB_LTDL,
[AC_PREREQ(2.13)dnl
AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_C_CONST])dnl
AC_REQUIRE([AC_C_INLINE])dnl
dnl AC_LIB_LTDL must perform all the checks necessary for compilation
dnl of the ltdl objects -- including compiler checks (above) and header
dnl checks (below).
# Perform all the checks necessary for compilation of the ltdl objects
# -- including compiler checks (above) and header checks (below).
AC_REQUIRE([AC_HEADER_STDC])dnl
AC_CHECK_HEADERS(malloc.h memory.h stdlib.h stdio.h ctype.h dlfcn.h dl.h dld.h)
@ -47,36 +48,29 @@ AC_REQUIRE([AC_LTDL_OBJDIR])dnl
AC_REQUIRE([AC_LTDL_DLPREOPEN])dnl
AC_REQUIRE([AC_LTDL_DLLIB])dnl
AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl
])
])# AC_LIB_LTDL
# AC_LTDL_ENABLE_INSTALL
# ----------------------
AC_DEFUN(AC_LTDL_ENABLE_INSTALL,
[AC_ARG_ENABLE(ltdl-install,
[ --enable-ltdl-install install libltdl])
AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
])])
AC_DEFUN(AC_LTDL_SNARF_CONFIG,
[# Read the libtool configuration
rm -f conftest
${SHELL-/bin/sh} ./libtool --config > conftest
. ./conftest
rm -f conftest
])
])])# AC_LTDL_ENABLE_INSTALL
# AC_LTDL_SHLIBEXT
# ----------------
AC_DEFUN(AC_LTDL_SHLIBEXT,
[AC_REQUIRE([AC_LTDL_SNARF_CONFIG])dnl
[AC_REQUIRE([_LT_AC_LTCONFIG_HACK])
AC_CACHE_CHECK([which extension is used for shared libraries],
libltdl_cv_shlibext, [dnl
(
last=
for spec in $library_names_spec; do
last="$spec"
libltdl_cv_shlibext,
[ac_last=
for ac_spec in $library_names_spec; do
ac_last="$ac_spec"
done
echo "$last" | [sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//'] > conftest
)
echo "$ac_last" | [sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//'] > conftest
libltdl_cv_shlibext=`cat conftest`
rm -f conftest
])
@ -84,20 +78,24 @@ if test -n "$libltdl_cv_shlibext"; then
AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext",
[Define to the extension used for shared libraries, say, ".so". ])
fi
])
])# AC_LTDL_SHLIBEXT
# AC_LTDL_SHLIBPATH
# -----------------
AC_DEFUN(AC_LTDL_SHLIBPATH,
[AC_REQUIRE([AC_LTDL_SNARF_CONFIG])dnl
[AC_REQUIRE([_LT_AC_LTCONFIG_HACK])
AC_CACHE_CHECK([which variable specifies run-time library path],
libltdl_cv_shlibpath_var, [libltdl_cv_shlibpath_var="$shlibpath_var"])
if test -n "$libltdl_cv_shlibpath_var"; then
AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var",
[Define to the name of the environment variable that determines the dynamic library search path. ])
fi
])
])# AC_LTDL_SHLIBPATH
# AC_LTDL_SYSSEARCHPATH
# ---------------------
AC_DEFUN(AC_LTDL_SYSSEARCHPATH,
[AC_REQUIRE([AC_LTDL_SNARF_CONFIG])dnl
[AC_REQUIRE([_LT_AC_LTCONFIG_HACK])
AC_CACHE_CHECK([for the default library search path],
libltdl_cv_sys_search_path, [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"])
if test -n "$libltdl_cv_sys_search_path"; then
@ -116,8 +114,10 @@ if test -n "$libltdl_cv_sys_search_path"; then
AC_DEFINE_UNQUOTED(LTDL_SYSSEARCHPATH, "$sys_search_path",
[Define to the system default library search path. ])
fi
])
])# AC_LTDL_SYSSEARCHPATH
# AC_LTDL_OBJDIR
# --------------
AC_DEFUN(AC_LTDL_OBJDIR,
[AC_CACHE_CHECK([for objdir],
libltdl_cv_objdir, [libltdl_cv_objdir="$objdir"
@ -136,8 +136,10 @@ rmdir .libs 2>/dev/null
fi])
AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/",
[Define to the sub-directory in which libtool stores uninstalled libraries. ])
])
])# AC_LTDL_OBJDIR
# AC_LTDL_DLPREOPEN
# -----------------
AC_DEFUN(AC_LTDL_DLPREOPEN,
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
@ -152,8 +154,10 @@ if test x"$libltdl_cv_preloaded_symbols" = x"yes"; then
AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1,
[Define if libtool can extract symbol lists from object files. ])
fi
])
])# AC_LTDL_DLPREOPEN
# AC_LTDL_DLLIB
# -------------
AC_DEFUN(AC_LTDL_DLLIB,
[LIBADD_DL=
AC_CHECK_LIB(dl, dlopen, [AC_DEFINE(HAVE_LIBDL, 1,
@ -181,8 +185,10 @@ if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; the
AC_CHECK_FUNCS(dlerror)
LIBS="$LIBS_SAVE"
fi
])
])# AC_LTDL_DLLIB
# AC_LTDL_SYMBOL_USCORE
# ---------------------
AC_DEFUN(AC_LTDL_SYMBOL_USCORE,
[dnl does the compiler prefix global symbols with an underscore?
AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
@ -218,8 +224,10 @@ rm -rf conftest*
])
AC_MSG_RESULT($ac_cv_sys_symbol_underscore)
AC_LTDL_DLSYM_USCORE
])
])# AC_LTDL_SYMBOL_USCORE
# AC_LTDL_DLSYM_USCORE
# --------------------
AC_DEFUN(AC_LTDL_DLSYM_USCORE,
[AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl
if test x"$ac_cv_sys_symbol_underscore" = xyes; then
@ -280,4 +288,5 @@ if test x"$libltdl_cv_need_uscore" = xyes; then
AC_DEFINE(NEED_USCORE, 1,
[Define if dlsym() requires a leading underscode in symbol names. ])
fi
])
])# AC_LTDL_DLSYM_USCORE