📄 ltconfig
字号:
# Make sure that we snagged all the symbols we need. if egrep ' nm_test_var$' "$nlist" >/dev/null; then if egrep ' nm_test_func$' "$nlist" >/dev/null; then cat <<EOF > conftest.$ac_ext#ifdef __cplusplusextern "C" {#endifEOF # Now generate the symbol file. eval "$global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext' cat <<EOF >> conftest.$ac_ext#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;}lt_preloaded_symbols[] ={EOF sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0}};#ifdef __cplusplus}#endifEOF # Now try linking the two files. mv conftest.$objext conftstm.$objext save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="conftstm.$objext" CFLAGS="$CFLAGS$no_builtin_flag" if { (eval echo $progname:1365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then pipe_works=yes else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi LIBS="$save_LIBS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi $rm conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else global_symbol_pipe= fidoneif test "$pipe_works" = yes; then echo "${ac_t}ok" 1>&6else echo "${ac_t}failed" 1>&6fiif test -z "$global_symbol_pipe"; then global_symbol_to_cdecl=fi# Report the final consequences.echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6# Only try to build win32 dlls if AC_LIBTOOL_WIN32_DLL was used in# configure.in, otherwise build static only libraries.case "$host_os" incygwin* | mingw* | os2*) if test x$can_build_shared = xyes; then test x$enable_win32_dll = xno && can_build_shared=no echo "checking if package supports dlls... $can_build_shared" 1>&6 fi;;esacecho $ac_n "checking whether to build shared libraries... $ac_c" 1>&6test "$can_build_shared" = "no" && enable_shared=no# On AIX, shared libraries and static libraries use the same namespace, and# are all built from PIC.case "$host_os" inaix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;;aix4*) test "$enable_shared" = yes && enable_static=no ;;esacecho "$ac_t$enable_shared" 1>&6# Make sure either enable_shared or enable_static is yes.test "$enable_shared" = yes || enable_static=yesecho "checking whether to build static libraries... $enable_static" 1>&6if test "$hardcode_action" = relink || test "$hardcode_into_libs" = all; then # Fast installation is not supported enable_fast_install=noelif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needlessfivariables_saved_for_relink="PATH $shlibpath_var $runpath_var"if test "$with_gcc" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"fi# Check whether we must set pic_mode to defaulttest -z "$pic_flag" && pic_mode=defaultif test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknownelseif test "X${lt_cv_dlopen+set}" != Xset; then lt_cv_dlopen=no lt_cv_dlopen_libs=echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6echo "$progname:1469: checking for dlopen in -ldl" >&5if test "X${ac_cv_lib_dl_dlopen+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6else ac_save_LIBS="$LIBS"LIBS="-ldl $LIBS"cat > conftest.$ac_ext <<EOF/*#line 1476 "ltconfig"*//* Override any gcc2 internal prototype to avoid an error. *//* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */#ifdef __cplusplusextern "C"#endifchar dlopen();int main() {dlopen(); return 0; }EOFif { (eval echo $progname:1489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_lib_dl_dlopen=yeselse echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_lib_dl_dlopen=nofirm -f conftest*LIBS="$ac_save_LIBS"fiif test "X$ac_cv_lib_dl_dlopen" = Xyes; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"else echo "$ac_t""no" 1>&6echo $ac_n "checking for dlopen""... $ac_c" 1>&6echo "$progname:1508: checking for dlopen" >&5if test "X${ac_cv_func_dlopen+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF/*#line 1513 "ltconfig"*//* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen(); below. */#include <assert.h>/* Override any gcc2 internal prototype to avoid an error. *//* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */#ifdef __cplusplusextern "C"#endifchar dlopen();int main() {/* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */#if defined (__stub_dlopen) || defined (__stub___dlopen)choke me#elsedlopen();#endif; return 0; }EOFif { (eval echo $progname:1538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_dlopen=yeselse echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_func_dlopen=nofirm -f conftest*fiif test "X$ac_cv_func_dlopen" = Xyes; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="dlopen"else echo "$ac_t""no" 1>&6echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6echo "$progname:1555: checking for dld_link in -ldld" >&5if test "X${ac_cv_lib_dld_dld_link+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6else ac_save_LIBS="$LIBS"LIBS="-ldld $LIBS"cat > conftest.$ac_ext <<EOF/*#line 1562 "ltconfig"*//* Override any gcc2 internal prototype to avoid an error. *//* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */#ifdef __cplusplusextern "C"#endifchar dld_link();int main() {dld_link(); return 0; }EOFif { (eval echo $progname:1575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_lib_dld_dld_link=yeselse echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_lib_dld_dld_link=nofirm -f conftest*LIBS="$ac_save_LIBS"fiif test "X$ac_cv_lib_dld_dld_link" = Xyes; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"else echo "$ac_t""no" 1>&6echo $ac_n "checking for shl_load""... $ac_c" 1>&6echo "$progname:1594: checking for shl_load" >&5if test "X${ac_cv_func_shl_load+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF/*#line 1599 "ltconfig"*//* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load(); below. */#include <assert.h>/* Override any gcc2 internal prototype to avoid an error. *//* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */#ifdef __cplusplusextern "C"#endifchar shl_load();int main() {/* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */#if defined (__stub_shl_load) || defined (__stub___shl_load)choke me#elseshl_load();#endif; return 0; }EOFif { (eval echo $progname:1624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_shl_load=yeselse echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_func_shl_load=nofirm -f conftest*fiif test "X$ac_cv_func_shl_load" = Xyes; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="shl_load"else echo "$ac_t""no" 1>&6echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6echo "$progname:1642: checking for shl_load in -ldld" >&5if test "X${ac_cv_lib_dld_shl_load+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6else ac_save_LIBS="$LIBS"LIBS="-ldld $LIBS"cat > conftest.$ac_ext <<EOF/*#line 1649 "ltconfig"*/#include "confdefs.h"/* Override any gcc2 internal prototype to avoid an error. *//* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */#ifdef __cplusplusextern "C"#endifchar shl_load();int main() {shl_load(); return 0; }EOFif { (eval echo $progname:1663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_lib_dld_shl_load=yeselse echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_lib_dld_shl_load=nofirm -f conftest*LIBS="$ac_save_LIBS"fiif test "X$ac_cv_lib_dld_shl_load" = Xyes; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"else echo "$ac_t""no" 1>&6fifififififi if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes fi case "$lt_cv_dlopen" in dlopen)for ac_hdr in dlfcn.h; doac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6echo "$progname:1706: checking for $ac_hdr" >&5if eval "test \"`echo 'X$''{'ac_cv_header_$ac_safe'+set}'`\" = Xset"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF/*#line 1711 "ltconfig"*/#include <$ac_hdr>int fnord = 0;int main () { return(0); }EOFac_try="$ac_compile >/dev/null 2>conftest.out"{ (eval echo $progname:1717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes"else echo "$ac_err" >&5 echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6else echo "$ac_t""no" 1>&6fidone if test "x$ac_cv_header_dlfcn_h" = xyes; then CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" fi eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" LIBS="$lt_cv_dlopen_libs $LIBS" echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6echo "$progname:1745: checking whether a program can dlopen itself" >&5if test "X${lt_cv_dlopen_self+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6else if test "$cross_compiling" = yes; then lt_cv_dlopen_self=cross else cat > conftest.c <<EOF/*#line 1753 "ltconfig"*/#if HAVE_DLFCN_H#include <dlfcn.h>#endif#include <stdio.h>#ifdef RTLD_GLOBAL
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -