📄 aclocal.m4
字号:
# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)# ----------------------------------------------------------------m4_defun([_LT_TRY_DLOPEN_SELF],[m4_require([_LT_HEADER_DLFCN])dnlif test "$cross_compiling" = yes; then : [$4]else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF[#line __oline__ "configure"#include "confdefs.h"#if HAVE_DLFCN_H#include <dlfcn.h>#endif#include <stdio.h>#ifdef RTLD_GLOBAL# define LT_DLGLOBAL RTLD_GLOBAL#else# ifdef DL_GLOBAL# define LT_DLGLOBAL DL_GLOBAL# else# define LT_DLGLOBAL 0# endif#endif/* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */#ifndef LT_DLLAZY_OR_NOW# ifdef RTLD_LAZY# define LT_DLLAZY_OR_NOW RTLD_LAZY# else# ifdef DL_LAZY# define LT_DLLAZY_OR_NOW DL_LAZY# else# ifdef RTLD_NOW# define LT_DLLAZY_OR_NOW RTLD_NOW# else# ifdef DL_NOW# define LT_DLLAZY_OR_NOW DL_NOW# else# define LT_DLLAZY_OR_NOW 0# endif# endif# endif# endif#endif#ifdef __cplusplusextern "C" void exit (int);#endifvoid fnord() { int i=42;}int main (){ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status);}]_LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fifirm -fr conftest*])# _LT_TRY_DLOPEN_SELF# LT_SYS_DLOPEN_SELF# ------------------AC_DEFUN([LT_SYS_DLOPEN_SELF],[m4_require([_LT_HEADER_DLFCN])dnlif test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknownelse lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esacfi_LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported])_LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported])_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported])])# LT_SYS_DLOPEN_SELF# Old name:AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])dnl aclocal-1.4 backwards compatibility:dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])# _LT_COMPILER_C_O([TAGNAME])# ---------------------------# Check to see if options -c and -o are simultaneously supported by compiler.# This macro does not hard code the compiler like AC_PROG_CC_C_O.m4_defun([_LT_COMPILER_C_O],[m4_require([_LT_DECL_SED])dnlm4_require([_LT_FILEUTILS_DEFAULTS])dnlm4_require([_LT_TAG_COMPILER])dnlAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest*])_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?])])# _LT_COMPILER_C_O# _LT_COMPILER_FILE_LOCKS([TAGNAME])# ----------------------------------# Check to see if we can do hard links to lock some files if neededm4_defun([_LT_COMPILER_FILE_LOCKS],[m4_require([_LT_ENABLE_LOCK])dnlm4_require([_LT_FILEUTILS_DEFAULTS])dnl_LT_COMPILER_C_O([$1])hard_links="nottested"if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fielse need_locks=nofi_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])])# _LT_COMPILER_FILE_LOCKS# _LT_CHECK_OBJDIR# ----------------m4_defun([_LT_CHECK_OBJDIR],[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],[rm -f .libs 2>/dev/nullmkdir .libs 2>/dev/nullif test -d .libs; then lt_cv_objdir=.libselse # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libsfirmdir .libs 2>/dev/null])objdir=$lt_cv_objdir_LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnlm4_pattern_allow([LT_OBJDIR])dnlAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.])])# _LT_CHECK_OBJDIR# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])# --------------------------------------# Check hardcoding attributes.m4_defun([_LT_LINKER_HARDCODE_LIBPATH],[AC_MSG_CHECKING([how to hardcode library paths into programs])_LT_TAGVAR(hardcode_action, $1)=if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fielse # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupportedfiAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; 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=needlessfi_LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable])])# _LT_LINKER_HARDCODE_LIBPATH# _LT_CMD_STRIPLIB# ----------------m4_defun([_LT_CMD_STRIPLIB],[m4_require([_LT_DECL_EGREP])striplib=old_striplib=AC_MSG_CHECKING([whether stripping libraries is possible])if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes])else# FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esacfi_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])_LT_DECL([], [striplib], [1])])# _LT_CMD_STRIPLIB# _LT_SYS_DYNAMIC_LINKER([TAG])# -----------------------------# PORTME Fill in your ld.so characteristicsm4_defun([_LT_SYS_DYNAMIC_LINKER],[AC_REQUIRE([AC_CANONICAL_HOST])dnlm4_require([_LT_DECL_EGREP])dnlm4_require([_LT_FILEUTILS_DEFAULTS])dnlm4_require([_LT_DECL_SED])dnlAC_MSG_CHECKING([dynamic linker char
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -