* ltdl.m4: Bump serial number.

General reformat and tify up in line with Autoconf-2.50 support.
(AC_LTDL_FUNC_ARGZ): Test for system implementations of a
handful of argz API calls, the error_t type, and the argz.h
header.
* libltdl/configure.ac (AM_INIT_AUTOMAKE): Bump version number.
* libltdl/ltdl.c (rpl_argz_append, rpl_argz_create_sep.
rpl_argz_insert, rpl_rgz_next):  Fallback implementations of
the similarly named functions for machines that don;t use glibc.
(lt_dlrealloc):  New memory function pointer that can be set by
the client.  Defaults to rpl_realloc, which in turn uses only
lt_dlmalloc and lt_dlfree.
(LT_EMALLOC, LT_EREALLOC): Set internal out-of-memory error
inside the functions called by these new macros.  Simplified all
callers by removing explicit client error reporting.
(memmove):  Fallback implementation of overlap safe memory copy
function.
(tryall_dlopen):  Factorized common code into...
(tryall_dlopen_module): ...this new helper function.
(canonicalize_path):  Changed function signature to return success
or failure.  Updated all callers.
(foreachfile_callback):  Make use of argz API.
(LT_DLSTRLEN): Moved from here...
* libltdl/ltdl.h (LT_STRLEN): ...to here.  Updated all callers.
(lt_dlrealloc):  Declare new memory management handle.
This commit is contained in:
Gary V. Vaughan 2001-08-01 06:50:16 +00:00
parent 6bbb1b6197
commit 5473bb5e38
5 changed files with 1201 additions and 709 deletions

View File

@ -1,9 +1,37 @@
2001-08-01 Gary V. Vaughan <gary@gnu.org>
* ltdl.m4: Bump serial number.
General reformat and tify up in line with Autoconf-2.50 support.
(AC_LTDL_FUNC_ARGZ): Test for system implementations of a
handful of argz API calls, the error_t type, and the argz.h
header.
* libltdl/configure.ac (AM_INIT_AUTOMAKE): Bump version number.
* libltdl/ltdl.c (rpl_argz_append, rpl_argz_create_sep.
rpl_argz_insert, rpl_rgz_next): Fallback implementations of
the similarly named functions for machines that don;t use glibc.
(lt_dlrealloc): New memory function pointer that can be set by
the client. Defaults to rpl_realloc, which in turn uses only
lt_dlmalloc and lt_dlfree.
(LT_EMALLOC, LT_EREALLOC): Set internal out-of-memory error
inside the functions called by these new macros. Simplified all
callers by removing explicit client error reporting.
(memmove): Fallback implementation of overlap safe memory copy
function.
(tryall_dlopen): Factorized common code into...
(tryall_dlopen_module): ...this new helper function.
(canonicalize_path): Changed function signature to return success
or failure. Updated all callers.
(foreachfile_callback): Make use of argz API.
(LT_DLSTRLEN): Moved from here...
* libltdl/ltdl.h (LT_STRLEN): ...to here. Updated all callers.
(lt_dlrealloc): Declare new memory management handle.
2001-07-31 Robert Boehne <rboehne@ricardo-us.com>
* libtool.m4 (mingw*) Revert the previous change as it was
applied by mistake.
2001-07-31 Guido Draheim <guidod-2001q3@gmx.de>
2001-07-31 Guido Draheim <Guido.Draheim@tek.com>
* libtool.m4 (mingw*) sys_lib_search_path_spec:
Sets the proper path separator for cross-compiling.

View File

@ -23,7 +23,7 @@ if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then
fi
fi
AM_INIT_AUTOMAKE(libltdl,1.1,-)
AM_INIT_AUTOMAKE(libltdl,1.2,-)
AM_CONFIG_HEADER(config.h:config-h.in)
AM_MAINTAINER_MODE
@ -32,7 +32,7 @@ AC_C_CONST
AC_C_INLINE
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AC_PROG_LIBTOOL
AC_SUBST(LIBTOOL_DEPS)
AC_LIB_LTDL

File diff suppressed because it is too large Load Diff

View File

@ -34,6 +34,9 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
/* --- MACROS FOR PORTABILITY --- */
/* Saves on those hard to debug '\0' typos.... */
#define LT_EOS_CHAR '\0'
/* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations,
so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at
the end of C declarations. */
@ -82,6 +85,8 @@ LT_BEGIN_C_DECLS
# define LT_CONC(s,t) s/**/t
#endif
/* LT_STRLEN can be used safely on NULL pointers. */
#define LT_STRLEN(s) (((s) && (s)[0]) ? strlen (s) : 0)
@ -189,8 +194,13 @@ extern int lt_dlmutex_register LT_PARAMS((lt_dlmutex_lock *lock,
/* --- MEMORY HANDLING --- */
/* Pointers to memory management functions to be used by libltdl. */
/* By default, the realloc function pointer is set to our internal
realloc implementation which iself uses lt_dlmalloc and lt_dlfree.
libltdl relies on a featureful realloc, but if you are sure yours
has the right semantics then you can assign it directly. Generally,
it is safe to assign just a malloc() and a free() function. */
LT_SCOPE lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size));
LT_SCOPE lt_ptr (*lt_dlrealloc) LT_PARAMS((lt_ptr ptr, size_t size));
LT_SCOPE void (*lt_dlfree) LT_PARAMS((lt_ptr ptr));

371
ltdl.m4
View File

@ -20,40 +20,42 @@
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.
# serial 3 AC_LIB_LTDL
# serial 4 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
# 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_REQUIRE([AC_HEADER_DIRENT])dnl
AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
# -- including compiler checks and header checks.
AC_DEFUN([AC_LIB_LTDL],
[AC_PREREQ(2.50)
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_C_CONST])
AC_REQUIRE([AC_HEADER_STDC])
AC_REQUIRE([AC_HEADER_DIRENT])
AC_REQUIRE([_LT_AC_CHECK_DLFCN])
AC_REQUIRE([AC_LTDL_ENABLE_INSTALL])
AC_REQUIRE([AC_LTDL_SHLIBEXT])
AC_REQUIRE([AC_LTDL_SHLIBPATH])
AC_REQUIRE([AC_LTDL_SYSSEARCHPATH])
AC_REQUIRE([AC_LTDL_OBJDIR])
AC_REQUIRE([AC_LTDL_DLPREOPEN])
AC_REQUIRE([AC_LTDL_DLLIB])
AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])
AC_REQUIRE([AC_LTDL_DLSYM_USCORE])
AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS])
AC_REQUIRE([AC_LTDL_FUNC_ARGZ])
AC_CHECK_HEADERS(malloc.h memory.h stdlib.h stdio.h ctype.h dl.h sys/dl.h dld.h)
AC_CHECK_HEADERS(string.h strings.h, break)
AC_CHECK_FUNCS(strchr index, break)
AC_CHECK_FUNCS(strrchr rindex, break)
AC_CHECK_FUNCS(memcpy bcopy, break)
AC_CHECK_FUNCS(strcmp)
AC_CHECK_HEADERS([ctype.h errno.h malloc.h memory.h stdlib.h stdio.h])
AC_CHECK_HEADERS([dl.h sys/dl.h dld.h])
AC_CHECK_HEADERS([string.h strings.h], [break])
AC_REQUIRE([AC_LTDL_ENABLE_INSTALL])dnl
AC_REQUIRE([AC_LTDL_SHLIBEXT])dnl
AC_REQUIRE([AC_LTDL_SHLIBPATH])dnl
AC_REQUIRE([AC_LTDL_SYSSEARCHPATH])dnl
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_REQUIRE([AC_LTDL_DLSYM_USCORE])dnl
AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS])dnl
AC_CHECK_FUNCS([strchr index], [break])
AC_CHECK_FUNCS([strrchr rindex], [break])
AC_CHECK_FUNCS([memcpy bcopy], [break])
AC_CHECK_FUNCS([memmove strcmp])
])# AC_LIB_LTDL
# AC_LTDL_ENABLE_INSTALL
# ----------------------
AC_DEFUN([AC_LTDL_ENABLE_INSTALL],
@ -64,116 +66,121 @@ AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
])])# AC_LTDL_ENABLE_INSTALL
# 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?
# or its logical equivalent (e.g. shl_load for HP-UX < 11)
# For now, we just catch OSes we know something about -- in the
# future, we'll try test this programmatically.
libltdl_cv_sys_dlopen_deplibs=unknown
case "$host_os" in
aix3*|aix4.1.*|aix4.2.*)
# Unknown whether this is true for these versions of AIX, but
# we want this `case' here to explicitly catch those versions.
libltdl_cv_sys_dlopen_deplibs=unknown
;;
aix[45]*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
gnu*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
irix[12345]*|irix6.[01]*)
# Catch all versions of IRIX before 6.2, and indicate that we don't
# know how it worked for any of those versions.
libltdl_cv_sys_dlopen_deplibs=unknown
;;
irix*)
# The case above catches anything before 6.2, and it's known that
# at 6.2 and later dlopen does load deplibs.
libltdl_cv_sys_dlopen_deplibs=yes
;;
linux*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
netbsd*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
osf[1234]*)
# dlopen did load deplibs (at least at 4.x), but until the 5.x series,
# it did *not* use an RPATH in a shared library to find objects the
# library depends on, so we explictly say `no'.
libltdl_cv_sys_dlopen_deplibs=no
;;
osf5.0|osf5.0a|osf5.1)
# dlopen *does* load deplibs and with the right loader patch applied
# it even uses RPATH in a shared library to search for shared objects
# that the library depends on, but there's no easy way to know if that
# patch is installed. Since this is the case, all we can really
# say is unknown -- it depends on the patch being installed. If
# it is, this changes to `yes'. Without it, it would be `no'.
libltdl_cv_sys_dlopen_deplibs=unknown
;;
osf*)
# the two cases above should catch all versions of osf <= 5.1. Read
# the comments above for what we know about them.
# At > 5.1, deplibs are loaded *and* any RPATH in a shared library
# is used to find them so we can finally say `yes'.
libltdl_cv_sys_dlopen_deplibs=yes
;;
solaris*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
esac
])
[libltdl_cv_sys_dlopen_deplibs],
[# PORTME does your system automatically load deplibs for dlopen?
# or its logical equivalent (e.g. shl_load for HP-UX < 11)
# For now, we just catch OSes we know something about -- in the
# future, we'll try test this programmatically.
libltdl_cv_sys_dlopen_deplibs=unknown
case "$host_os" in
aix3*|aix4.1.*|aix4.2.*)
# Unknown whether this is true for these versions of AIX, but
# we want this `case' here to explicitly catch those versions.
libltdl_cv_sys_dlopen_deplibs=unknown
;;
aix[45]*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
gnu*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
irix[12345]*|irix6.[01]*)
# Catch all versions of IRIX before 6.2, and indicate that we don't
# know how it worked for any of those versions.
libltdl_cv_sys_dlopen_deplibs=unknown
;;
irix*)
# The case above catches anything before 6.2, and it's known that
# at 6.2 and later dlopen does load deplibs.
libltdl_cv_sys_dlopen_deplibs=yes
;;
linux*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
netbsd*)
libltdl_cv_sys_dlopen_deplibs=yes
;;
osf[1234]*)
# dlopen did load deplibs (at least at 4.x), but until the 5.x series,
# it did *not* use an RPATH in a shared library to find objects the
# library depends on, so we explictly say `no'.
libltdl_cv_sys_dlopen_deplibs=no
;;
osf5.0|osf5.0a|osf5.1)
# dlopen *does* load deplibs and with the right loader patch applied
# it even uses RPATH in a shared library to search for shared objects
# that the library depends on, but there's no easy way to know if that
# patch is installed. Since this is the case, all we can really
# say is unknown -- it depends on the patch being installed. If
# it is, this changes to `yes'. Without it, it would be `no'.
libltdl_cv_sys_dlopen_deplibs=unknown
;;
osf*)
# the two cases above should catch all versions of osf <= 5.1. Read
# the comments above for what we know about them.
# At > 5.1, deplibs are loaded *and* any RPATH in a shared library
# is used to find them so we can finally say `yes'.
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(). ])
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_LTDL_SHLIBEXT
# ----------------
AC_DEFUN([AC_LTDL_SHLIBEXT],
[AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
AC_CACHE_CHECK([which extension is used for shared libraries],
libltdl_cv_shlibext,
[ac_last=
[libltdl_cv_shlibext],
[ac_last=
for ac_spec in $library_names_spec; do
ac_last="$ac_spec"
done
echo "$ac_last" | [sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//'] > conftest
libltdl_cv_shlibext=`cat conftest`
rm -f conftest
])
libltdl_cv_shlibext=`cat conftest`
rm -f conftest
])
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_LIBTOOL_SYS_DYNAMIC_LINKER])
AC_CACHE_CHECK([which variable specifies run-time library path],
libltdl_cv_shlibpath_var, [libltdl_cv_shlibpath_var="$shlibpath_var"])
[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_LIBTOOL_SYS_DYNAMIC_LINKER])
AC_CACHE_CHECK([for the default library search path],
libltdl_cv_sys_search_path, [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"])
[libltdl_cv_sys_search_path],
[libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"])
if test -n "$libltdl_cv_sys_search_path"; then
case "$host" in
*-*-mingw*) pathsep=";" ;;
@ -192,143 +199,157 @@ if test -n "$libltdl_cv_sys_search_path"; then
fi
])# AC_LTDL_SYSSEARCHPATH
# AC_LTDL_OBJDIR
# --------------
AC_DEFUN([AC_LTDL_OBJDIR],
[AC_CACHE_CHECK([for objdir],
libltdl_cv_objdir, [libltdl_cv_objdir="$objdir"
if test -n "$objdir"; then
:
else
rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
if test -d .libs; then
libltdl_cv_objdir=.libs
[libltdl_cv_objdir],
[libltdl_cv_objdir="$objdir"
if test -n "$objdir"; then
:
else
# MS-DOS does not allow filenames that begin with a dot.
libltdl_cv_objdir=_libs
rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
if test -d .libs; then
libltdl_cv_objdir=.libs
else
# MS-DOS does not allow filenames that begin with a dot.
libltdl_cv_objdir=_libs
fi
rmdir .libs 2>/dev/null
fi
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_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
libltdl_cv_preloaded_symbols, [dnl
if test -n "$global_symbol_pipe"; then
[libltdl_cv_preloaded_symbols],
[if test -n "$global_symbol_pipe"; then
libltdl_cv_preloaded_symbols=yes
else
libltdl_cv_preloaded_symbols=no
fi
])
if test x"$libltdl_cv_preloaded_symbols" = x"yes"; then
])
if test x"$libltdl_cv_preloaded_symbols" = xyes; 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_SUBST(LIBADD_DL)
AC_LANG_PUSH([C])
AC_CHECK_LIB(dl, dlopen,
[AC_DEFINE(HAVE_LIBDL, 1,
[Define if you have the libdl library or equivalent. ])
LIBADD_DL="-ldl"],
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();],
[AC_DEFINE(HAVE_LIBDL, 1,
[Define if you have the libdl library or equivalent.])],
],
[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_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,
[AC_DEFINE(HAVE_SHL_LOAD, 1, [Define if you have the shl_load function.])
LIBADD_DL="$LIBADD_DL -ldld"])])
[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.])
test "x$ac_cv_lib_dld_shl_load" = yes || LIBADD_DL="$LIBADD_DL -ldld"])
AC_CHECK_LIB([dld], [dld_link],
[AC_DEFINE([HAVE_DLD], [1],
[Define if you have the GNU dld library.])
test x"$ac_cv_lib_dld_shl_load" = xyes || LIBADD_DL="$LIBADD_DL -ldld"
])
if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes
if test x"$ac_cv_func_dlopen" = xyes || test x"$ac_cv_lib_dl_dlopen" = xyes
then
lt_save_LIBS="$LIBS"
LIBS="$LIBS $LIBADD_DL"
AC_CHECK_FUNCS(dlerror)
AC_CHECK_FUNCS([dlerror])
LIBS="$lt_save_LIBS"
fi
AC_LANG_POP
])# AC_LTDL_DLLIB
# AC_LTDL_SYMBOL_USCORE
# ---------------------
# does the compiler prefix global symbols with an underscore?
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
AC_MSG_CHECKING([for _ prefix in compiled symbols])
AC_CACHE_VAL(ac_cv_sys_symbol_underscore,
[ac_cv_sys_symbol_underscore=no
cat > conftest.$ac_ext <<EOF
[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
AC_CACHE_CHECK([for _ prefix in compiled symbols],
[ac_cv_sys_symbol_underscore],
[ac_cv_sys_symbol_underscore=no
cat > conftest.$ac_ext <<EOF
void nm_test_func(){}
int main(){nm_test_func;return 0;}
EOF
if AC_TRY_EVAL(ac_compile); then
# Now try to grab the symbols.
ac_nlist=conftest.nm
if AC_TRY_EVAL(NM conftest.$ac_objext \| $global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
# See whether the symbols have a leading underscore.
if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
ac_cv_sys_symbol_underscore=yes
else
if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
:
if AC_TRY_EVAL(ac_compile); then
# Now try to grab the symbols.
ac_nlist=conftest.nm
if AC_TRY_EVAL(NM conftest.$ac_objext \| $global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
# See whether the symbols have a leading underscore.
if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
ac_cv_sys_symbol_underscore=yes
else
echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
:
else
echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
fi
fi
else
echo "configure: cannot run $global_symbol_pipe" >&AC_FD_CC
fi
else
echo "configure: cannot run $global_symbol_pipe" >&AC_FD_CC
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.c >&AC_FD_CC
fi
else
echo "configure: failed program was:" >&AC_FD_CC
cat conftest.c >&AC_FD_CC
fi
rm -rf conftest*
])
AC_MSG_RESULT($ac_cv_sys_symbol_underscore)
rm -rf conftest*
])
])# AC_LTDL_SYMBOL_USCORE
# AC_LTDL_DLSYM_USCORE
# --------------------
AC_DEFUN([AC_LTDL_DLSYM_USCORE],
[AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl
[AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])
if test x"$ac_cv_sys_symbol_underscore" = xyes; then
if test x"$ac_cv_func_dlopen" = xyes ||
test x"$ac_cv_lib_dl_dlopen" = xyes ; then
AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
libltdl_cv_need_uscore, [dnl
libltdl_cv_need_uscore=unknown
save_LIBS="$LIBS"
LIBS="$LIBS $LIBADD_DL"
_LT_AC_TRY_DLOPEN_SELF(
libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes,
[], libltdl_cv_need_uscore=cross)
LIBS="$save_LIBS"
[libltdl_cv_need_uscore],
[libltdl_cv_need_uscore=unknown
save_LIBS="$LIBS"
LIBS="$LIBS $LIBADD_DL"
_LT_AC_TRY_DLOPEN_SELF(
[libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
[], [libltdl_cv_need_uscore=cross])
LIBS="$save_LIBS"
])
fi
fi
@ -338,3 +359,19 @@ if test x"$libltdl_cv_need_uscore" = xyes; then
[Define if dlsym() requires a leading underscode in symbol names. ])
fi
])# AC_LTDL_DLSYM_USCORE
# AC_LTDL_FUNC_ARGZ
# -----------------
AC_DEFUN([AC_LTDL_FUNC_ARGZ],
[AC_CHECK_HEADERS([argz.h])
AC_CHECK_TYPES([error_t],
[],
[AC_DEFINE([error_t], [int],
[Define to a type to use for `error_t' if it is not otherwise available])],
[#if HAVE_ARGZ_H
# include <argz.h>
#endif])
AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next])
])# AC_LTDL_FUNC_ARGZ