📄 aclocal.m4
字号:
AC_DEFUN([AM_MAINTAINER_MODE],[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode,[ --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl])AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])# Check to see how 'make' treats includes. -*- Autoconf -*-# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.## This file is free software; the Free Software Foundation# gives unlimited permission to copy and/or distribute it,# with or without modifications, as long as this notice is preserved.# serial 3# AM_MAKE_INCLUDE()# -----------------# Check to see how make treats includes.AC_DEFUN([AM_MAKE_INCLUDE],[am_make=${MAKE-make}cat > confinc << 'END'am__doit: @echo done.PHONY: am__doitEND# If we don't find an include directive, just comment out the code.AC_MSG_CHECKING([for style of include used by $am_make])am__include="#"am__quote=_am_result=none# First try GNU make style include.echo "include confinc" > confmf# We grep out `Entering directory' and `Leaving directory'# messages which can occur if `w' ends up in MAKEFLAGS.# In particular we don't look at `^make:' because GNU make might# be invoked under some other name (usually "gmake"), in which# case it prints its new name instead of `make'.if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNUfi# Now try BSD make style include.if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fifiAC_SUBST([am__include])AC_SUBST([am__quote])AC_MSG_RESULT([$_am_result])rm -f confinc confmf])# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005# Free Software Foundation, Inc.## This file is free software; the Free Software Foundation# gives unlimited permission to copy and/or distribute it,# with or without modifications, as long as this notice is preserved.# serial 5# 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])dnlAC_REQUIRE_AUX_FILE([missing])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= AC_MSG_WARN([`missing' script is too old or missing])fi])# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.## This file is free software; the Free Software Foundation# gives unlimited permission to copy and/or distribute it,# with or without modifications, as long as this notice is preserved.# AM_PROG_MKDIR_P# ---------------# Check for `mkdir -p'.AC_DEFUN([AM_PROG_MKDIR_P],[AC_PREREQ([2.60])dnlAC_REQUIRE([AC_PROG_MKDIR_P])dnldnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,dnl while keeping a definition of mkdir_p for backward compatibility.dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake ofdnl Makefile.ins that do not define MKDIR_P, so we do our owndnl adjustment using top_builddir (which is defined more often thandnl MKDIR_P).AC_SUBST([mkdir_p], ["$MKDIR_P"])dnlcase $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;esac])# Helper functions for option handling. -*- Autoconf -*-# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.## This file is free software; the Free Software Foundation# gives unlimited permission to copy and/or distribute it,# with or without modifications, as long as this notice is preserved.# serial 3# _AM_MANGLE_OPTION(NAME)# -----------------------AC_DEFUN([_AM_MANGLE_OPTION],[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])# _AM_SET_OPTION(NAME)# ------------------------------# Set option NAME. Presently that only means defining a flag for this option.AC_DEFUN([_AM_SET_OPTION],[m4_define(_AM_MANGLE_OPTION([$1]), 1)])# _AM_SET_OPTIONS(OPTIONS)# ----------------------------------# OPTIONS is a space-separated list of Automake options.AC_DEFUN([_AM_SET_OPTIONS],[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])# -------------------------------------------# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.AC_DEFUN([_AM_IF_OPTION],[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])# Check to make sure that the build environment is sane. -*- Autoconf -*-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005# Free Software Foundation, Inc.## This file is free software; the Free Software Foundation# gives unlimited permission to copy and/or distribute it,# with or without modifications, as long as this notice is preserved.# serial 4# 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)])# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.## This file is free software; the Free Software Foundation# gives unlimited permission to copy and/or distribute it,# with or without modifications, as long as this notice is preserved.# AM_PROG_INSTALL_STRIP# ---------------------# One issue with vendor `install' (even GNU) is that you can't# specify the program used to strip binaries. This is especially# annoying in cross-compiling environments, where the build's strip# is unlikely to handle the host's binaries.# Fortunately install-sh will honor a STRIPPROG variable, so we# always use install-sh in `make install-strip', and initialize# STRIPPROG with the value of the STRIP variable (set by the user).AC_DEFUN([AM_PROG_INSTALL_STRIP],[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl# Installed binaries are usually stripped using `strip' when the user# run `make install-strip'. However `strip' might not be the right# tool to use in cross-compilation environments, therefore Automake# will honor the `STRIP' environment variable to overrule this program.dnl Don't test for $cross_compiling = yes, because it might be `maybe'.if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :)fiINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"AC_SUBST([INSTALL_STRIP_PROGRAM])])# Copyright (C) 2006 Free Software Foundation, Inc.## This file is free software; the Free Software Foundation# gives unlimited permission to copy and/or distribute it,# with or without modifications, as long as this notice is preserved.# _AM_SUBST_NOTMAKE(VARIABLE)# ---------------------------# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.# This macro is traced by Automake.AC_DEFUN([_AM_SUBST_NOTMAKE])# Check how to create a tarball. -*- Autoconf -*-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.## This file is free software; the Free Software Foundation# gives unlimited permission to copy and/or distribute it,# with or without modifications, as long as this notice is preserved.# serial 2# _AM_PROG_TAR(FORMAT)# --------------------# Check how to create a tarball in format FORMAT.# FORMAT should be one of `v7', `ustar', or `pax'.## Substitute a variable $(am__tar) that is a command# writing to stdout a FORMAT-tarball containing the directory# $tardir.# tardir=directory && $(am__tar) > result.tar## Substitute a variable $(am__untar) that extract such# a tarball read from stdin.# $(am__untar) < result.tarAC_DEFUN([_AM_PROG_TAR],[# Always define AMTAR for backward compatibility.AM_MISSING_PROG([AMTAR], [tar])m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])])AC_MSG_CHECKING([how to create a $1 tar archive])# Loop over all known methods to create a tar archive until one works._am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'_am_tools=${am_cv_prog_tar_$1-$_am_tools}# Do not fold the above two line into one, because Tru64 sh and# Solaris sh will not grok spaces in the rhs of `-'.for _am_tool in $_am_toolsdo case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar <conftest.tar]) grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fidonerm -rf conftest.dirAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])AC_MSG_RESULT([$am_cv_prog_tar_$1])])AC_SUBST([am__tar])AC_SUBST([am__untar])]) # _AM_PROG_TAR
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -