📄 aclocal.m4
字号:
# Detect AIX lossage: threads are created detached by default # and the JOINABLE attribute has a nonstandard name (UNDETACHED). AC_MSG_CHECKING([for joinable pthread attribute]) AC_TRY_LINK([#include <pthread.h>], [int attr=PTHREAD_CREATE_JOINABLE;], ok=PTHREAD_CREATE_JOINABLE, ok=unknown) if test x"$ok" = xunknown; then AC_TRY_LINK([#include <pthread.h>], [int attr=PTHREAD_CREATE_UNDETACHED;], ok=PTHREAD_CREATE_UNDETACHED, ok=unknown) fi if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok, [Define to the necessary symbol if this constant uses a non-standard name on your system.]) fi AC_MSG_RESULT(${ok}) if test x"$ok" = xunknown; then AC_MSG_WARN([we do not know how to create joinable pthreads]) fi AC_MSG_CHECKING([if more special flags are required for pthreads]) flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; *solaris* | alpha*-osf*) flag="-D_REENTRANT";; esac AC_MSG_RESULT(${flag}) if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with cc_r AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})else PTHREAD_CC="$CC"fiAC_SUBST(PTHREAD_LIBS)AC_SUBST(PTHREAD_CFLAGS)AC_SUBST(PTHREAD_CC)# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:if test x"$acx_pthread_ok" = xyes; then ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) :else acx_pthread_ok=no $2fi])dnl ACX_PTHREADdnl @synopsis TYPE_SOCKLEN_Tdnldnl Check whether sys/socket.h defines type socklen_t. Please notednl that some systems require sys/types.h to be included beforednl sys/socket.h can be compiled.dnldnl @version $Id: type_socklen_t.m4,v 1.4 2002/11/22 12:13:03 aymeric Exp $dnl @author Lars Brinkhoff <lars@nocrew.org>dnlAC_DEFUN([TYPE_SOCKLEN_T],[AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,[ AC_TRY_COMPILE( [#include <sys/types.h> #include <sys/socket.h>], [socklen_t len = 42; return 0;], ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no)]) if test $ac_cv_type_socklen_t != yes; then AC_DEFINE(socklen_t, int, [Define socklen_t if not yet done]) fi])# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-# serial 47 AC_PROG_LIBTOOL# Debian $Rev: 214 $# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)# -----------------------------------------------------------# If this macro is not defined by Autoconf, define it here.m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])])# AC_PROG_LIBTOOL# ---------------AC_DEFUN([AC_PROG_LIBTOOL],[AC_REQUIRE([_AC_PROG_LIBTOOL])dnldnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXXdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])])dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77])])dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, rundnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])])])# AC_PROG_LIBTOOL# _AC_PROG_LIBTOOL# ----------------AC_DEFUN([_AC_PROG_LIBTOOL],[AC_REQUIRE([AC_LIBTOOL_SETUP])dnlAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnlAC_BEFORE([$0],[AC_LIBTOOL_F77])dnlAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl# This can be used to rebuild libtool when neededLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"# Always use our own libtool.LIBTOOL='$(SHELL) $(top_builddir)/libtool'AC_SUBST(LIBTOOL)dnl# Prevent multiple expansiondefine([AC_PROG_LIBTOOL], [])])# _AC_PROG_LIBTOOL# AC_LIBTOOL_SETUP# ----------------AC_DEFUN([AC_LIBTOOL_SETUP],[AC_PREREQ(2.50)dnlAC_REQUIRE([AC_ENABLE_SHARED])dnlAC_REQUIRE([AC_ENABLE_STATIC])dnlAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnlAC_REQUIRE([AC_CANONICAL_HOST])dnlAC_REQUIRE([AC_CANONICAL_BUILD])dnlAC_REQUIRE([AC_PROG_CC])dnlAC_REQUIRE([AC_PROG_LD])dnlAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnlAC_REQUIRE([AC_PROG_NM])dnlAC_REQUIRE([AC_PROG_LN_S])dnlAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!AC_REQUIRE([AC_OBJEXT])dnlAC_REQUIRE([AC_EXEEXT])dnldnlAC_LIBTOOL_SYS_MAX_CMD_LENAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPEAC_LIBTOOL_OBJDIRAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl_LT_AC_PROG_ECHO_BACKSLASHcase $host_os inaix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;;esac# Sed substitution that helps us do robust quoting. It backslashifies# metacharacters that are still active within double-quoted strings.Xsed='sed -e s/^X//'[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']# Same as above, but do not quote variable references.[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']# Sed substitution to delay expansion of an escaped shell variable in a# double_quote_subst'ed string.delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'# Sed substitution to avoid accidental globbing in evaled expressionsno_glob_subst='s/\*/\\\*/g'# Constants:rm="rm -f"# Global variables:default_ofile=libtoolcan_build_shared=yes# All known linkers require a `.a' archive for static linking (except M$VC,# which needs '.lib').libext=altmain="$ac_aux_dir/ltmain.sh"ofile="$default_ofile"with_gnu_ld="$lt_cv_prog_gnu_ld"AC_CHECK_TOOL(AR, ar, false)AC_CHECK_TOOL(RANLIB, ranlib, :)AC_CHECK_TOOL(STRIP, strip, :)old_CC="$CC"old_CFLAGS="$CFLAGS"# Set sane defaults for various variablestest -z "$AR" && AR=artest -z "$AR_FLAGS" && AR_FLAGS=crutest -z "$AS" && AS=astest -z "$CC" && CC=cctest -z "$LTCC" && LTCC=$CCtest -z "$DLLTOOL" && DLLTOOL=dlltooltest -z "$LD" && LD=ldtest -z "$LN_S" && LN_S="ln -s"test -z "$MAGIC_CMD" && MAGIC_CMD=filetest -z "$NM" && NM=nmtest -z "$SED" && SED=sedtest -z "$OBJDUMP" && OBJDUMP=objdumptest -z "$RANLIB" && RANLIB=:test -z "$STRIP" && STRIP=:test -z "$ac_objext" && ac_objext=o# Determine commands to create old-style static archives.old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'old_postinstall_cmds='chmod 644 $oldlib'old_postuninstall_cmds=if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"fi# Only perform the check for file, if the check method requires itcase $deplibs_check_method infile_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;;esacAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],enable_win32_dll=yes, enable_win32_dll=no)AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])])test "x$enable_libtool_lock" != xno && enable_libtool_lock=yesAC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default])test -z "$pic_mode" && pic_mode=default# Use C for the default configuration in the libtool scripttagname=AC_LIBTOOL_LANG_C_CONFIG_LT_AC_TAGCONFIG])# AC_LIBTOOL_SETUP# _LT_AC_SYS_COMPILER# -------------------AC_DEFUN([_LT_AC_SYS_COMPILER],[AC_REQUIRE([AC_PROG_CC])dnl# If no C compiler was specified, use CC.LTCC=${LTCC-"$CC"}# Allow CC to be a program name with arguments.compiler=$CC])# _LT_AC_SYS_COMPILER# _LT_AC_SYS_LIBPATH_AIX# ----------------------# Links a minimal program and checks the executable# for the system default hardcoded library path. In most cases,# this is /usr/lib:/lib, but when the MPI compilers are used# the location of the communication and MPI libs are included too.# If we don't find anything, use the default library path according# to the aix ld manual.AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],[AC_LINK_IFELSE(AC_LANG_PROGRAM,[aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }}'`# Check for a 64-bit object if we didn't find anything.if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }}'`; fi],[])if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi])# _LT_AC_SYS_LIBPATH_AIX# _LT_AC_SHELL_INIT(ARG)# ----------------------AC_DEFUN([_LT_AC_SHELL_INIT],[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)])$1AC_DIVERT_POP])# _LT_AC_SHELL_INIT# _LT_AC_PROG_ECHO_BACKSLASH# --------------------------# Add some code to the start of the generated configure script which# will find an echo command which doesn't interpret backslashes.AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],[_LT_AC_SHELL_INIT([# Check that we are running under the correct shell.SHELL=${CONFIG_SHELL-/bin/sh}case X$ECHO inX*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;;esacecho=${ECHO-echo}if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shiftelif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over :elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! :else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}fiif test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat <<EOF[$]*EOF
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -