⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 general.m4

📁 LINUX下的源码工具,可自己分析,或者直接装在系统上作为应用
💻 M4
📖 第 1 页 / 共 5 页
字号:
m4_define([_AC_CANONICAL_SPLIT],[AC_SUBST([$1],       [$ac_cv_$1])dnldnl FIXME: AC_SUBST([$1_alias],  [$ac_cv_$1_alias])dnlAC_SUBST([$1_cpu],         [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])dnlAC_SUBST([$1_vendor],         [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])dnlAC_SUBST([$1_os],         [`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])dnl])# _AC_CANONICAL_SPLIT# AC_CANONICAL_BUILD# ------------------AC_DEFUN_ONCE([AC_CANONICAL_BUILD],[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnlm4_divert_text([HELP_CANON],[[System types:  --build=BUILD     configure for building on BUILD [guessed]]])dnl# Make sure we can run config.sub.$ac_config_sub sun4 >/dev/null 2>&1 ||  AC_MSG_ERROR([cannot run $ac_config_sub])AC_CACHE_CHECK([build system type], [ac_cv_build],[ac_cv_build_alias=$build_aliastest -z "$ac_cv_build_alias" &&  ac_cv_build_alias=`$ac_config_guess`test -z "$ac_cv_build_alias" &&  AC_MSG_ERROR([cannot guess build type; you must specify one])ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||  AC_MSG_ERROR([$ac_config_sub $ac_cv_build_alias failed])])_AC_CANONICAL_SPLIT(build)])# AC_CANONICAL_BUILD# AC_CANONICAL_HOST# -----------------AC_DEFUN_ONCE([AC_CANONICAL_HOST],[AC_REQUIRE([AC_CANONICAL_BUILD])dnlm4_divert_text([HELP_CANON],[[  --host=HOST       cross-compile to build programs to run on HOST [BUILD]]])dnlAC_CACHE_CHECK([host system type], [ac_cv_host],[ac_cv_host_alias=$host_aliastest -z "$ac_cv_host_alias" &&  ac_cv_host_alias=$ac_cv_build_aliasac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||  AC_MSG_ERROR([$ac_config_sub $ac_cv_host_alias failed])])_AC_CANONICAL_SPLIT([host])])# AC_CANONICAL_HOST# AC_CANONICAL_TARGET# -------------------AC_DEFUN_ONCE([AC_CANONICAL_TARGET],[AC_REQUIRE([AC_CANONICAL_HOST])dnlAC_BEFORE([$0], [AC_ARG_PROGRAM])dnlm4_divert_text([HELP_CANON],[[  --target=TARGET   configure for building compilers for TARGET [HOST]]])dnlAC_CACHE_CHECK([target system type], [ac_cv_target],[dnl Set target_alias.ac_cv_target_alias=$target_aliastest "x$ac_cv_target_alias" = "x" &&  ac_cv_target_alias=$ac_cv_host_aliasac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||  AC_MSG_ERROR([$ac_config_sub $ac_cv_target_alias failed])])_AC_CANONICAL_SPLIT([target])# The aliases save the names the user supplied, while $host etc.# will get canonicalized.test -n "$target_alias" &&  test "$program_prefix$program_suffix$program_transform_name" = \    NONENONEs,x,x, &&  program_prefix=${target_alias}-[]dnl])# AC_CANONICAL_TARGETAU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])# AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])# ------------------------------------------# If the cache file is inconsistent with the current host,# target and build system types, execute CMD or print a default# error message.  Now handled via _AC_ARG_VAR_PRECIOUS.AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], [])## ---------------------- #### Caching test results.  #### ---------------------- ### AC_SITE_LOAD# ------------# Look for site or system specific initialization scripts.m4_define([AC_SITE_LOAD],[# Prefer explicitly selected file to automatically selected ones.if test -z "$CONFIG_SITE"; then  if test "x$prefix" != xNONE; then    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"  else    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"  fififor ac_site_file in $CONFIG_SITE; do  if test -r "$ac_site_file"; then    AC_MSG_NOTICE([loading site script $ac_site_file])    sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD    . "$ac_site_file"  fidone])# AC_CACHE_LOAD# -------------m4_define([AC_CACHE_LOAD],[if test -r "$cache_file"; then  # Some versions of bash will fail to source /dev/null (special  # files actually), so we avoid doing that.  if test -f "$cache_file"; then    AC_MSG_NOTICE([loading cache $cache_file])    case $cache_file in      [[\\/]]* | ?:[[\\/]]* ) . $cache_file;;      *)                      . ./$cache_file;;    esac  fielse  AC_MSG_NOTICE([creating cache $cache_file])  >$cache_filefi])# AC_CACHE_LOAD# _AC_CACHE_DUMP# --------------# Dump the cache to stdout.  It can be in a pipe (this is a requirement).m4_define([_AC_CACHE_DUMP],[# The following way of writing the cache mishandles newlines in values,# but we know of no workaround that is simple, portable, and efficient.# So, don't put newlines in cache variables' values.# Ultrix sh set writes to stderr and can't be redirected directly,# and sets the high bit in the cache file unless we assign to the vars.{  (set) 2>&1 |    case `(ac_space=' '; set | grep ac_space) 2>&1` in    *ac_space=\ *)      # `set' does not quote correctly, so add quotes (double-quote      # substitution turns \\\\ into \\, and sed turns \\ into \).      sed -n \        ["s/'/'\\\\''/g;    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]      ;;    *)      # `set' quotes correctly as required by POSIX, so do not add quotes.      sed -n \        ["s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"]      ;;    esac;}dnl])# _AC_CACHE_DUMP# AC_CACHE_SAVE# -------------# Save the cache.# Allow a site initialization script to override cache values.m4_define([AC_CACHE_SAVE],[cat >confcache <<\_ACEOF# This file is a shell script that caches the results of configure# tests run on this system so they can be shared between configure# scripts and configure runs, see configure's option --config-cache.# It is not useful on other systems.  If it contains results you don't# want to keep, you may remove or edit it.## config.status only pays attention to the cache file if you give it# the --recheck option to rerun configure.## `ac_cv_env_foo' variables (set or unset) will be overridden when# loading this file, other *unset* `ac_cv_foo' will be assigned the# following values._ACEOF_AC_CACHE_DUMP() |  sed ['     t clear     : clear     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/     t end     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/     : end'] >>confcacheif diff $cache_file confcache >/dev/null 2>&1; then :; else  if test -w $cache_file; then    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"    cat confcache >$cache_file  else    echo "not updating unwritable cache $cache_file"  fifirm -f confcache[]dnl])# AC_CACHE_SAVE# AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)# ------------------------------------------# The name of shell var CACHE-ID must contain `_cv_' in order to get saved.# Should be dnl'ed.  Try to catch common mistakes.m4_defun([AC_CACHE_VAL],[m4_bmatch([$2], [AC_DEFINE],           [AC_DIAGNOSE(syntax,[$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl[where no actions should be taken])])dnlAS_VAR_SET_IF([$1],              [_AS_ECHO_N([(cached) ])],              [$2])])# AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)# -------------------------------------------# Do not call this macro with a dnl right behind.m4_defun([AC_CACHE_CHECK],[AC_MSG_CHECKING([$1])AC_CACHE_VAL([$2], [$3])dnlAC_MSG_RESULT_UNQUOTED([AS_VAR_GET([$2])])])## ---------------------- #### Defining CPP symbols.  #### ---------------------- ### AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL)# -------------------------------------------# This macro is useless, it is used only with --trace to collect the# list of *literals* CPP values passed to AC_DEFINE/AC_DEFINE_UNQUOTED.m4_define([AC_DEFINE_TRACE_LITERAL])# AC_DEFINE_TRACE(CPP-SYMBOL)# ---------------------------# This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters# out non literal symbols.m4_define([AC_DEFINE_TRACE],[AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL([$1])])])# AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION])# -------------------------------------------# Set VARIABLE to VALUE, verbatim, or 1.  Remember the value# and if VARIABLE is affected the same VALUE, do nothing, else# die.  The third argument is used by autoheader.m4_define([AC_DEFINE],[AC_DEFINE_TRACE([$1])dnlm4_ifval([$3], [AH_TEMPLATE([$1], [$3])])dnlcat >>confdefs.h <<\_ACEOF[@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)_ACEOF])# AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])# ----------------------------------------------------# Similar, but perform shell substitutions $ ` \ once on VALUE.m4_define([AC_DEFINE_UNQUOTED],[AC_DEFINE_TRACE([$1])dnlm4_ifval([$3], [AH_TEMPLATE([$1], [$3])])dnlcat >>confdefs.h <<_ACEOF[@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)_ACEOF])## -------------------------- #### Setting output variables.  #### -------------------------- ### AC_SUBST(VARIABLE, [VALUE])# ---------------------------# Create an output variable from a shell VARIABLE.  If VALUE is given# assign it to VARIABLE.  Use `""' is you want to set VARIABLE to an# empty value, not an empty second argument.## Beware that if you change this macro, you also have to change the# sed script at the top of _AC_OUTPUT_FILES.m4_define([AC_SUBST],[m4_ifvaln([$2], [$1=$2])[]dnlm4_append_uniq([_AC_SUBST_VARS], [$1], [ ])dnl])# AC_SUBST# AC_SUBST_FILE(VARIABLE)# -----------------------# Read the comments of the preceding macro.m4_define([AC_SUBST_FILE],[m4_append_uniq([_AC_SUBST_FILES], [$1], [ ])])## --------------------------------------- #### Printing messages at autoconf runtime.  #### --------------------------------------- ### In fact, I think we should promote the use of m4_warn and m4_fatal# directly.  This will also avoid to some people to get it wrong# between AC_FATAL and AC_MSG_ERROR.# AC_DIAGNOSE(CATEGORY, MESSAGE)# AC_FATAL(MESSAGE, [EXIT-STATUS])# --------------------------------m4_copy([m4_warn],  [AC_DIAGNOSE])m4_copy([m4_fatal], [AC_FATAL])# AC_WARNING(MESSAGE)# -------------------# Report a MESSAGE to the user of autoconf if `-W' or `-W all' was# specified.m4_define([AC_WARNING],[AC_DIAGNOSE([syntax], [$1])])## ---------------------------------------- #### Printing messages at configure runtime.  #### ---------------------------------------- ### AC_MSG_CHECKING(FEATURE)# ------------------------m4_define([AC_MSG_CHECKING],[_AS_ECHO([$as_me:$LINENO: checking $1], AS_MESSAGE_LOG_FD)_AS_ECHO_N([checking $1... ])[]dnl])# AC_MSG_RESULT(RESULT)# ---------------------m4_define([AC_MSG_RESULT],[_AS_ECHO([$as_me:$LINENO: result: $1], AS_MESSAGE_LOG_FD)_AS_ECHO([${ECHO_T}$1])[]dnl])# AC_MSG_RESULT_UNQUOTED(RESULT)# ------------------------------# Likewise, but perform $ ` \ shell substitutions.m4_define([AC_MSG_RESULT_UNQUOTED],[_AS_ECHO_UNQUOTED([$as_me:$LINENO: result: $1], AS_MESSAGE_LOG_FD)_AS_ECHO_UNQUOTED([${ECHO_T}$1])[]dnl])# AC_MSG_WARN(PROBLEM)# AC_MSG_NOTICE(STRING)# AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])# AC_MSG_FAILURE(ERROR, [EXIT-STATUS = 1])# ----------------------------------------m4_copy([AS_WARN],    [AC_MSG_WARN])m4_copy([AS_MESSAGE], [AC_MSG_NOTICE])m4_copy([AS_ERROR],   [AC_MSG_ERROR])m4_define([AC_MSG_FAILURE],[AC_MSG_ERROR([$1See `config.log' for more details.], [$2])])# _AC_MSG_LOG_CONFTEST# --------------------m4_define([_AC_MSG_LOG_CONFTEST],[echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FDsed 's/^/| /' conftest.$ac_ext >&AS_MESSAGE_LOG_FD])# AU::AC_CHECKING(FEATURE)# ------------------------AU_DEFUN([AC_CHECKING],[AS_MESSAGE([checking $1...])])# AU::AC_VERBOSE(STRING)# ----------------------AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])## ---------------------------- #### C

⌨️ 快捷键说明

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