* Updated from libtool multi-language branch.
From-SVN: r36295
This commit is contained in:
parent
8a24138dca
commit
205f5ac60a
9 changed files with 4530 additions and 1771 deletions
|
@ -1,3 +1,7 @@
|
|||
2000-09-10 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* Updated from libtool multi-language branch.
|
||||
|
||||
2000-02-14 Tom Tromey <tromey@cygnus.com>
|
||||
|
||||
* ltdl.c: If HAVE_BOEHM_GC defined, includ gc.h.
|
||||
|
|
|
@ -16,7 +16,7 @@ noinst_LTLIBRARIES = libltdlc.la
|
|||
endif
|
||||
|
||||
libltdl_la_SOURCES = ltdl.c
|
||||
libltdl_la_LDFLAGS = -version-info 1:2:1
|
||||
libltdl_la_LDFLAGS = -no-undefined -version-info 2:0:2
|
||||
libltdl_la_LIBADD = $(LIBADD_DL)
|
||||
|
||||
libltdlc_la_SOURCES = ltdl.c
|
||||
|
|
|
@ -61,8 +61,13 @@ host_alias = @host_alias@
|
|||
host_triplet = @host@
|
||||
AS = @AS@
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
EXEEXT = @EXEEXT@
|
||||
GCINCS = @GCINCS@
|
||||
GCJ = @GCJ@
|
||||
GCJFLAGS = @GCJFLAGS@
|
||||
LIBADD_DL = @LIBADD_DL@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
|
@ -70,22 +75,24 @@ LN_S = @LN_S@
|
|||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
RANLIB = @RANLIB@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
|
||||
AUTOMAKE_OPTIONS = no-dependencies foreign no-installinfo
|
||||
AUTOMAKE_OPTIONS = no-dependencies foreign
|
||||
|
||||
INCLUDES = $(GCINCS)
|
||||
|
||||
@INSTALL_LTDL_TRUE@include_HEADERS = @INSTALL_LTDL_TRUE@ltdl.h
|
||||
@INSTALL_LTDL_TRUE@lib_LTLIBRARIES = @INSTALL_LTDL_TRUE@libltdl.la
|
||||
@INSTALL_LTDL_FALSE@noinst_HEADERS = @INSTALL_LTDL_FALSE@ltdl.h
|
||||
@INSTALL_LTDL_TRUE@include_HEADERS = ltdl.h
|
||||
@INSTALL_LTDL_TRUE@lib_LTLIBRARIES = libltdl.la
|
||||
@INSTALL_LTDL_FALSE@noinst_HEADERS = ltdl.h
|
||||
|
||||
@CONVENIENCE_LTDL_TRUE@noinst_LTLIBRARIES = @CONVENIENCE_LTDL_TRUE@libltdlc.la
|
||||
@CONVENIENCE_LTDL_TRUE@noinst_LTLIBRARIES = libltdlc.la
|
||||
|
||||
libltdl_la_SOURCES = ltdl.c
|
||||
libltdl_la_LDFLAGS = -version-info 1:2:1
|
||||
libltdl_la_LDFLAGS = -no-undefined -version-info 2:0:2
|
||||
libltdl_la_LIBADD = $(LIBADD_DL)
|
||||
|
||||
libltdlc_la_SOURCES = ltdl.c
|
||||
|
@ -127,7 +134,7 @@ OBJECTS = $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS)
|
|||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .lo .o .s
|
||||
.SUFFIXES: .S .c .lo .o .obj .s
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
|
||||
|
||||
|
@ -208,6 +215,11 @@ maintainer-clean-noinstLTLIBRARIES:
|
|||
.c.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
# FIXME: We should only use cygpath when building on Windows,
|
||||
# and only if it is available.
|
||||
.c.obj:
|
||||
$(COMPILE) -c `cygpath -w $<`
|
||||
|
||||
.s.o:
|
||||
$(COMPILE) -c $<
|
||||
|
||||
|
@ -216,6 +228,7 @@ maintainer-clean-noinstLTLIBRARIES:
|
|||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.o core *.core
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
clean-compile:
|
||||
|
||||
|
@ -349,8 +362,6 @@ check-am: all-am
|
|||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-info-am:
|
||||
install-info: install-info-am
|
||||
all-recursive-am: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
|
@ -427,12 +438,11 @@ maintainer-clean-compile mostlyclean-libtool distclean-libtool \
|
|||
clean-libtool maintainer-clean-libtool uninstall-includeHEADERS \
|
||||
install-includeHEADERS tags mostlyclean-tags distclean-tags clean-tags \
|
||||
maintainer-clean-tags distdir info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-info-am install-info \
|
||||
all-recursive-am install-exec-am install-exec install-data-am \
|
||||
install-data install-am install uninstall-am uninstall all-redirect \
|
||||
all-am all installdirs mostlyclean-generic distclean-generic \
|
||||
clean-generic maintainer-clean-generic clean mostlyclean distclean \
|
||||
maintainer-clean
|
||||
installcheck-am installcheck all-recursive-am install-exec-am \
|
||||
install-exec install-data-am install-data install-am install \
|
||||
uninstall-am uninstall all-redirect all-am all installdirs \
|
||||
mostlyclean-generic distclean-generic clean-generic \
|
||||
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
ltdl.lo: ltdl.h config.h
|
||||
|
|
File diff suppressed because it is too large
Load diff
948
libjava/libltdl/aclocal.m4
vendored
948
libjava/libltdl/aclocal.m4
vendored
File diff suppressed because it is too large
Load diff
|
@ -9,15 +9,6 @@
|
|||
/* Define if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define if you have the libdl library or equivalent. */
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
/* Define if you have the GNU dld library. */
|
||||
#undef HAVE_DLD
|
||||
|
||||
/* Define if you have the shl_load function. */
|
||||
#undef HAVE_SHL_LOAD
|
||||
|
||||
/* Define if you are using the Boehm GC. */
|
||||
#undef HAVE_BOEHM_GC
|
||||
|
||||
|
@ -33,6 +24,9 @@
|
|||
/* Define if you have the strchr function. */
|
||||
#undef HAVE_STRCHR
|
||||
|
||||
/* Define if you have the strcmp function. */
|
||||
#undef HAVE_STRCMP
|
||||
|
||||
/* Define if you have the strrchr function. */
|
||||
#undef HAVE_STRRCHR
|
||||
|
||||
|
@ -72,12 +66,33 @@
|
|||
/* Define to the name of the environment variable that determines the dynamic library search path. */
|
||||
#undef LTDL_SHLIBPATH_VAR
|
||||
|
||||
/* Define to the system default library search path. */
|
||||
#undef LTDL_SYSSEARCHPATH
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries. */
|
||||
#undef LTDL_OBJDIR
|
||||
|
||||
/* Define if libtool can extract symbol lists from object files. */
|
||||
#undef HAVE_PRELOADED_SYMBOLS
|
||||
|
||||
/* Define if you have the libdl library or equivalent. */
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
/* Define if you have the libdl library or equivalent. */
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
/* Define if you have the libdl library or equivalent. */
|
||||
#undef HAVE_LIBDL
|
||||
|
||||
/* Define if you have the shl_load function. */
|
||||
#undef HAVE_SHL_LOAD
|
||||
|
||||
/* Define if you have the shl_load function. */
|
||||
#undef HAVE_SHL_LOAD
|
||||
|
||||
/* Define if you have the GNU dld library. */
|
||||
#undef HAVE_DLD
|
||||
|
||||
/* Define if dlsym() requires a leading underscode in symbol names. */
|
||||
#undef NEED_USCORE
|
||||
|
||||
|
|
2675
libjava/libltdl/configure
vendored
2675
libjava/libltdl/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -2,6 +2,13 @@ dnl Process this file with autoconf to create configure.
|
|||
|
||||
AC_INIT(ltdl.c)
|
||||
|
||||
dnl We shouldn't be using these internal macros of autoconf,
|
||||
dnl but CONFIG_AUX_DIR($with_auxdir) breaks automake.
|
||||
AC_ARG_WITH(auxdir,
|
||||
[ --with-auxdir=DIR path to autoconf auxiliary files],
|
||||
[AC_CONFIG_AUX_DIRS($with_auxdir)],
|
||||
[AC_CONFIG_AUX_DIR_DEFAULT])
|
||||
|
||||
if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then
|
||||
if test -f ${srcdir}/ltconfig && test -f ${srcdir}/ltmain.sh; then
|
||||
# if libltdl is libtoolized, it is assumed to be stand-alone and
|
||||
|
@ -14,19 +21,18 @@ if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then
|
|||
fi
|
||||
fi
|
||||
|
||||
AM_INIT_AUTOMAKE(libltdl,1.0,-)
|
||||
AM_INIT_AUTOMAKE(libltdl,1.1,-)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_PROG_CC
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
|
||||
AC_LIBTOOL_WIN32_DLL
|
||||
AM_PROG_LIBTOOL
|
||||
AC_SUBST(LIBTOOL_DEPS)
|
||||
|
||||
AC_ARG_ENABLE(ltdl-install,
|
||||
[ --enable-ltdl-install install libltdl])
|
||||
|
||||
AC_MSG_CHECKING([for garbage collector to use])
|
||||
AC_ARG_ENABLE(java-gc,
|
||||
changequote(<<,>>)dnl
|
||||
|
@ -43,342 +49,7 @@ if test "$GC" = "boehm"; then
|
|||
fi
|
||||
AC_SUBST(GCINCS)
|
||||
|
||||
AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
|
||||
AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
|
||||
|
||||
dnl Read the libtool configuration
|
||||
rm -f conftest
|
||||
./libtool --config > conftest
|
||||
. ./conftest
|
||||
rm -f conftest
|
||||
|
||||
AC_CACHE_CHECK([which extension is used for shared libraries],
|
||||
libltdl_cv_shlibext, [dnl
|
||||
(
|
||||
last=
|
||||
for spec in $library_names_spec; do
|
||||
last="$spec"
|
||||
done
|
||||
changequote(, )
|
||||
echo "$last" | sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//' > conftest
|
||||
changequote([, ])
|
||||
)
|
||||
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_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_CACHE_CHECK([for objdir],
|
||||
libltdl_cv_objdir, [libltdl_cv_objdir="$objdir"])
|
||||
test -z "$libltdl_cv_objdir" && libltdl_cv_objdir=".libs"
|
||||
AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/",
|
||||
[Define to the sub-directory in which libtool stores uninstalled libraries. ])
|
||||
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(malloc.h memory.h stdlib.h stdio.h ctype.h dlfcn.h 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_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
|
||||
libltdl_cv_preloaded_symbols, [dnl
|
||||
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
|
||||
AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1,
|
||||
[Define if libtool can extract symbol lists from object files. ])
|
||||
fi
|
||||
|
||||
LIBADD_DL=
|
||||
AC_CHECK_LIB(dl, dlopen, [AC_DEFINE(HAVE_LIBDL, 1) LIBADD_DL="-ldl"],
|
||||
[AC_CHECK_FUNC(dlopen, [AC_DEFINE(HAVE_LIBDL, 1)])])
|
||||
AC_CHECK_FUNC(shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1)],
|
||||
[AC_CHECK_LIB(dld, shl_load, [AC_DEFINE(HAVE_SHL_LOAD, 1) LIBADD_DL="$LIBADD_DL -ldld"])])
|
||||
AC_CHECK_LIB(dld, dld_link, [AC_DEFINE(HAVE_DLD, 1)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"
|
||||
LIBS="$LIBS $LIBADD_DL"
|
||||
AC_CHECK_FUNCS(dlerror)
|
||||
LIBS="$LIBS_SAVE"
|
||||
fi
|
||||
|
||||
dnl Check for command to grab the raw symbol name followed
|
||||
dnl by C symbol name from nm.
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
AC_REQUIRE([AC_PROG_NM])dnl
|
||||
# Check for command to grab the raw symbol name followed by C symbol from nm.
|
||||
AC_MSG_CHECKING([command to parse $NM output])
|
||||
AC_CACHE_VAL(ac_cv_sys_global_symbol_pipe,
|
||||
[# These are sane defaults that work on at least a few old systems.
|
||||
# {They come from Ultrix. What could be older than Ultrix?!! ;)}
|
||||
|
||||
changequote(,)dnl
|
||||
# Character class describing NM global symbol codes.
|
||||
ac_symcode='[BCDEGRST]'
|
||||
|
||||
# Regexp to match symbols that can be accessed directly from C.
|
||||
ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
|
||||
|
||||
# Transform the above into a raw symbol and a C symbol.
|
||||
ac_symxfrm='\1 \2\3 \3'
|
||||
|
||||
# Transform an extracted symbol line into a proper C declaration
|
||||
ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
|
||||
|
||||
# Define system-specific variables.
|
||||
case "$host_os" in
|
||||
aix*)
|
||||
ac_symcode='[BCDT]'
|
||||
;;
|
||||
cygwin* | mingw*)
|
||||
ac_symcode='[ABCDGISTW]'
|
||||
;;
|
||||
hpux*)
|
||||
ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
|
||||
;;
|
||||
irix*)
|
||||
ac_symcode='[BCDEGRST]'
|
||||
;;
|
||||
solaris*)
|
||||
ac_symcode='[BDT]'
|
||||
;;
|
||||
esac
|
||||
|
||||
# If we're using GNU nm, then use its standard symbol codes.
|
||||
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
|
||||
ac_symcode='[ABCDGISTW]'
|
||||
fi
|
||||
changequote([,])dnl
|
||||
|
||||
# Try without a prefix undercore, then with it.
|
||||
for ac_symprfx in "" "_"; do
|
||||
|
||||
ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($ac_symcode\)[ ][ ]*\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'"
|
||||
|
||||
# Check to see that the pipe works correctly.
|
||||
ac_pipe_works=no
|
||||
rm -f conftest.$ac_ext
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
char nm_test_var;
|
||||
void nm_test_func(){}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
int main(){nm_test_var='a';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 \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
|
||||
|
||||
# Try sorting and uniquifying the output.
|
||||
if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
|
||||
mv -f "$ac_nlist"T "$ac_nlist"
|
||||
else
|
||||
rm -f "$ac_nlist"T
|
||||
fi
|
||||
|
||||
# Make sure that we snagged all the symbols we need.
|
||||
if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
|
||||
if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
|
||||
cat <<EOF > conftest.c
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
EOF
|
||||
# Now generate the symbol file.
|
||||
eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c'
|
||||
|
||||
cat <<EOF >> conftest.c
|
||||
#if defined (__STDC__) && __STDC__
|
||||
# define lt_ptr_t void *
|
||||
#else
|
||||
# define lt_ptr_t char *
|
||||
# define const
|
||||
#endif
|
||||
|
||||
/* The mapping between symbol names and symbols. */
|
||||
const struct {
|
||||
const char *name;
|
||||
lt_ptr_t address;
|
||||
}
|
||||
changequote(,)dnl
|
||||
lt_preloaded_symbols[] =
|
||||
changequote([,])dnl
|
||||
{
|
||||
EOF
|
||||
sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
|
||||
cat <<\EOF >> conftest.c
|
||||
{0, (lt_ptr_t) 0}
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
EOF
|
||||
# Now try linking the two files.
|
||||
mv conftest.$ac_objext conftstm.$ac_objext
|
||||
ac_save_LIBS="$LIBS"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
LIBS="conftstm.$ac_objext"
|
||||
CFLAGS="$CFLAGS$no_builtin_flag"
|
||||
if AC_TRY_EVAL(ac_link) && test -s conftest; then
|
||||
ac_pipe_works=yes
|
||||
else
|
||||
echo "configure: failed program was:" >&AC_FD_CC
|
||||
cat conftest.c >&AC_FD_CC
|
||||
fi
|
||||
LIBS="$ac_save_LIBS"
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
else
|
||||
echo "cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
|
||||
fi
|
||||
else
|
||||
echo "cannot find nm_test_var in $ac_nlist" >&AC_FD_CC
|
||||
fi
|
||||
else
|
||||
echo "cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
|
||||
fi
|
||||
else
|
||||
echo "$progname: failed program was:" >&AC_FD_CC
|
||||
cat conftest.c >&AC_FD_CC
|
||||
fi
|
||||
rm -rf conftest* conftst*
|
||||
|
||||
# Do not use the global_symbol_pipe unless it works.
|
||||
if test "$ac_pipe_works" = yes; then
|
||||
if test x"$ac_symprfx" = x"_"; then
|
||||
ac_cv_sys_symbol_underscore=yes
|
||||
else
|
||||
ac_cv_sys_symbol_underscore=no
|
||||
fi
|
||||
break
|
||||
else
|
||||
ac_cv_sys_global_symbol_pipe=
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
ac_result=yes
|
||||
if test -z "$ac_cv_sys_global_symbol_pipe"; then
|
||||
ac_result=no
|
||||
fi
|
||||
AC_MSG_RESULT($ac_result)
|
||||
|
||||
dnl does the compiler prefix global symbols with an underscore?
|
||||
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
|
||||
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 \| $ac_cv_sys_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
|
||||
:
|
||||
else
|
||||
echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&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)
|
||||
|
||||
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
|
||||
AC_TRY_RUN([
|
||||
#if HAVE_DLFCN_H
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef RTLD_GLOBAL
|
||||
# define LTDL_GLOBAL RTLD_GLOBAL
|
||||
#else
|
||||
# ifdef DL_GLOBAL
|
||||
# define LTDL_GLOBAL DL_GLOBAL
|
||||
# else
|
||||
# define LTDL_GLOBAL 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* We may have to define LTDL_LAZY_OR_NOW in the command line if we
|
||||
find out it does not work in some platform. */
|
||||
#ifndef LTDL_LAZY_OR_NOW
|
||||
# ifdef RTLD_LAZY
|
||||
# define LTDL_LAZY_OR_NOW RTLD_LAZY
|
||||
# else
|
||||
# ifdef DL_LAZY
|
||||
# define LTDL_LAZY_OR_NOW DL_LAZY
|
||||
# else
|
||||
# ifdef RTLD_NOW
|
||||
# define LTDL_LAZY_OR_NOW RTLD_NOW
|
||||
# else
|
||||
# ifdef DL_NOW
|
||||
# define LTDL_LAZY_OR_NOW DL_NOW
|
||||
# else
|
||||
# define LTDL_LAZY_OR_NOW 0
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
fnord() { int i=42;}
|
||||
main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
|
||||
if(self) { ptr1=dlsym(self,"fnord"); ptr2=dlsym(self,"_fnord");
|
||||
if(ptr1 && !ptr2) { dlclose(self); exit(0); } } exit(1); }
|
||||
], libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes,
|
||||
libltdl_cv_need_uscore=cross
|
||||
)])
|
||||
fi
|
||||
fi
|
||||
|
||||
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_LIB_LTDL
|
||||
|
||||
dnl Output the makefile
|
||||
AC_OUTPUT(Makefile)
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue