📄 libtool.m4.in
字号:
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esacelif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld])else AC_MSG_CHECKING([for non-GNU ld])fiAC_CACHE_VAL(ac_cv_path_LD,[if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then ac_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs"else ac_cv_path_LD="$LD" # Let the user override the test with a path.fi])LD="$ac_cv_path_LD"if test -n "$LD"; then AC_MSG_RESULT($LD)else AC_MSG_RESULT(no)fitest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])AC_PROG_LD_GNU])AC_DEFUN(AC_PROG_LD_GNU,[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,[# I'd rather use --version here, but apparently some GNU ld's only accept -v.if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then ac_cv_prog_gnu_ld=yeselse ac_cv_prog_gnu_ld=nofi])with_gnu_ld=$ac_cv_prog_gnu_ld])# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker# -- PORTME Some linkers may need a different reload flag.AC_DEFUN(AC_PROG_LD_RELOAD_FLAG,[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,[lt_cv_ld_reload_flag='-r'])reload_flag=$lt_cv_ld_reload_flagtest -n "$reload_flag" && reload_flag=" $reload_flag"])# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies# -- PORTME fill in with the dynamic library characteristicsAC_DEFUN(AC_DEPLIBS_CHECK_METHOD,[AC_CACHE_CHECK([how to recognise dependant libraries],lt_cv_deplibs_check_method,[lt_cv_file_magic_cmd='${MAGIC}'lt_cv_file_magic_test_file=lt_cv_deplibs_check_method='unknown'# Need to set the preceding variable on all platforms that support# interlibrary dependencies.# 'none' -- dependencies not supported.# `unknown' -- same as none, but documents that we really don't know.# 'pass_all' -- all dependencies passed with no checks.# 'test_compile' -- check by making test program.# 'file_magic [regex]' -- check by looking for files in library path# which responds to the $file_magic_cmd with a given egrep regex.# If you have `file' or equivalent on your system and you're not sure# whether `pass_all' will *always* work, you probably want this one.case "$host_os" inaix4*) lt_cv_deplibs_check_method=pass_all ;;beos*) lt_cv_deplibs_check_method=pass_all ;;bsdi4*) changequote(,)dnl lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' changequote([, ])dnl lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;;cygwin* | mingw*) lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='${OBJDUMP} -f' ;;freebsd* ) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case "$host_cpu" in i*86 ) changequote(,)dnl lt_cv_deplibs_check_method=='file_magic OpenBSD/i[3-9]86 demand paged shared library' changequote([, ])dnl lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;;gnu*) lt_cv_deplibs_check_method=pass_all ;;hpux10.20*) # TODO: Does this work for hpux-11 too? changequote(,)dnl lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' changequote([, ])dnl lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libc.sl ;;irix5* | irix6*) case "$host_os" in irix5*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" ;; *) case "$LD" in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac # this will be overridden with pass_all, but let us keep it just in case changequote(,)dnl lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1" changequote([, ])dnl ;; esac lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` lt_cv_deplibs_check_method=pass_all ;;# This must be Linux ELF.linux-gnu*) case "$host_cpu" in alpha* | i*86 | powerpc* | sparc* | ia64* ) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM changequote(,)dnl lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; changequote([, ])dnl esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;;netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then : else changequote(,)dnl lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' changequote([, ])dnl lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` fi ;;osf3* | osf4* | osf5*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' lt_cv_file_magic_test_file=/shlib/libc.so lt_cv_deplibs_check_method=pass_all ;;sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;;solaris*) lt_cv_deplibs_check_method=pass_all lt_cv_file_magic_test_file=/lib/libc.so ;;sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case "$host_vendor" in ncr) lt_cv_deplibs_check_method=pass_all ;; motorola) changequote(,)dnl lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' changequote([, ])dnl lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; esac ;;esac])file_magic_cmd=$lt_cv_file_magic_cmddeplibs_check_method=$lt_cv_deplibs_check_method])# AC_PROG_NM - find the path to a BSD-compatible name listerAC_DEFUN(AC_PROG_NM,[AC_MSG_CHECKING([for BSD-compatible nm])AC_CACHE_VAL(ac_cv_path_NM,[if test -n "$NM"; then # Let the user override the test. ac_cv_path_NM="$NM"else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/${ac_tool_prefix}nm if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$tmp_nm -B" break elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then ac_cv_path_NM="$tmp_nm -p" break else ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_NM" && ac_cv_path_NM=nmfi])NM="$ac_cv_path_NM"AC_MSG_RESULT([$NM])])# AC_CHECK_LIBM - check for math libraryAC_DEFUN(AC_CHECK_LIBM,[AC_REQUIRE([AC_CANONICAL_HOST])dnlLIBM=case "$host" in*-*-beos* | *-*-cygwin*) # These system don't have libm ;;*-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") ;;*) AC_CHECK_LIB(m, main, LIBM="-lm") ;;esac])# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for# the libltdl convenience library and INCLTDL to the include flags for# the libltdl header and adds --enable-ltdl-convenience to the# configure arguments. Note that LIBLTDL and INCLTDL are not# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed# with '${top_builddir}/' and INCLTDL will be prefixed with# '${top_srcdir}/' (note the single quotes!). If your package is not# flat and you're not using automake, define top_builddir and# top_srcdir appropriately in the Makefiles.AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case "$enable_ltdl_convenience" in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])])# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for# the libltdl installable library and INCLTDL to the include flags for# the libltdl header and adds --enable-ltdl-install to the configure# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed# with '${top_srcdir}/' (note the single quotes!). If your package is# not flat and you're not using automake, define top_builddir and# top_srcdir appropriately in the Makefiles.# In the future, this macro may have to be called after AC_PROG_LIBTOOL.AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, main, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" INCLTDL= fi])# If this macro is not defined by Autoconf, define it here.ifdef([AC_PROVIDE_IFELSE], [], [define([AC_PROVIDE_IFELSE], [ifdef([AC_PROVIDE_$1], [$2], [$3])])])# AC_LIBTOOL_CXX - enable support for C++ librariesAC_DEFUN(AC_LIBTOOL_CXX,[AC_REQUIRE([_AC_LIBTOOL_CXX])])AC_DEFUN(_AC_LIBTOOL_CXX,[AC_REQUIRE([AC_PROG_LIBTOOL])AC_REQUIRE([AC_PROG_CXX])AC_REQUIRE([AC_PROG_CXXCPP])LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"lt_save_CC="$CC"lt_save_CFLAGS="$CFLAGS"dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CCdnl is set to the C++ compiler.AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \MAGIC="$MAGIC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \deplibs_check_method="$deplibs_check_method" \file_magic_cmd="$file_magic_cmd" \${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \|| AC_MSG_ERROR([libtool tag configuration failed])CC="$lt_save_CC"CFLAGS="$lt_save_CFLAGS"# Redirect the config.log output again, so that the ltconfig log is not# clobbered by the next message.exec 5>>./config.log])# AC_LIBTOOL_GCJ - enable support for GCJ librariesAC_DEFUN(AC_LIBTOOL_GCJ,[AC_REQUIRE([_AC_LIBTOOL_GCJ])])AC_DEFUN(_AC_LIBTOOL_GCJ,[AC_REQUIRE([AC_PROG_LIBTOOL])AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"lt_save_CC="$CC"lt_save_CFLAGS="$CFLAGS"dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CCdnl is set to the C++ compiler.AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="" \MAGIC="$MAGIC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \deplibs_check_method="$deplibs_check_method" \file_magic_cmd="$file_magic_cmd" \${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \--build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \|| AC_MSG_ERROR([libtool tag configuration failed])CC="$lt_save_CC"CFLAGS="$lt_save_CFLAGS"# Redirect the config.log output again, so that the ltconfig log is not# clobbered by the next message.exec 5>>./config.log])dnl old namesAC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnlAC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnlAC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnlAC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnlAC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnlAC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnlAC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnldnl This is just to silence aclocal about the macro not being usedifelse([AC_DISABLE_FAST_INSTALL])dnlifdef([AM_PROG_GCJ],,[# Stolen from automakeAC_DEFUN([AM_PROG_GCJ],[ AC_CHECK_PROGS(GCJ, gcj, gcj) dnl Automake uses ``='' in the test below, it seems wrong if test "x${GCJFLAGS+set}" != xset; then GCJFLAGS="-g -O2" fi AC_SUBST(GCJFLAGS)])])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -