📄 general.m4
字号:
AS_BOX([Cache variables.]) echo m4_bpatsubsts(m4_defn([_AC_CACHE_DUMP]), [^ *\(#.*\)?], [], ['], ['"'"']) echo AS_BOX([Output variables.]) echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then AS_BOX([Output files.]) echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then AS_BOX([confdefs.h.]) echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&AS_MESSAGE_LOG_FD rm -f core core.* *.core && rm -rf conftest* confdefs* conf$[$]* $ac_clean_files && exit $exit_status ' 0for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; AS_EXIT([1])' $ac_signaldoneac_signal=0# confdefs.h avoids OS command line length limits that DEFS can exceed.rm -rf conftest* confdefs.h# AIX cpp loses on an empty file, so make sure it contains at least a newline.echo >confdefs.h# Predefined preprocessor variables.AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"], [Define to the full name of this package.])AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"], [Define to the one symbol short name of this package.])AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"], [Define to the version of this package.])AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"], [Define to the full name and version of this package.])AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"], [Define to the address where bug reports for this package should be sent.])# Let the site file select an alternate cache file if it wants to.AC_SITE_LOADAC_CACHE_LOAD_AC_ARG_VAR_VALIDATE_AC_ARG_VAR_PRECIOUS([build_alias])dnl_AC_ARG_VAR_PRECIOUS([host_alias])dnl_AC_ARG_VAR_PRECIOUS([target_alias])dnlAC_LANG_PUSH(C)dnl Substitute for predefined variables.AC_SUBST([DEFS])dnlAC_SUBST([ECHO_C])dnlAC_SUBST([ECHO_N])dnlAC_SUBST([ECHO_T])dnlAC_SUBST([LIBS])dnlm4_divert_pop([INIT_PREPARE])dnl])# _AC_INIT_PREPARE# AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])# ----------------------------------------# This macro is used only for Autoupdate.AU_DEFUN([AC_INIT],[m4_ifval([$2], [[AC_INIT($@)]], [m4_ifval([$1],[[AC_INIT]AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl])# AC_INIT([PACKAGE, VERSION, [BUG-REPORT])# ----------------------------------------# Include the user macro files, prepare the diversions, and output the# preamble of the `configure' script.# Note that the order is important: first initialize, then set the# AC_CONFIG_SRCDIR.m4_define([AC_INIT],[# Forbidden tokens and exceptions.m4_pattern_forbid([^_?A[CHUM]_])m4_pattern_forbid([_AC_])m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])# Actually reserved by M4sh.m4_pattern_allow([^AS_FLAGS$])AS_INITAS_PREPAREm4_ifval([$2], [_AC_INIT_PACKAGE($@)])_AC_INIT_DEFAULTS_AC_INIT_PARSE_ARGS_AC_INIT_SRCDIR_AC_INIT_HELP_AC_INIT_VERSION_AC_INIT_CONFIG_LOG_AC_INIT_PREPARE_AC_INIT_NOTICE_AC_INIT_COPYRIGHTm4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl])## ----------------------------- #### Selecting optional features. #### ----------------------------- ### AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])# ------------------------------------------------------------------------AC_DEFUN([AC_ARG_ENABLE],[m4_divert_once([HELP_ENABLE], [[Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes]]])dnlm4_divert_once([HELP_ENABLE], [$2])dnl# Check whether --enable-$1 or --disable-$1 was given.if test "[${enable_]m4_bpatsubst([$1], -, _)+set}" = set; then enableval="[$enable_]m4_bpatsubst([$1], -, _)" $3m4_ifvaln([$4], [else $4])dnlfi; dnl])# AC_ARG_ENABLEAU_DEFUN([AC_ENABLE],[AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])])## ------------------------------ #### Working with optional software #### ------------------------------ ### AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])# --------------------------------------------------------------------AC_DEFUN([AC_ARG_WITH],[m4_divert_once([HELP_WITH], [[Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]])m4_divert_once([HELP_WITH], [$2])dnl# Check whether --with-$1 or --without-$1 was given.if test "[${with_]m4_bpatsubst([$1], -, _)+set}" = set; then withval="[$with_]m4_bpatsubst([$1], -, _)" $3m4_ifvaln([$4], [else $4])dnlfi; dnl])# AC_ARG_WITHAU_DEFUN([AC_WITH],[AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])])## ----------------------------------------- #### Remembering variables for reconfiguring. #### ----------------------------------------- ### _AC_ARG_VAR_PRECIOUS(VARNAME)# -----------------------------# Declare VARNAME is precious.## We try to diagnose when precious variables have changed. To do this,# make two early snapshots (after the option processing to take# explicit variables into account) of those variables: one (ac_env_)# which represents the current run, and a second (ac_cv_env_) which,# at the first run, will be saved in the cache. As an exception to# the cache mechanism, its loading will override these variables (non# `ac_cv_env_' cache value are only set when unset).## In subsequent runs, after having loaded the cache, compare# ac_cv_env_foo against ac_env_foo. See _AC_ARG_VAR_VALIDATE.m4_define([_AC_ARG_VAR_PRECIOUS],[AC_SUBST([$1])dnlm4_divert_once([PARSE_ARGS],[ac_env_$1_set=${$1+set}ac_env_$1_value=$$1ac_cv_env_$1_set=${$1+set}ac_cv_env_$1_value=$$1])dnl])# _AC_ARG_VAR_VALIDATE# --------------------# The precious variables are saved twice at the beginning of# configure. E.g., PRECIOUS is saved as `ac_env_PRECIOUS_SET' and# `ac_env_PRECIOUS_VALUE' on the one hand and `ac_cv_env_PRECIOUS_SET'# and `ac_cv_env_PRECIOUS_VALUE' on the other hand.## Now the cache has just been loaded, so `ac_cv_env_' represents the# content of the cached values, while `ac_env_' represents that of the# current values.## So we check that `ac_env_' and `ac_cv_env_' are consistent. If# they aren't, die.m4_define([_AC_ARG_VAR_VALIDATE],[# Check that the precious variables saved in the cache have kept the same# value.ac_cache_corrupted=falsefor ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([[a-zA-Z_0-9]]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) AS_MESSAGE([error: `$ac_var' was set to `$ac_old_val' in the previous run], 2) ac_cache_corrupted=: ;; ,set) AS_MESSAGE([error: `$ac_var' was not set in the previous run], 2) ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2) AS_MESSAGE([ former value: $ac_old_val], 2) AS_MESSAGE([ current value: $ac_new_val], 2) ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val indnl If you change this globbing pattern, test it on an old shell --dnl it's sensitive. Putting any kind of quote in it causes syntax errors.[ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)] ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fidoneif $ac_cache_corrupted; then AS_MESSAGE([error: changes in the environment can compromise the build], 2) AS_ERROR([run `make distclean' and/or `rm $cache_file' and start over])fi])# _AC_ARG_VAR_VALIDATE# AC_ARG_VAR(VARNAME, DOCUMENTATION)# ----------------------------------# Register VARNAME as a precious variable, and document it in# `configure --help' (but only once).AC_DEFUN([AC_ARG_VAR],[m4_divert_once([HELP_VAR], [[Some influential environment variables:]])dnlm4_divert_once([HELP_VAR_END], [[Use these variables to override the choices made by `configure' or to helpit to find libraries and programs with nonstandard names/locations.]])dnlm4_expand_once([m4_divert_once([HELP_VAR], [AC_HELP_STRING([$1], [$2], [ ])])], [$0($1)])dnl_AC_ARG_VAR_PRECIOUS([$1])dnl])# AC_ARG_VAR## ---------------------------- #### Transforming program names. #### ---------------------------- ### AC_ARG_PROGRAM# --------------# This macro is expanded only once, to avoid that `foo' ends up being# installed as `ggfoo'.AC_DEFUN_ONCE([AC_ARG_PROGRAM],[dnl Document the options.m4_divert_push([HELP_BEGIN])dnlProgram names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program namesm4_divert_pop([HELP_BEGIN])dnltest "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name"# Use a double $ so make ignores it.test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name"# Double any \ or $. echo might interpret backslashes.# By default was `s,x,x', remove it if useless.cat <<\_ACEOF >conftest.sed[s/[\\$]/&&/g;s/;s,x,x,$//]_ACEOFprogram_transform_name=`echo $program_transform_name | sed -f conftest.sed`rm conftest.sed])# AC_ARG_PROGRAM## ------------------------- #### Finding auxiliary files. #### ------------------------- ### AC_CONFIG_AUX_DIR(DIR)# ----------------------# Find install-sh, config.sub, config.guess, and Cygnus configure# in directory DIR. These are auxiliary files used in configuration.# DIR can be either absolute or relative to $srcdir.AC_DEFUN([AC_CONFIG_AUX_DIR],[AC_CONFIG_AUX_DIRS($1 $srcdir/$1)])# AC_CONFIG_AUX_DIR_DEFAULT# -------------------------# The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.# There's no need to call this macro explicitly; just AC_REQUIRE it.AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],[AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)])# AC_CONFIG_AUX_DIRS(DIR ...)# ---------------------------# Internal subroutine.# Search for the configuration auxiliary files in directory list $1.# We look only for install-sh, so users of AC_PROG_INSTALL# do not automatically need to distribute the other auxiliary files.AC_DEFUN([AC_CONFIG_AUX_DIRS],[ac_aux_dir=for ac_dir in $1; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fidoneif test -z "$ac_aux_dir"; then AC_MSG_ERROR([cannot find install-sh or install.sh in $1])fiac_config_guess="$SHELL $ac_aux_dir/config.guess"ac_config_sub="$SHELL $ac_aux_dir/config.sub"ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl])# AC_CONFIG_AUX_DIRS## ----------------------------------- #### Getting the canonical system type. #### ----------------------------------- ### The inputs are:# configure --host=HOST --target=TARGET --build=BUILD## The rules are:# 1. Build defaults to the current platform, as determined by config.guess.# 2. Host defaults to build.# 3. Target defaults to host.# _AC_CANONICAL_SPLIT(THING)# --------------------------# Generate the variables THING, THING_{alias cpu vendor os}.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -