📄 ltconfig
字号:
soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;;sunos4*) version_type=sunos library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;;sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;;uts4*) version_type=linux library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;;dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' soname_spec='${libname}${release}.so$major' shlibpath_var=LD_LIBRARY_PATH ;;sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so' soname_spec='$libname.so.$major' shlibpath_var=LD_LIBRARY_PATH fi ;;*) dynamic_linker=no ;;esacecho "$ac_t$dynamic_linker" 1>&6test "$dynamic_linker" = no && can_build_shared=no# Check for command to grab the raw symbol name followed by C symbol from nm.echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6# These are sane defaults that work on at least a few old systems.# [They come from Ultrix. What could be older than Ultrix?!! ;)]# Character class describing NM global symbol codes.symcode='[BCDEGRST]'# Regexp to match symbols that can be accessed directly from C.sympat='\([_A-Za-z][_A-Za-z0-9]*\)'# Transform the above into a raw symbol and a C symbol.symxfrm='\1 \2\3 \3'# Transform an extracted symbol line into a proper C declarationglobal_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"# Define system-specific variables.case $host_os inaix*) symcode='[BCDT]' ;;cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;;hpux*) # Its linker distinguishes data from code symbols global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'" ;;irix*) symcode='[BCDEGRST]' ;;solaris* | sysv5*) symcode='[BDT]' ;;sysv4) symcode='[DFNSTU]' ;;esac# Handle CRLF in mingw tool chainopt_cr=case $host_os inmingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;;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 symcode='[ABCDGISTW]'fi# Try without a prefix undercore, then with it.for ac_symprfx in "" "_"; do # Write the raw and C identifiers.global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no $rm conftest* cat > conftest.$ac_ext <<EOF#ifdef __cplusplusextern "C" {#endifchar nm_test_var;void nm_test_func(){}#ifdef __cplusplus}#endifint main(){nm_test_var='a';nm_test_func();return(0);}EOF echo "$progname:1423: checking if global_symbol_pipe works" >&5 if { (eval echo $progname:1424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then # Now try to grab the symbols. nlist=conftest.nm if { echo "$progname:1427: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # 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:1479: \"$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* | pw32* | 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* | aix5*) 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; 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:1583: 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 1590 "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:1603: \"$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:1622: 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 1627 "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:1652: \"$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 dlopen in -lsvld""... $ac_c" 1>&6echo "$progname:1669: checking for dlopen in -lsvld" >&5if test "X${ac_cv_lib_svld_dlopen+set}" = Xset; then echo $ac_n "(cached) $ac_c" 1>&6else ac_save_LIBS="$LIBS"LIBS="-lsvld $LIBS"cat > conftest.$ac_ext <<EOF/*#line 1676 "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:1689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_lib_svld_dlopen=yeselse echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_lib_svld_dlopen=nofirm -f conftest*LIBS="$ac_save_LIBS"fiif test "X$ac_cv_lib_svld_dlopen" = Xyes; then echo "$ac_t""yes" 1>&6 lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"else echo "$ac_t""no" 1>&6echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6echo "$progname:1708: 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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -