aclocal.m4

来自「OpenVPN -- A Secure tunneling daemon」· M4 代码 · 共 878 行 · 第 1/3 页

M4
878
字号
        fi        AC_MSG_CHECKING([if more special flags are required for pthreads])        flag=no        case "$target" in                *-aix* | *-freebsd*)               flag="-D_THREAD_SAFE";;                *solaris* | alpha*-osf* | *linux*) 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_PTHREAD# Like AC_CONFIG_HEADER, but automatically create stamp file.# serial 3# When config.status generates a header, we must update the stamp-h file.# This file resides in the same directory as the config header# that is generated.  We must strip everything past the first ":",# and everything past the last "/".AC_PREREQ([2.12])AC_DEFUN([AM_CONFIG_HEADER],[ifdef([AC_FOREACH],dnl	 [dnl init our file count if it isn't already	 m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))	 dnl prepare to store our destination file list for use in config.status	 AC_FOREACH([_AM_File], [$1],		    [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))		    m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))		    dnl and add it to the list of files AC keeps track of, along		    dnl with our hook		    AC_CONFIG_HEADERS(_AM_File,dnl COMMANDS, [, INIT-CMDS][# update the timestampecho timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS		    m4_popdef([_AM_Dest])])],dnl[AC_CONFIG_HEADER([$1])  AC_OUTPUT_COMMANDS(   ifelse(patsubst([$1], [[^ ]], []),	  [],	  [test -z "$CONFIG_HEADERS" || echo timestamp >dnl	   patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl[am_indx=1for am_file in $1; do  case " \$CONFIG_HEADERS " in  *" \$am_file "*)    am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`    if test -n "\$am_dir"; then      am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`      for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do        am_tmpdir=\$am_tmpdir\$am_subdir/        if test ! -d \$am_tmpdir; then          mkdir \$am_tmpdir        fi      done    fi    echo timestamp > "\$am_dir"stamp-h\$am_indx    ;;  esac  am_indx=\`expr \$am_indx + 1\`done])])]) # AM_CONFIG_HEADER# _AM_DIRNAME(PATH)# -----------------# Like AS_DIRNAME, only do it during macro expansionAC_DEFUN([_AM_DIRNAME],       [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,	      m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,		    m4_if(m4_regexp([$1], [^/.*]), -1,			  [.],			  m4_patsubst([$1], [^\(/\).*], [\1])),		    m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),	      m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl]) # _AM_DIRNAME# Do all the work for Automake.  This macro actually does too much --# some checks are only needed if your package does certain things.# But this isn't really a big deal.# serial 5# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be# written in clear, in which case automake, when reading aclocal.m4,# will think it sees a *use*, and therefore will trigger all it's# C support machinery.  Also note that it means that autoscan, seeing# CC etc. in the Makefile, will ask for an AC_PROG_CC use...# We require 2.13 because we rely on SHELL being computed by configure.AC_PREREQ([2.13])# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)# -----------------------------------------------------------# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.# The purpose of this macro is to provide the user with a means to# check macros which are provided without letting her know how the# information is coded.# 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])])])# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])# ----------------------------------------------AC_DEFUN([AM_INIT_AUTOMAKE],[AC_REQUIRE([AC_PROG_INSTALL])dnl# test to see if srcdir already configuredif test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&   test -f $srcdir/config.status; then  AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])fi# Define the identity of the package.PACKAGE=$1AC_SUBST(PACKAGE)dnlVERSION=$2AC_SUBST(VERSION)dnlifelse([$3],,[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow# the ones we care about.ifdef([m4_pattern_allow],      [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl# Autoconf 2.50 always computes EXEEXT.  However we need to be# compatible with 2.13, for now.  So we always define EXEEXT, but we# don't compute it.AC_SUBST(EXEEXT)# Similar for OBJEXT -- only we only use OBJEXT if the user actually# requests that it be used.  This is a bit dumb.: ${OBJEXT=o}AC_SUBST(OBJEXT)# Some tools Automake needs.AC_REQUIRE([AM_SANITY_CHECK])dnlAC_REQUIRE([AC_ARG_PROGRAM])dnlAM_MISSING_PROG(ACLOCAL, aclocal)AM_MISSING_PROG(AUTOCONF, autoconf)AM_MISSING_PROG(AUTOMAKE, automake)AM_MISSING_PROG(AUTOHEADER, autoheader)AM_MISSING_PROG(MAKEINFO, makeinfo)AM_MISSING_PROG(AMTAR, tar)AM_PROG_INSTALL_SHAM_PROG_INSTALL_STRIP# We need awk for the "check" target.  The system "awk" is bad on# some platforms.AC_REQUIRE([AC_PROG_AWK])dnlAC_REQUIRE([AC_PROG_MAKE_SET])dnlAC_REQUIRE([AM_DEP_TRACK])dnlAC_REQUIRE([AM_SET_DEPDIR])dnlAC_PROVIDE_IFELSE([AC_PROG_][CC],                  [_AM_DEPENDENCIES(CC)],                  [define([AC_PROG_][CC],                          defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnlAC_PROVIDE_IFELSE([AC_PROG_][CXX],                  [_AM_DEPENDENCIES(CXX)],                  [define([AC_PROG_][CXX],                          defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl])## Check to make sure that the build environment is sane.## serial 3# AM_SANITY_CHECK# ---------------AC_DEFUN([AM_SANITY_CHECK],[AC_MSG_CHECKING([whether build environment is sane])# Just in casesleep 1echo timestamp > conftest.file# Do `set' in a subshell so we don't clobber the current shell's# arguments.  Must try -L first in case configure is actually a# symlink; some systems play weird games with the mod time of symlinks# (eg FreeBSD returns the mod time of the symlink's containing# directory).if (   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`   if test "$[*]" = "X"; then      # -L didn't work.      set X `ls -t $srcdir/configure conftest.file`   fi   rm -f conftest.file   if test "$[*]" != "X $srcdir/configure conftest.file" \      && test "$[*]" != "X conftest.file $srcdir/configure"; then      # If neither matched, then we have a broken ls.  This can happen      # if, for instance, CONFIG_SHELL is bash and it inherits a      # broken ls alias from the environment.  This has actually      # happened.  Such a system could not be considered "sane".      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a brokenalias in your environment])   fi   test "$[2]" = conftest.file   )then   # Ok.   :else   AC_MSG_ERROR([newly created file is older than distributed files!Check your system clock])fiAC_MSG_RESULT(yes)])# serial 2# AM_MISSING_PROG(NAME, PROGRAM)# ------------------------------AC_DEFUN([AM_MISSING_PROG],[AC_REQUIRE([AM_MISSING_HAS_RUN])$1=${$1-"${am_missing_run}$2"}AC_SUBST($1)])# AM_MISSING_HAS_RUN# ------------------# Define MISSING if not defined so far and test if it supports --run.# If it does, set am_missing_run to use it, otherwise, to nothing.AC_DEFUN([AM_MISSING_HAS_RUN],[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnltest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"# Use eval to expand $SHELLif eval "$MISSING --run true"; then  am_missing_run="$MISSING --run "else  am_missing_run=  am_backtick='`'  AC_MSG_WARN([${am_backtick}missing' script is too old or missing])fi])# AM_AUX_DIR_EXPAND# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to# `$srcdir', `$srcdir/..', or `$srcdir/../..'.## Of course, Automake must honor this variable whenever it calls a# tool from the auxiliary directory.  The problem is that $srcdir (and# therefore $ac_aux_dir as well) can be either absolute or relative,# depending on how configure is run.  This is pretty annoying, since# it makes $ac_aux_dir quite unusable in subdirectories: in the top# source directory, any form will work fine, but in subdirectories a# relative path needs to be adjusted first.## $ac_aux_dir/missing#    fails when called from a subdirectory if $ac_aux_dir is relative# $top_srcdir/$ac_aux_dir/missing#    fails if $ac_aux_dir is absolute,#    fails when called from a subdirectory in a VPATH build with#          a relative $ac_aux_dir## The reason of the latter failure is that $top_srcdir and $ac_aux_dir# are both prefixed by $srcdir.  In an in-source build this is usually# harmless because $srcdir is `.', but things will broke when you

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?