1993-10-21 07:33:19 +08:00
|
|
|
dnl Parameterized macros that do not check for something specific.
|
|
|
|
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
|
|
|
|
changequote([,])dnl
|
|
|
|
undefine([eval])dnl
|
|
|
|
undefine([include])dnl
|
|
|
|
undefine([shift])dnl
|
|
|
|
undefine([format])dnl
|
|
|
|
dnl
|
|
|
|
ifdef([__gnu__], , [errprint(Autoconf requires GNU m4
|
1994-03-25 02:36:13 +08:00
|
|
|
)m4exit(2)])dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl
|
|
|
|
dnl
|
|
|
|
dnl Utility functions for stamping the configure script.
|
|
|
|
dnl
|
|
|
|
dnl
|
1994-04-10 05:34:23 +08:00
|
|
|
define(AC_ACVERSION, 1.8)dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl This is defined by the --version option of the autoconf script.
|
|
|
|
ifdef([AC_PRINT_VERSION], [errprint(Autoconf version AC_ACVERSION
|
|
|
|
)])dnl
|
|
|
|
dnl
|
|
|
|
dnl These are currently not used, for the sake of people who diff
|
|
|
|
dnl configure scripts and don't want spurious differences.
|
|
|
|
dnl But they are too clever to just delete.
|
|
|
|
dnl
|
|
|
|
define(AC_USER, [esyscmd(
|
|
|
|
changequote({,})dnl
|
|
|
|
# Extract the user name from the first pair of parentheses.
|
1994-03-18 16:02:20 +08:00
|
|
|
({ac_sedcmd='s/[^(]*(\([^)]*\)).*/\1/';}
|
1993-10-21 07:33:19 +08:00
|
|
|
changequote([,])dnl
|
1994-03-18 16:02:20 +08:00
|
|
|
whoami || id|sed "$ac_sedcmd") 2>/dev/null|tr -d '\012')])dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl
|
|
|
|
define(AC_HOST, [esyscmd((hostname || uname -n) 2>/dev/null|tr -d '\012')])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_DATE, [esyscmd(date|tr -d '\012')])dnl
|
|
|
|
dnl
|
|
|
|
dnl
|
|
|
|
dnl Controlling Autoconf operation
|
|
|
|
dnl
|
|
|
|
dnl
|
|
|
|
dnl This is separate from AC_INIT to prevent GNU m4 1.0 from coredumping
|
|
|
|
dnl when AC_CONFIG_HEADER is used.
|
|
|
|
define(AC_NOTICE,
|
|
|
|
[# Guess values for system-dependent variables and create Makefiles.
|
1993-11-09 05:22:42 +08:00
|
|
|
dnl [#] Generated automatically using autoconf.
|
1993-11-10 22:25:29 +08:00
|
|
|
# Generated automatically using autoconf version] AC_ACVERSION [
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl [#] by AC_USER@AC_HOST on AC_DATE
|
1994-03-18 17:35:40 +08:00
|
|
|
# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
|
1993-10-21 07:33:19 +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.
|
|
|
|
|
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.
|
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.
|
|
|
|
])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_PARSEARGS,
|
1994-03-27 13:44:01 +08:00
|
|
|
[# Save the original args to write them into config.status later.
|
1994-04-15 19:00:32 +08:00
|
|
|
configure_args="[$]*"
|
1994-03-27 13:44:01 +08:00
|
|
|
|
1994-03-26 14:32:34 +08:00
|
|
|
# Only options that might do something get documented.
|
1994-03-27 13:44:01 +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-04-09 01:26:34 +08:00
|
|
|
--build=BUILD configure for building on BUILD [BUILD=HOST]
|
1994-03-31 09:02:47 +08:00
|
|
|
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
|
1994-03-31 21:22:23 +08:00
|
|
|
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
|
1994-03-26 14:32:34 +08:00
|
|
|
--exec-prefix=PREFIX install host dependent files in PREFIX [/usr/local]
|
|
|
|
--help print this message
|
1994-04-09 01:26:34 +08:00
|
|
|
--host=HOST configure for HOST [guessed]
|
1994-03-26 14:32:34 +08:00
|
|
|
--prefix=PREFIX install host independent files in PREFIX [/usr/local]
|
|
|
|
--quiet, --silent do not print \`checking for...' messages
|
1994-03-27 13:44:01 +08:00
|
|
|
--srcdir=DIR find the sources in DIR [configure dir or ..]
|
1994-04-09 01:26:34 +08:00
|
|
|
--target=TARGET configure for TARGET [TARGET=HOST]
|
1994-03-24 11:41:48 +08:00
|
|
|
--verbose print results of checks
|
1994-03-26 14:32:34 +08:00
|
|
|
--version print the version of autoconf that created configure
|
1994-03-31 21:22:23 +08:00
|
|
|
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
1994-04-09 01:26:34 +08:00
|
|
|
--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"
|
1993-10-21 07:33:19 +08:00
|
|
|
changequote([,])dnl
|
|
|
|
|
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-03-27 13:44:01 +08:00
|
|
|
exec_prefix=
|
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-04-10 05:34:23 +08:00
|
|
|
norecursion=
|
1994-03-27 13:44:01 +08:00
|
|
|
prefix=
|
|
|
|
program_prefix=
|
|
|
|
program_suffix=
|
1994-03-29 07:48:26 +08:00
|
|
|
program_transform_name=
|
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-04-09 01:26:34 +08:00
|
|
|
x_includes=
|
|
|
|
x_libraries=
|
1994-03-27 13:44:01 +08:00
|
|
|
|
1994-03-29 07:48:26 +08:00
|
|
|
ac_prev=
|
|
|
|
for ac_option
|
1994-03-24 11:41:48 +08:00
|
|
|
do
|
1994-03-29 07:48:26 +08:00
|
|
|
|
|
|
|
# If the previous option needs an argument, assign it.
|
|
|
|
if test -n "$ac_prev"; then
|
|
|
|
eval "$ac_prev=\$ac_option"
|
|
|
|
ac_prev=
|
|
|
|
continue
|
|
|
|
fi
|
1994-03-26 14:32:34 +08:00
|
|
|
|
1994-04-10 05:34:23 +08:00
|
|
|
# Accept (but ignore some of) the important Cygnus configure
|
1994-03-31 09:02:47 +08:00
|
|
|
# options, so we can diagnose typos.
|
1993-10-21 07:33:19 +08:00
|
|
|
|
1994-03-24 11:41:48 +08:00
|
|
|
case "$ac_option" in
|
1994-03-29 07:48:26 +08:00
|
|
|
changequote(,)dnl
|
1994-03-31 09:02:47 +08:00
|
|
|
-*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
1994-03-29 07:48:26 +08:00
|
|
|
changequote([,])dnl
|
|
|
|
*) ac_optarg= ;;
|
|
|
|
esac
|
1994-03-26 14:32:34 +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-03-31 09:02:47 +08:00
|
|
|
-disable-* | --disable-*)
|
|
|
|
ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
|
|
|
|
# Reject names that aren't valid shell variable names.
|
|
|
|
changequote(,)dnl
|
|
|
|
if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
|
|
|
|
changequote([,])dnl
|
|
|
|
AC_ERROR($ac_feature: invalid feature name)
|
|
|
|
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/=.*//'`
|
|
|
|
# Reject names that aren't valid shell variable names.
|
1993-10-21 07:33:19 +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
|
1993-10-21 07:33:19 +08:00
|
|
|
changequote([,])dnl
|
1994-03-26 14:32:34 +08:00
|
|
|
AC_ERROR($ac_feature: invalid feature name)
|
|
|
|
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
|
|
|
|
|
|
|
# For backward compatibility, recognize -exec-prefix and --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- \
|
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)
|
|
|
|
with_gas=1 ;; # Obsolete; use --with-gas.
|
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)
|
|
|
|
with_fp=no ;; # Obsolete; use --without-fp.
|
|
|
|
|
|
|
|
-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-03-26 14:32:34 +08:00
|
|
|
-norecursion | --norecursion | --norecursio | --norecursi \
|
1994-04-05 09:29:04 +08:00
|
|
|
| --norecurs | --norecur | --norecu | --norec | --nore | --nor)
|
1994-04-10 05:34:23 +08:00
|
|
|
norecursion=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-03-24 11:41:48 +08:00
|
|
|
# Reject names that aren't valid shell variable names.
|
1993-10-21 07:33:19 +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
|
1993-10-21 07:33:19 +08:00
|
|
|
changequote([,])dnl
|
1994-03-24 11:41:48 +08:00
|
|
|
AC_ERROR($ac_package: invalid package name)
|
|
|
|
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-//'`
|
|
|
|
# Reject names that aren't valid shell variable names.
|
|
|
|
changequote(,)dnl
|
|
|
|
if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
|
|
|
|
changequote([,])dnl
|
|
|
|
AC_ERROR($ac_package: invalid package name)
|
|
|
|
fi
|
|
|
|
ac_package=`echo $ac_package| sed 's/-/_/g'`
|
|
|
|
eval "with_${ac_package}=no" ;;
|
1993-10-21 07:33:19 +08:00
|
|
|
|
1994-03-27 09:44:38 +08:00
|
|
|
--x) with_x=1 ;; # Obsolete; use --with-x.
|
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-04-10 06:07:23 +08:00
|
|
|
-*) AC_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
|
|
|
*)
|
|
|
|
changequote(,)dnl
|
|
|
|
if test -n "`echo $ac_option| sed 's/[-a-z0-9]//g'`"; then
|
|
|
|
changequote([,])dnl
|
1994-03-26 14:32:34 +08:00
|
|
|
AC_WARN($ac_option: invalid host type)
|
1994-03-24 11:41:48 +08:00
|
|
|
fi
|
1994-03-29 08:40:23 +08:00
|
|
|
if test "x$nonopt" -ne xNONE; then
|
1994-03-29 08:43:48 +08:00
|
|
|
AC_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
|
|
|
|
AC_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`)
|
|
|
|
fi
|
1993-10-21 07:33:19 +08:00
|
|
|
])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_INIT,
|
|
|
|
[#!/bin/sh
|
|
|
|
AC_NOTICE
|
|
|
|
AC_PARSEARGS
|
1994-04-17 03:05:27 +08:00
|
|
|
AC_PREPARE($1)])dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl
|
|
|
|
define(AC_PREPARE,
|
1994-03-18 16:02:20 +08:00
|
|
|
[trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
|
1994-03-20 05:46:09 +08:00
|
|
|
trap 'rm -fr confdefs* $ac_clean_files' 0
|
1993-10-21 07:33:19 +08:00
|
|
|
|
1994-03-27 13:44:01 +08:00
|
|
|
# Save the original args if we used an alternate arg parser.
|
1994-04-15 19:00:32 +08:00
|
|
|
ac_configure_temp="${configure_args-[$]*}"
|
1994-04-05 09:29:04 +08:00
|
|
|
# Strip out --no-create and --norecursion so they don't pile up.
|
1994-04-15 19:00:32 +08:00
|
|
|
configure_args=
|
1994-04-05 09:29:04 +08:00
|
|
|
for ac_arg in $ac_configure_temp; do
|
|
|
|
case "$ac_arg" in
|
|
|
|
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
|
|
|
|
| --no-cr | --no-c) ;;
|
|
|
|
-norecursion | --norecursion | --norecursio | --norecursi \
|
|
|
|
| --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;;
|
1994-04-15 19:00:32 +08:00
|
|
|
*) configure_args="$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.
|
|
|
|
# These must not be set unconditionally because not all systems understand
|
|
|
|
# e.g. LANG=C (notably SCO).
|
1994-03-26 14:32:34 +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
|
1993-10-21 07:33:19 +08:00
|
|
|
# Try the directory containing this script, then `..'.
|
1994-03-27 13:44:01 +08:00
|
|
|
ac_prog=[$]0
|
1993-10-21 07:33:19 +08:00
|
|
|
changequote(,)dnl
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
|
1993-10-21 07:33:19 +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
|
|
|
|
fi
|
1994-03-18 16:02:20 +08:00
|
|
|
if test ! -r $srcdir/$ac_unique_file; then
|
|
|
|
if test x$ac_srcdir_defaulted = xyes; then
|
1994-03-26 14:32:34 +08:00
|
|
|
AC_ERROR(can not find sources in ${ac_confdir} or ..)
|
1993-10-21 07:33:19 +08:00
|
|
|
else
|
1994-03-26 14:32:34 +08:00
|
|
|
AC_ERROR(can not find sources in ${srcdir})
|
1993-10-21 07:33:19 +08:00
|
|
|
fi
|
|
|
|
fi
|
1994-04-17 03:05:27 +08:00
|
|
|
AC_LANG_C
|
1993-10-21 07:33:19 +08:00
|
|
|
])dnl
|
|
|
|
dnl
|
1994-03-26 14:32:34 +08:00
|
|
|
define(AC_ENABLE,
|
|
|
|
[[#] check whether --enable-$1 was given
|
|
|
|
enableval="[$enable_]patsubst($1,-,_)"
|
|
|
|
if test -n "$enableval"; then
|
|
|
|
ifelse([$2], , :, [$2])
|
|
|
|
ifelse([$3], , , [else
|
|
|
|
$3
|
|
|
|
])dnl
|
|
|
|
fi
|
|
|
|
])dnl
|
|
|
|
dnl
|
1994-03-29 07:48:26 +08:00
|
|
|
dnl Giving --with an argument is deprecated.
|
1993-10-21 07:33:19 +08:00
|
|
|
define(AC_WITH,
|
1994-03-29 07:48:26 +08:00
|
|
|
[[#] check whether --with-$1 or --without-$1 was given.
|
1993-10-21 07:33:19 +08:00
|
|
|
withval="[$with_]patsubst($1,-,_)"
|
|
|
|
if test -n "$withval"; then
|
|
|
|
ifelse([$2], , :, [$2])
|
|
|
|
ifelse([$3], , , [else
|
|
|
|
$3
|
|
|
|
])dnl
|
|
|
|
fi
|
|
|
|
])dnl
|
|
|
|
dnl
|
|
|
|
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.
|
|
|
|
define(AC_PREFIX,
|
|
|
|
[if test -z "$prefix"
|
|
|
|
then
|
1994-03-27 09:44:38 +08:00
|
|
|
AC_CHECKING([for $1 to derive installation directory prefix])
|
1994-03-18 16:02:20 +08:00
|
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$IFS:"
|
|
|
|
for ac_dir in $PATH; do
|
|
|
|
test -z "$ac_dir" && ac_dir=.
|
|
|
|
if test $ac_dir != . && test -f $ac_dir/$1; then
|
1993-10-21 07:33:19 +08:00
|
|
|
changequote(,)dnl
|
|
|
|
# Not all systems have dirname.
|
1994-03-18 16:02:20 +08:00
|
|
|
prefix=`echo $ac_dir|sed 's%/[^/][^/]*$%%'`
|
1993-10-21 07:33:19 +08:00
|
|
|
changequote([,])dnl
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
1994-03-18 16:02:20 +08:00
|
|
|
IFS="$ac_save_ifs"
|
1994-03-23 04:45:36 +08:00
|
|
|
AC_VERBOSE(chose installation directory prefix ${prefix})
|
1993-10-21 07:33:19 +08:00
|
|
|
fi
|
|
|
|
])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_CONFIG_HEADER, [define(AC_CONFIG_NAMES, $1)])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_DOREV, [#!/bin/sh
|
|
|
|
# From configure.in $1
|
|
|
|
])dnl
|
|
|
|
define(AC_REVISION, [AC_DOREV(translit($1,$"))])dnl
|
|
|
|
dnl
|
1994-03-25 02:36:13 +08:00
|
|
|
dnl Subroutines of AC_PREREQ.
|
|
|
|
dnl
|
|
|
|
dnl Change the dots in version number $1 into commas.
|
|
|
|
define(AC_PREREQ_SPLIT, [translit($1,.,[,])])dnl
|
|
|
|
dnl
|
|
|
|
dnl Default the ternary version number to 0 (e.g., 1,7 -> 1,7,0).
|
|
|
|
define(AC_PREREQ_CANON, [$1,$2,ifelse([$3],,0,[$3])])dnl
|
|
|
|
dnl
|
|
|
|
dnl Complain and exit if the version number in $1 through $3 is less than
|
|
|
|
dnl the version number in $4 through $6.
|
|
|
|
dnl $7 is the printable version of the second version number.
|
|
|
|
define(AC_PREREQ_COMPARE,
|
|
|
|
[ifelse(builtin([eval],
|
|
|
|
[$3 + $2 * 100 + $1 * 10000 < $6 + $5 * 100 + $4 * 10000]),1,
|
|
|
|
[errprint(Autoconf version $7 or higher is required
|
|
|
|
)m4exit(3)])])dnl
|
|
|
|
dnl
|
1994-03-25 02:54:06 +08:00
|
|
|
dnl Complain and exit if the Autoconf version is less than $1.
|
1994-03-25 02:36:13 +08:00
|
|
|
define(AC_PREREQ,
|
|
|
|
[AC_PREREQ_COMPARE(AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)),
|
|
|
|
AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])),[$1])])dnl
|
|
|
|
dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl
|
1994-03-23 04:45:36 +08:00
|
|
|
dnl Setting variables
|
|
|
|
dnl
|
|
|
|
dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl Several simple subroutines to do various flavors of quoting.
|
|
|
|
dnl
|
|
|
|
dnl Quote $1 against shell "s.
|
|
|
|
define(AC_QUOTE_DQUOTE, [dnl We use \1 instead of \& to avoid an m4 1.0.3 bug.
|
|
|
|
patsubst($1, changequote(,)\([$"`\\]\)changequote([,]), \\\1)])dnl
|
|
|
|
dnl
|
|
|
|
dnl Quote $1 against shell 's.
|
|
|
|
define(AC_QUOTE_SQUOTE, [patsubst($1, ', '\\'')])dnl
|
|
|
|
dnl
|
|
|
|
dnl Quote $1 against shell here documents (<<EOF).
|
|
|
|
define(AC_QUOTE_HERE, [changequote({,})dnl
|
|
|
|
dnl We use \1 instead of \& to avoid an m4 1.0.3 bug.
|
|
|
|
patsubst(patsubst($1, \(\\[$`\\]\), \\\1), \([$`]\), \\\1){}dnl
|
|
|
|
changequote([,])])dnl
|
|
|
|
dnl
|
|
|
|
dnl Quote $1 against the right hand side of a sed substitution.
|
|
|
|
define(AC_QUOTE_SED, [changequote({,})dnl
|
|
|
|
dnl We use \1 instead of \& to avoid an m4 1.0.3 bug.
|
1993-12-09 01:09:40 +08:00
|
|
|
dnl % and @ and ! are commonly used as the sed s separator character.
|
|
|
|
patsubst($1, \([&\\%@!]\), \\\1){}dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
changequote([,])])dnl
|
|
|
|
dnl
|
|
|
|
dnl Quote $1 against tokenization.
|
|
|
|
define(AC_QUOTE_TOKEN, [changequote({,})dnl
|
|
|
|
patsubst($1, \([ ]\), \\\1){}dnl
|
|
|
|
changequote([,])])dnl
|
|
|
|
dnl
|
|
|
|
dnl Subroutines of AC_DEFINE. Does more quoting magic than any sane person
|
|
|
|
dnl should be able to understand. The point of it all is that what goes into
|
|
|
|
dnl Makefile et al should be verbatim what was written in configure.in.
|
|
|
|
define(AC_DEFINE_QUOTE, [dnl
|
|
|
|
AC_QUOTE_TOKEN(AC_QUOTE_SQUOTE(AC_QUOTE_DQUOTE($1)))])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_DEFINE_SEDQUOTE, [dnl
|
|
|
|
AC_QUOTE_DQUOTE(AC_QUOTE_HERE(AC_QUOTE_HERE(AC_QUOTE_SED($1))))])dnl
|
|
|
|
dnl
|
|
|
|
dnl Don't compare $2 to a blank, so we can support "-Dfoo=".
|
|
|
|
dnl If creating a configuration header file, we add
|
1994-03-18 16:18:08 +08:00
|
|
|
dnl commands to ac_sed_defs to define the variable. ac_[due][ABCD]
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl get defined in config.status. Here we just insert the
|
|
|
|
dnl variable parts of the string: the variable name to define
|
|
|
|
dnl and the value to give it.
|
|
|
|
dnl The newlines around the curly braces prevent sh syntax errors.
|
|
|
|
define(AC_DEFINE,[
|
|
|
|
{
|
|
|
|
dnl Uniformly use AC_DEFINE_[SED]QUOTE, so callers of AC_DEFINE_UNQUOTED
|
|
|
|
dnl can use AC_QUOTE_* manually if they want to.
|
1994-04-10 05:34:23 +08:00
|
|
|
test -n "$verbose" && \
|
1993-10-21 07:33:19 +08:00
|
|
|
ifelse($#, 2,
|
|
|
|
[define([AC_VAL], $2)dnl
|
1994-01-07 05:29:02 +08:00
|
|
|
echo " defining" $1 to be ifelse(AC_VAL,, empty, "AC_QUOTE_SQUOTE(AC_VAL)")],
|
1993-10-21 07:33:19 +08:00
|
|
|
[define([AC_VAL], 1)dnl
|
|
|
|
echo " defining $1"])
|
|
|
|
dnl
|
1994-01-07 05:29:02 +08:00
|
|
|
echo "[#][define]" $1 "AC_QUOTE_SQUOTE(AC_VAL)" >> confdefs.h
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl Define DEFS even if AC_CONFIG_NAMES for use in user case statements.
|
1994-01-07 05:29:02 +08:00
|
|
|
DEFS="$DEFS -D$1=AC_QUOTE_SQUOTE(AC_VAL)"
|
1993-10-21 07:33:19 +08:00
|
|
|
ifdef([AC_CONFIG_NAMES],
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_sed_defs="dnl
|
1994-03-18 16:18:08 +08:00
|
|
|
${ac_sed_defs}\${ac_dA}$1\${ac_dB}$1\${ac_dC}AC_DEFINE_SEDQUOTE(AC_VAL)\${ac_dD}
|
|
|
|
\${ac_uA}$1\${ac_uB}$1\${ac_uC}AC_DEFINE_SEDQUOTE(AC_VAL)\${ac_uD}
|
|
|
|
\${ac_eA}$1\${ac_eB}$1\${ac_eC}AC_DEFINE_SEDQUOTE(AC_VAL)\${ac_eD}
|
1993-10-21 07:33:19 +08:00
|
|
|
"
|
|
|
|
)dnl
|
|
|
|
}
|
|
|
|
])dnl
|
|
|
|
dnl
|
|
|
|
dnl Unsafe version of AC_DEFINE.
|
|
|
|
dnl Users are responsible for the quoting nightmare.
|
|
|
|
dnl Well, not all of it. We need to pull the identify function out to
|
|
|
|
dnl the top level, because m4 doesn't really support nested functions;
|
|
|
|
dnl it doesn't distinguish between the arguments to the outer
|
|
|
|
dnl function, which should be expanded, and the arguments to the inner
|
|
|
|
dnl function, which shouldn't yet.
|
|
|
|
define(AC_IDENTITY,$1)dnl
|
|
|
|
define(AC_DEFINE_UNQUOTED,[dnl
|
1994-01-07 05:29:02 +08:00
|
|
|
pushdef([AC_QUOTE_SQUOTE],defn([AC_IDENTITY]))dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
pushdef([AC_DEFINE_SEDQUOTE],defn([AC_IDENTITY]))dnl
|
|
|
|
AC_DEFINE($1,$2)dnl
|
|
|
|
popdef([AC_DEFINE_SEDQUOTE])dnl
|
1994-01-07 05:29:02 +08:00
|
|
|
popdef([AC_QUOTE_SQUOTE])dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
])dnl
|
|
|
|
dnl
|
1994-03-23 04:45:36 +08:00
|
|
|
dnl Protects the argument from being diverted twice
|
|
|
|
dnl if this macro is called twice for it.
|
|
|
|
dnl Diversion 0 is the normal output.
|
|
|
|
dnl Diversion 1 is sed substitutions for output files.
|
|
|
|
dnl Diversion 2 is variable assignments for config.status.
|
|
|
|
define(AC_SUBST,
|
|
|
|
[ifdef([AC_SUBST_$1], ,
|
|
|
|
[define([AC_SUBST_$1], )dnl
|
|
|
|
divert(1)dnl
|
|
|
|
s%@$1@%[$]$1%g
|
|
|
|
divert(2)dnl
|
|
|
|
$1='[$]$1'
|
|
|
|
divert(0)dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
])])dnl
|
|
|
|
dnl
|
|
|
|
dnl
|
1994-03-23 04:45:36 +08:00
|
|
|
dnl Printing messages
|
|
|
|
dnl
|
|
|
|
dnl
|
|
|
|
define(AC_CHECKING,
|
1994-04-10 05:34:23 +08:00
|
|
|
[test -n "$silent" || echo "checking $1"])dnl
|
1994-03-23 04:45:36 +08:00
|
|
|
dnl
|
|
|
|
define(AC_VERBOSE,
|
1994-04-10 05:34:23 +08:00
|
|
|
[test -n "$verbose" && echo " $1"])dnl
|
1994-03-23 04:45:36 +08:00
|
|
|
dnl
|
|
|
|
define(AC_WARN,
|
|
|
|
[echo "configure: warning: $1" >&2])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_ERROR,
|
|
|
|
[echo "configure: $1" >&2; exit 1])dnl
|
|
|
|
dnl
|
|
|
|
dnl
|
|
|
|
dnl Selecting which language to use for testing
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl
|
1994-03-20 05:46:09 +08:00
|
|
|
dnl
|
|
|
|
define(AC_LANG_C,
|
|
|
|
[define([AC_LANG],[C])AC_PROVIDE([$0])ac_ext=c
|
1994-03-23 04:45:36 +08:00
|
|
|
ac_cpp='${CPP} $CFLAGS'
|
1994-03-20 05:46:09 +08:00
|
|
|
ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
|
|
|
|
])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_LANG_CPLUSPLUS,
|
|
|
|
[define([AC_LANG],[CPLUSPLUS])AC_PROVIDE([$0])ac_ext=C
|
1994-03-23 04:45:36 +08:00
|
|
|
ac_cpp='${CXXCPP} $CXXFLAGS'
|
1994-03-20 05:46:09 +08:00
|
|
|
ac_compile='${CXX-gcc} $CXXFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
|
|
|
|
])dnl
|
|
|
|
dnl
|
|
|
|
dnl Push the current language on a stack.
|
|
|
|
define(AC_LANG_SAVE, [pushdef([AC_LANG_STACK], AC_LANG)])dnl
|
|
|
|
dnl
|
|
|
|
dnl Restore the current language from the stack.
|
|
|
|
define(AC_LANG_RESTORE,
|
1994-03-20 08:39:50 +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])])dnl
|
1994-03-20 05:46:09 +08:00
|
|
|
dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl
|
1994-03-23 04:45:36 +08:00
|
|
|
dnl Enforcing ordering constraints
|
|
|
|
dnl
|
|
|
|
dnl
|
|
|
|
define(AC_BEFORE,
|
|
|
|
[ifdef([AC_PROVIDE_$2], [errprint(__file__:__line__: [$2 was called before $1
|
|
|
|
])])])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_REQUIRE,
|
|
|
|
[ifdef([AC_PROVIDE_$1],,[indir([$1])
|
|
|
|
])])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_PROVIDE,
|
|
|
|
[define([AC_PROVIDE_$1],)])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_OBSOLETE,
|
|
|
|
[errprint(__file__:__line__: warning: [$1] is obsolete[$2]
|
|
|
|
)])dnl
|
|
|
|
dnl
|
|
|
|
dnl
|
|
|
|
dnl Checking for kinds of features
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl
|
|
|
|
dnl
|
|
|
|
define(AC_PROGRAM_CHECK,
|
|
|
|
[if test -z "[$]$1"; then
|
|
|
|
# Extract the first word of `$2', so it can be a program name with args.
|
1994-03-18 16:02:20 +08:00
|
|
|
set ac_dummy $2; ac_word=[$]2
|
1994-03-27 09:44:38 +08:00
|
|
|
AC_CHECKING([for $ac_word])
|
1994-03-18 16:02:20 +08:00
|
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
|
|
|
for ac_dir in $PATH; do
|
|
|
|
test -z "$ac_dir" && ac_dir=.
|
|
|
|
if test -f $ac_dir/$ac_word; then
|
1993-10-21 07:33:19 +08:00
|
|
|
$1="$3"
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
1994-03-18 16:02:20 +08:00
|
|
|
IFS="$ac_save_ifs"
|
1993-10-21 07:33:19 +08:00
|
|
|
fi
|
|
|
|
ifelse([$4],,, [test -z "[$]$1" && $1="$4"])
|
1994-03-23 04:45:36 +08:00
|
|
|
test -n "[$]$1" && AC_VERBOSE(setting $1 to [$]$1)
|
1993-10-21 07:33:19 +08:00
|
|
|
AC_SUBST($1)dnl
|
|
|
|
])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_PROGRAMS_CHECK,
|
1994-03-18 16:02:20 +08:00
|
|
|
[for ac_prog in $2
|
1993-10-21 07:33:19 +08:00
|
|
|
do
|
1994-03-18 16:02:20 +08:00
|
|
|
AC_PROGRAM_CHECK($1, [$]ac_prog, [$]ac_prog, )
|
1993-10-21 07:33:19 +08:00
|
|
|
test -n "[$]$1" && break
|
|
|
|
done
|
|
|
|
ifelse([$3],,, [test -n "[$]$1" || $1="$3"
|
|
|
|
])])dnl
|
|
|
|
dnl
|
1993-12-22 20:54:01 +08:00
|
|
|
define(AC_PROGRAM_PATH,
|
|
|
|
[if test -z "[$]$1"; then
|
|
|
|
# Extract the first word of `$2', so it can be a program name with args.
|
1994-03-18 16:02:20 +08:00
|
|
|
set ac_dummy $2; ac_word=[$]2
|
1994-03-27 09:44:38 +08:00
|
|
|
AC_CHECKING([for $ac_word])
|
1994-03-18 16:02:20 +08:00
|
|
|
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
|
|
|
for ac_dir in $PATH; do
|
|
|
|
test -z "$ac_dir" && ac_dir=.
|
|
|
|
if test -f $ac_dir/$ac_word; then
|
|
|
|
$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"
|
1993-12-22 20:54:01 +08:00
|
|
|
fi
|
|
|
|
ifelse([$3],,, [test -z "[$]$1" && $1="$3"])
|
1994-03-23 04:45:36 +08:00
|
|
|
test -n "[$]$1" && AC_VERBOSE(setting $1 to [$]$1)
|
1993-12-22 20:54:01 +08:00
|
|
|
AC_SUBST($1)dnl
|
|
|
|
])dnl
|
|
|
|
define(AC_PROGRAMS_PATH,
|
1994-03-18 16:02:20 +08:00
|
|
|
[for ac_prog in $2
|
1993-12-22 20:54:01 +08:00
|
|
|
do
|
1994-03-18 16:02:20 +08:00
|
|
|
AC_PROGRAM_PATH($1, [$]ac_prog)
|
1993-12-22 20:54:01 +08:00
|
|
|
test -n "[$]$1" && break
|
|
|
|
done
|
|
|
|
ifelse([$3],,, [test -n "[$]$1" || $1="$3"
|
|
|
|
])])dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
define(AC_HEADER_EGREP,
|
1994-03-20 05:46:09 +08:00
|
|
|
[AC_REQUIRE_CPP()AC_PROVIDE([$0])echo '#include "confdefs.h"
|
|
|
|
#include <$2>' > conftest.${ac_ext}
|
|
|
|
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
|
1993-10-21 07:33:19 +08:00
|
|
|
if egrep "$1" conftest.out >/dev/null 2>&1; then
|
|
|
|
ifelse([$3], , :, [rm -rf conftest*
|
|
|
|
$3
|
|
|
|
])
|
|
|
|
ifelse([$4], , , [else
|
|
|
|
rm -rf conftest*
|
|
|
|
$4
|
|
|
|
])dnl
|
|
|
|
fi
|
|
|
|
rm -f conftest*
|
|
|
|
])dnl
|
|
|
|
dnl
|
|
|
|
dnl Because this macro is used by AC_GCC_TRADITIONAL, which must come early,
|
|
|
|
dnl it is not included in AC_BEFORE checks.
|
|
|
|
define(AC_PROGRAM_EGREP,
|
1994-03-20 05:46:09 +08:00
|
|
|
[AC_REQUIRE_CPP()AC_PROVIDE([$0])cat > conftest.${ac_ext} <<EOF
|
1993-10-21 07:33:19 +08:00
|
|
|
#include "confdefs.h"
|
|
|
|
[$2]
|
|
|
|
EOF
|
1994-03-20 05:46:09 +08:00
|
|
|
eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
|
1993-10-21 07:33:19 +08:00
|
|
|
if egrep "$1" conftest.out >/dev/null 2>&1; then
|
|
|
|
ifelse([$3], , :, [rm -rf conftest*
|
|
|
|
$3
|
|
|
|
])
|
|
|
|
ifelse([$4], , , [else
|
|
|
|
rm -rf conftest*
|
|
|
|
$4
|
|
|
|
])dnl
|
|
|
|
fi
|
|
|
|
rm -f conftest*
|
|
|
|
])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_HEADER_CHECK,
|
1994-03-27 09:44:38 +08:00
|
|
|
[AC_CHECKING([for $1])
|
1993-10-21 07:33:19 +08:00
|
|
|
ifelse([$3], , [AC_TEST_CPP([#include <$1>], [$2])],
|
|
|
|
[AC_TEST_CPP([#include <$1>], [$2], [$3])])
|
|
|
|
])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_COMPILE_CHECK,
|
|
|
|
[AC_PROVIDE([$0])dnl
|
1994-03-27 09:44:38 +08:00
|
|
|
ifelse([$1], , , [AC_CHECKING([for $1])]
|
1993-10-21 07:33:19 +08:00
|
|
|
)dnl
|
1994-03-20 05:46:09 +08:00
|
|
|
dnl We use return because because C++ requires a prototype for exit.
|
|
|
|
cat > conftest.${ac_ext} <<EOF
|
1993-10-21 07:33:19 +08:00
|
|
|
#include "confdefs.h"
|
|
|
|
[$2]
|
1994-03-20 05:46:09 +08:00
|
|
|
int main() { return 0; }
|
1994-03-29 07:48:26 +08:00
|
|
|
int t() { [$3]; return 0; }
|
1993-10-21 07:33:19 +08:00
|
|
|
EOF
|
|
|
|
dnl Don't try to run the program, which would prevent cross-configuring.
|
1994-03-20 05:46:09 +08:00
|
|
|
if eval $ac_compile; then
|
1993-10-21 07:33:19 +08:00
|
|
|
ifelse([$4], , :, [rm -rf conftest*
|
|
|
|
$4
|
|
|
|
])
|
|
|
|
ifelse([$5], , , [else
|
|
|
|
rm -rf conftest*
|
|
|
|
$5
|
|
|
|
])dnl
|
|
|
|
fi
|
|
|
|
rm -f conftest*]
|
|
|
|
)dnl
|
|
|
|
dnl
|
|
|
|
define(AC_TEST_PROGRAM,
|
|
|
|
[AC_PROVIDE([$0])ifelse([$4], , , [AC_REQUIRE([AC_CROSS_CHECK])if test -n "$cross_compiling"
|
|
|
|
then
|
|
|
|
$4
|
|
|
|
else
|
|
|
|
])dnl
|
1994-03-20 05:46:09 +08:00
|
|
|
cat > conftest.${ac_ext} <<EOF
|
1993-10-21 07:33:19 +08:00
|
|
|
#include "confdefs.h"
|
|
|
|
[$1]
|
|
|
|
EOF
|
1994-03-20 05:46:09 +08:00
|
|
|
eval $ac_compile
|
1993-10-21 07:33:19 +08:00
|
|
|
if test -s conftest && (./conftest; exit) 2>/dev/null; then
|
|
|
|
ifelse([$2], , :, [$2
|
|
|
|
])
|
|
|
|
ifelse([$3], , , [else
|
|
|
|
$3
|
|
|
|
])dnl
|
|
|
|
fi
|
|
|
|
ifelse([$4], , , fi
|
|
|
|
)dnl
|
|
|
|
rm -fr conftest*])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_TEST_CPP,
|
1994-03-27 06:34:54 +08:00
|
|
|
[AC_REQUIRE_CPP()dnl
|
|
|
|
cat > conftest.${ac_ext} <<EOF
|
1993-10-21 07:33:19 +08:00
|
|
|
#include "confdefs.h"
|
|
|
|
[$1]
|
|
|
|
EOF
|
1994-04-14 05:26:32 +08:00
|
|
|
# Some shells (Coherent) do redirections in the wrong order, so need
|
|
|
|
# the parens.
|
1994-03-20 05:46:09 +08:00
|
|
|
ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
|
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*
|
|
|
|
$2
|
|
|
|
])
|
|
|
|
ifelse([$3], , , [else
|
|
|
|
rm -rf conftest*
|
|
|
|
$3
|
|
|
|
])dnl
|
|
|
|
fi
|
|
|
|
rm -f conftest*])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_REPLACE_FUNCS,
|
1994-03-18 16:02:20 +08:00
|
|
|
[for ac_func in $1
|
1993-10-21 07:33:19 +08:00
|
|
|
do
|
1994-03-18 16:02:20 +08:00
|
|
|
AC_COMPILE_CHECK([${ac_func}], [#include <ctype.h>], [
|
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. */
|
1994-03-18 16:02:20 +08:00
|
|
|
#if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
|
1993-10-21 07:33:19 +08:00
|
|
|
choke me
|
|
|
|
#else
|
|
|
|
/* Override any gcc2 internal prototype to avoid an error. */
|
1994-03-18 16:02:20 +08:00
|
|
|
extern char ${ac_func}(); ${ac_func}();
|
1993-10-21 07:33:19 +08:00
|
|
|
#endif
|
1994-03-18 16:02:20 +08:00
|
|
|
], , [LIBOBJS="$LIBOBJS ${ac_func}.o"
|
1994-03-23 04:45:36 +08:00
|
|
|
AC_VERBOSE(using ${ac_func}.o instead)])
|
1993-10-21 07:33:19 +08:00
|
|
|
done
|
|
|
|
AC_SUBST(LIBOBJS)dnl
|
|
|
|
])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_FUNC_CHECK,
|
|
|
|
[ifelse([$3], , [AC_COMPILE_CHECK($1, [#include <ctype.h>], [
|
|
|
|
/* 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. */
|
|
|
|
extern char $1(); $1();
|
|
|
|
#endif
|
|
|
|
],
|
|
|
|
$2)], [AC_COMPILE_CHECK($1, [#include <ctype.h>], [
|
|
|
|
/* 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. */
|
|
|
|
extern char $1(); $1();
|
|
|
|
#endif
|
|
|
|
],
|
|
|
|
$2, $3)])dnl
|
|
|
|
])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_HAVE_FUNCS,
|
1994-03-18 16:02:20 +08:00
|
|
|
[for ac_func in $1
|
1993-10-21 07:33:19 +08:00
|
|
|
do
|
|
|
|
changequote(,)dnl
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
|
1993-10-21 07:33:19 +08:00
|
|
|
changequote([,])dnl
|
1994-03-18 16:02:20 +08:00
|
|
|
AC_FUNC_CHECK(${ac_func},
|
|
|
|
AC_DEFINE(${ac_tr_func}))dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
done
|
|
|
|
])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_HAVE_HEADERS,
|
1994-03-27 06:34:54 +08:00
|
|
|
[AC_REQUIRE_CPP()dnl Make sure the cpp check happens outside the loop.
|
|
|
|
for ac_hdr in $1
|
1993-10-21 07:33:19 +08:00
|
|
|
do
|
|
|
|
changequote(,)dnl
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
|
1993-10-21 07:33:19 +08:00
|
|
|
changequote([,])dnl
|
1994-03-18 16:02:20 +08:00
|
|
|
AC_HEADER_CHECK(${ac_hdr},
|
|
|
|
AC_DEFINE(${ac_tr_hdr}))dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
done
|
|
|
|
])dnl
|
|
|
|
dnl
|
|
|
|
define(AC_HAVE_LIBRARY, [dnl
|
|
|
|
changequote(/,/)dnl
|
|
|
|
define(/libname/, dnl
|
|
|
|
patsubst(patsubst($1, /lib\([^\.]*\)\.a/, /\1/), /-l/, //))dnl
|
|
|
|
changequote([,])dnl
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_save_LIBS="${LIBS}"
|
1993-10-21 07:33:19 +08:00
|
|
|
LIBS="${LIBS} -l[]libname[]"
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_have_lib=""
|
|
|
|
AC_COMPILE_CHECK([-l[]libname[]], , [main();], [ac_have_lib="1"])dnl
|
|
|
|
LIBS="${ac_save_LIBS}"
|
1993-10-21 07:33:19 +08:00
|
|
|
ifelse($#, 1, [dnl
|
1994-03-18 16:02:20 +08:00
|
|
|
if test -n "${ac_have_lib}"; then
|
1993-10-21 07:33:19 +08:00
|
|
|
AC_DEFINE([HAVE_LIB]translit(libname, [a-z], [A-Z]))
|
|
|
|
LIBS="${LIBS} -l[]libname[]"
|
|
|
|
fi
|
|
|
|
undefine(libname)dnl
|
|
|
|
], [dnl
|
1994-03-18 16:02:20 +08:00
|
|
|
if test -n "${ac_have_lib}"; then
|
1993-10-21 07:33:19 +08:00
|
|
|
:; $2
|
|
|
|
else
|
|
|
|
:; $3
|
|
|
|
fi
|
|
|
|
])])dnl
|
|
|
|
dnl
|
1994-03-23 07:28:24 +08:00
|
|
|
define(AC_SIZEOF_TYPE,
|
|
|
|
[AC_CHECKING(size of $1)
|
|
|
|
$2=0
|
|
|
|
AC_TEST_PROGRAM([#include <stdio.h>
|
|
|
|
main()
|
|
|
|
{
|
|
|
|
FILE *f=fopen("conftestval", "w");
|
|
|
|
if (!f) exit(1);
|
|
|
|
fprintf(f, "%d\n", sizeof($1));
|
|
|
|
exit(0);
|
|
|
|
}], $2=`cat conftestval`)])dnl
|
|
|
|
dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl
|
|
|
|
dnl The big finish
|
|
|
|
dnl
|
|
|
|
dnl
|
|
|
|
define(AC_OUTPUT,
|
|
|
|
[changequote(,)dnl
|
|
|
|
# Set default prefixes.
|
1994-03-26 14:32:34 +08:00
|
|
|
if test -n "$prefix"; then
|
|
|
|
test -z "$exec_prefix" && exec_prefix='${prefix}' # Let make expand it.
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%"
|
1993-10-21 07:33:19 +08:00
|
|
|
fi
|
|
|
|
if test -n "$exec_prefix"; then
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_prsub="$ac_prsub
|
1993-10-21 07:33:19 +08:00
|
|
|
s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
|
|
|
|
fi
|
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-03-22 21:44:36 +08:00
|
|
|
ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
|
1994-03-18 16:02:20 +08:00
|
|
|
fi
|
1994-03-18 16:18:08 +08:00
|
|
|
|
1993-10-21 07:33:19 +08:00
|
|
|
# Quote sed substitution magic chars in DEFS.
|
|
|
|
cat >conftest.def <<EOF
|
|
|
|
$DEFS
|
|
|
|
EOF
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
|
|
|
|
DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
|
1993-10-21 07:33:19 +08:00
|
|
|
rm -f conftest.def
|
|
|
|
# Substitute for predefined variables.
|
|
|
|
changequote([,])dnl
|
|
|
|
AC_SUBST(LIBS)dnl
|
|
|
|
AC_SUBST(srcdir)dnl
|
1994-04-06 00:45:41 +08:00
|
|
|
AC_SUBST(top_srcdir)dnl
|
1994-03-26 14:32:34 +08:00
|
|
|
AC_SUBST(prefix)dnl
|
|
|
|
AC_SUBST(exec_prefix)dnl
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl Substituting for DEFS would confuse sed if it contains multiple lines.
|
|
|
|
ifdef([AC_CONFIG_NAMES],
|
|
|
|
[divert(1)dnl
|
|
|
|
s%@DEFS@%-DHAVE_CONFIG_H%],
|
|
|
|
[divert(1)dnl
|
|
|
|
s%@DEFS@%$DEFS%]
|
|
|
|
[divert(2)dnl
|
|
|
|
DEFS='$DEFS'
|
|
|
|
])dnl
|
|
|
|
divert(2)dnl
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_prsub='$ac_prsub'
|
|
|
|
ac_vpsub='$ac_vpsub'
|
1993-10-21 07:33:19 +08:00
|
|
|
extrasub='$extrasub'
|
|
|
|
divert(0)dnl
|
|
|
|
|
1994-03-18 16:02:20 +08:00
|
|
|
trap 'rm -f config.status; exit 1' 1 2 15
|
1993-10-21 07:33:19 +08:00
|
|
|
echo creating config.status
|
|
|
|
rm -f config.status
|
|
|
|
cat > config.status <<EOF
|
|
|
|
#!/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-04-15 19:00:32 +08:00
|
|
|
[#] [$]0 [$]configure_args
|
1993-10-21 07:33:19 +08:00
|
|
|
|
1994-03-24 11:41:48 +08:00
|
|
|
changequote(,)dnl
|
|
|
|
ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
|
|
|
|
changequote([,])dnl
|
|
|
|
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-04-15 19:00:32 +08:00
|
|
|
echo running [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]configure_args --no-create
|
|
|
|
exec [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]configure_args --no-create ;;
|
1994-03-24 11:41:48 +08:00
|
|
|
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|
|
|
|
echo "config.status generated by autoconf version AC_ACVERSION"
|
|
|
|
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
|
|
|
|
|
|
|
|
ifdef([AC_CONFIG_NAMES],
|
1994-03-18 16:02:20 +08:00
|
|
|
[trap 'rm -fr $1 AC_CONFIG_NAMES conftest*; exit 1' 1 2 15],
|
|
|
|
[trap 'rm -f $1; exit 1' 1 2 15])
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl Insert the variable assignments.
|
|
|
|
undivert(2)dnl
|
|
|
|
EOF
|
|
|
|
cat >> config.status <<\EOF
|
|
|
|
|
1994-04-06 00:45:41 +08:00
|
|
|
ac_given_srcdir=$srcdir
|
1993-10-21 07:33:19 +08:00
|
|
|
|
|
|
|
CONFIG_FILES=${CONFIG_FILES-"$1"}
|
1994-03-18 16:02:20 +08:00
|
|
|
for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
|
1993-10-21 07:33:19 +08:00
|
|
|
# Remove last slash and all that follows it. Not all systems have dirname.
|
|
|
|
changequote(,)dnl
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
|
1993-10-21 07:33:19 +08:00
|
|
|
changequote([,])dnl
|
1994-03-18 16:02:20 +08:00
|
|
|
if test "$ac_dir" != "$ac_file"; 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-03-10 14:29:54 +08:00
|
|
|
else
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_dir_suffix=
|
1993-10-21 07:33:19 +08:00
|
|
|
fi
|
1994-03-10 14:29:54 +08:00
|
|
|
|
|
|
|
changequote(,)dnl
|
1994-04-06 00:45:41 +08:00
|
|
|
# A "../" for each directory in $ac_dir_suffix.
|
|
|
|
ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
|
1994-03-10 14:29:54 +08:00
|
|
|
changequote([,])dnl
|
1994-04-06 00:45:41 +08:00
|
|
|
case "$ac_given_srcdir" in
|
|
|
|
.) srcdir=.; top_srcdir="$ac_dots." ;;
|
|
|
|
/*) 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-03-18 16:02:20 +08:00
|
|
|
echo creating "$ac_file"
|
|
|
|
rm -f "$ac_file"
|
|
|
|
comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure."
|
|
|
|
case "$ac_file" in
|
|
|
|
*.c | *.h | *.C | *.cc | *.m ) echo "/* $comment_str */" > "$ac_file" ;;
|
|
|
|
* ) echo "# $comment_str" > "$ac_file" ;;
|
1993-11-10 22:25:29 +08:00
|
|
|
esac
|
1993-10-21 07:33:19 +08:00
|
|
|
sed -e "
|
1994-03-18 16:02:20 +08:00
|
|
|
$ac_prsub
|
|
|
|
$ac_vpsub
|
1993-10-21 07:33:19 +08:00
|
|
|
dnl Shell code in configure.in might set extrasub.
|
|
|
|
$extrasub
|
|
|
|
dnl Insert the sed substitutions.
|
|
|
|
undivert(1)dnl
|
1994-04-06 00:45:41 +08:00
|
|
|
" $ac_given_srcdir/${ac_file}.in >> $ac_file
|
1993-10-21 07:33:19 +08:00
|
|
|
fi; done
|
|
|
|
AC_OUTPUT_HEADER
|
|
|
|
$2
|
|
|
|
exit 0
|
|
|
|
EOF
|
|
|
|
chmod +x config.status
|
1994-04-10 05:34:23 +08:00
|
|
|
test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} config.status
|
1993-10-21 07:33:19 +08:00
|
|
|
])dnl
|
|
|
|
dnl This is a subroutine of AC_OUTPUT, broken out primarily to avoid bugs
|
|
|
|
dnl with long definitions in GNU m4 1.0. This is called inside a quoted
|
|
|
|
dnl here document whose contents are going into config.status.
|
|
|
|
define(AC_OUTPUT_HEADER,[dnl
|
|
|
|
ifdef([AC_CONFIG_NAMES],[dnl
|
|
|
|
changequote(<<,>>)dnl
|
|
|
|
|
1994-03-18 16:02:20 +08:00
|
|
|
# These sed commands are put into ac_sed_defs when defining a macro.
|
1993-10-21 07:33:19 +08:00
|
|
|
# They are broken into pieces to make the sed script easier to manage.
|
|
|
|
# They 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.
|
|
|
|
# Each defining turns into a single global substitution command.
|
1993-11-19 07:40:54 +08:00
|
|
|
# Hopefully no one uses "!" as a variable value.
|
|
|
|
# Other candidates for the sed separators, like , and @, do get used.
|
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.
|
|
|
|
ac_dA='s!^\([ ]*\)#\([ ]*define[ ][ ]*\)'
|
|
|
|
ac_dB='\([ ][ ]*\)[^ ]*!\1#\2'
|
|
|
|
ac_dC='\3'
|
|
|
|
ac_dD='!g'
|
|
|
|
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
|
|
|
|
ac_uA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
|
|
|
|
ac_uB='\([ ]\)!\1#\2define\3'
|
|
|
|
ac_uC=' '
|
|
|
|
ac_uD='\4!g'
|
|
|
|
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
|
|
|
|
ac_eA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
|
|
|
|
ac_eB='<<$>>!\1#\2define\3'
|
|
|
|
ac_eC=' '
|
|
|
|
ac_eD='!g'
|
1993-10-21 07:33:19 +08:00
|
|
|
changequote([,])dnl
|
|
|
|
rm -f conftest.sed
|
|
|
|
EOF
|
|
|
|
# Turn off quoting long enough to insert the sed commands.
|
|
|
|
rm -f conftest.sh
|
|
|
|
cat > conftest.sh <<EOF
|
1994-03-18 16:02:20 +08:00
|
|
|
$ac_sed_defs
|
1993-10-21 07:33:19 +08:00
|
|
|
EOF
|
|
|
|
|
1994-03-18 16:02:20 +08:00
|
|
|
# Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
|
1993-10-21 07:33:19 +08:00
|
|
|
# on the size of here documents.
|
|
|
|
|
|
|
|
# Maximum number of lines to put in a single here document.
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_max_sh_lines=9
|
1993-10-21 07:33:19 +08:00
|
|
|
|
|
|
|
while :
|
|
|
|
do
|
1994-03-20 05:46:09 +08:00
|
|
|
# wc gives bogus results for an empty file on some AIX systems.
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_lines=`grep -c . conftest.sh`
|
|
|
|
if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
|
1993-10-21 07:33:19 +08:00
|
|
|
rm -f conftest.s1 conftest.s2
|
1994-03-18 16:02:20 +08:00
|
|
|
sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -20.
|
|
|
|
sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +21.
|
1993-10-21 07:33:19 +08:00
|
|
|
# Write a limited-size here document to append to conftest.sed.
|
|
|
|
echo 'cat >> conftest.sed <<CONFEOF' >> config.status
|
|
|
|
cat conftest.s1 >> config.status
|
|
|
|
echo 'CONFEOF' >> config.status
|
|
|
|
rm -f conftest.s1 conftest.sh
|
|
|
|
mv conftest.s2 conftest.sh
|
|
|
|
done
|
|
|
|
rm -f conftest.sh
|
|
|
|
|
|
|
|
# Now back to your regularly scheduled config.status.
|
|
|
|
cat >> config.status <<\EOF
|
|
|
|
# This sed command replaces #undef's 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 in
|
|
|
|
[#] AC_CONFIG_NAMES.
|
|
|
|
cat >> conftest.sed <<\CONFEOF
|
|
|
|
changequote(,)dnl
|
|
|
|
s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
|
|
|
|
changequote([,])dnl
|
|
|
|
CONFEOF
|
|
|
|
rm -f conftest.h
|
|
|
|
# Break up the sed commands because old seds have small limits.
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_max_sed_lines=20
|
1994-02-05 06:17:05 +08:00
|
|
|
|
|
|
|
CONFIG_HEADERS=${CONFIG_HEADERS-"AC_CONFIG_NAMES"}
|
1994-03-18 16:02:20 +08:00
|
|
|
for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
|
|
|
|
echo creating $ac_file
|
1994-02-05 06:17:05 +08:00
|
|
|
|
1994-04-06 00:45:41 +08:00
|
|
|
cp $ac_given_srcdir/$ac_file.in conftest.h1
|
1994-02-05 06:17:05 +08:00
|
|
|
while :
|
|
|
|
do
|
1994-03-18 16:02:20 +08:00
|
|
|
ac_lines=`grep -c . conftest.sed`
|
|
|
|
if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
|
1994-02-05 06:17:05 +08:00
|
|
|
rm -f conftest.s1 conftest.s2 conftest.h2
|
1994-03-18 16:02:20 +08:00
|
|
|
sed ${ac_max_sed_lines}q conftest.sed > conftest.s1 # Like head -20.
|
|
|
|
sed 1,${ac_max_sed_lines}d conftest.sed > conftest.s2 # Like tail +21.
|
1994-02-05 06:17:05 +08:00
|
|
|
sed -f conftest.s1 < conftest.h1 > conftest.h2
|
|
|
|
rm -f conftest.s1 conftest.h1 conftest.sed
|
|
|
|
mv conftest.h2 conftest.h1
|
|
|
|
mv conftest.s2 conftest.sed
|
|
|
|
done
|
|
|
|
rm -f conftest.sed conftest.h
|
1994-03-18 16:02:20 +08:00
|
|
|
echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
|
1994-02-05 06:17:05 +08:00
|
|
|
cat conftest.h1 >> conftest.h
|
|
|
|
rm -f conftest.h1
|
1994-03-18 16:02:20 +08:00
|
|
|
if cmp -s $ac_file conftest.h 2>/dev/null; then
|
1994-02-05 06:17:05 +08:00
|
|
|
# The file exists and we would not be changing it.
|
1994-03-18 16:02:20 +08:00
|
|
|
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
|
|
|
|
|
|
|
|
])])dnl
|