Various cleanups.
* acgeneral.m4 (AC_PRO, AC_EPI): Rename as _AC_DEFUN_PRO and
_AC_DEFUN_EPI.
Adjust dependencies.
(AC_DEFUN): Remove the not-to-be-released specializing mechanism.
(AC_SPECIALIZE): Remove for the same reasons.
Adjust dependencies.
(_AC_INIT_DEFAULTS, _AC_INIT_PARSE_ARGS, _AC_INIT_VERSION,
_AC_INIT_PREPARE, _AC_CANONICAL_SPLIT, _AC_CHECK_TYPE_NEW,
_AC_CHECK_TYPE_OLD): Define via `define' instead of `AC_DEFUN':
they are not related to AC_REQUIRE in any way.
* acspecific.m4 (AC_PROG_ECHO, _AC_DECL_YYTEXT, _AC_PATH_X_XMKMF,
_AC_PATH_X_DIRECT): Define via `define' instead of `AC_DEFUN'.
2000-06-26 17:03:15 +08:00
|
|
|
# This file is part of Autoconf. -*- Autoconf -*-
|
2000-02-08 02:03:54 +08:00
|
|
|
# Parameterized macros.
|
2001-02-06 01:33:00 +08:00
|
|
|
# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
|
2000-02-25 21:19:35 +08:00
|
|
|
# Free Software Foundation, Inc.
|
2000-02-08 02:03:54 +08:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
# any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
|
|
# 02111-1307, USA.
|
|
|
|
#
|
|
|
|
# As a special exception, the Free Software Foundation gives unlimited
|
|
|
|
# permission to copy, distribute and modify the configure scripts that
|
|
|
|
# are the output of Autoconf. You need not follow the terms of the GNU
|
|
|
|
# General Public License when using or distributing such scripts, even
|
|
|
|
# though portions of the text of Autoconf appear in them. The GNU
|
|
|
|
# General Public License (GPL) does govern all other use of the material
|
|
|
|
# that constitutes the Autoconf program.
|
|
|
|
#
|
|
|
|
# Certain portions of the Autoconf source text are designed to be copied
|
|
|
|
# (in certain cases, depending on the input) into the output of
|
|
|
|
# Autoconf. We call these the "data" portions. The rest of the Autoconf
|
|
|
|
# source text consists of comments plus executable code that decides which
|
|
|
|
# of the data portions to output in any given case. We call these
|
|
|
|
# comments and executable code the "non-data" portions. Autoconf never
|
|
|
|
# copies any of the non-data portions into its output.
|
|
|
|
#
|
|
|
|
# This special exception to the GPL applies to versions of Autoconf
|
|
|
|
# released by the Free Software Foundation. When you make and
|
|
|
|
# distribute a modified version of Autoconf, you may extend this special
|
|
|
|
# exception to the GPL to apply to your modified version as well, *unless*
|
|
|
|
# your modified version has the potential to copy into its output some
|
|
|
|
# of the text that was the non-data portion of the version that you started
|
|
|
|
# with. (In other words, unless your change moves or copies text from
|
|
|
|
# the non-data portions to the data portions.) If your modification has
|
|
|
|
# such potential, you must delete any notice of this special exception
|
|
|
|
# to the GPL from your modified version.
|
|
|
|
#
|
|
|
|
# Written by David MacKenzie, with help from
|
|
|
|
# Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
|
|
|
|
# Roland McGrath, Noah Friedman, david d zuhn, and many others.
|
|
|
|
|
2000-03-14 01:52:26 +08:00
|
|
|
|
2000-02-08 18:46:43 +08:00
|
|
|
## ---------------- ##
|
|
|
|
## The diversions. ##
|
|
|
|
## ---------------- ##
|
1994-09-01 12:59:32 +08:00
|
|
|
|
|
|
|
|
2000-03-14 01:52:26 +08:00
|
|
|
# We heavily use m4's diversions both for the initializations and for
|
|
|
|
# required macros (see AC_REQUIRE), because in both cases we have to
|
|
|
|
# issue high in `configure' something which is discovered late.
|
|
|
|
#
|
|
|
|
# KILL is only used to suppress output.
|
|
|
|
#
|
2000-06-26 17:06:50 +08:00
|
|
|
# The layers of `configure'. We let m4 undivert them by itself, when
|
2001-01-12 17:19:59 +08:00
|
|
|
# it reaches the end of `configure.ac'.
|
2000-03-14 01:52:26 +08:00
|
|
|
#
|
|
|
|
# - BINSH
|
|
|
|
# AC_REQUIRE'd #! /bin/sh line
|
2000-07-07 18:54:01 +08:00
|
|
|
# - REVISION
|
|
|
|
# Sent by AC_REVISION
|
2000-03-14 01:52:26 +08:00
|
|
|
# - NOTICE
|
|
|
|
# copyright notice(s)
|
|
|
|
# - DEFAULTS
|
|
|
|
# early initializations (defaults)
|
2000-07-31 17:21:33 +08:00
|
|
|
# - PARSE_ARGS
|
2000-03-14 01:52:26 +08:00
|
|
|
# initialization code, option handling loop.
|
2000-06-26 17:06:50 +08:00
|
|
|
#
|
2000-03-14 01:52:26 +08:00
|
|
|
# - HELP_BEGIN
|
|
|
|
# Handling `configure --help'.
|
2000-05-03 17:53:55 +08:00
|
|
|
# - HELP_CANON
|
|
|
|
# Help msg for AC_CANONICAL_*
|
2000-03-14 01:52:26 +08:00
|
|
|
# - HELP_ENABLE
|
|
|
|
# Help msg from AC_ARG_ENABLE.
|
|
|
|
# - HELP_WITH
|
|
|
|
# Help msg from AC_ARG_WITH.
|
|
|
|
# - HELP_VAR
|
|
|
|
# Help msg from AC_ARG_VAR.
|
2000-07-19 17:08:13 +08:00
|
|
|
# - HELP_VAR_END
|
|
|
|
# A small paragraph on the use of the variables.
|
2000-03-14 01:52:26 +08:00
|
|
|
# - HELP_END
|
|
|
|
# Tail of the handling of --help.
|
2000-06-26 17:06:50 +08:00
|
|
|
#
|
2000-03-14 01:52:26 +08:00
|
|
|
# - VERSION_BEGIN
|
2001-06-06 16:49:33 +08:00
|
|
|
# Head of the handling of --version.
|
|
|
|
# - VERSION_FSF
|
|
|
|
# FSF copyright notice for --version.
|
|
|
|
# - VERSION_USER
|
|
|
|
# User copyright notice for --version.
|
2000-03-14 01:52:26 +08:00
|
|
|
# - VERSION_END
|
|
|
|
# Tail of the handling of --version.
|
2000-06-26 17:06:50 +08:00
|
|
|
#
|
2000-03-14 01:52:26 +08:00
|
|
|
# - INIT_PREPARE
|
|
|
|
# Tail of initialization code.
|
|
|
|
#
|
2000-06-26 17:06:50 +08:00
|
|
|
# - BODY
|
|
|
|
# the tests and output code
|
2000-03-14 01:52:26 +08:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2000-10-31 03:01:24 +08:00
|
|
|
# _m4_divert(DIVERSION-NAME)
|
2000-03-14 16:33:21 +08:00
|
|
|
# --------------------------
|
2000-03-14 01:52:26 +08:00
|
|
|
# Convert a diversion name into its number. Otherwise, return
|
|
|
|
# DIVERSION-NAME which is supposed to be an actual diversion number.
|
2000-03-21 20:09:31 +08:00
|
|
|
# Of course it would be nicer to use m4_case here, instead of zillions
|
|
|
|
# of little macros, but it then takes twice longer to run `autoconf'!
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_m4_divert(BINSH)], 0)
|
|
|
|
m4_define([_m4_divert(REVISION)], 1)
|
|
|
|
m4_define([_m4_divert(NOTICE)], 2)
|
|
|
|
m4_define([_m4_divert(DEFAULTS)], 3)
|
|
|
|
m4_define([_m4_divert(PARSE_ARGS)], 4)
|
2000-05-03 17:53:55 +08:00
|
|
|
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_m4_divert(HELP_BEGIN)], 10)
|
|
|
|
m4_define([_m4_divert(HELP_CANON)], 11)
|
|
|
|
m4_define([_m4_divert(HELP_ENABLE)], 12)
|
|
|
|
m4_define([_m4_divert(HELP_WITH)], 13)
|
|
|
|
m4_define([_m4_divert(HELP_VAR)], 14)
|
|
|
|
m4_define([_m4_divert(HELP_VAR_END)], 15)
|
|
|
|
m4_define([_m4_divert(HELP_END)], 16)
|
2000-05-03 17:53:55 +08:00
|
|
|
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_m4_divert(VERSION_BEGIN)], 20)
|
2001-06-06 16:49:33 +08:00
|
|
|
m4_define([_m4_divert(VERSION_FSF)], 21)
|
|
|
|
m4_define([_m4_divert(VERSION_USER)], 22)
|
|
|
|
m4_define([_m4_divert(VERSION_END)], 23)
|
2000-05-03 17:53:55 +08:00
|
|
|
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_m4_divert(INIT_PREPARE)], 30)
|
2000-05-03 17:53:55 +08:00
|
|
|
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_m4_divert(BODY)], 40)
|
2000-06-26 17:06:50 +08:00
|
|
|
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_m4_divert(PREPARE)], 100)
|
2000-03-21 20:09:31 +08:00
|
|
|
|
2000-10-31 03:01:24 +08:00
|
|
|
|
|
|
|
|
2000-03-14 01:52:26 +08:00
|
|
|
# AC_DIVERT_PUSH(DIVERSION-NAME)
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_DIVERT_POP
|
Various cleanups and consistency checks.
* m4sugar.m4: Formatting changes.
* acgeneral.m4 (AC_DIVERT_PUSH, AC_DIVERT_POP, AC_REQUIRE)
(AC_DIAGNOSE, AC_FATAL, AC_MSG_WARN, AC_MSG_NOTICE, AC_MSG_ERROR):
Use m4_copy to define them, in order to keep a good $0.
(AC_INIT): AC_LANG_PUSH C, not AC_LANG, to initialize the stack.
* aclang.m4 (AC_LANG_PUSH): Dont't use m4_defn on undefined macros.
(AC_LANG_POP): Admit an argument specifying the language we quit
when popping.
Adjust Autoconf's AC_LANG_POPs.
* tests/tools.at (AWK portability): Don't depend on AC_INIT.
(autoconf --trace: user macros): Obviously I
meant TRACE1, not AC_TRACE1.
2001-01-18 17:15:31 +08:00
|
|
|
# ------------------------------
|
|
|
|
m4_copy([m4_divert_push],[AC_DIVERT_PUSH])
|
|
|
|
m4_copy([m4_divert_pop], [AC_DIVERT_POP])
|
2000-07-19 17:08:13 +08:00
|
|
|
|
|
|
|
|
2000-03-14 16:21:48 +08:00
|
|
|
## ------------------------------- ##
|
|
|
|
## Defining macros in autoconf::. ##
|
|
|
|
## ------------------------------- ##
|
2000-02-08 18:46:43 +08:00
|
|
|
|
1999-11-01 Akim Demaille <akim@epita.fr>
Fix a bit of the brokenness of AC_CHECK_TYPE.
* acgeneral.m4 (AC_CHECK_TYPE_INTERNAL): New macro, inspired from
the former AC_CHECK_TYPE. This macro is exactly the one that
ought to be named AC_CHECK_TYPE: it just checks, and executes user
actions. In the future, this macro ought to be renamed
AC_CHECK_TYPE.
There is a big difference with the former AC_CHECK_TYPE: instead
of grepping in the headers, it tries to compile a variable
declaration. This is both safer, slower, and better, since now we
can check for compiler types (e.g., unsigned long long).
(AC_CHECK_TYPES): The looping and AC_DEFINEing version of the
previous macro. Uses m4 loops.
(AC_CHECK_TYPE): Reimplemented on top of AC_CHECK_TYPE_INTERNAL.
* autoheader.m4 (AH_CHECK_TYPE, AH_CHECK_TYPES): New macros,
hooked.
* autoconf.texi (@ovar): New macro, for optional variables.
(Generic Typedefs): Document AC_CHECK_TYPES.
* autoheader.texi: (AH_CHECK_TYPE, AH_CHECK_TYPES): New macros.
(Epilogue): Hooks them.
2000-01-28 18:41:47 +08:00
|
|
|
|
Various cleanups.
* acgeneral.m4 (AC_PRO, AC_EPI): Rename as _AC_DEFUN_PRO and
_AC_DEFUN_EPI.
Adjust dependencies.
(AC_DEFUN): Remove the not-to-be-released specializing mechanism.
(AC_SPECIALIZE): Remove for the same reasons.
Adjust dependencies.
(_AC_INIT_DEFAULTS, _AC_INIT_PARSE_ARGS, _AC_INIT_VERSION,
_AC_INIT_PREPARE, _AC_CANONICAL_SPLIT, _AC_CHECK_TYPE_NEW,
_AC_CHECK_TYPE_OLD): Define via `define' instead of `AC_DEFUN':
they are not related to AC_REQUIRE in any way.
* acspecific.m4 (AC_PROG_ECHO, _AC_DECL_YYTEXT, _AC_PATH_X_XMKMF,
_AC_PATH_X_DIRECT): Define via `define' instead of `AC_DEFUN'.
2000-06-26 17:03:15 +08:00
|
|
|
# AC_DEFUN(NAME, EXPANSION)
|
|
|
|
# -------------------------
|
2000-11-14 19:06:37 +08:00
|
|
|
# Same as `m4_define' but equip the macro with the needed machinery
|
|
|
|
# for `AC_REQUIRE'.
|
|
|
|
#
|
|
|
|
# We don't use this macro to define some frequently called macros that
|
|
|
|
# are not involved in ordering constraints, to save m4 processing.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_DEFUN],
|
Move the `defun' handling into M4sugar.
* m4sugar.m4 (_m4_divert(GROW), _m4_expansion_stack_dump)
_m4_defun_pro, _m4_defun_epi, m4_defun, $1, m4_defun_once)
m4_before, _m4_require, m4_require, m4_expand_once, m4_provide)
m4_provide_ifelse): New macros.
* acgeneral.m4 (_AC_EXPANSION_STACK_DUMP, _AC_DEFUN_PRO)
_AC_DEFUN_EPI): Removed.
(AC_DEFUN, AC_DEFUN_ONCE, _AC_REQUIRE, AC_REQUIRE)
AC_PROVIDE_IFELSE, AC_FATAL): Reimplement atop M4sugar.
2000-11-01 23:56:37 +08:00
|
|
|
[m4_defun([$1], [$2[]AC_PROVIDE([$1])])])
|
1999-10-30 22:17:20 +08:00
|
|
|
|
|
|
|
|
2000-03-14 16:20:25 +08:00
|
|
|
# AC_DEFUN_ONCE(NAME, EXPANSION)
|
|
|
|
# ------------------------------
|
|
|
|
# As AC_DEFUN, but issues the EXPANSION only once, and warns if used
|
|
|
|
# several times.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_DEFUN_ONCE],
|
2000-11-03 18:39:27 +08:00
|
|
|
[m4_defun_once([$1], [$2[]AC_PROVIDE([$1])])])
|
2000-03-14 16:20:25 +08:00
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION])
|
|
|
|
# ------------------------------------------
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_OBSOLETE],
|
Provide a fine grained control over autoconf's warnings.
* acgeneral.m4 (AC_WARNING_IFELSE, _AC_DIAGNOSE, AC_DIAGNOSE):
New macros.
(AC_DEFUN_ONCE, AC_OBSOLETE, AC_BEFORE, AU_DEFUN, AC_PREREQ,
AC_WARNING, AC_FATAL, AC_TRY_RUN): Use AC_DIAGNOSE.
* autoconf.sh: Provide support for `--warnings', `-W'.
* doc/autoconf.texi (Invoking autoconf): Adjust.
(Reporting Messages): New section.
2000-04-13 16:25:11 +08:00
|
|
|
[AC_DIAGNOSE([obsolete], [$1 is obsolete$2])])
|
2000-02-08 02:03:54 +08:00
|
|
|
|
|
|
|
|
2000-02-08 18:46:43 +08:00
|
|
|
|
2000-02-08 21:25:49 +08:00
|
|
|
|
|
|
|
|
* m4sugar.m4 (m4_dquote, m4_pattern_forbid, m4_pattern_allow)
(m4_cr_letters, m4_cr_LETTERS, m4_cr_Letters, m4_cr_digits)
(m4_cr_symbols1, m4_cr_symbols2, m4_re_string, m4_re_word)
(m4_init): New macros.
(m4_token_allow): Remove.
* acgeneral.m4: Don't push BODY into the diversion stack.
(AC_PLAIN_SCRIPT): Do it.
Call m4_init, define the Autoconf patterns.
(AC_INIT): Use AC_PLAIN_SCRIPT.
Remove the useless `dnl' (those where the current diversion is
KILL).
* autoconf.sh (m4_common): Fix quotation.
(finalize.awk): Load forbidden.rx and allowed.rx.
Split the line into tokens, and check their validity.
* tests/tools.at (Forbidden tokens): Adjust.
2000-12-06 16:58:13 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
## ----------------------------- ##
|
|
|
|
## Dependencies between macros. ##
|
|
|
|
## ----------------------------- ##
|
|
|
|
|
|
|
|
|
|
|
|
# AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
|
|
|
|
# ---------------------------------------------
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_BEFORE],
|
Provide a fine grained control over autoconf's warnings.
* acgeneral.m4 (AC_WARNING_IFELSE, _AC_DIAGNOSE, AC_DIAGNOSE):
New macros.
(AC_DEFUN_ONCE, AC_OBSOLETE, AC_BEFORE, AU_DEFUN, AC_PREREQ,
AC_WARNING, AC_FATAL, AC_TRY_RUN): Use AC_DIAGNOSE.
* autoconf.sh: Provide support for `--warnings', `-W'.
* doc/autoconf.texi (Invoking autoconf): Adjust.
(Reporting Messages): New section.
2000-04-13 16:25:11 +08:00
|
|
|
[AC_PROVIDE_IFELSE([$2], [AC_DIAGNOSE([syntax], [$2 was called before $1])])])
|
2000-02-08 02:03:54 +08:00
|
|
|
|
|
|
|
|
2000-09-12 21:59:55 +08:00
|
|
|
# AC_REQUIRE(STRING)
|
|
|
|
# ------------------
|
2000-11-14 19:06:37 +08:00
|
|
|
# If STRING has never been AC_PROVIDE'd, then expand it. A macro must
|
|
|
|
# be AC_DEFUN'd if either it is AC_REQUIRE'd, or it AC_REQUIRE's.
|
Various cleanups and consistency checks.
* m4sugar.m4: Formatting changes.
* acgeneral.m4 (AC_DIVERT_PUSH, AC_DIVERT_POP, AC_REQUIRE)
(AC_DIAGNOSE, AC_FATAL, AC_MSG_WARN, AC_MSG_NOTICE, AC_MSG_ERROR):
Use m4_copy to define them, in order to keep a good $0.
(AC_INIT): AC_LANG_PUSH C, not AC_LANG, to initialize the stack.
* aclang.m4 (AC_LANG_PUSH): Dont't use m4_defn on undefined macros.
(AC_LANG_POP): Admit an argument specifying the language we quit
when popping.
Adjust Autoconf's AC_LANG_POPs.
* tests/tools.at (AWK portability): Don't depend on AC_INIT.
(autoconf --trace: user macros): Obviously I
meant TRACE1, not AC_TRACE1.
2001-01-18 17:15:31 +08:00
|
|
|
m4_copy([m4_require], [AC_REQUIRE])
|
2000-09-12 21:59:55 +08:00
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_PROVIDE(MACRO-NAME)
|
|
|
|
# ----------------------
|
2000-11-04 00:02:54 +08:00
|
|
|
# Ideally we should just use `m4_provide($1)', but unfortunately many
|
|
|
|
# third party macros know that we use `AC_PROVIDE_$1' and they depend
|
|
|
|
# on it.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_PROVIDE],
|
2000-11-04 00:02:54 +08:00
|
|
|
[m4_define([AC_PROVIDE_$1])m4_provide([$1])])
|
2000-02-08 02:03:54 +08:00
|
|
|
|
1999-11-10 Akim Demaille <akim@epita.fr>
A test suite will be introduced which tries to run all the
specific macros, but hasbeen'd macro make configure die with bad
exit status. So we wish to distinguish live macros from defunct
macros at the moment they are AC_DEFUN'd, not in their body. Hm,
defunct, defunct... Hey! That's a good name!
* acgeneral.m4 (AC_DEFUNCT): New macro, comparable to AC_DEFUN,
but for macros which are no longer defined. Replaces AC_HASBEEN.
(AC_HASBEEN): Defunct. Well, removed in fact.
(AC_HAVE_LIBRARY): Don't use AC_DEFUN and AC_HASBEEN, just
AC_DEFUNCT.
* acspecific.m4 (AC_UNISTD_H, AC_USG, AC_MEMORY_H, AC_DIR_HEADER,
AC_INT_16_BITS, AC_LONG_64_BITS): Likewise.
(AC_XENIX_DIR): It was defunct even before I declared it was: was
depending upon AC_DIR_HEADER which is defunct. So AC_DEFUNCT'ed
now.
(AC_DYNIX_SEQ, AC_IRIX_SUN, AC_SCO_INTL): While we're here, you
too are defunct now.
* autoconf.texi (Obsolete Macros): Replace the documentation of
AC_HASBEEN with that of AC_DEFUNCT.
2000-01-29 19:46:21 +08:00
|
|
|
|
2000-04-11 20:02:34 +08:00
|
|
|
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
|
|
|
|
# -----------------------------------------------------------
|
No longer rely on /bin/sh to compose the optional parts of
`configure --help'.
* acgeneral.m4 (AC_DIVERSION_HELP_BEGIN, AC_DIVERSION_HELP_ENABLE,
AC_DIVERSION_HELP_WITH, AC_DIVERSION_HELP_VAR,
AC_DIVERSION_HELP_END): New diversion numbers.
(AC_EXPAND_ONCE): New macro.
(AC_PROVIDE_IF): New macro.
(AC_BEFORE, AC_REQUIRE): Use it.
(AC_REQUIRE): Don't use indir.
(_AC_ARG_ENABLE_HELP_PROLOGUE, _AC_ARG_WITH_HELP_PROLOGUE,
_AC_ARG_VAR_HELP_PROLOGUE): New macros.
(AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): Expand once the
_HELP_PROLOGUE macro which corresponds.
(_AC_INIT_HELP): Adjust to AC_DIVERSION_HELP_BEGIN and
AC_DIVERSION_HELP_END.
(_AC_INIT_NOTICE, _AC_INIT_HELP): Remove the sh code which handled
the optional help strings.
2000-03-08 19:08:29 +08:00
|
|
|
# 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.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_PROVIDE_IFELSE],
|
2000-11-29 18:09:44 +08:00
|
|
|
[m4_ifdef([AC_PROVIDE_$1],
|
|
|
|
[$2], [$3])])
|
1999-10-30 22:17:20 +08:00
|
|
|
|
|
|
|
|
2000-03-14 16:21:48 +08:00
|
|
|
|
|
|
|
|
|
|
|
## --------------------------------- ##
|
|
|
|
## Defining macros in autoupdate::. ##
|
|
|
|
## --------------------------------- ##
|
|
|
|
|
|
|
|
|
|
|
|
# AU_DEFINE(NAME, GLUE-CODE, [MESSAGE])
|
|
|
|
# -------------------------------------
|
|
|
|
#
|
|
|
|
# Declare `autoupdate::NAME' to be `GLUE-CODE', with all the needed
|
|
|
|
# wrapping actions required by `autoupdate'.
|
|
|
|
# We do not define anything in `autoconf::'.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AU_DEFINE],
|
Get rid of the m4 name spaces.
* libm4.m4 (m4_changequote, m4_define, m4_defn, m4_dnl, m4_indir,
m4_popdef, m4_pushdef, m4_undefine, m4_namespace_push,
m4_namespace_pop, m4_namespace_register, m4_namespace_define,
m4_disable, m4_enable): Removed.
All dependencies adjusted.
* libm4.m4: Remove all the name space initialization.
* acgeneral.m4: Adjust.
(AU_DEFINE): Redefine as `AC_DEFUN'.
* autoupdate.m4: Adjust.
* tests/tools.m4: Temporarily disable the `autoupdate' test.
2000-05-11 21:28:47 +08:00
|
|
|
[AC_DEFUN([$1], [$2])])
|
2000-03-14 16:21:48 +08:00
|
|
|
|
|
|
|
|
|
|
|
# AU_DEFUN(NAME, NEW-CODE, [MESSAGE])
|
|
|
|
# -----------------------------------
|
|
|
|
# Declare that the macro NAME is now obsoleted, and should be replaced
|
|
|
|
# by NEW-CODE. Tell the user she should run autoupdate, and include
|
|
|
|
# the additional MESSAGE.
|
|
|
|
#
|
|
|
|
# Also define NAME as a macro which code is NEW-CODE.
|
|
|
|
#
|
|
|
|
# This allows to share the same code for both supporting obsoleted macros,
|
2001-01-12 17:19:59 +08:00
|
|
|
# and to update a configure.ac.
|
2000-03-14 16:21:48 +08:00
|
|
|
# See `acobsolete.m4' for a longer description.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AU_DEFUN],
|
Get rid of the m4 name spaces.
* libm4.m4 (m4_changequote, m4_define, m4_defn, m4_dnl, m4_indir,
m4_popdef, m4_pushdef, m4_undefine, m4_namespace_push,
m4_namespace_pop, m4_namespace_register, m4_namespace_define,
m4_disable, m4_enable): Removed.
All dependencies adjusted.
* libm4.m4: Remove all the name space initialization.
* acgeneral.m4: Adjust.
(AU_DEFINE): Redefine as `AC_DEFUN'.
* autoupdate.m4: Adjust.
* tests/tools.m4: Temporarily disable the `autoupdate' test.
2000-05-11 21:28:47 +08:00
|
|
|
[AU_DEFINE([$1],
|
|
|
|
[AC_DIAGNOSE([obsolete], [The macro `$1' is obsolete.
|
2000-03-14 16:21:48 +08:00
|
|
|
You should run autoupdate.])dnl
|
Get rid of the m4 name spaces.
* libm4.m4 (m4_changequote, m4_define, m4_defn, m4_dnl, m4_indir,
m4_popdef, m4_pushdef, m4_undefine, m4_namespace_push,
m4_namespace_pop, m4_namespace_register, m4_namespace_define,
m4_disable, m4_enable): Removed.
All dependencies adjusted.
* libm4.m4: Remove all the name space initialization.
* acgeneral.m4: Adjust.
(AU_DEFINE): Redefine as `AC_DEFUN'.
* autoupdate.m4: Adjust.
* tests/tools.m4: Temporarily disable the `autoupdate' test.
2000-05-11 21:28:47 +08:00
|
|
|
$2],
|
|
|
|
[$3])dnl
|
2000-03-14 16:21:48 +08:00
|
|
|
])
|
|
|
|
|
|
|
|
|
Create acfunctions.m4, in charge of the macros related to
functions.
* acgeneral.m4 (AC_CHECK_FUNC, AC_CHECK_FUNCS, AC_REPLACE_FUNCS):
Move to...
* acfunctions.m4: here, new file.
* acspecific.m4 (_AC_LIBOBJ_ALLOCA, AC_FUNC_ALLOCA, AC_FUNC_CHOWN,
AC_FUNC_CLOSEDIR_VOID, AC_FUNC_FNMATCH, AC_FUNC_GETGROUPS,
_AC_LIBOBJ_GETLOADAVG, AC_FUNC_GETLOADAVG, AC_FUNC_GETMNTENT,
AC_FUNC_GETPGRP, AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK,
AC_FUNC_MALLOC, AC_FUNC_MEMCMP, AC_FUNC_MKTIME, AC_FUNC_MMAP,
AC_FUNC_SELECT_ARGTYPES, AC_FUNC_SETPGRP, _AC_FUNC_STAT,
AC_FUNC_STAT, AC_FUNC_LSTAT, AC_FUNC_STRERROR_R, AC_FUNC_STRFTIME,
AC_FUNC_VFORK, AC_FUNC_VPRINTF, AC_FUNC_WAIT3, AC_FUNC_UTIME_NULL,
AC_FUNC_STRCOLL, AC_FUNC_SETVBUF_REVERSED): Likewise.
* Makefile.am: Adjust.
Move also the old definitions into acfunctions.m4, and adjust the
test suite.
* acgeneral.m4 (AU_ALIAS): New macro.
* acoldnames (AC_FUNC_CHECK, AC_HAVE_FUNCS, AC_ALLOCA,
AC_GETLOADAVG, AC_MMAP, AC_SETVBUF_REVERSED, AC_STRCOLL,
AC_UTIME_NULL, AC_VFORK, AC_VPRINTF, AC_WAIT3, AM_FUNC_FNMATCH,
AM_FUNC_MKTIME, fp_FUNC_FNMATCH): Move to...
* acfunctions.m4: here, using AU_ALIAS.
* acgeneral.m4 (AC_FD_CC, AC_CANONICAL_SYSTEM): Use AU_ALIAS to
define them.
* acoldnames.m4: Use AU_ALIAS instead of AU_DEFUN.
* tests/Makefile.am (MACRO_FILES): Adjust.
2000-08-01 18:13:14 +08:00
|
|
|
# AU_ALIAS(OLD-NAME, NEW-NAME)
|
|
|
|
# ----------------------------
|
|
|
|
# The OLD-NAME is no longer used, just use NEW-NAME instead. There is
|
|
|
|
# little difference with using AU_DEFUN but the fact there is little
|
|
|
|
# interest in running the test suite on both OLD-NAME and NEW-NAME.
|
|
|
|
# This macro makes it possible to distinguish such cases.
|
2000-09-19 20:21:47 +08:00
|
|
|
#
|
|
|
|
# Do not use `defn' since then autoupdate would replace an old macro
|
|
|
|
# call with the new macro body instead of the new macro call.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AU_ALIAS],
|
2000-11-03 19:59:39 +08:00
|
|
|
[AU_DEFUN([$1], [$2($][@)])])
|
Create acfunctions.m4, in charge of the macros related to
functions.
* acgeneral.m4 (AC_CHECK_FUNC, AC_CHECK_FUNCS, AC_REPLACE_FUNCS):
Move to...
* acfunctions.m4: here, new file.
* acspecific.m4 (_AC_LIBOBJ_ALLOCA, AC_FUNC_ALLOCA, AC_FUNC_CHOWN,
AC_FUNC_CLOSEDIR_VOID, AC_FUNC_FNMATCH, AC_FUNC_GETGROUPS,
_AC_LIBOBJ_GETLOADAVG, AC_FUNC_GETLOADAVG, AC_FUNC_GETMNTENT,
AC_FUNC_GETPGRP, AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK,
AC_FUNC_MALLOC, AC_FUNC_MEMCMP, AC_FUNC_MKTIME, AC_FUNC_MMAP,
AC_FUNC_SELECT_ARGTYPES, AC_FUNC_SETPGRP, _AC_FUNC_STAT,
AC_FUNC_STAT, AC_FUNC_LSTAT, AC_FUNC_STRERROR_R, AC_FUNC_STRFTIME,
AC_FUNC_VFORK, AC_FUNC_VPRINTF, AC_FUNC_WAIT3, AC_FUNC_UTIME_NULL,
AC_FUNC_STRCOLL, AC_FUNC_SETVBUF_REVERSED): Likewise.
* Makefile.am: Adjust.
Move also the old definitions into acfunctions.m4, and adjust the
test suite.
* acgeneral.m4 (AU_ALIAS): New macro.
* acoldnames (AC_FUNC_CHECK, AC_HAVE_FUNCS, AC_ALLOCA,
AC_GETLOADAVG, AC_MMAP, AC_SETVBUF_REVERSED, AC_STRCOLL,
AC_UTIME_NULL, AC_VFORK, AC_VPRINTF, AC_WAIT3, AM_FUNC_FNMATCH,
AM_FUNC_MKTIME, fp_FUNC_FNMATCH): Move to...
* acfunctions.m4: here, using AU_ALIAS.
* acgeneral.m4 (AC_FD_CC, AC_CANONICAL_SYSTEM): Use AU_ALIAS to
define them.
* acoldnames.m4: Use AU_ALIAS instead of AU_DEFUN.
* tests/Makefile.am (MACRO_FILES): Adjust.
2000-08-01 18:13:14 +08:00
|
|
|
|
|
|
|
|
2000-03-14 16:21:48 +08:00
|
|
|
|
2000-03-30 00:48:00 +08:00
|
|
|
## ------------------------- ##
|
|
|
|
## Interface to autoheader. ##
|
|
|
|
## ------------------------- ##
|
|
|
|
|
|
|
|
|
2000-05-04 18:26:02 +08:00
|
|
|
# AH_OUTPUT(KEY, TEXT)
|
|
|
|
# --------------------
|
2000-03-30 00:48:00 +08:00
|
|
|
# Pass TEXT to autoheader.
|
|
|
|
# This macro is `read' only via `autoconf --trace', it outputs nothing.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AH_OUTPUT], [])
|
2000-03-30 00:48:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
# AH_VERBATIM(KEY, TEMPLATE)
|
|
|
|
# --------------------------
|
|
|
|
# If KEY is direct (i.e., no indirection such as in KEY=$my_func which
|
|
|
|
# may occur if there is AC_CHECK_FUNCS($my_func)), issue an autoheader
|
|
|
|
# TEMPLATE associated to the KEY. Otherwise, do nothing. TEMPLATE is
|
|
|
|
# output as is, with no formating.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AH_VERBATIM],
|
2001-02-27 05:37:13 +08:00
|
|
|
[AS_LITERAL_IF([$1],
|
|
|
|
[AH_OUTPUT([$1], AS_ESCAPE([[$2]]))])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
# _AH_VERBATIM_OLD(KEY, TEMPLATE)
|
|
|
|
# -------------------------------
|
|
|
|
# Same as above, but with bugward compatibility.
|
|
|
|
m4_define([_AH_VERBATIM_OLD],
|
2001-01-15 15:29:24 +08:00
|
|
|
[AS_LITERAL_IF([$1],
|
|
|
|
[AH_OUTPUT([$1], _AS_QUOTE([[$2]]))])
|
2000-05-03 16:53:06 +08:00
|
|
|
])
|
2000-03-30 00:48:00 +08:00
|
|
|
|
|
|
|
|
|
|
|
# AH_TEMPLATE(KEY, DESCRIPTION)
|
|
|
|
# -----------------------------
|
|
|
|
# Issue an autoheader template for KEY, i.e., a comment composed of
|
|
|
|
# DESCRIPTION (properly wrapped), and then #undef KEY.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AH_TEMPLATE],
|
2000-03-30 00:48:00 +08:00
|
|
|
[AH_VERBATIM([$1],
|
* m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros.
Use them.
(debugfile, debugmode, m4exit, m4wrap, maketemp, patsubst, regexp)
(substr, translit, m4_wrap): Rename as...
(m4_debugfile, m4_debugmode, m4_exit, m4_wrap, m4_maketemp)
(m4_patsubst, m4_regexp, m4_substr, m4_translit, m4_text_wrap): these.
Adjust all dependencies.
* acgeneral.m4: Adjust.
* tests/m4sugar.at: Adjust.
* autoconf.m4 (m4exit, patsubst, regexp, substr, translit):
Reestablish them.
2000-11-03 16:53:26 +08:00
|
|
|
m4_text_wrap([$2 */], [ ], [/* ])[
|
2000-03-30 00:48:00 +08:00
|
|
|
#undef $1])])
|
|
|
|
|
|
|
|
|
2001-02-27 05:37:13 +08:00
|
|
|
# _AH_TEMPLATE_OLD(KEY, DESCRIPTION)
|
|
|
|
# ----------------------------------
|
|
|
|
# Same as above, but with bugward compatibility.
|
|
|
|
m4_define([_AH_TEMPLATE_OLD],
|
|
|
|
[_AH_VERBATIM_OLD([$1],
|
|
|
|
m4_text_wrap([$2 */], [ ], [/* ])[
|
|
|
|
#undef $1])])
|
|
|
|
|
|
|
|
|
2000-05-04 18:26:02 +08:00
|
|
|
# AH_TOP(TEXT)
|
|
|
|
# ------------
|
|
|
|
# Output TEXT at the top of `config.h.in'.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AH_TOP],
|
|
|
|
[m4_define([_AH_COUNTER], m4_incr(_AH_COUNTER))dnl
|
2000-05-04 18:26:02 +08:00
|
|
|
AH_VERBATIM([0000]_AH_COUNTER, [$1])])
|
|
|
|
|
|
|
|
|
|
|
|
# AH_BOTTOM(TEXT)
|
|
|
|
# ---------------
|
|
|
|
# Output TEXT at the bottom of `config.h.in'.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AH_BOTTOM],
|
|
|
|
[m4_define([_AH_COUNTER], m4_incr(_AH_COUNTER))dnl
|
2000-05-04 18:26:02 +08:00
|
|
|
AH_VERBATIM([zzzz]_AH_COUNTER, [$1])])
|
|
|
|
|
|
|
|
# Initialize.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AH_COUNTER], [0])
|
2000-05-04 18:26:02 +08:00
|
|
|
|
2000-03-30 00:48:00 +08:00
|
|
|
|
2000-10-25 23:04:29 +08:00
|
|
|
|
2000-07-06 16:57:37 +08:00
|
|
|
|
2000-02-08 17:45:21 +08:00
|
|
|
## ----------------------------- ##
|
|
|
|
## Implementing Autoconf loops. ##
|
|
|
|
## ----------------------------- ##
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-02-08 00:17:51 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_FOREACH(VARIABLE, LIST, EXPRESSION)
|
|
|
|
# --------------------------------------
|
|
|
|
#
|
|
|
|
# Compute EXPRESSION assigning to VARIABLE each value of the LIST.
|
|
|
|
# LIST is a /bin/sh list, i.e., it has the form ` item_1 item_2
|
|
|
|
# ... item_n ': white spaces are separators, and leading and trailing
|
|
|
|
# spaces are meaningless.
|
|
|
|
#
|
|
|
|
# This macro is robust to active symbols:
|
|
|
|
# AC_FOREACH([Var], [ active
|
|
|
|
# b act\
|
|
|
|
# ive ], [-Var-])end
|
|
|
|
# => -active--b--active-end
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_FOREACH],
|
2001-01-17 23:23:31 +08:00
|
|
|
[m4_foreach([$1], m4_split(m4_normalize([$2])), [$3])])
|
1999-10-30 22:17:20 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2000-02-08 21:25:49 +08:00
|
|
|
|
2000-02-08 17:45:21 +08:00
|
|
|
## ----------------------------------- ##
|
|
|
|
## Helping macros to display strings. ##
|
|
|
|
## ----------------------------------- ##
|
1999-10-30 22:17:20 +08:00
|
|
|
|
|
|
|
|
2000-03-03 00:27:51 +08:00
|
|
|
# AC_HELP_STRING(LHS, RHS, [COLUMN])
|
2000-02-08 02:03:54 +08:00
|
|
|
# ----------------------------------
|
|
|
|
#
|
|
|
|
# Format an Autoconf macro's help string so that it looks pretty when
|
|
|
|
# the user executes "configure --help". This macro takes three
|
|
|
|
# arguments, a "left hand side" (LHS), a "right hand side" (RHS), and
|
|
|
|
# the COLUMN which is a string of white spaces which leads to the
|
|
|
|
# the RHS column (default: 26 white spaces).
|
|
|
|
#
|
|
|
|
# The resulting string is suitable for use in other macros that require
|
|
|
|
# a help string (e.g. AC_ARG_WITH).
|
|
|
|
#
|
|
|
|
# Here is the sample string from the Autoconf manual (Node: External
|
|
|
|
# Software) which shows the proper spacing for help strings.
|
|
|
|
#
|
|
|
|
# --with-readline support fancy command line editing
|
|
|
|
# ^ ^ ^
|
|
|
|
# | | |
|
|
|
|
# | column 2 column 26
|
|
|
|
# |
|
|
|
|
# column 0
|
|
|
|
#
|
|
|
|
# A help string is made up of a "left hand side" (LHS) and a "right
|
|
|
|
# hand side" (RHS). In the example above, the LHS is
|
|
|
|
# "--with-readline", while the RHS is "support fancy command line
|
|
|
|
# editing".
|
|
|
|
#
|
|
|
|
# If the LHS extends past column 24, then the LHS is terminated with a
|
|
|
|
# newline so that the RHS is on a line of its own beginning in column
|
|
|
|
# 26.
|
|
|
|
#
|
|
|
|
# Therefore, if the LHS were instead "--with-readline-blah-blah-blah",
|
|
|
|
# then the AC_HELP_STRING macro would expand into:
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# --with-readline-blah-blah-blah
|
|
|
|
# ^ ^ support fancy command line editing
|
|
|
|
# | | ^
|
|
|
|
# | column 2 |
|
|
|
|
# column 0 column 26
|
|
|
|
#
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_HELP_STRING],
|
2000-11-02 22:12:18 +08:00
|
|
|
[m4_pushdef([AC_Prefix], m4_default([$3], [ ]))dnl
|
2000-11-03 19:14:48 +08:00
|
|
|
m4_pushdef([AC_Prefix_Format],
|
|
|
|
[ %-]m4_eval(m4_len(AC_Prefix) - 3)[s ])dnl [ %-23s ]
|
* m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros.
Use them.
(debugfile, debugmode, m4exit, m4wrap, maketemp, patsubst, regexp)
(substr, translit, m4_wrap): Rename as...
(m4_debugfile, m4_debugmode, m4_exit, m4_wrap, m4_maketemp)
(m4_patsubst, m4_regexp, m4_substr, m4_translit, m4_text_wrap): these.
Adjust all dependencies.
* acgeneral.m4: Adjust.
* tests/m4sugar.at: Adjust.
* autoconf.m4 (m4exit, patsubst, regexp, substr, translit):
Reestablish them.
2000-11-03 16:53:26 +08:00
|
|
|
m4_text_wrap([$2], AC_Prefix, m4_format(AC_Prefix_Format, [$1]))dnl
|
2000-11-02 22:12:18 +08:00
|
|
|
m4_popdef([AC_Prefix_Format])dnl
|
|
|
|
m4_popdef([AC_Prefix])dnl
|
1999-10-30 22:17:20 +08:00
|
|
|
])
|
|
|
|
|
2000-02-08 17:45:21 +08:00
|
|
|
|
|
|
|
|
2000-03-20 18:35:53 +08:00
|
|
|
|
|
|
|
## ---------------------------------------------- ##
|
|
|
|
## Information on the package being Autoconf'ed. ##
|
|
|
|
## ---------------------------------------------- ##
|
|
|
|
|
|
|
|
|
|
|
|
# It is suggested that the macros in this section appear before
|
2001-01-12 17:19:59 +08:00
|
|
|
# AC_INIT in `configure.ac'. Nevertheless, this is just stylistic,
|
2000-03-20 18:35:53 +08:00
|
|
|
# and from the implementation point of, AC_INIT *must* be expanded
|
|
|
|
# beforehand: it puts data in diversions which must appear before the
|
|
|
|
# data provided by the macros of this section.
|
|
|
|
|
|
|
|
# The solution is to require AC_INIT in each of these macros. AC_INIT
|
|
|
|
# has the needed magic so that it can't be expanded twice.
|
1994-09-06 22:36:45 +08:00
|
|
|
|
|
|
|
|
2000-03-14 16:32:35 +08:00
|
|
|
|
2001-01-16 18:25:57 +08:00
|
|
|
# _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION,
|
|
|
|
# [BUG-REPORT],
|
|
|
|
# [TAR-NAME = unGNU'd lower case PACKAGE-NAME])
|
|
|
|
# --------------------------------------------------------------
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_INIT_PACKAGE],
|
* m4sugar.m4 (m4_dquote, m4_pattern_forbid, m4_pattern_allow)
(m4_cr_letters, m4_cr_LETTERS, m4_cr_Letters, m4_cr_digits)
(m4_cr_symbols1, m4_cr_symbols2, m4_re_string, m4_re_word)
(m4_init): New macros.
(m4_token_allow): Remove.
* acgeneral.m4: Don't push BODY into the diversion stack.
(AC_PLAIN_SCRIPT): Do it.
Call m4_init, define the Autoconf patterns.
(AC_INIT): Use AC_PLAIN_SCRIPT.
Remove the useless `dnl' (those where the current diversion is
KILL).
* autoconf.sh (m4_common): Fix quotation.
(finalize.awk): Load forbidden.rx and allowed.rx.
Split the line into tokens, and check their validity.
* tests/tools.at (Forbidden tokens): Adjust.
2000-12-06 16:58:13 +08:00
|
|
|
[m4_define([AC_PACKAGE_NAME], [$1])
|
2001-01-16 18:25:57 +08:00
|
|
|
m4_define([AC_PACKAGE_TARNAME],
|
|
|
|
m4_tolower(m4_patsubst([[[$1]]], [GNU ])))
|
* m4sugar.m4 (m4_dquote, m4_pattern_forbid, m4_pattern_allow)
(m4_cr_letters, m4_cr_LETTERS, m4_cr_Letters, m4_cr_digits)
(m4_cr_symbols1, m4_cr_symbols2, m4_re_string, m4_re_word)
(m4_init): New macros.
(m4_token_allow): Remove.
* acgeneral.m4: Don't push BODY into the diversion stack.
(AC_PLAIN_SCRIPT): Do it.
Call m4_init, define the Autoconf patterns.
(AC_INIT): Use AC_PLAIN_SCRIPT.
Remove the useless `dnl' (those where the current diversion is
KILL).
* autoconf.sh (m4_common): Fix quotation.
(finalize.awk): Load forbidden.rx and allowed.rx.
Split the line into tokens, and check their validity.
* tests/tools.at (Forbidden tokens): Adjust.
2000-12-06 16:58:13 +08:00
|
|
|
m4_define([AC_PACKAGE_VERSION], [$2])
|
|
|
|
m4_define([AC_PACKAGE_STRING], [$1 $2])
|
|
|
|
m4_define([AC_PACKAGE_BUGREPORT], [$3])
|
2000-03-21 17:07:15 +08:00
|
|
|
])
|
2000-03-08 19:03:59 +08:00
|
|
|
|
|
|
|
|
2001-06-06 16:49:33 +08:00
|
|
|
# AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER])
|
|
|
|
# ------------------------------------------------------
|
2000-03-09 00:13:32 +08:00
|
|
|
# Append Copyright information in the top of `configure'. TEXT is
|
|
|
|
# evaluated once, hence TEXT can use macros. Note that we do not
|
|
|
|
# prepend `# ' but `@%:@ ', since m4 does not evaluate the comments.
|
|
|
|
# Had we used `# ', the Copyright sent in the beginning of `configure'
|
|
|
|
# would have not been evaluated. Another solution, a bit fragile,
|
|
|
|
# would have be to use m4_quote to force an evaluation:
|
|
|
|
#
|
* m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros.
Use them.
(debugfile, debugmode, m4exit, m4wrap, maketemp, patsubst, regexp)
(substr, translit, m4_wrap): Rename as...
(m4_debugfile, m4_debugmode, m4_exit, m4_wrap, m4_maketemp)
(m4_patsubst, m4_regexp, m4_substr, m4_translit, m4_text_wrap): these.
Adjust all dependencies.
* acgeneral.m4: Adjust.
* tests/m4sugar.at: Adjust.
* autoconf.m4 (m4exit, patsubst, regexp, substr, translit):
Reestablish them.
2000-11-03 16:53:26 +08:00
|
|
|
# m4_patsubst(m4_quote($1), [^], [# ])
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_COPYRIGHT],
|
2000-11-23 17:46:48 +08:00
|
|
|
[m4_divert_text([NOTICE],
|
* m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros.
Use them.
(debugfile, debugmode, m4exit, m4wrap, maketemp, patsubst, regexp)
(substr, translit, m4_wrap): Rename as...
(m4_debugfile, m4_debugmode, m4_exit, m4_wrap, m4_maketemp)
(m4_patsubst, m4_regexp, m4_substr, m4_translit, m4_text_wrap): these.
Adjust all dependencies.
* acgeneral.m4: Adjust.
* tests/m4sugar.at: Adjust.
* autoconf.m4 (m4exit, patsubst, regexp, substr, translit):
Reestablish them.
2000-11-03 16:53:26 +08:00
|
|
|
[m4_patsubst([
|
2000-03-21 17:07:15 +08:00
|
|
|
$1], [^], [@%:@ ])])dnl
|
2001-06-06 16:49:33 +08:00
|
|
|
m4_divert_text(m4_default([$2], [VERSION_USER]),
|
2000-03-14 16:32:35 +08:00
|
|
|
[
|
2000-03-21 17:07:15 +08:00
|
|
|
$1])dnl
|
2000-07-07 18:54:01 +08:00
|
|
|
])# AC_COPYRIGHT
|
1994-08-26 02:05:45 +08:00
|
|
|
|
2000-03-08 19:15:14 +08:00
|
|
|
|
2000-03-20 18:35:53 +08:00
|
|
|
# AC_REVISION(REVISION-INFO)
|
|
|
|
# --------------------------
|
2000-07-07 18:54:01 +08:00
|
|
|
# The second quote in the translit is just to cope with font-lock-mode
|
2000-03-20 18:35:53 +08:00
|
|
|
# which sees the opening of a string.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_REVISION],
|
2000-11-23 17:46:48 +08:00
|
|
|
[m4_divert_text([REVISION],
|
|
|
|
[@%:@ From __file__ m4_translit([$1], [$""]).])dnl
|
2000-03-20 18:35:53 +08:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## ---------------------------------------- ##
|
|
|
|
## Requirements over the Autoconf version. ##
|
|
|
|
## ---------------------------------------- ##
|
|
|
|
|
|
|
|
|
2000-10-24 01:41:27 +08:00
|
|
|
# AU::AC_PREREQ(VERSION)
|
|
|
|
# ----------------------
|
|
|
|
# Update this `AC_PREREQ' statement to require the current version of
|
|
|
|
# Autoconf. But fail if ever this autoupdate is too old.
|
|
|
|
#
|
2000-11-03 19:14:48 +08:00
|
|
|
# Note that `m4_defn([AC_ACVERSION])' below are expanded before calling
|
2000-10-24 01:41:27 +08:00
|
|
|
# `AU_DEFUN', i.e., it is hard coded. Otherwise it would be quite
|
|
|
|
# complex for autoupdate to import the value of `AC_ACVERSION'. We
|
|
|
|
# could `AU_DEFUN' `AC_ACVERSION', but this would replace all its
|
|
|
|
# occurrences with the current version of Autoconf, which is certainly
|
|
|
|
# not what mean the user.
|
|
|
|
AU_DEFUN([AC_PREREQ],
|
2000-12-06 16:58:41 +08:00
|
|
|
[m4_if(m4_version_compare(]m4_defn([AC_ACVERSION])[, [$1]), -1,
|
2000-10-24 01:41:27 +08:00
|
|
|
[m4_fatal([Autoconf version $1 or higher is required for this script])])dnl
|
2000-11-03 19:14:48 +08:00
|
|
|
[AC_PREREQ(]]m4_defn([AC_ACVERSION])[[)]])
|
2000-03-20 18:35:53 +08:00
|
|
|
|
|
|
|
|
|
|
|
# AC_PREREQ(VERSION)
|
|
|
|
# ------------------
|
|
|
|
# Complain and exit if the Autoconf version is less than VERSION.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_PREREQ],
|
2000-12-06 16:58:41 +08:00
|
|
|
[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1,
|
Provide a fine grained control over autoconf's warnings.
* acgeneral.m4 (AC_WARNING_IFELSE, _AC_DIAGNOSE, AC_DIAGNOSE):
New macros.
(AC_DEFUN_ONCE, AC_OBSOLETE, AC_BEFORE, AU_DEFUN, AC_PREREQ,
AC_WARNING, AC_FATAL, AC_TRY_RUN): Use AC_DIAGNOSE.
* autoconf.sh: Provide support for `--warnings', `-W'.
* doc/autoconf.texi (Invoking autoconf): Adjust.
(Reporting Messages): New section.
2000-04-13 16:25:11 +08:00
|
|
|
[AC_FATAL([Autoconf version $1 or higher is required for this script])])])
|
2000-03-20 18:35:53 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## ---------------- ##
|
|
|
|
## Initialization. ##
|
|
|
|
## ---------------- ##
|
|
|
|
|
|
|
|
|
2000-11-03 17:43:33 +08:00
|
|
|
# All the following macros are used by AC_INIT. Ideally, they should
|
|
|
|
# be presented in the order in which they are output. Please, help us
|
|
|
|
# sorting it, or at least, don't augment the entropy.
|
|
|
|
|
|
|
|
|
|
|
|
# _AC_INIT_NOTICE
|
|
|
|
# ---------------
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_INIT_NOTICE],
|
2000-11-23 17:46:48 +08:00
|
|
|
[m4_divert_text([NOTICE],
|
2000-11-03 17:43:33 +08:00
|
|
|
[@%:@ Guess values for system-dependent variables and create Makefiles.
|
|
|
|
@%:@ Generated by Autoconf AC_ACVERSION[]dnl
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).])
|
2000-11-03 17:43:33 +08:00
|
|
|
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifset([AC_PACKAGE_BUGREPORT],
|
|
|
|
[m4_divert_text([NOTICE],
|
|
|
|
[@%:@
|
2000-11-03 17:43:33 +08:00
|
|
|
@%:@ Report bugs to <AC_PACKAGE_BUGREPORT>.])])
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
# _AC_INIT_COPYRIGHT
|
|
|
|
# ------------------
|
2001-06-06 16:49:33 +08:00
|
|
|
# We dump to VERSION_FSF to make sure we are inserted before the
|
|
|
|
# user copyrights, and after the setup of the --version handling.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_INIT_COPYRIGHT],
|
2000-11-03 17:43:33 +08:00
|
|
|
[AC_COPYRIGHT(
|
2001-02-06 01:33:00 +08:00
|
|
|
[Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
|
2000-11-03 17:43:33 +08:00
|
|
|
Free Software Foundation, Inc.
|
|
|
|
This configure script is free software; the Free Software Foundation
|
2001-06-06 16:49:33 +08:00
|
|
|
gives unlimited permission to copy, distribute and modify it.],
|
|
|
|
[VERSION_FSF])dnl
|
2000-11-03 17:43:33 +08:00
|
|
|
])
|
|
|
|
|
|
|
|
|
2001-04-18 18:47:32 +08:00
|
|
|
# File Descriptors
|
|
|
|
# ----------------
|
2000-11-03 18:07:40 +08:00
|
|
|
# Set up the file descriptors used by `configure'.
|
2001-04-18 18:47:32 +08:00
|
|
|
# File descriptor usage:
|
|
|
|
# 0 standard input
|
|
|
|
# 1 file creation
|
|
|
|
# 2 errors and warnings
|
|
|
|
# AS_MESSAGE_LOG_FD compiler messages saved in config.log
|
|
|
|
# AS_MESSAGE_FD checking for... messages and results
|
2000-11-03 18:07:40 +08:00
|
|
|
|
Move AC_MSG_* into M4sh.
* acgeneral.m4 (_AC_SH_QUOTE, _AC_SH_QUOTE_IFELSE, _AC_ECHO): Move
to...
* m4sh.m4 (_AS_QUOTE, _AS_QUOTE_IFELSE, _AS_ECHO): here.
(AS_MESSAGE, AS_WARN, AS_ERROR): New.
* acgeneral.m4 (AC_MSG_NOTICE, AC_MSG_WARN, AC_MSG_ERROR): Use them.
(AC_FD_MSG, AC_FD_LOG): Be AU_ALIAS'es of...
(AS_MESSAGE_FD, AS_MESSAGE_LOG_FD): new.
Adjust all dependencies.
2000-11-14 18:11:43 +08:00
|
|
|
m4_define([AS_MESSAGE_FD], 6)
|
2001-01-16 18:45:22 +08:00
|
|
|
# That's how they used to be named.
|
Move AC_MSG_* into M4sh.
* acgeneral.m4 (_AC_SH_QUOTE, _AC_SH_QUOTE_IFELSE, _AC_ECHO): Move
to...
* m4sh.m4 (_AS_QUOTE, _AS_QUOTE_IFELSE, _AS_ECHO): here.
(AS_MESSAGE, AS_WARN, AS_ERROR): New.
* acgeneral.m4 (AC_MSG_NOTICE, AC_MSG_WARN, AC_MSG_ERROR): Use them.
(AC_FD_MSG, AC_FD_LOG): Be AU_ALIAS'es of...
(AS_MESSAGE_FD, AS_MESSAGE_LOG_FD): new.
Adjust all dependencies.
2000-11-14 18:11:43 +08:00
|
|
|
AU_ALIAS([AC_FD_CC], [AS_MESSAGE_LOG_FD])
|
|
|
|
AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD])
|
2000-11-03 18:07:40 +08:00
|
|
|
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
|
|
|
|
# _AC_INIT_DEFAULTS
|
|
|
|
# -----------------
|
2001-01-12 17:19:59 +08:00
|
|
|
# Values which defaults can be set from `configure.ac'.
|
2000-11-18 01:09:35 +08:00
|
|
|
# `/bin/machine' is used in `glibcbug'. The others are used in config.*
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
m4_define([_AC_INIT_DEFAULTS],
|
|
|
|
[m4_divert_push([DEFAULTS])dnl
|
2000-11-03 18:07:40 +08:00
|
|
|
|
2000-11-14 19:01:44 +08:00
|
|
|
AS_SHELL_SANITIZE
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
|
2000-12-12 18:53:41 +08:00
|
|
|
# Name of the host.
|
|
|
|
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
|
|
|
|
# so uname gets run too.
|
|
|
|
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
|
|
|
|
|
2001-04-18 18:47:32 +08:00
|
|
|
exec AS_MESSAGE_FD>&1
|
2000-11-03 18:07:40 +08:00
|
|
|
|
2000-03-21 19:13:50 +08:00
|
|
|
#
|
|
|
|
# Initializations.
|
|
|
|
#
|
1994-10-19 08:29:13 +08:00
|
|
|
ac_default_prefix=/usr/local
|
2000-05-22 16:38:44 +08:00
|
|
|
cross_compiling=no
|
2000-03-21 19:13:50 +08:00
|
|
|
subdirs=
|
|
|
|
MFLAGS= MAKEFLAGS=
|
|
|
|
AC_SUBST(SHELL, ${CONFIG_SHELL-/bin/sh})dnl
|
2000-10-25 00:54:48 +08:00
|
|
|
|
2000-03-21 19:13:50 +08:00
|
|
|
# Maximum number of lines to put in a shell here document.
|
2000-07-12 16:45:32 +08:00
|
|
|
# This variable seems obsolete. It should probably be removed, and
|
|
|
|
# only ac_max_sed_lines should be used.
|
|
|
|
: ${ac_max_here_lines=38}
|
2000-10-25 00:54:48 +08:00
|
|
|
|
2001-01-18 17:16:08 +08:00
|
|
|
m4_divert_pop([DEFAULTS])dnl
|
2000-03-08 19:15:14 +08:00
|
|
|
])# _AC_INIT_DEFAULTS
|
1994-10-19 08:29:13 +08:00
|
|
|
|
2000-01-14 23:19:19 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_PREFIX_DEFAULT(PREFIX)
|
|
|
|
# -------------------------
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_PREFIX_DEFAULT],
|
2000-11-23 17:46:48 +08:00
|
|
|
[m4_divert_text([DEFAULTS], [ac_default_prefix=$1])])
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-01-14 23:19:19 +08:00
|
|
|
|
2000-03-21 20:33:37 +08:00
|
|
|
# AC_CONFIG_SRCDIR([UNIQUE-FILE-IN-SOURCE-DIR])
|
|
|
|
# ---------------------------------------------
|
|
|
|
# UNIQUE-FILE-IN-SOURCE-DIR is a filename unique to this package,
|
|
|
|
# relative to the directory that configure is in, which we can look
|
|
|
|
# for to find out if srcdir is correct.
|
|
|
|
AC_DEFUN([AC_CONFIG_SRCDIR],
|
2000-11-23 17:46:48 +08:00
|
|
|
[m4_divert_text([DEFAULTS], [ac_unique_file="$1"])])
|
2000-03-21 20:33:37 +08:00
|
|
|
|
|
|
|
|
|
|
|
# _AC_INIT_SRCDIR
|
|
|
|
# ---------------
|
|
|
|
# Compute `srcdir' based on `$ac_unique_file'.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_INIT_SRCDIR],
|
2000-10-31 03:01:24 +08:00
|
|
|
[m4_divert_push([PARSE_ARGS])dnl
|
2000-03-21 18:01:40 +08:00
|
|
|
|
|
|
|
# Find the source files, if location was not specified.
|
|
|
|
if test -z "$srcdir"; then
|
|
|
|
ac_srcdir_defaulted=yes
|
|
|
|
# Try the directory containing this script, then its parent.
|
2000-05-19 21:07:13 +08:00
|
|
|
ac_prog=$[0]
|
2001-04-19 00:49:11 +08:00
|
|
|
dnl FIXME: should use AS_DIRNAME here once it is made DOS-friendly.
|
|
|
|
ac_confdir=`echo "$ac_prog" | sed 's%[[\\/][^\\/][^\\/]]*$%%'`
|
2000-03-21 18:01:40 +08:00
|
|
|
test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
|
|
|
|
srcdir=$ac_confdir
|
2000-03-21 20:33:37 +08:00
|
|
|
if test ! -r $srcdir/$ac_unique_file; then
|
2000-03-21 18:01:40 +08:00
|
|
|
srcdir=..
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
ac_srcdir_defaulted=no
|
|
|
|
fi
|
2000-03-21 20:33:37 +08:00
|
|
|
if test ! -r $srcdir/$ac_unique_file; then
|
2000-03-21 18:01:40 +08:00
|
|
|
if test "$ac_srcdir_defaulted" = yes; then
|
2000-11-11 13:59:21 +08:00
|
|
|
AC_MSG_ERROR([cannot find sources in $ac_confdir or ..])
|
2000-03-21 18:01:40 +08:00
|
|
|
else
|
2000-11-11 13:59:21 +08:00
|
|
|
AC_MSG_ERROR([cannot find sources in $srcdir])
|
2000-03-21 18:01:40 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
dnl Double slashes in pathnames in object file debugging info
|
|
|
|
dnl mess up M-x gdb in Emacs.
|
2001-04-19 00:49:11 +08:00
|
|
|
srcdir=`echo "$srcdir" | sed 's%\([[^\\/]]\)[[\\/]]*$%\1%'`
|
2001-01-18 17:16:08 +08:00
|
|
|
m4_divert_pop([PARSE_ARGS])dnl
|
2000-03-21 18:01:40 +08:00
|
|
|
])# _AC_INIT_SRCDIR
|
|
|
|
|
|
|
|
|
2000-03-08 19:03:33 +08:00
|
|
|
# _AC_INIT_PARSE_ARGS
|
|
|
|
# -------------------
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_INIT_PARSE_ARGS],
|
2000-10-31 03:01:24 +08:00
|
|
|
[m4_divert_push([PARSE_ARGS])dnl
|
2000-03-14 16:09:32 +08:00
|
|
|
|
1994-03-27 13:44:01 +08:00
|
|
|
# Initialize some variables set by options.
|
2000-03-24 02:10:42 +08:00
|
|
|
ac_init_help=
|
2000-03-08 19:03:33 +08:00
|
|
|
ac_init_version=false
|
1994-04-10 05:34:23 +08:00
|
|
|
# The variables have the same names as the options, with
|
|
|
|
# dashes changed to underlines.
|
2000-04-05 15:42:06 +08:00
|
|
|
cache_file=/dev/null
|
2000-03-14 16:09:32 +08:00
|
|
|
AC_SUBST(exec_prefix, NONE)dnl
|
1994-04-10 05:34:23 +08:00
|
|
|
no_create=
|
1994-09-06 04:12:21 +08:00
|
|
|
no_recursion=
|
2000-03-14 16:09:32 +08:00
|
|
|
AC_SUBST(prefix, NONE)dnl
|
1994-09-07 11:06:34 +08:00
|
|
|
program_prefix=NONE
|
|
|
|
program_suffix=NONE
|
2000-03-14 16:09:32 +08:00
|
|
|
AC_SUBST(program_transform_name, [s,x,x,])dnl
|
1994-04-10 05:34:23 +08:00
|
|
|
silent=
|
1994-10-20 20:52:36 +08:00
|
|
|
site=
|
1994-03-27 13:44:01 +08:00
|
|
|
srcdir=
|
1994-04-10 05:34:23 +08:00
|
|
|
verbose=
|
1994-08-23 23:04:53 +08:00
|
|
|
x_includes=NONE
|
2000-03-14 16:09:32 +08:00
|
|
|
x_libraries=NONE
|
2001-01-16 18:25:57 +08:00
|
|
|
|
|
|
|
# Installation directory options.
|
|
|
|
# These are left unexpanded so users can "make install exec_prefix=/foo"
|
|
|
|
# and all the variables that are supposed to be based on exec_prefix
|
|
|
|
# by default will actually change.
|
|
|
|
# Use braces instead of parens because sh, perl, etc. also accept them.
|
|
|
|
AC_SUBST([bindir], ['${exec_prefix}/bin'])dnl
|
|
|
|
AC_SUBST([sbindir], ['${exec_prefix}/sbin'])dnl
|
|
|
|
AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])dnl
|
|
|
|
AC_SUBST([datadir], ['${prefix}/share'])dnl
|
|
|
|
AC_SUBST([sysconfdir], ['${prefix}/etc'])dnl
|
|
|
|
AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl
|
|
|
|
AC_SUBST([localstatedir], ['${prefix}/var'])dnl
|
|
|
|
AC_SUBST([libdir], ['${exec_prefix}/lib'])dnl
|
|
|
|
AC_SUBST([includedir], ['${prefix}/include'])dnl
|
|
|
|
AC_SUBST([oldincludedir], ['/usr/include'])dnl
|
|
|
|
AC_SUBST([infodir], ['${prefix}/info'])dnl
|
|
|
|
AC_SUBST([mandir], ['${prefix}/man'])dnl
|
|
|
|
|
|
|
|
# Identity of this package.
|
|
|
|
AC_SUBST([PACKAGE_NAME],
|
|
|
|
[m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])dnl
|
|
|
|
AC_SUBST([PACKAGE_TARNAME],
|
|
|
|
[m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])dnl
|
|
|
|
AC_SUBST([PACKAGE_VERSION],
|
|
|
|
[m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
|
|
|
AC_SUBST([PACKAGE_STRING],
|
|
|
|
[m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])dnl
|
|
|
|
AC_SUBST([PACKAGE_BUGREPORT],
|
|
|
|
[m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl
|
1994-03-27 13:44:01 +08:00
|
|
|
|
1994-03-29 07:48:26 +08:00
|
|
|
ac_prev=
|
|
|
|
for ac_option
|
1994-03-24 11:41:48 +08:00
|
|
|
do
|
1994-03-29 07:48:26 +08:00
|
|
|
# If the previous option needs an argument, assign it.
|
|
|
|
if test -n "$ac_prev"; then
|
|
|
|
eval "$ac_prev=\$ac_option"
|
|
|
|
ac_prev=
|
|
|
|
continue
|
|
|
|
fi
|
1994-03-26 14:32:34 +08:00
|
|
|
|
2000-06-26 18:21:29 +08:00
|
|
|
ac_optarg=`expr "x$ac_option" : 'x[[^=]]*=\(.*\)'`
|
1994-03-26 14:32:34 +08:00
|
|
|
|
1994-09-06 22:36:45 +08:00
|
|
|
# Accept the important Cygnus configure options, so we can diagnose typos.
|
(AC_OUTPUT): When doing substitutions on files, if
the file starts with "#!", put the "automatically generated"
comment on the second line instead of the first.
(AC_CONFIG_AUX, AC_CONFIG_AUX_DEFAULT,
AC_CONFIG_AUX_DIRS, AC_SYSTEM_TYPE, AC_HOST_TYPE, AC_TARGET_TYPE,
AC_BUILD_TYPE, AC_SUBST_FILE, AC_MAKE_LINKS, AC_OUTPUT_MAKE_LINKS,
AC_CONFIG_SUBDIRS): New macros.
(AC_OUTPUT_HEADER): For each file being created,
munge a copy of conftest.sed rather than the original.
From brook@trillium.botany.utexas.edu (Brook Milligan).
1994-04-30 09:44:39 +08:00
|
|
|
|
2000-05-26 23:02:42 +08:00
|
|
|
case $ac_option in
|
1994-03-29 07:48:26 +08:00
|
|
|
|
1995-06-28 03:09:03 +08:00
|
|
|
-bindir | --bindir | --bindi | --bind | --bin | --bi)
|
|
|
|
ac_prev=bindir ;;
|
|
|
|
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
bindir=$ac_optarg ;;
|
1995-06-28 03:09:03 +08:00
|
|
|
|
|
|
|
-build | --build | --buil | --bui | --bu)
|
The options --build etc. used to set `$build'. *If*
AC_CANONICAL_SYSTEM was run, then the value of `$build' given by
the user was saved into `$build_alias', and `$build' was
normalized using `config.sub'.
Now, let `--build' set `$build_alias' so that scripts with or
without `AC_CANONICAL_BUILD' have the same semantics. This allows
to use `AC_CHECK_TOOL' without requiring `config.guess' and
`config.sub' (which was bizarre anyway).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target
set `build_alias' etc.
After the option handling, set host to $host_alias etc. for
bugward compatibility.
(AC_CANONICALIZE): Mutate into...
(_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just
computes `$foo_os' etc.
(_AC_CANONICAL_THING): Remove, too confusing.
(AC_CANONICAL_BUILD): Adjust.
Do not assign any value to `build_alias', just compute `build', and
`build_{cpy, vendor, os}'.
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.
(AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is
given, not when `$host != $build'.
* acgeneral.m4 (sinclude): Fix typo.
2000-05-24 20:18:35 +08:00
|
|
|
ac_prev=build_alias ;;
|
1995-06-28 03:09:03 +08:00
|
|
|
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
|
The options --build etc. used to set `$build'. *If*
AC_CANONICAL_SYSTEM was run, then the value of `$build' given by
the user was saved into `$build_alias', and `$build' was
normalized using `config.sub'.
Now, let `--build' set `$build_alias' so that scripts with or
without `AC_CANONICAL_BUILD' have the same semantics. This allows
to use `AC_CHECK_TOOL' without requiring `config.guess' and
`config.sub' (which was bizarre anyway).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target
set `build_alias' etc.
After the option handling, set host to $host_alias etc. for
bugward compatibility.
(AC_CANONICALIZE): Mutate into...
(_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just
computes `$foo_os' etc.
(_AC_CANONICAL_THING): Remove, too confusing.
(AC_CANONICAL_BUILD): Adjust.
Do not assign any value to `build_alias', just compute `build', and
`build_{cpy, vendor, os}'.
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.
(AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is
given, not when `$host != $build'.
* acgeneral.m4 (sinclude): Fix typo.
2000-05-24 20:18:35 +08:00
|
|
|
build_alias=$ac_optarg ;;
|
1994-03-26 14:32:34 +08:00
|
|
|
|
1994-05-05 06:03:07 +08:00
|
|
|
-cache-file | --cache-file | --cache-fil | --cache-fi \
|
|
|
|
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
|
|
|
|
ac_prev=cache_file ;;
|
|
|
|
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
|
|
|
|
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
cache_file=$ac_optarg ;;
|
1994-05-05 06:03:07 +08:00
|
|
|
|
2000-05-22 21:31:00 +08:00
|
|
|
--config-cache | -C)
|
2000-07-04 18:34:21 +08:00
|
|
|
cache_file=config.cache ;;
|
2000-05-22 21:31:00 +08:00
|
|
|
|
1995-06-28 03:09:03 +08:00
|
|
|
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
|
|
|
|
ac_prev=datadir ;;
|
|
|
|
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
|
|
|
|
| --da=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
datadir=$ac_optarg ;;
|
1995-06-28 03:09:03 +08:00
|
|
|
|
1994-03-31 09:02:47 +08:00
|
|
|
-disable-* | --disable-*)
|
2000-06-26 18:21:29 +08:00
|
|
|
ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
|
1994-05-18 03:26:10 +08:00
|
|
|
# Reject names that are not valid shell variable names.
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
expr "x$ac_feature" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
|
2000-05-25 15:49:39 +08:00
|
|
|
AC_MSG_ERROR([invalid feature name: $ac_feature])
|
2000-05-19 20:20:41 +08:00
|
|
|
ac_feature=`echo $ac_feature | sed 's/-/_/g'`
|
|
|
|
eval "enable_$ac_feature=no" ;;
|
1994-03-31 09:02:47 +08:00
|
|
|
|
1994-03-26 14:32:34 +08:00
|
|
|
-enable-* | --enable-*)
|
2000-06-26 18:21:29 +08:00
|
|
|
ac_feature=`expr "x$ac_option" : 'x-*enable-\([[^=]]*\)'`
|
1994-05-18 03:26:10 +08:00
|
|
|
# Reject names that are not valid shell variable names.
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
expr "x$ac_feature" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
|
2000-05-25 15:49:39 +08:00
|
|
|
AC_MSG_ERROR([invalid feature name: $ac_feature])
|
2000-05-19 20:20:41 +08:00
|
|
|
ac_feature=`echo $ac_feature | sed 's/-/_/g'`
|
2000-05-26 23:02:42 +08:00
|
|
|
case $ac_option in
|
1999-10-30 22:17:20 +08:00
|
|
|
*=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
|
1994-03-26 14:32:34 +08:00
|
|
|
*) ac_optarg=yes ;;
|
|
|
|
esac
|
2000-05-19 20:20:41 +08:00
|
|
|
eval "enable_$ac_feature='$ac_optarg'" ;;
|
1994-03-24 11:41:48 +08:00
|
|
|
|
|
|
|
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
|
1994-03-26 14:32:34 +08:00
|
|
|
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
|
1994-03-29 07:48:26 +08:00
|
|
|
| --exec | --exe | --ex)
|
|
|
|
ac_prev=exec_prefix ;;
|
|
|
|
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
|
1994-03-26 14:32:34 +08:00
|
|
|
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
|
|
|
|
| --exec=* | --exe=* | --ex=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
exec_prefix=$ac_optarg ;;
|
1994-03-24 11:41:48 +08:00
|
|
|
|
1994-04-05 09:29:04 +08:00
|
|
|
-gas | --gas | --ga | --g)
|
1994-05-18 03:26:10 +08:00
|
|
|
# Obsolete; use --with-gas.
|
|
|
|
with_gas=yes ;;
|
1994-03-24 11:41:48 +08:00
|
|
|
|
2000-02-10 02:19:58 +08:00
|
|
|
-help | --help | --hel | --he | -h)
|
2000-03-24 02:10:42 +08:00
|
|
|
ac_init_help=long ;;
|
|
|
|
-help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
|
|
|
|
ac_init_help=recursive ;;
|
|
|
|
-help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
|
|
|
|
ac_init_help=short ;;
|
|
|
|
|
1994-03-29 07:48:26 +08:00
|
|
|
-host | --host | --hos | --ho)
|
The options --build etc. used to set `$build'. *If*
AC_CANONICAL_SYSTEM was run, then the value of `$build' given by
the user was saved into `$build_alias', and `$build' was
normalized using `config.sub'.
Now, let `--build' set `$build_alias' so that scripts with or
without `AC_CANONICAL_BUILD' have the same semantics. This allows
to use `AC_CHECK_TOOL' without requiring `config.guess' and
`config.sub' (which was bizarre anyway).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target
set `build_alias' etc.
After the option handling, set host to $host_alias etc. for
bugward compatibility.
(AC_CANONICALIZE): Mutate into...
(_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just
computes `$foo_os' etc.
(_AC_CANONICAL_THING): Remove, too confusing.
(AC_CANONICAL_BUILD): Adjust.
Do not assign any value to `build_alias', just compute `build', and
`build_{cpy, vendor, os}'.
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.
(AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is
given, not when `$host != $build'.
* acgeneral.m4 (sinclude): Fix typo.
2000-05-24 20:18:35 +08:00
|
|
|
ac_prev=host_alias ;;
|
1994-03-29 07:48:26 +08:00
|
|
|
-host=* | --host=* | --hos=* | --ho=*)
|
The options --build etc. used to set `$build'. *If*
AC_CANONICAL_SYSTEM was run, then the value of `$build' given by
the user was saved into `$build_alias', and `$build' was
normalized using `config.sub'.
Now, let `--build' set `$build_alias' so that scripts with or
without `AC_CANONICAL_BUILD' have the same semantics. This allows
to use `AC_CHECK_TOOL' without requiring `config.guess' and
`config.sub' (which was bizarre anyway).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target
set `build_alias' etc.
After the option handling, set host to $host_alias etc. for
bugward compatibility.
(AC_CANONICALIZE): Mutate into...
(_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just
computes `$foo_os' etc.
(_AC_CANONICAL_THING): Remove, too confusing.
(AC_CANONICAL_BUILD): Adjust.
Do not assign any value to `build_alias', just compute `build', and
`build_{cpy, vendor, os}'.
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.
(AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is
given, not when `$host != $build'.
* acgeneral.m4 (sinclude): Fix typo.
2000-05-24 20:18:35 +08:00
|
|
|
host_alias=$ac_optarg ;;
|
1994-03-24 11:41:48 +08:00
|
|
|
|
1995-06-28 03:09:03 +08:00
|
|
|
-includedir | --includedir | --includedi | --included | --include \
|
|
|
|
| --includ | --inclu | --incl | --inc)
|
|
|
|
ac_prev=includedir ;;
|
|
|
|
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
|
|
|
|
| --includ=* | --inclu=* | --incl=* | --inc=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
includedir=$ac_optarg ;;
|
1995-06-28 03:09:03 +08:00
|
|
|
|
|
|
|
-infodir | --infodir | --infodi | --infod | --info | --inf)
|
|
|
|
ac_prev=infodir ;;
|
|
|
|
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
infodir=$ac_optarg ;;
|
1995-06-28 03:09:03 +08:00
|
|
|
|
|
|
|
-libdir | --libdir | --libdi | --libd)
|
|
|
|
ac_prev=libdir ;;
|
|
|
|
-libdir=* | --libdir=* | --libdi=* | --libd=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
libdir=$ac_optarg ;;
|
1995-06-28 03:09:03 +08:00
|
|
|
|
|
|
|
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
|
|
|
|
| --libexe | --libex | --libe)
|
|
|
|
ac_prev=libexecdir ;;
|
|
|
|
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
|
|
|
|
| --libexe=* | --libex=* | --libe=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
libexecdir=$ac_optarg ;;
|
1995-06-28 03:09:03 +08:00
|
|
|
|
|
|
|
-localstatedir | --localstatedir | --localstatedi | --localstated \
|
|
|
|
| --localstate | --localstat | --localsta | --localst \
|
|
|
|
| --locals | --local | --loca | --loc | --lo)
|
|
|
|
ac_prev=localstatedir ;;
|
|
|
|
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
|
|
|
|
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
|
|
|
|
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
localstatedir=$ac_optarg ;;
|
1995-06-28 03:09:03 +08:00
|
|
|
|
|
|
|
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
|
|
|
|
ac_prev=mandir ;;
|
|
|
|
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
mandir=$ac_optarg ;;
|
1995-06-28 03:09:03 +08:00
|
|
|
|
1994-04-05 09:29:04 +08:00
|
|
|
-nfp | --nfp | --nf)
|
1994-05-18 03:26:10 +08:00
|
|
|
# Obsolete; use --without-fp.
|
|
|
|
with_fp=no ;;
|
1994-04-05 09:29:04 +08:00
|
|
|
|
|
|
|
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
|
|
|
|
| --no-cr | --no-c)
|
1994-04-10 05:34:23 +08:00
|
|
|
no_create=yes ;;
|
1994-03-24 11:41:48 +08:00
|
|
|
|
1994-09-06 04:12:21 +08:00
|
|
|
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
|
|
|
|
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
|
|
|
|
no_recursion=yes ;;
|
1994-03-26 14:32:34 +08:00
|
|
|
|
1995-06-28 03:09:03 +08:00
|
|
|
-oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
|
|
|
|
| --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
|
|
|
|
| --oldin | --oldi | --old | --ol | --o)
|
|
|
|
ac_prev=oldincludedir ;;
|
|
|
|
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
|
|
|
|
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
|
|
|
|
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
oldincludedir=$ac_optarg ;;
|
1995-06-28 03:09:03 +08:00
|
|
|
|
1994-03-29 07:48:26 +08:00
|
|
|
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
|
|
|
|
ac_prev=prefix ;;
|
|
|
|
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
prefix=$ac_optarg ;;
|
1994-03-24 11:41:48 +08:00
|
|
|
|
1994-03-26 14:32:34 +08:00
|
|
|
-program-prefix | --program-prefix | --program-prefi | --program-pref \
|
1994-03-29 07:48:26 +08:00
|
|
|
| --program-pre | --program-pr | --program-p)
|
|
|
|
ac_prev=program_prefix ;;
|
|
|
|
-program-prefix=* | --program-prefix=* | --program-prefi=* \
|
1994-03-26 14:32:34 +08:00
|
|
|
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
program_prefix=$ac_optarg ;;
|
1994-03-26 14:32:34 +08:00
|
|
|
|
|
|
|
-program-suffix | --program-suffix | --program-suffi | --program-suff \
|
1994-03-29 07:48:26 +08:00
|
|
|
| --program-suf | --program-su | --program-s)
|
|
|
|
ac_prev=program_suffix ;;
|
|
|
|
-program-suffix=* | --program-suffix=* | --program-suffi=* \
|
1994-03-26 14:32:34 +08:00
|
|
|
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
program_suffix=$ac_optarg ;;
|
1994-03-26 14:32:34 +08:00
|
|
|
|
|
|
|
-program-transform-name | --program-transform-name \
|
|
|
|
| --program-transform-nam | --program-transform-na \
|
|
|
|
| --program-transform-n | --program-transform- \
|
|
|
|
| --program-transform | --program-transfor \
|
|
|
|
| --program-transfo | --program-transf \
|
|
|
|
| --program-trans | --program-tran \
|
|
|
|
| --progr-tra | --program-tr | --program-t)
|
1994-03-29 07:48:26 +08:00
|
|
|
ac_prev=program_transform_name ;;
|
1994-03-26 14:32:34 +08:00
|
|
|
-program-transform-name=* | --program-transform-name=* \
|
|
|
|
| --program-transform-nam=* | --program-transform-na=* \
|
|
|
|
| --program-transform-n=* | --program-transform-=* \
|
|
|
|
| --program-transform=* | --program-transfor=* \
|
|
|
|
| --program-transfo=* | --program-transf=* \
|
|
|
|
| --program-trans=* | --program-tran=* \
|
|
|
|
| --progr-tra=* | --program-tr=* | --program-t=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
program_transform_name=$ac_optarg ;;
|
1994-03-26 14:32:34 +08:00
|
|
|
|
|
|
|
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
|
|
|
|
| -silent | --silent | --silen | --sile | --sil)
|
1994-04-10 05:34:23 +08:00
|
|
|
silent=yes ;;
|
1994-03-26 14:32:34 +08:00
|
|
|
|
1995-06-28 03:09:03 +08:00
|
|
|
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
|
|
|
|
ac_prev=sbindir ;;
|
|
|
|
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
|
|
|
|
| --sbi=* | --sb=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
sbindir=$ac_optarg ;;
|
1995-06-28 03:09:03 +08:00
|
|
|
|
|
|
|
-sharedstatedir | --sharedstatedir | --sharedstatedi \
|
|
|
|
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
|
|
|
|
| --sharedst | --shareds | --shared | --share | --shar \
|
|
|
|
| --sha | --sh)
|
|
|
|
ac_prev=sharedstatedir ;;
|
|
|
|
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
|
|
|
|
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
|
|
|
|
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
|
|
|
|
| --sha=* | --sh=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
sharedstatedir=$ac_optarg ;;
|
1995-06-28 03:09:03 +08:00
|
|
|
|
1994-10-20 20:52:36 +08:00
|
|
|
-site | --site | --sit)
|
|
|
|
ac_prev=site ;;
|
|
|
|
-site=* | --site=* | --sit=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
site=$ac_optarg ;;
|
1994-10-20 20:52:36 +08:00
|
|
|
|
1994-03-29 07:48:26 +08:00
|
|
|
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
|
|
|
|
ac_prev=srcdir ;;
|
|
|
|
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
srcdir=$ac_optarg ;;
|
1994-03-24 11:41:48 +08:00
|
|
|
|
1995-06-28 03:09:03 +08:00
|
|
|
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
|
|
|
|
| --syscon | --sysco | --sysc | --sys | --sy)
|
|
|
|
ac_prev=sysconfdir ;;
|
|
|
|
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
|
|
|
|
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
sysconfdir=$ac_optarg ;;
|
1995-06-28 03:09:03 +08:00
|
|
|
|
1994-03-29 07:48:26 +08:00
|
|
|
-target | --target | --targe | --targ | --tar | --ta | --t)
|
The options --build etc. used to set `$build'. *If*
AC_CANONICAL_SYSTEM was run, then the value of `$build' given by
the user was saved into `$build_alias', and `$build' was
normalized using `config.sub'.
Now, let `--build' set `$build_alias' so that scripts with or
without `AC_CANONICAL_BUILD' have the same semantics. This allows
to use `AC_CHECK_TOOL' without requiring `config.guess' and
`config.sub' (which was bizarre anyway).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target
set `build_alias' etc.
After the option handling, set host to $host_alias etc. for
bugward compatibility.
(AC_CANONICALIZE): Mutate into...
(_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just
computes `$foo_os' etc.
(_AC_CANONICAL_THING): Remove, too confusing.
(AC_CANONICAL_BUILD): Adjust.
Do not assign any value to `build_alias', just compute `build', and
`build_{cpy, vendor, os}'.
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.
(AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is
given, not when `$host != $build'.
* acgeneral.m4 (sinclude): Fix typo.
2000-05-24 20:18:35 +08:00
|
|
|
ac_prev=target_alias ;;
|
1994-03-29 07:48:26 +08:00
|
|
|
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
|
The options --build etc. used to set `$build'. *If*
AC_CANONICAL_SYSTEM was run, then the value of `$build' given by
the user was saved into `$build_alias', and `$build' was
normalized using `config.sub'.
Now, let `--build' set `$build_alias' so that scripts with or
without `AC_CANONICAL_BUILD' have the same semantics. This allows
to use `AC_CHECK_TOOL' without requiring `config.guess' and
`config.sub' (which was bizarre anyway).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target
set `build_alias' etc.
After the option handling, set host to $host_alias etc. for
bugward compatibility.
(AC_CANONICALIZE): Mutate into...
(_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just
computes `$foo_os' etc.
(_AC_CANONICAL_THING): Remove, too confusing.
(AC_CANONICAL_BUILD): Adjust.
Do not assign any value to `build_alias', just compute `build', and
`build_{cpy, vendor, os}'.
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.
(AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is
given, not when `$host != $build'.
* acgeneral.m4 (sinclude): Fix typo.
2000-05-24 20:18:35 +08:00
|
|
|
target_alias=$ac_optarg ;;
|
1994-03-24 11:41:48 +08:00
|
|
|
|
1994-03-26 14:32:34 +08:00
|
|
|
-v | -verbose | --verbose | --verbos | --verbo | --verb)
|
1994-04-10 05:34:23 +08:00
|
|
|
verbose=yes ;;
|
1994-03-26 14:32:34 +08:00
|
|
|
|
2000-03-03 02:17:26 +08:00
|
|
|
-version | --version | --versio | --versi | --vers | -V)
|
2000-03-08 19:03:33 +08:00
|
|
|
ac_init_version=: ;;
|
1994-03-26 14:32:34 +08:00
|
|
|
|
1994-03-24 11:41:48 +08:00
|
|
|
-with-* | --with-*)
|
2000-06-26 18:21:29 +08:00
|
|
|
ac_package=`expr "x$ac_option" : 'x-*with-\([[^=]]*\)'`
|
1994-05-18 03:26:10 +08:00
|
|
|
# Reject names that are not valid shell variable names.
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
|
2000-05-25 15:49:39 +08:00
|
|
|
AC_MSG_ERROR([invalid package name: $ac_package])
|
1994-03-24 11:41:48 +08:00
|
|
|
ac_package=`echo $ac_package| sed 's/-/_/g'`
|
2000-05-26 23:02:42 +08:00
|
|
|
case $ac_option in
|
1999-10-30 22:17:20 +08:00
|
|
|
*=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
|
1994-03-26 14:32:34 +08:00
|
|
|
*) ac_optarg=yes ;;
|
|
|
|
esac
|
2000-06-26 18:21:29 +08:00
|
|
|
eval "with_$ac_package='$ac_optarg'" ;;
|
1993-10-21 07:33:19 +08:00
|
|
|
|
1994-03-26 14:32:34 +08:00
|
|
|
-without-* | --without-*)
|
2000-06-26 18:21:29 +08:00
|
|
|
ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
|
1994-05-18 03:26:10 +08:00
|
|
|
# Reject names that are not valid shell variable names.
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
expr "x$ac_package" : "[.*[^-_$as_cr_alnum]]" >/dev/null &&
|
2000-05-25 15:49:39 +08:00
|
|
|
AC_MSG_ERROR([invalid package name: $ac_package])
|
2000-05-19 20:20:41 +08:00
|
|
|
ac_package=`echo $ac_package | sed 's/-/_/g'`
|
2000-06-26 18:21:29 +08:00
|
|
|
eval "with_$ac_package=no" ;;
|
1993-10-21 07:33:19 +08:00
|
|
|
|
1994-05-18 03:26:10 +08:00
|
|
|
--x)
|
|
|
|
# Obsolete; use --with-x.
|
|
|
|
with_x=yes ;;
|
1994-03-23 13:16:11 +08:00
|
|
|
|
1994-04-09 01:26:34 +08:00
|
|
|
-x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
|
|
|
|
| --x-incl | --x-inc | --x-in | --x-i)
|
|
|
|
ac_prev=x_includes ;;
|
|
|
|
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
|
|
|
|
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
x_includes=$ac_optarg ;;
|
1994-04-09 01:26:34 +08:00
|
|
|
|
|
|
|
-x-libraries | --x-libraries | --x-librarie | --x-librari \
|
|
|
|
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
|
|
|
|
ac_prev=x_libraries ;;
|
|
|
|
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
|
|
|
|
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
|
2000-04-11 20:00:13 +08:00
|
|
|
x_libraries=$ac_optarg ;;
|
1994-04-09 01:26:34 +08:00
|
|
|
|
2000-03-14 16:09:32 +08:00
|
|
|
-*) AC_MSG_ERROR([unrecognized option: $ac_option
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
Try `$[0] --help' for more information.])
|
1994-03-26 14:32:34 +08:00
|
|
|
;;
|
1994-03-20 05:46:09 +08:00
|
|
|
|
1999-10-30 22:17:20 +08:00
|
|
|
*=*)
|
2000-06-26 18:21:29 +08:00
|
|
|
ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='`
|
1999-10-30 22:17:20 +08:00
|
|
|
# Reject names that are not valid shell variable names.
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
expr "x$ac_envvar" : "[.*[^_$as_cr_alnum]]" >/dev/null &&
|
2000-05-25 15:49:39 +08:00
|
|
|
AC_MSG_ERROR([invalid variable name: $ac_envvar])
|
2000-02-10 02:24:24 +08:00
|
|
|
ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
|
|
|
|
eval "$ac_envvar='$ac_optarg'"
|
1999-10-30 22:17:20 +08:00
|
|
|
export $ac_envvar ;;
|
|
|
|
|
1995-11-18 04:05:32 +08:00
|
|
|
*)
|
2000-06-30 21:34:37 +08:00
|
|
|
# FIXME: should be removed in autoconf 3.0.
|
2000-05-03 17:53:55 +08:00
|
|
|
AC_MSG_WARN([you should use --build, --host, --target])
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
expr "x$ac_option" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
|
2000-05-25 15:49:39 +08:00
|
|
|
AC_MSG_WARN([invalid host type: $ac_option])
|
The options --build etc. used to set `$build'. *If*
AC_CANONICAL_SYSTEM was run, then the value of `$build' given by
the user was saved into `$build_alias', and `$build' was
normalized using `config.sub'.
Now, let `--build' set `$build_alias' so that scripts with or
without `AC_CANONICAL_BUILD' have the same semantics. This allows
to use `AC_CHECK_TOOL' without requiring `config.guess' and
`config.sub' (which was bizarre anyway).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target
set `build_alias' etc.
After the option handling, set host to $host_alias etc. for
bugward compatibility.
(AC_CANONICALIZE): Mutate into...
(_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just
computes `$foo_os' etc.
(_AC_CANONICAL_THING): Remove, too confusing.
(AC_CANONICAL_BUILD): Adjust.
Do not assign any value to `build_alias', just compute `build', and
`build_{cpy, vendor, os}'.
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.
(AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is
given, not when `$host != $build'.
* acgeneral.m4 (sinclude): Fix typo.
2000-05-24 20:18:35 +08:00
|
|
|
: ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
|
1994-03-24 11:41:48 +08:00
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
1993-10-21 07:33:19 +08:00
|
|
|
done
|
1994-03-29 07:48:26 +08:00
|
|
|
|
|
|
|
if test -n "$ac_prev"; then
|
2000-05-22 21:31:00 +08:00
|
|
|
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
|
2000-11-11 13:59:21 +08:00
|
|
|
AC_MSG_ERROR([missing argument to $ac_option])
|
1994-03-29 07:48:26 +08:00
|
|
|
fi
|
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): If any option waiting for a
directory receives a relative path, die (bindir, sbindir,
libexecdir, datadir, sysconfdir, sharedstatedir, localstatedir,
libdir, includedir, oldincludedir, infodir, mandir, exec_prefix,
prefix). Fixes Autoconf 42.
2000-04-04 00:16:09 +08:00
|
|
|
|
2001-06-05 20:44:13 +08:00
|
|
|
# Be sure to have absolute paths.
|
|
|
|
for ac_var in exec_prefix prefix
|
|
|
|
do
|
|
|
|
eval ac_val=$`echo $ac_var`
|
|
|
|
case $ac_val in
|
|
|
|
[[\\/$]]* | ?:[[\\/]]* | NONE | '' ) ;;
|
|
|
|
*) AC_MSG_ERROR([expected an absolute path for --$ac_var: $ac_val]);;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): If any option waiting for a
directory receives a relative path, die (bindir, sbindir,
libexecdir, datadir, sysconfdir, sharedstatedir, localstatedir,
libdir, includedir, oldincludedir, infodir, mandir, exec_prefix,
prefix). Fixes Autoconf 42.
2000-04-04 00:16:09 +08:00
|
|
|
# Be sure to have absolute paths.
|
|
|
|
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
|
2001-06-05 20:44:13 +08:00
|
|
|
localstatedir libdir includedir oldincludedir infodir mandir
|
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): If any option waiting for a
directory receives a relative path, die (bindir, sbindir,
libexecdir, datadir, sysconfdir, sharedstatedir, localstatedir,
libdir, includedir, oldincludedir, infodir, mandir, exec_prefix,
prefix). Fixes Autoconf 42.
2000-04-04 00:16:09 +08:00
|
|
|
do
|
|
|
|
eval ac_val=$`echo $ac_var`
|
|
|
|
case $ac_val in
|
|
|
|
[[\\/$]]* | ?:[[\\/]]* ) ;;
|
|
|
|
*) AC_MSG_ERROR([expected an absolute path for --$ac_var: $ac_val]);;
|
|
|
|
esac
|
|
|
|
done
|
The options --build etc. used to set `$build'. *If*
AC_CANONICAL_SYSTEM was run, then the value of `$build' given by
the user was saved into `$build_alias', and `$build' was
normalized using `config.sub'.
Now, let `--build' set `$build_alias' so that scripts with or
without `AC_CANONICAL_BUILD' have the same semantics. This allows
to use `AC_CHECK_TOOL' without requiring `config.guess' and
`config.sub' (which was bizarre anyway).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target
set `build_alias' etc.
After the option handling, set host to $host_alias etc. for
bugward compatibility.
(AC_CANONICALIZE): Mutate into...
(_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just
computes `$foo_os' etc.
(_AC_CANONICAL_THING): Remove, too confusing.
(AC_CANONICAL_BUILD): Adjust.
Do not assign any value to `build_alias', just compute `build', and
`build_{cpy, vendor, os}'.
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.
(AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is
given, not when `$host != $build'.
* acgeneral.m4 (sinclude): Fix typo.
2000-05-24 20:18:35 +08:00
|
|
|
|
|
|
|
# There might be people who depend on the old broken behavior: `$host'
|
|
|
|
# used to hold the argument of --host etc.
|
|
|
|
build=$build_alias
|
|
|
|
host=$host_alias
|
|
|
|
target=$target_alias
|
|
|
|
|
2000-06-30 21:34:37 +08:00
|
|
|
# FIXME: should be removed in autoconf 3.0.
|
|
|
|
if test "x$host_alias" != x; then
|
|
|
|
if test "x$build_alias" = x; then
|
|
|
|
cross_compiling=maybe
|
2000-07-06 21:05:47 +08:00
|
|
|
AC_MSG_WARN([If you wanted to set the --build type, don't use --host.
|
|
|
|
If a cross compiler is detected then cross compile mode will be used.])
|
2000-06-30 21:34:37 +08:00
|
|
|
elif test "x$build_alias" != "x$host_alias"; then
|
|
|
|
cross_compiling=yes
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2000-05-26 22:41:17 +08:00
|
|
|
ac_tool_prefix=
|
|
|
|
test -n "$host_alias" && ac_tool_prefix=$host_alias-
|
2000-06-06 00:05:49 +08:00
|
|
|
|
2001-01-24 18:04:47 +08:00
|
|
|
test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null
|
|
|
|
|
2001-01-18 17:16:08 +08:00
|
|
|
m4_divert_pop([PARSE_ARGS])dnl
|
2000-03-08 21:22:42 +08:00
|
|
|
])# _AC_INIT_PARSE_ARGS
|
2000-03-08 19:03:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
# _AC_INIT_HELP
|
|
|
|
# -------------
|
|
|
|
# Handle the `configure --help' message.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_INIT_HELP],
|
2000-10-31 03:01:24 +08:00
|
|
|
[m4_divert_push([HELP_BEGIN])dnl
|
2000-03-21 18:01:40 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# Report the --help message.
|
|
|
|
#
|
2000-03-24 02:10:42 +08:00
|
|
|
if test "$ac_init_help" = "long"; then
|
2000-03-08 19:03:33 +08:00
|
|
|
# Omit some internal or obsolete options to make the list less imposing.
|
|
|
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
2000-04-12 19:50:57 +08:00
|
|
|
cat <<EOF
|
2000-11-29 18:09:44 +08:00
|
|
|
\`configure' configures m4_ifset([AC_PACKAGE_STRING],
|
2000-04-12 19:50:57 +08:00
|
|
|
[AC_PACKAGE_STRING],
|
|
|
|
[this package]) to adapt to many kinds of systems.
|
2000-03-08 19:03:33 +08:00
|
|
|
|
2000-05-03 17:53:55 +08:00
|
|
|
Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
|
2000-03-08 19:03:33 +08:00
|
|
|
|
2000-04-12 19:50:57 +08:00
|
|
|
[To assign environment variables (e.g., CC, CFLAGS...), specify them as
|
2000-07-19 17:08:13 +08:00
|
|
|
VAR=VALUE. See below for descriptions of some of the useful variables.
|
2000-03-08 19:03:33 +08:00
|
|
|
|
|
|
|
Defaults for the options are specified in brackets.
|
|
|
|
|
|
|
|
Configuration:
|
2000-04-12 19:50:57 +08:00
|
|
|
-h, --help display this help and exit
|
|
|
|
--help=short display options specific to this package
|
|
|
|
--help=recursive display the short help of all the included packages
|
|
|
|
-V, --version display version information and exit
|
|
|
|
-q, --quiet, --silent do not print \`checking...' messages
|
2000-04-05 15:42:06 +08:00
|
|
|
--cache-file=FILE cache test results in FILE [disabled]
|
2000-07-04 18:34:21 +08:00
|
|
|
-C, --config-cache alias for \`--cache-file=config.cache'
|
2000-03-08 19:03:33 +08:00
|
|
|
-n, --no-create do not create output files
|
2000-05-03 17:53:55 +08:00
|
|
|
--srcdir=DIR find the sources in DIR [configure dir or \`..']
|
2000-03-08 19:03:33 +08:00
|
|
|
|
2000-03-08 19:04:55 +08:00
|
|
|
EOF
|
|
|
|
|
|
|
|
cat <<EOF
|
2000-04-12 19:50:57 +08:00
|
|
|
Installation directories:
|
2000-03-08 19:03:33 +08:00
|
|
|
--prefix=PREFIX install architecture-independent files in PREFIX
|
|
|
|
[$ac_default_prefix]
|
|
|
|
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
|
2000-04-12 19:50:57 +08:00
|
|
|
[PREFIX]
|
|
|
|
|
|
|
|
By default, \`make install' will install all the files in
|
|
|
|
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
|
|
|
|
an installation prefix other than \`$ac_default_prefix' using \`--prefix',
|
|
|
|
for instance \`--prefix=\$HOME'.
|
|
|
|
|
|
|
|
For better control, use the options below.
|
|
|
|
|
|
|
|
Fine tuning of the installation directories:
|
|
|
|
--bindir=DIR user executables [EPREFIX/bin]
|
|
|
|
--sbindir=DIR system admin executables [EPREFIX/sbin]
|
|
|
|
--libexecdir=DIR program executables [EPREFIX/libexec]
|
|
|
|
--datadir=DIR read-only architecture-independent data [PREFIX/share]
|
|
|
|
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
|
|
|
|
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
|
|
|
|
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
|
|
|
|
--libdir=DIR object code libraries [EPREFIX/lib]
|
|
|
|
--includedir=DIR C header files [PREFIX/include]
|
|
|
|
--oldincludedir=DIR C header files for non-gcc [/usr/include]
|
|
|
|
--infodir=DIR info documentation [PREFIX/info]
|
|
|
|
--mandir=DIR man documentation [PREFIX/man]
|
2000-03-08 19:04:55 +08:00
|
|
|
EOF
|
|
|
|
|
No longer rely on /bin/sh to compose the optional parts of
`configure --help'.
* acgeneral.m4 (AC_DIVERSION_HELP_BEGIN, AC_DIVERSION_HELP_ENABLE,
AC_DIVERSION_HELP_WITH, AC_DIVERSION_HELP_VAR,
AC_DIVERSION_HELP_END): New diversion numbers.
(AC_EXPAND_ONCE): New macro.
(AC_PROVIDE_IF): New macro.
(AC_BEFORE, AC_REQUIRE): Use it.
(AC_REQUIRE): Don't use indir.
(_AC_ARG_ENABLE_HELP_PROLOGUE, _AC_ARG_WITH_HELP_PROLOGUE,
_AC_ARG_VAR_HELP_PROLOGUE): New macros.
(AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): Expand once the
_HELP_PROLOGUE macro which corresponds.
(_AC_INIT_HELP): Adjust to AC_DIVERSION_HELP_BEGIN and
AC_DIVERSION_HELP_END.
(_AC_INIT_NOTICE, _AC_INIT_HELP): Remove the sh code which handled
the optional help strings.
2000-03-08 19:08:29 +08:00
|
|
|
cat <<\EOF]
|
2001-01-18 17:16:08 +08:00
|
|
|
m4_divert_pop([HELP_BEGIN])dnl
|
2000-04-12 19:50:57 +08:00
|
|
|
dnl The order of the diversions here is
|
2000-05-03 17:53:55 +08:00
|
|
|
dnl - HELP_BEGIN
|
|
|
|
dnl which may be prolongated by extra generic options such as with X or
|
|
|
|
dnl AC_ARG_PROGRAM. Displayed only in long --help.
|
|
|
|
dnl
|
|
|
|
dnl - HELP_CANON
|
|
|
|
dnl Support for cross compilation (--build, --host and --target).
|
|
|
|
dnl Display only in long --help.
|
|
|
|
dnl
|
|
|
|
dnl - HELP_ENABLE
|
|
|
|
dnl which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
|
|
|
|
dnl then implements the header of the non generic options.
|
|
|
|
dnl
|
|
|
|
dnl - HELP_WITH
|
|
|
|
dnl
|
|
|
|
dnl - HELP_VAR
|
|
|
|
dnl
|
2000-07-19 17:08:13 +08:00
|
|
|
dnl - HELP_VAR_END
|
|
|
|
dnl
|
2000-05-03 17:53:55 +08:00
|
|
|
dnl - HELP_END
|
|
|
|
dnl initialized below, in which we dump the trailer (handling of the
|
|
|
|
dnl recursion for instance).
|
2000-10-31 03:01:24 +08:00
|
|
|
m4_divert_push([HELP_ENABLE])dnl
|
2000-03-24 02:10:42 +08:00
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -n "$ac_init_help"; then
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifset([AC_PACKAGE_STRING],
|
2000-05-26 23:02:42 +08:00
|
|
|
[ case $ac_init_help in
|
2000-04-12 19:50:57 +08:00
|
|
|
short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";;
|
|
|
|
esac])
|
2000-03-24 02:10:42 +08:00
|
|
|
cat <<\EOF
|
2001-01-18 17:16:08 +08:00
|
|
|
m4_divert_pop([HELP_ENABLE])dnl
|
2000-10-31 03:01:24 +08:00
|
|
|
m4_divert_push([HELP_END])dnl
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifset([AC_PACKAGE_BUGREPORT], [
|
2000-08-01 16:17:07 +08:00
|
|
|
Report bugs to <AC_PACKAGE_BUGREPORT>.])
|
No longer rely on /bin/sh to compose the optional parts of
`configure --help'.
* acgeneral.m4 (AC_DIVERSION_HELP_BEGIN, AC_DIVERSION_HELP_ENABLE,
AC_DIVERSION_HELP_WITH, AC_DIVERSION_HELP_VAR,
AC_DIVERSION_HELP_END): New diversion numbers.
(AC_EXPAND_ONCE): New macro.
(AC_PROVIDE_IF): New macro.
(AC_BEFORE, AC_REQUIRE): Use it.
(AC_REQUIRE): Don't use indir.
(_AC_ARG_ENABLE_HELP_PROLOGUE, _AC_ARG_WITH_HELP_PROLOGUE,
_AC_ARG_VAR_HELP_PROLOGUE): New macros.
(AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): Expand once the
_HELP_PROLOGUE macro which corresponds.
(_AC_INIT_HELP): Adjust to AC_DIVERSION_HELP_BEGIN and
AC_DIVERSION_HELP_END.
(_AC_INIT_NOTICE, _AC_INIT_HELP): Remove the sh code which handled
the optional help strings.
2000-03-08 19:08:29 +08:00
|
|
|
EOF
|
|
|
|
fi
|
2000-03-24 02:10:42 +08:00
|
|
|
|
|
|
|
if test "$ac_init_help" = "recursive"; then
|
|
|
|
# If there are subdirs, report their specific --help.
|
|
|
|
ac_popdir=`pwd`
|
2000-05-12 00:56:13 +08:00
|
|
|
for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
|
2000-03-24 02:10:42 +08:00
|
|
|
cd $ac_subdir
|
|
|
|
# A "../" for each directory in /$ac_subdir.
|
|
|
|
ac_dots=`echo $ac_subdir |
|
2000-07-10 16:43:55 +08:00
|
|
|
sed 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g'`
|
2000-03-24 02:10:42 +08:00
|
|
|
|
2000-05-26 23:02:42 +08:00
|
|
|
case $srcdir in
|
2000-03-24 02:10:42 +08:00
|
|
|
.) # No --srcdir option. We are building in place.
|
|
|
|
ac_sub_srcdir=$srcdir ;;
|
2000-03-28 22:48:56 +08:00
|
|
|
[[\\/]]* | ?:[[\\/]]* ) # Absolute path.
|
2000-03-24 02:10:42 +08:00
|
|
|
ac_sub_srcdir=$srcdir/$ac_subdir ;;
|
|
|
|
*) # Relative path.
|
|
|
|
ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Check for guested configure; otherwise get Cygnus style configure.
|
2000-09-18 19:05:41 +08:00
|
|
|
if test -f $ac_sub_srcdir/configure.gnu; then
|
|
|
|
echo
|
|
|
|
$SHELL $ac_sub_srcdir/configure.gnu --help=recursive
|
|
|
|
elif test -f $ac_sub_srcdir/configure; then
|
2000-03-24 02:10:42 +08:00
|
|
|
echo
|
|
|
|
$SHELL $ac_sub_srcdir/configure --help=recursive
|
2001-01-12 17:19:59 +08:00
|
|
|
elif test -f $ac_sub_srcdir/configure.ac ||
|
|
|
|
test -f $ac_sub_srcdir/configure.in; then
|
2000-03-24 02:10:42 +08:00
|
|
|
echo
|
|
|
|
$ac_configure --help
|
|
|
|
else
|
|
|
|
AC_MSG_WARN([no configuration information is in $ac_subdir])
|
|
|
|
fi
|
|
|
|
cd $ac_popdir
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
test -n "$ac_init_help" && exit 0
|
2001-01-18 17:16:08 +08:00
|
|
|
m4_divert_pop([HELP_END])dnl
|
No longer rely on /bin/sh to compose the optional parts of
`configure --help'.
* acgeneral.m4 (AC_DIVERSION_HELP_BEGIN, AC_DIVERSION_HELP_ENABLE,
AC_DIVERSION_HELP_WITH, AC_DIVERSION_HELP_VAR,
AC_DIVERSION_HELP_END): New diversion numbers.
(AC_EXPAND_ONCE): New macro.
(AC_PROVIDE_IF): New macro.
(AC_BEFORE, AC_REQUIRE): Use it.
(AC_REQUIRE): Don't use indir.
(_AC_ARG_ENABLE_HELP_PROLOGUE, _AC_ARG_WITH_HELP_PROLOGUE,
_AC_ARG_VAR_HELP_PROLOGUE): New macros.
(AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): Expand once the
_HELP_PROLOGUE macro which corresponds.
(_AC_INIT_HELP): Adjust to AC_DIVERSION_HELP_BEGIN and
AC_DIVERSION_HELP_END.
(_AC_INIT_NOTICE, _AC_INIT_HELP): Remove the sh code which handled
the optional help strings.
2000-03-08 19:08:29 +08:00
|
|
|
])# _AC_INIT_HELP
|
2000-03-08 19:03:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
# _AC_INIT_VERSION
|
|
|
|
# ----------------
|
|
|
|
# Handle the `configure --version' message.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_INIT_VERSION],
|
2000-11-23 17:46:48 +08:00
|
|
|
[m4_divert_text([VERSION_BEGIN],
|
2000-03-14 16:33:21 +08:00
|
|
|
[if $ac_init_version; then
|
|
|
|
cat <<\EOF])dnl
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifset([AC_PACKAGE_STRING],
|
|
|
|
[m4_divert_text([VERSION_BEGIN],
|
2001-04-17 04:13:54 +08:00
|
|
|
[dnl
|
|
|
|
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl
|
|
|
|
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
|
2001-04-04 20:52:29 +08:00
|
|
|
generated by GNU Autoconf AC_ACVERSION])])
|
2000-11-23 17:46:48 +08:00
|
|
|
m4_divert_text([VERSION_END],
|
2000-03-14 16:33:21 +08:00
|
|
|
[EOF
|
2000-03-08 19:03:33 +08:00
|
|
|
exit 0
|
2000-03-14 16:33:21 +08:00
|
|
|
fi])dnl
|
2000-03-08 21:22:42 +08:00
|
|
|
])# _AC_INIT_VERSION
|
1999-12-20 21:52:57 +08:00
|
|
|
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2001-04-04 23:50:38 +08:00
|
|
|
# _AC_INIT_CONFIG_LOG
|
|
|
|
# -------------------
|
|
|
|
# Initialize the config.log file descriptor and write header to it.
|
|
|
|
m4_define([_AC_INIT_CONFIG_LOG],
|
|
|
|
[m4_divert_text([INIT_PREPARE],
|
2001-04-18 18:47:32 +08:00
|
|
|
[m4_define([AS_MESSAGE_LOG_FD], 5)dnl
|
|
|
|
exec AS_MESSAGE_LOG_FD>config.log
|
|
|
|
cat >&AS_MESSAGE_LOG_FD <<EOF
|
2001-04-04 23:50:38 +08:00
|
|
|
This file contains any messages produced by compilers while
|
|
|
|
running configure, to aid debugging if configure makes a mistake.
|
|
|
|
|
|
|
|
It was created by m4_ifset([AC_PACKAGE_NAME],
|
|
|
|
[AC_PACKAGE_NAME ])dnl
|
|
|
|
$as_me[]m4_ifset([AC_PACKAGE_VERSION],
|
|
|
|
[ AC_PACKAGE_VERSION]), which was
|
|
|
|
generated by GNU Autoconf AC_ACVERSION. Invocation command line was
|
|
|
|
|
|
|
|
$ $[0] $[@]
|
|
|
|
|
|
|
|
EOF
|
2001-04-18 18:47:32 +08:00
|
|
|
AS_UNAME >&AS_MESSAGE_LOG_FD
|
2001-04-04 23:50:38 +08:00
|
|
|
|
2001-04-18 18:47:32 +08:00
|
|
|
cat >&AS_MESSAGE_LOG_FD <<EOF
|
2001-04-04 23:50:38 +08:00
|
|
|
## ------------ ##
|
|
|
|
## Core tests. ##
|
|
|
|
## ------------ ##
|
|
|
|
|
|
|
|
EOF
|
|
|
|
])])# _AC_INIT_CONFIG_LOG
|
|
|
|
|
2001-02-06 01:33:00 +08:00
|
|
|
# _AC_INIT_PREPARE_FS_SEPARATORS
|
|
|
|
# ------------------------------
|
|
|
|
# Compute the directory and path separators.
|
|
|
|
# FIXME: Full version should include dir separator, documentation about
|
|
|
|
# AC_SUBST'ed variables etc.
|
|
|
|
m4_define([_AC_INIT_PREPARE_FS_SEPARATORS],
|
|
|
|
[echo "#! $SHELL" >conftest.sh
|
|
|
|
echo "exit 0" >>conftest.sh
|
|
|
|
chmod +x conftest.sh
|
2001-02-28 16:45:55 +08:00
|
|
|
if AC_RUN_LOG([PATH=".;."; conftest.sh]); then
|
2001-02-06 01:33:00 +08:00
|
|
|
ac_path_separator=';'
|
|
|
|
else
|
|
|
|
ac_path_separator=:
|
|
|
|
fi
|
|
|
|
AC_SUBST([PATH_SEPARATOR], "$ac_path_separator")dnl
|
|
|
|
rm -f conftest.sh
|
|
|
|
])
|
|
|
|
|
|
|
|
|
2000-03-21 18:01:40 +08:00
|
|
|
# _AC_INIT_PREPARE
|
|
|
|
# ----------------
|
2000-02-08 02:03:54 +08:00
|
|
|
# Called by AC_INIT to build the preamble of the `configure' scripts.
|
|
|
|
# 1. Trap and clean up various tmp files.
|
|
|
|
# 2. Set up the fd and output files
|
|
|
|
# 3. Remember the options given to `configure' for `config.status --recheck'.
|
|
|
|
# 4. Ensure a correct environment
|
2000-03-21 18:01:40 +08:00
|
|
|
# 5. Required macros (cache, default AC_SUBST etc.)
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_INIT_PREPARE],
|
2000-10-31 03:01:24 +08:00
|
|
|
[m4_divert_push([INIT_PREPARE])dnl
|
2000-03-17 16:37:50 +08:00
|
|
|
|
2000-03-14 16:37:27 +08:00
|
|
|
# Keep a trace of the command line.
|
|
|
|
# Strip out --no-create and --no-recursion so they do not pile up.
|
|
|
|
# Also quote any args containing shell meta-characters.
|
|
|
|
ac_configure_args=
|
2000-05-09 17:45:04 +08:00
|
|
|
ac_sep=
|
2000-03-14 16:37:27 +08:00
|
|
|
for ac_arg
|
|
|
|
do
|
2000-05-26 23:02:42 +08:00
|
|
|
case $ac_arg in
|
2000-03-14 16:37:27 +08:00
|
|
|
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
|
|
|
|
| --no-cr | --no-c) ;;
|
|
|
|
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
|
|
|
|
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
|
|
|
|
dnl 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.
|
|
|
|
[ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)]
|
2000-05-09 17:45:04 +08:00
|
|
|
ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
|
|
|
|
ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
|
|
|
|
ac_sep=" " ;;
|
|
|
|
*) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
|
|
|
|
ac_sep=" " ;;
|
2000-03-14 16:37:27 +08:00
|
|
|
esac
|
2000-05-09 17:45:04 +08:00
|
|
|
# Get rid of the leading space.
|
2000-03-14 16:37:27 +08:00
|
|
|
done
|
|
|
|
|
2000-10-25 00:37:14 +08:00
|
|
|
# When interrupted or exit'd, cleanup temporary files, and complete
|
2001-01-22 16:58:47 +08:00
|
|
|
# config.log. We remove comments because anyway the quotes in there
|
|
|
|
# would cause problems or look ugly.
|
2000-10-30 08:59:45 +08:00
|
|
|
trap 'exit_status=$?
|
2001-01-22 16:58:47 +08:00
|
|
|
# Save into config.log some information that might help in debugging.
|
|
|
|
echo >&AS_MESSAGE_LOG_FD
|
2001-01-23 17:49:33 +08:00
|
|
|
echo ["## ----------------- ##"] >&AS_MESSAGE_LOG_FD
|
|
|
|
echo ["## Cache variables. ##"] >&AS_MESSAGE_LOG_FD
|
|
|
|
echo ["## ----------------- ##"] >&AS_MESSAGE_LOG_FD
|
2001-01-22 16:58:47 +08:00
|
|
|
echo >&AS_MESSAGE_LOG_FD
|
|
|
|
m4_patsubst(m4_patsubst(m4_dquote(m4_defn([_AC_CACHE_DUMP])),
|
|
|
|
[^ *\(#.*\)?
|
|
|
|
]),
|
|
|
|
['], ['"'"']) >&AS_MESSAGE_LOG_FD
|
|
|
|
sed "/^$/d" confdefs.h >conftest.log
|
|
|
|
if test -s conftest.log; then
|
|
|
|
echo >&AS_MESSAGE_LOG_FD
|
2001-01-23 17:49:33 +08:00
|
|
|
echo ["## ------------ ##"] >&AS_MESSAGE_LOG_FD
|
|
|
|
echo ["## confdefs.h. ##"] >&AS_MESSAGE_LOG_FD
|
|
|
|
echo ["## ------------ ##"] >&AS_MESSAGE_LOG_FD
|
2001-01-22 16:58:47 +08:00
|
|
|
echo >&AS_MESSAGE_LOG_FD
|
|
|
|
cat conftest.log >&AS_MESSAGE_LOG_FD
|
|
|
|
fi
|
|
|
|
(echo; echo) >&AS_MESSAGE_LOG_FD
|
2000-10-25 00:37:14 +08:00
|
|
|
test "$ac_signal" != 0 &&
|
Move AC_MSG_* into M4sh.
* acgeneral.m4 (_AC_SH_QUOTE, _AC_SH_QUOTE_IFELSE, _AC_ECHO): Move
to...
* m4sh.m4 (_AS_QUOTE, _AS_QUOTE_IFELSE, _AS_ECHO): here.
(AS_MESSAGE, AS_WARN, AS_ERROR): New.
* acgeneral.m4 (AC_MSG_NOTICE, AC_MSG_WARN, AC_MSG_ERROR): Use them.
(AC_FD_MSG, AC_FD_LOG): Be AU_ALIAS'es of...
(AS_MESSAGE_FD, AS_MESSAGE_LOG_FD): new.
Adjust all dependencies.
2000-11-14 18:11:43 +08:00
|
|
|
echo "$as_me: caught signal $ac_signal" >&AS_MESSAGE_LOG_FD
|
|
|
|
echo "$as_me: exit $exit_status" >&AS_MESSAGE_LOG_FD
|
2001-03-03 05:02:07 +08:00
|
|
|
rm -rf conftest* confdefs* core core.* *.core conf$[$]* $ac_clean_files &&
|
2000-10-25 00:37:14 +08:00
|
|
|
exit $exit_status
|
|
|
|
' 0
|
|
|
|
for ac_signal in 1 2 13 15; do
|
2001-06-02 13:49:54 +08:00
|
|
|
trap 'ac_signal='$ac_signal'; AS_EXIT([1])' $ac_signal
|
2000-10-25 00:37:14 +08:00
|
|
|
done
|
|
|
|
ac_signal=0
|
|
|
|
|
1994-03-23 04:45:36 +08:00
|
|
|
# confdefs.h avoids OS command line length limits that DEFS can exceed.
|
1993-12-02 15:24:42 +08:00
|
|
|
rm -rf conftest* confdefs.h
|
1993-10-21 07:33:19 +08:00
|
|
|
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
|
1999-12-20 21:45:45 +08:00
|
|
|
echo >confdefs.h
|
1993-10-21 07:33:19 +08:00
|
|
|
|
2000-07-31 17:21:33 +08:00
|
|
|
# Let the site file select an alternate cache file if it wants to.
|
1994-06-23 02:22:34 +08:00
|
|
|
AC_SITE_LOAD
|
1994-05-05 06:03:07 +08:00
|
|
|
AC_CACHE_LOAD
|
2000-07-31 17:21:33 +08:00
|
|
|
_AC_ARG_VAR_VALIDATE
|
2000-08-01 20:20:14 +08:00
|
|
|
_AC_ARG_VAR_PRECIOUS(build_alias)dnl
|
|
|
|
_AC_ARG_VAR_PRECIOUS(host_alias)dnl
|
|
|
|
_AC_ARG_VAR_PRECIOUS(target_alias)dnl
|
Various cleanups and consistency checks.
* m4sugar.m4: Formatting changes.
* acgeneral.m4 (AC_DIVERT_PUSH, AC_DIVERT_POP, AC_REQUIRE)
(AC_DIAGNOSE, AC_FATAL, AC_MSG_WARN, AC_MSG_NOTICE, AC_MSG_ERROR):
Use m4_copy to define them, in order to keep a good $0.
(AC_INIT): AC_LANG_PUSH C, not AC_LANG, to initialize the stack.
* aclang.m4 (AC_LANG_PUSH): Dont't use m4_defn on undefined macros.
(AC_LANG_POP): Admit an argument specifying the language we quit
when popping.
Adjust Autoconf's AC_LANG_POPs.
* tests/tools.at (AWK portability): Don't depend on AC_INIT.
(autoconf --trace: user macros): Obviously I
meant TRACE1, not AC_TRACE1.
2001-01-18 17:15:31 +08:00
|
|
|
AC_LANG_PUSH(C)
|
2000-03-08 19:15:14 +08:00
|
|
|
|
2000-02-25 21:19:35 +08:00
|
|
|
_AC_PROG_ECHO()dnl
|
2001-02-06 01:33:00 +08:00
|
|
|
_AC_INIT_PREPARE_FS_SEPARATORS
|
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl Substitute for predefined variables.
|
1994-09-06 22:36:45 +08:00
|
|
|
AC_SUBST(DEFS)dnl
|
|
|
|
AC_SUBST(LIBS)dnl
|
2001-01-18 17:16:08 +08:00
|
|
|
m4_divert_pop([INIT_PREPARE])dnl
|
2000-03-08 19:03:59 +08:00
|
|
|
])# _AC_INIT_PREPARE
|
|
|
|
|
|
|
|
|
2000-05-19 21:16:06 +08:00
|
|
|
# AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR])
|
|
|
|
# ----------------------------------------
|
|
|
|
# This macro is used only for Autoupdate.
|
|
|
|
AU_DEFUN([AC_INIT],
|
2000-11-29 18:09:44 +08:00
|
|
|
[m4_ifval([$2], [[AC_INIT($@)]],
|
|
|
|
[m4_ifval([$1],
|
2000-05-19 21:16:06 +08:00
|
|
|
[[AC_INIT]
|
|
|
|
AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl
|
|
|
|
])
|
|
|
|
|
|
|
|
|
* m4sugar.m4 (m4_dquote, m4_pattern_forbid, m4_pattern_allow)
(m4_cr_letters, m4_cr_LETTERS, m4_cr_Letters, m4_cr_digits)
(m4_cr_symbols1, m4_cr_symbols2, m4_re_string, m4_re_word)
(m4_init): New macros.
(m4_token_allow): Remove.
* acgeneral.m4: Don't push BODY into the diversion stack.
(AC_PLAIN_SCRIPT): Do it.
Call m4_init, define the Autoconf patterns.
(AC_INIT): Use AC_PLAIN_SCRIPT.
Remove the useless `dnl' (those where the current diversion is
KILL).
* autoconf.sh (m4_common): Fix quotation.
(finalize.awk): Load forbidden.rx and allowed.rx.
Split the line into tokens, and check their validity.
* tests/tools.at (Forbidden tokens): Adjust.
2000-12-06 16:58:13 +08:00
|
|
|
# AC_PLAIN_SCRIPT
|
|
|
|
# ---------------
|
|
|
|
# Simulate AC_INIT, i.e., pretend this is the beginning of the `configure'
|
|
|
|
# generation. This is used by some tests, and let `autoconf' be used to
|
|
|
|
# generate other scripts than `configure'.
|
|
|
|
m4_define([AC_PLAIN_SCRIPT],
|
2001-01-19 22:35:06 +08:00
|
|
|
[AS_INIT
|
2001-01-18 23:30:35 +08:00
|
|
|
|
|
|
|
# Forbidden tokens and exceptions.
|
2001-01-19 22:35:06 +08:00
|
|
|
m4_pattern_forbid([^_?A[CHUM]_])
|
* m4sugar.m4 (m4_dquote, m4_pattern_forbid, m4_pattern_allow)
(m4_cr_letters, m4_cr_LETTERS, m4_cr_Letters, m4_cr_digits)
(m4_cr_symbols1, m4_cr_symbols2, m4_re_string, m4_re_word)
(m4_init): New macros.
(m4_token_allow): Remove.
* acgeneral.m4: Don't push BODY into the diversion stack.
(AC_PLAIN_SCRIPT): Do it.
Call m4_init, define the Autoconf patterns.
(AC_INIT): Use AC_PLAIN_SCRIPT.
Remove the useless `dnl' (those where the current diversion is
KILL).
* autoconf.sh (m4_common): Fix quotation.
(finalize.awk): Load forbidden.rx and allowed.rx.
Split the line into tokens, and check their validity.
* tests/tools.at (Forbidden tokens): Adjust.
2000-12-06 16:58:13 +08:00
|
|
|
m4_pattern_forbid([_AC_])
|
2001-01-19 22:35:06 +08:00
|
|
|
# Actually reserved by M4sh.
|
|
|
|
m4_pattern_allow([^AS_FLAGS$])
|
2001-01-18 23:30:35 +08:00
|
|
|
|
2001-01-18 17:16:08 +08:00
|
|
|
m4_divert_push([BODY])dnl
|
|
|
|
m4_wrap([m4_divert_pop([BODY])[]])dnl
|
|
|
|
])
|
* m4sugar.m4 (m4_dquote, m4_pattern_forbid, m4_pattern_allow)
(m4_cr_letters, m4_cr_LETTERS, m4_cr_Letters, m4_cr_digits)
(m4_cr_symbols1, m4_cr_symbols2, m4_re_string, m4_re_word)
(m4_init): New macros.
(m4_token_allow): Remove.
* acgeneral.m4: Don't push BODY into the diversion stack.
(AC_PLAIN_SCRIPT): Do it.
Call m4_init, define the Autoconf patterns.
(AC_INIT): Use AC_PLAIN_SCRIPT.
Remove the useless `dnl' (those where the current diversion is
KILL).
* autoconf.sh (m4_common): Fix quotation.
(finalize.awk): Load forbidden.rx and allowed.rx.
Split the line into tokens, and check their validity.
* tests/tools.at (Forbidden tokens): Adjust.
2000-12-06 16:58:13 +08:00
|
|
|
|
|
|
|
|
2001-01-16 18:46:37 +08:00
|
|
|
|
2000-05-19 21:16:06 +08:00
|
|
|
# AC_INIT([PACKAGE, VERSION, [BUG-REPORT])
|
|
|
|
# ----------------------------------------
|
2000-07-07 18:54:01 +08:00
|
|
|
# Include the user macro files, prepare the diversions, and output the
|
|
|
|
# preamble of the `configure' script.
|
2000-03-21 20:33:37 +08:00
|
|
|
# Note that the order is important: first initialize, then set the
|
|
|
|
# AC_CONFIG_SRCDIR.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_INIT],
|
2001-01-18 17:16:08 +08:00
|
|
|
[AC_PLAIN_SCRIPT
|
|
|
|
m4_ifval([$2], [_AC_INIT_PACKAGE($@)])
|
2000-11-23 17:46:48 +08:00
|
|
|
m4_divert_text([BINSH], [@%:@! /bin/sh])
|
* m4sugar.m4 (m4_dquote, m4_pattern_forbid, m4_pattern_allow)
(m4_cr_letters, m4_cr_LETTERS, m4_cr_Letters, m4_cr_digits)
(m4_cr_symbols1, m4_cr_symbols2, m4_re_string, m4_re_word)
(m4_init): New macros.
(m4_token_allow): Remove.
* acgeneral.m4: Don't push BODY into the diversion stack.
(AC_PLAIN_SCRIPT): Do it.
Call m4_init, define the Autoconf patterns.
(AC_INIT): Use AC_PLAIN_SCRIPT.
Remove the useless `dnl' (those where the current diversion is
KILL).
* autoconf.sh (m4_common): Fix quotation.
(finalize.awk): Load forbidden.rx and allowed.rx.
Split the line into tokens, and check their validity.
* tests/tools.at (Forbidden tokens): Adjust.
2000-12-06 16:58:13 +08:00
|
|
|
_AC_INIT_DEFAULTS
|
2000-07-07 18:54:01 +08:00
|
|
|
_AC_INIT_PARSE_ARGS
|
|
|
|
_AC_INIT_SRCDIR
|
|
|
|
_AC_INIT_HELP
|
|
|
|
_AC_INIT_VERSION
|
2001-04-04 23:50:38 +08:00
|
|
|
_AC_INIT_CONFIG_LOG
|
2000-07-07 18:54:01 +08:00
|
|
|
_AC_INIT_PREPARE
|
|
|
|
_AC_INIT_NOTICE
|
|
|
|
_AC_INIT_COPYRIGHT
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl
|
2000-03-21 20:33:37 +08:00
|
|
|
])
|
2000-02-08 18:46:43 +08:00
|
|
|
|
2000-03-08 19:03:59 +08:00
|
|
|
|
2000-07-10 16:56:19 +08:00
|
|
|
|
|
|
|
|
2000-02-08 18:46:43 +08:00
|
|
|
## ----------------------------- ##
|
|
|
|
## Selecting optional features. ##
|
|
|
|
## ----------------------------- ##
|
1994-09-06 22:36:45 +08:00
|
|
|
|
|
|
|
|
No longer rely on /bin/sh to compose the optional parts of
`configure --help'.
* acgeneral.m4 (AC_DIVERSION_HELP_BEGIN, AC_DIVERSION_HELP_ENABLE,
AC_DIVERSION_HELP_WITH, AC_DIVERSION_HELP_VAR,
AC_DIVERSION_HELP_END): New diversion numbers.
(AC_EXPAND_ONCE): New macro.
(AC_PROVIDE_IF): New macro.
(AC_BEFORE, AC_REQUIRE): Use it.
(AC_REQUIRE): Don't use indir.
(_AC_ARG_ENABLE_HELP_PROLOGUE, _AC_ARG_WITH_HELP_PROLOGUE,
_AC_ARG_VAR_HELP_PROLOGUE): New macros.
(AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): Expand once the
_HELP_PROLOGUE macro which corresponds.
(_AC_INIT_HELP): Adjust to AC_DIVERSION_HELP_BEGIN and
AC_DIVERSION_HELP_END.
(_AC_INIT_NOTICE, _AC_INIT_HELP): Remove the sh code which handled
the optional help strings.
2000-03-08 19:08:29 +08:00
|
|
|
# AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
|
|
|
|
# ------------------------------------------------------------------------
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_ARG_ENABLE],
|
2001-01-24 01:04:35 +08:00
|
|
|
[m4_divert_once([HELP_ENABLE], [[
|
2000-03-08 19:14:09 +08:00
|
|
|
Optional Features:
|
|
|
|
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
2000-07-19 17:08:13 +08:00
|
|
|
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]]])dnl
|
2001-01-24 01:04:35 +08:00
|
|
|
m4_divert_once([HELP_ENABLE], [$2])dnl
|
2000-03-14 16:47:48 +08:00
|
|
|
# Check whether --enable-$1 or --disable-$1 was given.
|
* m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros.
Use them.
(debugfile, debugmode, m4exit, m4wrap, maketemp, patsubst, regexp)
(substr, translit, m4_wrap): Rename as...
(m4_debugfile, m4_debugmode, m4_exit, m4_wrap, m4_maketemp)
(m4_patsubst, m4_regexp, m4_substr, m4_translit, m4_text_wrap): these.
Adjust all dependencies.
* acgeneral.m4: Adjust.
* tests/m4sugar.at: Adjust.
* autoconf.m4 (m4exit, patsubst, regexp, substr, translit):
Reestablish them.
2000-11-03 16:53:26 +08:00
|
|
|
if test "[${enable_]m4_patsubst([$1], -, _)+set}" = set; then
|
|
|
|
enableval="[$enable_]m4_patsubst([$1], -, _)"
|
2000-03-14 16:41:15 +08:00
|
|
|
$3
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifvaln([$4], [else
|
2000-08-04 17:04:29 +08:00
|
|
|
$4])dnl
|
2000-09-12 18:07:33 +08:00
|
|
|
fi; dnl
|
No longer rely on /bin/sh to compose the optional parts of
`configure --help'.
* acgeneral.m4 (AC_DIVERSION_HELP_BEGIN, AC_DIVERSION_HELP_ENABLE,
AC_DIVERSION_HELP_WITH, AC_DIVERSION_HELP_VAR,
AC_DIVERSION_HELP_END): New diversion numbers.
(AC_EXPAND_ONCE): New macro.
(AC_PROVIDE_IF): New macro.
(AC_BEFORE, AC_REQUIRE): Use it.
(AC_REQUIRE): Don't use indir.
(_AC_ARG_ENABLE_HELP_PROLOGUE, _AC_ARG_WITH_HELP_PROLOGUE,
_AC_ARG_VAR_HELP_PROLOGUE): New macros.
(AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): Expand once the
_HELP_PROLOGUE macro which corresponds.
(_AC_INIT_HELP): Adjust to AC_DIVERSION_HELP_BEGIN and
AC_DIVERSION_HELP_END.
(_AC_INIT_NOTICE, _AC_INIT_HELP): Remove the sh code which handled
the optional help strings.
2000-03-08 19:08:29 +08:00
|
|
|
])# AC_ARG_ENABLE
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-02-08 21:25:49 +08:00
|
|
|
|
2000-05-22 16:41:36 +08:00
|
|
|
AU_DEFUN([AC_ENABLE],
|
2000-02-08 21:25:49 +08:00
|
|
|
[AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])])
|
1994-09-01 12:59:32 +08:00
|
|
|
|
1994-09-16 10:03:51 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
## ------------------------------ ##
|
|
|
|
## Working with optional software ##
|
|
|
|
## ------------------------------ ##
|
1994-09-16 10:03:51 +08:00
|
|
|
|
|
|
|
|
No longer rely on /bin/sh to compose the optional parts of
`configure --help'.
* acgeneral.m4 (AC_DIVERSION_HELP_BEGIN, AC_DIVERSION_HELP_ENABLE,
AC_DIVERSION_HELP_WITH, AC_DIVERSION_HELP_VAR,
AC_DIVERSION_HELP_END): New diversion numbers.
(AC_EXPAND_ONCE): New macro.
(AC_PROVIDE_IF): New macro.
(AC_BEFORE, AC_REQUIRE): Use it.
(AC_REQUIRE): Don't use indir.
(_AC_ARG_ENABLE_HELP_PROLOGUE, _AC_ARG_WITH_HELP_PROLOGUE,
_AC_ARG_VAR_HELP_PROLOGUE): New macros.
(AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): Expand once the
_HELP_PROLOGUE macro which corresponds.
(_AC_INIT_HELP): Adjust to AC_DIVERSION_HELP_BEGIN and
AC_DIVERSION_HELP_END.
(_AC_INIT_NOTICE, _AC_INIT_HELP): Remove the sh code which handled
the optional help strings.
2000-03-08 19:08:29 +08:00
|
|
|
|
2000-03-03 00:27:51 +08:00
|
|
|
# AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE])
|
|
|
|
# --------------------------------------------------------------------
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_ARG_WITH],
|
2001-01-24 01:04:35 +08:00
|
|
|
[m4_divert_once([HELP_WITH], [[
|
2000-03-08 19:14:09 +08:00
|
|
|
Optional Packages:
|
|
|
|
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
2000-07-31 17:21:33 +08:00
|
|
|
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]])
|
2001-01-24 01:04:35 +08:00
|
|
|
m4_divert_once([HELP_WITH], [$2])dnl
|
2000-03-14 16:47:48 +08:00
|
|
|
# Check whether --with-$1 or --without-$1 was given.
|
* m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros.
Use them.
(debugfile, debugmode, m4exit, m4wrap, maketemp, patsubst, regexp)
(substr, translit, m4_wrap): Rename as...
(m4_debugfile, m4_debugmode, m4_exit, m4_wrap, m4_maketemp)
(m4_patsubst, m4_regexp, m4_substr, m4_translit, m4_text_wrap): these.
Adjust all dependencies.
* acgeneral.m4: Adjust.
* tests/m4sugar.at: Adjust.
* autoconf.m4 (m4exit, patsubst, regexp, substr, translit):
Reestablish them.
2000-11-03 16:53:26 +08:00
|
|
|
if test "[${with_]m4_patsubst([$1], -, _)+set}" = set; then
|
|
|
|
withval="[$with_]m4_patsubst([$1], -, _)"
|
2000-03-14 16:41:15 +08:00
|
|
|
$3
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifvaln([$4], [else
|
2000-08-04 17:04:29 +08:00
|
|
|
$4])dnl
|
2000-09-12 18:07:33 +08:00
|
|
|
fi; dnl
|
No longer rely on /bin/sh to compose the optional parts of
`configure --help'.
* acgeneral.m4 (AC_DIVERSION_HELP_BEGIN, AC_DIVERSION_HELP_ENABLE,
AC_DIVERSION_HELP_WITH, AC_DIVERSION_HELP_VAR,
AC_DIVERSION_HELP_END): New diversion numbers.
(AC_EXPAND_ONCE): New macro.
(AC_PROVIDE_IF): New macro.
(AC_BEFORE, AC_REQUIRE): Use it.
(AC_REQUIRE): Don't use indir.
(_AC_ARG_ENABLE_HELP_PROLOGUE, _AC_ARG_WITH_HELP_PROLOGUE,
_AC_ARG_VAR_HELP_PROLOGUE): New macros.
(AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): Expand once the
_HELP_PROLOGUE macro which corresponds.
(_AC_INIT_HELP): Adjust to AC_DIVERSION_HELP_BEGIN and
AC_DIVERSION_HELP_END.
(_AC_INIT_NOTICE, _AC_INIT_HELP): Remove the sh code which handled
the optional help strings.
2000-03-08 19:08:29 +08:00
|
|
|
])# AC_ARG_WITH
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-05-22 16:41:36 +08:00
|
|
|
AU_DEFUN([AC_WITH],
|
2000-02-08 21:25:49 +08:00
|
|
|
[AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])])
|
1994-09-01 12:59:32 +08:00
|
|
|
|
1994-09-06 22:36:45 +08:00
|
|
|
|
1999-10-30 22:17:20 +08:00
|
|
|
|
No longer rely on /bin/sh to compose the optional parts of
`configure --help'.
* acgeneral.m4 (AC_DIVERSION_HELP_BEGIN, AC_DIVERSION_HELP_ENABLE,
AC_DIVERSION_HELP_WITH, AC_DIVERSION_HELP_VAR,
AC_DIVERSION_HELP_END): New diversion numbers.
(AC_EXPAND_ONCE): New macro.
(AC_PROVIDE_IF): New macro.
(AC_BEFORE, AC_REQUIRE): Use it.
(AC_REQUIRE): Don't use indir.
(_AC_ARG_ENABLE_HELP_PROLOGUE, _AC_ARG_WITH_HELP_PROLOGUE,
_AC_ARG_VAR_HELP_PROLOGUE): New macros.
(AC_ARG_ENABLE, AC_ARG_WITH, AC_ARG_VAR): Expand once the
_HELP_PROLOGUE macro which corresponds.
(_AC_INIT_HELP): Adjust to AC_DIVERSION_HELP_BEGIN and
AC_DIVERSION_HELP_END.
(_AC_INIT_NOTICE, _AC_INIT_HELP): Remove the sh code which handled
the optional help strings.
2000-03-08 19:08:29 +08:00
|
|
|
## ----------------------------------------- ##
|
|
|
|
## Remembering variables for reconfiguring. ##
|
|
|
|
## ----------------------------------------- ##
|
|
|
|
|
|
|
|
|
2000-08-01 20:20:14 +08:00
|
|
|
# _AC_ARG_VAR_PRECIOUS(VARNAME)
|
|
|
|
# -----------------------------
|
|
|
|
# Declare VARNAME is precious.
|
2000-07-31 17:21:33 +08:00
|
|
|
#
|
2000-08-01 20:20:14 +08:00
|
|
|
# We try to diagnose when precious variables have changed. To do this,
|
2000-07-31 17:21:33 +08:00
|
|
|
# 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.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_ARG_VAR_PRECIOUS],
|
2001-01-24 01:04:35 +08:00
|
|
|
[m4_divert_once([PARSE_ARGS],
|
2000-07-31 17:21:33 +08:00
|
|
|
[ac_env_$1_set=${$1+set}
|
2000-08-01 20:20:14 +08:00
|
|
|
ac_env_$1_value=$$1
|
2000-07-31 17:21:33 +08:00
|
|
|
ac_cv_env_$1_set=${$1+set}
|
2000-08-01 20:20:14 +08:00
|
|
|
ac_cv_env_$1_value=$$1])dnl
|
|
|
|
])
|
1999-10-30 22:17:20 +08:00
|
|
|
|
|
|
|
|
2000-07-31 17:21:33 +08:00
|
|
|
# _AC_ARG_VAR_VALIDATE
|
|
|
|
# --------------------
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_ARG_VAR_VALIDATE],
|
2000-07-31 17:21:33 +08:00
|
|
|
[# Check that the precious variables saved in the cache have kept the same
|
|
|
|
# value.
|
|
|
|
ac_suggest_removing_cache=false
|
|
|
|
for 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,)
|
|
|
|
AC_MSG_WARN([`$ac_var' was set to `$ac_old_val' in the previous run])
|
|
|
|
ac_suggest_removing_cache=: ;;
|
|
|
|
,set)
|
|
|
|
AC_MSG_WARN([`$ac_var' was not set in the previous run])
|
|
|
|
ac_suggest_removing_cache=: ;;
|
|
|
|
,);;
|
|
|
|
*)
|
|
|
|
if test "x$ac_old_val" != "x$ac_new_val"; then
|
|
|
|
AC_MSG_WARN([`$ac_var' has changed since the previous run:])
|
|
|
|
AC_MSG_WARN([ former value: $ac_old_val])
|
|
|
|
AC_MSG_WARN([ current value: $ac_new_val])
|
|
|
|
ac_suggest_removing_cache=:
|
|
|
|
fi;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
if $ac_suggest_removing_cache; then
|
|
|
|
AC_MSG_WARN([changes in the environment can compromise the build])
|
|
|
|
AC_MSG_WARN([consider removing $cache_file and starting over])
|
|
|
|
fi
|
|
|
|
])# _AC_ARG_VAR_VALIDATE
|
|
|
|
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-08-01 20:20:14 +08:00
|
|
|
# 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],
|
2001-01-24 01:04:35 +08:00
|
|
|
[m4_divert_once([HELP_VAR], [[
|
|
|
|
Some influential environment variables:]])dnl
|
2001-01-24 15:50:55 +08:00
|
|
|
m4_divert_once([HELP_VAR_END], [[
|
2000-08-01 20:20:14 +08:00
|
|
|
Use these variables to override the choices made by `configure' or to help
|
2001-01-24 15:50:55 +08:00
|
|
|
it to find libraries and programs with nonstandard names/locations.]])dnl
|
|
|
|
m4_expand_once([m4_divert_once([HELP_VAR],
|
|
|
|
[AC_HELP_STRING([$1], [$2], [ ])])],
|
|
|
|
[$0($1)])dnl
|
2000-08-01 20:20:14 +08:00
|
|
|
_AC_ARG_VAR_PRECIOUS([$1])dnl
|
2001-01-24 15:50:55 +08:00
|
|
|
AC_SUBST([$1])dnl
|
2000-08-01 20:20:14 +08:00
|
|
|
])# AC_ARG_VAR
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
## ---------------------------- ##
|
|
|
|
## Transforming program names. ##
|
|
|
|
## ---------------------------- ##
|
1994-09-07 11:06:34 +08:00
|
|
|
|
|
|
|
|
2000-02-08 18:46:43 +08:00
|
|
|
# AC_ARG_PROGRAM
|
|
|
|
# --------------
|
2000-03-14 16:20:25 +08:00
|
|
|
# This macro is expanded only once, to avoid that `foo' ends up being
|
|
|
|
# installed as `ggfoo'.
|
Various cleanups.
* acgeneral.m4 (AC_PRO, AC_EPI): Rename as _AC_DEFUN_PRO and
_AC_DEFUN_EPI.
Adjust dependencies.
(AC_DEFUN): Remove the not-to-be-released specializing mechanism.
(AC_SPECIALIZE): Remove for the same reasons.
Adjust dependencies.
(_AC_INIT_DEFAULTS, _AC_INIT_PARSE_ARGS, _AC_INIT_VERSION,
_AC_INIT_PREPARE, _AC_CANONICAL_SPLIT, _AC_CHECK_TYPE_NEW,
_AC_CHECK_TYPE_OLD): Define via `define' instead of `AC_DEFUN':
they are not related to AC_REQUIRE in any way.
* acspecific.m4 (AC_PROG_ECHO, _AC_DECL_YYTEXT, _AC_PATH_X_XMKMF,
_AC_PATH_X_DIRECT): Define via `define' instead of `AC_DEFUN'.
2000-06-26 17:03:15 +08:00
|
|
|
AC_DEFUN_ONCE([AC_ARG_PROGRAM],
|
2000-03-08 19:11:37 +08:00
|
|
|
[dnl Document the options.
|
2000-10-31 03:01:24 +08:00
|
|
|
m4_divert_push([HELP_BEGIN])dnl
|
2000-03-08 19:11:37 +08:00
|
|
|
|
|
|
|
Program names:
|
2000-03-14 16:20:25 +08:00
|
|
|
--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 names
|
2001-01-18 17:16:08 +08:00
|
|
|
m4_divert_pop([HELP_BEGIN])dnl
|
2000-03-08 19:11:37 +08:00
|
|
|
if test "$program_transform_name" = s,x,x,; then
|
1994-09-20 05:17:16 +08:00
|
|
|
program_transform_name=
|
|
|
|
else
|
1995-11-23 01:42:19 +08:00
|
|
|
# Double any \ or $. echo might interpret backslashes.
|
2001-01-30 06:36:09 +08:00
|
|
|
cat <<\EOF >conftest.sed
|
1995-11-23 01:42:19 +08:00
|
|
|
s,\\,\\\\,g; s,\$,$$,g
|
2000-03-14 16:20:25 +08:00
|
|
|
EOF
|
2001-01-30 06:36:09 +08:00
|
|
|
program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
|
|
|
|
rm -f conftest.sed
|
1994-09-07 11:06:34 +08:00
|
|
|
fi
|
1994-09-13 23:20:48 +08:00
|
|
|
test "$program_prefix" != NONE &&
|
1999-04-05 07:09:48 +08:00
|
|
|
program_transform_name="s,^,${program_prefix},;$program_transform_name"
|
1994-09-07 11:06:34 +08:00
|
|
|
# Use a double $ so make ignores it.
|
1994-09-13 23:20:48 +08:00
|
|
|
test "$program_suffix" != NONE &&
|
1999-04-05 07:09:48 +08:00
|
|
|
program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
|
1994-09-07 11:06:34 +08:00
|
|
|
|
|
|
|
# sed with no file args requires a program.
|
2000-05-03 16:53:06 +08:00
|
|
|
test -z "$program_transform_name" && program_transform_name="s,x,x,"
|
2000-03-14 16:20:25 +08:00
|
|
|
])# AC_ARG_PROGRAM
|
|
|
|
|
1994-09-07 11:06:34 +08:00
|
|
|
|
|
|
|
|
2000-01-10 18:13:42 +08:00
|
|
|
|
|
|
|
|
2000-05-03 17:53:55 +08:00
|
|
|
## ------------------------- ##
|
|
|
|
## Finding auxiliary files. ##
|
|
|
|
## ------------------------- ##
|
1994-09-01 12:59:32 +08:00
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# 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.
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_CONFIG_AUX_DIR],
|
1994-09-13 23:20:48 +08:00
|
|
|
[AC_CONFIG_AUX_DIRS($1 $srcdir/$1)])
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-02-10 18:35:18 +08:00
|
|
|
|
|
|
|
# AC_CONFIG_AUX_DIR_DEFAULT
|
|
|
|
# -------------------------
|
2000-02-08 02:03:54 +08:00
|
|
|
# The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
|
|
|
|
# There's no need to call this macro explicitly; just AC_REQUIRE it.
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT],
|
1994-09-13 23:20:48 +08:00
|
|
|
[AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)])
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-02-10 18:35:18 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# 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.
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_CONFIG_AUX_DIRS],
|
(AC_OUTPUT): When doing substitutions on files, if
the file starts with "#!", put the "automatically generated"
comment on the second line instead of the first.
(AC_CONFIG_AUX, AC_CONFIG_AUX_DEFAULT,
AC_CONFIG_AUX_DIRS, AC_SYSTEM_TYPE, AC_HOST_TYPE, AC_TARGET_TYPE,
AC_BUILD_TYPE, AC_SUBST_FILE, AC_MAKE_LINKS, AC_OUTPUT_MAKE_LINKS,
AC_CONFIG_SUBDIRS): New macros.
(AC_OUTPUT_HEADER): For each file being created,
munge a copy of conftest.sed rather than the original.
From brook@trillium.botany.utexas.edu (Brook Milligan).
1994-04-30 09:44:39 +08:00
|
|
|
[ac_aux_dir=
|
|
|
|
for ac_dir in $1; do
|
1994-09-11 14:20:58 +08:00
|
|
|
if test -f $ac_dir/install-sh; then
|
|
|
|
ac_aux_dir=$ac_dir
|
1994-09-13 23:20:48 +08:00
|
|
|
ac_install_sh="$ac_aux_dir/install-sh -c"
|
1994-09-11 14:20:58 +08:00
|
|
|
break
|
|
|
|
elif test -f $ac_dir/install.sh; then
|
|
|
|
ac_aux_dir=$ac_dir
|
1994-09-13 23:20:48 +08:00
|
|
|
ac_install_sh="$ac_aux_dir/install.sh -c"
|
1994-09-11 14:20:58 +08:00
|
|
|
break
|
1999-09-04 23:01:04 +08:00
|
|
|
elif test -f $ac_dir/shtool; then
|
|
|
|
ac_aux_dir=$ac_dir
|
|
|
|
ac_install_sh="$ac_aux_dir/shtool install -c"
|
|
|
|
break
|
(AC_OUTPUT): When doing substitutions on files, if
the file starts with "#!", put the "automatically generated"
comment on the second line instead of the first.
(AC_CONFIG_AUX, AC_CONFIG_AUX_DEFAULT,
AC_CONFIG_AUX_DIRS, AC_SYSTEM_TYPE, AC_HOST_TYPE, AC_TARGET_TYPE,
AC_BUILD_TYPE, AC_SUBST_FILE, AC_MAKE_LINKS, AC_OUTPUT_MAKE_LINKS,
AC_CONFIG_SUBDIRS): New macros.
(AC_OUTPUT_HEADER): For each file being created,
munge a copy of conftest.sed rather than the original.
From brook@trillium.botany.utexas.edu (Brook Milligan).
1994-04-30 09:44:39 +08:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
if test -z "$ac_aux_dir"; then
|
1999-10-30 22:17:20 +08:00
|
|
|
AC_MSG_ERROR([cannot find install-sh or install.sh in $1])
|
(AC_OUTPUT): When doing substitutions on files, if
the file starts with "#!", put the "automatically generated"
comment on the second line instead of the first.
(AC_CONFIG_AUX, AC_CONFIG_AUX_DEFAULT,
AC_CONFIG_AUX_DIRS, AC_SYSTEM_TYPE, AC_HOST_TYPE, AC_TARGET_TYPE,
AC_BUILD_TYPE, AC_SUBST_FILE, AC_MAKE_LINKS, AC_OUTPUT_MAKE_LINKS,
AC_CONFIG_SUBDIRS): New macros.
(AC_OUTPUT_HEADER): For each file being created,
munge a copy of conftest.sed rather than the original.
From brook@trillium.botany.utexas.edu (Brook Milligan).
1994-04-30 09:44:39 +08:00
|
|
|
fi
|
1999-02-22 01:40:20 +08:00
|
|
|
ac_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.
|
1994-06-23 02:22:34 +08:00
|
|
|
AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
|
2000-02-08 18:46:43 +08:00
|
|
|
])# AC_CONFIG_AUX_DIRS
|
2000-01-15 01:51:12 +08:00
|
|
|
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-05-03 17:53:55 +08:00
|
|
|
|
|
|
|
|
|
|
|
## ----------------------------------- ##
|
|
|
|
## Getting the canonical system type. ##
|
|
|
|
## ----------------------------------- ##
|
|
|
|
|
(AC_OUTPUT): When doing substitutions on files, if
the file starts with "#!", put the "automatically generated"
comment on the second line instead of the first.
(AC_CONFIG_AUX, AC_CONFIG_AUX_DEFAULT,
AC_CONFIG_AUX_DIRS, AC_SYSTEM_TYPE, AC_HOST_TYPE, AC_TARGET_TYPE,
AC_BUILD_TYPE, AC_SUBST_FILE, AC_MAKE_LINKS, AC_OUTPUT_MAKE_LINKS,
AC_CONFIG_SUBDIRS): New macros.
(AC_OUTPUT_HEADER): For each file being created,
munge a copy of conftest.sed rather than the original.
From brook@trillium.botany.utexas.edu (Brook Milligan).
1994-04-30 09:44:39 +08:00
|
|
|
# The inputs are:
|
2000-05-03 17:53:55 +08:00
|
|
|
# configure --host=HOST --target=TARGET --build=BUILD
|
(AC_OUTPUT): When doing substitutions on files, if
the file starts with "#!", put the "automatically generated"
comment on the second line instead of the first.
(AC_CONFIG_AUX, AC_CONFIG_AUX_DEFAULT,
AC_CONFIG_AUX_DIRS, AC_SYSTEM_TYPE, AC_HOST_TYPE, AC_TARGET_TYPE,
AC_BUILD_TYPE, AC_SUBST_FILE, AC_MAKE_LINKS, AC_OUTPUT_MAKE_LINKS,
AC_CONFIG_SUBDIRS): New macros.
(AC_OUTPUT_HEADER): For each file being created,
munge a copy of conftest.sed rather than the original.
From brook@trillium.botany.utexas.edu (Brook Milligan).
1994-04-30 09:44:39 +08:00
|
|
|
#
|
|
|
|
# The rules are:
|
2000-06-30 21:34:37 +08:00
|
|
|
# 1. Build defaults to the current platform, as determined by config.guess.
|
2000-05-03 17:53:55 +08:00
|
|
|
# 2. Host defaults to build.
|
|
|
|
# 3. Target defaults to host.
|
(AC_OUTPUT): When doing substitutions on files, if
the file starts with "#!", put the "automatically generated"
comment on the second line instead of the first.
(AC_CONFIG_AUX, AC_CONFIG_AUX_DEFAULT,
AC_CONFIG_AUX_DIRS, AC_SYSTEM_TYPE, AC_HOST_TYPE, AC_TARGET_TYPE,
AC_BUILD_TYPE, AC_SUBST_FILE, AC_MAKE_LINKS, AC_OUTPUT_MAKE_LINKS,
AC_CONFIG_SUBDIRS): New macros.
(AC_OUTPUT_HEADER): For each file being created,
munge a copy of conftest.sed rather than the original.
From brook@trillium.botany.utexas.edu (Brook Milligan).
1994-04-30 09:44:39 +08:00
|
|
|
|
|
|
|
|
The options --build etc. used to set `$build'. *If*
AC_CANONICAL_SYSTEM was run, then the value of `$build' given by
the user was saved into `$build_alias', and `$build' was
normalized using `config.sub'.
Now, let `--build' set `$build_alias' so that scripts with or
without `AC_CANONICAL_BUILD' have the same semantics. This allows
to use `AC_CHECK_TOOL' without requiring `config.guess' and
`config.sub' (which was bizarre anyway).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target
set `build_alias' etc.
After the option handling, set host to $host_alias etc. for
bugward compatibility.
(AC_CANONICALIZE): Mutate into...
(_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just
computes `$foo_os' etc.
(_AC_CANONICAL_THING): Remove, too confusing.
(AC_CANONICAL_BUILD): Adjust.
Do not assign any value to `build_alias', just compute `build', and
`build_{cpy, vendor, os}'.
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.
(AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is
given, not when `$host != $build'.
* acgeneral.m4 (sinclude): Fix typo.
2000-05-24 20:18:35 +08:00
|
|
|
# _AC_CANONICAL_SPLIT(THING)
|
2000-03-03 00:36:16 +08:00
|
|
|
# --------------------------
|
The options --build etc. used to set `$build'. *If*
AC_CANONICAL_SYSTEM was run, then the value of `$build' given by
the user was saved into `$build_alias', and `$build' was
normalized using `config.sub'.
Now, let `--build' set `$build_alias' so that scripts with or
without `AC_CANONICAL_BUILD' have the same semantics. This allows
to use `AC_CHECK_TOOL' without requiring `config.guess' and
`config.sub' (which was bizarre anyway).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target
set `build_alias' etc.
After the option handling, set host to $host_alias etc. for
bugward compatibility.
(AC_CANONICALIZE): Mutate into...
(_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just
computes `$foo_os' etc.
(_AC_CANONICAL_THING): Remove, too confusing.
(AC_CANONICAL_BUILD): Adjust.
Do not assign any value to `build_alias', just compute `build', and
`build_{cpy, vendor, os}'.
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.
(AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is
given, not when `$host != $build'.
* acgeneral.m4 (sinclude): Fix typo.
2000-05-24 20:18:35 +08:00
|
|
|
# Generate the variables THING, THING_{alias cpu vendor os}.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_CANONICAL_SPLIT],
|
The options --build etc. used to set `$build'. *If*
AC_CANONICAL_SYSTEM was run, then the value of `$build' given by
the user was saved into `$build_alias', and `$build' was
normalized using `config.sub'.
Now, let `--build' set `$build_alias' so that scripts with or
without `AC_CANONICAL_BUILD' have the same semantics. This allows
to use `AC_CHECK_TOOL' without requiring `config.guess' and
`config.sub' (which was bizarre anyway).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target
set `build_alias' etc.
After the option handling, set host to $host_alias etc. for
bugward compatibility.
(AC_CANONICALIZE): Mutate into...
(_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just
computes `$foo_os' etc.
(_AC_CANONICAL_THING): Remove, too confusing.
(AC_CANONICAL_BUILD): Adjust.
Do not assign any value to `build_alias', just compute `build', and
`build_{cpy, vendor, os}'.
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.
(AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is
given, not when `$host != $build'.
* acgeneral.m4 (sinclude): Fix typo.
2000-05-24 20:18:35 +08:00
|
|
|
[AC_SUBST([$1], [$ac_cv_$1])dnl
|
|
|
|
dnl FIXME: AC_SUBST([$1_alias], [$ac_cv_$1_alias])dnl
|
|
|
|
AC_SUBST([$1_cpu],
|
|
|
|
[`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`])dnl
|
|
|
|
AC_SUBST([$1_vendor],
|
|
|
|
[`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`])dnl
|
|
|
|
AC_SUBST([$1_os],
|
|
|
|
[`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`])dnl
|
|
|
|
])# _AC_CANONICAL_SPLIT
|
1999-02-22 01:40:20 +08:00
|
|
|
|
2000-05-03 17:53:55 +08:00
|
|
|
|
|
|
|
# AC_CANONICAL_BUILD
|
|
|
|
# ------------------
|
|
|
|
AC_DEFUN_ONCE([AC_CANONICAL_BUILD],
|
The options --build etc. used to set `$build'. *If*
AC_CANONICAL_SYSTEM was run, then the value of `$build' given by
the user was saved into `$build_alias', and `$build' was
normalized using `config.sub'.
Now, let `--build' set `$build_alias' so that scripts with or
without `AC_CANONICAL_BUILD' have the same semantics. This allows
to use `AC_CHECK_TOOL' without requiring `config.guess' and
`config.sub' (which was bizarre anyway).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target
set `build_alias' etc.
After the option handling, set host to $host_alias etc. for
bugward compatibility.
(AC_CANONICALIZE): Mutate into...
(_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just
computes `$foo_os' etc.
(_AC_CANONICAL_THING): Remove, too confusing.
(AC_CANONICAL_BUILD): Adjust.
Do not assign any value to `build_alias', just compute `build', and
`build_{cpy, vendor, os}'.
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.
(AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is
given, not when `$host != $build'.
* acgeneral.m4 (sinclude): Fix typo.
2000-05-24 20:18:35 +08:00
|
|
|
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
|
2000-11-23 17:46:48 +08:00
|
|
|
m4_divert_text([HELP_CANON],
|
2000-05-03 17:53:55 +08:00
|
|
|
[[
|
2000-07-10 18:28:50 +08:00
|
|
|
System types:
|
2000-05-03 17:53:55 +08:00
|
|
|
--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])
|
|
|
|
|
The options --build etc. used to set `$build'. *If*
AC_CANONICAL_SYSTEM was run, then the value of `$build' given by
the user was saved into `$build_alias', and `$build' was
normalized using `config.sub'.
Now, let `--build' set `$build_alias' so that scripts with or
without `AC_CANONICAL_BUILD' have the same semantics. This allows
to use `AC_CHECK_TOOL' without requiring `config.guess' and
`config.sub' (which was bizarre anyway).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target
set `build_alias' etc.
After the option handling, set host to $host_alias etc. for
bugward compatibility.
(AC_CANONICALIZE): Mutate into...
(_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just
computes `$foo_os' etc.
(_AC_CANONICAL_THING): Remove, too confusing.
(AC_CANONICAL_BUILD): Adjust.
Do not assign any value to `build_alias', just compute `build', and
`build_{cpy, vendor, os}'.
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.
(AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is
given, not when `$host != $build'.
* acgeneral.m4 (sinclude): Fix typo.
2000-05-24 20:18:35 +08:00
|
|
|
AC_CACHE_CHECK([build system type], [ac_cv_build],
|
|
|
|
[ac_cv_build_alias=$build_alias
|
|
|
|
test -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])
|
2000-11-14 18:09:20 +08:00
|
|
|
ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
|
|
|
|
AC_MSG_ERROR([$ac_config_sub $ac_cv_build_alias failed.])
|
The options --build etc. used to set `$build'. *If*
AC_CANONICAL_SYSTEM was run, then the value of `$build' given by
the user was saved into `$build_alias', and `$build' was
normalized using `config.sub'.
Now, let `--build' set `$build_alias' so that scripts with or
without `AC_CANONICAL_BUILD' have the same semantics. This allows
to use `AC_CHECK_TOOL' without requiring `config.guess' and
`config.sub' (which was bizarre anyway).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target
set `build_alias' etc.
After the option handling, set host to $host_alias etc. for
bugward compatibility.
(AC_CANONICALIZE): Mutate into...
(_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just
computes `$foo_os' etc.
(_AC_CANONICAL_THING): Remove, too confusing.
(AC_CANONICAL_BUILD): Adjust.
Do not assign any value to `build_alias', just compute `build', and
`build_{cpy, vendor, os}'.
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.
(AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is
given, not when `$host != $build'.
* acgeneral.m4 (sinclude): Fix typo.
2000-05-24 20:18:35 +08:00
|
|
|
])
|
|
|
|
_AC_CANONICAL_SPLIT(build)
|
2000-05-03 17:53:55 +08:00
|
|
|
])# AC_CANONICAL_BUILD
|
|
|
|
|
|
|
|
|
|
|
|
# AC_CANONICAL_HOST
|
|
|
|
# -----------------
|
|
|
|
AC_DEFUN_ONCE([AC_CANONICAL_HOST],
|
|
|
|
[AC_REQUIRE([AC_CANONICAL_BUILD])dnl
|
2000-11-23 17:46:48 +08:00
|
|
|
m4_divert_text([HELP_CANON],
|
2000-06-30 21:34:37 +08:00
|
|
|
[[ --host=HOST build programs to run on HOST [BUILD]]])dnl
|
The options --build etc. used to set `$build'. *If*
AC_CANONICAL_SYSTEM was run, then the value of `$build' given by
the user was saved into `$build_alias', and `$build' was
normalized using `config.sub'.
Now, let `--build' set `$build_alias' so that scripts with or
without `AC_CANONICAL_BUILD' have the same semantics. This allows
to use `AC_CHECK_TOOL' without requiring `config.guess' and
`config.sub' (which was bizarre anyway).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target
set `build_alias' etc.
After the option handling, set host to $host_alias etc. for
bugward compatibility.
(AC_CANONICALIZE): Mutate into...
(_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just
computes `$foo_os' etc.
(_AC_CANONICAL_THING): Remove, too confusing.
(AC_CANONICAL_BUILD): Adjust.
Do not assign any value to `build_alias', just compute `build', and
`build_{cpy, vendor, os}'.
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.
(AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is
given, not when `$host != $build'.
* acgeneral.m4 (sinclude): Fix typo.
2000-05-24 20:18:35 +08:00
|
|
|
AC_CACHE_CHECK([host system type], [ac_cv_host],
|
|
|
|
[ac_cv_host_alias=$host_alias
|
|
|
|
test -z "$ac_cv_host_alias" &&
|
|
|
|
ac_cv_host_alias=$ac_cv_build_alias
|
2000-11-14 18:09:20 +08:00
|
|
|
ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
|
|
|
|
AC_MSG_ERROR([$ac_config_sub $ac_cv_host_alias failed])
|
The options --build etc. used to set `$build'. *If*
AC_CANONICAL_SYSTEM was run, then the value of `$build' given by
the user was saved into `$build_alias', and `$build' was
normalized using `config.sub'.
Now, let `--build' set `$build_alias' so that scripts with or
without `AC_CANONICAL_BUILD' have the same semantics. This allows
to use `AC_CHECK_TOOL' without requiring `config.guess' and
`config.sub' (which was bizarre anyway).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target
set `build_alias' etc.
After the option handling, set host to $host_alias etc. for
bugward compatibility.
(AC_CANONICALIZE): Mutate into...
(_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just
computes `$foo_os' etc.
(_AC_CANONICAL_THING): Remove, too confusing.
(AC_CANONICAL_BUILD): Adjust.
Do not assign any value to `build_alias', just compute `build', and
`build_{cpy, vendor, os}'.
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.
(AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is
given, not when `$host != $build'.
* acgeneral.m4 (sinclude): Fix typo.
2000-05-24 20:18:35 +08:00
|
|
|
])
|
|
|
|
_AC_CANONICAL_SPLIT([host])
|
2000-05-03 17:53:55 +08:00
|
|
|
])# AC_CANONICAL_HOST
|
|
|
|
|
|
|
|
|
|
|
|
# AC_CANONICAL_TARGET
|
|
|
|
# -------------------
|
|
|
|
AC_DEFUN_ONCE([AC_CANONICAL_TARGET],
|
|
|
|
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
|
|
|
AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
|
2000-11-23 17:46:48 +08:00
|
|
|
m4_divert_text([HELP_CANON],
|
2000-05-03 17:53:55 +08:00
|
|
|
[[ --target=TARGET configure for building compilers for TARGET [HOST]]])dnl
|
The options --build etc. used to set `$build'. *If*
AC_CANONICAL_SYSTEM was run, then the value of `$build' given by
the user was saved into `$build_alias', and `$build' was
normalized using `config.sub'.
Now, let `--build' set `$build_alias' so that scripts with or
without `AC_CANONICAL_BUILD' have the same semantics. This allows
to use `AC_CHECK_TOOL' without requiring `config.guess' and
`config.sub' (which was bizarre anyway).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target
set `build_alias' etc.
After the option handling, set host to $host_alias etc. for
bugward compatibility.
(AC_CANONICALIZE): Mutate into...
(_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just
computes `$foo_os' etc.
(_AC_CANONICAL_THING): Remove, too confusing.
(AC_CANONICAL_BUILD): Adjust.
Do not assign any value to `build_alias', just compute `build', and
`build_{cpy, vendor, os}'.
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.
(AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is
given, not when `$host != $build'.
* acgeneral.m4 (sinclude): Fix typo.
2000-05-24 20:18:35 +08:00
|
|
|
AC_CACHE_CHECK([target system type], [ac_cv_target],
|
|
|
|
[dnl Set target_alias.
|
|
|
|
ac_cv_target_alias=$target_alias
|
|
|
|
test "x$ac_cv_target_alias" = "x" &&
|
|
|
|
ac_cv_target_alias=$ac_cv_host_alias
|
2000-11-14 18:09:20 +08:00
|
|
|
ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
|
|
|
|
AC_MSG_ERROR([$ac_config_sub $ac_cv_target_alias failed])
|
The options --build etc. used to set `$build'. *If*
AC_CANONICAL_SYSTEM was run, then the value of `$build' given by
the user was saved into `$build_alias', and `$build' was
normalized using `config.sub'.
Now, let `--build' set `$build_alias' so that scripts with or
without `AC_CANONICAL_BUILD' have the same semantics. This allows
to use `AC_CHECK_TOOL' without requiring `config.guess' and
`config.sub' (which was bizarre anyway).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target
set `build_alias' etc.
After the option handling, set host to $host_alias etc. for
bugward compatibility.
(AC_CANONICALIZE): Mutate into...
(_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just
computes `$foo_os' etc.
(_AC_CANONICAL_THING): Remove, too confusing.
(AC_CANONICAL_BUILD): Adjust.
Do not assign any value to `build_alias', just compute `build', and
`build_{cpy, vendor, os}'.
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.
(AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is
given, not when `$host != $build'.
* acgeneral.m4 (sinclude): Fix typo.
2000-05-24 20:18:35 +08:00
|
|
|
])
|
|
|
|
_AC_CANONICAL_SPLIT([target])
|
2000-05-03 17:53:55 +08:00
|
|
|
|
|
|
|
# The aliases save the names the user supplied, while $host etc.
|
|
|
|
# will get canonicalized.
|
The options --build etc. used to set `$build'. *If*
AC_CANONICAL_SYSTEM was run, then the value of `$build' given by
the user was saved into `$build_alias', and `$build' was
normalized using `config.sub'.
Now, let `--build' set `$build_alias' so that scripts with or
without `AC_CANONICAL_BUILD' have the same semantics. This allows
to use `AC_CHECK_TOOL' without requiring `config.guess' and
`config.sub' (which was bizarre anyway).
* acgeneral.m4 (_AC_INIT_PARSE_ARGS): --build, --host and --target
set `build_alias' etc.
After the option handling, set host to $host_alias etc. for
bugward compatibility.
(AC_CANONICALIZE): Mutate into...
(_AC_CANONICAL_SPLIT): this, which does not canonicalize, it just
computes `$foo_os' etc.
(_AC_CANONICAL_THING): Remove, too confusing.
(AC_CANONICAL_BUILD): Adjust.
Do not assign any value to `build_alias', just compute `build', and
`build_{cpy, vendor, os}'.
(AC_CANONICAL_HOST, AC_CANONICAL_TARGET): Likewise.
(AC_CHECK_TOOL_PREFIX): Fire your rule when `$host_alias' is
given, not when `$host != $build'.
* acgeneral.m4 (sinclude): Fix typo.
2000-05-24 20:18:35 +08:00
|
|
|
test -n "$target_alias" &&
|
2000-05-03 17:53:55 +08:00
|
|
|
test "$program_prefix$program_suffix$program_transform_name" = \
|
|
|
|
NONENONEs,x,x, &&
|
|
|
|
program_prefix=${target_alias}-[]dnl
|
|
|
|
])# AC_CANONICAL_TARGET
|
|
|
|
|
|
|
|
|
Create acfunctions.m4, in charge of the macros related to
functions.
* acgeneral.m4 (AC_CHECK_FUNC, AC_CHECK_FUNCS, AC_REPLACE_FUNCS):
Move to...
* acfunctions.m4: here, new file.
* acspecific.m4 (_AC_LIBOBJ_ALLOCA, AC_FUNC_ALLOCA, AC_FUNC_CHOWN,
AC_FUNC_CLOSEDIR_VOID, AC_FUNC_FNMATCH, AC_FUNC_GETGROUPS,
_AC_LIBOBJ_GETLOADAVG, AC_FUNC_GETLOADAVG, AC_FUNC_GETMNTENT,
AC_FUNC_GETPGRP, AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK,
AC_FUNC_MALLOC, AC_FUNC_MEMCMP, AC_FUNC_MKTIME, AC_FUNC_MMAP,
AC_FUNC_SELECT_ARGTYPES, AC_FUNC_SETPGRP, _AC_FUNC_STAT,
AC_FUNC_STAT, AC_FUNC_LSTAT, AC_FUNC_STRERROR_R, AC_FUNC_STRFTIME,
AC_FUNC_VFORK, AC_FUNC_VPRINTF, AC_FUNC_WAIT3, AC_FUNC_UTIME_NULL,
AC_FUNC_STRCOLL, AC_FUNC_SETVBUF_REVERSED): Likewise.
* Makefile.am: Adjust.
Move also the old definitions into acfunctions.m4, and adjust the
test suite.
* acgeneral.m4 (AU_ALIAS): New macro.
* acoldnames (AC_FUNC_CHECK, AC_HAVE_FUNCS, AC_ALLOCA,
AC_GETLOADAVG, AC_MMAP, AC_SETVBUF_REVERSED, AC_STRCOLL,
AC_UTIME_NULL, AC_VFORK, AC_VPRINTF, AC_WAIT3, AM_FUNC_FNMATCH,
AM_FUNC_MKTIME, fp_FUNC_FNMATCH): Move to...
* acfunctions.m4: here, using AU_ALIAS.
* acgeneral.m4 (AC_FD_CC, AC_CANONICAL_SYSTEM): Use AU_ALIAS to
define them.
* acoldnames.m4: Use AU_ALIAS instead of AU_DEFUN.
* tests/Makefile.am (MACRO_FILES): Adjust.
2000-08-01 18:13:14 +08:00
|
|
|
AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET])
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-01-15 02:15:57 +08:00
|
|
|
|
2000-08-01 20:20:14 +08:00
|
|
|
# AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
|
|
|
|
# ------------------------------------------
|
2000-02-08 02:03:54 +08:00
|
|
|
# If the cache file is inconsistent with the current host,
|
|
|
|
# target and build system types, execute CMD or print a default
|
2000-08-01 20:20:14 +08:00
|
|
|
# error message. Now handled via _AC_ARG_VAR_PRECIOUS.
|
|
|
|
AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], [])
|
1998-10-01 15:35:22 +08:00
|
|
|
|
|
|
|
|
2000-02-08 18:46:43 +08:00
|
|
|
## ---------------------- ##
|
|
|
|
## Caching test results. ##
|
|
|
|
## ---------------------- ##
|
1994-09-01 12:59:32 +08:00
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_SITE_LOAD
|
|
|
|
# ------------
|
|
|
|
# Look for site or system specific initialization scripts.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_SITE_LOAD],
|
1994-08-23 23:04:53 +08:00
|
|
|
[# Prefer explicitly selected file to automatically selected ones.
|
1994-09-07 13:45:16 +08:00
|
|
|
if test -z "$CONFIG_SITE"; then
|
1994-08-23 23:04:53 +08:00
|
|
|
if test "x$prefix" != xNONE; then
|
1994-10-19 08:29:13 +08:00
|
|
|
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
|
1994-08-23 23:04:53 +08:00
|
|
|
else
|
1994-10-19 08:29:13 +08:00
|
|
|
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
|
1994-08-23 23:04:53 +08:00
|
|
|
fi
|
1994-06-23 02:22:34 +08:00
|
|
|
fi
|
1994-08-23 23:04:53 +08:00
|
|
|
for ac_site_file in $CONFIG_SITE; do
|
1994-06-23 02:22:34 +08:00
|
|
|
if test -r "$ac_site_file"; then
|
2001-01-29 17:23:11 +08:00
|
|
|
AC_MSG_NOTICE([loading site script $ac_site_file])
|
|
|
|
cat "$ac_site_file" >&AS_MESSAGE_LOG_FD
|
1994-08-23 23:04:53 +08:00
|
|
|
. "$ac_site_file"
|
1994-06-23 02:22:34 +08:00
|
|
|
fi
|
|
|
|
done
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
2000-01-15 01:51:12 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_CACHE_LOAD
|
|
|
|
# -------------
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_CACHE_LOAD],
|
1994-06-23 02:22:34 +08:00
|
|
|
[if test -r "$cache_file"; then
|
2000-07-04 18:34:21 +08:00
|
|
|
# Some versions of bash will fail to source /dev/null (special
|
|
|
|
# files actually), so we avoid doing that.
|
|
|
|
if test -f "$cache_file"; then
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
AC_MSG_NOTICE([loading cache $cache_file])
|
2000-07-04 18:34:21 +08:00
|
|
|
case $cache_file in
|
|
|
|
[[\\/]]* | ?:[[\\/]]* ) . $cache_file;;
|
|
|
|
*) . ./$cache_file;;
|
|
|
|
esac
|
|
|
|
fi
|
1994-05-05 06:03:07 +08:00
|
|
|
else
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
AC_MSG_NOTICE([creating cache $cache_file])
|
1999-12-20 21:45:45 +08:00
|
|
|
>$cache_file
|
1994-08-13 10:19:11 +08:00
|
|
|
fi
|
2000-04-05 16:53:19 +08:00
|
|
|
])# AC_CACHE_LOAD
|
|
|
|
|
|
|
|
|
|
|
|
# _AC_CACHE_DUMP
|
|
|
|
# --------------
|
|
|
|
# Dump the cache to stdout. It can be in a pipe (this is a requirement).
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_CACHE_DUMP],
|
2000-04-05 16:53:19 +08:00
|
|
|
[# 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=\ *)
|
2000-10-25 00:54:48 +08:00
|
|
|
# `set' does not quote correctly, so add quotes (double-quote
|
|
|
|
# substitution turns \\\\ into \\, and sed turns \\ into \).
|
2000-04-05 16:53:19 +08:00
|
|
|
sed -n \
|
2000-10-25 03:24:40 +08:00
|
|
|
["s/'/'\\\\''/g;
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"]
|
2000-04-05 16:53:19 +08:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
# `set' quotes correctly as required by POSIX, so do not add quotes.
|
2000-10-25 00:54:48 +08:00
|
|
|
sed -n \
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
["s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"]
|
2000-04-05 16:53:19 +08:00
|
|
|
;;
|
|
|
|
esac;
|
|
|
|
}dnl
|
|
|
|
])# _AC_CACHE_DUMP
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-01-15 01:51:12 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_CACHE_SAVE
|
|
|
|
# -------------
|
Changequote-busters!
From Dan Ackroyd.
* acgeneral.m4 (AC_INIT_PARSE_ARGS, AC_INIT_PREPARE,
AC_CACHE_SAVE, AC_PREFIX_PROGRAM, AC_OUTPUT,
_AC_OUTPUT_CONFIG_STATUS, AC_OUTPUT_MAKE_DEFS, AC_OUTPUT_FILES,
_AC_OUTPUT_HEADERS, AC_OUTPUT_LINKS, AC_OUTPUT_SUBDIRS): Quit
playing with changequotes, @BKL@ and Co.! Just quote properly.
2000-02-10 18:40:19 +08:00
|
|
|
# Save the cache.
|
|
|
|
# Allow a site initialization script to override cache values.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_CACHE_SAVE],
|
2000-11-30 01:43:00 +08:00
|
|
|
[cat >confcache <<\_ACEOF
|
1994-05-10 23:03:49 +08:00
|
|
|
# This file is a shell script that caches the results of configure
|
1994-05-05 06:03:07 +08:00
|
|
|
# tests run on this system so they can be shared between configure
|
2000-07-31 17:21:33 +08:00
|
|
|
# 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.
|
1994-09-10 04:22:01 +08:00
|
|
|
#
|
2000-07-31 17:21:33 +08:00
|
|
|
# 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 overriden when
|
|
|
|
# loading this file, other *unset* `ac_cv_foo' will be assigned the
|
|
|
|
# following values.
|
|
|
|
|
2000-11-30 01:43:00 +08:00
|
|
|
_ACEOF
|
|
|
|
|
2000-04-05 16:53:19 +08:00
|
|
|
_AC_CACHE_DUMP() |
|
2000-11-30 01:43:00 +08:00
|
|
|
sed ['
|
2000-11-30 01:57:55 +08:00
|
|
|
t clear
|
|
|
|
: clear
|
2000-11-30 01:43:00 +08:00
|
|
|
s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
|
2000-11-30 01:57:55 +08:00
|
|
|
t end
|
2000-11-30 01:43:00 +08:00
|
|
|
/^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
|
2000-11-30 01:57:55 +08:00
|
|
|
: end'] >>confcache
|
2000-02-07 20:04:39 +08:00
|
|
|
if cmp -s $cache_file confcache; then :; else
|
1995-03-07 08:19:27 +08:00
|
|
|
if test -w $cache_file; then
|
2000-04-05 15:42:06 +08:00
|
|
|
test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
|
1999-12-20 21:45:45 +08:00
|
|
|
cat confcache >$cache_file
|
1995-03-07 08:19:27 +08:00
|
|
|
else
|
|
|
|
echo "not updating unwritable cache $cache_file"
|
|
|
|
fi
|
1994-08-13 10:19:11 +08:00
|
|
|
fi
|
2000-04-05 16:53:19 +08:00
|
|
|
rm -f confcache[]dnl
|
|
|
|
])# AC_CACHE_SAVE
|
|
|
|
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
|
|
|
|
# ------------------------------------------
|
|
|
|
# The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
|
2000-06-26 17:08:13 +08:00
|
|
|
# Should be dnl'ed. Try to catch common mistakes.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_CACHE_VAL],
|
2000-12-06 16:58:41 +08:00
|
|
|
[m4_if(m4_regexp([$2], [AC_DEFINE]), [-1], [],
|
|
|
|
[AC_DIAGNOSE(syntax,
|
2000-06-26 17:08:13 +08:00
|
|
|
[$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl
|
|
|
|
[where no actions should be taken])])dnl
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
AS_VAR_SET_IF([$1],
|
|
|
|
[echo $ECHO_N "(cached) $ECHO_C" >&AS_MESSAGE_FD],
|
|
|
|
[$2])])
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-01-15 01:51:12 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
|
|
|
|
# -------------------------------------------
|
|
|
|
# Do not call this macro with a dnl right behind.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_CACHE_CHECK],
|
1995-06-29 04:19:08 +08:00
|
|
|
[AC_MSG_CHECKING([$1])
|
1999-10-30 22:17:20 +08:00
|
|
|
AC_CACHE_VAL([$2], [$3])dnl
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
AC_MSG_RESULT_UNQUOTED([AS_VAR_GET([$2])])])
|
1995-06-29 04:19:08 +08:00
|
|
|
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-02-08 18:46:43 +08:00
|
|
|
|
2000-03-14 16:21:48 +08:00
|
|
|
## ---------------------- ##
|
|
|
|
## Defining CPP symbols. ##
|
|
|
|
## ---------------------- ##
|
1994-09-01 12:59:32 +08:00
|
|
|
|
|
|
|
|
2000-10-24 02:32:17 +08:00
|
|
|
# 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.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_DEFINE_TRACE_LITERAL])
|
2000-10-24 02:32:17 +08:00
|
|
|
|
|
|
|
|
|
|
|
# AC_DEFINE_TRACE(CPP-SYMBOL)
|
|
|
|
# ---------------------------
|
|
|
|
# This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters
|
|
|
|
# out non literal symbols.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_DEFINE_TRACE],
|
2001-01-15 15:29:24 +08:00
|
|
|
[AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL([$1])])])
|
2000-10-24 02:32:17 +08:00
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# 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.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_DEFINE],
|
2000-10-24 02:32:17 +08:00
|
|
|
[AC_DEFINE_TRACE([$1])dnl
|
2001-02-27 05:37:13 +08:00
|
|
|
m4_ifval([$3], [_AH_TEMPLATE_OLD([$1], [$3])])dnl
|
2000-03-30 00:48:00 +08:00
|
|
|
cat >>confdefs.h <<\EOF
|
2000-12-06 16:58:41 +08:00
|
|
|
[@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
|
1994-08-24 14:41:01 +08:00
|
|
|
EOF
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION])
|
|
|
|
# ----------------------------------------------------
|
|
|
|
# Similar, but perform shell substitutions $ ` \ once on VALUE.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_DEFINE_UNQUOTED],
|
2000-10-24 02:32:17 +08:00
|
|
|
[AC_DEFINE_TRACE([$1])dnl
|
2001-02-27 05:37:13 +08:00
|
|
|
m4_ifval([$3], [_AH_TEMPLATE_OLD([$1], [$3])])dnl
|
2000-03-30 00:48:00 +08:00
|
|
|
cat >>confdefs.h <<EOF
|
2000-12-06 16:58:41 +08:00
|
|
|
[@%:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
|
1994-08-24 14:41:01 +08:00
|
|
|
EOF
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-09-16 10:03:51 +08:00
|
|
|
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-02-08 18:46:43 +08:00
|
|
|
## -------------------------- ##
|
|
|
|
## Setting output variables. ##
|
|
|
|
## -------------------------- ##
|
1994-09-16 10:03:51 +08:00
|
|
|
|
|
|
|
|
2000-02-10 17:40:09 +08:00
|
|
|
# _AC_SUBST(VARIABLE, PROGRAM)
|
|
|
|
# ----------------------------
|
|
|
|
# If VARIABLE has not already been AC_SUBST'ed, append the sed PROGRAM
|
|
|
|
# to `_AC_SUBST_SED_PROGRAM'.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_SUBST],
|
2001-01-24 01:04:35 +08:00
|
|
|
[m4_expand_once([m4_append([_AC_SUBST_SED_PROGRAM],
|
2000-02-10 17:40:09 +08:00
|
|
|
[$2
|
2000-03-21 20:09:31 +08:00
|
|
|
])])dnl
|
|
|
|
])
|
2000-02-10 17:40:09 +08:00
|
|
|
|
|
|
|
# Initialize.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_SUBST_SED_PROGRAM])
|
2000-02-10 17:40:09 +08:00
|
|
|
|
|
|
|
|
2000-03-14 16:09:32 +08:00
|
|
|
# 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.
|
|
|
|
#
|
2000-02-08 02:03:54 +08:00
|
|
|
# Beware that if you change this macro, you also have to change the
|
2000-03-14 16:27:19 +08:00
|
|
|
# sed script at the top of _AC_OUTPUT_FILES.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_SUBST],
|
2000-11-29 18:09:44 +08:00
|
|
|
[m4_ifvaln([$2], [$1=$2])[]dnl
|
2000-07-10 16:43:55 +08:00
|
|
|
_AC_SUBST([$1], [s,@$1@,[$]$1,;t t])dnl
|
2000-03-14 16:09:32 +08:00
|
|
|
])# AC_SUBST
|
2000-02-10 17:40:09 +08:00
|
|
|
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_SUBST_FILE(VARIABLE)
|
|
|
|
# -----------------------
|
|
|
|
# Read the comments of the preceding macro.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_SUBST_FILE],
|
2000-02-10 17:40:09 +08:00
|
|
|
[_AC_SUBST([$1], [/@$1@/r [$]$1
|
2000-07-10 16:43:55 +08:00
|
|
|
s,@$1@,,;t t])])
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-01-15 01:51:12 +08:00
|
|
|
|
2000-02-10 17:40:55 +08:00
|
|
|
|
2000-02-08 18:46:43 +08:00
|
|
|
## --------------------------------------- ##
|
|
|
|
## 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.
|
1999-10-30 22:17:20 +08:00
|
|
|
|
Provide a fine grained control over autoconf's warnings.
* acgeneral.m4 (AC_WARNING_IFELSE, _AC_DIAGNOSE, AC_DIAGNOSE):
New macros.
(AC_DEFUN_ONCE, AC_OBSOLETE, AC_BEFORE, AU_DEFUN, AC_PREREQ,
AC_WARNING, AC_FATAL, AC_TRY_RUN): Use AC_DIAGNOSE.
* autoconf.sh: Provide support for `--warnings', `-W'.
* doc/autoconf.texi (Invoking autoconf): Adjust.
(Reporting Messages): New section.
2000-04-13 16:25:11 +08:00
|
|
|
|
|
|
|
# AC_DIAGNOSE(CATEGORY, MESSAGE)
|
Various cleanups and consistency checks.
* m4sugar.m4: Formatting changes.
* acgeneral.m4 (AC_DIVERT_PUSH, AC_DIVERT_POP, AC_REQUIRE)
(AC_DIAGNOSE, AC_FATAL, AC_MSG_WARN, AC_MSG_NOTICE, AC_MSG_ERROR):
Use m4_copy to define them, in order to keep a good $0.
(AC_INIT): AC_LANG_PUSH C, not AC_LANG, to initialize the stack.
* aclang.m4 (AC_LANG_PUSH): Dont't use m4_defn on undefined macros.
(AC_LANG_POP): Admit an argument specifying the language we quit
when popping.
Adjust Autoconf's AC_LANG_POPs.
* tests/tools.at (AWK portability): Don't depend on AC_INIT.
(autoconf --trace: user macros): Obviously I
meant TRACE1, not AC_TRACE1.
2001-01-18 17:15:31 +08:00
|
|
|
# AC_FATAL(MESSAGE, [EXIT-STATUS])
|
|
|
|
# --------------------------------
|
|
|
|
m4_copy([m4_warn], [AC_DIAGNOSE])
|
|
|
|
m4_copy([m4_fatal], [AC_FATAL])
|
Provide a fine grained control over autoconf's warnings.
* acgeneral.m4 (AC_WARNING_IFELSE, _AC_DIAGNOSE, AC_DIAGNOSE):
New macros.
(AC_DEFUN_ONCE, AC_OBSOLETE, AC_BEFORE, AU_DEFUN, AC_PREREQ,
AC_WARNING, AC_FATAL, AC_TRY_RUN): Use AC_DIAGNOSE.
* autoconf.sh: Provide support for `--warnings', `-W'.
* doc/autoconf.texi (Invoking autoconf): Adjust.
(Reporting Messages): New section.
2000-04-13 16:25:11 +08:00
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_WARNING(MESSAGE)
|
Provide a fine grained control over autoconf's warnings.
* acgeneral.m4 (AC_WARNING_IFELSE, _AC_DIAGNOSE, AC_DIAGNOSE):
New macros.
(AC_DEFUN_ONCE, AC_OBSOLETE, AC_BEFORE, AU_DEFUN, AC_PREREQ,
AC_WARNING, AC_FATAL, AC_TRY_RUN): Use AC_DIAGNOSE.
* autoconf.sh: Provide support for `--warnings', `-W'.
* doc/autoconf.texi (Invoking autoconf): Adjust.
(Reporting Messages): New section.
2000-04-13 16:25:11 +08:00
|
|
|
# -------------------
|
|
|
|
# Report a MESSAGE to the user of autoconf if `-W' or `-W all' was
|
|
|
|
# specified.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_WARNING],
|
2000-10-31 23:20:15 +08:00
|
|
|
[AC_DIAGNOSE([syntax], [$1])])
|
Provide a fine grained control over autoconf's warnings.
* acgeneral.m4 (AC_WARNING_IFELSE, _AC_DIAGNOSE, AC_DIAGNOSE):
New macros.
(AC_DEFUN_ONCE, AC_OBSOLETE, AC_BEFORE, AU_DEFUN, AC_PREREQ,
AC_WARNING, AC_FATAL, AC_TRY_RUN): Use AC_DIAGNOSE.
* autoconf.sh: Provide support for `--warnings', `-W'.
* doc/autoconf.texi (Invoking autoconf): Adjust.
(Reporting Messages): New section.
2000-04-13 16:25:11 +08:00
|
|
|
|
1999-10-30 22:17:20 +08:00
|
|
|
|
|
|
|
|
2000-02-08 18:46:43 +08:00
|
|
|
|
|
|
|
## ---------------------------------------- ##
|
|
|
|
## Printing messages at configure runtime. ##
|
|
|
|
## ---------------------------------------- ##
|
2000-02-08 02:03:54 +08:00
|
|
|
|
2000-05-03 16:53:06 +08:00
|
|
|
|
Move AC_MSG_* into M4sh.
* acgeneral.m4 (_AC_SH_QUOTE, _AC_SH_QUOTE_IFELSE, _AC_ECHO): Move
to...
* m4sh.m4 (_AS_QUOTE, _AS_QUOTE_IFELSE, _AS_ECHO): here.
(AS_MESSAGE, AS_WARN, AS_ERROR): New.
* acgeneral.m4 (AC_MSG_NOTICE, AC_MSG_WARN, AC_MSG_ERROR): Use them.
(AC_FD_MSG, AC_FD_LOG): Be AU_ALIAS'es of...
(AS_MESSAGE_FD, AS_MESSAGE_LOG_FD): new.
Adjust all dependencies.
2000-11-14 18:11:43 +08:00
|
|
|
# _AC_ECHO_N(STRING, [FD = AS_MESSAGE_FD])
|
2000-04-11 18:13:05 +08:00
|
|
|
# ------------------------------------
|
Move AC_MSG_* into M4sh.
* acgeneral.m4 (_AC_SH_QUOTE, _AC_SH_QUOTE_IFELSE, _AC_ECHO): Move
to...
* m4sh.m4 (_AS_QUOTE, _AS_QUOTE_IFELSE, _AS_ECHO): here.
(AS_MESSAGE, AS_WARN, AS_ERROR): New.
* acgeneral.m4 (AC_MSG_NOTICE, AC_MSG_WARN, AC_MSG_ERROR): Use them.
(AC_FD_MSG, AC_FD_LOG): Be AU_ALIAS'es of...
(AS_MESSAGE_FD, AS_MESSAGE_LOG_FD): new.
Adjust all dependencies.
2000-11-14 18:11:43 +08:00
|
|
|
# Same as _AS_ECHO, but echo doesn't return to a new line.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_ECHO_N],
|
Move AC_MSG_* into M4sh.
* acgeneral.m4 (_AC_SH_QUOTE, _AC_SH_QUOTE_IFELSE, _AC_ECHO): Move
to...
* m4sh.m4 (_AS_QUOTE, _AS_QUOTE_IFELSE, _AS_ECHO): here.
(AS_MESSAGE, AS_WARN, AS_ERROR): New.
* acgeneral.m4 (AC_MSG_NOTICE, AC_MSG_WARN, AC_MSG_ERROR): Use them.
(AC_FD_MSG, AC_FD_LOG): Be AU_ALIAS'es of...
(AS_MESSAGE_FD, AS_MESSAGE_LOG_FD): new.
Adjust all dependencies.
2000-11-14 18:11:43 +08:00
|
|
|
[echo $ECHO_N "_AS_QUOTE([$1])$ECHO_C" >&m4_default([$2],
|
|
|
|
[AS_MESSAGE_FD])])
|
2000-08-07 20:06:49 +08:00
|
|
|
|
|
|
|
|
2000-04-11 18:13:05 +08:00
|
|
|
# AC_MSG_CHECKING(FEATURE)
|
|
|
|
# ------------------------
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_MSG_CHECKING],
|
Move AC_MSG_* into M4sh.
* acgeneral.m4 (_AC_SH_QUOTE, _AC_SH_QUOTE_IFELSE, _AC_ECHO): Move
to...
* m4sh.m4 (_AS_QUOTE, _AS_QUOTE_IFELSE, _AS_ECHO): here.
(AS_MESSAGE, AS_WARN, AS_ERROR): New.
* acgeneral.m4 (AC_MSG_NOTICE, AC_MSG_WARN, AC_MSG_ERROR): Use them.
(AC_FD_MSG, AC_FD_LOG): Be AU_ALIAS'es of...
(AS_MESSAGE_FD, AS_MESSAGE_LOG_FD): new.
Adjust all dependencies.
2000-11-14 18:11:43 +08:00
|
|
|
[_AS_ECHO([$as_me:__oline__: checking $1], AS_MESSAGE_LOG_FD)
|
2000-04-11 18:13:05 +08:00
|
|
|
_AC_ECHO_N([checking $1... ])[]dnl
|
|
|
|
])
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-03-03 00:27:51 +08:00
|
|
|
|
2000-04-11 18:13:05 +08:00
|
|
|
# AC_MSG_RESULT(RESULT)
|
|
|
|
# ---------------------
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_MSG_RESULT],
|
Move AC_MSG_* into M4sh.
* acgeneral.m4 (_AC_SH_QUOTE, _AC_SH_QUOTE_IFELSE, _AC_ECHO): Move
to...
* m4sh.m4 (_AS_QUOTE, _AS_QUOTE_IFELSE, _AS_ECHO): here.
(AS_MESSAGE, AS_WARN, AS_ERROR): New.
* acgeneral.m4 (AC_MSG_NOTICE, AC_MSG_WARN, AC_MSG_ERROR): Use them.
(AC_FD_MSG, AC_FD_LOG): Be AU_ALIAS'es of...
(AS_MESSAGE_FD, AS_MESSAGE_LOG_FD): new.
Adjust all dependencies.
2000-11-14 18:11:43 +08:00
|
|
|
[_AS_ECHO([$as_me:__oline__: result: $1], AS_MESSAGE_LOG_FD)
|
|
|
|
_AS_ECHO([${ECHO_T}$1])[]dnl
|
2000-04-11 18:13:05 +08:00
|
|
|
])
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-03-03 00:27:51 +08:00
|
|
|
|
2000-04-11 18:13:05 +08:00
|
|
|
# AC_MSG_RESULT_UNQUOTED(RESULT)
|
|
|
|
# ------------------------------
|
2000-02-08 02:03:54 +08:00
|
|
|
# Likewise, but perform $ ` \ shell substitutions.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_MSG_RESULT_UNQUOTED],
|
Move AC_MSG_* into M4sh.
* acgeneral.m4 (_AC_SH_QUOTE, _AC_SH_QUOTE_IFELSE, _AC_ECHO): Move
to...
* m4sh.m4 (_AS_QUOTE, _AS_QUOTE_IFELSE, _AS_ECHO): here.
(AS_MESSAGE, AS_WARN, AS_ERROR): New.
* acgeneral.m4 (AC_MSG_NOTICE, AC_MSG_WARN, AC_MSG_ERROR): Use them.
(AC_FD_MSG, AC_FD_LOG): Be AU_ALIAS'es of...
(AS_MESSAGE_FD, AS_MESSAGE_LOG_FD): new.
Adjust all dependencies.
2000-11-14 18:11:43 +08:00
|
|
|
[_AS_ECHO_UNQUOTED([$as_me:__oline__: result: $1], AS_MESSAGE_LOG_FD)
|
|
|
|
_AS_ECHO_UNQUOTED([${ECHO_T}$1])[]dnl
|
2000-04-11 18:13:05 +08:00
|
|
|
])
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-03-03 00:27:51 +08:00
|
|
|
|
2000-04-11 18:13:05 +08:00
|
|
|
# AC_MSG_WARN(PROBLEM)
|
Move AC_MSG_* into M4sh.
* acgeneral.m4 (_AC_SH_QUOTE, _AC_SH_QUOTE_IFELSE, _AC_ECHO): Move
to...
* m4sh.m4 (_AS_QUOTE, _AS_QUOTE_IFELSE, _AS_ECHO): here.
(AS_MESSAGE, AS_WARN, AS_ERROR): New.
* acgeneral.m4 (AC_MSG_NOTICE, AC_MSG_WARN, AC_MSG_ERROR): Use them.
(AC_FD_MSG, AC_FD_LOG): Be AU_ALIAS'es of...
(AS_MESSAGE_FD, AS_MESSAGE_LOG_FD): new.
Adjust all dependencies.
2000-11-14 18:11:43 +08:00
|
|
|
# AC_MSG_NOTICE(STRING)
|
2000-04-11 18:13:05 +08:00
|
|
|
# AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1])
|
|
|
|
# --------------------------------------
|
Various cleanups and consistency checks.
* m4sugar.m4: Formatting changes.
* acgeneral.m4 (AC_DIVERT_PUSH, AC_DIVERT_POP, AC_REQUIRE)
(AC_DIAGNOSE, AC_FATAL, AC_MSG_WARN, AC_MSG_NOTICE, AC_MSG_ERROR):
Use m4_copy to define them, in order to keep a good $0.
(AC_INIT): AC_LANG_PUSH C, not AC_LANG, to initialize the stack.
* aclang.m4 (AC_LANG_PUSH): Dont't use m4_defn on undefined macros.
(AC_LANG_POP): Admit an argument specifying the language we quit
when popping.
Adjust Autoconf's AC_LANG_POPs.
* tests/tools.at (AWK portability): Don't depend on AC_INIT.
(autoconf --trace: user macros): Obviously I
meant TRACE1, not AC_TRACE1.
2001-01-18 17:15:31 +08:00
|
|
|
m4_copy([AS_WARN], [AC_MSG_WARN])
|
|
|
|
m4_copy([AS_MESSAGE], [AC_MSG_NOTICE])
|
|
|
|
m4_copy([AS_ERROR], [AC_MSG_ERROR])
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-03-03 00:27:51 +08:00
|
|
|
|
2000-08-07 20:06:49 +08:00
|
|
|
# AU::AC_CHECKING(FEATURE)
|
|
|
|
# ------------------------
|
2000-11-07 18:50:29 +08:00
|
|
|
AU_DEFUN([AC_CHECKING],
|
Move AC_MSG_* into M4sh.
* acgeneral.m4 (_AC_SH_QUOTE, _AC_SH_QUOTE_IFELSE, _AC_ECHO): Move
to...
* m4sh.m4 (_AS_QUOTE, _AS_QUOTE_IFELSE, _AS_ECHO): here.
(AS_MESSAGE, AS_WARN, AS_ERROR): New.
* acgeneral.m4 (AC_MSG_NOTICE, AC_MSG_WARN, AC_MSG_ERROR): Use them.
(AC_FD_MSG, AC_FD_LOG): Be AU_ALIAS'es of...
(AS_MESSAGE_FD, AS_MESSAGE_LOG_FD): new.
Adjust all dependencies.
2000-11-14 18:11:43 +08:00
|
|
|
[AS_MESSAGE([checking $1...])])
|
2000-08-07 20:06:49 +08:00
|
|
|
|
|
|
|
|
|
|
|
# AU::AC_VERBOSE(STRING)
|
|
|
|
# ----------------------
|
|
|
|
AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT])
|
|
|
|
|
2000-03-03 00:27:51 +08:00
|
|
|
|
|
|
|
|
2000-03-25 17:05:22 +08:00
|
|
|
|
2000-03-03 00:27:51 +08:00
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
## ---------------------------- ##
|
|
|
|
## Compiler-running mechanics. ##
|
|
|
|
## ---------------------------- ##
|
1996-01-11 23:42:38 +08:00
|
|
|
|
|
|
|
|
2001-02-06 23:11:50 +08:00
|
|
|
# _AC_RUN_LOG(COMMAND, LOG-COMMANDS)
|
|
|
|
# ----------------------------------
|
2000-12-15 15:47:29 +08:00
|
|
|
# Eval COMMAND, save the exit status in ac_status, and log it.
|
2001-02-06 23:11:50 +08:00
|
|
|
AC_DEFUN([_AC_RUN_LOG],
|
|
|
|
[{ ($2) >&AS_MESSAGE_LOG_FD
|
|
|
|
($1) 2>&AS_MESSAGE_LOG_FD
|
2000-12-22 18:12:26 +08:00
|
|
|
ac_status=$?
|
|
|
|
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
|
|
|
|
(exit $ac_status); }])
|
2000-12-15 15:47:29 +08:00
|
|
|
|
|
|
|
|
2001-02-06 23:11:50 +08:00
|
|
|
# _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS)
|
|
|
|
# -----------------------------------------
|
2001-01-17 04:46:00 +08:00
|
|
|
# Eval COMMAND, save its stderr into conftest.err, save the exit status
|
|
|
|
# in ac_status, and log it.
|
|
|
|
# Note that when tracing, most shells will leave the traces in stderr
|
2001-02-06 23:11:50 +08:00
|
|
|
AC_DEFUN([_AC_RUN_LOG_STDERR],
|
|
|
|
[{ ($2) >&AS_MESSAGE_LOG_FD
|
|
|
|
($1) 2>conftest.er1
|
2001-01-17 04:46:00 +08:00
|
|
|
ac_status=$?
|
|
|
|
egrep -v '^ *\+' conftest.er1 >conftest.err
|
|
|
|
rm -f conftest.er1
|
|
|
|
cat conftest.err >&AS_MESSAGE_LOG_FD
|
|
|
|
echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
|
|
|
|
(exit $ac_status); }])
|
|
|
|
|
|
|
|
|
2001-02-06 23:11:50 +08:00
|
|
|
# _AC_EVAL(COMMAND)
|
|
|
|
# -----------------
|
|
|
|
# Eval COMMAND, save the exit status in ac_status, and log it.
|
|
|
|
AC_DEFUN([_AC_EVAL],
|
|
|
|
[_AC_RUN_LOG([eval $1],
|
|
|
|
[eval echo "$as_me:__oline__: \"$1\""])])
|
|
|
|
|
|
|
|
|
|
|
|
# _AC_EVAL_STDERR(COMMAND)
|
|
|
|
# ------------------------
|
|
|
|
# Eval COMMAND, save its stderr into conftest.err, save the exit status
|
|
|
|
# in ac_status, and log it.
|
|
|
|
# Note that when tracing, most shells will leave the traces in stderr
|
|
|
|
AC_DEFUN([_AC_EVAL_STDERR],
|
|
|
|
[_AC_RUN_LOG_STDERR([eval $1],
|
|
|
|
[eval echo "$as_me:__oline__: \"$1\""])])
|
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_TRY_EVAL(VARIABLE)
|
|
|
|
# ---------------------
|
|
|
|
# The purpose of this macro is to "configure:123: command line"
|
|
|
|
# written into config.log for every test run.
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_TRY_EVAL],
|
2001-01-31 23:00:35 +08:00
|
|
|
[_AC_EVAL([$$1])])
|
1996-01-11 23:42:38 +08:00
|
|
|
|
2000-02-08 21:06:17 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_TRY_COMMAND(COMMAND)
|
|
|
|
# -----------------------
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_TRY_COMMAND],
|
2001-02-06 23:11:50 +08:00
|
|
|
[{ ac_try='$1'
|
|
|
|
_AC_EVAL([$ac_try]); }])
|
|
|
|
|
|
|
|
|
|
|
|
# AC_RUN_LOG(COMMAND)
|
|
|
|
# -------------------
|
|
|
|
AC_DEFUN([AC_RUN_LOG],
|
|
|
|
[_AC_RUN_LOG([$1],
|
|
|
|
[echo "$as_me:__oline__: AS_ESCAPE([$1])"])])
|
1996-01-11 23:42:38 +08:00
|
|
|
|
|
|
|
|
2000-02-08 21:06:17 +08:00
|
|
|
## ------------------ ##
|
|
|
|
## Default includes. ##
|
|
|
|
## ------------------ ##
|
2000-02-08 17:19:18 +08:00
|
|
|
|
|
|
|
# Always use the same set of default headers for all the generic
|
|
|
|
# macros. It is easier to document, to extend, and to understand than
|
|
|
|
# having specific defaults for each macro.
|
|
|
|
|
2001-01-16 18:21:44 +08:00
|
|
|
# _AC_INCLUDES_DEFAULT_REQUIREMENTS
|
|
|
|
# ---------------------------------
|
|
|
|
# Required when AC_INCLUDES_DEFAULT uses its default branch.
|
|
|
|
AC_DEFUN([_AC_INCLUDES_DEFAULT_REQUIREMENTS],
|
|
|
|
[m4_divert_text([DEFAULTS],
|
|
|
|
[# Factoring default headers for most tests.
|
|
|
|
dnl If ever you change this variable, please keep autoconf.texi in sync.
|
|
|
|
ac_includes_default="\
|
|
|
|
#include <stdio.h>
|
2001-06-13 16:45:39 +08:00
|
|
|
#if HAVE_SYS_TYPES_H
|
|
|
|
# include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
#if HAVE_SYS_STAT_H
|
|
|
|
# include <sys/stat.h>
|
|
|
|
#endif
|
2001-01-16 18:21:44 +08:00
|
|
|
#if STDC_HEADERS
|
|
|
|
# include <stdlib.h>
|
|
|
|
# include <stddef.h>
|
|
|
|
#else
|
|
|
|
# if HAVE_STDLIB_H
|
|
|
|
# include <stdlib.h>
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
#if HAVE_STRING_H
|
|
|
|
# if !STDC_HEADERS && HAVE_MEMORY_H
|
|
|
|
# include <memory.h>
|
|
|
|
# endif
|
|
|
|
# include <string.h>
|
|
|
|
#else
|
|
|
|
# if HAVE_STRINGS_H
|
|
|
|
# include <strings.h>
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
#if HAVE_INTTYPES_H
|
|
|
|
# include <inttypes.h>
|
2001-05-31 15:32:27 +08:00
|
|
|
#else
|
|
|
|
# if HAVE_STDINT_H
|
|
|
|
# include <stdint.h>
|
|
|
|
# endif
|
2001-01-16 18:21:44 +08:00
|
|
|
#endif
|
|
|
|
#if HAVE_UNISTD_H
|
|
|
|
# include <unistd.h>
|
|
|
|
#endif"
|
|
|
|
])dnl
|
|
|
|
AC_REQUIRE([AC_HEADER_STDC])dnl
|
2001-06-13 16:45:39 +08:00
|
|
|
AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
|
|
|
|
inttypes.h stdint.h unistd.h],
|
|
|
|
[], [], $ac_includes_default)
|
2001-01-16 18:21:44 +08:00
|
|
|
])
|
2000-02-08 17:19:18 +08:00
|
|
|
|
2000-02-08 21:50:52 +08:00
|
|
|
|
2000-02-08 17:19:18 +08:00
|
|
|
# AC_INCLUDES_DEFAULT([INCLUDES])
|
|
|
|
# -------------------------------
|
|
|
|
# If INCLUDES is empty, expand in default includes, otherwise in
|
|
|
|
# INCLUDES.
|
2001-01-18 17:16:25 +08:00
|
|
|
# In most cases INCLUDES is not double quoted as it should, and if
|
|
|
|
# for instance INCLUDES = `#include <stdio.h>' then unless we force
|
|
|
|
# a newline, the hash will swallow the closing paren etc. etc.
|
|
|
|
# The usual failure.
|
|
|
|
# Take no risk: for the newline.
|
2001-01-16 18:21:44 +08:00
|
|
|
AC_DEFUN([AC_INCLUDES_DEFAULT],
|
2001-01-18 17:16:25 +08:00
|
|
|
[m4_ifval([$1], [$1
|
|
|
|
],
|
|
|
|
[AC_REQUIRE([_AC_INCLUDES_DEFAULT_REQUIREMENTS])dnl
|
2001-01-16 18:21:44 +08:00
|
|
|
$ac_includes_default])])
|
2000-02-08 17:19:18 +08:00
|
|
|
|
2000-03-03 00:27:51 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2000-02-08 18:46:43 +08:00
|
|
|
## ----------------------- ##
|
|
|
|
## Checking for programs. ##
|
|
|
|
## ----------------------- ##
|
1994-09-01 12:59:32 +08:00
|
|
|
|
|
|
|
|
2000-05-24 21:07:38 +08:00
|
|
|
# AC_SHELL_PATH_WALK([PATH = $PATH], BODY)
|
|
|
|
# ----------------------------------------
|
|
|
|
# Walk through PATH running BODY for each `ac_dir'.
|
|
|
|
#
|
|
|
|
# `$ac_dummy' forces splitting on constant user-supplied paths.
|
|
|
|
# POSIX.2 word splitting is done only on the output of word
|
|
|
|
# expansions, not every word. This closes a longstanding sh security
|
|
|
|
# hole.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_SHELL_PATH_WALK],
|
2001-02-06 01:33:00 +08:00
|
|
|
[ac_save_IFS=$IFS; IFS=$ac_path_separator
|
2000-05-24 21:07:38 +08:00
|
|
|
ac_dummy="m4_default([$1], [$PATH])"
|
2000-03-03 22:15:41 +08:00
|
|
|
for ac_dir in $ac_dummy; do
|
2000-05-24 21:07:38 +08:00
|
|
|
IFS=$ac_save_IFS
|
2000-03-03 22:15:41 +08:00
|
|
|
test -z "$ac_dir" && ac_dir=.
|
2000-05-24 21:07:38 +08:00
|
|
|
$2
|
2000-03-03 22:15:41 +08:00
|
|
|
done
|
|
|
|
])
|
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR,
|
|
|
|
# [VALUE-IF-FOUND], [VALUE-IF-NOT-FOUND],
|
|
|
|
# [PATH], [REJECT])
|
|
|
|
# -----------------------------------------------------
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_CHECK_PROG],
|
1994-05-18 03:26:10 +08:00
|
|
|
[# Extract the first word of "$2", so it can be a program name with args.
|
2000-05-05 21:29:47 +08:00
|
|
|
set dummy $2; ac_word=$[2]
|
1994-08-01 21:44:22 +08:00
|
|
|
AC_MSG_CHECKING([for $ac_word])
|
1994-06-23 02:22:34 +08:00
|
|
|
AC_CACHE_VAL(ac_cv_prog_$1,
|
2000-05-05 21:29:47 +08:00
|
|
|
[if test -n "$$1"; then
|
|
|
|
ac_cv_prog_$1="$$1" # Let the user override the test.
|
1994-05-10 23:03:49 +08:00
|
|
|
else
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifvaln([$6],
|
2000-08-04 17:04:29 +08:00
|
|
|
[ ac_prog_rejected=no])dnl
|
2000-05-24 21:07:38 +08:00
|
|
|
AC_SHELL_PATH_WALK([$5],
|
2001-01-24 16:24:44 +08:00
|
|
|
[AS_EXECUTABLE_P("$ac_dir/$ac_word") || continue
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifvaln([$6],
|
2000-05-24 21:07:38 +08:00
|
|
|
[if test "$ac_dir/$ac_word" = "$6"; then
|
|
|
|
ac_prog_rejected=yes
|
|
|
|
continue
|
2000-08-04 17:04:29 +08:00
|
|
|
fi])dnl
|
2000-05-24 21:07:38 +08:00
|
|
|
ac_cv_prog_$1="$3"
|
2001-04-12 00:29:14 +08:00
|
|
|
echo "$as_me:__oline__: found $ac_dir/$ac_word" >&AS_MESSAGE_LOG_FD
|
2000-05-24 21:07:38 +08:00
|
|
|
break])
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifvaln([$6],
|
2000-05-24 21:07:38 +08:00
|
|
|
[if test $ac_prog_rejected = yes; then
|
1996-01-17 05:57:23 +08:00
|
|
|
# We found a bogon in the path, so make sure we never use it.
|
2000-05-05 21:29:47 +08:00
|
|
|
set dummy $ac_cv_prog_$1
|
1996-01-17 05:57:23 +08:00
|
|
|
shift
|
2000-05-24 21:07:38 +08:00
|
|
|
if test $[@%:@] != 0; then
|
1996-01-17 05:57:23 +08:00
|
|
|
# We chose a different compiler from the bogus one.
|
|
|
|
# However, it has the same basename, so the bogon will be chosen
|
|
|
|
# first if we set $1 to just the basename; use the full file name.
|
|
|
|
shift
|
2000-05-24 21:07:38 +08:00
|
|
|
set dummy "$ac_dir/$ac_word" ${1+"$[@]"}
|
1996-01-17 05:57:23 +08:00
|
|
|
shift
|
2000-05-05 21:29:47 +08:00
|
|
|
ac_cv_prog_$1="$[@]"
|
2000-12-06 16:58:41 +08:00
|
|
|
m4_if([$2], [$4],
|
1996-01-17 05:57:23 +08:00
|
|
|
[ else
|
|
|
|
# Default is a loser.
|
|
|
|
AC_MSG_ERROR([$1=$6 unacceptable, but no other $4 found in dnl
|
2000-03-14 16:41:15 +08:00
|
|
|
m4_default([$5], [\$PATH])])
|
1996-01-17 05:57:23 +08:00
|
|
|
])dnl
|
|
|
|
fi
|
2000-08-04 17:04:29 +08:00
|
|
|
fi])dnl
|
1994-05-06 12:05:11 +08:00
|
|
|
dnl If no 4th arg is given, leave the cache variable unset,
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl so AC_CHECK_PROGS will keep looking.
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifvaln([$4],
|
2000-08-04 17:04:29 +08:00
|
|
|
[ test -z "$ac_cv_prog_$1" && ac_cv_prog_$1="$4"])dnl
|
1994-05-10 23:03:49 +08:00
|
|
|
fi])dnl
|
2000-04-11 20:00:13 +08:00
|
|
|
$1=$ac_cv_prog_$1
|
2000-05-05 21:29:47 +08:00
|
|
|
if test -n "$$1"; then
|
|
|
|
AC_MSG_RESULT([$$1])
|
1994-08-13 10:19:11 +08:00
|
|
|
else
|
2000-05-05 21:29:47 +08:00
|
|
|
AC_MSG_RESULT([no])
|
1994-08-13 10:19:11 +08:00
|
|
|
fi
|
1993-10-21 07:33:19 +08:00
|
|
|
AC_SUBST($1)dnl
|
2000-02-08 18:46:43 +08:00
|
|
|
])# AC_CHECK_PROG
|
1999-10-30 22:17:20 +08:00
|
|
|
|
|
|
|
|
2000-03-03 00:27:51 +08:00
|
|
|
# AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND],
|
|
|
|
# [PATH])
|
|
|
|
# ------------------------------------------------------------------
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_CHECK_PROGS],
|
1999-10-30 22:17:20 +08:00
|
|
|
[for ac_prog in $2
|
|
|
|
do
|
2000-10-17 17:08:32 +08:00
|
|
|
AC_CHECK_PROG([$1], [$ac_prog], [$ac_prog], , [$4])
|
|
|
|
test -n "$$1" && break
|
1999-10-30 22:17:20 +08:00
|
|
|
done
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifvaln([$3], [test -n "$$1" || $1="$3"])])
|
1999-10-30 22:17:20 +08:00
|
|
|
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-03-03 00:27:51 +08:00
|
|
|
# AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH])
|
|
|
|
# -----------------------------------------------------------------------
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_PATH_PROG],
|
1994-05-18 03:26:10 +08:00
|
|
|
[# Extract the first word of "$2", so it can be a program name with args.
|
2000-05-19 21:07:13 +08:00
|
|
|
set dummy $2; ac_word=$[2]
|
1994-08-01 21:44:22 +08:00
|
|
|
AC_MSG_CHECKING([for $ac_word])
|
2000-10-24 19:59:45 +08:00
|
|
|
AC_CACHE_VAL([ac_cv_path_$1],
|
2000-05-26 23:02:42 +08:00
|
|
|
[case $$1 in
|
2000-03-28 22:48:56 +08:00
|
|
|
[[\\/]]* | ?:[[\\/]]*)
|
2000-05-19 21:07:13 +08:00
|
|
|
ac_cv_path_$1="$$1" # Let the user override the test with a path.
|
1994-05-10 23:03:49 +08:00
|
|
|
;;
|
|
|
|
*)
|
2000-05-24 21:07:38 +08:00
|
|
|
AC_SHELL_PATH_WALK([$4],
|
2001-01-24 16:24:44 +08:00
|
|
|
[if AS_EXECUTABLE_P("$ac_dir/$ac_word"); then
|
2000-09-28 02:17:36 +08:00
|
|
|
ac_cv_path_$1="$ac_dir/$ac_word"
|
2001-04-12 00:29:14 +08:00
|
|
|
echo "$as_me:__oline__: found $ac_dir/$ac_word" >&AS_MESSAGE_LOG_FD
|
2000-05-24 21:07:38 +08:00
|
|
|
break
|
|
|
|
fi])
|
1994-05-06 12:05:11 +08:00
|
|
|
dnl If no 3rd arg is given, leave the cache variable unset,
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl so AC_PATH_PROGS will keep looking.
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifvaln([$3],
|
2000-08-04 17:04:29 +08:00
|
|
|
[ test -z "$ac_cv_path_$1" && ac_cv_path_$1="$3"])dnl
|
1994-05-10 23:03:49 +08:00
|
|
|
;;
|
|
|
|
esac])dnl
|
2000-10-17 17:08:32 +08:00
|
|
|
AC_SUBST([$1], [$ac_cv_path_$1])
|
2000-05-19 21:07:13 +08:00
|
|
|
if test -n "$$1"; then
|
2000-10-17 17:08:32 +08:00
|
|
|
AC_MSG_RESULT([$$1])
|
1994-08-13 10:19:11 +08:00
|
|
|
else
|
2000-10-17 17:08:32 +08:00
|
|
|
AC_MSG_RESULT([no])
|
1994-08-13 10:19:11 +08:00
|
|
|
fi
|
2000-02-08 18:46:43 +08:00
|
|
|
])# AC_PATH_PROG
|
1994-09-01 12:59:32 +08:00
|
|
|
|
|
|
|
|
2000-03-03 00:27:51 +08:00
|
|
|
# AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND],
|
|
|
|
# [PATH])
|
|
|
|
# -----------------------------------------------------------------
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_PATH_PROGS],
|
1994-03-18 16:02:20 +08:00
|
|
|
[for ac_prog in $2
|
1993-12-22 20:54:01 +08:00
|
|
|
do
|
2000-10-17 17:08:32 +08:00
|
|
|
AC_PATH_PROG([$1], [$ac_prog], , [$4])
|
|
|
|
test -n "$$1" && break
|
1993-12-22 20:54:01 +08:00
|
|
|
done
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifvaln([$3], [test -n "$$1" || $1="$3"])dnl
|
2000-08-04 17:04:29 +08:00
|
|
|
])
|
1994-09-01 12:59:32 +08:00
|
|
|
|
1999-10-30 22:17:20 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2000-02-08 18:46:43 +08:00
|
|
|
## -------------------- ##
|
|
|
|
## Checking for tools. ##
|
|
|
|
## -------------------- ##
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-03-03 00:36:16 +08:00
|
|
|
|
2000-06-05 18:04:15 +08:00
|
|
|
# AC_CHECK_TOOL_PREFIX
|
|
|
|
# --------------------
|
|
|
|
AU_DEFUN([AC_CHECK_TOOL_PREFIX])
|
|
|
|
|
|
|
|
|
2000-03-03 00:36:16 +08:00
|
|
|
# AC_PATH_TOOL(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH])
|
|
|
|
# -----------------------------------------------------------------------
|
2000-06-19 18:18:31 +08:00
|
|
|
# (Use different variables $1 and ac_pt_$1 so that cache vars don't conflict.)
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_PATH_TOOL],
|
2000-10-17 17:08:32 +08:00
|
|
|
[if test -n "$ac_tool_prefix"; then
|
|
|
|
AC_PATH_PROG([$1], [${ac_tool_prefix}$2], , [$4])
|
|
|
|
fi
|
2000-06-19 18:18:31 +08:00
|
|
|
if test -z "$ac_cv_path_$1"; then
|
2000-10-18 00:34:10 +08:00
|
|
|
ac_pt_$1=$$1
|
2000-10-17 17:08:32 +08:00
|
|
|
AC_PATH_PROG([ac_pt_$1], [$2], [$3], [$4])
|
2000-10-18 00:34:10 +08:00
|
|
|
$1=$ac_pt_$1
|
2000-10-30 12:04:18 +08:00
|
|
|
else
|
|
|
|
$1="$ac_cv_path_$1"
|
2000-06-19 18:18:31 +08:00
|
|
|
fi
|
2000-10-18 00:34:10 +08:00
|
|
|
])# AC_PATH_TOOL
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-02-08 18:46:43 +08:00
|
|
|
|
2000-03-03 00:36:16 +08:00
|
|
|
# AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND], [PATH])
|
|
|
|
# ------------------------------------------------------------------------
|
2000-06-19 18:18:31 +08:00
|
|
|
# (Use different variables $1 and ac_ct_$1 so that cache vars don't conflict.)
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_CHECK_TOOL],
|
2000-10-17 17:08:32 +08:00
|
|
|
[if test -n "$ac_tool_prefix"; then
|
|
|
|
AC_CHECK_PROG([$1], [${ac_tool_prefix}$2], [${ac_tool_prefix}$2], , [$4])
|
|
|
|
fi
|
1995-02-11 17:37:18 +08:00
|
|
|
if test -z "$ac_cv_prog_$1"; then
|
2000-10-18 00:34:10 +08:00
|
|
|
ac_ct_$1=$$1
|
2000-10-17 17:08:32 +08:00
|
|
|
AC_CHECK_PROG([ac_ct_$1], [$2], [$2], [$3], [$4])
|
2000-10-18 00:34:10 +08:00
|
|
|
$1=$ac_ct_$1
|
2000-10-30 12:04:18 +08:00
|
|
|
else
|
|
|
|
$1="$ac_cv_prog_$1"
|
2000-06-09 21:48:33 +08:00
|
|
|
fi
|
2000-10-18 00:34:10 +08:00
|
|
|
])# AC_CHECK_TOOL
|
1995-02-10 06:44:35 +08:00
|
|
|
|
2000-01-15 01:51:12 +08:00
|
|
|
|
2000-05-24 23:46:12 +08:00
|
|
|
# AC_CHECK_TOOLS(VARIABLE, PROGS-TO-CHECK-FOR, [VALUE-IF-NOT-FOUND],
|
|
|
|
# [PATH])
|
|
|
|
# ------------------------------------------------------------------
|
2000-06-09 21:20:32 +08:00
|
|
|
# Check for each tool in PROGS-TO-CHECK-FOR with the cross prefix. If
|
|
|
|
# none can be found with a cross prefix, then use the first one that
|
|
|
|
# was found without the cross prefix.
|
2000-05-24 23:46:12 +08:00
|
|
|
AC_DEFUN([AC_CHECK_TOOLS],
|
2000-10-17 17:08:32 +08:00
|
|
|
[if test -n "$ac_tool_prefix"; then
|
|
|
|
for ac_prog in $2
|
|
|
|
do
|
|
|
|
AC_CHECK_PROG([$1],
|
|
|
|
[$ac_tool_prefix$ac_prog], [$ac_tool_prefix$ac_prog],,
|
|
|
|
[$4])
|
2000-10-18 00:34:10 +08:00
|
|
|
test -n "$$1" && break
|
2000-10-17 17:08:32 +08:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
if test -z "$$1"; then
|
2000-10-18 00:34:10 +08:00
|
|
|
ac_ct_$1=$$1
|
|
|
|
AC_CHECK_PROGS([ac_ct_$1], [$2], [$3], [$4])
|
2000-10-19 01:16:10 +08:00
|
|
|
$1=$ac_ct_$1
|
2000-05-24 23:46:12 +08:00
|
|
|
fi
|
2000-06-09 21:20:32 +08:00
|
|
|
])# AC_CHECK_TOOLS
|
2000-05-24 23:46:12 +08:00
|
|
|
|
2000-06-05 18:04:15 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_PREFIX_PROGRAM(PROGRAM)
|
|
|
|
# --------------------------
|
|
|
|
# Guess the value for the `prefix' variable by looking for
|
|
|
|
# the argument program along PATH and taking its parent.
|
|
|
|
# Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
|
|
|
|
# set `prefix' to /usr/local/gnu.
|
|
|
|
# This comes too late to find a site file based on the prefix,
|
|
|
|
# and it might use a cached value for the path.
|
|
|
|
# No big loss, I think, since most configures don't use this macro anyway.
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_PREFIX_PROGRAM],
|
2000-01-15 01:53:47 +08:00
|
|
|
[dnl Get an upper case version of $[1].
|
2000-11-02 22:12:18 +08:00
|
|
|
m4_pushdef([AC_Prog], m4_toupper([$1]))dnl
|
2000-01-15 01:53:47 +08:00
|
|
|
if test "x$prefix" = xNONE; then
|
1996-11-10 06:19:24 +08:00
|
|
|
dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
|
Move AC_MSG_* into M4sh.
* acgeneral.m4 (_AC_SH_QUOTE, _AC_SH_QUOTE_IFELSE, _AC_ECHO): Move
to...
* m4sh.m4 (_AS_QUOTE, _AS_QUOTE_IFELSE, _AS_ECHO): here.
(AS_MESSAGE, AS_WARN, AS_ERROR): New.
* acgeneral.m4 (AC_MSG_NOTICE, AC_MSG_WARN, AC_MSG_ERROR): Use them.
(AC_FD_MSG, AC_FD_LOG): Be AU_ALIAS'es of...
(AS_MESSAGE_FD, AS_MESSAGE_LOG_FD): new.
Adjust all dependencies.
2000-11-14 18:11:43 +08:00
|
|
|
echo $ECHO_N "checking for prefix by $ECHO_C" >&AS_MESSAGE_FD
|
2000-10-24 19:59:45 +08:00
|
|
|
AC_PATH_PROG(m4_quote(AC_Prog), [$1])
|
Changequote-busters!
From Dan Ackroyd.
* acgeneral.m4 (AC_INIT_PARSE_ARGS, AC_INIT_PREPARE,
AC_CACHE_SAVE, AC_PREFIX_PROGRAM, AC_OUTPUT,
_AC_OUTPUT_CONFIG_STATUS, AC_OUTPUT_MAKE_DEFS, AC_OUTPUT_FILES,
_AC_OUTPUT_HEADERS, AC_OUTPUT_LINKS, AC_OUTPUT_SUBDIRS): Quit
playing with changequotes, @BKL@ and Co.! Just quote properly.
2000-02-10 18:40:19 +08:00
|
|
|
if test -n "$ac_cv_path_[]AC_Prog"; then
|
2000-11-10 18:14:44 +08:00
|
|
|
prefix=`AS_DIRNAME(["$ac_cv_path_[]AC_Prog"])`
|
1994-09-06 22:36:45 +08:00
|
|
|
fi
|
|
|
|
fi
|
2000-11-02 22:12:18 +08:00
|
|
|
m4_popdef([AC_Prog])dnl
|
2000-02-08 18:46:43 +08:00
|
|
|
])# AC_PREFIX_PROGRAM
|
2000-01-15 01:53:47 +08:00
|
|
|
|
1994-09-06 22:36:45 +08:00
|
|
|
|
1994-09-16 10:03:51 +08:00
|
|
|
|
2000-02-10 16:42:26 +08:00
|
|
|
|
2000-02-08 18:46:43 +08:00
|
|
|
## ------------------------ ##
|
|
|
|
## Checking for libraries. ##
|
|
|
|
## ------------------------ ##
|
1994-09-16 10:03:51 +08:00
|
|
|
|
|
|
|
|
2000-03-25 17:00:53 +08:00
|
|
|
# AC_TRY_LINK_FUNC(FUNC, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
|
2000-02-08 02:03:54 +08:00
|
|
|
# ------------------------------------------------------------
|
|
|
|
# Try to link a program that calls FUNC, handling GCC builtins. If
|
|
|
|
# the link succeeds, execute ACTION-IF-FOUND; otherwise, execute
|
|
|
|
# ACTION-IF-NOT-FOUND.
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_TRY_LINK_FUNC],
|
2000-03-25 17:05:22 +08:00
|
|
|
[AC_LINK_IFELSE([AC_LANG_CALL([], [$1])], [$2], [$3])])
|
1998-10-07 15:57:41 +08:00
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS,
|
|
|
|
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
|
|
|
# [OTHER-LIBRARIES])
|
|
|
|
# --------------------------------------------------------
|
|
|
|
# Search for a library defining FUNC, if it's not already available.
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_SEARCH_LIBS],
|
1999-10-30 22:17:20 +08:00
|
|
|
[AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1],
|
2000-04-11 20:00:13 +08:00
|
|
|
[ac_func_search_save_LIBS=$LIBS
|
2000-05-09 19:21:46 +08:00
|
|
|
ac_cv_search_$1=no
|
1998-09-29 11:05:56 +08:00
|
|
|
AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"])
|
2001-05-20 01:33:19 +08:00
|
|
|
if test "$ac_cv_search_$1" = no; then
|
|
|
|
for ac_lib in $2; do
|
|
|
|
LIBS="-l$ac_lib $5 $ac_func_search_save_LIBS"
|
|
|
|
AC_TRY_LINK_FUNC([$1],
|
|
|
|
[ac_cv_search_$1="-l$ac_lib"
|
1998-09-29 11:05:56 +08:00
|
|
|
break])
|
2001-05-20 01:33:19 +08:00
|
|
|
done
|
|
|
|
fi
|
2000-04-11 20:00:13 +08:00
|
|
|
LIBS=$ac_func_search_save_LIBS])
|
2001-01-15 15:29:24 +08:00
|
|
|
AS_IF([test "$ac_cv_search_$1" != no],
|
2000-03-25 17:07:37 +08:00
|
|
|
[test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS"
|
|
|
|
$3],
|
2001-01-15 15:29:24 +08:00
|
|
|
[$4])dnl
|
2000-03-25 17:07:37 +08:00
|
|
|
])
|
1998-09-29 11:05:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_CHECK_LIB(LIBRARY, FUNCTION,
|
|
|
|
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
|
|
|
# [OTHER-LIBRARIES])
|
|
|
|
# ------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Use a cache variable name containing both the library and function name,
|
|
|
|
# because the test really is for library $1 defining function $2, not
|
|
|
|
# just for library $1. Separate tests with the same $1 and different $2s
|
|
|
|
# may have different results.
|
|
|
|
#
|
2001-06-06 23:03:29 +08:00
|
|
|
# Note that using directly AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])
|
|
|
|
# is asking for troubles, since AC_CHECK_LIB($lib, fun) would give
|
|
|
|
# ac_cv_lib_$lib_fun, which is definitely not what was meant. Hence
|
|
|
|
# the AS_LITERAL_IF indirection.
|
|
|
|
#
|
2000-02-08 02:03:54 +08:00
|
|
|
# FIXME: This macro is extremely suspicious. It DEFINEs unconditionnally,
|
|
|
|
# whatever the FUNCTION, in addition to not being a *S macro. Note
|
|
|
|
# that the cache does depend upon the function we are looking for.
|
2000-05-22 23:31:54 +08:00
|
|
|
#
|
|
|
|
# It is on purpose we used `ac_check_lib_save_LIBS' and not just
|
|
|
|
# `ac_save_LIBS': there are many macros which don't want to see `LIBS'
|
|
|
|
# changed but still want to use AC_CHECK_LIB, so they save `LIBS'.
|
|
|
|
# And ``ac_save_LIBS' is too tempting a name, so let's leave them some
|
|
|
|
# freedom.
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_CHECK_LIB],
|
2000-11-29 18:09:44 +08:00
|
|
|
[m4_ifval([$3], , [AH_CHECK_LIB([$1])])dnl
|
2001-06-06 23:03:29 +08:00
|
|
|
AS_LITERAL_IF([$1],
|
|
|
|
[AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])],
|
|
|
|
[AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1''_$2])])dnl
|
1999-10-30 22:17:20 +08:00
|
|
|
AC_CACHE_CHECK([for $2 in -l$1], ac_Lib,
|
2000-05-22 23:31:54 +08:00
|
|
|
[ac_check_lib_save_LIBS=$LIBS
|
1995-02-08 22:58:30 +08:00
|
|
|
LIBS="-l$1 $5 $LIBS"
|
2000-03-25 17:07:37 +08:00
|
|
|
AC_TRY_LINK_FUNC([$2],
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
[AS_VAR_SET(ac_Lib, yes)],
|
|
|
|
[AS_VAR_SET(ac_Lib, no)])
|
2000-05-22 23:31:54 +08:00
|
|
|
LIBS=$ac_check_lib_save_LIBS])
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
AS_IF([test AS_VAR_GET(ac_Lib) = yes],
|
|
|
|
[m4_default([$3], [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIB$1))
|
1995-02-08 06:41:14 +08:00
|
|
|
LIBS="-l$1 $LIBS"
|
2000-03-25 17:07:37 +08:00
|
|
|
])],
|
2001-01-15 15:29:24 +08:00
|
|
|
[$4])dnl
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
AS_VAR_POPDEF([ac_Lib])dnl
|
2000-02-08 18:46:43 +08:00
|
|
|
])# AC_CHECK_LIB
|
1999-10-30 22:17:20 +08:00
|
|
|
|
|
|
|
|
2000-03-30 00:48:00 +08:00
|
|
|
# AH_CHECK_LIB(LIBNAME)
|
|
|
|
# ---------------------
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AH_CHECK_LIB],
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
[AH_TEMPLATE(AS_TR_CPP(HAVE_LIB$1),
|
2000-03-30 00:48:00 +08:00
|
|
|
[Define if you have the `]$1[' library (-l]$1[).])])
|
|
|
|
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-02-10 16:42:26 +08:00
|
|
|
# AC_HAVE_LIBRARY(LIBRARY,
|
|
|
|
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
|
|
|
# [OTHER-LIBRARIES])
|
|
|
|
# ---------------------------------------------------------
|
|
|
|
#
|
|
|
|
# This macro is equivalent to calling `AC_CHECK_LIB' with a FUNCTION
|
|
|
|
# argument of `main'. In addition, LIBRARY can be written as any of
|
|
|
|
# `foo', `-lfoo', or `libfoo.a'. In all of those cases, the compiler
|
|
|
|
# is passed `-lfoo'. However, LIBRARY cannot be a shell variable;
|
|
|
|
# it must be a literal name.
|
2000-05-22 16:41:36 +08:00
|
|
|
AU_DEFUN([AC_HAVE_LIBRARY],
|
2000-11-02 22:12:18 +08:00
|
|
|
[m4_pushdef([AC_Lib_Name],
|
* m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros.
Use them.
(debugfile, debugmode, m4exit, m4wrap, maketemp, patsubst, regexp)
(substr, translit, m4_wrap): Rename as...
(m4_debugfile, m4_debugmode, m4_exit, m4_wrap, m4_maketemp)
(m4_patsubst, m4_regexp, m4_substr, m4_translit, m4_text_wrap): these.
Adjust all dependencies.
* acgeneral.m4: Adjust.
* tests/m4sugar.at: Adjust.
* autoconf.m4 (m4exit, patsubst, regexp, substr, translit):
Reestablish them.
2000-11-03 16:53:26 +08:00
|
|
|
m4_patsubst(m4_patsubst([[$1]],
|
|
|
|
[lib\([^\.]*\)\.a], [\1]),
|
|
|
|
[-l], []))dnl
|
2000-02-10 16:42:26 +08:00
|
|
|
AC_CHECK_LIB(AC_Lib_Name, main, [$2], [$3], [$4])dnl
|
|
|
|
ac_cv_lib_[]AC_Lib_Name()=ac_cv_lib_[]AC_Lib_Name()_main
|
2000-11-02 22:12:18 +08:00
|
|
|
m4_popdef([AC_Lib_Name])dnl
|
2000-02-10 16:42:26 +08:00
|
|
|
])
|
|
|
|
|
1994-09-01 12:59:32 +08:00
|
|
|
|
|
|
|
|
2000-02-08 18:46:43 +08:00
|
|
|
## ------------------------ ##
|
|
|
|
## Examining declarations. ##
|
|
|
|
## ------------------------ ##
|
1994-09-16 10:03:51 +08:00
|
|
|
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-12-15 15:48:17 +08:00
|
|
|
|
|
|
|
# _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
|
|
|
|
# ----------------------------------------------------------------
|
|
|
|
# Try to preprocess PROGRAM.
|
|
|
|
#
|
2001-04-27 18:35:22 +08:00
|
|
|
# This macro can be used during the selection of a preprocessor.
|
2000-09-12 21:02:29 +08:00
|
|
|
# Run cpp and set ac_cpp_err to "yes" for an error, to
|
2000-11-14 18:38:57 +08:00
|
|
|
# "$ac_(c,cxx)_preproc_warn_flag" if there are warnings or to "" if
|
|
|
|
# neither warnings nor errors have been detected. eval is necessary
|
2001-01-17 04:46:00 +08:00
|
|
|
# to expand ac_cpp.
|
2000-12-15 15:48:17 +08:00
|
|
|
AC_DEFUN([_AC_PREPROC_IFELSE],
|
|
|
|
[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
|
2001-03-19 21:32:34 +08:00
|
|
|
if _AC_EVAL_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null; then
|
2001-01-17 04:46:00 +08:00
|
|
|
if test -s conftest.err; then
|
2000-10-02 21:11:27 +08:00
|
|
|
ac_cpp_err=$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag
|
2000-09-12 21:02:29 +08:00
|
|
|
else
|
|
|
|
ac_cpp_err=
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
ac_cpp_err=yes
|
|
|
|
fi
|
|
|
|
if test -z "$ac_cpp_err"; then
|
2000-03-17 16:31:49 +08:00
|
|
|
m4_default([$2], :)
|
1994-09-16 10:03:51 +08:00
|
|
|
else
|
Move AC_MSG_* into M4sh.
* acgeneral.m4 (_AC_SH_QUOTE, _AC_SH_QUOTE_IFELSE, _AC_ECHO): Move
to...
* m4sh.m4 (_AS_QUOTE, _AS_QUOTE_IFELSE, _AS_ECHO): here.
(AS_MESSAGE, AS_WARN, AS_ERROR): New.
* acgeneral.m4 (AC_MSG_NOTICE, AC_MSG_WARN, AC_MSG_ERROR): Use them.
(AC_FD_MSG, AC_FD_LOG): Be AU_ALIAS'es of...
(AS_MESSAGE_FD, AS_MESSAGE_LOG_FD): new.
Adjust all dependencies.
2000-11-14 18:11:43 +08:00
|
|
|
echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
|
|
|
|
cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
|
1994-09-16 10:03:51 +08:00
|
|
|
$3
|
|
|
|
fi
|
2000-12-15 15:47:02 +08:00
|
|
|
rm -f conftest.err m4_ifval([$1], [conftest.$ac_ext])[]dnl
|
|
|
|
])# _AC_PREPROC_IFELSE
|
|
|
|
|
|
|
|
|
2000-12-15 15:48:17 +08:00
|
|
|
# AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
|
|
|
|
# ---------------------------------------------------------------
|
2000-12-15 15:47:02 +08:00
|
|
|
# Try to preprocess PROGRAM. Requires that the preprocessor for the
|
|
|
|
# current language was checked for, hence do not use this macro in macros
|
|
|
|
# looking for a preprocessor.
|
|
|
|
AC_DEFUN([AC_PREPROC_IFELSE],
|
|
|
|
[AC_LANG_PREPROC_REQUIRE()dnl
|
|
|
|
_AC_PREPROC_IFELSE($@)])
|
|
|
|
|
|
|
|
|
|
|
|
# AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
|
|
|
|
# ---------------------------------------------------------
|
|
|
|
# AC_TRY_CPP is used to check whether particular header files exist.
|
2000-12-15 15:48:17 +08:00
|
|
|
# (But it actually tests whether INCLUDES produces no CPP errors.)
|
2000-12-15 15:47:02 +08:00
|
|
|
#
|
|
|
|
# INCLUDES are not defaulted and are double quoted.
|
|
|
|
AC_DEFUN([AC_TRY_CPP],
|
|
|
|
[AC_PREPROC_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])])
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-02-08 18:46:43 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_EGREP_CPP(PATTERN, PROGRAM,
|
|
|
|
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
|
|
|
# ------------------------------------------------------
|
|
|
|
# Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
|
|
|
|
# come early, it is not included in AC_BEFORE checks.
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_EGREP_CPP],
|
Set AC_LANG_PREPROC_REQUIRE which replaces AC_REQUIRE_CPP.
The main difference is that the former requires AC_LANG_COMPILER.
* aclang (AC_LANG_PREPROC, AC_LANG_PREPROC(C), AC_LANG_PREPROC(C++))
(AC_LANG_PREPROC(Fortran 77), AC_LANG_PREPROC_REQUIRE): New
macros. Issue a warning when looking for the Fortran 77
preprocessor instead of an error.
(AC_LANG_COMPILER): Check that it is run before the corresponding
AC_LANG_PREPROC.
(AC_PROG_C
(AC_LANG_COMPILER_REQUIRE): Don't call directly
AC_LANG_COMPILER(_AC_LANG), rather invoke AC_LANG_COMPILER so that
the generic code in AC_LANG_COMPILER is run.
(AC_REQUIRE_CPP): Use AC_LANG_PREPROC_REQUIRE.
(AC_PROG_CC, AC_PROG_CXX): Don't require being run before the
corresponding AC_LANG_PREPROC: AC_LANG_COMPILER does it.
Propagate AC_LANG_PREPROC_REQUIRE.
* acgeneral.m4 (AC_TRY_CPP, AC_EGREP_CPP): Use it instead of
AC_REQUIRE_CPP.
* acspecific.m4 (_AC_DECL_YYTEXT, AC_PATH_X): Don't
AC_REQUIRE_CPP, inner macro will do it.
* aclang.m4 (AC_PROG_GCC_TRADITIONAL, AC_C_STRINGIZE)
(AC_C_PROTOTYPES): Likewise.
(AC_C_STRINGIZE): Yeeks! The body of AC_CACHE_CHECK was not
quoted. Use @%:@ do assist Emacs.
For some reason (don't ask), this revamping revealed that
AC_PROG_CC_STDC, because of the `break', does not clean its tmp
files.
* aclang.m4 (AC_PROG_CC_STDC): Extract the creation of conftest.c
out of AC_COMPILE_IFELSE.
Be sure to clean the tmp files.
2000-11-14 18:44:27 +08:00
|
|
|
[AC_LANG_PREPROC_REQUIRE()dnl
|
* aclang.m4 (_AC_PROG_CC_GNU, _AC_PROG_CXX_GNU,
_AC_PROG_F77_GNU): Use ac_ext. Use ACEOF instead of EOF.
(AC_LANG_CONFTEST): New macro.
(_AC_PROG_CC_G, AC_PROG_CC_C_O, _AC_PROG_CXX_G, AC_PROG_F77_C_O,
_AC_PROG_F77_V_OUTPUT): Use it.
* acgeneral.m4 (AC_TRY_CPP, AC_EGREP_CPP, AC_COMPILE_IFELSE,
AC_LINK_IFELSE, AC_RUN_IFELSE): Likewise.
2000-07-28 15:36:11 +08:00
|
|
|
AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])])
|
1994-09-01 12:59:32 +08:00
|
|
|
dnl eval is necessary to expand ac_cpp.
|
|
|
|
dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
|
Move AC_MSG_* into M4sh.
* acgeneral.m4 (_AC_SH_QUOTE, _AC_SH_QUOTE_IFELSE, _AC_ECHO): Move
to...
* m4sh.m4 (_AS_QUOTE, _AS_QUOTE_IFELSE, _AS_ECHO): here.
(AS_MESSAGE, AS_WARN, AS_ERROR): New.
* acgeneral.m4 (AC_MSG_NOTICE, AC_MSG_WARN, AC_MSG_ERROR): Use them.
(AC_FD_MSG, AC_FD_LOG): Be AU_ALIAS'es of...
(AS_MESSAGE_FD, AS_MESSAGE_LOG_FD): new.
Adjust all dependencies.
2000-11-14 18:11:43 +08:00
|
|
|
if (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
|
2000-09-12 18:23:08 +08:00
|
|
|
dnl Quote $1 to prevent m4 from eating character classes
|
|
|
|
egrep "[$1]" >/dev/null 2>&1; then
|
2000-03-17 16:31:49 +08:00
|
|
|
m4_default([$3], :)
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifvaln([$4], [else
|
2000-08-04 17:04:29 +08:00
|
|
|
$4])dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
fi
|
|
|
|
rm -f conftest*
|
2000-02-08 18:46:43 +08:00
|
|
|
])# AC_EGREP_CPP
|
1994-09-01 12:59:32 +08:00
|
|
|
|
1994-09-16 10:03:51 +08:00
|
|
|
|
2000-11-14 18:38:57 +08:00
|
|
|
# AC_EGREP_HEADER(PATTERN, HEADER-FILE,
|
|
|
|
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
|
|
|
# ---------------------------------------------------------
|
|
|
|
AC_DEFUN([AC_EGREP_HEADER],
|
|
|
|
[AC_EGREP_CPP([$1],
|
|
|
|
[#include <$2>
|
|
|
|
], [$3], [$4])])
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-02-08 18:46:43 +08:00
|
|
|
|
|
|
|
## ------------------ ##
|
|
|
|
## Examining syntax. ##
|
|
|
|
## ------------------ ##
|
1994-10-23 10:08:04 +08:00
|
|
|
|
|
|
|
|
2000-10-12 01:55:46 +08:00
|
|
|
# _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
|
|
|
# ---------------------------------------------------------------------
|
2000-03-25 17:00:53 +08:00
|
|
|
# Try to compile PROGRAM.
|
2000-10-12 01:55:46 +08:00
|
|
|
# This macro can be used during the selection of a compiler.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_COMPILE_IFELSE],
|
2000-11-29 18:09:44 +08:00
|
|
|
[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
|
2000-10-17 16:41:26 +08:00
|
|
|
rm -f conftest.$ac_objext
|
2001-01-22 22:07:09 +08:00
|
|
|
AS_IF([AC_TRY_EVAL(ac_compile) &&
|
|
|
|
AC_TRY_COMMAND([test -s conftest.$ac_objext])],
|
2001-01-15 15:29:24 +08:00
|
|
|
[$2],
|
|
|
|
[echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
|
2000-12-15 15:48:41 +08:00
|
|
|
cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
|
2001-01-15 15:29:24 +08:00
|
|
|
m4_ifvaln([$3],[$3])dnl])dnl
|
2000-11-29 18:09:44 +08:00
|
|
|
rm -f conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl
|
2000-10-12 01:55:46 +08:00
|
|
|
])# _AC_COMPILE_IFELSE
|
|
|
|
|
|
|
|
|
|
|
|
# AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
|
|
|
# --------------------------------------------------------------------
|
|
|
|
# Try to compile PROGRAM. Requires that the compiler for the current
|
|
|
|
# language was checked for, hence do not use this macro in macros looking
|
|
|
|
# for a compiler.
|
|
|
|
AC_DEFUN([AC_COMPILE_IFELSE],
|
|
|
|
[AC_LANG_COMPILER_REQUIRE()dnl
|
|
|
|
_AC_COMPILE_IFELSE($@)])
|
2000-03-25 17:00:53 +08:00
|
|
|
|
|
|
|
|
|
|
|
# AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
|
Eradicate AC_TRY_COMPILE.
* aclang.m4 (AC_PROG_CC_STDC, AC_C_BIGENDIAN, AC_C_INLINE,
AC_C_CONST, AC_C_VOLATILE, AC_F77_NAME_MANGLING): Use
`AC_COMPILE_IFELSE'.
* acspecific.m4 (AC_DECL_SYS_SIGLIST, _AC_CHECK_HEADER_DIRENT,
AC_HEADER_SYS_WAIT, AC_HEADER_TIME, AC_TYPE_SIGNAL,
AC_FUNC_GETLOADAVG, AC_FUNC_SELECT_ARGTYPES, AC_STRUCT_TM,
AC_CYGWIN, AC_MINGW32, AC_EMXOS2): Likewise.
* tests/semantics.m4 (C keywords): Check that AC_C_CONST,
AC_C_VOLATILE, and AC_C_INLINE function properly with GCC.
2000-05-11 21:09:05 +08:00
|
|
|
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
2000-03-25 17:00:53 +08:00
|
|
|
# --------------------------------------------------------
|
|
|
|
AC_DEFUN([AC_TRY_COMPILE],
|
|
|
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
|
1994-10-23 10:08:04 +08:00
|
|
|
|
|
|
|
|
2000-02-08 18:46:43 +08:00
|
|
|
|
|
|
|
## --------------------- ##
|
|
|
|
## Examining libraries. ##
|
|
|
|
## --------------------- ##
|
1994-09-16 10:03:51 +08:00
|
|
|
|
|
|
|
|
2000-10-12 01:55:46 +08:00
|
|
|
# _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
|
|
|
# ------------------------------------------------------------------
|
2000-03-25 17:00:53 +08:00
|
|
|
# Try to link PROGRAM.
|
2000-10-12 01:55:46 +08:00
|
|
|
# This macro can be used during the selection of a compiler.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_LINK_IFELSE],
|
2000-11-29 18:09:44 +08:00
|
|
|
[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
|
2000-10-17 16:41:26 +08:00
|
|
|
rm -f conftest.$ac_objext conftest$ac_exeext
|
2001-01-15 15:29:24 +08:00
|
|
|
AS_IF([AC_TRY_EVAL(ac_link) &&
|
|
|
|
AC_TRY_COMMAND([test -s conftest$ac_exeext])],
|
|
|
|
[$2],
|
|
|
|
[echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
|
2000-12-15 15:48:41 +08:00
|
|
|
cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
|
2001-01-15 15:29:24 +08:00
|
|
|
m4_ifvaln([$3], [$3])dnl])[]dnl
|
2001-04-18 00:14:05 +08:00
|
|
|
rm -f conftest.$ac_objext conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl
|
2000-10-12 01:55:46 +08:00
|
|
|
])# _AC_LINK_IFELSE
|
|
|
|
|
|
|
|
|
|
|
|
# AC_LINK_IFELSE(PROGRAM, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
|
|
|
# -----------------------------------------------------------------
|
|
|
|
# Try to link PROGRAM. Requires that the compiler for the current
|
|
|
|
# language was checked for, hence do not use this macro in macros looking
|
|
|
|
# for a compiler.
|
|
|
|
AC_DEFUN([AC_LINK_IFELSE],
|
|
|
|
[AC_LANG_COMPILER_REQUIRE()dnl
|
|
|
|
_AC_LINK_IFELSE($@)])
|
2000-03-25 17:00:53 +08:00
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
|
|
|
|
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
|
|
|
# -----------------------------------------------------
|
|
|
|
# Should the INCLUDES be defaulted here?
|
2000-03-25 17:04:13 +08:00
|
|
|
# Contrarily to AC_LINK_IFELSE, this macro double quote its first two args.
|
2000-03-24 02:15:28 +08:00
|
|
|
# FIXME: WARNING: The code to compile was different in the case of
|
|
|
|
# Fortran between AC_TRY_COMPILE and AC_TRY_LINK, though they should
|
|
|
|
# equivalent as far as I can tell from the semantics and the docs. In
|
|
|
|
# the former, $[2] is used as is, in the latter, it is `call' ed.
|
|
|
|
# Remove these FIXME: once truth established.
|
2000-03-25 17:00:53 +08:00
|
|
|
AC_DEFUN([AC_TRY_LINK],
|
|
|
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])])
|
2000-02-08 18:46:43 +08:00
|
|
|
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-02-08 21:58:13 +08:00
|
|
|
# AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
|
|
|
|
# ACTION-IF-FOUND, [ACTION-IF-NOT-FOUND])
|
|
|
|
# --------------------------------------------------------
|
2000-05-22 16:41:36 +08:00
|
|
|
AU_DEFUN([AC_COMPILE_CHECK],
|
2000-11-29 18:09:44 +08:00
|
|
|
[m4_ifvaln([$1], [AC_CHECKING([for $1])])dnl
|
2000-03-25 17:00:53 +08:00
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])
|
2000-02-08 21:58:13 +08:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
|
1994-09-16 10:03:51 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
## -------------------------------- ##
|
|
|
|
## Checking for run-time features. ##
|
|
|
|
## -------------------------------- ##
|
1994-09-16 10:03:51 +08:00
|
|
|
|
|
|
|
|
2000-10-12 01:55:46 +08:00
|
|
|
# _AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
|
|
|
|
# ------------------------------------------------------------
|
2000-03-25 17:12:59 +08:00
|
|
|
# Compile, link, and run.
|
2000-10-12 01:55:46 +08:00
|
|
|
# This macro can be used during the selection of a compiler.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_RUN_IFELSE],
|
2000-11-29 18:09:44 +08:00
|
|
|
[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
|
2000-10-17 16:41:26 +08:00
|
|
|
rm -f conftest$ac_exeext
|
2001-01-15 15:29:24 +08:00
|
|
|
AS_IF([AC_TRY_EVAL(ac_link) && AC_TRY_COMMAND(./conftest$ac_exeext)],
|
|
|
|
[$2],
|
|
|
|
[echo "$as_me: program exited with status $ac_status" >&AS_MESSAGE_LOG_FD
|
2000-11-18 00:56:16 +08:00
|
|
|
echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
|
|
|
|
cat conftest.$ac_ext >&AS_MESSAGE_LOG_FD
|
2001-01-15 15:29:24 +08:00
|
|
|
m4_ifvaln([$3], [$3])dnl])[]dnl
|
2001-04-25 23:32:09 +08:00
|
|
|
rm -f core core.* *.core conftest$ac_exeext m4_ifval([$1],
|
|
|
|
[conftest.$ac_ext])[]dnl
|
2000-10-12 01:55:46 +08:00
|
|
|
])# _AC_RUN_IFELSE
|
|
|
|
|
|
|
|
|
2001-01-18 17:16:39 +08:00
|
|
|
# AC_RUN_IFELSE(PROGRAM,
|
|
|
|
# [ACTION-IF-TRUE], [ACTION-IF-FALSE],
|
|
|
|
# [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
|
|
|
|
# ----------------------------------------------------------
|
2000-10-12 01:55:46 +08:00
|
|
|
# Compile, link, and run. Requires that the compiler for the current
|
|
|
|
# language was checked for, hence do not use this macro in macros looking
|
|
|
|
# for a compiler.
|
|
|
|
AC_DEFUN([AC_RUN_IFELSE],
|
|
|
|
[AC_LANG_COMPILER_REQUIRE()dnl
|
2001-01-18 17:16:39 +08:00
|
|
|
m4_ifval([$4], [],
|
|
|
|
[AC_DIAGNOSE([cross],
|
|
|
|
[$0 called without default to allow cross compiling])])dnl
|
2000-09-12 21:59:55 +08:00
|
|
|
if test "$cross_compiling" = yes; then
|
Provide a fine grained control over autoconf's warnings.
* acgeneral.m4 (AC_WARNING_IFELSE, _AC_DIAGNOSE, AC_DIAGNOSE):
New macros.
(AC_DEFUN_ONCE, AC_OBSOLETE, AC_BEFORE, AU_DEFUN, AC_PREREQ,
AC_WARNING, AC_FATAL, AC_TRY_RUN): Use AC_DIAGNOSE.
* autoconf.sh: Provide support for `--warnings', `-W'.
* doc/autoconf.texi (Invoking autoconf): Adjust.
(Reporting Messages): New section.
2000-04-13 16:25:11 +08:00
|
|
|
m4_default([$4],
|
2000-11-11 13:59:21 +08:00
|
|
|
[AC_MSG_ERROR([cannot run test program while cross compiling])])
|
1996-11-12 15:17:30 +08:00
|
|
|
else
|
2001-01-18 17:16:39 +08:00
|
|
|
_AC_RUN_IFELSE($@)
|
|
|
|
fi])
|
|
|
|
|
|
|
|
|
|
|
|
# AC_TRY_RUN(PROGRAM,
|
|
|
|
# [ACTION-IF-TRUE], [ACTION-IF-FALSE],
|
|
|
|
# [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR])
|
|
|
|
# --------------------------------------------------------
|
|
|
|
AC_DEFUN([AC_TRY_RUN],
|
|
|
|
[AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3], [$4])])
|
2000-02-08 18:46:43 +08:00
|
|
|
|
1994-09-01 12:59:32 +08:00
|
|
|
|
|
|
|
|
2000-02-08 18:46:43 +08:00
|
|
|
## ------------------------------------- ##
|
|
|
|
## Checking for the existence of files. ##
|
|
|
|
## ------------------------------------- ##
|
1998-09-26 08:41:55 +08:00
|
|
|
|
2000-02-08 18:46:43 +08:00
|
|
|
# AC_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
|
|
|
# -------------------------------------------------------------
|
2000-02-08 02:03:54 +08:00
|
|
|
#
|
|
|
|
# Check for the existence of FILE.
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_CHECK_FILE],
|
Provide a fine grained control over autoconf's warnings.
* acgeneral.m4 (AC_WARNING_IFELSE, _AC_DIAGNOSE, AC_DIAGNOSE):
New macros.
(AC_DEFUN_ONCE, AC_OBSOLETE, AC_BEFORE, AU_DEFUN, AC_PREREQ,
AC_WARNING, AC_FATAL, AC_TRY_RUN): Use AC_DIAGNOSE.
* autoconf.sh: Provide support for `--warnings', `-W'.
* doc/autoconf.texi (Invoking autoconf): Adjust.
(Reporting Messages): New section.
2000-04-13 16:25:11 +08:00
|
|
|
[AC_DIAGNOSE([cross],
|
2001-01-24 16:24:44 +08:00
|
|
|
[cannot check for file existence when cross compiling])dnl
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
|
2000-02-10 17:40:55 +08:00
|
|
|
AC_CACHE_CHECK([for $1], ac_File,
|
2000-06-30 21:34:37 +08:00
|
|
|
[test "$cross_compiling" = yes &&
|
2001-01-24 16:24:44 +08:00
|
|
|
AC_MSG_ERROR([cannot check for file existence when cross compiling])
|
2000-06-30 21:34:37 +08:00
|
|
|
if test -r "$1"; then
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
AS_VAR_SET(ac_File, yes)
|
1999-10-30 22:17:20 +08:00
|
|
|
else
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
AS_VAR_SET(ac_File, no)
|
2000-02-10 17:40:55 +08:00
|
|
|
fi])
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
AS_IF([test AS_VAR_GET(ac_File) = yes], [$2], [$3])[]dnl
|
|
|
|
AS_VAR_POPDEF([ac_File])dnl
|
2000-02-10 17:40:55 +08:00
|
|
|
])# AC_CHECK_FILE
|
1998-09-26 08:41:55 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
|
|
|
|
# AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
|
|
|
# -----------------------------------------------------------------
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_CHECK_FILES],
|
1999-10-30 22:17:20 +08:00
|
|
|
[AC_FOREACH([AC_FILE_NAME], [$1],
|
Various cleanups.
* acgeneral.m4 (AC_PRO, AC_EPI): Rename as _AC_DEFUN_PRO and
_AC_DEFUN_EPI.
Adjust dependencies.
(AC_DEFUN): Remove the not-to-be-released specializing mechanism.
(AC_SPECIALIZE): Remove for the same reasons.
Adjust dependencies.
(_AC_INIT_DEFAULTS, _AC_INIT_PARSE_ARGS, _AC_INIT_VERSION,
_AC_INIT_PREPARE, _AC_CANONICAL_SPLIT, _AC_CHECK_TYPE_NEW,
_AC_CHECK_TYPE_OLD): Define via `define' instead of `AC_DEFUN':
they are not related to AC_REQUIRE in any way.
* acspecific.m4 (AC_PROG_ECHO, _AC_DECL_YYTEXT, _AC_PATH_X_XMKMF,
_AC_PATH_X_DIRECT): Define via `define' instead of `AC_DEFUN'.
2000-06-26 17:03:15 +08:00
|
|
|
[AC_CHECK_FILE(AC_FILE_NAME,
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
[AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_FILE_NAME), 1,
|
2000-03-30 00:48:00 +08:00
|
|
|
[Define if you have the file `]AC_File['.])
|
1999-10-30 22:17:20 +08:00
|
|
|
$2],
|
|
|
|
[$3])])])
|
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
## ------------------------------- ##
|
|
|
|
## Checking for declared symbols. ##
|
|
|
|
## ------------------------------- ##
|
1999-10-30 22:17:20 +08:00
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_CHECK_DECL(SYMBOL,
|
|
|
|
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
|
|
|
# [INCLUDES])
|
|
|
|
# -------------------------------------------------------
|
|
|
|
# Check if SYMBOL (a variable or a function) is declared.
|
1999-12-20 21:40:18 +08:00
|
|
|
AC_DEFUN([AC_CHECK_DECL],
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
[AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])dnl
|
1999-11-01 Akim Demaille <akim@epita.fr>
Fix a bit of the brokenness of AC_CHECK_TYPE.
* acgeneral.m4 (AC_CHECK_TYPE_INTERNAL): New macro, inspired from
the former AC_CHECK_TYPE. This macro is exactly the one that
ought to be named AC_CHECK_TYPE: it just checks, and executes user
actions. In the future, this macro ought to be renamed
AC_CHECK_TYPE.
There is a big difference with the former AC_CHECK_TYPE: instead
of grepping in the headers, it tries to compile a variable
declaration. This is both safer, slower, and better, since now we
can check for compiler types (e.g., unsigned long long).
(AC_CHECK_TYPES): The looping and AC_DEFINEing version of the
previous macro. Uses m4 loops.
(AC_CHECK_TYPE): Reimplemented on top of AC_CHECK_TYPE_INTERNAL.
* autoheader.m4 (AH_CHECK_TYPE, AH_CHECK_TYPES): New macros,
hooked.
* autoconf.texi (@ovar): New macro, for optional variables.
(Generic Typedefs): Document AC_CHECK_TYPES.
* autoheader.texi: (AH_CHECK_TYPE, AH_CHECK_TYPES): New macros.
(Epilogue): Hooks them.
2000-01-28 18:41:47 +08:00
|
|
|
AC_CACHE_CHECK([whether $1 is declared], ac_Symbol,
|
2000-03-25 17:00:53 +08:00
|
|
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
|
1999-10-30 22:17:20 +08:00
|
|
|
[#ifndef $1
|
2000-01-14 23:19:19 +08:00
|
|
|
char *p = (char *) $1;
|
1999-10-30 22:17:20 +08:00
|
|
|
#endif
|
2000-03-25 17:00:53 +08:00
|
|
|
])],
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
[AS_VAR_SET(ac_Symbol, yes)],
|
|
|
|
[AS_VAR_SET(ac_Symbol, no)])])
|
|
|
|
AS_IF([test AS_VAR_GET(ac_Symbol) = yes], [$2], [$3])[]dnl
|
|
|
|
AS_VAR_POPDEF([ac_Symbol])dnl
|
2000-02-08 18:46:43 +08:00
|
|
|
])# AC_CHECK_DECL
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-01-28 23:23:37 +08:00
|
|
|
|
2000-05-11 00:16:31 +08:00
|
|
|
# AC_CHECK_DECLS(SYMBOLS,
|
2000-02-08 02:03:54 +08:00
|
|
|
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
|
|
|
|
# [INCLUDES])
|
|
|
|
# --------------------------------------------------------
|
2000-02-15 17:33:59 +08:00
|
|
|
# Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise. See the
|
|
|
|
# documentation for a detailed explanation of this difference with
|
2000-05-11 00:16:31 +08:00
|
|
|
# other AC_CHECK_*S macros. SYMBOLS is an m4 list.
|
1999-12-20 21:40:18 +08:00
|
|
|
AC_DEFUN([AC_CHECK_DECLS],
|
2000-02-07 19:54:29 +08:00
|
|
|
[m4_foreach([AC_Symbol], [$1],
|
Various cleanups.
* acgeneral.m4 (AC_PRO, AC_EPI): Rename as _AC_DEFUN_PRO and
_AC_DEFUN_EPI.
Adjust dependencies.
(AC_DEFUN): Remove the not-to-be-released specializing mechanism.
(AC_SPECIALIZE): Remove for the same reasons.
Adjust dependencies.
(_AC_INIT_DEFAULTS, _AC_INIT_PARSE_ARGS, _AC_INIT_VERSION,
_AC_INIT_PREPARE, _AC_CANONICAL_SPLIT, _AC_CHECK_TYPE_NEW,
_AC_CHECK_TYPE_OLD): Define via `define' instead of `AC_DEFUN':
they are not related to AC_REQUIRE in any way.
* acspecific.m4 (AC_PROG_ECHO, _AC_DECL_YYTEXT, _AC_PATH_X_XMKMF,
_AC_PATH_X_DIRECT): Define via `define' instead of `AC_DEFUN'.
2000-06-26 17:03:15 +08:00
|
|
|
[AC_CHECK_DECL(AC_Symbol,
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
[AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 1,
|
2000-03-30 00:48:00 +08:00
|
|
|
[Define to 1 if you have the declaration
|
|
|
|
of `]AC_Symbol[', and to 0 if you don't.])
|
2000-02-15 17:33:59 +08:00
|
|
|
$2],
|
* acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET)
(AC_VAR_SET_IFELSE, AC_VAR_PUSHDEF and AC_VAR_POPDEF, AC_TR_CPP)
(AC_TR_SH): Move as...
* m4sh.m4 (AS_VAR_SET, AS_VAR_GET, AS_VAR_TEST_SET)
(AS_VAR_SET_IF, AC_VAR_PUSHDEF, AS_VAR_POPDEF, AS_TR_CPP)
(AS_TR_SH): these.
(_AS_TR_PREPARE, _AS_CR_PREPARE, _AS_TR_CPP_PREPARE)
(_AS_TR_SH_PREPARE): New.
(AS_SHELL_SANITIZE): Invoke _AS_TR_PREPARE.
* tests/aclocal.m4 (AC_STATE_SAVE): `as_' vars can be modified.
2001-06-05 00:07:23 +08:00
|
|
|
[AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 0)
|
1999-12-20 21:40:18 +08:00
|
|
|
$3],
|
1999-10-30 22:17:20 +08:00
|
|
|
[$4])])
|
2000-02-08 18:46:43 +08:00
|
|
|
])# AC_CHECK_DECLS
|
1998-09-26 08:41:55 +08:00
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
## -------------------------------- ##
|
|
|
|
## Checking for library functions. ##
|
|
|
|
## -------------------------------- ##
|
1994-09-16 10:03:51 +08:00
|
|
|
|
|
|
|
|
2001-02-03 21:20:00 +08:00
|
|
|
# AC_LIBSOURCE(FILENAME)
|
|
|
|
# ----------------------
|
|
|
|
# Announce we might need the file `FILENAME'.
|
|
|
|
m4_define([AC_LIBSOURCE], [])
|
|
|
|
|
|
|
|
|
|
|
|
# AC_LIBSOURCES([FILENAME1, ...])
|
|
|
|
# -------------------------------
|
|
|
|
# Announce we might need these files.
|
|
|
|
m4_define([AC_LIBSOURCES],
|
|
|
|
[m4_foreach([_AC_FILENAME], [$1],
|
|
|
|
[AC_LIBSOURCE(_AC_FILENAME)])])
|
2000-05-10 19:47:35 +08:00
|
|
|
|
|
|
|
|
2000-07-10 18:26:42 +08:00
|
|
|
# _AC_LIBOBJ(FILENAME-NOEXT, ACTION-IF-INDIR)
|
|
|
|
# -------------------------------------------
|
2000-05-10 19:47:35 +08:00
|
|
|
# We need `FILENAME-NOEXT.o', save this into `LIBOBJS'.
|
|
|
|
# We don't use AC_SUBST/2 because it forces an unneeded eol.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_LIBOBJ],
|
2001-01-15 15:29:24 +08:00
|
|
|
[AS_LITERAL_IF([$1],
|
2001-02-07 19:26:22 +08:00
|
|
|
[AC_LIBSOURCE([$1.c])],
|
2001-01-15 15:29:24 +08:00
|
|
|
[$2])dnl
|
2000-05-10 19:47:35 +08:00
|
|
|
AC_SUBST([LIBOBJS])dnl
|
2000-07-19 17:19:24 +08:00
|
|
|
LIBOBJS="$LIBOBJS $1.$ac_objext"])
|
2000-05-10 19:47:35 +08:00
|
|
|
|
|
|
|
|
2000-07-10 18:26:42 +08:00
|
|
|
# AC_LIBOBJ(FILENAME-NOEXT)
|
|
|
|
# -------------------------
|
|
|
|
# We need `FILENAME-NOEXT.o', save this into `LIBOBJS'.
|
|
|
|
# We don't use AC_SUBST/2 because it forces an unneeded eol.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_LIBOBJ],
|
2000-07-10 18:26:42 +08:00
|
|
|
[_AC_LIBOBJ([$1],
|
|
|
|
[AC_DIAGNOSE(syntax,
|
|
|
|
[$0($1): you should use literals])])dnl
|
|
|
|
])
|
|
|
|
|
|
|
|
|
2000-05-26 19:33:54 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
## ----------------------------------- ##
|
|
|
|
## Checking compiler characteristics. ##
|
|
|
|
## ----------------------------------- ##
|
1994-09-16 10:03:51 +08:00
|
|
|
|
|
|
|
|
2000-05-26 19:33:54 +08:00
|
|
|
# _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, [INCLUDES])
|
|
|
|
# ---------------------------------------------------------
|
|
|
|
# Compute the integer EXPRESSION and store the result in the VARIABLE.
|
|
|
|
# Works OK if cross compiling.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_COMPUTE_INT_COMPILE],
|
2000-05-26 19:33:54 +08:00
|
|
|
[# Depending upon the size, compute the lo and hi bounds.
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])],
|
2001-02-03 06:57:56 +08:00
|
|
|
[ac_lo=0 ac_mid=0
|
2000-11-10 02:59:18 +08:00
|
|
|
while :; do
|
2001-02-03 06:57:56 +08:00
|
|
|
AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
|
|
|
|
[ac_hi=$ac_mid; break],
|
|
|
|
[ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`])
|
2000-05-26 19:33:54 +08:00
|
|
|
done],
|
2001-02-03 06:57:56 +08:00
|
|
|
[ac_hi=-1 ac_mid=-1
|
2000-11-10 02:59:18 +08:00
|
|
|
while :; do
|
2001-02-03 06:57:56 +08:00
|
|
|
AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= $ac_mid])],
|
|
|
|
[ac_lo=$ac_mid; break],
|
|
|
|
[ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`])
|
2000-05-26 19:33:54 +08:00
|
|
|
done])
|
|
|
|
# Binary search between lo and hi bounds.
|
|
|
|
while test "x$ac_lo" != "x$ac_hi"; do
|
2001-02-03 06:57:56 +08:00
|
|
|
ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
|
|
|
|
AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])],
|
|
|
|
[ac_hi=$ac_mid], [ac_lo=`expr $ac_mid + 1`])
|
2000-05-26 19:33:54 +08:00
|
|
|
done
|
|
|
|
$2=$ac_lo[]dnl
|
|
|
|
])# _AC_COMPUTE_INT_COMPILE
|
|
|
|
|
|
|
|
|
|
|
|
# _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, [INCLUDES], [IF-FAILS])
|
|
|
|
# -----------------------------------------------------------------
|
|
|
|
# Store the evaluation of the integer EXPRESSION in VARIABLE.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_COMPUTE_INT_RUN],
|
2000-05-26 19:33:54 +08:00
|
|
|
[AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])],
|
2001-01-22 17:06:11 +08:00
|
|
|
[$2=`cat conftest.val`], [$4])])
|
2000-05-26 19:33:54 +08:00
|
|
|
|
|
|
|
|
|
|
|
# _AC_COMPUTE_INT(EXPRESSION, VARIABLE, INCLUDES, IF-FAILS)
|
|
|
|
# ---------------------------------------------------------
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_COMPUTE_INT],
|
2000-05-26 19:33:54 +08:00
|
|
|
[if test "$cross_compiling" = yes; then
|
|
|
|
_AC_COMPUTE_INT_COMPILE([$1], [$2], [$3])
|
|
|
|
else
|
2001-01-18 17:16:39 +08:00
|
|
|
_AC_COMPUTE_INT_RUN([$1], [$2], [$3], [$4])
|
2000-10-23 12:07:42 +08:00
|
|
|
fi
|
2001-01-22 17:06:11 +08:00
|
|
|
rm -f conftest.val[]dnl
|
2000-05-26 19:33:54 +08:00
|
|
|
])# _AC_COMPUTE_INT
|
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
## ----------------------- ##
|
|
|
|
## Creating output files. ##
|
|
|
|
## ----------------------- ##
|
1994-09-06 22:36:45 +08:00
|
|
|
|
2000-02-07 19:54:29 +08:00
|
|
|
|
2000-02-10 01:01:44 +08:00
|
|
|
# This section handles about all the preparation aspects for
|
2000-03-21 20:33:37 +08:00
|
|
|
# `config.status': registering the configuration files, the headers,
|
|
|
|
# the links, and the commands `config.status' will run. There is a
|
|
|
|
# little mixture though of things actually handled by `configure',
|
|
|
|
# such as running the `configure' in the sub directories. Minor
|
|
|
|
# detail.
|
2000-02-10 01:01:44 +08:00
|
|
|
#
|
|
|
|
# There are two kinds of commands:
|
|
|
|
#
|
|
|
|
# COMMANDS:
|
|
|
|
#
|
|
|
|
# They are output into `config.status' via a quoted here doc. These
|
|
|
|
# commands are always associated to a tag which the user can use to
|
|
|
|
# tell `config.status' what are the commands she wants to run.
|
|
|
|
#
|
|
|
|
# INIT-CMDS:
|
|
|
|
#
|
|
|
|
# They are output via an *unquoted* here-doc. As a consequence $var
|
|
|
|
# will be output as the value of VAR. This is typically used by
|
|
|
|
# `configure' to give `config,.status' some variables it needs to run
|
|
|
|
# the COMMANDS. At the difference of `COMMANDS', the INIT-CMDS are
|
|
|
|
# always run.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Some uniformity exists around here, please respect it!
|
|
|
|
#
|
|
|
|
# A macro named AC_CONFIG_FOOS has three args: the `TAG...' (or
|
|
|
|
# `FILE...' when it applies), the `COMMANDS' and the `INIT-CMDS'. It
|
|
|
|
# first checks that TAG was not registered elsewhere thanks to
|
|
|
|
# AC_CONFIG_UNIQUE. Then it registers `TAG...' in AC_LIST_FOOS, and for
|
|
|
|
# each `TAG', a special line in AC_LIST_FOOS_COMMANDS which is used in
|
|
|
|
# `config.status' like this:
|
|
|
|
#
|
|
|
|
# case $ac_tag in
|
|
|
|
# AC_LIST_FOOS_COMMANDS
|
|
|
|
# esac
|
|
|
|
#
|
|
|
|
# Finally, the `INIT-CMDS' are dumped into a special diversion, via
|
|
|
|
# `_AC_CONFIG_COMMANDS_INIT'. While `COMMANDS' are output once per TAG,
|
2000-06-26 18:20:36 +08:00
|
|
|
# `INIT-CMDS' are dumped only once per call to AC_CONFIG_FOOS.
|
|
|
|
#
|
|
|
|
# It also leave the TAG in the shell variable ac_config_foo which contains
|
|
|
|
# those which will actually be executed. In other words:
|
|
|
|
#
|
|
|
|
# if false; then
|
|
|
|
# AC_CONFIG_FOOS(bar, [touch bar])
|
|
|
|
# fi
|
|
|
|
#
|
|
|
|
# will not create bar.
|
2000-02-10 01:01:44 +08:00
|
|
|
#
|
|
|
|
# AC_CONFIG_FOOS can be called several times (with different TAGs of
|
|
|
|
# course).
|
|
|
|
#
|
|
|
|
# Because these macros should not output anything, there should be `dnl'
|
|
|
|
# everywhere. A pain my friend, a pain. So instead in each macro we
|
|
|
|
# divert(-1) and restore the diversion at the end.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Honorable members of this family are AC_CONFIG_FILES,
|
|
|
|
# AC_CONFIG_HEADERS, AC_CONFIG_LINKS and AC_CONFIG_COMMANDS. Bad boys
|
|
|
|
# are AC_LINK_FILES, AC_OUTPUT_COMMANDS and AC_OUTPUT when used with
|
2000-03-21 20:33:37 +08:00
|
|
|
# arguments. False members are AC_CONFIG_SRCDIR, AC_CONFIG_SUBDIRS
|
|
|
|
# and AC_CONFIG_AUX_DIR. Cousins are AC_CONFIG_COMMANDS_PRE and
|
|
|
|
# AC_CONFIG_COMMANDS_POST.
|
2000-02-10 01:01:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2000-02-08 21:51:55 +08:00
|
|
|
# AC_CONFIG_IF_MEMBER(DEST, LIST, ACTION-IF-TRUE, ACTION-IF-FALSE)
|
|
|
|
# ----------------------------------------------------------------
|
2000-02-08 02:03:54 +08:00
|
|
|
# If DEST is member of LIST, expand to ACTION-IF-TRUE, else ACTION-IF-FALSE.
|
|
|
|
#
|
|
|
|
# LIST is an AC_CONFIG list, i.e., a list of DEST[:SOURCE], separated
|
|
|
|
# with spaces.
|
|
|
|
#
|
|
|
|
# FIXME: This macro is badly designed, but I'm not guilty: m4 is. There
|
|
|
|
# is just no way to simply compare two strings in m4, but to use pattern
|
|
|
|
# matching. The big problem is then that the active characters should
|
2000-02-08 21:51:55 +08:00
|
|
|
# be quoted. Currently `+*.' are quoted.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_CONFIG_IF_MEMBER],
|
2000-12-06 16:58:41 +08:00
|
|
|
[m4_if(m4_regexp($2, [\(^\| \)]m4_patsubst([$1],
|
|
|
|
[\([+*.]\)], [\\\1])[\(:\| \|$\)]),
|
|
|
|
-1, [$4], [$3])])
|
1999-12-20 20:14:28 +08:00
|
|
|
|
|
|
|
|
2000-10-25 02:39:06 +08:00
|
|
|
# AC_FILE_DEPENDENCY_TRACE(DEST, SOURCE1, [SOURCE2...])
|
|
|
|
# -----------------------------------------------------
|
2000-05-11 16:14:18 +08:00
|
|
|
# This macro does nothing, it's a hook to be read with `autoconf --trace'.
|
|
|
|
# It announces DEST depends upon the SOURCE1 etc.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_FILE_DEPENDENCY_TRACE], [])
|
2000-05-11 16:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
# _AC_CONFIG_DEPENDENCY(DEST, [SOURCE1], [SOURCE2...])
|
|
|
|
# ----------------------------------------------------
|
|
|
|
# Be sure that a missing dependency is expressed as a dependency upon
|
|
|
|
# `DEST.in'.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_CONFIG_DEPENDENCY],
|
2000-11-29 18:09:44 +08:00
|
|
|
[m4_ifval([$2],
|
|
|
|
[AC_FILE_DEPENDENCY_TRACE($@)],
|
|
|
|
[AC_FILE_DEPENDENCY_TRACE([$1], [$1.in])])])
|
2000-05-11 16:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
# _AC_CONFIG_DEPENDENCIES(DEST[:SOURCE1[:SOURCE2...]]...)
|
|
|
|
# -------------------------------------------------------
|
|
|
|
# Declare the DESTs depend upon their SOURCE1 etc.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_CONFIG_DEPENDENCIES],
|
2000-10-31 03:01:24 +08:00
|
|
|
[m4_divert_push([KILL])
|
2000-05-11 16:14:18 +08:00
|
|
|
AC_FOREACH([AC_File], [$1],
|
* m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros.
Use them.
(debugfile, debugmode, m4exit, m4wrap, maketemp, patsubst, regexp)
(substr, translit, m4_wrap): Rename as...
(m4_debugfile, m4_debugmode, m4_exit, m4_wrap, m4_maketemp)
(m4_patsubst, m4_regexp, m4_substr, m4_translit, m4_text_wrap): these.
Adjust all dependencies.
* acgeneral.m4: Adjust.
* tests/m4sugar.at: Adjust.
* autoconf.m4 (m4exit, patsubst, regexp, substr, translit):
Reestablish them.
2000-11-03 16:53:26 +08:00
|
|
|
[_AC_CONFIG_DEPENDENCY(m4_patsubst(AC_File, [:], [,]))])
|
2001-01-18 17:16:08 +08:00
|
|
|
m4_divert_pop([KILL])dnl
|
2000-05-11 16:14:18 +08:00
|
|
|
])
|
|
|
|
|
|
|
|
|
2000-03-03 00:36:16 +08:00
|
|
|
# _AC_CONFIG_UNIQUE(DEST[:SOURCE]...)
|
|
|
|
# -----------------------------------
|
2000-02-08 21:51:55 +08:00
|
|
|
#
|
2000-02-08 02:03:54 +08:00
|
|
|
# Verify that there is no double definition of an output file
|
|
|
|
# (precisely, guarantees there is no common elements between
|
|
|
|
# CONFIG_HEADERS, CONFIG_FILES, CONFIG_LINKS, and CONFIG_SUBDIRS).
|
2000-02-10 01:01:44 +08:00
|
|
|
#
|
|
|
|
# Note that this macro does not check if the list $[1] itself
|
|
|
|
# contains doubles.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_CONFIG_UNIQUE],
|
2000-10-31 03:01:24 +08:00
|
|
|
[m4_divert_push([KILL])
|
1999-12-21 19:08:51 +08:00
|
|
|
AC_FOREACH([AC_File], [$1],
|
* m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros.
Use them.
(debugfile, debugmode, m4exit, m4wrap, maketemp, patsubst, regexp)
(substr, translit, m4_wrap): Rename as...
(m4_debugfile, m4_debugmode, m4_exit, m4_wrap, m4_maketemp)
(m4_patsubst, m4_regexp, m4_substr, m4_translit, m4_text_wrap): these.
Adjust all dependencies.
* acgeneral.m4: Adjust.
* tests/m4sugar.at: Adjust.
* autoconf.m4 (m4exit, patsubst, regexp, substr, translit):
Reestablish them.
2000-11-03 16:53:26 +08:00
|
|
|
[m4_pushdef([AC_Dest], m4_patsubst(AC_File, [:.*]))
|
2000-02-08 21:51:55 +08:00
|
|
|
AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_HEADERS],
|
|
|
|
[AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_HEADER or AC_CONFIG_HEADERS.])])
|
|
|
|
AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_LINKS],
|
|
|
|
[AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_LINKS.])])
|
2000-05-12 00:56:13 +08:00
|
|
|
AC_CONFIG_IF_MEMBER(AC_Dest, [_AC_LIST_SUBDIRS],
|
2000-02-08 21:51:55 +08:00
|
|
|
[AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_SUBDIRS.])])
|
|
|
|
AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_COMMANDS],
|
|
|
|
[AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_COMMANDS.])])
|
|
|
|
AC_CONFIG_IF_MEMBER(AC_Dest, [AC_LIST_FILES],
|
|
|
|
[AC_FATAL(`AC_Dest' [is already registered with AC_CONFIG_FILES or AC_OUTPUT.])])
|
2000-11-02 22:12:18 +08:00
|
|
|
m4_popdef([AC_Dest])])
|
2001-01-18 17:16:08 +08:00
|
|
|
m4_divert_pop([KILL])dnl
|
1999-12-20 20:14:28 +08:00
|
|
|
])
|
|
|
|
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-03-14 16:19:53 +08:00
|
|
|
# _AC_CONFIG_COMMANDS_INIT([INIT-COMMANDS])
|
|
|
|
# -----------------------------------------
|
2000-02-10 01:01:44 +08:00
|
|
|
#
|
|
|
|
# Register INIT-COMMANDS as command pasted *unquoted* in
|
|
|
|
# `config.status'. This is typically used to pass variables from
|
|
|
|
# `configure' to `config.status'. Note that $[1] is not over quoted as
|
|
|
|
# was the case in AC_OUTPUT_COMMANDS.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_CONFIG_COMMANDS_INIT],
|
2000-11-29 18:09:44 +08:00
|
|
|
[m4_ifval([$1],
|
|
|
|
[m4_append([_AC_OUTPUT_COMMANDS_INIT],
|
|
|
|
[$1
|
2000-03-14 16:19:53 +08:00
|
|
|
])])])
|
|
|
|
|
|
|
|
# Initialize.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_OUTPUT_COMMANDS_INIT])
|
2000-02-10 01:01:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
# AC_CONFIG_COMMANDS(NAME...,[COMMANDS], [INIT-CMDS])
|
|
|
|
# ---------------------------------------------------
|
|
|
|
#
|
|
|
|
# Specify additional commands to be run by config.status. This
|
|
|
|
# commands must be associated with a NAME, which should be thought
|
|
|
|
# as the name of a file the COMMANDS create.
|
|
|
|
AC_DEFUN([AC_CONFIG_COMMANDS],
|
2000-10-31 03:01:24 +08:00
|
|
|
[m4_divert_push([KILL])
|
2000-03-03 00:36:16 +08:00
|
|
|
_AC_CONFIG_UNIQUE([$1])
|
2000-02-10 01:01:44 +08:00
|
|
|
m4_append([AC_LIST_COMMANDS], [ $1])
|
|
|
|
|
2000-12-06 16:58:41 +08:00
|
|
|
m4_if([$2],,, [AC_FOREACH([AC_Name], [$1],
|
2000-02-10 01:01:44 +08:00
|
|
|
[m4_append([AC_LIST_COMMANDS_COMMANDS],
|
* m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros.
Use them.
(debugfile, debugmode, m4exit, m4wrap, maketemp, patsubst, regexp)
(substr, translit, m4_wrap): Rename as...
(m4_debugfile, m4_debugmode, m4_exit, m4_wrap, m4_maketemp)
(m4_patsubst, m4_regexp, m4_substr, m4_translit, m4_text_wrap): these.
Adjust all dependencies.
* acgeneral.m4: Adjust.
* tests/m4sugar.at: Adjust.
* autoconf.m4 (m4exit, patsubst, regexp, substr, translit):
Reestablish them.
2000-11-03 16:53:26 +08:00
|
|
|
[ ]m4_patsubst(AC_Name, [:.*])[ ) $2 ;;
|
2000-02-10 01:01:44 +08:00
|
|
|
])])])
|
|
|
|
_AC_CONFIG_COMMANDS_INIT([$3])
|
2001-01-18 17:16:08 +08:00
|
|
|
m4_divert_pop([KILL])dnl
|
2000-06-26 18:20:36 +08:00
|
|
|
ac_config_commands="$ac_config_commands $1"
|
2000-02-10 01:01:44 +08:00
|
|
|
])dnl
|
|
|
|
|
|
|
|
# Initialize the lists.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_LIST_COMMANDS])
|
|
|
|
m4_define([AC_LIST_COMMANDS_COMMANDS])
|
2000-02-10 01:01:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
# AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS)
|
2000-02-08 02:03:54 +08:00
|
|
|
# -----------------------------------------
|
2000-02-10 01:42:53 +08:00
|
|
|
#
|
2000-02-10 01:01:44 +08:00
|
|
|
# Add additional commands for AC_OUTPUT to put into config.status.
|
2000-02-10 01:42:53 +08:00
|
|
|
#
|
|
|
|
# This macro is an obsolete version of AC_CONFIG_COMMANDS. The only
|
|
|
|
# difficulty in mapping AC_OUTPUT_COMMANDS to AC_CONFIG_COMMANDS is
|
|
|
|
# to give a unique key. The scheme we have chosen is `default-1',
|
|
|
|
# `default-2' etc. for each call.
|
|
|
|
#
|
|
|
|
# Unfortunately this scheme is fragile: bad things might happen
|
2001-01-12 17:19:59 +08:00
|
|
|
# if you update an included file and configure.ac: you might have
|
2000-02-10 01:42:53 +08:00
|
|
|
# clashes :( On the other hand, I'd like to avoid weird keys (e.g.,
|
|
|
|
# depending upon __file__ or the pid).
|
2000-05-22 16:41:36 +08:00
|
|
|
AU_DEFUN([AC_OUTPUT_COMMANDS],
|
2000-11-03 21:41:40 +08:00
|
|
|
[m4_define([_AC_OUTPUT_COMMANDS_CNT], m4_incr(_AC_OUTPUT_COMMANDS_CNT))dnl
|
2000-02-10 01:42:53 +08:00
|
|
|
dnl Double quoted since that was the case in the original macro.
|
2000-05-11 22:05:52 +08:00
|
|
|
AC_CONFIG_COMMANDS([default-]_AC_OUTPUT_COMMANDS_CNT, [[$1]], [[$2]])dnl
|
2000-02-10 01:42:53 +08:00
|
|
|
])
|
|
|
|
|
2000-05-11 22:05:52 +08:00
|
|
|
# Initialize.
|
|
|
|
AU_DEFUN([_AC_OUTPUT_COMMANDS_CNT], 0)
|
2000-02-10 01:01:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
# AC_CONFIG_COMMANDS_PRE(CMDS)
|
|
|
|
# ----------------------------
|
|
|
|
# Commands to run right before config.status is created. Accumulates.
|
|
|
|
AC_DEFUN([AC_CONFIG_COMMANDS_PRE],
|
|
|
|
[m4_append([AC_OUTPUT_COMMANDS_PRE], [$1
|
|
|
|
])])
|
|
|
|
|
|
|
|
# Initialize.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_OUTPUT_COMMANDS_PRE])
|
2000-02-10 01:01:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
# AC_CONFIG_COMMANDS_POST(CMDS)
|
|
|
|
# -----------------------------
|
|
|
|
# Commands to run after config.status was created. Accumulates.
|
|
|
|
AC_DEFUN([AC_CONFIG_COMMANDS_POST],
|
|
|
|
[m4_append([AC_OUTPUT_COMMANDS_POST], [$1
|
|
|
|
])])
|
|
|
|
|
|
|
|
# Initialize.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_OUTPUT_COMMANDS_POST])
|
2000-02-10 01:01:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
# AC_CONFIG_HEADERS(HEADERS..., [COMMANDS], [INIT-CMDS])
|
|
|
|
# ------------------------------------------------------
|
2000-02-08 02:03:54 +08:00
|
|
|
# Specify that the HEADERS are to be created by instantiation of the
|
|
|
|
# AC_DEFINEs. Associate the COMMANDS to the HEADERS. This macro
|
|
|
|
# accumulates if called several times.
|
|
|
|
#
|
|
|
|
# The commands are stored in a growing string AC_LIST_HEADERS_COMMANDS
|
|
|
|
# which should be used like this:
|
|
|
|
#
|
|
|
|
# case $ac_file in
|
|
|
|
# AC_LIST_HEADERS_COMMANDS
|
|
|
|
# esac
|
1999-12-20 21:54:46 +08:00
|
|
|
AC_DEFUN([AC_CONFIG_HEADERS],
|
2000-10-31 03:01:24 +08:00
|
|
|
[m4_divert_push([KILL])
|
2000-03-03 00:36:16 +08:00
|
|
|
_AC_CONFIG_UNIQUE([$1])
|
2000-05-11 16:14:18 +08:00
|
|
|
_AC_CONFIG_DEPENDENCIES([$1])
|
2000-02-10 01:01:44 +08:00
|
|
|
m4_append([AC_LIST_HEADERS], [ $1])
|
1999-12-20 21:54:46 +08:00
|
|
|
dnl Register the commands
|
2000-12-06 16:58:41 +08:00
|
|
|
m4_ifval([$2], [AC_FOREACH([AC_File], [$1],
|
1999-12-20 21:54:46 +08:00
|
|
|
[m4_append([AC_LIST_HEADERS_COMMANDS],
|
* m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros.
Use them.
(debugfile, debugmode, m4exit, m4wrap, maketemp, patsubst, regexp)
(substr, translit, m4_wrap): Rename as...
(m4_debugfile, m4_debugmode, m4_exit, m4_wrap, m4_maketemp)
(m4_patsubst, m4_regexp, m4_substr, m4_translit, m4_text_wrap): these.
Adjust all dependencies.
* acgeneral.m4: Adjust.
* tests/m4sugar.at: Adjust.
* autoconf.m4 (m4exit, patsubst, regexp, substr, translit):
Reestablish them.
2000-11-03 16:53:26 +08:00
|
|
|
[ ]m4_patsubst(AC_File, [:.*])[ ) $2 ;;
|
2000-02-10 01:01:44 +08:00
|
|
|
])])])
|
|
|
|
_AC_CONFIG_COMMANDS_INIT([$3])
|
2001-01-18 17:16:08 +08:00
|
|
|
m4_divert_pop([KILL])dnl
|
2001-01-17 23:23:31 +08:00
|
|
|
ac_config_headers="$ac_config_headers m4_normalize([$1])"
|
1999-12-20 21:54:46 +08:00
|
|
|
])dnl
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# Initialize to empty. It is much easier and uniform to have a config
|
|
|
|
# list expand to empty when undefined, instead of special casing when
|
|
|
|
# not defined (since in this case, AC_CONFIG_FOO expands to AC_CONFIG_FOO).
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_LIST_HEADERS])
|
|
|
|
m4_define([AC_LIST_HEADERS_COMMANDS])
|
1999-12-20 21:54:46 +08:00
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
|
|
|
|
# --------------------------------------
|
|
|
|
# FIXME: Make it obsolete?
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_CONFIG_HEADER],
|
1999-12-20 21:54:46 +08:00
|
|
|
[AC_CONFIG_HEADERS([$1])])
|
|
|
|
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-02-10 01:01:44 +08:00
|
|
|
# AC_CONFIG_LINKS(DEST:SOURCE..., [COMMANDS], [INIT-CMDS])
|
|
|
|
# --------------------------------------------------------
|
2000-02-08 02:03:54 +08:00
|
|
|
# Specify that config.status should establish a (symbolic if possible)
|
|
|
|
# link from TOP_SRCDIR/SOURCE to TOP_SRCDIR/DEST.
|
|
|
|
# Reject DEST=., because it is makes it hard for ./config.status
|
|
|
|
# to guess the links to establish (`./config.status .').
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_CONFIG_LINKS],
|
2000-10-31 03:01:24 +08:00
|
|
|
[m4_divert_push([KILL])
|
2000-03-03 00:36:16 +08:00
|
|
|
_AC_CONFIG_UNIQUE([$1])
|
2000-05-11 16:14:18 +08:00
|
|
|
_AC_CONFIG_DEPENDENCIES([$1])
|
2000-12-06 16:58:41 +08:00
|
|
|
m4_if(m4_regexp([$1], [^\.:\| \.:]), -1,,
|
|
|
|
[AC_FATAL([$0: invalid destination: `.'])])
|
2000-02-10 01:01:44 +08:00
|
|
|
m4_append([AC_LIST_LINKS], [ $1])
|
2000-01-15 01:57:52 +08:00
|
|
|
dnl Register the commands
|
2000-12-06 16:58:41 +08:00
|
|
|
m4_ifval([$2], [AC_FOREACH([AC_File], [$1],
|
2000-01-15 01:57:52 +08:00
|
|
|
[m4_append([AC_LIST_LINKS_COMMANDS],
|
* m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros.
Use them.
(debugfile, debugmode, m4exit, m4wrap, maketemp, patsubst, regexp)
(substr, translit, m4_wrap): Rename as...
(m4_debugfile, m4_debugmode, m4_exit, m4_wrap, m4_maketemp)
(m4_patsubst, m4_regexp, m4_substr, m4_translit, m4_text_wrap): these.
Adjust all dependencies.
* acgeneral.m4: Adjust.
* tests/m4sugar.at: Adjust.
* autoconf.m4 (m4exit, patsubst, regexp, substr, translit):
Reestablish them.
2000-11-03 16:53:26 +08:00
|
|
|
[ ]m4_patsubst(AC_File, [:.*])[ ) $2 ;;
|
2000-02-10 01:01:44 +08:00
|
|
|
])])])
|
|
|
|
_AC_CONFIG_COMMANDS_INIT([$3])
|
2001-01-18 17:16:08 +08:00
|
|
|
m4_divert_pop([KILL])dnl
|
2001-01-17 23:23:31 +08:00
|
|
|
ac_config_links="$ac_config_links m4_normalize([$1])"
|
2000-01-15 01:57:52 +08:00
|
|
|
])dnl
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-02-08 21:25:49 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# Initialize the list.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_LIST_LINKS])
|
|
|
|
m4_define([AC_LIST_LINKS_COMMANDS])
|
1994-09-06 22:36:45 +08:00
|
|
|
|
1999-12-20 21:52:57 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_LINK_FILES(SOURCE..., DEST...)
|
|
|
|
# ---------------------------------
|
|
|
|
# Link each of the existing files SOURCE... to the corresponding
|
|
|
|
# link name in DEST...
|
2000-02-10 17:45:25 +08:00
|
|
|
#
|
|
|
|
# Unfortunately we can't provide a very good autoupdate service here,
|
|
|
|
# since in `AC_LINK_FILES($from, $to)' it is possible that `$from'
|
|
|
|
# and `$to' are actually lists. It would then be completely wrong to
|
|
|
|
# replace it with `AC_CONFIG_LINKS($to:$from). It is possible in the
|
|
|
|
# case of literal values though, but because I don't think there is any
|
|
|
|
# interest in creating config links with literal values, no special
|
|
|
|
# mechanism is implemented to handle them.
|
|
|
|
#
|
|
|
|
# _AC_LINK_CNT is used to be robust to multiple calls.
|
2000-02-08 21:25:49 +08:00
|
|
|
AU_DEFUN([AC_LINK_FILES],
|
2000-12-06 16:58:41 +08:00
|
|
|
[m4_if($#, 2, ,
|
|
|
|
[m4_fatal([$0: incorrect number of arguments])])dnl
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_LINK_FILES_CNT], m4_incr(_AC_LINK_FILES_CNT))dnl
|
2000-02-10 17:45:25 +08:00
|
|
|
ac_sources="$1"
|
|
|
|
ac_dests="$2"
|
|
|
|
while test -n "$ac_sources"; do
|
2000-05-19 21:07:13 +08:00
|
|
|
set $ac_dests; ac_dest=$[1]; shift; ac_dests=$[*]
|
|
|
|
set $ac_sources; ac_source=$[1]; shift; ac_sources=$[*]
|
2000-02-10 17:45:25 +08:00
|
|
|
[ac_config_links_]_AC_LINK_FILES_CNT="$[ac_config_links_]_AC_LINK_FILES_CNT $ac_dest:$ac_source"
|
|
|
|
done
|
|
|
|
AC_CONFIG_LINKS($[ac_config_links_]_AC_LINK_FILES_CNT)dnl
|
|
|
|
],
|
|
|
|
[
|
|
|
|
It is technically impossible to `autoupdate' cleanly from AC_LINK_FILES
|
|
|
|
to AC_CONFIG_FILES. `autoupdate' provides a functional but inelegant
|
|
|
|
update, you should probably tune the result yourself.])# AC_LINK_FILES
|
|
|
|
|
|
|
|
|
2000-05-11 22:05:52 +08:00
|
|
|
# Initialize.
|
|
|
|
AU_DEFUN([_AC_LINK_FILES_CNT], 0)
|
1999-10-30 22:17:20 +08:00
|
|
|
|
1996-11-20 13:09:56 +08:00
|
|
|
|
2000-02-08 21:25:49 +08:00
|
|
|
|
2000-02-10 01:01:44 +08:00
|
|
|
# AC_CONFIG_FILES(FILE..., [COMMANDS], [INIT-CMDS])
|
|
|
|
# -------------------------------------------------
|
2000-02-08 02:03:54 +08:00
|
|
|
# Specify output files, as with AC_OUTPUT, i.e., files that are
|
|
|
|
# configured with AC_SUBST. Associate the COMMANDS to each FILE,
|
|
|
|
# i.e., when config.status creates FILE, run COMMANDS afterwards.
|
|
|
|
#
|
|
|
|
# The commands are stored in a growing string AC_LIST_FILES_COMMANDS
|
|
|
|
# which should be used like this:
|
|
|
|
#
|
|
|
|
# case $ac_file in
|
|
|
|
# AC_LIST_FILES_COMMANDS
|
|
|
|
# esac
|
1999-12-20 20:14:28 +08:00
|
|
|
AC_DEFUN([AC_CONFIG_FILES],
|
2000-10-31 03:01:24 +08:00
|
|
|
[m4_divert_push([KILL])
|
2000-03-03 00:36:16 +08:00
|
|
|
_AC_CONFIG_UNIQUE([$1])
|
2000-05-11 16:14:18 +08:00
|
|
|
_AC_CONFIG_DEPENDENCIES([$1])
|
2000-02-10 01:01:44 +08:00
|
|
|
m4_append([AC_LIST_FILES], [ $1])
|
1999-12-20 21:52:57 +08:00
|
|
|
dnl Register the commands.
|
2000-12-06 16:58:41 +08:00
|
|
|
m4_ifval([$2], [AC_FOREACH([AC_File], [$1],
|
1999-12-20 20:14:28 +08:00
|
|
|
[m4_append([AC_LIST_FILES_COMMANDS],
|
* m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros.
Use them.
(debugfile, debugmode, m4exit, m4wrap, maketemp, patsubst, regexp)
(substr, translit, m4_wrap): Rename as...
(m4_debugfile, m4_debugmode, m4_exit, m4_wrap, m4_maketemp)
(m4_patsubst, m4_regexp, m4_substr, m4_translit, m4_text_wrap): these.
Adjust all dependencies.
* acgeneral.m4: Adjust.
* tests/m4sugar.at: Adjust.
* autoconf.m4 (m4exit, patsubst, regexp, substr, translit):
Reestablish them.
2000-11-03 16:53:26 +08:00
|
|
|
[ ]m4_patsubst(AC_File, [:.*])[ ) $2 ;;
|
2000-02-10 01:01:44 +08:00
|
|
|
])])])
|
|
|
|
_AC_CONFIG_COMMANDS_INIT([$3])
|
2001-01-18 17:16:08 +08:00
|
|
|
m4_divert_pop([KILL])dnl
|
2001-01-17 23:23:31 +08:00
|
|
|
ac_config_files="$ac_config_files m4_normalize([$1])"
|
1999-12-20 21:27:08 +08:00
|
|
|
])dnl
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# Initialize the lists.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_LIST_FILES])
|
|
|
|
m4_define([AC_LIST_FILES_COMMANDS])
|
1999-12-20 21:27:08 +08:00
|
|
|
|
2000-02-08 21:25:49 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_CONFIG_SUBDIRS(DIR ...)
|
|
|
|
# --------------------------
|
2000-05-12 00:56:13 +08:00
|
|
|
# We define two variables:
|
|
|
|
# - ac_subdirs_all
|
|
|
|
# is built in the `default' section, and should contain *all*
|
|
|
|
# the arguments of AC_CONFIG_SUBDIRS. It is used for --help=recursive.
|
|
|
|
# It makes no sense for arguments which are sh variables.
|
|
|
|
# - subdirs
|
|
|
|
# which is built at runtime, so some of these dirs might not be
|
|
|
|
# included, if for instance the user refused a part of the tree.
|
|
|
|
# This is used in _AC_OUTPUT_SUBDIRS.
|
|
|
|
# _AC_LIST_SUBDIRS is used only for _AC_CONFIG_UNIQUE.
|
|
|
|
AC_DEFUN([AC_CONFIG_SUBDIRS],
|
2000-03-03 00:36:16 +08:00
|
|
|
[_AC_CONFIG_UNIQUE([$1])dnl
|
1999-12-20 20:14:28 +08:00
|
|
|
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
|
2000-05-12 00:56:13 +08:00
|
|
|
m4_append([_AC_LIST_SUBDIRS], [ $1])dnl
|
2001-01-15 15:29:24 +08:00
|
|
|
AS_LITERAL_IF([$1], [],
|
|
|
|
[AC_DIAGNOSE(syntax, [$0: you should use literals])])
|
2001-01-17 23:23:31 +08:00
|
|
|
m4_divert_text([DEFAULTS],
|
|
|
|
[ac_subdirs_all="$ac_subdirs_all m4_normalize([$1])"])
|
2000-05-12 00:56:13 +08:00
|
|
|
AC_SUBST(subdirs, "$subdirs $1")dnl
|
1994-09-06 22:36:45 +08:00
|
|
|
])
|
1994-09-01 12:59:32 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# Initialize the list.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_LIST_SUBDIRS])
|
1999-12-20 21:37:12 +08:00
|
|
|
|
1999-12-20 21:27:08 +08:00
|
|
|
|
Get rid of the m4 name spaces.
* libm4.m4 (m4_changequote, m4_define, m4_defn, m4_dnl, m4_indir,
m4_popdef, m4_pushdef, m4_undefine, m4_namespace_push,
m4_namespace_pop, m4_namespace_register, m4_namespace_define,
m4_disable, m4_enable): Removed.
All dependencies adjusted.
* libm4.m4: Remove all the name space initialization.
* acgeneral.m4: Adjust.
(AU_DEFINE): Redefine as `AC_DEFUN'.
* autoupdate.m4: Adjust.
* tests/tools.m4: Temporarily disable the `autoupdate' test.
2000-05-11 21:28:47 +08:00
|
|
|
# autoupdate::AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS])
|
|
|
|
# -------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# If there are arguments given to AC_OUTPUT, dispatch them to the
|
|
|
|
# proper modern macros.
|
2000-05-11 22:05:52 +08:00
|
|
|
AU_DEFUN([AC_OUTPUT],
|
2000-11-29 18:09:44 +08:00
|
|
|
[m4_ifvaln([$1],
|
2000-08-04 17:04:29 +08:00
|
|
|
[AC_CONFIG_FILES([$1])])dnl
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifvaln([$2$3],
|
2000-08-04 17:04:29 +08:00
|
|
|
[AC_CONFIG_COMMANDS(default, [[$2]], [[$3]])])dnl
|
2001-03-09 00:28:03 +08:00
|
|
|
[AC_OUTPUT]])
|
Get rid of the m4 name spaces.
* libm4.m4 (m4_changequote, m4_define, m4_defn, m4_dnl, m4_indir,
m4_popdef, m4_pushdef, m4_undefine, m4_namespace_push,
m4_namespace_pop, m4_namespace_register, m4_namespace_define,
m4_disable, m4_enable): Removed.
All dependencies adjusted.
* libm4.m4: Remove all the name space initialization.
* acgeneral.m4: Adjust.
(AU_DEFINE): Redefine as `AC_DEFUN'.
* autoupdate.m4: Adjust.
* tests/tools.m4: Temporarily disable the `autoupdate' test.
2000-05-11 21:28:47 +08:00
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS])
|
|
|
|
# -------------------------------------------------------
|
|
|
|
# The big finish.
|
|
|
|
# Produce config.status, config.h, and links; and configure subdirs.
|
|
|
|
# The CONFIG_HEADERS are defined in the m4 variable AC_LIST_HEADERS.
|
|
|
|
# Pay special attention not to have too long here docs: some old
|
|
|
|
# shells die. Unfortunately the limit is not known precisely...
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_OUTPUT],
|
1999-12-20 21:37:12 +08:00
|
|
|
[dnl Dispatch the extra arguments to their native macros.
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifval([$1],
|
|
|
|
[AC_CONFIG_FILES([$1])])dnl
|
|
|
|
m4_ifval([$2$3],
|
|
|
|
[AC_CONFIG_COMMANDS(default, [$2], [$3])])dnl
|
2001-03-09 00:28:03 +08:00
|
|
|
m4_ifval([$1$2$3],
|
|
|
|
[AC_DIAGNOSE([obsolete],
|
2001-06-02 01:07:05 +08:00
|
|
|
[$0 should be used without arguments.
|
2001-03-09 00:28:03 +08:00
|
|
|
You should run autoupdate.])])dnl
|
1994-09-15 08:58:48 +08:00
|
|
|
AC_CACHE_SAVE
|
1994-05-10 09:55:50 +08:00
|
|
|
|
1994-10-19 08:29:13 +08:00
|
|
|
test "x$prefix" = xNONE && prefix=$ac_default_prefix
|
1994-05-18 03:26:10 +08:00
|
|
|
# Let make expand exec_prefix.
|
1994-06-23 02:22:34 +08:00
|
|
|
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
|
1994-05-10 09:55:50 +08:00
|
|
|
|
2001-02-07 23:04:52 +08:00
|
|
|
# VPATH may cause trouble with some makes, so we remove $(srcdir),
|
|
|
|
# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
|
|
|
|
# trailing colons and then remove the whole line if VPATH becomes empty
|
|
|
|
# (actually we leave an empty line to preserve line numbers).
|
1994-03-18 16:02:20 +08:00
|
|
|
if test "x$srcdir" = x.; then
|
2001-02-07 23:04:52 +08:00
|
|
|
ac_vpsub=['/^[ ]*VPATH[ ]*=/{
|
|
|
|
s/:*\$(srcdir):*/:/;
|
|
|
|
s/:*\${srcdir}:*/:/;
|
|
|
|
s/:*@srcdir@:*/:/;
|
|
|
|
s/^\([^=]*=[ ]*\):*/\1/;
|
|
|
|
s/:*$//;
|
|
|
|
s/^[^=]*=[ ]*$//;
|
|
|
|
}']
|
1994-03-18 16:02:20 +08:00
|
|
|
fi
|
1994-03-18 16:18:08 +08:00
|
|
|
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifset([AC_LIST_HEADERS], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
|
1994-05-25 09:21:21 +08:00
|
|
|
|
1999-12-21 19:11:54 +08:00
|
|
|
dnl Commands to run before creating config.status.
|
Test that the macros respect the user variable name space.
* acgeneral.m4 (AC_CANONICAL_THING): define, not AC_DEFUN.
Don't AC_PROVIDE, there is no need.
When calling `config.sub`, also || exit 1, to catch failures from
config.sub.
* acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Use ac_val, not val.
(AC_EXEEXT): Use ac_file, not file.
* tests/actest.m4: New file, holding extra Autoconf macros used
during the testing.
(AC_ENV_SAVE): New macro, save the sh variables in a file.
* tests/suite.m4 (AT_TEST_MACRO, Generation of configure.in):
include actest.m4, and call twice AC_ENV_SAVE to compare the
variables before and after the macro.
* tests/Makefile.am (macro.m4): Don't test macros that are
required: they will be tested somewhere else.
2000-02-07 21:25:35 +08:00
|
|
|
AC_OUTPUT_COMMANDS_PRE()dnl
|
1999-12-21 19:11:54 +08:00
|
|
|
|
1994-05-25 09:21:21 +08:00
|
|
|
: ${CONFIG_STATUS=./config.status}
|
2000-11-14 18:09:20 +08:00
|
|
|
ac_clean_files_save=$ac_clean_files
|
|
|
|
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
|
2000-02-10 17:37:37 +08:00
|
|
|
_AC_OUTPUT_CONFIG_STATUS()dnl
|
2000-11-14 18:09:20 +08:00
|
|
|
ac_clean_files=$ac_clean_files_save
|
1999-12-21 19:11:54 +08:00
|
|
|
|
|
|
|
dnl Commands to run after config.status was created
|
Test that the macros respect the user variable name space.
* acgeneral.m4 (AC_CANONICAL_THING): define, not AC_DEFUN.
Don't AC_PROVIDE, there is no need.
When calling `config.sub`, also || exit 1, to catch failures from
config.sub.
* acspecific.m4 (AC_SYS_LONG_FILE_NAMES): Use ac_val, not val.
(AC_EXEEXT): Use ac_file, not file.
* tests/actest.m4: New file, holding extra Autoconf macros used
during the testing.
(AC_ENV_SAVE): New macro, save the sh variables in a file.
* tests/suite.m4 (AT_TEST_MACRO, Generation of configure.in):
include actest.m4, and call twice AC_ENV_SAVE to compare the
variables before and after the macro.
* tests/Makefile.am (macro.m4): Don't test macros that are
required: they will be tested somewhere else.
2000-02-07 21:25:35 +08:00
|
|
|
AC_OUTPUT_COMMANDS_POST()dnl
|
1999-12-21 19:11:54 +08:00
|
|
|
|
2001-04-21 01:03:16 +08:00
|
|
|
# configure is writing to config.log, and then calls config.status.
|
|
|
|
# config.status does its own redirection, appending to config.log.
|
|
|
|
# Unfortunately, on DOS this fails, as config.log is still kept open
|
|
|
|
# by configure, so config.status won't be able to write to it; its
|
|
|
|
# output is simply discarded. So we exec the FD to /dev/null,
|
|
|
|
# effectively closing config.log, so it can be properly (re)opened and
|
|
|
|
# appended to by config.status. When coming back to configure, we
|
|
|
|
# need to make the FD available again.
|
|
|
|
if test "$no_create" != yes; then
|
|
|
|
ac_cs_success=:
|
|
|
|
exec AS_MESSAGE_LOG_FD>/dev/null
|
|
|
|
$SHELL $CONFIG_STATUS || ac_cs_success=false
|
|
|
|
exec AS_MESSAGE_LOG_FD>>config.log
|
|
|
|
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
|
|
|
|
# would make configure fail if this is the last instruction.
|
|
|
|
$ac_cs_success || AS_EXIT([1])
|
|
|
|
fi
|
1999-12-20 21:37:12 +08:00
|
|
|
dnl config.status should not do recursion.
|
2000-05-12 00:56:13 +08:00
|
|
|
AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])dnl
|
2000-02-08 18:46:43 +08:00
|
|
|
])# AC_OUTPUT
|
1999-12-20 21:37:12 +08:00
|
|
|
|
|
|
|
|
2000-02-10 17:37:37 +08:00
|
|
|
# _AC_OUTPUT_CONFIG_STATUS
|
|
|
|
# ------------------------
|
2000-02-08 02:03:54 +08:00
|
|
|
# Produce config.status. Called by AC_OUTPUT.
|
|
|
|
# Pay special attention not to have too long here docs: some old
|
|
|
|
# shells die. Unfortunately the limit is not known precisely...
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_OUTPUT_CONFIG_STATUS],
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
[AC_MSG_NOTICE([creating $CONFIG_STATUS])
|
2001-03-19 21:29:02 +08:00
|
|
|
cat >$CONFIG_STATUS <<_ACEOF
|
|
|
|
#! $SHELL
|
1993-10-21 07:33:19 +08:00
|
|
|
# Generated automatically by configure.
|
|
|
|
# Run this file to recreate the current configuration.
|
1994-08-11 00:47:42 +08:00
|
|
|
# Compiler output produced by configure, useful for debugging
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
# configure, is in config.log if it exists.
|
1993-10-21 07:33:19 +08:00
|
|
|
|
2000-05-09 17:45:04 +08:00
|
|
|
debug=false
|
2001-03-19 21:29:02 +08:00
|
|
|
SHELL=\${CONFIG_SHELL-$SHELL}
|
2001-04-10 19:33:50 +08:00
|
|
|
ac_cs_invocation="\$[0] \$[@]"
|
2001-03-19 21:29:02 +08:00
|
|
|
|
|
|
|
_ACEOF
|
2000-05-09 17:45:04 +08:00
|
|
|
|
2001-03-19 21:29:02 +08:00
|
|
|
cat >>$CONFIG_STATUS <<\_ACEOF
|
2000-11-14 19:01:44 +08:00
|
|
|
AS_SHELL_SANITIZE
|
2001-04-18 18:47:32 +08:00
|
|
|
exec AS_MESSAGE_FD>&1
|
2000-06-26 18:20:36 +08:00
|
|
|
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
_ACEOF
|
|
|
|
|
2000-06-26 18:20:36 +08:00
|
|
|
# Files that config.status was made for.
|
|
|
|
if test -n "$ac_config_files"; then
|
|
|
|
echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -n "$ac_config_headers"; then
|
|
|
|
echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -n "$ac_config_links"; then
|
|
|
|
echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -n "$ac_config_commands"; then
|
|
|
|
echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
|
|
|
|
fi
|
|
|
|
|
2000-06-07 14:57:51 +08:00
|
|
|
cat >>$CONFIG_STATUS <<\EOF
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-05-09 17:45:04 +08:00
|
|
|
ac_cs_usage="\
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
\`$as_me' instantiates files from templates according to the
|
1999-10-30 22:17:20 +08:00
|
|
|
current configuration.
|
|
|
|
|
2000-09-21 21:37:26 +08:00
|
|
|
Usage: $[0] [[OPTIONS]] [[FILE]]...
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-05-09 17:45:04 +08:00
|
|
|
-h, --help print this help, then exit
|
|
|
|
-V, --version print version number, then exit
|
|
|
|
-d, --debug don't remove temporary files
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
--recheck update $as_me by reconfiguring in the same conditions
|
2001-04-17 21:15:54 +08:00
|
|
|
m4_ifset([AC_LIST_FILES],
|
|
|
|
[[ --file=FILE[:TEMPLATE]
|
|
|
|
instantiate the configuration file FILE
|
|
|
|
]])dnl
|
|
|
|
m4_ifset([AC_LIST_HEADERS],
|
|
|
|
[[ --header=FILE[:TEMPLATE]
|
|
|
|
instantiate the configuration header FILE
|
|
|
|
]])dnl
|
2000-01-15 02:10:44 +08:00
|
|
|
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifset([AC_LIST_FILES],
|
2000-01-15 02:15:57 +08:00
|
|
|
[Configuration files:
|
2000-05-09 17:45:04 +08:00
|
|
|
$config_files
|
2000-01-15 02:10:44 +08:00
|
|
|
|
1999-10-30 22:17:20 +08:00
|
|
|
])dnl
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifset([AC_LIST_HEADERS],
|
2000-01-15 02:15:57 +08:00
|
|
|
[Configuration headers:
|
2000-05-09 17:45:04 +08:00
|
|
|
$config_headers
|
2000-01-15 02:10:44 +08:00
|
|
|
|
1999-10-30 22:17:20 +08:00
|
|
|
])dnl
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifset([AC_LIST_LINKS],
|
2000-02-10 01:36:03 +08:00
|
|
|
[Configuration links:
|
2000-05-09 17:45:04 +08:00
|
|
|
$config_links
|
2000-01-15 02:10:44 +08:00
|
|
|
|
1999-10-30 22:17:20 +08:00
|
|
|
])dnl
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifset([AC_LIST_COMMANDS],
|
2000-02-10 01:36:03 +08:00
|
|
|
[Configuration commands:
|
2000-05-09 17:45:04 +08:00
|
|
|
$config_commands
|
1999-10-30 22:17:20 +08:00
|
|
|
|
|
|
|
])dnl
|
|
|
|
Report bugs to <bug-autoconf@gnu.org>."
|
2000-05-09 17:45:04 +08:00
|
|
|
EOF
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-05-09 17:45:04 +08:00
|
|
|
cat >>$CONFIG_STATUS <<EOF
|
1999-10-30 22:17:20 +08:00
|
|
|
ac_cs_version="\\
|
2001-04-17 04:13:54 +08:00
|
|
|
m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.status[]dnl
|
|
|
|
m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
|
2001-04-15 23:57:50 +08:00
|
|
|
configured by [$]0, generated by GNU Autoconf AC_ACVERSION,
|
2001-04-26 22:07:44 +08:00
|
|
|
with options \\"`echo "$ac_configure_args" | sed 's/[[\\""\`\$]]/\\\\&/g'`\\"
|
2001-04-15 23:57:50 +08:00
|
|
|
|
|
|
|
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
|
|
|
|
Free Software Foundation, Inc.
|
|
|
|
This config.status script is free software; the Free Software Foundation
|
|
|
|
gives unlimited permission to copy, distribute and modify it."
|
2001-01-24 21:19:10 +08:00
|
|
|
srcdir=$srcdir
|
2000-04-11 20:02:34 +08:00
|
|
|
AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
|
2000-04-11 20:00:13 +08:00
|
|
|
[dnl Leave those double quotes here: this $INSTALL is evaluated in a
|
2001-01-24 21:41:52 +08:00
|
|
|
dnl here document, which might result in `INSTALL=/bin/install -c'.
|
|
|
|
INSTALL="$INSTALL"
|
1999-10-30 22:17:20 +08:00
|
|
|
])dnl
|
2000-05-09 17:45:04 +08:00
|
|
|
EOF
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-05-09 17:45:04 +08:00
|
|
|
cat >>$CONFIG_STATUS <<\EOF
|
2000-01-15 02:10:44 +08:00
|
|
|
# If no file are specified by the user, then we need to provide default
|
|
|
|
# value. By we need to know if files were specified by the user.
|
|
|
|
ac_need_defaults=:
|
2000-05-09 17:45:04 +08:00
|
|
|
while test $[#] != 0
|
1993-10-21 07:33:19 +08:00
|
|
|
do
|
2000-05-26 23:02:42 +08:00
|
|
|
case $[1] in
|
2000-01-15 02:10:44 +08:00
|
|
|
--*=*)
|
2000-06-26 18:21:29 +08:00
|
|
|
ac_option=`expr "x$[1]" : 'x\([[^=]]*\)='`
|
|
|
|
ac_optarg=`expr "x$[1]" : 'x[[^=]]*=\(.*\)'`
|
2000-01-15 02:10:44 +08:00
|
|
|
shift
|
2000-05-19 21:07:13 +08:00
|
|
|
set dummy "$ac_option" "$ac_optarg" ${1+"$[@]"}
|
2000-01-15 02:10:44 +08:00
|
|
|
shift
|
|
|
|
;;
|
|
|
|
-*);;
|
|
|
|
*) # This is not an option, so the user has probably given explicit
|
|
|
|
# arguments.
|
|
|
|
ac_need_defaults=false;;
|
|
|
|
esac
|
|
|
|
|
2000-05-26 23:02:42 +08:00
|
|
|
case $[1] in
|
1999-12-20 21:37:12 +08:00
|
|
|
# Handling of the options.
|
2000-05-22 16:05:40 +08:00
|
|
|
EOF
|
|
|
|
cat >>$CONFIG_STATUS <<EOF
|
1994-03-24 11:41:48 +08:00
|
|
|
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
|
2000-05-22 16:05:40 +08:00
|
|
|
echo "running $SHELL $[0] " $ac_configure_args " --no-create --no-recursion"
|
|
|
|
exec $SHELL $[0] $ac_configure_args --no-create --no-recursion ;;
|
|
|
|
EOF
|
|
|
|
cat >>$CONFIG_STATUS <<\EOF
|
2000-05-09 17:45:04 +08:00
|
|
|
--version | --vers* | -V )
|
|
|
|
echo "$ac_cs_version"; exit 0 ;;
|
2000-01-15 02:10:44 +08:00
|
|
|
--he | --h)
|
|
|
|
# Conflict between --help and --header
|
2000-12-02 09:40:17 +08:00
|
|
|
AC_MSG_ERROR([ambiguous option: $[1]
|
|
|
|
Try `$[0] --help' for more information.]);;
|
2000-05-09 17:45:04 +08:00
|
|
|
--help | --hel | -h )
|
|
|
|
echo "$ac_cs_usage"; exit 0 ;;
|
|
|
|
--debug | --d* | -d )
|
2000-06-13 22:56:23 +08:00
|
|
|
debug=: ;;
|
2000-01-15 02:10:44 +08:00
|
|
|
--file | --fil | --fi | --f )
|
|
|
|
shift
|
2000-05-09 17:45:04 +08:00
|
|
|
CONFIG_FILES="$CONFIG_FILES $[1]"
|
2000-01-15 02:10:44 +08:00
|
|
|
ac_need_defaults=false;;
|
|
|
|
--header | --heade | --head | --hea )
|
|
|
|
shift
|
2000-05-09 17:45:04 +08:00
|
|
|
CONFIG_HEADERS="$CONFIG_HEADERS $[1]"
|
2000-01-15 02:10:44 +08:00
|
|
|
ac_need_defaults=false;;
|
|
|
|
|
1999-12-20 21:37:12 +08:00
|
|
|
# Handling of arguments.
|
|
|
|
AC_FOREACH([AC_File], AC_LIST_FILES,
|
* m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros.
Use them.
(debugfile, debugmode, m4exit, m4wrap, maketemp, patsubst, regexp)
(substr, translit, m4_wrap): Rename as...
(m4_debugfile, m4_debugmode, m4_exit, m4_wrap, m4_maketemp)
(m4_patsubst, m4_regexp, m4_substr, m4_translit, m4_text_wrap): these.
Adjust all dependencies.
* acgeneral.m4: Adjust.
* tests/m4sugar.at: Adjust.
* autoconf.m4 (m4exit, patsubst, regexp, substr, translit):
Reestablish them.
2000-11-03 16:53:26 +08:00
|
|
|
[ 'm4_patsubst(AC_File, [:.*])' )dnl
|
2000-05-09 17:45:04 +08:00
|
|
|
CONFIG_FILES="$CONFIG_FILES AC_File" ;;
|
1999-12-20 21:37:12 +08:00
|
|
|
])dnl
|
|
|
|
AC_FOREACH([AC_File], AC_LIST_LINKS,
|
* m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros.
Use them.
(debugfile, debugmode, m4exit, m4wrap, maketemp, patsubst, regexp)
(substr, translit, m4_wrap): Rename as...
(m4_debugfile, m4_debugmode, m4_exit, m4_wrap, m4_maketemp)
(m4_patsubst, m4_regexp, m4_substr, m4_translit, m4_text_wrap): these.
Adjust all dependencies.
* acgeneral.m4: Adjust.
* tests/m4sugar.at: Adjust.
* autoconf.m4 (m4exit, patsubst, regexp, substr, translit):
Reestablish them.
2000-11-03 16:53:26 +08:00
|
|
|
[ 'm4_patsubst(AC_File, [:.*])' )dnl
|
2000-05-09 17:45:04 +08:00
|
|
|
CONFIG_LINKS="$CONFIG_LINKS AC_File" ;;
|
1999-12-20 21:37:12 +08:00
|
|
|
])dnl
|
|
|
|
AC_FOREACH([AC_File], AC_LIST_COMMANDS,
|
* m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros.
Use them.
(debugfile, debugmode, m4exit, m4wrap, maketemp, patsubst, regexp)
(substr, translit, m4_wrap): Rename as...
(m4_debugfile, m4_debugmode, m4_exit, m4_wrap, m4_maketemp)
(m4_patsubst, m4_regexp, m4_substr, m4_translit, m4_text_wrap): these.
Adjust all dependencies.
* acgeneral.m4: Adjust.
* tests/m4sugar.at: Adjust.
* autoconf.m4 (m4exit, patsubst, regexp, substr, translit):
Reestablish them.
2000-11-03 16:53:26 +08:00
|
|
|
[ 'm4_patsubst(AC_File, [:.*])' )dnl
|
2000-05-09 17:45:04 +08:00
|
|
|
CONFIG_COMMANDS="$CONFIG_COMMANDS AC_File" ;;
|
1999-12-20 21:37:12 +08:00
|
|
|
])dnl
|
|
|
|
AC_FOREACH([AC_File], AC_LIST_HEADERS,
|
* m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros.
Use them.
(debugfile, debugmode, m4exit, m4wrap, maketemp, patsubst, regexp)
(substr, translit, m4_wrap): Rename as...
(m4_debugfile, m4_debugmode, m4_exit, m4_wrap, m4_maketemp)
(m4_patsubst, m4_regexp, m4_substr, m4_translit, m4_text_wrap): these.
Adjust all dependencies.
* acgeneral.m4: Adjust.
* tests/m4sugar.at: Adjust.
* autoconf.m4 (m4exit, patsubst, regexp, substr, translit):
Reestablish them.
2000-11-03 16:53:26 +08:00
|
|
|
[ 'm4_patsubst(AC_File, [:.*])' )dnl
|
2000-05-09 17:45:04 +08:00
|
|
|
CONFIG_HEADERS="$CONFIG_HEADERS AC_File" ;;
|
1999-12-20 21:37:12 +08:00
|
|
|
])dnl
|
2000-01-15 02:10:44 +08:00
|
|
|
|
1999-12-20 21:37:12 +08:00
|
|
|
# This is an error.
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
-*) AC_MSG_ERROR([unrecognized option: $[1]
|
2000-12-02 09:40:17 +08:00
|
|
|
Try `$[0] --help' for more information.]) ;;
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
*) AC_MSG_ERROR([invalid argument: $[1]]);;
|
1993-10-21 07:33:19 +08:00
|
|
|
esac
|
2000-01-15 02:10:44 +08:00
|
|
|
shift
|
1993-10-21 07:33:19 +08:00
|
|
|
done
|
|
|
|
|
2001-04-10 19:33:50 +08:00
|
|
|
exec AS_MESSAGE_LOG_FD>>config.log
|
|
|
|
cat >&AS_MESSAGE_LOG_FD << _ACEOF
|
|
|
|
|
|
|
|
## ----------------------- ##
|
|
|
|
## Running config.status. ##
|
|
|
|
## ----------------------- ##
|
|
|
|
|
|
|
|
This file was extended by $as_me m4_ifset([AC_PACKAGE_STRING],
|
|
|
|
[(AC_PACKAGE_STRING) ])AC_ACVERSION, executed with
|
|
|
|
> $ac_cs_invocation
|
|
|
|
on `(hostname || uname -n) 2>/dev/null | sed 1q`
|
|
|
|
|
|
|
|
_ACEOF
|
1999-10-30 22:17:20 +08:00
|
|
|
EOF
|
|
|
|
|
|
|
|
dnl Issue this section only if there were actually config files.
|
2000-01-15 01:38:31 +08:00
|
|
|
dnl This checks if one of AC_LIST_HEADERS, AC_LIST_FILES, AC_LIST_COMMANDS,
|
1999-12-20 21:37:12 +08:00
|
|
|
dnl or AC_LIST_LINKS is set.
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifval(AC_LIST_HEADERS()AC_LIST_LINKS()AC_LIST_FILES()AC_LIST_COMMANDS(),
|
2000-02-10 18:37:03 +08:00
|
|
|
[cat >>$CONFIG_STATUS <<\EOF
|
2000-01-15 02:10:44 +08:00
|
|
|
# If the user did not use the arguments to specify the items to instantiate,
|
|
|
|
# then the envvar interface is used. Set only those that are not.
|
2001-01-22 19:14:37 +08:00
|
|
|
# We use the long form for the default assignment because of an extremely
|
|
|
|
# bizarre bug on SunOS 4.1.3.
|
2000-02-10 18:37:03 +08:00
|
|
|
if $ac_need_defaults; then
|
2000-11-30 02:20:01 +08:00
|
|
|
m4_ifset([AC_LIST_FILES],
|
2001-01-22 19:14:37 +08:00
|
|
|
[ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
|
1999-10-30 22:17:20 +08:00
|
|
|
])dnl
|
2000-11-30 02:20:01 +08:00
|
|
|
m4_ifset([AC_LIST_HEADERS],
|
2001-01-22 19:14:37 +08:00
|
|
|
[ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
|
1994-08-26 02:05:45 +08:00
|
|
|
])dnl
|
2000-11-30 02:20:01 +08:00
|
|
|
m4_ifset([AC_LIST_LINKS],
|
2001-01-22 19:14:37 +08:00
|
|
|
[ test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
|
1999-10-30 22:17:20 +08:00
|
|
|
])dnl
|
2000-11-30 02:20:01 +08:00
|
|
|
m4_ifset([AC_LIST_COMMANDS],
|
2001-01-22 19:14:37 +08:00
|
|
|
[ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
|
1999-12-20 21:27:08 +08:00
|
|
|
])dnl
|
1999-10-30 22:17:20 +08:00
|
|
|
fi
|
1994-08-24 14:41:01 +08:00
|
|
|
|
Move the Autoconf independent shell macros into the file
`shell.m4' and the name space `AS_*'.
* acgeneral.m4 (AC_SHELL_IFELSE, _AC_SHELL_TMPDIR, AC_SHELL_UNSET)
(AC_SHELL_MKDIR_P, AC_SHELL_DIRNAME): Rename and move to...
* shell.m4 (AS_IFELSE, AS_TMPDIR, AS_UNSET, AS_MKDIR_P)
(AS_DIRNAME): here, a new file.
Adjust all dependencies.
* tests/base.m4 (m4_wrap): Eve out into...
* tests/shell.m4: here, new file.
* tests/base.m4 (AC_SHELL_MKDIR_P)
(AC_SHELL_DIRNAME & AC_SHELL_DIRNAME_SED): Eve out into...
* tests/m4sugar.m4 (AS_MKDIR_P, AS_DIRNAME & AS_DIRNAME_SED):
here, new file.
Adjust the test suite.
2000-10-26 01:51:10 +08:00
|
|
|
AS_TMPDIR(cs)
|
1993-10-21 07:33:19 +08:00
|
|
|
|
1996-11-21 06:16:05 +08:00
|
|
|
EOF
|
2000-11-29 18:09:44 +08:00
|
|
|
])[]dnl m4_ifval
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-02-10 01:01:44 +08:00
|
|
|
dnl We output the INIT-CMDS first for obvious reasons :)
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifset([_AC_OUTPUT_COMMANDS_INIT],
|
2000-03-14 16:19:53 +08:00
|
|
|
[cat >>$CONFIG_STATUS <<EOF
|
2000-02-10 01:01:44 +08:00
|
|
|
#
|
|
|
|
# INIT-COMMANDS section.
|
|
|
|
#
|
|
|
|
|
2000-03-14 16:19:53 +08:00
|
|
|
_AC_OUTPUT_COMMANDS_INIT()
|
|
|
|
EOF])
|
2000-02-10 01:01:44 +08:00
|
|
|
|
|
|
|
|
2000-03-14 16:27:19 +08:00
|
|
|
dnl The following four sections are in charge of their own here
|
1999-10-30 22:17:20 +08:00
|
|
|
dnl documenting into $CONFIG_STATUS.
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifset([AC_LIST_FILES], [_AC_OUTPUT_FILES()])dnl
|
|
|
|
m4_ifset([AC_LIST_HEADERS], [_AC_OUTPUT_HEADERS()])dnl
|
|
|
|
m4_ifset([AC_LIST_LINKS], [_AC_OUTPUT_LINKS()])dnl
|
|
|
|
m4_ifset([AC_LIST_COMMANDS], [_AC_OUTPUT_COMMANDS()])dnl
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-02-10 01:01:44 +08:00
|
|
|
cat >>$CONFIG_STATUS <<\EOF
|
2000-02-08 17:45:21 +08:00
|
|
|
|
2001-02-21 17:44:55 +08:00
|
|
|
AS_EXIT(0)
|
1994-08-23 23:04:53 +08:00
|
|
|
EOF
|
1994-09-13 23:20:48 +08:00
|
|
|
chmod +x $CONFIG_STATUS
|
2000-02-10 17:37:37 +08:00
|
|
|
])# _AC_OUTPUT_CONFIG_STATUS
|
1994-09-06 04:12:21 +08:00
|
|
|
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_OUTPUT_MAKE_DEFS
|
|
|
|
# -------------------
|
|
|
|
# Set the DEFS variable to the -D options determined earlier.
|
|
|
|
# This is a subroutine of AC_OUTPUT.
|
|
|
|
# It is called inside configure, outside of config.status.
|
2000-02-10 21:08:33 +08:00
|
|
|
# Using a here document instead of a string reduces the quoting nightmare.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([AC_OUTPUT_MAKE_DEFS],
|
2000-02-10 21:08:33 +08:00
|
|
|
[[# Transform confdefs.h into DEFS.
|
1994-09-07 14:21:38 +08:00
|
|
|
# Protect against shell expansion while executing Makefile rules.
|
|
|
|
# Protect against Makefile macro expansion.
|
1999-10-30 22:17:20 +08:00
|
|
|
#
|
|
|
|
# If the first sed substitution is executed (which looks for macros that
|
2000-11-30 01:57:55 +08:00
|
|
|
# take arguments), then we branch to the quote section. Otherwise,
|
1999-10-30 22:17:20 +08:00
|
|
|
# look for a macro that doesn't take arguments.
|
2000-05-09 17:45:04 +08:00
|
|
|
cat >confdef2opt.sed <<\EOF
|
2000-06-17 01:40:44 +08:00
|
|
|
t clear
|
|
|
|
: clear
|
2000-07-10 16:43:55 +08:00
|
|
|
s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
|
2000-11-30 01:57:55 +08:00
|
|
|
t quote
|
2000-07-10 16:43:55 +08:00
|
|
|
s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
|
2001-01-31 03:29:38 +08:00
|
|
|
t quote
|
|
|
|
d
|
2000-11-30 01:57:55 +08:00
|
|
|
: quote
|
2000-07-10 16:43:55 +08:00
|
|
|
s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
|
|
|
|
s,\[,\\&,g
|
|
|
|
s,\],\\&,g
|
|
|
|
s,\$,$$,g
|
2001-01-31 03:29:38 +08:00
|
|
|
p
|
1994-08-24 14:41:01 +08:00
|
|
|
EOF
|
1999-09-15 12:23:15 +08:00
|
|
|
# We use echo to avoid assuming a particular line-breaking character.
|
|
|
|
# The extra dot is to prevent the shell from consuming trailing
|
|
|
|
# line-breaks from the sub-command output. A line-break within
|
|
|
|
# single-quotes doesn't work because, if this script is created in a
|
|
|
|
# platform that uses two characters for line-breaks (e.g., DOS), tr
|
|
|
|
# would break.
|
2000-01-29 17:46:28 +08:00
|
|
|
ac_LF_and_DOT=`echo; echo .`
|
2001-01-31 03:29:38 +08:00
|
|
|
DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
|
2000-05-09 17:45:04 +08:00
|
|
|
rm -f confdef2opt.sed
|
2000-02-10 21:08:33 +08:00
|
|
|
]])# AC_OUTPUT_MAKE_DEFS
|
1994-09-06 04:12:21 +08:00
|
|
|
|
1999-10-30 22:17:20 +08:00
|
|
|
|
2000-03-14 16:27:19 +08:00
|
|
|
# _AC_OUTPUT_FILES
|
|
|
|
# ----------------
|
2000-02-08 02:03:54 +08:00
|
|
|
# Do the variable substitutions to create the Makefiles or whatever.
|
|
|
|
# This is a subroutine of AC_OUTPUT.
|
|
|
|
#
|
|
|
|
# It has to send itself into $CONFIG_STATUS (eg, via here documents).
|
|
|
|
# Upon exit, no here document shall be opened.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_OUTPUT_FILES],
|
1999-10-30 22:17:20 +08:00
|
|
|
[cat >>$CONFIG_STATUS <<EOF
|
1999-12-20 20:14:28 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# CONFIG_FILES section.
|
|
|
|
#
|
|
|
|
|
2000-02-08 18:03:26 +08:00
|
|
|
# No need to generate the scripts if there are no CONFIG_FILES.
|
|
|
|
# This happens for instance when ./config.status config.h
|
|
|
|
if test -n "\$CONFIG_FILES"; then
|
|
|
|
# Protect against being on the right side of a sed subst in config.status.
|
1999-10-30 22:17:20 +08:00
|
|
|
dnl Please, pay attention that this sed code depends a lot on the shape
|
|
|
|
dnl of the sed commands issued by AC_SUBST. So if you change one, change
|
|
|
|
dnl the other too.
|
2000-07-10 16:43:55 +08:00
|
|
|
[ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
|
|
|
|
s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF]
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl These here document variables are unquoted when configure runs
|
|
|
|
dnl but quoted when config.status runs, so variables are expanded once.
|
|
|
|
dnl Insert the sed substitutions of variables.
|
2000-02-10 17:40:09 +08:00
|
|
|
_AC_SUBST_SED_PROGRAM()dnl
|
1994-08-24 14:41:01 +08:00
|
|
|
CEOF
|
1999-10-30 22:17:20 +08:00
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
EOF
|
1996-11-13 13:18:44 +08:00
|
|
|
|
2000-02-08 18:03:26 +08:00
|
|
|
cat >>$CONFIG_STATUS <<\EOF
|
|
|
|
# Split the substitutions into bite-sized pieces for seds with
|
|
|
|
# small command number limits, like on Digital OSF/1 and HP-UX.
|
1999-10-30 22:17:20 +08:00
|
|
|
dnl One cannot portably go further than 100 commands because of HP-UX.
|
|
|
|
dnl Here, there are 2 cmd per line, and two cmd are added later.
|
2000-02-08 18:03:26 +08:00
|
|
|
ac_max_sed_lines=48
|
|
|
|
ac_sed_frag=1 # Number of current file.
|
|
|
|
ac_beg=1 # First line for current file.
|
|
|
|
ac_end=$ac_max_sed_lines # Line after last line for current file.
|
|
|
|
ac_more_lines=:
|
2000-05-03 16:53:06 +08:00
|
|
|
ac_sed_cmds=
|
2000-02-08 18:03:26 +08:00
|
|
|
while $ac_more_lines; do
|
|
|
|
if test $ac_beg -gt 1; then
|
2000-05-09 17:45:04 +08:00
|
|
|
sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
|
1996-11-13 13:18:44 +08:00
|
|
|
else
|
2000-05-09 17:45:04 +08:00
|
|
|
sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
|
1996-11-13 13:18:44 +08:00
|
|
|
fi
|
2000-05-09 17:45:04 +08:00
|
|
|
if test ! -s $tmp/subs.frag; then
|
2000-02-08 18:03:26 +08:00
|
|
|
ac_more_lines=false
|
|
|
|
else
|
|
|
|
# The purpose of the label and of the branching condition is to
|
|
|
|
# speed up the sed processing (if there are no `@' at all, there
|
|
|
|
# is no need to browse any of the substitutions).
|
|
|
|
# These are the two extra sed commands mentioned above.
|
Changequote-busters!
From Dan Ackroyd.
* acgeneral.m4 (AC_INIT_PARSE_ARGS, AC_INIT_PREPARE,
AC_CACHE_SAVE, AC_PREFIX_PROGRAM, AC_OUTPUT,
_AC_OUTPUT_CONFIG_STATUS, AC_OUTPUT_MAKE_DEFS, AC_OUTPUT_FILES,
_AC_OUTPUT_HEADERS, AC_OUTPUT_LINKS, AC_OUTPUT_SUBDIRS): Quit
playing with changequotes, @BKL@ and Co.! Just quote properly.
2000-02-10 18:40:19 +08:00
|
|
|
(echo [':t
|
2000-05-09 17:45:04 +08:00
|
|
|
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b'] && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
|
2000-02-08 18:03:26 +08:00
|
|
|
if test -z "$ac_sed_cmds"; then
|
2000-05-09 17:45:04 +08:00
|
|
|
ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
|
2000-02-08 18:03:26 +08:00
|
|
|
else
|
2000-05-09 17:45:04 +08:00
|
|
|
ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
|
2000-02-08 18:03:26 +08:00
|
|
|
fi
|
|
|
|
ac_sed_frag=`expr $ac_sed_frag + 1`
|
|
|
|
ac_beg=$ac_end
|
|
|
|
ac_end=`expr $ac_end + $ac_max_sed_lines`
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if test -z "$ac_sed_cmds"; then
|
|
|
|
ac_sed_cmds=cat
|
1996-11-13 13:18:44 +08:00
|
|
|
fi
|
2000-02-08 18:03:26 +08:00
|
|
|
fi # test -n "$CONFIG_FILES"
|
1994-08-24 14:41:01 +08:00
|
|
|
|
1994-09-04 07:46:58 +08:00
|
|
|
EOF
|
1999-12-20 21:45:45 +08:00
|
|
|
cat >>$CONFIG_STATUS <<\EOF
|
2000-03-21 20:03:55 +08:00
|
|
|
for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
|
1996-11-20 13:09:56 +08:00
|
|
|
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
|
2000-05-26 23:02:42 +08:00
|
|
|
case $ac_file in
|
2000-07-10 22:44:01 +08:00
|
|
|
- | *:- | *:-:* ) # input from stdin
|
|
|
|
cat >$tmp/stdin
|
|
|
|
ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
|
|
|
|
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
|
|
|
|
*:* ) ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
|
|
|
|
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
|
|
|
|
* ) ac_file_in=$ac_file.in ;;
|
1994-08-10 02:35:50 +08:00
|
|
|
esac
|
|
|
|
|
2001-01-24 21:41:52 +08:00
|
|
|
# Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
|
2000-11-10 18:14:44 +08:00
|
|
|
ac_dir=`AS_DIRNAME(["$ac_file"])`
|
1994-05-18 03:26:10 +08:00
|
|
|
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
|
2000-11-10 18:14:44 +08:00
|
|
|
AS_MKDIR_P(["$ac_dir"])
|
2000-07-10 16:43:55 +08:00
|
|
|
ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
|
1994-08-09 21:44:55 +08:00
|
|
|
# A "../" for each directory in $ac_dir_suffix.
|
2000-07-10 16:43:55 +08:00
|
|
|
ac_dots=`echo "$ac_dir_suffix" | sed 's,/[[^/]]*,../,g'`
|
1994-03-10 14:29:54 +08:00
|
|
|
else
|
1994-08-09 21:44:55 +08:00
|
|
|
ac_dir_suffix= ac_dots=
|
1993-10-21 07:33:19 +08:00
|
|
|
fi
|
1994-03-10 14:29:54 +08:00
|
|
|
|
2001-01-24 21:19:10 +08:00
|
|
|
case $srcdir in
|
|
|
|
.) ac_srcdir=.
|
|
|
|
if test -z "$ac_dots"; then
|
|
|
|
ac_top_srcdir=.
|
|
|
|
else
|
|
|
|
ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
|
|
|
|
fi ;;
|
2000-03-28 22:48:56 +08:00
|
|
|
[[\\/]]* | ?:[[\\/]]* )
|
2001-01-24 21:19:10 +08:00
|
|
|
ac_srcdir=$srcdir$ac_dir_suffix;
|
|
|
|
ac_top_srcdir=$srcdir ;;
|
1994-04-06 00:45:41 +08:00
|
|
|
*) # Relative path.
|
2001-01-24 21:19:10 +08:00
|
|
|
ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
|
|
|
|
ac_top_srcdir=$ac_dots$srcdir ;;
|
1994-03-10 14:29:54 +08:00
|
|
|
esac
|
|
|
|
|
2000-04-11 20:02:34 +08:00
|
|
|
AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
|
2001-01-24 21:41:52 +08:00
|
|
|
[ case $INSTALL in
|
|
|
|
[[\\/$]]* | ?:[[\\/]]* ) ac_INSTALL=$INSTALL ;;
|
|
|
|
*) ac_INSTALL=$ac_dots$INSTALL ;;
|
1994-08-09 21:44:55 +08:00
|
|
|
esac
|
2000-03-09 01:32:40 +08:00
|
|
|
])dnl
|
1996-11-13 13:18:44 +08:00
|
|
|
|
2000-07-10 22:44:01 +08:00
|
|
|
if test x"$ac_file" != x-; then
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
AC_MSG_NOTICE([creating $ac_file])
|
2000-07-10 22:44:01 +08:00
|
|
|
rm -f "$ac_file"
|
|
|
|
fi
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
# Let's still pretend it is `configure' which instantiates (i.e., don't
|
|
|
|
# use $as_me), people would be surprised to read:
|
|
|
|
# /* config.h. Generated automatically by config.status. */
|
2000-02-08 18:03:26 +08:00
|
|
|
configure_input="Generated automatically from `echo $ac_file_in |
|
2000-07-10 16:43:55 +08:00
|
|
|
sed 's,.*/,,'` by configure."
|
1996-11-20 13:09:56 +08:00
|
|
|
|
2000-07-11 17:44:39 +08:00
|
|
|
# First look for the input files in the build tree, otherwise in the
|
|
|
|
# src tree.
|
2000-05-22 18:29:46 +08:00
|
|
|
ac_file_inputs=`IFS=:
|
2000-07-13 16:46:08 +08:00
|
|
|
for f in $ac_file_in; do
|
|
|
|
case $f in
|
|
|
|
-) echo $tmp/stdin ;;
|
2001-03-30 20:49:36 +08:00
|
|
|
[[\\/$]]*)
|
|
|
|
# Absolute (can't be DOS-style, as IFS=:)
|
2000-11-30 00:08:43 +08:00
|
|
|
test -f "$f" || AC_MSG_ERROR([cannot find input file: $f])
|
2000-07-13 16:46:08 +08:00
|
|
|
echo $f;;
|
|
|
|
*) # Relative
|
|
|
|
if test -f "$f"; then
|
|
|
|
# Build tree
|
|
|
|
echo $f
|
2001-01-24 21:19:10 +08:00
|
|
|
elif test -f "$srcdir/$f"; then
|
2000-07-13 16:46:08 +08:00
|
|
|
# Source tree
|
2001-01-24 21:19:10 +08:00
|
|
|
echo $srcdir/$f
|
2000-07-13 16:46:08 +08:00
|
|
|
else
|
|
|
|
# /dev/null tree
|
2000-11-30 00:08:43 +08:00
|
|
|
AC_MSG_ERROR([cannot find input file: $f])
|
2000-07-13 16:46:08 +08:00
|
|
|
fi;;
|
|
|
|
esac
|
2000-11-14 18:09:20 +08:00
|
|
|
done` || AS_EXIT([1])
|
1999-10-30 22:17:20 +08:00
|
|
|
EOF
|
|
|
|
cat >>$CONFIG_STATUS <<EOF
|
|
|
|
dnl Neutralize VPATH when `$srcdir' = `.'.
|
2000-07-10 16:43:55 +08:00
|
|
|
sed "$ac_vpsub
|
2001-01-12 17:19:59 +08:00
|
|
|
dnl Shell code in configure.ac might set extrasub.
|
1999-10-30 22:17:20 +08:00
|
|
|
dnl FIXME: do we really want to maintain this feature?
|
|
|
|
$extrasub
|
|
|
|
EOF
|
|
|
|
cat >>$CONFIG_STATUS <<\EOF
|
|
|
|
:t
|
Changequote-busters!
From Dan Ackroyd.
* acgeneral.m4 (AC_INIT_PARSE_ARGS, AC_INIT_PREPARE,
AC_CACHE_SAVE, AC_PREFIX_PROGRAM, AC_OUTPUT,
_AC_OUTPUT_CONFIG_STATUS, AC_OUTPUT_MAKE_DEFS, AC_OUTPUT_FILES,
_AC_OUTPUT_HEADERS, AC_OUTPUT_LINKS, AC_OUTPUT_SUBDIRS): Quit
playing with changequotes, @BKL@ and Co.! Just quote properly.
2000-02-10 18:40:19 +08:00
|
|
|
[/@[a-zA-Z_][a-zA-Z_0-9]*@/!b]
|
2000-07-10 16:43:55 +08:00
|
|
|
s,@configure_input@,$configure_input,;t t
|
2001-01-24 21:19:10 +08:00
|
|
|
s,@srcdir@,$ac_srcdir,;t t
|
|
|
|
s,@top_srcdir@,$ac_top_srcdir,;t t
|
2001-01-24 21:41:52 +08:00
|
|
|
AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [s,@INSTALL@,$ac_INSTALL,;t t
|
1994-08-23 14:01:14 +08:00
|
|
|
])dnl
|
1996-11-20 08:21:34 +08:00
|
|
|
dnl The parens around the eval prevent an "illegal io" in Ultrix sh.
|
2000-05-09 17:45:04 +08:00
|
|
|
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
|
2000-07-10 22:44:01 +08:00
|
|
|
rm -f $tmp/stdin
|
1995-07-26 13:30:39 +08:00
|
|
|
dnl This would break Makefile dependencies.
|
2000-05-09 17:45:04 +08:00
|
|
|
dnl if cmp -s $ac_file $tmp/out 2>/dev/null; then
|
1995-07-26 13:30:39 +08:00
|
|
|
dnl echo "$ac_file is unchanged"
|
|
|
|
dnl else
|
|
|
|
dnl rm -f $ac_file
|
2000-05-09 17:45:04 +08:00
|
|
|
dnl mv $tmp/out $ac_file
|
1995-07-26 13:30:39 +08:00
|
|
|
dnl fi
|
2000-07-10 22:44:01 +08:00
|
|
|
if test x"$ac_file" != x-; then
|
|
|
|
mv $tmp/out $ac_file
|
|
|
|
else
|
|
|
|
cat $tmp/out
|
|
|
|
rm -f $tmp/out
|
|
|
|
fi
|
1999-12-20 20:14:28 +08:00
|
|
|
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifset([AC_LIST_FILES_COMMANDS],
|
1999-12-20 21:37:12 +08:00
|
|
|
[ # Run the commands associated with the file.
|
2000-05-26 23:02:42 +08:00
|
|
|
case $ac_file in
|
1999-12-20 21:37:12 +08:00
|
|
|
AC_LIST_FILES_COMMANDS()dnl
|
1999-12-20 20:14:28 +08:00
|
|
|
esac
|
|
|
|
])dnl
|
2000-03-21 20:03:55 +08:00
|
|
|
done
|
1999-10-30 22:17:20 +08:00
|
|
|
EOF
|
2000-03-14 16:27:19 +08:00
|
|
|
])# _AC_OUTPUT_FILES
|
1994-09-06 04:12:21 +08:00
|
|
|
|
1999-12-20 20:14:28 +08:00
|
|
|
|
Honor properly the `#define' config.h.in templates.
Test it.
* acgeneral.m4 (AC_OUTPUT_HEADERS): Renamed as...
(_AC_OUTPUT_HEADERS): this. All callers changed.
Don't mess with changequote, just quote properly.
Bug 1. Because of the `#' in `ac_dA', the quotes <<>> were not
removed, and therefore the sed script contained `<<define>>'
instead of `define'. Now that the block is properly quoted, there
is no need to quote `define'.
Bug 2. Once a `#define' substitution performed, we were branching
to the top of the sed script (`t top'). This resulted in an
endless substitution of `#define foo 1' to `#define foo 1'.
Branching is not enough: you also have to fetch the next input
line, i.e., use `t' instead of `t t' in ac_dD, and don't output
`: top' in `config.defines'.
Though it was correct for `#undef' templates, just apply the same
transformation to `ac_uD' and `config.undefs'.
Bug 3. Don't try to preserve what was behind the value in the
template, since on
#define NAME "bar baz"
it leads to
#define NAME 1 baz"
Now `ac_dB' catches everything behind the NAME (making sure there
is at least a space) and `ac_dC' only outputs a space.
* tests/torture.m4: Check that various forms of `#define' header
templates are properly handled.
2000-02-10 18:38:59 +08:00
|
|
|
# _AC_OUTPUT_HEADERS
|
|
|
|
# ------------------
|
2000-02-08 02:03:54 +08:00
|
|
|
#
|
Honor properly the `#define' config.h.in templates.
Test it.
* acgeneral.m4 (AC_OUTPUT_HEADERS): Renamed as...
(_AC_OUTPUT_HEADERS): this. All callers changed.
Don't mess with changequote, just quote properly.
Bug 1. Because of the `#' in `ac_dA', the quotes <<>> were not
removed, and therefore the sed script contained `<<define>>'
instead of `define'. Now that the block is properly quoted, there
is no need to quote `define'.
Bug 2. Once a `#define' substitution performed, we were branching
to the top of the sed script (`t top'). This resulted in an
endless substitution of `#define foo 1' to `#define foo 1'.
Branching is not enough: you also have to fetch the next input
line, i.e., use `t' instead of `t t' in ac_dD, and don't output
`: top' in `config.defines'.
Though it was correct for `#undef' templates, just apply the same
transformation to `ac_uD' and `config.undefs'.
Bug 3. Don't try to preserve what was behind the value in the
template, since on
#define NAME "bar baz"
it leads to
#define NAME 1 baz"
Now `ac_dB' catches everything behind the NAME (making sure there
is at least a space) and `ac_dC' only outputs a space.
* tests/torture.m4: Check that various forms of `#define' header
templates are properly handled.
2000-02-10 18:38:59 +08:00
|
|
|
# Output the code which instantiates the `config.h' files from their
|
|
|
|
# `config.h.in'.
|
|
|
|
#
|
|
|
|
# This is a subroutine of _AC_OUTPUT_CONFIG_STATUS. It has to send
|
|
|
|
# itself into $CONFIG_STATUS (eg, via here documents). Upon exit, no
|
|
|
|
# here document shall be opened.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# The code produced used to be extremely costly: there are was a
|
|
|
|
# single sed script (n lines) handling both `#define' templates,
|
|
|
|
# `#undef' templates with trailing space, and `#undef' templates
|
|
|
|
# without trailing spaces. The full script was run on each of the m
|
|
|
|
# lines of `config.h.in', i.e., about n x m.
|
|
|
|
#
|
|
|
|
# Now there are two scripts: `conftest.defines' for the `#define'
|
|
|
|
# templates, and `conftest.undef' for the `#undef' templates.
|
|
|
|
#
|
|
|
|
# Optimization 1. It is incredibly costly to run two `#undef'
|
|
|
|
# scripts, so just remove trailing spaces first. Removes about a
|
|
|
|
# third of the cost.
|
|
|
|
#
|
|
|
|
# Optimization 2. Since `#define' are rare and obsoleted,
|
|
|
|
# `conftest.defines' is built and run only if grep says there are
|
|
|
|
# `#define'. Improves by at least a factor 2, since in addition we
|
|
|
|
# avoid the cost of *producing* the sed script.
|
|
|
|
#
|
|
|
|
# Optimization 3. In each script, first check that the current input
|
|
|
|
# line is a template. This avoids running the full sed script on
|
|
|
|
# empty lines and comments (divides the cost by about 3 since each
|
|
|
|
# template chunk is typically a comment, a template, an empty line).
|
|
|
|
#
|
|
|
|
# Optimization 4. Once a substitution performed, since there can be
|
|
|
|
# only one per line, immediately restart the script on the next input
|
|
|
|
# line (using the `t' sed instruction). Divides by about 2.
|
2000-03-14 16:27:19 +08:00
|
|
|
# *Note:* In the case of the AC_SUBST sed script (_AC_OUTPUT_FILES)
|
Honor properly the `#define' config.h.in templates.
Test it.
* acgeneral.m4 (AC_OUTPUT_HEADERS): Renamed as...
(_AC_OUTPUT_HEADERS): this. All callers changed.
Don't mess with changequote, just quote properly.
Bug 1. Because of the `#' in `ac_dA', the quotes <<>> were not
removed, and therefore the sed script contained `<<define>>'
instead of `define'. Now that the block is properly quoted, there
is no need to quote `define'.
Bug 2. Once a `#define' substitution performed, we were branching
to the top of the sed script (`t top'). This resulted in an
endless substitution of `#define foo 1' to `#define foo 1'.
Branching is not enough: you also have to fetch the next input
line, i.e., use `t' instead of `t t' in ac_dD, and don't output
`: top' in `config.defines'.
Though it was correct for `#undef' templates, just apply the same
transformation to `ac_uD' and `config.undefs'.
Bug 3. Don't try to preserve what was behind the value in the
template, since on
#define NAME "bar baz"
it leads to
#define NAME 1 baz"
Now `ac_dB' catches everything behind the NAME (making sure there
is at least a space) and `ac_dC' only outputs a space.
* tests/torture.m4: Check that various forms of `#define' header
templates are properly handled.
2000-02-10 18:38:59 +08:00
|
|
|
# this optimization cannot be applied as is, because there can be
|
|
|
|
# several substitutions per line.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# The result is about, hm, ... times blah... plus.... Ahem. The
|
|
|
|
# result is about much faster.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_OUTPUT_HEADERS],
|
1999-10-30 22:17:20 +08:00
|
|
|
[cat >>$CONFIG_STATUS <<\EOF
|
1999-12-20 20:14:28 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# CONFIG_HEADER section.
|
|
|
|
#
|
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
|
|
|
|
# NAME is the cpp macro being defined and VALUE is the value it is being given.
|
1993-10-21 07:33:19 +08:00
|
|
|
#
|
1994-03-18 16:18:08 +08:00
|
|
|
# ac_d sets the value in "#define NAME VALUE" lines.
|
Honor properly the `#define' config.h.in templates.
Test it.
* acgeneral.m4 (AC_OUTPUT_HEADERS): Renamed as...
(_AC_OUTPUT_HEADERS): this. All callers changed.
Don't mess with changequote, just quote properly.
Bug 1. Because of the `#' in `ac_dA', the quotes <<>> were not
removed, and therefore the sed script contained `<<define>>'
instead of `define'. Now that the block is properly quoted, there
is no need to quote `define'.
Bug 2. Once a `#define' substitution performed, we were branching
to the top of the sed script (`t top'). This resulted in an
endless substitution of `#define foo 1' to `#define foo 1'.
Branching is not enough: you also have to fetch the next input
line, i.e., use `t' instead of `t t' in ac_dD, and don't output
`: top' in `config.defines'.
Though it was correct for `#undef' templates, just apply the same
transformation to `ac_uD' and `config.undefs'.
Bug 3. Don't try to preserve what was behind the value in the
template, since on
#define NAME "bar baz"
it leads to
#define NAME 1 baz"
Now `ac_dB' catches everything behind the NAME (making sure there
is at least a space) and `ac_dC' only outputs a space.
* tests/torture.m4: Check that various forms of `#define' header
templates are properly handled.
2000-02-10 18:38:59 +08:00
|
|
|
dnl Double quote for the `[ ]' and `define'.
|
2000-07-10 16:43:55 +08:00
|
|
|
[ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
|
|
|
|
ac_dB='[ ].*$,\1#\2'
|
Honor properly the `#define' config.h.in templates.
Test it.
* acgeneral.m4 (AC_OUTPUT_HEADERS): Renamed as...
(_AC_OUTPUT_HEADERS): this. All callers changed.
Don't mess with changequote, just quote properly.
Bug 1. Because of the `#' in `ac_dA', the quotes <<>> were not
removed, and therefore the sed script contained `<<define>>'
instead of `define'. Now that the block is properly quoted, there
is no need to quote `define'.
Bug 2. Once a `#define' substitution performed, we were branching
to the top of the sed script (`t top'). This resulted in an
endless substitution of `#define foo 1' to `#define foo 1'.
Branching is not enough: you also have to fetch the next input
line, i.e., use `t' instead of `t t' in ac_dD, and don't output
`: top' in `config.defines'.
Though it was correct for `#undef' templates, just apply the same
transformation to `ac_uD' and `config.undefs'.
Bug 3. Don't try to preserve what was behind the value in the
template, since on
#define NAME "bar baz"
it leads to
#define NAME 1 baz"
Now `ac_dB' catches everything behind the NAME (making sure there
is at least a space) and `ac_dC' only outputs a space.
* tests/torture.m4: Check that various forms of `#define' header
templates are properly handled.
2000-02-10 18:38:59 +08:00
|
|
|
ac_dC=' '
|
2000-07-10 16:43:55 +08:00
|
|
|
ac_dD=',;t'
|
1999-12-20 21:48:32 +08:00
|
|
|
# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
|
2000-07-10 16:43:55 +08:00
|
|
|
ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
|
|
|
|
ac_uB='$,\1#\2define\3'
|
1994-03-18 16:18:08 +08:00
|
|
|
ac_uC=' '
|
2000-07-10 16:43:55 +08:00
|
|
|
ac_uD=',;t']
|
1994-08-24 14:41:01 +08:00
|
|
|
|
2000-03-21 20:03:55 +08:00
|
|
|
for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
|
1996-11-20 13:09:56 +08:00
|
|
|
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
|
2000-05-26 23:02:42 +08:00
|
|
|
case $ac_file in
|
2000-07-10 22:44:01 +08:00
|
|
|
- | *:- | *:-:* ) # input from stdin
|
|
|
|
cat >$tmp/stdin
|
|
|
|
ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
|
|
|
|
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
|
|
|
|
*:* ) ac_file_in=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
|
|
|
|
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
|
|
|
|
* ) ac_file_in=$ac_file.in ;;
|
1994-08-24 14:41:01 +08:00
|
|
|
esac
|
|
|
|
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
test x"$ac_file" != x- && AC_MSG_NOTICE([creating $ac_file])
|
1994-08-24 14:41:01 +08:00
|
|
|
|
2000-07-11 17:44:39 +08:00
|
|
|
# First look for the input files in the build tree, otherwise in the
|
|
|
|
# src tree.
|
2000-07-10 22:44:01 +08:00
|
|
|
ac_file_inputs=`IFS=:
|
2000-07-13 16:46:08 +08:00
|
|
|
for f in $ac_file_in; do
|
|
|
|
case $f in
|
|
|
|
-) echo $tmp/stdin ;;
|
2001-03-30 20:49:36 +08:00
|
|
|
[[\\/$]]*)
|
|
|
|
# Absolute (can't be DOS-style, as IFS=:)
|
2000-11-30 00:08:43 +08:00
|
|
|
test -f "$f" || AC_MSG_ERROR([cannot find input file: $f])
|
2000-07-13 16:46:08 +08:00
|
|
|
echo $f;;
|
|
|
|
*) # Relative
|
|
|
|
if test -f "$f"; then
|
|
|
|
# Build tree
|
|
|
|
echo $f
|
2001-01-24 21:19:10 +08:00
|
|
|
elif test -f "$srcdir/$f"; then
|
2000-07-13 16:46:08 +08:00
|
|
|
# Source tree
|
2001-01-24 21:19:10 +08:00
|
|
|
echo $srcdir/$f
|
2000-07-13 16:46:08 +08:00
|
|
|
else
|
|
|
|
# /dev/null tree
|
2000-11-30 00:08:43 +08:00
|
|
|
AC_MSG_ERROR([cannot find input file: $f])
|
2000-07-13 16:46:08 +08:00
|
|
|
fi;;
|
|
|
|
esac
|
2000-11-14 18:09:20 +08:00
|
|
|
done` || AS_EXIT([1])
|
1999-12-20 21:48:32 +08:00
|
|
|
# Remove the trailing spaces.
|
2000-07-10 16:43:55 +08:00
|
|
|
sed 's/[[ ]]*$//' $ac_file_inputs >$tmp/in
|
1994-08-24 14:41:01 +08:00
|
|
|
|
1993-10-21 07:33:19 +08:00
|
|
|
EOF
|
1994-08-24 14:41:01 +08:00
|
|
|
|
1999-12-20 21:48:32 +08:00
|
|
|
# Transform confdefs.h into two sed scripts, `conftest.defines' and
|
|
|
|
# `conftest.undefs', that substitutes the proper values into
|
|
|
|
# config.h.in to produce config.h. The first handles `#define'
|
|
|
|
# templates, and the second `#undef' templates.
|
|
|
|
# And first: Protect against being on the right side of a sed subst in
|
|
|
|
# config.status. Protect against being in an unquoted here document
|
|
|
|
# in config.status.
|
|
|
|
rm -f conftest.defines conftest.undefs
|
2000-06-17 01:40:44 +08:00
|
|
|
# Using a here document instead of a string reduces the quoting nightmare.
|
|
|
|
# Putting comments in sed scripts is not portable.
|
|
|
|
#
|
2000-11-30 01:57:55 +08:00
|
|
|
# `end' is used to avoid that the second main sed command (meant for
|
|
|
|
# 0-ary CPP macros) applies to n-ary macro definitions.
|
2000-06-17 01:40:44 +08:00
|
|
|
# See the Autoconf documentation for `clear'.
|
2000-05-09 17:45:04 +08:00
|
|
|
cat >confdef2sed.sed <<\EOF
|
Changequote-busters!
From Dan Ackroyd.
* acgeneral.m4 (AC_INIT_PARSE_ARGS, AC_INIT_PREPARE,
AC_CACHE_SAVE, AC_PREFIX_PROGRAM, AC_OUTPUT,
_AC_OUTPUT_CONFIG_STATUS, AC_OUTPUT_MAKE_DEFS, AC_OUTPUT_FILES,
_AC_OUTPUT_HEADERS, AC_OUTPUT_LINKS, AC_OUTPUT_SUBDIRS): Quit
playing with changequotes, @BKL@ and Co.! Just quote properly.
2000-02-10 18:40:19 +08:00
|
|
|
dnl Double quote for `[ ]' and `define'.
|
2000-07-10 16:43:55 +08:00
|
|
|
[s/[\\&,]/\\&/g
|
|
|
|
s,[\\$`],\\&,g
|
1999-10-30 22:17:20 +08:00
|
|
|
t clear
|
|
|
|
: clear
|
2000-07-10 16:43:55 +08:00
|
|
|
s,^[ ]*#[ ]*define[ ][ ]*\(\([^ (][^ (]*\)([^)]*)\)[ ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
|
2000-11-30 01:57:55 +08:00
|
|
|
t end
|
2000-07-10 16:43:55 +08:00
|
|
|
s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
|
2000-11-30 01:57:55 +08:00
|
|
|
: end]
|
1993-10-21 07:33:19 +08:00
|
|
|
EOF
|
1999-10-30 22:17:20 +08:00
|
|
|
# If some macros were called several times there might be several times
|
|
|
|
# the same #defines, which is useless. Nevertheless, we may not want to
|
2001-01-18 17:30:10 +08:00
|
|
|
# sort them, since we want the *last* AC-DEFINE to be honored.
|
2000-05-09 17:45:04 +08:00
|
|
|
uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
|
2000-07-10 16:43:55 +08:00
|
|
|
sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
|
2000-05-09 17:45:04 +08:00
|
|
|
rm -f confdef2sed.sed
|
1993-10-21 07:33:19 +08:00
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
# This sed command replaces #undef with comments. This is necessary, for
|
|
|
|
# example, in the case of _POSIX_SOURCE, which is predefined and required
|
|
|
|
# on some systems where configure will not decide to define it.
|
1999-12-20 21:48:32 +08:00
|
|
|
cat >>conftest.undefs <<\EOF
|
2000-07-10 16:43:55 +08:00
|
|
|
[s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,]
|
1994-08-24 14:41:01 +08:00
|
|
|
EOF
|
1993-10-21 07:33:19 +08:00
|
|
|
|
1999-12-20 21:48:32 +08:00
|
|
|
# Break up conftest.defines because some shells have a limit on the size
|
1999-10-30 22:17:20 +08:00
|
|
|
# of here documents, and old seds have small limits too (100 cmds).
|
1999-12-20 21:48:32 +08:00
|
|
|
echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
|
2000-05-09 17:45:04 +08:00
|
|
|
echo ' if egrep ["^[ ]*#[ ]*define"] $tmp/in >/dev/null; then' >>$CONFIG_STATUS
|
2000-02-04 18:23:15 +08:00
|
|
|
echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
|
|
|
|
echo ' :' >>$CONFIG_STATUS
|
1994-08-24 14:41:01 +08:00
|
|
|
rm -f conftest.tail
|
2000-02-08 21:41:51 +08:00
|
|
|
while grep . conftest.defines >/dev/null
|
1993-10-21 07:33:19 +08:00
|
|
|
do
|
2000-07-11 18:12:30 +08:00
|
|
|
# Write a limited-size here document to $tmp/defines.sed.
|
|
|
|
echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
|
|
|
|
# Speed up: don't consider the non `#define' lines.
|
Changequote-busters!
From Dan Ackroyd.
* acgeneral.m4 (AC_INIT_PARSE_ARGS, AC_INIT_PREPARE,
AC_CACHE_SAVE, AC_PREFIX_PROGRAM, AC_OUTPUT,
_AC_OUTPUT_CONFIG_STATUS, AC_OUTPUT_MAKE_DEFS, AC_OUTPUT_FILES,
_AC_OUTPUT_HEADERS, AC_OUTPUT_LINKS, AC_OUTPUT_SUBDIRS): Quit
playing with changequotes, @BKL@ and Co.! Just quote properly.
2000-02-10 18:40:19 +08:00
|
|
|
echo ['/^[ ]*#[ ]*define/!b'] >>$CONFIG_STATUS
|
2000-07-11 18:12:30 +08:00
|
|
|
# Work around the forget-to-reset-the-flag bug.
|
|
|
|
echo 't clr' >>$CONFIG_STATUS
|
|
|
|
echo ': clr' >>$CONFIG_STATUS
|
1999-12-20 21:48:32 +08:00
|
|
|
sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
|
1994-08-24 14:41:01 +08:00
|
|
|
echo 'CEOF
|
2000-07-11 18:12:30 +08:00
|
|
|
sed -f $tmp/defines.sed $tmp/in >$tmp/out
|
2000-05-09 17:45:04 +08:00
|
|
|
rm -f $tmp/in
|
|
|
|
mv $tmp/out $tmp/in
|
1999-12-20 21:48:32 +08:00
|
|
|
' >>$CONFIG_STATUS
|
|
|
|
sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
|
|
|
|
rm -f conftest.defines
|
|
|
|
mv conftest.tail conftest.defines
|
1993-10-21 07:33:19 +08:00
|
|
|
done
|
1999-12-20 21:48:32 +08:00
|
|
|
rm -f conftest.defines
|
|
|
|
echo ' fi # egrep' >>$CONFIG_STATUS
|
|
|
|
echo >>$CONFIG_STATUS
|
|
|
|
|
|
|
|
# Break up conftest.undefs because some shells have a limit on the size
|
|
|
|
# of here documents, and old seds have small limits too (100 cmds).
|
|
|
|
echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
|
|
|
|
rm -f conftest.tail
|
2000-02-08 21:41:51 +08:00
|
|
|
while grep . conftest.undefs >/dev/null
|
1999-12-20 21:48:32 +08:00
|
|
|
do
|
2000-07-11 18:12:30 +08:00
|
|
|
# Write a limited-size here document to $tmp/undefs.sed.
|
|
|
|
echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
|
|
|
|
# Speed up: don't consider the non `#undef'
|
Changequote-busters!
From Dan Ackroyd.
* acgeneral.m4 (AC_INIT_PARSE_ARGS, AC_INIT_PREPARE,
AC_CACHE_SAVE, AC_PREFIX_PROGRAM, AC_OUTPUT,
_AC_OUTPUT_CONFIG_STATUS, AC_OUTPUT_MAKE_DEFS, AC_OUTPUT_FILES,
_AC_OUTPUT_HEADERS, AC_OUTPUT_LINKS, AC_OUTPUT_SUBDIRS): Quit
playing with changequotes, @BKL@ and Co.! Just quote properly.
2000-02-10 18:40:19 +08:00
|
|
|
echo ['/^[ ]*#[ ]*undef/!b'] >>$CONFIG_STATUS
|
2000-07-11 18:12:30 +08:00
|
|
|
# Work around the forget-to-reset-the-flag bug.
|
|
|
|
echo 't clr' >>$CONFIG_STATUS
|
|
|
|
echo ': clr' >>$CONFIG_STATUS
|
1999-12-20 21:48:32 +08:00
|
|
|
sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
|
|
|
|
echo 'CEOF
|
2000-07-11 18:12:30 +08:00
|
|
|
sed -f $tmp/undefs.sed $tmp/in >$tmp/out
|
2000-05-09 17:45:04 +08:00
|
|
|
rm -f $tmp/in
|
|
|
|
mv $tmp/out $tmp/in
|
1999-12-20 21:48:32 +08:00
|
|
|
' >>$CONFIG_STATUS
|
|
|
|
sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
|
|
|
|
rm -f conftest.undefs
|
|
|
|
mv conftest.tail conftest.undefs
|
|
|
|
done
|
|
|
|
rm -f conftest.undefs
|
1993-10-21 07:33:19 +08:00
|
|
|
|
1994-09-06 04:12:21 +08:00
|
|
|
dnl Now back to your regularly scheduled config.status.
|
1999-12-20 21:48:32 +08:00
|
|
|
cat >>$CONFIG_STATUS <<\EOF
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
# Let's still pretend it is `configure' which instantiates (i.e., don't
|
|
|
|
# use $as_me), people would be surprised to read:
|
|
|
|
# /* config.h. Generated automatically by config.status. */
|
2000-07-10 22:44:01 +08:00
|
|
|
if test x"$ac_file" = x-; then
|
|
|
|
echo "/* Generated automatically by configure. */" >$tmp/config.h
|
|
|
|
else
|
|
|
|
echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
|
|
|
|
fi
|
2000-05-09 17:45:04 +08:00
|
|
|
cat $tmp/in >>$tmp/config.h
|
|
|
|
rm -f $tmp/in
|
2000-07-10 22:44:01 +08:00
|
|
|
if test x"$ac_file" != x-; then
|
|
|
|
if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
AC_MSG_NOTICE([$ac_file is unchanged])
|
2000-07-10 22:44:01 +08:00
|
|
|
else
|
2000-11-10 18:14:44 +08:00
|
|
|
ac_dir=`AS_DIRNAME(["$ac_file"])`
|
2000-07-10 22:44:01 +08:00
|
|
|
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
|
2000-11-10 18:14:44 +08:00
|
|
|
AS_MKDIR_P(["$ac_dir"])
|
2000-07-10 22:44:01 +08:00
|
|
|
fi
|
|
|
|
rm -f $ac_file
|
|
|
|
mv $tmp/config.h $ac_file
|
1996-04-19 07:33:59 +08:00
|
|
|
fi
|
2000-07-10 22:44:01 +08:00
|
|
|
else
|
|
|
|
cat $tmp/config.h
|
|
|
|
rm -f $tmp/config.h
|
1994-02-05 06:17:05 +08:00
|
|
|
fi
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifset([AC_LIST_HEADERS_COMMANDS],
|
1999-12-20 21:54:46 +08:00
|
|
|
[ # Run the commands associated with the file.
|
2000-05-26 23:02:42 +08:00
|
|
|
case $ac_file in
|
1999-12-20 21:54:46 +08:00
|
|
|
AC_LIST_HEADERS_COMMANDS()dnl
|
|
|
|
esac
|
|
|
|
])dnl
|
2000-03-21 20:03:55 +08:00
|
|
|
done
|
1999-10-30 22:17:20 +08:00
|
|
|
EOF
|
Honor properly the `#define' config.h.in templates.
Test it.
* acgeneral.m4 (AC_OUTPUT_HEADERS): Renamed as...
(_AC_OUTPUT_HEADERS): this. All callers changed.
Don't mess with changequote, just quote properly.
Bug 1. Because of the `#' in `ac_dA', the quotes <<>> were not
removed, and therefore the sed script contained `<<define>>'
instead of `define'. Now that the block is properly quoted, there
is no need to quote `define'.
Bug 2. Once a `#define' substitution performed, we were branching
to the top of the sed script (`t top'). This resulted in an
endless substitution of `#define foo 1' to `#define foo 1'.
Branching is not enough: you also have to fetch the next input
line, i.e., use `t' instead of `t t' in ac_dD, and don't output
`: top' in `config.defines'.
Though it was correct for `#undef' templates, just apply the same
transformation to `ac_uD' and `config.undefs'.
Bug 3. Don't try to preserve what was behind the value in the
template, since on
#define NAME "bar baz"
it leads to
#define NAME 1 baz"
Now `ac_dB' catches everything behind the NAME (making sure there
is at least a space) and `ac_dC' only outputs a space.
* tests/torture.m4: Check that various forms of `#define' header
templates are properly handled.
2000-02-10 18:38:59 +08:00
|
|
|
])# _AC_OUTPUT_HEADERS
|
1993-10-21 07:33:19 +08:00
|
|
|
|
1994-09-06 04:12:21 +08:00
|
|
|
|
2000-03-14 16:27:19 +08:00
|
|
|
# _AC_OUTPUT_LINKS
|
|
|
|
# ----------------
|
2000-02-08 02:03:54 +08:00
|
|
|
# This is a subroutine of AC_OUTPUT.
|
|
|
|
#
|
|
|
|
# It has to send itself into $CONFIG_STATUS (eg, via here documents).
|
|
|
|
# Upon exit, no here document shall be opened.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_OUTPUT_LINKS],
|
1999-12-20 21:45:45 +08:00
|
|
|
[cat >>$CONFIG_STATUS <<\EOF
|
1999-12-20 20:14:28 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# CONFIG_LINKS section.
|
|
|
|
#
|
1999-09-26 07:59:00 +08:00
|
|
|
|
1999-10-30 22:17:20 +08:00
|
|
|
dnl Here we use : instead of .. because if AC_LINK_FILES was used
|
|
|
|
dnl with empty parameters (as in gettext.m4), then we obtain here
|
|
|
|
dnl `:', which we want to skip. So let's keep a single exception: `:'.
|
2000-03-21 20:03:55 +08:00
|
|
|
for ac_file in : $CONFIG_LINKS; do test "x$ac_file" = x: && continue
|
2000-07-10 16:43:55 +08:00
|
|
|
ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
|
|
|
|
ac_source=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
|
(AC_OUTPUT): When doing substitutions on files, if
the file starts with "#!", put the "automatically generated"
comment on the second line instead of the first.
(AC_CONFIG_AUX, AC_CONFIG_AUX_DEFAULT,
AC_CONFIG_AUX_DIRS, AC_SYSTEM_TYPE, AC_HOST_TYPE, AC_TARGET_TYPE,
AC_BUILD_TYPE, AC_SUBST_FILE, AC_MAKE_LINKS, AC_OUTPUT_MAKE_LINKS,
AC_CONFIG_SUBDIRS): New macros.
(AC_OUTPUT_HEADER): For each file being created,
munge a copy of conftest.sed rather than the original.
From brook@trillium.botany.utexas.edu (Brook Milligan).
1994-04-30 09:44:39 +08:00
|
|
|
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
AC_MSG_NOTICE([linking $srcdir/$ac_source to $ac_dest])
|
(AC_OUTPUT): When doing substitutions on files, if
the file starts with "#!", put the "automatically generated"
comment on the second line instead of the first.
(AC_CONFIG_AUX, AC_CONFIG_AUX_DEFAULT,
AC_CONFIG_AUX_DIRS, AC_SYSTEM_TYPE, AC_HOST_TYPE, AC_TARGET_TYPE,
AC_BUILD_TYPE, AC_SUBST_FILE, AC_MAKE_LINKS, AC_OUTPUT_MAKE_LINKS,
AC_CONFIG_SUBDIRS): New macros.
(AC_OUTPUT_HEADER): For each file being created,
munge a copy of conftest.sed rather than the original.
From brook@trillium.botany.utexas.edu (Brook Milligan).
1994-04-30 09:44:39 +08:00
|
|
|
|
1994-09-13 23:20:48 +08:00
|
|
|
if test ! -r $srcdir/$ac_source; then
|
2000-11-11 13:59:21 +08:00
|
|
|
AC_MSG_ERROR([$srcdir/$ac_source: File not found])
|
(AC_OUTPUT): When doing substitutions on files, if
the file starts with "#!", put the "automatically generated"
comment on the second line instead of the first.
(AC_CONFIG_AUX, AC_CONFIG_AUX_DEFAULT,
AC_CONFIG_AUX_DIRS, AC_SYSTEM_TYPE, AC_HOST_TYPE, AC_TARGET_TYPE,
AC_BUILD_TYPE, AC_SUBST_FILE, AC_MAKE_LINKS, AC_OUTPUT_MAKE_LINKS,
AC_CONFIG_SUBDIRS): New macros.
(AC_OUTPUT_HEADER): For each file being created,
munge a copy of conftest.sed rather than the original.
From brook@trillium.botany.utexas.edu (Brook Milligan).
1994-04-30 09:44:39 +08:00
|
|
|
fi
|
1994-09-13 23:20:48 +08:00
|
|
|
rm -f $ac_dest
|
|
|
|
|
|
|
|
# Make relative symlinks.
|
2000-11-10 18:14:44 +08:00
|
|
|
ac_dest_dir=`AS_DIRNAME(["$ac_dest"])`
|
1994-09-13 23:20:48 +08:00
|
|
|
if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
|
2000-11-10 18:14:44 +08:00
|
|
|
AS_MKDIR_P(["$ac_dest_dir"])
|
2000-07-10 16:43:55 +08:00
|
|
|
ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's,^\./,,'`"
|
1994-09-13 23:20:48 +08:00
|
|
|
# A "../" for each directory in $ac_dest_dir_suffix.
|
2000-07-10 16:43:55 +08:00
|
|
|
ac_dots=`echo $ac_dest_dir_suffix|sed 's,/[[^/]]*,../,g'`
|
1994-09-13 23:20:48 +08:00
|
|
|
else
|
|
|
|
ac_dest_dir_suffix= ac_dots=
|
|
|
|
fi
|
|
|
|
|
2000-05-26 23:02:42 +08:00
|
|
|
case $srcdir in
|
2000-04-11 20:00:13 +08:00
|
|
|
[[\\/$]]* | ?:[[\\/]]* ) ac_rel_source=$srcdir/$ac_source ;;
|
|
|
|
*) ac_rel_source=$ac_dots$srcdir/$ac_source ;;
|
1994-09-13 23:20:48 +08:00
|
|
|
esac
|
|
|
|
|
(AC_OUTPUT): When doing substitutions on files, if
the file starts with "#!", put the "automatically generated"
comment on the second line instead of the first.
(AC_CONFIG_AUX, AC_CONFIG_AUX_DEFAULT,
AC_CONFIG_AUX_DIRS, AC_SYSTEM_TYPE, AC_HOST_TYPE, AC_TARGET_TYPE,
AC_BUILD_TYPE, AC_SUBST_FILE, AC_MAKE_LINKS, AC_OUTPUT_MAKE_LINKS,
AC_CONFIG_SUBDIRS): New macros.
(AC_OUTPUT_HEADER): For each file being created,
munge a copy of conftest.sed rather than the original.
From brook@trillium.botany.utexas.edu (Brook Milligan).
1994-04-30 09:44:39 +08:00
|
|
|
# Make a symlink if possible; otherwise try a hard link.
|
2001-01-27 21:19:14 +08:00
|
|
|
ln -s $ac_rel_source $ac_dest 2>/dev/null ||
|
|
|
|
ln $srcdir/$ac_source $ac_dest ||
|
2000-11-11 13:59:21 +08:00
|
|
|
AC_MSG_ERROR([cannot link $ac_dest to $srcdir/$ac_source])
|
2000-11-29 18:09:44 +08:00
|
|
|
m4_ifset([AC_LIST_LINKS_COMMANDS],
|
2000-01-15 01:51:12 +08:00
|
|
|
[ # Run the commands associated with the file.
|
2000-05-26 23:02:42 +08:00
|
|
|
case $ac_file in
|
2000-01-15 01:51:12 +08:00
|
|
|
AC_LIST_LINKS_COMMANDS()dnl
|
|
|
|
esac
|
|
|
|
])dnl
|
2000-03-21 20:03:55 +08:00
|
|
|
done
|
1999-10-30 22:17:20 +08:00
|
|
|
EOF
|
2000-03-14 16:27:19 +08:00
|
|
|
])# _AC_OUTPUT_LINKS
|
1994-09-06 04:12:21 +08:00
|
|
|
|
1999-12-20 21:27:08 +08:00
|
|
|
|
2000-02-10 17:35:00 +08:00
|
|
|
# _AC_OUTPUT_COMMANDS
|
|
|
|
# -------------------
|
2000-02-08 02:03:54 +08:00
|
|
|
# This is a subroutine of AC_OUTPUT, in charge of issuing the code
|
2000-02-10 17:35:00 +08:00
|
|
|
# related to AC_CONFIG_COMMANDS.
|
2000-02-08 02:03:54 +08:00
|
|
|
#
|
|
|
|
# It has to send itself into $CONFIG_STATUS (eg, via here documents).
|
|
|
|
# Upon exit, no here document shall be opened.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_OUTPUT_COMMANDS],
|
1999-12-20 21:45:45 +08:00
|
|
|
[cat >>$CONFIG_STATUS <<\EOF
|
1999-12-20 21:27:08 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# CONFIG_COMMANDS section.
|
|
|
|
#
|
2000-03-21 20:03:55 +08:00
|
|
|
for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
|
2000-07-10 16:43:55 +08:00
|
|
|
ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
|
|
|
|
ac_source=`echo "$ac_file" | sed 's,[[^:]]*:,,'`
|
1999-12-20 21:27:08 +08:00
|
|
|
|
2000-02-10 17:35:00 +08:00
|
|
|
dnl FIXME: Until Automake uses the new features of config.status, we
|
|
|
|
dnl should keep this silent. Otherwise, because Automake runs this in
|
|
|
|
dnl each directory, it quickly becomes annoying.
|
|
|
|
dnl echo "executing commands of $ac_dest"
|
2000-05-26 23:02:42 +08:00
|
|
|
case $ac_dest in
|
1999-12-20 21:45:45 +08:00
|
|
|
AC_LIST_COMMANDS_COMMANDS()dnl
|
1999-12-20 21:27:08 +08:00
|
|
|
esac
|
2000-03-21 20:03:55 +08:00
|
|
|
done
|
1999-12-20 21:27:08 +08:00
|
|
|
EOF
|
2000-02-10 17:35:00 +08:00
|
|
|
])# _AC_OUTPUT_COMMANDS
|
1999-12-20 21:27:08 +08:00
|
|
|
|
|
|
|
|
2000-03-21 17:20:40 +08:00
|
|
|
# _AC_OUTPUT_SUBDIRS
|
|
|
|
# ------------------
|
2000-02-08 02:03:54 +08:00
|
|
|
# This is a subroutine of AC_OUTPUT, but it does not go into
|
|
|
|
# config.status, rather, it is called after running config.status.
|
2000-11-03 21:41:40 +08:00
|
|
|
m4_define([_AC_OUTPUT_SUBDIRS],
|
1994-08-26 02:05:45 +08:00
|
|
|
[
|
1999-12-20 21:37:12 +08:00
|
|
|
#
|
|
|
|
# CONFIG_SUBDIRS section.
|
|
|
|
#
|
1994-09-13 23:20:48 +08:00
|
|
|
if test "$no_recursion" != yes; then
|
1994-05-06 13:02:43 +08:00
|
|
|
|
1994-07-19 22:44:16 +08:00
|
|
|
# Remove --cache-file and --srcdir arguments so they do not pile up.
|
1994-05-06 13:02:43 +08:00
|
|
|
ac_sub_configure_args=
|
|
|
|
ac_prev=
|
1994-09-11 14:20:58 +08:00
|
|
|
for ac_arg in $ac_configure_args; do
|
1994-05-06 13:02:43 +08:00
|
|
|
if test -n "$ac_prev"; then
|
|
|
|
ac_prev=
|
|
|
|
continue
|
|
|
|
fi
|
2000-05-26 23:02:42 +08:00
|
|
|
case $ac_arg in
|
1994-05-06 13:02:43 +08:00
|
|
|
-cache-file | --cache-file | --cache-fil | --cache-fi \
|
|
|
|
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
|
|
|
|
ac_prev=cache_file ;;
|
|
|
|
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
|
2000-03-14 16:21:48 +08:00
|
|
|
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
|
|
|
|
| --c=*)
|
1994-05-06 13:02:43 +08:00
|
|
|
;;
|
2000-05-22 21:31:00 +08:00
|
|
|
--config-cache | -C)
|
|
|
|
;;
|
1994-07-19 22:44:16 +08:00
|
|
|
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
|
|
|
|
ac_prev=srcdir ;;
|
|
|
|
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
|
|
|
|
;;
|
1994-05-06 13:02:43 +08:00
|
|
|
*) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2000-05-12 00:56:13 +08:00
|
|
|
for ac_subdir in : $subdirs; do test "x$ac_subdir" = x: && continue
|
1994-05-05 06:03:07 +08:00
|
|
|
|
1994-05-18 03:26:10 +08:00
|
|
|
# Do not complain, so a configure script can configure whichever
|
1994-05-05 06:03:07 +08:00
|
|
|
# parts of a large source tree are present.
|
2000-05-12 00:56:13 +08:00
|
|
|
test -d $srcdir/$ac_subdir || continue
|
1994-05-05 06:03:07 +08:00
|
|
|
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
AC_MSG_NOTICE([configuring in $ac_subdir])
|
2000-05-26 23:02:42 +08:00
|
|
|
case $srcdir in
|
1994-05-05 06:03:07 +08:00
|
|
|
.) ;;
|
2000-11-10 18:14:44 +08:00
|
|
|
*) AS_MKDIR_P(["./$ac_subdir"])
|
2000-07-05 02:20:05 +08:00
|
|
|
if test -d ./$ac_subdir; then :;
|
|
|
|
else
|
2000-11-10 18:14:44 +08:00
|
|
|
AC_MSG_ERROR([cannot create `pwd`/$ac_subdir])
|
2000-07-05 02:20:05 +08:00
|
|
|
fi
|
|
|
|
;;
|
1994-05-05 06:03:07 +08:00
|
|
|
esac
|
|
|
|
|
|
|
|
ac_popdir=`pwd`
|
2000-03-24 02:10:42 +08:00
|
|
|
cd $ac_subdir
|
1994-05-05 06:03:07 +08:00
|
|
|
|
2000-03-24 02:10:42 +08:00
|
|
|
# A "../" for each directory in /$ac_subdir.
|
|
|
|
ac_dots=`echo $ac_subdir |
|
2000-07-10 16:43:55 +08:00
|
|
|
sed 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g'`
|
1996-11-10 06:19:24 +08:00
|
|
|
|
2000-05-26 23:02:42 +08:00
|
|
|
case $srcdir in
|
1994-05-18 03:26:10 +08:00
|
|
|
.) # No --srcdir option. We are building in place.
|
1994-09-13 23:20:48 +08:00
|
|
|
ac_sub_srcdir=$srcdir ;;
|
2000-03-28 22:48:56 +08:00
|
|
|
[[\\/]]* | ?:[[\\/]]* ) # Absolute path.
|
2000-03-24 02:10:42 +08:00
|
|
|
ac_sub_srcdir=$srcdir/$ac_subdir ;;
|
1994-05-05 06:03:07 +08:00
|
|
|
*) # Relative path.
|
2000-03-24 02:10:42 +08:00
|
|
|
ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
|
1994-05-05 06:03:07 +08:00
|
|
|
esac
|
|
|
|
|
|
|
|
# Check for guested configure; otherwise get Cygnus style configure.
|
2000-09-18 19:05:41 +08:00
|
|
|
if test -f $ac_sub_srcdir/configure.gnu; then
|
2001-01-17 16:54:52 +08:00
|
|
|
ac_sub_configure="$SHELL '$ac_sub_srcdir/configure.gnu'"
|
2000-09-18 19:05:41 +08:00
|
|
|
elif test -f $ac_sub_srcdir/configure; then
|
2001-01-17 16:54:52 +08:00
|
|
|
ac_sub_configure="$SHELL '$ac_sub_srcdir/configure'"
|
2001-01-31 03:31:50 +08:00
|
|
|
elif test -f $ac_sub_srcdir/configure.in; then
|
1994-09-13 23:20:48 +08:00
|
|
|
ac_sub_configure=$ac_configure
|
1994-05-05 06:03:07 +08:00
|
|
|
else
|
2000-11-11 13:59:21 +08:00
|
|
|
AC_MSG_WARN([no configuration information is in $ac_subdir])
|
1994-05-05 06:03:07 +08:00
|
|
|
ac_sub_configure=
|
|
|
|
fi
|
|
|
|
|
1994-08-23 23:04:53 +08:00
|
|
|
# The recursion is here.
|
1994-09-13 23:20:48 +08:00
|
|
|
if test -n "$ac_sub_configure"; then
|
1994-08-23 23:04:53 +08:00
|
|
|
# Make the cache file name correct relative to the subdirectory.
|
2000-05-26 23:02:42 +08:00
|
|
|
case $cache_file in
|
2000-03-28 22:48:56 +08:00
|
|
|
[[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;;
|
1994-08-23 23:04:53 +08:00
|
|
|
*) # Relative path.
|
2000-04-11 20:00:13 +08:00
|
|
|
ac_sub_cache_file=$ac_dots$cache_file ;;
|
1994-08-23 23:04:53 +08:00
|
|
|
esac
|
1994-05-06 13:02:43 +08:00
|
|
|
|
Use AC_MSG_ERROR in `config.status', but adjust AC_MSG_* to use $0
instead of hard coded `configure'.
* acgeneral.m4 (AC_COPYRIGHT): s/configure.in/__file__/.
(_AC_INIT_DEFAULTS_FDS): Append to AC_FD_LOG instead of creating
it. No longer insert the configure banner.
(_AC_INIT_DEFAULTS): Create config.log with the banner.
Define `as_me'.
(_AC_INIT_PARSE_ARGS, _AC_INIT_PREPARE, AC_MSG_NOTICE)
(AC_MSG_CHECKING, AC_MSG_RESULT, AC_MSG_RESULT_UNQUOTED)
(AC_MSG_WARN, AC_MSG_ERROR, AC_MSG_ERROR, AC_TRY_CPP)
(_AC_COMPILE_IFELSE, _AC_LINK_IFELSE, _AC_RUN_IFELSE)
(_AC_OUTPUT_FILES, _AC_OUTPUT_HEADERS, _AC_PROG_F77_V_OUTPUT): Use
`$as_me' instead of `configure'.
(AC_OUTPUT): Get rid of the UCA, and of the empty line when
dumping confdefs.h into config.log.
(_AC_OUTPUT_CONFIG_STATUS): Use _AC_INIT_DEFAULTS_FDS.
Print a banner.
Use AC_MSG_ERROR and AC_MSG_NOTICE.
* acgeneral.m4 (AC_CACHE_LOAD, _AC_OUTPUT_FILES, _AC_OUTPUT_LINKS)
(_AC_OUTPUT_HEADERS): Use AC_MSG_NOTICE.
* tests/semantics.at (missing templates): Adjust.
2000-11-14 18:05:14 +08:00
|
|
|
AC_MSG_NOTICE([running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir])
|
1994-09-11 14:20:58 +08:00
|
|
|
# The eval makes quoting arguments work.
|
2001-01-17 16:54:52 +08:00
|
|
|
eval $ac_sub_configure $ac_sub_configure_args \
|
|
|
|
--cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir ||
|
2000-11-11 13:59:21 +08:00
|
|
|
AC_MSG_ERROR([$ac_sub_configure failed for $ac_subdir])
|
1994-05-05 06:03:07 +08:00
|
|
|
fi
|
|
|
|
|
1994-09-13 23:20:48 +08:00
|
|
|
cd $ac_popdir
|
1994-05-05 06:03:07 +08:00
|
|
|
done
|
|
|
|
fi
|
2000-03-21 17:20:40 +08:00
|
|
|
])# _AC_OUTPUT_SUBDIRS
|
1999-10-30 22:17:20 +08:00
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_LINKER_OPTION(LINKER-OPTIONS, SHELL-VARIABLE)
|
|
|
|
# ------------------------------------------------
|
|
|
|
#
|
|
|
|
# Specifying options to the compiler (whether it be the C, C++ or
|
|
|
|
# Fortran 77 compiler) that are meant for the linker is compiler
|
|
|
|
# dependent. This macro lets you give options to the compiler that
|
|
|
|
# are meant for the linker in a portable, compiler-independent way.
|
|
|
|
#
|
|
|
|
# This macro take two arguments, a list of linker options that the
|
|
|
|
# compiler should pass to the linker (LINKER-OPTIONS) and the name of
|
|
|
|
# a shell variable (SHELL-VARIABLE). The list of linker options are
|
|
|
|
# appended to the shell variable in a compiler-dependent way.
|
|
|
|
#
|
|
|
|
# For example, if the selected language is C, then this:
|
|
|
|
#
|
|
|
|
# AC_LINKER_OPTION([-R /usr/local/lib/foo], foo_LDFLAGS)
|
|
|
|
#
|
|
|
|
# will expand into this if the selected C compiler is gcc:
|
|
|
|
#
|
|
|
|
# foo_LDFLAGS="-Xlinker -R -Xlinker /usr/local/lib/foo"
|
|
|
|
#
|
|
|
|
# otherwise, it will expand into this:
|
|
|
|
#
|
|
|
|
# foo_LDFLAGS"-R /usr/local/lib/foo"
|
|
|
|
#
|
|
|
|
# You are encouraged to add support for compilers that this macro
|
|
|
|
# doesn't currently support.
|
|
|
|
# FIXME: Get rid of this macro.
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_LINKER_OPTION],
|
2000-10-17 02:40:19 +08:00
|
|
|
[if test "$ac_compiler_gnu" = yes; then
|
2000-07-10 16:38:51 +08:00
|
|
|
for ac_link_opt in $1; do
|
2000-02-04 16:41:39 +08:00
|
|
|
$2="[$]$2 -Xlinker $ac_link_opt"
|
2000-07-10 16:38:51 +08:00
|
|
|
done
|
|
|
|
else
|
|
|
|
$2="[$]$2 $1"
|
|
|
|
fi])
|
1999-10-30 22:17:20 +08:00
|
|
|
|
|
|
|
|
2000-02-08 02:03:54 +08:00
|
|
|
# AC_LIST_MEMBER_OF(ELEMENT, LIST, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
|
|
|
|
# --------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Processing the elements of a list is tedious in shell programming,
|
|
|
|
# as lists tend to be implemented as space delimited strings.
|
|
|
|
#
|
|
|
|
# This macro searches LIST for ELEMENT, and executes ACTION-IF-FOUND
|
|
|
|
# if ELEMENT is a member of LIST, otherwise it executes
|
|
|
|
# ACTION-IF-NOT-FOUND.
|
2000-05-22 16:41:36 +08:00
|
|
|
AC_DEFUN([AC_LIST_MEMBER_OF],
|
2000-02-04 20:44:56 +08:00
|
|
|
[dnl Do some sanity checking of the arguments.
|
2000-12-06 16:58:41 +08:00
|
|
|
m4_if([$1], , [AC_FATAL([$0]: missing argument 1)])dnl
|
|
|
|
m4_if([$2], , [AC_FATAL([$0]: missing argument 2)])dnl
|
2000-02-04 20:44:56 +08:00
|
|
|
|
|
|
|
ac_exists=false
|
|
|
|
for ac_i in $2; do
|
|
|
|
if test x"$1" = x"$ac_i"; then
|
|
|
|
ac_exists=true
|
|
|
|
break
|
|
|
|
fi
|
1999-10-30 22:17:20 +08:00
|
|
|
done
|
|
|
|
|
2001-01-15 15:29:24 +08:00
|
|
|
AS_IF([test x"$ac_exists" = xtrue], [$3], [$4])[]dnl
|
1999-10-30 22:17:20 +08:00
|
|
|
])
|