1994-08-31 02:42:54 +08:00
|
|
|
dnl Parameterized macros.
|
1994-08-13 10:19:11 +08:00
|
|
|
dnl Requires GNU m4.
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl This file is part of Autoconf.
|
1994-02-05 06:17:05 +08:00
|
|
|
dnl Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl
|
|
|
|
dnl This program is free software; you can redistribute it and/or modify
|
|
|
|
dnl it under the terms of the GNU General Public License as published by
|
|
|
|
dnl the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
dnl any later version.
|
|
|
|
dnl
|
|
|
|
dnl This program is distributed in the hope that it will be useful,
|
|
|
|
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
dnl GNU General Public License for more details.
|
|
|
|
dnl
|
|
|
|
dnl You should have received a copy of the GNU General Public License
|
|
|
|
dnl along with this program; if not, write to the Free Software
|
|
|
|
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
dnl
|
|
|
|
dnl Written by David MacKenzie, with help from
|
|
|
|
dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
|
1994-03-26 14:32:34 +08:00
|
|
|
dnl Roland McGrath, Noah Friedman, and david d zuhn.
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
divert(-1)dnl Throw away output until AC_INIT is called.
|
|
|
|
changequote([, ])
|
|
|
|
|
1994-09-11 14:20:58 +08:00
|
|
|
define(AC_ACVERSION, 1.116)
|
1994-09-01 12:59:32 +08:00
|
|
|
|
1994-08-10 02:35:50 +08:00
|
|
|
dnl Some old m4's don't support m4exit. But they provide
|
|
|
|
dnl equivalent functionality by core dumping because of the
|
|
|
|
dnl long macros we define.
|
1994-08-10 00:21:46 +08:00
|
|
|
ifdef([__gnu__], , [errprint(Autoconf requires GNU m4.
|
|
|
|
Install it before installing Autoconf or set the
|
|
|
|
M4 environment variable to its path name.
|
1994-09-01 12:59:32 +08:00
|
|
|
)m4exit(2)])
|
|
|
|
|
|
|
|
undefine([eval])
|
|
|
|
undefine([include])
|
|
|
|
undefine([shift])
|
|
|
|
undefine([format])
|
|
|
|
|
|
|
|
|
1994-09-06 22:36:45 +08:00
|
|
|
dnl ### Defining macros
|
1994-09-01 12:59:32 +08:00
|
|
|
|
|
|
|
|
1994-08-26 02:05:45 +08:00
|
|
|
dnl m4 output diversions. We let m4 output them all in order at the end,
|
1994-08-31 02:42:54 +08:00
|
|
|
dnl except that we explicitly undivert AC_DIVERSION_SED.
|
1994-09-01 12:59:32 +08:00
|
|
|
|
1994-08-31 02:42:54 +08:00
|
|
|
dnl AC_DIVERSION_NOTICE - 1 (= 0) AC_REQUIRE'd #!/bin/sh line
|
1994-08-26 02:05:45 +08:00
|
|
|
define(AC_DIVERSION_NOTICE, 1)dnl copyright notice & option help strings
|
|
|
|
define(AC_DIVERSION_INIT, 2)dnl initialization code
|
1994-08-31 02:42:54 +08:00
|
|
|
define(AC_DIVERSION_SED, 3)dnl variable substitutions in config.status
|
|
|
|
define(AC_DIVERSION_NORMAL_4, 4)dnl AC_REQUIRE'd code, 4 level deep
|
|
|
|
define(AC_DIVERSION_NORMAL_3, 5)dnl AC_REQUIRE'd code, 3 level deep
|
|
|
|
define(AC_DIVERSION_NORMAL_2, 6)dnl AC_REQUIRE'd code, 2 level deep
|
|
|
|
define(AC_DIVERSION_NORMAL_1, 7)dnl AC_REQUIRE'd code, 1 level deep
|
|
|
|
define(AC_DIVERSION_NORMAL, 8)dnl the tests and output code
|
1994-09-01 12:59:32 +08:00
|
|
|
|
1994-08-31 02:42:54 +08:00
|
|
|
dnl Change the diversion stream to STREAM, while stacking old values.
|
|
|
|
dnl AC_DIVERT_PUSH(STREAM)
|
|
|
|
define(AC_DIVERT_PUSH,
|
|
|
|
[pushdef([AC_DIVERSION_CURRENT], $1)dnl
|
|
|
|
divert(AC_DIVERSION_CURRENT)dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-31 02:42:54 +08:00
|
|
|
dnl Change the diversion stream to its previous value, unstacking it.
|
|
|
|
dnl AC_DIVERT_POP()
|
|
|
|
define(AC_DIVERT_POP,
|
|
|
|
[popdef([AC_DIVERSION_CURRENT])dnl
|
|
|
|
divert(AC_DIVERSION_CURRENT)dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-31 02:42:54 +08:00
|
|
|
dnl Initialize the diversion setup.
|
1994-09-01 12:59:32 +08:00
|
|
|
define([AC_DIVERSION_CURRENT], AC_DIVERSION_NORMAL)
|
|
|
|
dnl This will be popped by AC_REQUIRE in AC_INIT.
|
|
|
|
pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_NOTICE)
|
|
|
|
|
1994-08-31 02:42:54 +08:00
|
|
|
dnl The prologue for Autoconf macros.
|
|
|
|
dnl AC_PRO(MACRO-NAME)
|
|
|
|
define(AC_PRO,
|
|
|
|
[define([AC_PROVIDE_$1], )dnl
|
|
|
|
ifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL,
|
|
|
|
[AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))],
|
|
|
|
[pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_CURRENT)])dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-31 02:42:54 +08:00
|
|
|
dnl The Epilogue for Autoconf macros.
|
|
|
|
dnl AC_EPI()
|
|
|
|
define(AC_EPI,
|
|
|
|
[AC_DIVERT_POP()dnl
|
|
|
|
ifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL,
|
|
|
|
[undivert(AC_DIVERSION_NORMAL_4)dnl
|
|
|
|
undivert(AC_DIVERSION_NORMAL_3)dnl
|
|
|
|
undivert(AC_DIVERSION_NORMAL_2)dnl
|
|
|
|
undivert(AC_DIVERSION_NORMAL_1)dnl
|
|
|
|
])dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-31 02:42:54 +08:00
|
|
|
dnl Define a macro which automatically provides itself. Add machinery
|
|
|
|
dnl so the macro automatically switches expansion to the diversion
|
|
|
|
dnl stack if it is not already using it. In this case, once finished,
|
|
|
|
dnl it will bring back all the code accumulated in the diversion stack.
|
|
|
|
dnl This, combined with AC_REQUIRE, achieves the topological ordering of
|
1994-09-06 22:36:45 +08:00
|
|
|
dnl macros. We don't use this macro to define some frequently called
|
|
|
|
dnl macros that are not involved in ordering constraints, to save m4
|
|
|
|
dnl processing.
|
1994-08-13 10:19:11 +08:00
|
|
|
dnl AC_DEFUN(NAME, EXPANSION)
|
|
|
|
define([AC_DEFUN],
|
1994-09-01 12:59:32 +08:00
|
|
|
[define($1, [AC_PRO([$1])$2[]AC_EPI()])])
|
|
|
|
|
1994-09-06 22:36:45 +08:00
|
|
|
|
|
|
|
dnl ### Controlling Autoconf operation
|
|
|
|
|
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl AC_INIT_NOTICE()
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_INIT_NOTICE,
|
1993-10-21 07:33:19 +08:00
|
|
|
[# Guess values for system-dependent variables and create Makefiles.
|
1993-11-10 22:25:29 +08:00
|
|
|
# Generated automatically using autoconf version] AC_ACVERSION [
|
1994-03-18 17:35:40 +08:00
|
|
|
# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
|
1994-05-18 03:26:10 +08:00
|
|
|
#
|
1993-12-02 15:24:42 +08:00
|
|
|
# This configure script 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)
|
1993-10-21 07:33:19 +08:00
|
|
|
# any later version.
|
1994-05-18 03:26:10 +08:00
|
|
|
#
|
1993-12-02 15:24:42 +08:00
|
|
|
# This script 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.
|
1994-05-18 03:26:10 +08:00
|
|
|
#
|
1993-10-21 07:33:19 +08:00
|
|
|
# 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
1994-08-26 02:05:45 +08:00
|
|
|
|
1994-09-01 12:59:32 +08:00
|
|
|
ac_help=])
|
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl AC_INIT_PARSE_ARGS()
|
1994-08-23 23:04:53 +08:00
|
|
|
AC_DEFUN(AC_INIT_PARSE_ARGS,
|
1994-09-11 14:20:58 +08:00
|
|
|
[
|
1994-09-07 11:06:34 +08:00
|
|
|
# Omit some internal or obsolete options to make the list less imposing.
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote(, )dnl
|
1994-03-24 11:41:48 +08:00
|
|
|
ac_usage="Usage: configure [options] [host]
|
1994-04-10 06:07:23 +08:00
|
|
|
Options: [defaults in brackets after descriptions]
|
1994-08-09 21:44:55 +08:00
|
|
|
Configuration:
|
1994-08-26 09:15:45 +08:00
|
|
|
--cache-file=FILE cache test results in FILE
|
|
|
|
--help print this message
|
|
|
|
--no-create do not create output files
|
|
|
|
--quiet, --silent do not print \`checking...' messages
|
|
|
|
--version print the version of autoconf that created configure
|
1994-09-07 11:06:34 +08:00
|
|
|
Directory and file names:
|
1994-08-26 09:15:45 +08:00
|
|
|
--exec-prefix=PREFIX install host dependent files in PREFIX [/usr/local]
|
|
|
|
--prefix=PREFIX install host independent files in PREFIX [/usr/local]
|
|
|
|
--srcdir=DIR find the sources in DIR [configure dir or ..]
|
1994-09-07 11:06:34 +08:00
|
|
|
--program-prefix=PREFIX prepend PREFIX to installed program names
|
|
|
|
--program-suffix=SUFFIX append SUFFIX to installed program names
|
1994-08-09 21:44:55 +08:00
|
|
|
Host type:
|
1994-08-26 09:15:45 +08:00
|
|
|
--build=BUILD configure for building on BUILD [BUILD=HOST]
|
|
|
|
--host=HOST configure for HOST [guessed]
|
|
|
|
--target=TARGET configure for TARGET [TARGET=HOST]
|
1994-08-09 21:44:55 +08:00
|
|
|
Features and packages:
|
1994-08-26 09:15:45 +08:00
|
|
|
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
|
|
|
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
|
|
|
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
|
|
|
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
|
|
|
--x-includes=DIR X include files are in DIR
|
|
|
|
--x-libraries=DIR X library files are in DIR
|
1994-08-27 06:27:25 +08:00
|
|
|
--enable and --with options recognized:$ac_help"
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote([, ])dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
|
1994-03-27 13:44:01 +08:00
|
|
|
# Initialize some variables set by options.
|
1994-04-10 05:34:23 +08:00
|
|
|
# The variables have the same names as the options, with
|
|
|
|
# dashes changed to underlines.
|
1994-03-29 07:48:26 +08:00
|
|
|
build=NONE
|
1994-05-25 09:21:21 +08:00
|
|
|
cache_file=./config.cache
|
1994-06-23 02:22:34 +08:00
|
|
|
exec_prefix=NONE
|
1994-03-29 07:48:26 +08:00
|
|
|
host=NONE
|
1994-04-10 05:34:23 +08:00
|
|
|
no_create=
|
1994-03-29 08:40:23 +08:00
|
|
|
nonopt=NONE
|
1994-09-06 04:12:21 +08:00
|
|
|
no_recursion=
|
1994-06-23 02:22:34 +08:00
|
|
|
prefix=NONE
|
1994-09-07 11:06:34 +08:00
|
|
|
program_prefix=NONE
|
|
|
|
program_suffix=NONE
|
|
|
|
program_transform_name=NONE
|
1994-04-10 05:34:23 +08:00
|
|
|
silent=
|
1994-03-27 13:44:01 +08:00
|
|
|
srcdir=
|
1994-03-29 07:48:26 +08:00
|
|
|
target=NONE
|
1994-04-10 05:34:23 +08:00
|
|
|
verbose=
|
1994-08-23 23:04:53 +08:00
|
|
|
x_includes=NONE
|
|
|
|
x_libraries=NONE
|
1994-03-27 13:44:01 +08:00
|
|
|
|
1994-07-20 06:14:03 +08:00
|
|
|
# Initialize some other variables.
|
1994-07-19 22:44:16 +08:00
|
|
|
subdirs=
|
|
|
|
|
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
|
|
|
|
1994-03-24 11:41:48 +08:00
|
|
|
case "$ac_option" in
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote(, )dnl
|
1994-03-31 09:02:47 +08:00
|
|
|
-*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote([, ])dnl
|
1994-03-29 07:48:26 +08:00
|
|
|
*) ac_optarg= ;;
|
|
|
|
esac
|
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
|
|
|
|
1994-03-29 07:48:26 +08:00
|
|
|
case "$ac_option" in
|
|
|
|
|
|
|
|
-build | --build | --buil | --bui | --bu | --b)
|
|
|
|
ac_prev=build ;;
|
|
|
|
-build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
|
|
|
|
build="$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=*)
|
|
|
|
cache_file="$ac_optarg" ;;
|
|
|
|
|
1994-03-31 09:02:47 +08:00
|
|
|
-disable-* | --disable-*)
|
|
|
|
ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
|
1994-05-18 03:26:10 +08:00
|
|
|
# Reject names that are not valid shell variable names.
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote(, )dnl
|
1994-03-31 09:02:47 +08:00
|
|
|
if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote([, ])dnl
|
|
|
|
AC_MSG_ERROR($ac_feature: invalid feature name)
|
1994-03-31 09:02:47 +08:00
|
|
|
fi
|
|
|
|
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
|
|
|
|
eval "enable_${ac_feature}=no" ;;
|
|
|
|
|
1994-03-26 14:32:34 +08:00
|
|
|
-enable-* | --enable-*)
|
|
|
|
ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
|
1994-05-18 03:26:10 +08:00
|
|
|
# Reject names that are not valid shell variable names.
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote(, )dnl
|
1994-03-29 07:48:26 +08:00
|
|
|
if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote([, ])dnl
|
|
|
|
AC_MSG_ERROR($ac_feature: invalid feature name)
|
1994-03-26 14:32:34 +08:00
|
|
|
fi
|
|
|
|
ac_feature=`echo $ac_feature| sed 's/-/_/g'`
|
|
|
|
case "$ac_option" in
|
1994-03-29 07:48:26 +08:00
|
|
|
*=*) ;;
|
1994-03-26 14:32:34 +08:00
|
|
|
*) ac_optarg=yes ;;
|
|
|
|
esac
|
|
|
|
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=*)
|
1994-03-29 07:48:26 +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
|
|
|
|
|
|
|
-help | --help | --hel | --he)
|
1994-03-26 14:32:34 +08:00
|
|
|
cat << EOF
|
|
|
|
$ac_usage
|
|
|
|
EOF
|
|
|
|
exit 0 ;;
|
1994-03-24 11:41:48 +08:00
|
|
|
|
1994-03-29 07:48:26 +08:00
|
|
|
-host | --host | --hos | --ho)
|
|
|
|
ac_prev=host ;;
|
|
|
|
-host=* | --host=* | --hos=* | --ho=*)
|
|
|
|
host="$ac_optarg" ;;
|
1994-03-24 11:41:48 +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
|
|
|
|
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=*)
|
|
|
|
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=*)
|
1994-03-29 07:48:26 +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=*)
|
1994-03-29 07:48:26 +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=*)
|
1994-03-29 07:48:26 +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
|
|
|
|
1994-03-29 07:48:26 +08:00
|
|
|
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
|
|
|
|
ac_prev=srcdir ;;
|
|
|
|
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
|
|
|
|
srcdir="$ac_optarg" ;;
|
1994-03-24 11:41:48 +08:00
|
|
|
|
1994-03-29 07:48:26 +08:00
|
|
|
-target | --target | --targe | --targ | --tar | --ta | --t)
|
|
|
|
ac_prev=target ;;
|
|
|
|
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
|
|
|
|
target="$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
|
|
|
|
|
|
|
-version | --version | --versio | --versi | --vers)
|
|
|
|
echo "configure generated by autoconf version AC_ACVERSION"
|
|
|
|
exit 0 ;;
|
|
|
|
|
1994-03-24 11:41:48 +08:00
|
|
|
-with-* | --with-*)
|
1994-03-26 14:32:34 +08:00
|
|
|
ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
|
1994-05-18 03:26:10 +08:00
|
|
|
# Reject names that are not valid shell variable names.
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote(, )dnl
|
1994-03-29 07:48:26 +08:00
|
|
|
if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote([, ])dnl
|
|
|
|
AC_MSG_ERROR($ac_package: invalid package name)
|
1994-03-24 11:41:48 +08:00
|
|
|
fi
|
|
|
|
ac_package=`echo $ac_package| sed 's/-/_/g'`
|
1994-03-26 14:32:34 +08:00
|
|
|
case "$ac_option" in
|
1994-03-29 07:48:26 +08:00
|
|
|
*=*) ;;
|
1994-03-26 14:32:34 +08:00
|
|
|
*) ac_optarg=yes ;;
|
|
|
|
esac
|
|
|
|
eval "with_${ac_package}='$ac_optarg'" ;;
|
1993-10-21 07:33:19 +08:00
|
|
|
|
1994-03-26 14:32:34 +08:00
|
|
|
-without-* | --without-*)
|
|
|
|
ac_package=`echo $ac_option|sed -e 's/-*without-//'`
|
1994-05-18 03:26:10 +08:00
|
|
|
# Reject names that are not valid shell variable names.
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote(, )dnl
|
1994-03-26 14:32:34 +08:00
|
|
|
if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote([, ])dnl
|
|
|
|
AC_MSG_ERROR($ac_package: invalid package name)
|
1994-03-26 14:32:34 +08:00
|
|
|
fi
|
|
|
|
ac_package=`echo $ac_package| sed 's/-/_/g'`
|
|
|
|
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=*)
|
|
|
|
x_includes="$ac_optarg" ;;
|
|
|
|
|
|
|
|
-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=*)
|
|
|
|
x_libraries="$ac_optarg" ;;
|
|
|
|
|
1994-08-01 21:44:22 +08:00
|
|
|
-*) AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage])
|
1994-03-26 14:32:34 +08:00
|
|
|
;;
|
1994-03-20 05:46:09 +08:00
|
|
|
|
1994-03-24 11:41:48 +08:00
|
|
|
*)
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote(, )dnl
|
1994-04-21 01:27:41 +08:00
|
|
|
if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote([, ])dnl
|
|
|
|
AC_MSG_WARN($ac_option: invalid host type)
|
1994-03-24 11:41:48 +08:00
|
|
|
fi
|
1994-04-21 01:27:41 +08:00
|
|
|
if test "x$nonopt" != xNONE; then
|
1994-08-01 21:44:22 +08:00
|
|
|
AC_MSG_ERROR(can only configure for one host and one target at a time)
|
1994-03-29 08:40:23 +08:00
|
|
|
fi
|
|
|
|
nonopt="$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
|
1994-08-01 21:44:22 +08:00
|
|
|
AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`)
|
1994-03-29 07:48:26 +08:00
|
|
|
fi
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-31 02:42:54 +08:00
|
|
|
dnl Try to have only one #! line, so the script doesn't look funny
|
|
|
|
dnl for users of AC_REVISION.
|
1994-08-25 11:45:07 +08:00
|
|
|
dnl AC_INIT_BINSH()
|
|
|
|
AC_DEFUN(AC_INIT_BINSH,
|
1994-08-13 10:19:11 +08:00
|
|
|
[#!/bin/sh
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl AC_INIT(UNIQUE-FILE-IN-SOURCE-DIR)
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_INIT,
|
1994-08-31 04:24:50 +08:00
|
|
|
[sinclude(acsite.m4)dnl
|
|
|
|
sinclude(./aclocal.m4)dnl
|
1994-08-31 02:42:54 +08:00
|
|
|
AC_REQUIRE([AC_INIT_BINSH])dnl
|
1994-08-01 21:44:22 +08:00
|
|
|
AC_INIT_NOTICE
|
1994-09-01 12:59:32 +08:00
|
|
|
AC_DIVERT_POP()dnl to NORMAL
|
1994-08-31 02:42:54 +08:00
|
|
|
AC_DIVERT_PUSH(AC_DIVERSION_INIT)dnl
|
1994-08-23 23:04:53 +08:00
|
|
|
AC_INIT_PARSE_ARGS
|
1994-08-26 02:05:45 +08:00
|
|
|
AC_INIT_PREPARE($1)dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
AC_DIVERT_POP()dnl to NORMAL
|
|
|
|
])
|
|
|
|
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl AC_INIT_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR)
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_INIT_PREPARE,
|
1994-08-26 05:55:22 +08:00
|
|
|
[trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
|
1993-10-21 07:33:19 +08:00
|
|
|
|
1994-05-10 23:03:49 +08:00
|
|
|
# File descriptor usage:
|
|
|
|
# 0 unused; standard input
|
|
|
|
# 1 file creation
|
|
|
|
# 2 errors and warnings
|
|
|
|
# 3 unused; some systems may open it to /dev/tty
|
1994-08-23 23:04:53 +08:00
|
|
|
define(AC_FD_MSG, 4)dnl
|
|
|
|
[#] AC_FD_MSG checking for... messages and results
|
|
|
|
define(AC_FD_CC, 5)dnl
|
|
|
|
[#] AC_FD_CC compiler messages saved in config.log
|
1994-05-10 23:03:49 +08:00
|
|
|
if test "$silent" = yes; then
|
1994-08-23 23:04:53 +08:00
|
|
|
exec AC_FD_MSG>/dev/null
|
1994-05-10 23:03:49 +08:00
|
|
|
else
|
1994-08-23 23:04:53 +08:00
|
|
|
exec AC_FD_MSG>&1
|
1994-05-10 23:03:49 +08:00
|
|
|
fi
|
1994-08-23 23:04:53 +08:00
|
|
|
exec AC_FD_CC>./config.log
|
1994-06-23 02:22:34 +08:00
|
|
|
|
|
|
|
echo "\
|
|
|
|
This file contains any messages produced by compilers while
|
|
|
|
running configure, to aid debugging if configure makes a mistake.
|
1994-08-23 23:04:53 +08:00
|
|
|
" 1>&AC_FD_CC
|
1994-05-10 23:03:49 +08:00
|
|
|
|
1994-09-06 04:12:21 +08:00
|
|
|
# Strip out --no-create and --no-recursion so they do not pile up.
|
1994-07-19 22:44:16 +08:00
|
|
|
# Also quote any args containing spaces.
|
1994-09-11 14:20:58 +08:00
|
|
|
ac_configure_args=
|
|
|
|
for ac_arg
|
|
|
|
do
|
1994-04-05 09:29:04 +08:00
|
|
|
case "$ac_arg" in
|
|
|
|
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
|
|
|
|
| --no-cr | --no-c) ;;
|
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) ;;
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote(, )dnl
|
1994-09-11 14:20:58 +08:00
|
|
|
*[" "]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote([, ])dnl
|
1994-09-11 14:20:58 +08:00
|
|
|
*) ac_configure_args="$ac_configure_args $ac_arg" ;;
|
1994-04-05 09:29:04 +08:00
|
|
|
esac
|
|
|
|
done
|
1994-03-27 13:44:01 +08:00
|
|
|
|
1993-10-21 07:33:19 +08:00
|
|
|
# NLS nuisances.
|
1994-05-18 03:26:10 +08:00
|
|
|
# Only set LANG and LC_ALL to C if already set.
|
1993-10-21 07:33:19 +08:00
|
|
|
# These must not be set unconditionally because not all systems understand
|
|
|
|
# e.g. LANG=C (notably SCO).
|
1994-05-05 23:49:35 +08:00
|
|
|
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
|
|
|
|
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
|
1993-10-21 07:33:19 +08:00
|
|
|
|
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.
|
|
|
|
echo > confdefs.h
|
|
|
|
|
|
|
|
# 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.
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_unique_file=$1
|
1993-10-21 07:33:19 +08:00
|
|
|
|
|
|
|
# Find the source files, if location was not specified.
|
|
|
|
if test -z "$srcdir"; then
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_srcdir_defaulted=yes
|
1994-05-18 03:26:10 +08:00
|
|
|
# Try the directory containing this script, then its parent.
|
1994-03-27 13:44:01 +08:00
|
|
|
ac_prog=[$]0
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote(, )dnl
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote([, ])dnl
|
1994-03-26 14:32:34 +08:00
|
|
|
test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
|
1994-03-18 16:02:20 +08:00
|
|
|
srcdir=$ac_confdir
|
|
|
|
if test ! -r $srcdir/$ac_unique_file; then
|
1993-10-21 07:33:19 +08:00
|
|
|
srcdir=..
|
|
|
|
fi
|
1994-05-05 20:47:59 +08:00
|
|
|
else
|
|
|
|
ac_srcdir_defaulted=no
|
1993-10-21 07:33:19 +08:00
|
|
|
fi
|
1994-03-18 16:02:20 +08:00
|
|
|
if test ! -r $srcdir/$ac_unique_file; then
|
1994-05-05 20:47:59 +08:00
|
|
|
if test "$ac_srcdir_defaulted" = yes; then
|
1994-08-01 21:44:22 +08:00
|
|
|
AC_MSG_ERROR(can not find sources in ${ac_confdir} or ..)
|
1993-10-21 07:33:19 +08:00
|
|
|
else
|
1994-08-01 21:44:22 +08:00
|
|
|
AC_MSG_ERROR(can not find sources in ${srcdir})
|
1993-10-21 07:33:19 +08:00
|
|
|
fi
|
|
|
|
fi
|
1994-06-23 02:22:34 +08:00
|
|
|
|
|
|
|
dnl Let the site file select an alternate cache file if it wants to.
|
|
|
|
AC_SITE_LOAD
|
1994-05-05 06:03:07 +08:00
|
|
|
AC_CACHE_LOAD
|
1994-04-17 03:05:27 +08:00
|
|
|
AC_LANG_C
|
1994-09-06 22:36:45 +08:00
|
|
|
AC_PROG_ECHO_N
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl Substitute for predefined variables.
|
1994-08-27 06:27:25 +08:00
|
|
|
AC_SUBST(CFLAGS)dnl
|
|
|
|
AC_SUBST(CPPFLAGS)dnl
|
1994-09-06 22:36:45 +08:00
|
|
|
AC_SUBST(CXXFLAGS)dnl
|
|
|
|
AC_SUBST(DEFS)dnl
|
1994-08-27 06:27:25 +08:00
|
|
|
AC_SUBST(LDFLAGS)dnl
|
1994-09-06 22:36:45 +08:00
|
|
|
AC_SUBST(LIBS)dnl
|
|
|
|
AC_SUBST(exec_prefix)dnl
|
|
|
|
AC_SUBST(prefix)dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-09-06 22:36:45 +08:00
|
|
|
|
|
|
|
dnl ### Selecting optional features
|
|
|
|
|
|
|
|
|
1994-05-25 09:21:21 +08:00
|
|
|
dnl AC_ARG_ENABLE(FEATURE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_ARG_ENABLE,
|
1994-08-31 02:42:54 +08:00
|
|
|
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
1994-08-26 02:05:45 +08:00
|
|
|
ac_help="${ac_help}
|
|
|
|
[$2]"
|
1994-08-31 02:42:54 +08:00
|
|
|
AC_DIVERT_POP()dnl
|
1994-08-26 02:05:45 +08:00
|
|
|
[#] Check whether --enable-$1 or --disable-$1 was given.
|
1994-08-01 21:44:22 +08:00
|
|
|
enableval="[$enable_]patsubst($1, -, _)"
|
1994-03-26 14:32:34 +08:00
|
|
|
if test -n "$enableval"; then
|
1994-08-26 02:05:45 +08:00
|
|
|
ifelse([$3], , :, [$3])
|
|
|
|
ifelse([$4], , , [else
|
|
|
|
$4
|
1994-03-26 14:32:34 +08:00
|
|
|
])dnl
|
|
|
|
fi
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-26 02:05:45 +08:00
|
|
|
AC_DEFUN(AC_ENABLE,
|
|
|
|
[AC_OBSOLETE([$0], [; instead use AC_ARG_ENABLE])dnl
|
1994-08-27 15:01:13 +08:00
|
|
|
AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-05-25 09:21:21 +08:00
|
|
|
dnl AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_ARG_WITH,
|
1994-08-31 02:42:54 +08:00
|
|
|
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
|
1994-08-26 02:05:45 +08:00
|
|
|
ac_help="${ac_help}
|
|
|
|
[$2]"
|
1994-08-31 02:42:54 +08:00
|
|
|
AC_DIVERT_POP()dnl
|
1994-08-26 02:05:45 +08:00
|
|
|
[#] Check whether --with-$1 or --without-$1 was given.
|
1994-08-01 21:44:22 +08:00
|
|
|
withval="[$with_]patsubst($1, -, _)"
|
1993-10-21 07:33:19 +08:00
|
|
|
if test -n "$withval"; then
|
1994-08-26 02:05:45 +08:00
|
|
|
ifelse([$3], , :, [$3])
|
|
|
|
ifelse([$4], , , [else
|
|
|
|
$4
|
1993-10-21 07:33:19 +08:00
|
|
|
])dnl
|
|
|
|
fi
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-26 02:05:45 +08:00
|
|
|
AC_DEFUN(AC_WITH,
|
|
|
|
[AC_OBSOLETE([$0], [; instead use AC_ARG_WITH])dnl
|
1994-08-27 15:01:13 +08:00
|
|
|
AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-09-06 22:36:45 +08:00
|
|
|
|
1994-09-07 11:06:34 +08:00
|
|
|
dnl ### Transforming program names.
|
|
|
|
|
|
|
|
|
|
|
|
dnl AC_ARG_PROGRAM()
|
|
|
|
AC_DEFUN(AC_ARG_PROGRAM,
|
|
|
|
[test "${program_transform_name}" = NONE && program_transform_name=
|
|
|
|
if test -n "${program_transform_name}"; then
|
|
|
|
# Double any \ or $.
|
|
|
|
echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
|
1994-09-09 04:42:23 +08:00
|
|
|
program_transform_name="`echo ${program_transform_name}|sed -f conftestsed`"
|
1994-09-07 11:06:34 +08:00
|
|
|
rm -f conftestsed
|
|
|
|
fi
|
|
|
|
test "${program_prefix}" != NONE &&
|
1994-09-09 04:42:23 +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.
|
|
|
|
test "${program_suffix}" != NONE &&
|
1994-09-09 04:42:23 +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.
|
1994-09-09 04:42:23 +08:00
|
|
|
test "${program_transform_name}" = "" && program_transform_name="s,x,x,"
|
1994-09-07 11:06:34 +08:00
|
|
|
AC_SUBST(program_transform_name)dnl
|
|
|
|
])
|
|
|
|
|
|
|
|
|
1994-09-06 22:36:45 +08:00
|
|
|
dnl ### Version numbers
|
|
|
|
|
1994-09-01 12:59:32 +08:00
|
|
|
|
1994-05-11 00:26:54 +08:00
|
|
|
dnl AC_REVISION(REVISION-INFO)
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_REVISION,
|
1994-08-25 11:45:07 +08:00
|
|
|
[AC_REQUIRE([AC_INIT_BINSH])dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
[# From configure.in] translit([$1], $")])
|
|
|
|
|
1994-03-25 02:36:13 +08:00
|
|
|
dnl Subroutines of AC_PREREQ.
|
1994-09-01 12:59:32 +08:00
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl Change the dots in NUMBER into commas.
|
|
|
|
dnl AC_PREREQ_SPLIT(NUMBER)
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_PREREQ_SPLIT,
|
1994-09-01 12:59:32 +08:00
|
|
|
[translit($1, ., [, ])])
|
|
|
|
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl Default the ternary version number to 0 (e.g., 1, 7 -> 1, 7, 0).
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl AC_PREREQ_CANON(MAJOR, MINOR [,TERNARY])
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_PREREQ_CANON,
|
1994-09-01 12:59:32 +08:00
|
|
|
[$1, $2, ifelse([$3], , 0, [$3])])
|
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl Complain and exit if version number 1 is less than version number 2.
|
|
|
|
dnl PRINTABLE2 is the printable version of version number 2.
|
|
|
|
dnl AC_PREREQ_COMPARE(MAJOR1, MINOR1, TERNARY1, MAJOR2, MINOR2, TERNARY2,
|
|
|
|
dnl PRINTABLE2)
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_PREREQ_COMPARE,
|
1994-03-25 02:36:13 +08:00
|
|
|
[ifelse(builtin([eval],
|
1994-08-01 21:44:22 +08:00
|
|
|
[$3 + $2 * 100 + $1 * 10000 < $6 + $5 * 100 + $4 * 10000]), 1,
|
1994-08-26 14:17:48 +08:00
|
|
|
[errprint(Autoconf version $7 or higher is required for this script
|
1994-09-01 12:59:32 +08:00
|
|
|
)m4exit(3)])])
|
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl Complain and exit if the Autoconf version is less than VERSION.
|
1994-05-11 00:26:54 +08:00
|
|
|
dnl AC_PREREQ(VERSION)
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_PREREQ,
|
1994-08-13 10:19:11 +08:00
|
|
|
[AC_PREREQ_COMPARE(AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)),
|
1994-09-01 12:59:32 +08:00
|
|
|
AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1])])
|
|
|
|
|
|
|
|
|
1994-05-05 08:05:25 +08:00
|
|
|
dnl ### Canonicalizing the system type
|
1994-09-01 12:59:32 +08:00
|
|
|
|
|
|
|
|
1994-09-11 14:20:58 +08:00
|
|
|
dnl Find install-sh, config.sub, config.guess, and Cygnus configure
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl in directory DIR. These are auxiliary files used in configuration.
|
|
|
|
dnl DIR can be either absolute or relative to ${srcdir}.
|
1994-06-23 02:22:34 +08:00
|
|
|
dnl AC_CONFIG_AUX_DIR(DIR)
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_CONFIG_AUX_DIR,
|
1994-09-01 12:59:32 +08:00
|
|
|
[AC_CONFIG_AUX_DIRS($1 ${srcdir}/$1)])
|
|
|
|
|
1994-05-06 12:05:11 +08:00
|
|
|
dnl The default is `${srcdir}' or `${srcdir}/..' or `${srcdir}/../..'.
|
(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
|
|
|
dnl There's no need to call this macro explicitly; just AC_REQUIRE it.
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_CONFIG_AUX_DIR_DEFAULT,
|
1994-09-01 12:59:32 +08:00
|
|
|
[AC_CONFIG_AUX_DIRS(${srcdir} ${srcdir}/.. ${srcdir}/../..)])
|
|
|
|
|
(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
|
|
|
dnl Internal subroutine.
|
|
|
|
dnl Search for the configuration auxiliary files in directory list $1.
|
1994-09-11 14:20:58 +08:00
|
|
|
dnl We look only for install-sh, so users of AC_PROG_INSTALL
|
1994-05-03 07:44:20 +08:00
|
|
|
dnl do not automatically need to distribute the other auxiliary files.
|
1994-06-23 02:22:34 +08:00
|
|
|
dnl AC_CONFIG_AUX_DIRS(DIR ...)
|
1994-08-13 10:19:11 +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
|
|
|
|
ac_install_sh="${ac_aux_dir}/install-sh -c"
|
|
|
|
break
|
|
|
|
elif test -f $ac_dir/install.sh; then
|
|
|
|
ac_aux_dir=$ac_dir
|
|
|
|
ac_install_sh="${ac_aux_dir}/install.sh -c"
|
|
|
|
break
|
(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
|
1994-09-11 14:20:58 +08:00
|
|
|
AC_MSG_ERROR([can not 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
|
|
|
|
ac_config_guess=${ac_aux_dir}/config.guess
|
|
|
|
ac_config_sub=${ac_aux_dir}/config.sub
|
|
|
|
ac_configure=${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
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
(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
|
|
|
dnl Canonicalize the host, target, and build system types.
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_CANONICAL_SYSTEM,
|
1994-06-23 02:22:34 +08:00
|
|
|
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
|
1994-09-07 11:06:34 +08:00
|
|
|
AC_BEFORE([$0], [AC_ARG_PROGRAM])
|
(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
|
|
|
# Do some error checking and defaulting for the host and target type.
|
|
|
|
# The inputs are:
|
1994-05-10 09:55:50 +08:00
|
|
|
# configure --host=HOST --target=TARGET --build=BUILD NONOPT
|
(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:
|
1994-05-18 03:26:10 +08:00
|
|
|
# 1. You are not allowed to specify --host, --target, and nonopt at the
|
(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
|
|
|
# same time.
|
|
|
|
# 2. Host defaults to nonopt.
|
|
|
|
# 3. If nonopt is not specified, then host defaults to the current host,
|
|
|
|
# as determined by config.guess.
|
|
|
|
# 4. Target defaults to nonopt.
|
|
|
|
# 5. If nonopt is not specified, then target defaults to host.
|
1994-07-19 22:44:16 +08:00
|
|
|
# 6. build defaults to empty (but implicitly 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 aliases save the names the user supplied, while $host etc.
|
|
|
|
# will get canonicalized.
|
1994-08-26 12:59:03 +08:00
|
|
|
case $host---$target---$nonopt in
|
(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
|
|
|
NONE---*---* | *---NONE---* | *---*---NONE) ;;
|
1994-08-01 21:44:22 +08:00
|
|
|
*) AC_MSG_ERROR(can only configure for one host and one target at a time) ;;
|
(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
|
|
|
esac
|
|
|
|
|
1994-06-23 02:22:34 +08:00
|
|
|
AC_CANONICAL_HOST
|
|
|
|
AC_CANONICAL_TARGET
|
|
|
|
AC_CANONICAL_BUILD
|
1994-09-07 11:06:34 +08:00
|
|
|
test "${host_alias}" != "${target_alias}" &&
|
|
|
|
test "${program_prefix}${program_suffix}${program_transform_name}" = \
|
|
|
|
NONENONENONE && program_prefix=${target_alias}-
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-06-23 02:22:34 +08:00
|
|
|
dnl Subroutines of AC_CANONICAL_SYSTEM.
|
1994-09-01 12:59:32 +08:00
|
|
|
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_CANONICAL_HOST,
|
1994-08-26 12:59:03 +08:00
|
|
|
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
|
1994-09-09 04:42:23 +08:00
|
|
|
|
|
|
|
# Make sure we can run config.sub.
|
|
|
|
if ${ac_config_sub} sun4 >/dev/null 2>&1; then :
|
|
|
|
else AC_MSG_ERROR(can not run ${ac_config_sub})
|
|
|
|
fi
|
|
|
|
|
1994-08-26 12:59:03 +08:00
|
|
|
AC_MSG_CHECKING(host 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
|
|
|
|
1994-08-26 12:59:03 +08:00
|
|
|
host_alias=$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
|
|
|
case "${host_alias}" in
|
|
|
|
NONE)
|
|
|
|
case $nonopt in
|
|
|
|
NONE)
|
|
|
|
if host_alias=`${ac_config_guess}`; then :
|
1994-08-01 21:44:22 +08:00
|
|
|
else AC_MSG_ERROR(can not guess host type; you must specify one)
|
(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 ;;
|
|
|
|
*) host_alias=$nonopt ;;
|
|
|
|
esac ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
host=`${ac_config_sub} ${host_alias}`
|
|
|
|
host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
|
|
|
|
host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
|
|
|
|
host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
|
1994-08-11 00:47:42 +08:00
|
|
|
AC_MSG_RESULT($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
|
|
|
AC_SUBST(host)dnl
|
|
|
|
AC_SUBST(host_alias)dnl
|
1994-07-19 22:44:16 +08:00
|
|
|
AC_SUBST(host_cpu)dnl
|
|
|
|
AC_SUBST(host_vendor)dnl
|
|
|
|
AC_SUBST(host_os)dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-26 12:59:03 +08:00
|
|
|
dnl Internal use only.
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_CANONICAL_TARGET,
|
1994-08-26 12:59:03 +08:00
|
|
|
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
|
|
|
|
AC_MSG_CHECKING(target 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
|
|
|
|
1994-08-26 12:59:03 +08:00
|
|
|
target_alias=$target
|
(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
|
|
|
case "${target_alias}" in
|
|
|
|
NONE)
|
|
|
|
case $nonopt in
|
|
|
|
NONE) target_alias=$host_alias ;;
|
|
|
|
*) target_alias=$nonopt ;;
|
|
|
|
esac ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
target=`${ac_config_sub} ${target_alias}`
|
|
|
|
target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
|
|
|
|
target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
|
|
|
|
target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
|
1994-08-11 00:47:42 +08:00
|
|
|
AC_MSG_RESULT($target)
|
(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_SUBST(target)dnl
|
|
|
|
AC_SUBST(target_alias)dnl
|
1994-07-19 22:44:16 +08:00
|
|
|
AC_SUBST(target_cpu)dnl
|
|
|
|
AC_SUBST(target_vendor)dnl
|
|
|
|
AC_SUBST(target_os)dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-26 12:59:03 +08:00
|
|
|
dnl Internal use only.
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_CANONICAL_BUILD,
|
1994-08-26 12:59:03 +08:00
|
|
|
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
|
|
|
|
AC_MSG_CHECKING(build 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
|
|
|
|
1994-08-26 12:59:03 +08:00
|
|
|
build_alias=$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
|
|
|
case "${build_alias}" in
|
|
|
|
NONE) build= build_alias= ;;
|
|
|
|
*)
|
|
|
|
build=`${ac_config_sub} ${build_alias}`
|
|
|
|
build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
|
|
|
|
build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
|
|
|
|
build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
|
|
|
|
;;
|
|
|
|
esac
|
1994-08-11 00:47:42 +08:00
|
|
|
AC_MSG_RESULT($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
|
|
|
AC_SUBST(build)dnl
|
|
|
|
AC_SUBST(build_alias)dnl
|
1994-07-19 22:44:16 +08:00
|
|
|
AC_SUBST(build_cpu)dnl
|
|
|
|
AC_SUBST(build_vendor)dnl
|
|
|
|
AC_SUBST(build_os)dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl Link each of the existing files FILE... to the corresponding
|
|
|
|
dnl link name in LINK...
|
1994-05-25 09:21:21 +08:00
|
|
|
dnl Not actually done until AC_OUTPUT_LINKS.
|
1994-06-23 02:22:34 +08:00
|
|
|
dnl AC_LINK_FILES(LINK ..., FILE ...)
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_LINK_FILES,
|
1994-09-01 12:59:32 +08:00
|
|
|
[define([AC_LIST_LINKS], [$1])define([AC_LIST_FILES], [$2])])
|
|
|
|
|
|
|
|
|
1994-05-05 06:03:07 +08:00
|
|
|
dnl ### Caching test results
|
1994-09-01 12:59:32 +08:00
|
|
|
|
|
|
|
|
1994-06-23 02:22:34 +08:00
|
|
|
dnl Look for site or system specific initialization scripts.
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl AC_SITE_LOAD()
|
1994-09-06 22:36:45 +08:00
|
|
|
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
|
|
|
|
CONFIG_SITE=$prefix/lib/config.site
|
|
|
|
else
|
|
|
|
CONFIG_SITE=/usr/local/lib/config.site
|
|
|
|
fi
|
|
|
|
# System dependent files override system independent ones.
|
|
|
|
if test "x$exec_prefix" != xNONE && test "x$exec_prefix" != "x$prefix"; then
|
|
|
|
CONFIG_SITE="$CONFIG_SITE $exec_prefix/lib/config.site"
|
|
|
|
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
|
1994-08-11 07:54:30 +08:00
|
|
|
echo "loading site script $ac_site_file"
|
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
|
|
|
])
|
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl AC_CACHE_LOAD()
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_CACHE_LOAD,
|
1994-06-23 02:22:34 +08:00
|
|
|
[if test -r "$cache_file"; then
|
1994-08-11 07:54:30 +08:00
|
|
|
echo "loading cache $cache_file"
|
1994-05-05 06:03:07 +08:00
|
|
|
. $cache_file
|
|
|
|
else
|
1994-08-11 07:54:30 +08:00
|
|
|
echo "creating cache $cache_file"
|
1994-05-05 06:03:07 +08:00
|
|
|
> $cache_file
|
1994-08-13 10:19:11 +08:00
|
|
|
fi
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl AC_CACHE_SAVE()
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_CACHE_SAVE,
|
1994-05-05 06:03:07 +08:00
|
|
|
[if test -w $cache_file; then
|
1994-08-11 07:54:30 +08:00
|
|
|
echo "updating cache $cache_file"
|
1994-08-24 14:41:01 +08:00
|
|
|
cat > $cache_file <<\EOF
|
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
|
|
|
|
# scripts and configure runs. It is not useful on other systems.
|
1994-09-06 04:12:21 +08:00
|
|
|
# If it contains results you don't want to keep, you may remove or edit it.
|
1994-05-05 06:03:07 +08:00
|
|
|
#
|
1994-05-18 03:26:10 +08:00
|
|
|
# By default, configure uses ./config.cache as the cache file,
|
1994-05-05 06:03:07 +08:00
|
|
|
# creating it if it does not exist already. You can give configure
|
|
|
|
# the --cache-file=FILE option to use a different cache file; that is
|
|
|
|
# what configure does when it calls configure scripts in
|
|
|
|
# subdirectories, so they share the cache.
|
1994-08-23 23:04:53 +08:00
|
|
|
# Giving --cache-file=/dev/null disables caching, for debugging configure.
|
1994-05-10 23:03:49 +08:00
|
|
|
# config.status only pays attention to the cache file if you give it the
|
1994-05-05 06:03:07 +08:00
|
|
|
# --recheck option to rerun configure.
|
1994-09-10 04:22:01 +08:00
|
|
|
#
|
1994-08-24 14:41:01 +08:00
|
|
|
EOF
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote(, )dnl
|
1994-06-23 02:22:34 +08:00
|
|
|
dnl Allow a site initialization script to override cache values.
|
1994-07-19 22:44:16 +08:00
|
|
|
# Ultrix sh set writes to stderr and can't be redirected directly.
|
1994-09-10 04:13:30 +08:00
|
|
|
(set) 2>&1 |
|
|
|
|
sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \
|
|
|
|
>> $cache_file
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote([, ])dnl
|
1994-08-13 11:28:38 +08:00
|
|
|
else
|
|
|
|
echo "not updating unwritable cache $cache_file"
|
1994-08-13 10:19:11 +08:00
|
|
|
fi
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-05-11 00:26:54 +08:00
|
|
|
dnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_CACHE_VAL,
|
|
|
|
[dnl We used to use the below line, but it fails if the 1st arg is a
|
1994-05-06 12:05:11 +08:00
|
|
|
dnl shell variable, so we need the eval.
|
1994-07-19 22:44:16 +08:00
|
|
|
dnl if test "${$1+set}" = set; then
|
1994-05-06 12:05:11 +08:00
|
|
|
if eval "test \"`echo '${'$1'+set}'`\" = set"; then
|
1994-08-23 23:04:53 +08:00
|
|
|
echo $ac_n "(cached) $ac_c" 1>&AC_FD_MSG
|
1994-05-05 06:03:07 +08:00
|
|
|
else
|
|
|
|
$2
|
|
|
|
fi
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
|
|
|
|
(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
|
|
|
dnl ### Setting variables
|
1994-09-01 12:59:32 +08:00
|
|
|
|
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl Set VARIABLE to VALUE, verbatim, or 1.
|
1994-05-11 00:26:54 +08:00
|
|
|
dnl AC_DEFINE(VARIABLE [, VALUE])
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_DEFINE,
|
1994-08-24 14:41:01 +08:00
|
|
|
[cat >> confdefs.h <<\EOF
|
|
|
|
[#define] $1 ifelse($#, 2, [$2], 1)
|
|
|
|
EOF
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl Similar, but perform shell substitutions $ ` \ once on VALUE.
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_DEFINE_UNQUOTED,
|
1994-08-24 14:41:01 +08:00
|
|
|
[cat >> confdefs.h <<EOF
|
|
|
|
[#define] $1 ifelse($#, 2, [$2], 1)
|
|
|
|
EOF
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl This macro protects VARIABLE from being diverted twice
|
1994-03-23 04:45:36 +08:00
|
|
|
dnl if this macro is called twice for it.
|
1994-05-11 00:26:54 +08:00
|
|
|
dnl AC_SUBST(VARIABLE)
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_SUBST,
|
1994-03-23 04:45:36 +08:00
|
|
|
[ifdef([AC_SUBST_$1], ,
|
|
|
|
[define([AC_SUBST_$1], )dnl
|
1994-08-31 02:42:54 +08:00
|
|
|
AC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
|
1994-03-23 04:45:36 +08:00
|
|
|
s%@$1@%[$]$1%g
|
1994-08-31 02:42:54 +08:00
|
|
|
AC_DIVERT_POP()dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
])])
|
|
|
|
|
1994-08-25 11:45:07 +08:00
|
|
|
dnl AC_SUBST_FILE(VARIABLE)
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_SUBST_FILE,
|
1994-07-19 22:44:16 +08:00
|
|
|
[ifdef([AC_SUBST_$1], ,
|
|
|
|
[define([AC_SUBST_$1], )dnl
|
1994-08-31 02:42:54 +08:00
|
|
|
AC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
|
1994-07-19 22:44:16 +08:00
|
|
|
/@$1@/r [$]$1
|
|
|
|
s%@$1@%%g
|
1994-08-31 02:42:54 +08:00
|
|
|
AC_DIVERT_POP()dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
])])
|
|
|
|
|
|
|
|
|
(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
|
|
|
dnl ### Printing messages
|
1994-09-01 12:59:32 +08:00
|
|
|
|
|
|
|
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl AC_MSG_CHECKING(FEATURE-DESCRIPTION)
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_MSG_CHECKING,
|
|
|
|
[echo $ac_n "checking $1""... $ac_c" 1>&AC_FD_MSG])
|
1994-09-01 12:59:32 +08:00
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl AC_CHECKING(FEATURE-DESCRIPTION)
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_CHECKING,
|
1994-09-01 12:59:32 +08:00
|
|
|
[echo "checking $1" 1>&AC_FD_MSG])
|
|
|
|
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl AC_MSG_RESULT(RESULT-DESCRIPTION)
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_MSG_RESULT,
|
|
|
|
[echo "$ac_t""$1" 1>&AC_FD_MSG])
|
1994-09-01 12:59:32 +08:00
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl AC_VERBOSE(RESULT-DESCRIPTION)
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_VERBOSE,
|
1994-08-11 00:47:42 +08:00
|
|
|
[AC_OBSOLETE([$0], [; instead use AC_MSG_RESULT])dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
echo " $1" 1>&AC_FD_MSG])
|
|
|
|
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl AC_MSG_WARN(PROBLEM-DESCRIPTION)
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_MSG_WARN,
|
1994-09-01 12:59:32 +08:00
|
|
|
[echo "configure: warning: $1" 1>&2])
|
|
|
|
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl AC_MSG_ERROR(ERROR-DESCRIPTION)
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_MSG_ERROR,
|
1994-09-01 12:59:32 +08:00
|
|
|
[{ echo "configure: $1" 1>&2; exit 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
|
|
|
dnl ### Selecting which language to use for testing
|
1994-09-01 12:59:32 +08:00
|
|
|
|
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl AC_LANG_C()
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_LANG_C,
|
1994-08-01 21:44:22 +08:00
|
|
|
[define([AC_LANG], [C])dnl
|
1994-05-06 19:57:01 +08:00
|
|
|
ac_ext=c
|
1994-04-26 12:27:14 +08:00
|
|
|
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
1994-08-26 03:29:53 +08:00
|
|
|
ac_cpp='${CPP} $CPPFLAGS'
|
1994-09-12 12:40:56 +08:00
|
|
|
ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS 1>&AC_FD_CC 2>&AC_FD_CC'
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl AC_LANG_CPLUSPLUS()
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_LANG_CPLUSPLUS,
|
1994-08-01 21:44:22 +08:00
|
|
|
[define([AC_LANG], [CPLUSPLUS])dnl
|
1994-05-06 19:57:01 +08:00
|
|
|
ac_ext=C
|
1994-04-26 12:29:06 +08:00
|
|
|
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
1994-08-26 03:29:53 +08:00
|
|
|
ac_cpp='${CXXCPP} $CPPFLAGS'
|
1994-09-12 12:40:56 +08:00
|
|
|
ac_link='${CXX-gcc} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS 1>&AC_FD_CC 2>&AC_FD_CC'
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-03-20 05:46:09 +08:00
|
|
|
dnl Push the current language on a stack.
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl AC_LANG_SAVE()
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_LANG_SAVE,
|
1994-09-01 12:59:32 +08:00
|
|
|
[pushdef([AC_LANG_STACK], AC_LANG)])
|
|
|
|
|
1994-03-20 05:46:09 +08:00
|
|
|
dnl Restore the current language from the stack.
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl AC_LANG_RESTORE()
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_LANG_RESTORE,
|
1994-09-01 12:59:32 +08:00
|
|
|
[ifelse(AC_LANG_STACK, C, [ifelse(AC_LANG, C, , [AC_LANG_C])], [ifelse(AC_LANG, CPLUSPLUS, , [AC_LANG_CPLUSPLUS])])[]popdef([AC_LANG_STACK])])
|
|
|
|
|
|
|
|
|
(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
|
|
|
dnl ### Enforcing ordering constraints
|
1994-09-01 12:59:32 +08:00
|
|
|
|
|
|
|
|
1994-05-11 00:26:54 +08:00
|
|
|
dnl AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
|
1994-09-01 12:59:32 +08:00
|
|
|
define(AC_BEFORE,
|
1994-03-23 04:45:36 +08:00
|
|
|
[ifdef([AC_PROVIDE_$2], [errprint(__file__:__line__: [$2 was called before $1
|
1994-09-01 12:59:32 +08:00
|
|
|
])])])
|
|
|
|
|
1994-05-11 00:26:54 +08:00
|
|
|
dnl AC_REQUIRE(MACRO-NAME)
|
1994-09-01 12:59:32 +08:00
|
|
|
define(AC_REQUIRE,
|
1994-08-31 02:42:54 +08:00
|
|
|
[ifdef([AC_PROVIDE_$1], ,
|
|
|
|
[AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))dnl
|
|
|
|
indir([$1])
|
|
|
|
AC_DIVERT_POP()dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
])])
|
|
|
|
|
1994-05-11 00:26:54 +08:00
|
|
|
dnl AC_PROVIDE(MACRO-NAME)
|
1994-03-23 04:45:36 +08:00
|
|
|
define(AC_PROVIDE,
|
1994-09-01 12:59:32 +08:00
|
|
|
[define([AC_PROVIDE_$1], )])
|
|
|
|
|
1994-05-11 00:26:54 +08:00
|
|
|
dnl AC_OBSOLETE(THIS-MACRO-NAME [, SUGGESTION])
|
1994-09-01 12:59:32 +08:00
|
|
|
define(AC_OBSOLETE,
|
1994-03-23 04:45:36 +08:00
|
|
|
[errprint(__file__:__line__: warning: [$1] is obsolete[$2]
|
1994-09-01 12:59:32 +08:00
|
|
|
)])
|
|
|
|
|
|
|
|
|
1994-08-31 02:42:54 +08:00
|
|
|
dnl ### Checking for files (caching)
|
1994-09-01 12:59:32 +08:00
|
|
|
|
|
|
|
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl [, VALUE-IF-NOT-FOUND])
|
1994-08-13 10:19:11 +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.
|
1994-05-10 23:03:49 +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,
|
1994-05-10 23:03:49 +08:00
|
|
|
[if test -n "[$]$1"; then
|
1994-06-23 02:22:34 +08:00
|
|
|
ac_cv_prog_$1="[$]$1" # Let the user override the test.
|
1994-05-10 23:03:49 +08:00
|
|
|
else
|
|
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
1994-03-18 16:02:20 +08:00
|
|
|
for ac_dir in $PATH; do
|
|
|
|
test -z "$ac_dir" && ac_dir=.
|
|
|
|
if test -f $ac_dir/$ac_word; then
|
1994-06-23 02:22:34 +08:00
|
|
|
ac_cv_prog_$1="$3"
|
1993-10-21 07:33:19 +08:00
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
1994-03-18 16:02:20 +08:00
|
|
|
IFS="$ac_save_ifs"
|
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.
|
|
|
|
ifelse([$4], , , [ test -z "[$]ac_cv_prog_$1" && ac_cv_prog_$1="$4"
|
1994-05-10 23:03:49 +08:00
|
|
|
])dnl
|
|
|
|
fi])dnl
|
1994-06-23 02:22:34 +08:00
|
|
|
$1="$ac_cv_prog_$1"
|
1994-08-13 10:19:11 +08:00
|
|
|
if test -n "[$]$1"; then
|
|
|
|
AC_MSG_RESULT([$]$1)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
1993-10-21 07:33:19 +08:00
|
|
|
AC_SUBST($1)dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND])
|
1994-08-13 10:19:11 +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.
|
1994-05-10 23:03:49 +08:00
|
|
|
set dummy $2; ac_word=[$]2
|
1994-08-01 21:44:22 +08:00
|
|
|
AC_MSG_CHECKING([for $ac_word])
|
1994-05-05 20:47:59 +08:00
|
|
|
AC_CACHE_VAL(ac_cv_path_$1,
|
1994-05-10 23:03:49 +08:00
|
|
|
[case "[$]$1" in
|
|
|
|
/*)
|
|
|
|
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
1994-03-18 16:02:20 +08:00
|
|
|
for ac_dir in $PATH; do
|
|
|
|
test -z "$ac_dir" && ac_dir=.
|
|
|
|
if test -f $ac_dir/$ac_word; then
|
1994-05-05 20:47:59 +08:00
|
|
|
ac_cv_path_$1="$ac_dir/$ac_word"
|
1993-12-22 20:54:01 +08:00
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
1994-03-18 16:02:20 +08:00
|
|
|
IFS="$ac_save_ifs"
|
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.
|
|
|
|
ifelse([$3], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3"
|
1994-05-10 23:03:49 +08:00
|
|
|
])dnl
|
|
|
|
;;
|
|
|
|
esac])dnl
|
|
|
|
$1="$ac_cv_path_$1"
|
1994-08-13 10:19:11 +08:00
|
|
|
if test -n "[$]$1"; then
|
|
|
|
AC_MSG_RESULT([$]$1)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
1993-12-22 20:54:01 +08:00
|
|
|
AC_SUBST($1)dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND])
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_CHECK_PROGS,
|
1994-05-05 07:43:10 +08:00
|
|
|
[for ac_prog in $2
|
|
|
|
do
|
1994-08-01 21:44:22 +08:00
|
|
|
AC_CHECK_PROG($1, [$]ac_prog, [$]ac_prog, )
|
1994-05-05 07:43:10 +08:00
|
|
|
test -n "[$]$1" && break
|
|
|
|
done
|
1994-08-01 21:44:22 +08:00
|
|
|
ifelse([$3], , , [test -n "[$]$1" || $1="$3"
|
1994-09-01 12:59:32 +08:00
|
|
|
])])
|
|
|
|
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND])
|
1994-08-13 10:19:11 +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
|
1994-08-01 21:44:22 +08:00
|
|
|
AC_PATH_PROG($1, [$]ac_prog)
|
1993-12-22 20:54:01 +08:00
|
|
|
test -n "[$]$1" && break
|
|
|
|
done
|
1994-08-01 21:44:22 +08:00
|
|
|
ifelse([$3], , , [test -n "[$]$1" || $1="$3"
|
1994-09-01 12:59:32 +08:00
|
|
|
])])
|
|
|
|
|
1994-09-06 22:36:45 +08:00
|
|
|
dnl Guess the value for the `prefix' variable by looking for
|
|
|
|
dnl the argument program along PATH and taking its parent.
|
|
|
|
dnl Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
|
|
|
|
dnl set `prefix' to /usr/local/gnu.
|
|
|
|
dnl This comes too late to find a site file based on the prefix,
|
|
|
|
dnl and it might use a cached value for the path.
|
|
|
|
dnl No big loss, I think, since most configures don't use this macro anyway.
|
|
|
|
dnl AC_PREFIX_PROGRAM(PROGRAM)
|
|
|
|
AC_DEFUN(AC_PREFIX_PROGRAM,
|
|
|
|
[if test "x$prefix" = xNONE; then
|
|
|
|
changequote(<<, >>)dnl
|
|
|
|
define(<<AC_VAR_NAME>>, translit($1, [a-z], [A-Z]))dnl
|
|
|
|
changequote([, ])dnl
|
|
|
|
AC_PATH_PROG(AC_VAR_NAME, $1)
|
|
|
|
changequote(<<, >>)dnl
|
|
|
|
if test -n "$ac_cv_path_<<>>AC_VAR_NAME"; then
|
|
|
|
prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*/[^/][^/]*$%%'`
|
|
|
|
changequote([, ])dnl
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
undefine([AC_VAR_NAME])dnl
|
|
|
|
])
|
|
|
|
|
1994-08-11 07:54:30 +08:00
|
|
|
dnl AC_CHECK_LIB(LIBRARY, FUNCTION, [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl [, OTHER-LIBRARIES]]])
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_CHECK_LIB,
|
1994-08-26 09:15:45 +08:00
|
|
|
[AC_MSG_CHECKING([for -l$1])
|
|
|
|
AC_CACHE_VAL(ac_cv_lib_$1,
|
|
|
|
[ac_save_LIBS="${LIBS}"
|
|
|
|
LIBS="${LIBS} -l$1 $5"
|
|
|
|
AC_TRY_LINK(, [$2()], eval "ac_cv_lib_$1=yes", eval "ac_cv_lib_$1=no")dnl
|
|
|
|
LIBS="${ac_save_LIBS}"
|
|
|
|
])dnl
|
|
|
|
if eval "test \"`echo '$ac_cv_lib_'$1`\" = yes"; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
ifelse([$3], ,
|
|
|
|
[changequote(, )dnl
|
|
|
|
ac_tr_lib=HAVE_LIB`echo $1 | tr '[a-z]' '[A-Z]'`
|
|
|
|
changequote([, ])dnl
|
1994-08-31 02:42:54 +08:00
|
|
|
AC_DEFINE_UNQUOTED(${ac_tr_lib})
|
1994-08-26 09:15:45 +08:00
|
|
|
LIBS="${LIBS} -l$1"
|
|
|
|
], [$3])
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
ifelse([$4], , , [$4
|
|
|
|
])dnl
|
|
|
|
fi
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-26 09:15:45 +08:00
|
|
|
dnl AC_HAVE_LIBRARY(LIBRARY, [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
|
|
|
|
dnl [, OTHER-LIBRARIES]]])
|
|
|
|
AC_DEFUN(AC_HAVE_LIBRARY,
|
|
|
|
[AC_OBSOLETE([$0], [; instead use AC_CHECK_LIB])dnl
|
|
|
|
changequote(<<, >>)dnl
|
1994-08-24 14:41:01 +08:00
|
|
|
define(<<AC_LIB_NAME>>, dnl
|
|
|
|
patsubst(patsubst($1, <<lib\([^\.]*\)\.a>>, <<\1>>), <<-l>>, <<>>))dnl
|
|
|
|
define(<<AC_CV_NAME>>, ac_cv_lib_<<>>AC_LIB_NAME)dnl
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote([, ])dnl
|
|
|
|
AC_MSG_CHECKING([for -l[]AC_LIB_NAME])
|
1994-05-06 12:05:11 +08:00
|
|
|
AC_CACHE_VAL(AC_CV_NAME,
|
1994-05-05 08:33:29 +08:00
|
|
|
[ac_save_LIBS="${LIBS}"
|
1994-08-26 09:15:45 +08:00
|
|
|
LIBS="${LIBS} -l[]AC_LIB_NAME[] $4"
|
|
|
|
AC_TRY_LINK( , [main()], AC_CV_NAME=yes, AC_CV_NAME=no)dnl
|
1994-05-05 07:43:10 +08:00
|
|
|
LIBS="${ac_save_LIBS}"
|
1994-05-05 08:33:29 +08:00
|
|
|
])dnl
|
1994-08-11 00:47:42 +08:00
|
|
|
AC_MSG_RESULT($AC_CV_NAME)
|
1994-05-06 12:05:11 +08:00
|
|
|
if test "${AC_CV_NAME}" = yes; then
|
1994-08-26 09:15:45 +08:00
|
|
|
ifelse([$2], ,
|
1994-07-19 22:44:16 +08:00
|
|
|
[AC_DEFINE([HAVE_LIB]translit(AC_LIB_NAME, [a-z], [A-Z]))
|
|
|
|
LIBS="${LIBS} -l[]AC_LIB_NAME[]"
|
1994-08-26 09:15:45 +08:00
|
|
|
], [$2])
|
|
|
|
ifelse([$3], , , [else
|
|
|
|
$3
|
1994-05-05 08:33:29 +08:00
|
|
|
])dnl
|
1994-05-05 07:43:10 +08:00
|
|
|
fi
|
1994-08-24 14:41:01 +08:00
|
|
|
undefine([AC_LIB_NAME])dnl
|
|
|
|
undefine([AC_CV_NAME])dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
dnl ### Checking C system output (no caching)
|
|
|
|
|
|
|
|
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl AC_EGREP_HEADER(PATTERN, HEADER-FILE, ACTION-IF-FOUND [,
|
1994-05-11 00:26:54 +08:00
|
|
|
dnl ACTION-IF-NOT-FOUND])
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_EGREP_HEADER,
|
1994-09-01 12:59:32 +08:00
|
|
|
[AC_EGREP_CPP([$1], [#include <$2>], [$3], [$4])])
|
|
|
|
|
1994-08-13 10:19:11 +08:00
|
|
|
dnl Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
|
|
|
|
dnl come early, it is not included in AC_BEFORE checks.
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl AC_EGREP_CPP(PATTERN, PROGRAM, ACTION-IF-FOUND [,
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl ACTION-IF-NOT-FOUND])
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_EGREP_CPP,
|
1994-05-06 19:57:01 +08:00
|
|
|
[AC_REQUIRE_CPP()dnl
|
|
|
|
cat > conftest.${ac_ext} <<EOF
|
1994-08-27 15:01:13 +08:00
|
|
|
[#]line __oline__ "configure"
|
1993-10-21 07:33:19 +08:00
|
|
|
#include "confdefs.h"
|
|
|
|
[$2]
|
|
|
|
EOF
|
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.
|
|
|
|
if (eval "$ac_cpp conftest.${ac_ext}") 2>&AC_FD_CC |
|
1994-08-27 09:27:32 +08:00
|
|
|
egrep "$1" >/dev/null 2>&1; then
|
1993-10-21 07:33:19 +08:00
|
|
|
ifelse([$3], , :, [rm -rf conftest*
|
1994-05-10 09:55:50 +08:00
|
|
|
$3])
|
1993-10-21 07:33:19 +08:00
|
|
|
ifelse([$4], , , [else
|
|
|
|
rm -rf conftest*
|
|
|
|
$4
|
|
|
|
])dnl
|
|
|
|
fi
|
|
|
|
rm -f conftest*
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-05-11 00:26:54 +08:00
|
|
|
dnl AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
|
|
|
|
dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_COMPILE_CHECK,
|
1994-09-12 12:40:56 +08:00
|
|
|
[AC_OBSOLETE([$0], [; instead use AC_TRY_LINK])dnl
|
1994-08-11 00:47:42 +08:00
|
|
|
ifelse([$1], , , [AC_CHECKING([for $1])
|
1994-05-06 19:57:01 +08:00
|
|
|
])dnl
|
1994-08-01 21:44:22 +08:00
|
|
|
AC_TRY_LINK([$2], [$3], [$4], [$5])dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_TRY_LINK,
|
1994-08-26 05:55:22 +08:00
|
|
|
[cat > conftest.${ac_ext} <<EOF
|
1994-08-26 02:05:45 +08:00
|
|
|
dnl This sometimes fails to find confdefs.h, for some reason.
|
1994-08-27 15:01:13 +08:00
|
|
|
dnl [#]line __oline__ "[$]0"
|
|
|
|
[#]line __oline__ "configure"
|
1993-10-21 07:33:19 +08:00
|
|
|
#include "confdefs.h"
|
1994-08-26 05:55:22 +08:00
|
|
|
ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
|
|
|
|
extern "C" void exit(int);
|
|
|
|
#endif
|
|
|
|
])dnl
|
1994-05-06 19:18:13 +08:00
|
|
|
[$1]
|
1994-03-20 05:46:09 +08:00
|
|
|
int main() { return 0; }
|
1994-07-19 22:44:16 +08:00
|
|
|
int t() {
|
|
|
|
[$2]
|
|
|
|
; return 0; }
|
1993-10-21 07:33:19 +08:00
|
|
|
EOF
|
1994-09-12 12:40:56 +08:00
|
|
|
if eval $ac_link; then
|
1994-05-06 19:18:13 +08:00
|
|
|
ifelse([$3], , :, [rm -rf conftest*
|
1994-05-10 09:55:50 +08:00
|
|
|
$3])
|
1994-05-06 19:18:13 +08:00
|
|
|
ifelse([$4], , , [else
|
1993-10-21 07:33:19 +08:00
|
|
|
rm -rf conftest*
|
1994-05-06 19:18:13 +08:00
|
|
|
$4
|
1993-10-21 07:33:19 +08:00
|
|
|
])dnl
|
|
|
|
fi
|
|
|
|
rm -f conftest*]
|
1994-09-01 12:59:32 +08:00
|
|
|
)
|
|
|
|
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl AC_TRY_RUN(PROGRAM, ACTION-IF-TRUE [, ACTION-IF-FALSE
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl [, ACTION-IF-CROSS-COMPILING]])
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_TRY_RUN,
|
|
|
|
[AC_REQUIRE([AC_C_CROSS])dnl
|
1994-07-20 06:14:03 +08:00
|
|
|
if test "$cross_compiling" = yes; then
|
1994-09-01 12:59:32 +08:00
|
|
|
ifelse([$4], ,
|
1994-09-04 07:46:58 +08:00
|
|
|
[errprint(__file__:__line__: warning: test program without default to allow cross compiling
|
|
|
|
)dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
AC_MSG_ERROR(can not run test program while cross compiling)],
|
|
|
|
[$4])
|
1994-05-10 09:55:50 +08:00
|
|
|
else
|
1994-03-20 05:46:09 +08:00
|
|
|
cat > conftest.${ac_ext} <<EOF
|
1994-08-27 15:01:13 +08:00
|
|
|
[#]line __oline__ "configure"
|
1993-10-21 07:33:19 +08:00
|
|
|
#include "confdefs.h"
|
1994-08-26 05:55:22 +08:00
|
|
|
ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
|
|
|
|
extern "C" void exit(int);
|
|
|
|
#endif
|
|
|
|
])dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
[$1]
|
|
|
|
EOF
|
1994-09-12 12:40:56 +08:00
|
|
|
eval $ac_link
|
1993-10-21 07:33:19 +08:00
|
|
|
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
1994-05-10 09:55:50 +08:00
|
|
|
ifelse([$2], , :, [$2])
|
1993-10-21 07:33:19 +08:00
|
|
|
ifelse([$3], , , [else
|
|
|
|
$3
|
|
|
|
])dnl
|
|
|
|
fi
|
1994-05-25 09:21:21 +08:00
|
|
|
fi
|
1994-09-01 12:59:32 +08:00
|
|
|
rm -fr conftest*])
|
|
|
|
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl AC_TRY_CPP(INCLUDES, ACTION-IF-TRUE [, ACTION-IF-FALSE])
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_TRY_CPP,
|
1994-03-27 06:34:54 +08:00
|
|
|
[AC_REQUIRE_CPP()dnl
|
|
|
|
cat > conftest.${ac_ext} <<EOF
|
1994-08-27 15:01:13 +08:00
|
|
|
[#]line __oline__ "configure"
|
1993-10-21 07:33:19 +08:00
|
|
|
#include "confdefs.h"
|
|
|
|
[$1]
|
|
|
|
EOF
|
1994-09-06 04:12:21 +08:00
|
|
|
dnl Capture the stderr of cpp. eval is necessary to expand ac_cpp.
|
|
|
|
dnl We used to copy stderr to stdout and capture it in a variable, but
|
1994-09-07 23:35:40 +08:00
|
|
|
dnl that breaks under sh -x, which writes compile commands starting
|
|
|
|
dnl with ` +' to stderr in eval and subshells.
|
1994-09-06 04:12:21 +08:00
|
|
|
eval "$ac_cpp conftest.${ac_ext} >/dev/null 2>conftest.out"
|
|
|
|
ac_err=`grep -v '^ *+' conftest.out`
|
1994-03-18 16:02:20 +08:00
|
|
|
if test -z "$ac_err"; then
|
1993-10-21 07:33:19 +08:00
|
|
|
ifelse([$2], , :, [rm -rf conftest*
|
1994-05-10 09:55:50 +08:00
|
|
|
$2])
|
1994-08-27 09:27:32 +08:00
|
|
|
else
|
|
|
|
echo "$ac_err" >&AC_FD_CC
|
|
|
|
ifelse([$3], , , [ rm -rf conftest*
|
1993-10-21 07:33:19 +08:00
|
|
|
$3
|
|
|
|
])dnl
|
|
|
|
fi
|
1994-09-01 12:59:32 +08:00
|
|
|
rm -f conftest*])
|
|
|
|
|
|
|
|
|
|
|
|
dnl ### Checking for C features (caching)
|
|
|
|
|
|
|
|
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl AC_CHECK_HEADER(HEADER-FILE, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_CHECK_HEADER,
|
1994-05-06 12:05:11 +08:00
|
|
|
[dnl Do the transliteration at runtime so arg 1 can be a shell variable.
|
1994-08-25 11:45:07 +08:00
|
|
|
ac_safe=`echo "$1" | tr './' '__'`
|
1994-08-01 21:44:22 +08:00
|
|
|
AC_MSG_CHECKING([for $1])
|
1994-08-25 11:45:07 +08:00
|
|
|
AC_CACHE_VAL(ac_cv_header_$ac_safe,
|
|
|
|
[AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes",
|
|
|
|
eval "ac_cv_header_$ac_safe=no")])dnl
|
|
|
|
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
|
1994-08-11 00:47:42 +08:00
|
|
|
AC_MSG_RESULT(yes)
|
1994-05-10 09:55:50 +08:00
|
|
|
ifelse([$2], , :, [$2])
|
1994-08-11 00:47:42 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
ifelse([$3], , , [$3
|
1994-05-06 12:05:11 +08:00
|
|
|
])dnl
|
|
|
|
fi
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-09-10 04:13:30 +08:00
|
|
|
dnl AC_CHECK_HEADERS(HEADER-FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
1994-09-07 11:06:34 +08:00
|
|
|
AC_DEFUN(AC_CHECK_HEADERS,
|
|
|
|
[for ac_hdr in $1
|
|
|
|
do
|
|
|
|
AC_CHECK_HEADER(${ac_hdr},
|
|
|
|
[changequote(, )dnl
|
|
|
|
ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
|
|
|
|
changequote([, ])dnl
|
1994-09-10 04:13:30 +08:00
|
|
|
AC_DEFINE_UNQUOTED(${ac_tr_hdr}) $2], $3)dnl
|
1994-09-07 11:06:34 +08:00
|
|
|
done
|
|
|
|
])
|
|
|
|
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl AC_CHECK_FUNC(FUNCTION, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_CHECK_FUNC,
|
1994-08-01 21:44:22 +08:00
|
|
|
[AC_MSG_CHECKING([for $1])
|
1994-05-06 19:18:13 +08:00
|
|
|
AC_CACHE_VAL(ac_cv_func_$1,
|
1994-08-01 21:44:22 +08:00
|
|
|
[AC_TRY_LINK(
|
1994-06-23 02:22:34 +08:00
|
|
|
[#include <ctype.h> /* Arbitrary system header to define __stub macros. */], [
|
1993-10-21 07:33:19 +08:00
|
|
|
/* The GNU C library defines this for functions which it implements
|
|
|
|
to always fail with ENOSYS. Some functions are actually named
|
|
|
|
something starting with __ and the normal name is an alias. */
|
|
|
|
#if defined (__stub_$1) || defined (__stub___$1)
|
|
|
|
choke me
|
|
|
|
#else
|
|
|
|
/* Override any gcc2 internal prototype to avoid an error. */
|
1994-08-26 05:55:22 +08:00
|
|
|
]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
#endif
|
|
|
|
])dnl
|
|
|
|
[char $1(); $1();
|
1993-10-21 07:33:19 +08:00
|
|
|
#endif
|
1994-05-06 12:05:11 +08:00
|
|
|
], eval "ac_cv_func_$1=yes", eval "ac_cv_func_$1=no")])dnl
|
1994-05-06 12:28:17 +08:00
|
|
|
if eval "test \"`echo '$ac_cv_func_'$1`\" = yes"; then
|
1994-08-11 00:47:42 +08:00
|
|
|
AC_MSG_RESULT(yes)
|
1994-05-10 09:55:50 +08:00
|
|
|
ifelse([$2], , :, [$2])
|
1994-08-11 00:47:42 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
ifelse([$3], , , [$3
|
1994-05-06 12:05:11 +08:00
|
|
|
])dnl
|
|
|
|
fi
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-09-10 04:13:30 +08:00
|
|
|
dnl AC_CHECK_FUNCS(FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_CHECK_FUNCS,
|
1994-03-18 16:02:20 +08:00
|
|
|
[for ac_func in $1
|
1993-10-21 07:33:19 +08:00
|
|
|
do
|
1994-08-23 14:01:14 +08:00
|
|
|
AC_CHECK_FUNC(${ac_func},
|
|
|
|
[changequote(, )dnl
|
|
|
|
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote([, ])dnl
|
1994-09-10 04:13:30 +08:00
|
|
|
AC_DEFINE_UNQUOTED(${ac_tr_func}) $2], $3)dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
done
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-05-11 00:26:54 +08:00
|
|
|
dnl AC_REPLACE_FUNCS(FUNCTION-NAME...)
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_REPLACE_FUNCS,
|
1994-05-06 19:18:13 +08:00
|
|
|
[for ac_func in $1
|
|
|
|
do
|
1994-08-11 00:47:42 +08:00
|
|
|
AC_CHECK_FUNC(${ac_func}, , [LIBOBJS="$LIBOBJS ${ac_func}.o"])
|
1994-05-06 19:18:13 +08:00
|
|
|
done
|
|
|
|
AC_SUBST(LIBOBJS)dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-08-01 21:44:22 +08:00
|
|
|
dnl AC_CHECK_SIZEOF(TYPE)
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_CHECK_SIZEOF,
|
1994-08-01 21:44:22 +08:00
|
|
|
[changequote(<<, >>)dnl
|
1994-05-06 12:05:11 +08:00
|
|
|
dnl The name to #define.
|
|
|
|
define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
|
|
|
|
dnl The cache variable name.
|
|
|
|
define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote([, ])dnl
|
|
|
|
AC_MSG_CHECKING(size of $1)
|
1994-05-06 12:05:11 +08:00
|
|
|
AC_CACHE_VAL(AC_CV_NAME,
|
1994-08-01 21:44:22 +08:00
|
|
|
[AC_TRY_RUN([#include <stdio.h>
|
1994-03-23 07:28:24 +08:00
|
|
|
main()
|
|
|
|
{
|
|
|
|
FILE *f=fopen("conftestval", "w");
|
|
|
|
if (!f) exit(1);
|
|
|
|
fprintf(f, "%d\n", sizeof($1));
|
|
|
|
exit(0);
|
1994-06-23 02:22:34 +08:00
|
|
|
}], AC_CV_NAME=`cat conftestval`)])dnl
|
1994-08-11 00:47:42 +08:00
|
|
|
AC_MSG_RESULT($AC_CV_NAME)
|
1994-05-06 12:05:11 +08:00
|
|
|
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
|
1994-08-24 14:41:01 +08:00
|
|
|
undefine([AC_TYPE_NAME])dnl
|
|
|
|
undefine([AC_CV_NAME])dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
1994-07-19 22:44:16 +08:00
|
|
|
dnl AC_CHECK_TYPE(TYPE, DEFAULT)
|
1994-08-13 10:19:11 +08:00
|
|
|
AC_DEFUN(AC_CHECK_TYPE,
|
1994-08-01 21:44:22 +08:00
|
|
|
[AC_MSG_CHECKING(for $1 in sys/types.h)
|
1994-07-19 22:44:16 +08:00
|
|
|
AC_CACHE_VAL(ac_cv_type_$1,
|
1994-08-01 21:44:22 +08:00
|
|
|
[AC_EGREP_HEADER($1, sys/types.h, ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
|
1994-08-11 00:47:42 +08:00
|
|
|
AC_MSG_RESULT($ac_cv_type_$1)
|
1994-07-19 22:44:16 +08:00
|
|
|
if test $ac_cv_type_$1 = no; then
|
|
|
|
AC_DEFINE($1, $2)
|
|
|
|
fi
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|
|
|
|
|
|
|
|
|
1994-09-06 22:36:45 +08:00
|
|
|
dnl ### Controlling Autoconf output
|
|
|
|
|
1994-09-01 12:59:32 +08:00
|
|
|
|
1994-09-06 22:36:45 +08:00
|
|
|
dnl AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
|
|
|
|
AC_DEFUN(AC_CONFIG_HEADER,
|
|
|
|
[define(AC_LIST_HEADER, $1)])
|
|
|
|
|
|
|
|
dnl AC_CONFIG_SUBDIRS(DIR ...)
|
|
|
|
AC_DEFUN(AC_CONFIG_SUBDIRS,
|
|
|
|
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
|
|
|
|
define([AC_LIST_SUBDIRS], [$1])dnl
|
|
|
|
subdirs="AC_LIST_SUBDIRS"
|
|
|
|
AC_SUBST(subdirs)dnl
|
|
|
|
])
|
1994-09-01 12:59:32 +08:00
|
|
|
|
1994-09-06 22:36:45 +08:00
|
|
|
dnl The big finish.
|
1994-08-23 23:04:53 +08:00
|
|
|
dnl Produce config.status, config.h, and links, and configure subdirs.
|
1994-09-01 12:59:32 +08:00
|
|
|
dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS])
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_OUTPUT,
|
1994-05-05 06:03:07 +08:00
|
|
|
[AC_CACHE_SAVE
|
1994-05-10 09:55:50 +08:00
|
|
|
|
1994-06-23 02:22:34 +08:00
|
|
|
test "x$prefix" = xNONE && prefix=/usr/local
|
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
|
|
|
|
1994-03-18 17:35:40 +08:00
|
|
|
# Any assignment to VPATH causes Sun make to only execute
|
|
|
|
# the first set of double-colon rules, so remove it if not needed.
|
1994-03-22 21:44:36 +08:00
|
|
|
# If there is a colon in the path, we need to keep it.
|
1994-03-18 16:02:20 +08:00
|
|
|
if test "x$srcdir" = x.; then
|
1994-08-24 14:41:01 +08:00
|
|
|
changequote(, )dnl
|
1994-03-22 21:44:36 +08:00
|
|
|
ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
|
1994-08-24 14:41:01 +08:00
|
|
|
changequote([, ])dnl
|
1994-03-18 16:02:20 +08:00
|
|
|
fi
|
1994-03-18 16:18:08 +08:00
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
|
|
|
|
|
1994-08-26 02:05:45 +08:00
|
|
|
ifdef([AC_LIST_HEADER], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
|
1994-05-25 09:21:21 +08:00
|
|
|
|
1994-08-13 10:19:11 +08:00
|
|
|
# Without the "./", some shells look in PATH for config.status.
|
1994-05-25 09:21:21 +08:00
|
|
|
: ${CONFIG_STATUS=./config.status}
|
1993-10-21 07:33:19 +08:00
|
|
|
|
1994-05-25 09:21:21 +08:00
|
|
|
echo creating ${CONFIG_STATUS}
|
|
|
|
rm -f ${CONFIG_STATUS}
|
|
|
|
cat > ${CONFIG_STATUS} <<EOF
|
1993-10-21 07:33:19 +08:00
|
|
|
#!/bin/sh
|
|
|
|
# Generated automatically by configure.
|
|
|
|
# Run this file to recreate the current configuration.
|
|
|
|
# This directory was configured as follows,
|
|
|
|
dnl hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
|
|
|
|
dnl so uname gets run too.
|
|
|
|
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
|
|
|
|
#
|
1994-09-11 14:20:58 +08:00
|
|
|
[#] [$]0 [$]ac_configure_args
|
1994-08-11 00:47:42 +08:00
|
|
|
#
|
|
|
|
# Compiler output produced by configure, useful for debugging
|
|
|
|
# configure, is in ./config.log if it exists.
|
1993-10-21 07:33:19 +08:00
|
|
|
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote(, )dnl
|
1994-05-25 09:21:21 +08:00
|
|
|
ac_cs_usage="Usage: ${CONFIG_STATUS} [--recheck] [--version] [--help]"
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote([, ])dnl
|
1994-03-24 11:41:48 +08:00
|
|
|
for ac_option
|
1993-10-21 07:33:19 +08:00
|
|
|
do
|
1994-03-24 11:41:48 +08:00
|
|
|
case "[\$]ac_option" in
|
|
|
|
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
|
1994-09-11 14:20:58 +08:00
|
|
|
echo "running [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion"
|
|
|
|
exec [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion ;;
|
1994-03-24 11:41:48 +08:00
|
|
|
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|
1994-05-25 09:21:21 +08:00
|
|
|
echo "${CONFIG_STATUS} generated by autoconf version AC_ACVERSION"
|
1994-03-24 11:41:48 +08:00
|
|
|
exit 0 ;;
|
|
|
|
-help | --help | --hel | --he | --h)
|
|
|
|
echo "[\$]ac_cs_usage"; exit 0 ;;
|
|
|
|
*) echo "[\$]ac_cs_usage"; exit 1 ;;
|
1993-10-21 07:33:19 +08:00
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
ac_given_srcdir=$srcdir
|
1994-08-26 02:05:45 +08:00
|
|
|
ifdef([AC_PROVIDE_AC_PROG_INSTALL], [ac_given_INSTALL="$INSTALL"
|
|
|
|
])dnl
|
1994-08-24 14:41:01 +08:00
|
|
|
|
1994-08-26 02:05:45 +08:00
|
|
|
ifdef([AC_LIST_HEADER],
|
|
|
|
[trap 'rm -fr $1 AC_LIST_HEADER conftest*; exit 1' 1 2 15],
|
1994-03-18 16:02:20 +08:00
|
|
|
[trap 'rm -f $1; exit 1' 1 2 15])
|
1993-10-21 07:33:19 +08:00
|
|
|
|
1994-08-23 23:04:53 +08:00
|
|
|
AC_OUTPUT_FILES($1)
|
1994-08-26 02:05:45 +08:00
|
|
|
ifdef([AC_LIST_HEADER], [AC_OUTPUT_HEADER(AC_LIST_HEADER)])dnl
|
1994-08-23 23:04:53 +08:00
|
|
|
ifdef([AC_LIST_LINKS], [AC_OUTPUT_LINKS(AC_LIST_LINKS, AC_LIST_FILES)])dnl
|
1994-09-01 12:59:32 +08:00
|
|
|
ifelse([$3], , ,
|
|
|
|
[EOF
|
|
|
|
cat >> ${CONFIG_STATUS} <<EOF
|
|
|
|
$3
|
|
|
|
EOF
|
|
|
|
cat >> ${CONFIG_STATUS} <<\EOF])
|
1994-08-23 23:04:53 +08:00
|
|
|
$2
|
1994-09-01 12:59:32 +08:00
|
|
|
exit 0
|
1994-08-23 23:04:53 +08:00
|
|
|
EOF
|
|
|
|
chmod +x ${CONFIG_STATUS}
|
1994-09-06 04:12:21 +08:00
|
|
|
rm -fr confdefs* $ac_clean_files
|
1994-08-23 23:04:53 +08:00
|
|
|
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} ${CONFIG_STATUS}
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl config.status should not do recursion.
|
1994-08-23 23:04:53 +08:00
|
|
|
ifdef([AC_LIST_SUBDIRS], [AC_OUTPUT_SUBDIRS(AC_LIST_SUBDIRS)])dnl
|
|
|
|
])dnl
|
1994-09-06 04:12:21 +08:00
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl This is a subroutine of AC_OUTPUT.
|
1994-09-06 04:12:21 +08:00
|
|
|
dnl It is called inside configure, outside of config.status.
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl AC_OUTPUT_MAKE_DEFS()
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_OUTPUT_MAKE_DEFS,
|
1994-08-24 14:41:01 +08:00
|
|
|
[# Transform confdefs.h into DEFS.
|
|
|
|
dnl Using a here document instead of a string reduces the quoting nightmare.
|
1994-09-07 14:21:38 +08:00
|
|
|
# Protect against shell expansion while executing Makefile rules.
|
|
|
|
# Protect against Makefile macro expansion.
|
1994-08-24 14:41:01 +08:00
|
|
|
cat > conftest.defs <<\EOF
|
|
|
|
changequote(<<, >>)dnl
|
|
|
|
s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
|
|
|
|
s%[ `~<<#>>$^&*(){}\\|;'"<>?]%\\&%g
|
|
|
|
s%\[%\\&%g
|
|
|
|
s%\]%\\&%g
|
|
|
|
s%\$%$$%g
|
|
|
|
changequote([, ])dnl
|
|
|
|
EOF
|
|
|
|
DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
|
|
|
|
rm -f conftest.defs
|
1994-09-06 04:12:21 +08:00
|
|
|
])
|
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl This is a subroutine of AC_OUTPUT. It is called inside an unquoted
|
1994-08-23 23:04:53 +08:00
|
|
|
dnl here document whose contents are going into config.status.
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl AC_OUTPUT_FILES(FILE...)
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_OUTPUT_FILES,
|
1994-08-26 02:05:45 +08:00
|
|
|
[# Protect against being on the right side of a sed subst in config.status.
|
|
|
|
changequote(, )dnl
|
|
|
|
sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
|
|
|
|
s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
|
|
|
|
changequote([, ])dnl
|
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.
|
|
|
|
$ac_vpsub
|
|
|
|
dnl Shell code in configure.in might set extrasub.
|
|
|
|
$extrasub
|
|
|
|
dnl Insert the sed substitutions of variables.
|
|
|
|
undivert(AC_DIVERSION_SED)
|
|
|
|
CEOF
|
|
|
|
EOF
|
1994-09-04 07:46:58 +08:00
|
|
|
cat >> ${CONFIG_STATUS} <<EOF
|
1994-08-24 14:41:01 +08:00
|
|
|
|
1994-09-04 07:46:58 +08:00
|
|
|
CONFIG_FILES=\${CONFIG_FILES-"$1"}
|
|
|
|
EOF
|
|
|
|
cat >> ${CONFIG_STATUS} <<\EOF
|
1994-03-18 16:02:20 +08:00
|
|
|
for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
|
1994-08-10 02:35:50 +08:00
|
|
|
# Support "outfile[:infile]", defaulting infile="outfile.in".
|
|
|
|
case "$ac_file" in
|
|
|
|
*:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
|
|
|
|
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
|
|
|
*) ac_file_in="${ac_file}.in" ;;
|
|
|
|
esac
|
|
|
|
|
1994-08-23 23:04:53 +08:00
|
|
|
# Adjust relative srcdir, etc. for subdirectories.
|
|
|
|
|
1993-10-21 07:33:19 +08:00
|
|
|
# Remove last slash and all that follows it. Not all systems have dirname.
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote(, )dnl
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote([, ])dnl
|
1994-05-18 03:26:10 +08:00
|
|
|
if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
|
1994-03-10 14:29:54 +08:00
|
|
|
# The file is in a subdirectory.
|
1994-03-18 16:02:20 +08:00
|
|
|
test ! -d "$ac_dir" && mkdir "$ac_dir"
|
|
|
|
ac_dir_suffix="/$ac_dir"
|
1994-08-09 21:44:55 +08:00
|
|
|
# A "../" for each directory in $ac_dir_suffix.
|
|
|
|
changequote(, )dnl
|
|
|
|
ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
|
|
|
|
changequote([, ])dnl
|
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
|
|
|
|
1994-04-06 00:45:41 +08:00
|
|
|
case "$ac_given_srcdir" in
|
1994-05-08 10:30:39 +08:00
|
|
|
.) srcdir=.
|
1994-08-09 21:44:55 +08:00
|
|
|
if test -z "$ac_dots"; then top_srcdir=.
|
1994-05-08 10:30:39 +08:00
|
|
|
else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
|
1994-04-06 00:45:41 +08:00
|
|
|
/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
|
|
|
|
*) # Relative path.
|
|
|
|
srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
|
|
|
|
top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
1994-03-10 14:29:54 +08:00
|
|
|
esac
|
|
|
|
|
1994-08-23 14:01:14 +08:00
|
|
|
ifdef([AC_PROVIDE_AC_PROG_INSTALL],
|
|
|
|
[ case "$ac_given_INSTALL" in
|
1994-08-09 21:44:55 +08:00
|
|
|
changequote(, )dnl
|
|
|
|
[/$]*) INSTALL="$ac_given_INSTALL" ;;
|
|
|
|
changequote([, ])dnl
|
|
|
|
*) INSTALL="$ac_dots$ac_given_INSTALL" ;;
|
|
|
|
esac
|
1994-08-23 14:01:14 +08:00
|
|
|
])dnl
|
1994-03-18 16:02:20 +08:00
|
|
|
echo creating "$ac_file"
|
|
|
|
rm -f "$ac_file"
|
1994-08-23 23:04:53 +08:00
|
|
|
comment_str="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
|
1994-03-18 16:02:20 +08:00
|
|
|
case "$ac_file" in
|
1994-08-23 14:01:14 +08:00
|
|
|
*.c | *.h | *.C | *.cc | *.cpp | *.hpp | *.m )
|
(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_comsub="1i\\
|
|
|
|
/* $comment_str */" ;;
|
|
|
|
* ) # Add the comment on the second line of scripts, first line of others.
|
|
|
|
ac_comsub="
|
|
|
|
1{
|
|
|
|
s/^#!/&/
|
|
|
|
t script
|
|
|
|
i\\
|
|
|
|
# $comment_str
|
|
|
|
b done
|
|
|
|
: script
|
|
|
|
a\\
|
|
|
|
# $comment_str
|
|
|
|
: done
|
|
|
|
}
|
|
|
|
" ;;
|
1993-11-10 22:25:29 +08:00
|
|
|
esac
|
1994-08-24 14:41:01 +08:00
|
|
|
sed -e "$ac_comsub
|
|
|
|
s%@srcdir@%$srcdir%g
|
|
|
|
s%@top_srcdir@%$top_srcdir%g
|
|
|
|
ifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%g
|
1994-08-23 14:01:14 +08:00
|
|
|
])dnl
|
1994-08-24 14:41:01 +08:00
|
|
|
" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
|
1993-10-21 07:33:19 +08:00
|
|
|
fi; done
|
1994-08-24 14:41:01 +08:00
|
|
|
rm -f conftest.subs
|
1994-09-06 04:12:21 +08:00
|
|
|
])
|
|
|
|
|
1994-05-05 06:03:07 +08:00
|
|
|
dnl This is a subroutine of AC_OUTPUT. It is called inside a quoted
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl here document whose contents are going into config.status.
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl AC_OUTPUT_HEADER(HEADER-FILE...)
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_OUTPUT_HEADER,
|
1994-08-01 21:44:22 +08:00
|
|
|
[changequote(<<, >>)dnl
|
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.
|
1994-08-24 14:41:01 +08:00
|
|
|
ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
|
|
|
|
ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
|
1994-03-18 16:18:08 +08:00
|
|
|
ac_dC='\3'
|
1994-08-24 14:41:01 +08:00
|
|
|
ac_dD='%g'
|
1994-03-18 16:18:08 +08:00
|
|
|
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
|
1994-08-24 14:41:01 +08:00
|
|
|
ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
|
|
|
|
ac_uB='\([ ]\)%\1#\2define\3'
|
1994-03-18 16:18:08 +08:00
|
|
|
ac_uC=' '
|
1994-08-24 14:41:01 +08:00
|
|
|
ac_uD='\4%g'
|
1994-03-18 16:18:08 +08:00
|
|
|
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
|
1994-08-24 14:41:01 +08:00
|
|
|
ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
|
|
|
|
ac_eB='<<$>>%\1#\2define\3'
|
1994-03-18 16:18:08 +08:00
|
|
|
ac_eC=' '
|
1994-08-24 14:41:01 +08:00
|
|
|
ac_eD='%g'
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote([, ])dnl
|
1994-08-24 14:41:01 +08:00
|
|
|
|
|
|
|
CONFIG_HEADERS=${CONFIG_HEADERS-"$1"}
|
|
|
|
for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
|
|
|
|
# Support "outfile[:infile]", defaulting infile="outfile.in".
|
|
|
|
case "$ac_file" in
|
|
|
|
*:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
|
|
|
|
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
|
|
|
*) ac_file_in="${ac_file}.in" ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
echo creating $ac_file
|
|
|
|
|
|
|
|
rm -f conftest.frag conftest.in conftest.out
|
|
|
|
cp $ac_given_srcdir/$ac_file_in conftest.in
|
|
|
|
|
1993-10-21 07:33:19 +08:00
|
|
|
EOF
|
1994-08-24 14:41:01 +08:00
|
|
|
|
|
|
|
# Transform confdefs.h into a sed script conftest.vals that substitutes
|
1994-08-28 08:24:09 +08:00
|
|
|
# the proper values into config.h.in to produce config.h. 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.
|
1994-08-24 14:41:01 +08:00
|
|
|
rm -f conftest.vals
|
|
|
|
dnl Using a here document instead of a string reduces the quoting nightmare.
|
1994-08-28 08:24:09 +08:00
|
|
|
dnl Putting comments in sed scripts is not portable.
|
1994-08-24 14:41:01 +08:00
|
|
|
cat > conftest.hdr <<\EOF
|
|
|
|
changequote(<<, >>)dnl
|
|
|
|
s/[\\&%]/\\&/g
|
|
|
|
s%[\\$`]%\\&%g
|
|
|
|
s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
|
|
|
|
s%ac_d%ac_u%gp
|
|
|
|
s%ac_u%ac_e%gp
|
|
|
|
changequote([, ])dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
EOF
|
1994-08-24 14:41:01 +08:00
|
|
|
sed -n -f conftest.hdr confdefs.h > conftest.vals
|
|
|
|
rm -f conftest.hdr
|
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.
|
|
|
|
cat >> conftest.vals <<\EOF
|
|
|
|
changequote(, )dnl
|
|
|
|
s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
|
|
|
|
changequote([, ])dnl
|
|
|
|
EOF
|
1993-10-21 07:33:19 +08:00
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
# Break up conftest.vals because some shells have a limit on
|
|
|
|
# the size of here documents, and old seds have small limits too.
|
1993-10-21 07:33:19 +08:00
|
|
|
# Maximum number of lines to put in a single here document.
|
1994-08-24 14:41:01 +08:00
|
|
|
ac_max_here_lines=12
|
1993-10-21 07:33:19 +08:00
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
rm -f conftest.tail
|
1993-10-21 07:33:19 +08:00
|
|
|
while :
|
|
|
|
do
|
1994-08-24 14:41:01 +08:00
|
|
|
ac_lines=`grep -c . conftest.vals`
|
|
|
|
# grep -c gives empty output for an empty file on some AIX systems.
|
1994-03-18 16:02:20 +08:00
|
|
|
if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
|
1994-08-24 14:41:01 +08:00
|
|
|
# Write a limited-size here document to conftest.frag.
|
|
|
|
echo ' cat > conftest.frag <<CEOF' >> ${CONFIG_STATUS}
|
|
|
|
sed ${ac_max_here_lines}q conftest.vals >> ${CONFIG_STATUS}
|
|
|
|
echo 'CEOF
|
|
|
|
sed -f conftest.frag conftest.in > conftest.out
|
1994-08-27 06:27:25 +08:00
|
|
|
rm -f conftest.in
|
1994-08-24 14:41:01 +08:00
|
|
|
mv conftest.out conftest.in
|
|
|
|
' >> ${CONFIG_STATUS}
|
|
|
|
sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
|
1994-08-27 06:27:25 +08:00
|
|
|
rm -f conftest.vals
|
1994-08-24 14:41:01 +08:00
|
|
|
mv conftest.tail conftest.vals
|
1993-10-21 07:33:19 +08:00
|
|
|
done
|
1994-08-24 14:41:01 +08:00
|
|
|
rm -f conftest.vals
|
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.
|
1994-05-25 09:21:21 +08:00
|
|
|
cat >> ${CONFIG_STATUS} <<\EOF
|
1994-08-24 14:41:01 +08:00
|
|
|
rm -f conftest.frag conftest.h
|
1994-03-18 16:02:20 +08:00
|
|
|
echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
|
1994-08-24 14:41:01 +08:00
|
|
|
cat conftest.in >> conftest.h
|
|
|
|
rm -f conftest.in
|
1994-03-18 16:02:20 +08:00
|
|
|
if cmp -s $ac_file conftest.h 2>/dev/null; then
|
|
|
|
echo "$ac_file is unchanged"
|
1994-02-05 06:17:05 +08:00
|
|
|
rm -f conftest.h
|
|
|
|
else
|
1994-03-18 16:02:20 +08:00
|
|
|
rm -f $ac_file
|
|
|
|
mv conftest.h $ac_file
|
1994-02-05 06:17:05 +08:00
|
|
|
fi
|
1993-10-21 07:33:19 +08:00
|
|
|
fi; done
|
|
|
|
|
1994-09-06 04:12:21 +08:00
|
|
|
])
|
|
|
|
|
1994-08-29 06:40:40 +08:00
|
|
|
dnl This is a subroutine of AC_OUTPUT. It is called inside a quoted
|
|
|
|
dnl here document whose contents are going into config.status.
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl AC_OUTPUT_LINKS(DEST..., SOURCE...)
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_OUTPUT_LINKS,
|
1994-08-29 06:40:40 +08:00
|
|
|
[EOF
|
|
|
|
|
|
|
|
cat >> ${CONFIG_STATUS} <<EOF
|
1994-09-06 04:12:21 +08:00
|
|
|
ac_dests="$1"
|
|
|
|
ac_sources="$2"
|
1994-08-29 06:40:40 +08:00
|
|
|
EOF
|
|
|
|
|
|
|
|
cat >> ${CONFIG_STATUS} <<\EOF
|
1994-09-06 04:12:21 +08:00
|
|
|
srcdir=$ac_given_srcdir
|
|
|
|
while test -n "${ac_sources}"; do
|
|
|
|
set ${ac_dests}; ac_dest=[$]1; shift; ac_dests=[$]*
|
|
|
|
set ${ac_sources}; ac_source=[$]1; shift; ac_sources=[$]*
|
(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-06 04:12:21 +08:00
|
|
|
echo "linking ${ac_dest} to ${srcdir}/${ac_source}"
|
(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-06 04:12:21 +08:00
|
|
|
if test ! -r ${srcdir}/${ac_source}; then
|
|
|
|
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-06 04:12:21 +08:00
|
|
|
rm -f ${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
|
|
|
# Make a symlink if possible; otherwise try a hard link.
|
1994-09-06 04:12:21 +08:00
|
|
|
if ln -s ${srcdir}/${ac_source} ${ac_dest} 2>/dev/null ||
|
|
|
|
ln ${srcdir}/${ac_source} ${ac_dest}; then :
|
(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
|
|
|
else
|
1994-09-06 04:12:21 +08:00
|
|
|
AC_MSG_ERROR(can not link ${ac_dest} to ${srcdir}/${ac_source})
|
(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
|
1994-09-06 04:12:21 +08:00
|
|
|
])
|
|
|
|
|
1994-08-24 14:41:01 +08:00
|
|
|
dnl AC_OUTPUT_SUBDIRS(DIRECTORY...)
|
1994-09-06 22:36:45 +08:00
|
|
|
define(AC_OUTPUT_SUBDIRS,
|
1994-08-26 02:05:45 +08:00
|
|
|
[
|
1994-09-06 04:12:21 +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
|
|
|
|
case "$ac_arg" in
|
|
|
|
-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=*)
|
|
|
|
;;
|
1994-07-19 22:44:16 +08:00
|
|
|
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
|
|
|
|
ac_prev=srcdir ;;
|
|
|
|
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
|
|
|
|
;;
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote(, )dnl
|
1994-07-19 22:44:16 +08:00
|
|
|
*[" "]*) ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;;
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote([, ])dnl
|
1994-05-06 13:02:43 +08:00
|
|
|
*) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
1994-05-05 06:03:07 +08:00
|
|
|
for ac_config_dir in $1; do
|
|
|
|
|
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.
|
|
|
|
if test ! -d ${srcdir}/${ac_config_dir}; then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
|
1994-08-26 02:05:45 +08:00
|
|
|
echo configuring in ${ac_config_dir}
|
1994-05-05 06:03:07 +08:00
|
|
|
|
|
|
|
case "${srcdir}" in
|
|
|
|
.) ;;
|
|
|
|
*)
|
|
|
|
if test -d ./${ac_config_dir} || mkdir ./${ac_config_dir}; then :;
|
|
|
|
else
|
1994-08-01 21:44:22 +08:00
|
|
|
AC_MSG_ERROR(can not create `pwd`/${ac_config_dir})
|
1994-05-05 06:03:07 +08:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
ac_popdir=`pwd`
|
|
|
|
cd ${ac_config_dir}
|
|
|
|
|
|
|
|
case "${srcdir}" in
|
1994-05-18 03:26:10 +08:00
|
|
|
.) # No --srcdir option. We are building in place.
|
1994-05-05 06:03:07 +08:00
|
|
|
ac_sub_srcdir=${srcdir} ;;
|
|
|
|
/*) # Absolute path.
|
|
|
|
ac_sub_srcdir=${srcdir}/${ac_config_dir} ;;
|
|
|
|
*) # Relative path.
|
|
|
|
ac_sub_srcdir=../${srcdir}/${ac_config_dir} ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Check for guested configure; otherwise get Cygnus style configure.
|
|
|
|
if test -f ${ac_sub_srcdir}/configure; then
|
|
|
|
ac_sub_configure=${ac_sub_srcdir}/configure
|
|
|
|
elif test -f ${ac_sub_srcdir}/configure.in; then
|
|
|
|
ac_sub_configure=${ac_configure}
|
|
|
|
else
|
1994-08-01 21:44:22 +08:00
|
|
|
AC_MSG_WARN(no configuration information is in ${ac_config_dir})
|
1994-05-05 06:03:07 +08:00
|
|
|
ac_sub_configure=
|
|
|
|
fi
|
|
|
|
|
1994-08-23 23:04:53 +08:00
|
|
|
# The recursion is here.
|
|
|
|
if test -n "${ac_sub_configure}"; then
|
|
|
|
|
|
|
|
# Make the cache file name correct relative to the subdirectory.
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote(, )dnl
|
1994-08-23 23:04:53 +08:00
|
|
|
# A "../" for each directory in /${ac_config_dir}.
|
|
|
|
ac_dots=`echo /${ac_config_dir}|sed 's%/[^/]*%../%g'`
|
1994-08-01 21:44:22 +08:00
|
|
|
changequote([, ])dnl
|
1994-08-23 23:04:53 +08:00
|
|
|
case "$cache_file" in
|
|
|
|
/*) ac_sub_cache_file=$cache_file ;;
|
|
|
|
*) # Relative path.
|
|
|
|
ac_sub_cache_file="$ac_dots$cache_file" ;;
|
|
|
|
esac
|
1994-05-06 13:02:43 +08:00
|
|
|
|
1994-08-11 00:47:42 +08:00
|
|
|
echo "[running ${CONFIG_SHELL-/bin/sh} ${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.
|
|
|
|
if eval ${CONFIG_SHELL-/bin/sh} ${ac_sub_configure} ${ac_sub_configure_args} --cache-file=$ac_sub_cache_file --srcdir=${ac_sub_srcdir}
|
1994-05-05 06:03:07 +08:00
|
|
|
then :
|
|
|
|
else
|
1994-08-01 21:44:22 +08:00
|
|
|
AC_MSG_ERROR(${ac_sub_configure} failed for ${ac_config_dir})
|
1994-05-05 06:03:07 +08:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd ${ac_popdir}
|
|
|
|
done
|
|
|
|
fi
|
1994-09-01 12:59:32 +08:00
|
|
|
])
|