From 9452f6b982f6ded8b279d8ddaf38a0ea3f5da480 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 23 Jul 2023 23:53:15 +0200 Subject: [PATCH] Remove frozen autoconf macros version a.k.a. "auto hacks" This hasn't been maintained since 2007 and doesn't seem to be really needed as using and not using them results in the same output currently. --- .gitignore | 3 - autogen.sh | 2 +- build/autoconf_prepend-include/Makefile | 26 - build/autoconf_prepend-include/README.txt | 22 - build/autoconf_prepend-include/autoconf/c.m4 | 1737 ----------- .../autoconf/functions.m4 | 2048 ------------- .../autoconf/general.m4 | 2730 ----------------- .../autoconf_prepend-include/autoconf/libs.m4 | 496 --- .../autoconf/status.m4 | 1536 ---------- build/autogen.mk | 12 +- build/tools/autoconf/Dockerfile | 2 +- docs/contributing/how-to-release.md | 2 +- 12 files changed, 5 insertions(+), 8611 deletions(-) delete mode 100644 build/autoconf_prepend-include/Makefile delete mode 100644 build/autoconf_prepend-include/README.txt delete mode 100644 build/autoconf_prepend-include/autoconf/c.m4 delete mode 100644 build/autoconf_prepend-include/autoconf/functions.m4 delete mode 100644 build/autoconf_prepend-include/autoconf/general.m4 delete mode 100644 build/autoconf_prepend-include/autoconf/libs.m4 delete mode 100644 build/autoconf_prepend-include/autoconf/status.m4 diff --git a/.gitignore b/.gitignore index 3b18b4ed2b..e8320b7403 100644 --- a/.gitignore +++ b/.gitignore @@ -13,9 +13,6 @@ # /build/ -# /build/autoconf_prepend-include/autoconf/ -/build/autoconf_prepend-include/autoconf/autoconf.m4f - # /build/bakefiles/ /build/bakefiles/.bakefile_gen.state /build/bakefiles/Bakefiles.local.bkgen diff --git a/autogen.sh b/autogen.sh index 7e20dd11ba..4066e97c61 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,2 +1,2 @@ #!/bin/sh -autoconf -B build/autoconf_prepend-include \ No newline at end of file +autoconf diff --git a/build/autoconf_prepend-include/Makefile b/build/autoconf_prepend-include/Makefile deleted file mode 100644 index 39354162fc..0000000000 --- a/build/autoconf_prepend-include/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# Created: 2005/03/12 -# Author: David Elliott - -# For autoconf: Debian in their infinite wisdom decided to improve upon -# the standard autoconf 2.59 macros. Thus Debian's autoconf generates -# a totally different configure script. This fixes it to look -# mostly like Debian's. There are also some fixes pulled in from the OS/2 -# fork of autoconf. - -# Rule to freeze the m4 so autoconf will actually use it. -# NOTE: VERY important to cd to somewhere there are no .m4 files. -# or at least no aclocal.m4 or else autom4te helpfully picks it up. -.PHONY: all -all: autoconf/autoconf.m4f - -AUTOCONF_SOURCES = \ - autoconf/c.m4 \ - autoconf/general.m4 \ - autoconf/libs.m4 \ - autoconf/status.m4 - -AUTOM4TE=autom4te - -autoconf/autoconf.m4f: $(AUTOCONF_SOURCES) - $(AUTOM4TE) -B . --language=Autoconf --freeze --output=autoconf/autoconf.m4f - diff --git a/build/autoconf_prepend-include/README.txt b/build/autoconf_prepend-include/README.txt deleted file mode 100644 index 3f0393c246..0000000000 --- a/build/autoconf_prepend-include/README.txt +++ /dev/null @@ -1,22 +0,0 @@ -wxAutohacks - -wxAutohacks is a way of ensuring the configure script remains consistent -between developer commits. Previous releases include a build/aclocal_include -which has now been moved into the wxWidgets build/aclocal directory. - -At the moment, it is intended to be copied and or symlinked into a wxWidgets -source tree. For example, assume you have wxWidgets checked out in the -/home/myname/wxCVS/wxWidgets/ path. Then from /home/myname/wxCVS do this: -cvs -d :pserver:anoncvs@cvs.wxwidgets.org:/pack/cvsroots/wxwidgets checkout wxAutohacks - -You will now have wxAutohacks in /home/myname/wxCVS/wxAutohacks/. Now go into -the wxWidgets build (/home/myname/wxCVS/wxWidgets/build/) and do this: -ln -s ../../wxAutohacks/build/autoconf_prepend-include . - -From now on from the root of your wxWidgets source tree when you do this: -make -f build/autogen.mk -you will also build an autoconf.m4f file which will ensure the configure -script stays consistent. - -Alternatively you can do this: -make -f build/autogen.mk AUTOHACKS_PREPEND_INCLUDE_DIR=../wxAutohacks/build/autoconf_prepend-include diff --git a/build/autoconf_prepend-include/autoconf/c.m4 b/build/autoconf_prepend-include/autoconf/c.m4 deleted file mode 100644 index e37388979b..0000000000 --- a/build/autoconf_prepend-include/autoconf/c.m4 +++ /dev/null @@ -1,1737 +0,0 @@ -# This file is part of Autoconf. -*- Autoconf -*- -# Programming languages support. -# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software -# Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception, the Free Software Foundation gives unlimited -# permission to copy, distribute and modify the configure scripts that -# are the output of Autoconf. You need not follow the terms of the GNU -# General Public License when using or distributing such scripts, even -# though portions of the text of Autoconf appear in them. The GNU -# General Public License (GPL) does govern all other use of the material -# that constitutes the Autoconf program. -# -# Certain portions of the Autoconf source text are designed to be copied -# (in certain cases, depending on the input) into the output of -# Autoconf. We call these the "data" portions. The rest of the Autoconf -# source text consists of comments plus executable code that decides which -# of the data portions to output in any given case. We call these -# comments and executable code the "non-data" portions. Autoconf never -# copies any of the non-data portions into its output. -# -# This special exception to the GPL applies to versions of Autoconf -# released by the Free Software Foundation. When you make and -# distribute a modified version of Autoconf, you may extend this special -# exception to the GPL to apply to your modified version as well, *unless* -# your modified version has the potential to copy into its output some -# of the text that was the non-data portion of the version that you started -# with. (In other words, unless your change moves or copies text from -# the non-data portions to the data portions.) If your modification has -# such potential, you must delete any notice of this special exception -# to the GPL from your modified version. -# -# Written by David MacKenzie, with help from -# Akim Demaille, Paul Eggert, -# Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, -# Roland McGrath, Noah Friedman, david d zuhn, and many others. - - -# -------------------- # -# 1b. The C language. # -# -------------------- # - - -# AC_LANG(C) -# ---------- -# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -m4_define([AC_LANG(C)], -[ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -]) - - -# AC_LANG_C -# --------- -AU_DEFUN([AC_LANG_C], [AC_LANG(C)]) - - -# _AC_LANG_ABBREV(C) -# ------------------ -m4_define([_AC_LANG_ABBREV(C)], [c]) - - -# _AC_LANG_PREFIX(C) -# ------------------ -m4_define([_AC_LANG_PREFIX(C)], [C]) - - -# ---------------------- # -# 1c. The C++ language. # -# ---------------------- # - - -# AC_LANG(C++) -# ------------ -# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. -m4_define([AC_LANG(C++)], -[ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -]) - - -# AC_LANG_CPLUSPLUS -# ----------------- -AU_DEFUN([AC_LANG_CPLUSPLUS], [AC_LANG(C++)]) - - -# _AC_LANG_ABBREV(C++) -# -------------------- -m4_define([_AC_LANG_ABBREV(C++)], [cxx]) - - -# _AC_LANG_PREFIX(C++) -# -------------------- -m4_define([_AC_LANG_PREFIX(C++)], [CXX]) - - - -# ------------------------------ # -# 1d. The Objective C language. # -# ------------------------------ # - - -# AC_LANG(Objective C) -# -------------------- -m4_define([AC_LANG(Objective C)], -[ac_ext=m -ac_cpp='$OBJCPP $CPPFLAGS' -ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD' -ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&AS_MESSAGE_LOG_FD' -ac_compiler_gnu=$ac_cv_objc_compiler_gnu -]) - - -# AC_LANG_OBJC -# ------------ -AU_DEFUN([AC_LANG_OBJC], [AC_LANG(Objective C)]) - - -# _AC_LANG_ABBREV(Objective C) -# ---------------------------- -m4_define([_AC_LANG_ABBREV(Objective C)], [objc]) - - -# _AC_LANG_PREFIX(Objective C) -# ---------------------------- -m4_define([_AC_LANG_PREFIX(Objective C)], [OBJC]) - - - -## ---------------------- ## -## 2.Producing programs. ## -## ---------------------- ## - - -# --------------- # -# 2b. C sources. # -# --------------- # - -# AC_LANG_SOURCE(C)(BODY) -# ----------------------- -# We can't use '#line $LINENO "configure"' here, since -# Sun c89 (Sun WorkShop 6 update 2 C 5.3 Patch 111679-08 2002/05/09) -# rejects $LINENO greater than 32767, and some configure scripts -# are longer than 32767 lines. -m4_define([AC_LANG_SOURCE(C)], -[/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$1]) - - -# AC_LANG_PROGRAM(C)([PROLOGUE], [BODY]) -# -------------------------------------- -m4_define([AC_LANG_PROGRAM(C)], -[$1 -m4_ifdef([_AC_LANG_PROGRAM_C_F77_HOOKS], [_AC_LANG_PROGRAM_C_F77_HOOKS])[]dnl -m4_ifdef([_AC_LANG_PROGRAM_C_FC_HOOKS], [_AC_LANG_PROGRAM_C_FC_HOOKS])[]dnl -int -main () -{ -dnl Do *not* indent the following line: there may be CPP directives. -dnl Don't move the `;' right after for the same reason. -$2 - ; - return 0; -}]) - - -# AC_LANG_CALL(C)(PROLOGUE, FUNCTION) -# ----------------------------------- -# Avoid conflicting decl of main. -m4_define([AC_LANG_CALL(C)], -[AC_LANG_PROGRAM([$1 -m4_if([$2], [main], , -[/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 ();])], [return $2 ();])]) - - -# AC_LANG_FUNC_LINK_TRY(C)(FUNCTION) -# ---------------------------------- -# Don't include because on OSF/1 3.0 it includes -# which includes which contains a -# prototype for select. Similarly for bzero. -# -# This test used to merely assign f=$1 in main(), but that was -# optimized away by HP unbundled cc A.05.36 for ia64 under +O3, -# presumably on the basis that there's no need to do that store if the -# program is about to exit. Conversely, the AIX linker optimizes an -# unused external declaration that initializes f=$1. So this test -# program has both an external initialization of f, and a use of f in -# main that affects the exit status. -# -m4_define([AC_LANG_FUNC_LINK_TRY(C)], -[AC_LANG_PROGRAM( -[/* Define $1 to an innocuous variant, in case declares $1. - For example, HP-UX 11i declares gettimeofday. */ -#define $1 innocuous_$1 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $1 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $1 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $1 (); -/* 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 -#endif -], [return $1 ();])]) - - -# AC_LANG_BOOL_COMPILE_TRY(C)(PROLOGUE, EXPRESSION) -# ------------------------------------------------- -# Return a program that is valid if EXPRESSION is nonzero. -# EXPRESSION must be an integer constant expression. -# Be sure to use this array to avoid `unused' warnings, which are even -# errors with `-W error'. -m4_define([AC_LANG_BOOL_COMPILE_TRY(C)], -[AC_LANG_PROGRAM([$1], [static int test_array @<:@1 - 2 * !($2)@:>@; -test_array @<:@0@:>@ = 0 -])]) - - -# AC_LANG_INT_SAVE(C)(PROLOGUE, EXPRESSION) -# ----------------------------------------- -# We need `stdio.h' to open a `FILE' and `stdlib.h' for `exit'. -# But we include them only after the EXPRESSION has been evaluated. -m4_define([AC_LANG_INT_SAVE(C)], -[AC_LANG_PROGRAM([$1 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -@%:@include -@%:@include ], -[ - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld\n", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu\n", i); - } - return ferror (f) || fclose (f) != 0; -])]) - - -# ----------------- # -# 2c. C++ sources. # -# ----------------- # - -# AC_LANG_SOURCE(C++)(BODY) -# ------------------------- -m4_copy([AC_LANG_SOURCE(C)], [AC_LANG_SOURCE(C++)]) - - -# AC_LANG_PROGRAM(C++)([PROLOGUE], [BODY]) -# ---------------------------------------- -m4_copy([AC_LANG_PROGRAM(C)], [AC_LANG_PROGRAM(C++)]) - - -# AC_LANG_CALL(C++)(PROLOGUE, FUNCTION) -# ------------------------------------- -m4_copy([AC_LANG_CALL(C)], [AC_LANG_CALL(C++)]) - - -# AC_LANG_FUNC_LINK_TRY(C++)(FUNCTION) -# ------------------------------------ -m4_copy([AC_LANG_FUNC_LINK_TRY(C)], [AC_LANG_FUNC_LINK_TRY(C++)]) - - -# AC_LANG_BOOL_COMPILE_TRY(C++)(PROLOGUE, EXPRESSION) -# --------------------------------------------------- -m4_copy([AC_LANG_BOOL_COMPILE_TRY(C)], [AC_LANG_BOOL_COMPILE_TRY(C++)]) - - -# AC_LANG_INT_SAVE(C++)(PROLOGUE, EXPRESSION) -# ------------------------------------------- -m4_copy([AC_LANG_INT_SAVE(C)], [AC_LANG_INT_SAVE(C++)]) - - - -# ------------------------- # -# 2d. Objective C sources. # -# ------------------------- # - -# AC_LANG_SOURCE(Objective C)(BODY) -# --------------------------------- -m4_copy([AC_LANG_SOURCE(C)], [AC_LANG_SOURCE(Objective C)]) - - -# AC_LANG_PROGRAM(Objective C)([PROLOGUE], [BODY]) -# ------------------------------------------------ -m4_copy([AC_LANG_PROGRAM(C)], [AC_LANG_PROGRAM(Objective C)]) - - -# AC_LANG_CALL(Objective C)(PROLOGUE, FUNCTION) -# --------------------------------------------- -m4_copy([AC_LANG_CALL(C)], [AC_LANG_CALL(Objective C)]) - - -# AC_LANG_FUNC_LINK_TRY(Objective C)(FUNCTION) -# -------------------------------------------- -m4_copy([AC_LANG_FUNC_LINK_TRY(C)], [AC_LANG_FUNC_LINK_TRY(Objective C)]) - - -# AC_LANG_BOOL_COMPILE_TRY(Objective C)(PROLOGUE, EXPRESSION) -# ----------------------------------------------------------- -m4_copy([AC_LANG_BOOL_COMPILE_TRY(C)], [AC_LANG_BOOL_COMPILE_TRY(Objective C)]) - - -# AC_LANG_INT_SAVE(Objective C)(PROLOGUE, EXPRESSION) -# --------------------------------------------------- -m4_copy([AC_LANG_INT_SAVE(C)], [AC_LANG_INT_SAVE(Objective C)]) - - - -## -------------------------------------------- ## -## 3. Looking for Compilers and Preprocessors. ## -## -------------------------------------------- ## - -# -------------------- # -# 3b. The C compiler. # -# -------------------- # - - -# _AC_ARG_VAR_CPPFLAGS -# -------------------- -# Document and register CPPFLAGS, which is used by -# AC_PROG_{CC, CPP, CXX, CXXCPP, OBJC, OBJCPP}. -AC_DEFUN([_AC_ARG_VAR_CPPFLAGS], -[AC_ARG_VAR([CPPFLAGS], - [C/C++/Objective C preprocessor flags, e.g. -I - if you have headers in a nonstandard directory ])]) - - -# _AC_ARG_VAR_LDFLAGS -# ------------------- -# Document and register LDFLAGS, which is used by -# AC_PROG_{CC, CXX, F77, FC, OBJC}. -AC_DEFUN([_AC_ARG_VAR_LDFLAGS], -[AC_ARG_VAR([LDFLAGS], - [linker flags, e.g. -L if you have libraries in a - nonstandard directory ])]) - - -# _AC_ARG_VAR_LIBS -# ---------------- -# Document and register LIBS, which is used by -# AC_PROG_{CC, CXX, F77, FC, OBJS}. -AC_DEFUN([_AC_ARG_VAR_LIBS], -[AC_ARG_VAR([LIBS], - [libraries to pass to the linker, e.g. -l])]) - - -# AC_LANG_PREPROC(C) -# ------------------- -# Find the C preprocessor. Must be AC_DEFUN'd to be AC_REQUIRE'able. -AC_DEFUN([AC_LANG_PREPROC(C)], -[AC_REQUIRE([AC_PROG_CPP])]) - - -# _AC_PROG_PREPROC_WORKS_IFELSE(IF-WORKS, IF-NOT) -# ----------------------------------------------- -# Check if $ac_cpp is a working preprocessor that can flag absent -# includes either by the exit status or by warnings. -# This macro is for all languages, not only C. -AC_DEFUN([_AC_PROG_PREPROC_WORKS_IFELSE], -[ac_preproc_ok=false -for ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - _AC_PREPROC_IFELSE([AC_LANG_SOURCE([[@%:@ifdef __STDC__ -@%:@ include -@%:@else -@%:@ include -@%:@endif - Syntax error]])], - [], - [# Broken: fails on valid input. -continue]) - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - _AC_PREPROC_IFELSE([AC_LANG_SOURCE([[@%:@include ]])], - [# Broken: success on invalid input. -continue], - [# Passes both tests. -ac_preproc_ok=: -break]) - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -AS_IF([$ac_preproc_ok], [$1], [$2])])# _AC_PROG_PREPROC_WORKS_IFELSE - - -# AC_PROG_CPP -# ----------- -# Find a working C preprocessor. -# We shouldn't have to require AC_PROG_CC, but this is due to the concurrency -# between the AC_LANG_COMPILER_REQUIRE family and that of AC_PROG_CC. -AN_MAKEVAR([CPP], [AC_PROG_CPP]) -AN_PROGRAM([cpp], [AC_PROG_CPP]) -AC_DEFUN([AC_PROG_CPP], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_ARG_VAR([CPP], [C preprocessor])dnl -_AC_ARG_VAR_CPPFLAGS()dnl -AC_LANG_PUSH(C)dnl -AC_MSG_CHECKING([how to run the C preprocessor]) -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - AC_CACHE_VAL([ac_cv_prog_CPP], - [dnl - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - _AC_PROG_PREPROC_WORKS_IFELSE([break]) - done - ac_cv_prog_CPP=$CPP - ])dnl - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -AC_MSG_RESULT([$CPP]) -_AC_PROG_PREPROC_WORKS_IFELSE([], - [AC_MSG_FAILURE([C preprocessor "$CPP" fails sanity check])]) -AC_SUBST(CPP)dnl -AC_LANG_POP(C)dnl -])# AC_PROG_CPP - -# AC_PROG_CPP_WERROR -# ------------------ -# Treat warnings from the preprocessor as errors. -AC_DEFUN([AC_PROG_CPP_WERROR], -[AC_REQUIRE([AC_PROG_CPP])dnl -ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR - -# AC_LANG_COMPILER(C) -# ------------------- -# Find the C compiler. Must be AC_DEFUN'd to be AC_REQUIRE'able. -AC_DEFUN([AC_LANG_COMPILER(C)], -[AC_REQUIRE([AC_PROG_CC])]) - - -# ac_cv_prog_gcc -# -------------- -# We used to name the cache variable this way. -AU_DEFUN([ac_cv_prog_gcc], -[ac_cv_c_compiler_gnu]) - - -# AC_PROG_CC([COMPILER ...]) -# -------------------------- -# COMPILER ... is a space separated list of C compilers to search for. -# This just gives the user an opportunity to specify an alternative -# search list for the C compiler. -AN_MAKEVAR([CC], [AC_PROG_CC]) -AN_PROGRAM([cc], [AC_PROG_CC]) -AN_PROGRAM([gcc], [AC_PROG_CC]) -AC_DEFUN([AC_PROG_CC], -[AC_LANG_PUSH(C)dnl -AC_ARG_VAR([CC], [C compiler command])dnl -AC_ARG_VAR([CFLAGS], [C compiler flags])dnl -_AC_ARG_VAR_LDFLAGS()dnl -_AC_ARG_VAR_LIBS()dnl -_AC_ARG_VAR_CPPFLAGS()dnl -m4_ifval([$1], - [AC_CHECK_TOOLS(CC, [$1])], -[AC_CHECK_TOOL(CC, gcc) -if test -z "$CC"; then - dnl Here we want: - dnl AC_CHECK_TOOL(CC, cc) - dnl but without the check for a tool without the prefix. - dnl Until the check is removed from there, copy the code: - if test -n "$ac_tool_prefix"; then - AC_CHECK_PROG(CC, [${ac_tool_prefix}cc], [${ac_tool_prefix}cc]) - fi -fi -if test -z "$CC"; then - AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) -fi -if test -z "$CC"; then - AC_CHECK_TOOLS(CC, cl.exe) -fi -]) - -test -z "$CC" && AC_MSG_FAILURE([no acceptable C compiler found in \$PATH]) - -# Provide some information about the compiler. -_AS_ECHO_LOG([checking for _AC_LANG compiler version]) -ac_compiler=`set X $ac_compile; echo $[2]` -_AC_DO([$ac_compiler --version >&AS_MESSAGE_LOG_FD]) -_AC_DO([$ac_compiler -v >&AS_MESSAGE_LOG_FD]) -_AC_DO([$ac_compiler -V >&AS_MESSAGE_LOG_FD]) - -m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl -m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl -_AC_LANG_COMPILER_GNU -GCC=`test $ac_compiler_gnu = yes && echo yes` -_AC_PROG_CC_G -_AC_PROG_CC_C89 -AC_LANG_POP(C)dnl -])# AC_PROG_CC - - -# _AC_PROG_CC_G -# ------------- -# Check whether -g works, even if CFLAGS is set, in case the package -# plays around with CFLAGS (such as to build both debugging and normal -# versions of a library), tasteless as that idea is. -# Don't consider -g to work if it generates warnings when plain compiles don't. -m4_define([_AC_PROG_CC_G], -[ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -AC_CACHE_CHECK(whether $CC accepts -g, ac_cv_prog_cc_g, - [ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], - [ac_cv_prog_cc_g=yes], - [CFLAGS="" - _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], - [], - [ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], - [ac_cv_prog_cc_g=yes])])]) - ac_c_werror_flag=$ac_save_c_werror_flag]) -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi[]dnl -])# _AC_PROG_CC_G - - -# AC_PROG_GCC_TRADITIONAL -# ----------------------- -AN_FUNCTION([ioctl], [AC_PROG_GCC_TRADITIONAL]) -AC_DEFUN([AC_PROG_GCC_TRADITIONAL], -[AC_REQUIRE([AC_PROG_CC])dnl -if test $ac_cv_c_compiler_gnu = yes; then - AC_CACHE_CHECK(whether $CC needs -traditional, - ac_cv_prog_gcc_traditional, -[ ac_pattern="Autoconf.*'x'" - AC_EGREP_CPP($ac_pattern, [#include -Autoconf TIOCGETP], - ac_cv_prog_gcc_traditional=yes, ac_cv_prog_gcc_traditional=no) - - if test $ac_cv_prog_gcc_traditional = no; then - AC_EGREP_CPP($ac_pattern, [#include -Autoconf TCGETA], - ac_cv_prog_gcc_traditional=yes) - fi]) - if test $ac_cv_prog_gcc_traditional = yes; then - CC="$CC -traditional" - fi -fi -])# AC_PROG_GCC_TRADITIONAL - - -# AC_PROG_CC_C_O -# -------------- -AC_DEFUN([AC_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC])dnl -if test "x$CC" != xcc; then - AC_MSG_CHECKING([whether $CC and cc understand -c and -o together]) -else - AC_MSG_CHECKING([whether cc understands -c and -o together]) -fi -set dummy $CC; ac_cc=`echo $[2] | - sed 's/[[^a-zA-Z0-9_]]/_/g;s/^[[0-9]]/_/'` -AC_CACHE_VAL(ac_cv_prog_cc_${ac_cc}_c_o, -[AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&AS_MESSAGE_LOG_FD' -rm -f conftest2.* -if _AC_DO_VAR(ac_try) && - test -f conftest2.$ac_objext && _AC_DO_VAR(ac_try); -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if _AC_DO_TOKENS(cc -c conftest.$ac_ext >&AS_MESSAGE_LOG_FD); then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&AS_MESSAGE_LOG_FD' - rm -f conftest2.* - if _AC_DO_VAR(ac_try) && - test -f conftest2.$ac_objext && _AC_DO_VAR(ac_try); - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi - fi - fi -else - eval ac_cv_prog_cc_${ac_cc}_c_o=no -fi -rm -f core conftest* -])dnl -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) - AC_DEFINE(NO_MINUS_C_MINUS_O, 1, - [Define to 1 if your C compiler doesn't accept -c and -o together.]) -fi -])# AC_PROG_CC_C_O - - -# ---------------------- # -# 3c. The C++ compiler. # -# ---------------------- # - - -# AC_LANG_PREPROC(C++) -# --------------------- -# Find the C++ preprocessor. Must be AC_DEFUN'd to be AC_REQUIRE'able. -AC_DEFUN([AC_LANG_PREPROC(C++)], -[AC_REQUIRE([AC_PROG_CXXCPP])]) - - -# AC_PROG_CXXCPP -# -------------- -# Find a working C++ preprocessor. -# We shouldn't have to require AC_PROG_CC, but this is due to the concurrency -# between the AC_LANG_COMPILER_REQUIRE family and that of AC_PROG_CXX. -AC_DEFUN([AC_PROG_CXXCPP], -[AC_REQUIRE([AC_PROG_CXX])dnl -AC_ARG_VAR([CXXCPP], [C++ preprocessor])dnl -_AC_ARG_VAR_CPPFLAGS()dnl -AC_LANG_PUSH(C++)dnl -AC_MSG_CHECKING([how to run the C++ preprocessor]) -if test -z "$CXXCPP"; then - AC_CACHE_VAL(ac_cv_prog_CXXCPP, - [dnl - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - _AC_PROG_PREPROC_WORKS_IFELSE([break]) - done - ac_cv_prog_CXXCPP=$CXXCPP - ])dnl - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -AC_MSG_RESULT([$CXXCPP]) -_AC_PROG_PREPROC_WORKS_IFELSE([], - [AC_MSG_FAILURE([C++ preprocessor "$CXXCPP" fails sanity check])]) -AC_SUBST(CXXCPP)dnl -AC_LANG_POP(C++)dnl -])# AC_PROG_CXXCPP - - -# AC_LANG_COMPILER(C++) -# --------------------- -# Find the C++ compiler. Must be AC_DEFUN'd to be AC_REQUIRE'able. -AC_DEFUN([AC_LANG_COMPILER(C++)], -[AC_REQUIRE([AC_PROG_CXX])]) - - -# ac_cv_prog_gxx -# -------------- -# We used to name the cache variable this way. -AU_DEFUN([ac_cv_prog_gxx], -[ac_cv_cxx_compiler_gnu]) - - -# AC_PROG_CXX([LIST-OF-COMPILERS]) -# -------------------------------- -# LIST-OF-COMPILERS is a space separated list of C++ compilers to search -# for (if not specified, a default list is used). This just gives the -# user an opportunity to specify an alternative search list for the C++ -# compiler. -# aCC HP-UX C++ compiler much better than `CC', so test before. -# FCC Fujitsu C++ compiler -# KCC KAI C++ compiler -# RCC Rational C++ -# xlC_r AIX C Set++ (with support for reentrant code) -# xlC AIX C Set++ -AN_MAKEVAR([CXX], [AC_PROG_CXX]) -AN_PROGRAM([CC], [AC_PROG_CXX]) -AN_PROGRAM([c++], [AC_PROG_CXX]) -AN_PROGRAM([g++], [AC_PROG_CXX]) -AC_DEFUN([AC_PROG_CXX], -[AC_LANG_PUSH(C++)dnl -AC_ARG_VAR([CXX], [C++ compiler command])dnl -AC_ARG_VAR([CXXFLAGS], [C++ compiler flags])dnl -_AC_ARG_VAR_LDFLAGS()dnl -_AC_ARG_VAR_LIBS()dnl -_AC_ARG_VAR_CPPFLAGS()dnl -_AC_ARG_VAR_PRECIOUS([CCC])dnl -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - AC_CHECK_TOOLS(CXX, - [m4_default([$1], - [g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC])], - g++) - fi -fi -# Provide some information about the compiler. -_AS_ECHO_LOG([checking for _AC_LANG compiler version]) -ac_compiler=`set X $ac_compile; echo $[2]` -_AC_DO([$ac_compiler --version >&AS_MESSAGE_LOG_FD]) -_AC_DO([$ac_compiler -v >&AS_MESSAGE_LOG_FD]) -_AC_DO([$ac_compiler -V >&AS_MESSAGE_LOG_FD]) - -m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl -m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl -_AC_LANG_COMPILER_GNU -GXX=`test $ac_compiler_gnu = yes && echo yes` -_AC_PROG_CXX_G -AC_LANG_POP(C++)dnl -])# AC_PROG_CXX - - -# _AC_PROG_CXX_G -# -------------- -# Check whether -g works, even if CXXFLAGS is set, in case the package -# plays around with CXXFLAGS (such as to build both debugging and -# normal versions of a library), tasteless as that idea is. -# Don't consider -g to work if it generates warnings when plain compiles don't. -m4_define([_AC_PROG_CXX_G], -[ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -AC_CACHE_CHECK(whether $CXX accepts -g, ac_cv_prog_cxx_g, - [ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], - [ac_cv_prog_cxx_g=yes], - [CXXFLAGS="" - _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], - [], - [ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], - [ac_cv_prog_cxx_g=yes])])]) - ac_cxx_werror_flag=$ac_save_cxx_werror_flag]) -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi[]dnl -])# _AC_PROG_CXX_G - - -# AC_PROG_CXX_C_O -# --------------- -# Test if the C++ compiler accepts the options `-c' and `-o' -# simultaneously, and define `CXX_NO_MINUS_C_MINUS_O' if it does not. -AC_DEFUN([AC_PROG_CXX_C_O], -[AC_REQUIRE([AC_PROG_CXX])dnl -AC_LANG_PUSH([C++])dnl -AC_CACHE_CHECK([whether $CXX understands -c and -o together], - [ac_cv_prog_cxx_c_o], -[AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) -# We test twice because some compilers refuse to overwrite an existing -# `.o' file with `-o', although they will create one. -ac_try='$CXX $CXXFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&AS_MESSAGE_LOG_FD' -rm -f conftest2.* -if _AC_DO_VAR(ac_try) && - test -f conftest2.$ac_objext && - _AC_DO_VAR(ac_try); then - ac_cv_prog_cxx_c_o=yes -else - ac_cv_prog_cxx_c_o=no -fi -rm -f conftest*]) -if test $ac_cv_prog_cxx_c_o = no; then - AC_DEFINE(CXX_NO_MINUS_C_MINUS_O, 1, - [Define to 1 if your C++ compiler doesn't accept - -c and -o together.]) -fi -AC_LANG_POP([C++])dnl -])# AC_PROG_CXX_C_O - - -# ------------------------------ # -# 3d. The Objective C compiler. # -# ------------------------------ # - - -# AC_LANG_PREPROC(Objective C) -# ---------------------------- -# Find the Objective C preprocessor. Must be AC_DEFUN'd to be AC_REQUIRE'able. -AC_DEFUN([AC_LANG_PREPROC(Objective C)], -[AC_REQUIRE([AC_PROG_OBJCPP])]) - - -# AC_PROG_OBJCPP -# -------------- -# Find a working Objective C preprocessor. -AC_DEFUN([AC_PROG_OBJCPP], -[AC_REQUIRE([AC_PROG_OBJC])dnl -AC_ARG_VAR([OBJCPP], [Objective C preprocessor])dnl -_AC_ARG_VAR_CPPFLAGS()dnl -AC_LANG_PUSH(Objective C)dnl -AC_MSG_CHECKING([how to run the Objective C preprocessor]) -if test -z "$OBJCPP"; then - AC_CACHE_VAL(ac_cv_prog_OBJCPP, - [dnl - # Double quotes because OBJCPP needs to be expanded - for OBJCPP in "$OBJC -E" "/lib/cpp" - do - _AC_PROG_PREPROC_WORKS_IFELSE([break]) - done - ac_cv_prog_OBJCPP=$OBJCPP - ])dnl - OBJCPP=$ac_cv_prog_OBJCPP -else - ac_cv_prog_OBJCPP=$OBJCPP -fi -AC_MSG_RESULT([$OBJCPP]) -_AC_PROG_PREPROC_WORKS_IFELSE([], - [AC_MSG_FAILURE([Objective C preprocessor "$OBJCPP" fails sanity check])]) -AC_SUBST(OBJCPP)dnl -AC_LANG_POP(Objective C)dnl -])# AC_PROG_OBJCPP - - -# AC_LANG_COMPILER(Objective C) -# ----------------------------- -# Find the Objective C compiler. Must be AC_DEFUN'd to be AC_REQUIRE'able. -AC_DEFUN([AC_LANG_COMPILER(Objective C)], -[AC_REQUIRE([AC_PROG_OBJC])]) - - - -# AC_PROG_OBJC([LIST-OF-COMPILERS]) -# --------------------------------- -# LIST-OF-COMPILERS is a space separated list of Objective C compilers to -# search for (if not specified, a default list is used). This just gives -# the user an opportunity to specify an alternative search list for the -# Objective C compiler. -# objcc StepStone Objective-C compiler (also "standard" name for OBJC) -# objc David Stes' POC. If you installed this, you likely want it. -# cc Native C compiler (for instance, Apple). -# CC You never know. -AN_MAKEVAR([OBJC], [AC_PROG_OBJC]) -AN_PROGRAM([objcc], [AC_PROG_OBJC]) -AN_PROGRAM([objc], [AC_PROG_OBJC]) -AC_DEFUN([AC_PROG_OBJC], -[AC_LANG_PUSH(Objective C)dnl -AC_ARG_VAR([OBJC], [Objective C compiler command])dnl -AC_ARG_VAR([OBJCFLAGS], [Objective C compiler flags])dnl -_AC_ARG_VAR_LDFLAGS()dnl -_AC_ARG_VAR_LIBS()dnl -_AC_ARG_VAR_CPPFLAGS()dnl -_AC_ARG_VAR_PRECIOUS([OBJC])dnl -AC_CHECK_TOOLS(OBJC, - [m4_default([$1], [gcc objcc objc cc CC])], - gcc) -# Provide some information about the compiler. -_AS_ECHO_LOG([checking for _AC_LANG compiler version]) -ac_compiler=`set X $ac_compile; echo $[2]` -_AC_DO([$ac_compiler --version >&AS_MESSAGE_LOG_FD]) -_AC_DO([$ac_compiler -v >&AS_MESSAGE_LOG_FD]) -_AC_DO([$ac_compiler -V >&AS_MESSAGE_LOG_FD]) - -m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl -m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl -_AC_LANG_COMPILER_GNU -GOBJC=`test $ac_compiler_gnu = yes && echo yes` -_AC_PROG_OBJC_G -AC_LANG_POP(Objective C)dnl -])# AC_PROG_OBJC - - -# _AC_PROG_OBJC_G -# --------------- -# Check whether -g works, even if OBJCFLAGS is set, in case the package -# plays around with OBJCFLAGS (such as to build both debugging and -# normal versions of a library), tasteless as that idea is. -# Don't consider -g to work if it generates warnings when plain compiles don't. -m4_define([_AC_PROG_OBJC_G], -[ac_test_OBJCFLAGS=${OBJCFLAGS+set} -ac_save_OBJCFLAGS=$OBJCFLAGS -AC_CACHE_CHECK(whether $OBJC accepts -g, ac_cv_prog_objc_g, - [ac_save_objc_werror_flag=$ac_objc_werror_flag - ac_objc_werror_flag=yes - ac_cv_prog_objc_g=no - OBJCFLAGS="-g" - _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], - [ac_cv_prog_objc_g=yes], - [OBJCFLAGS="" - _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], - [], - [ac_objc_werror_flag=$ac_save_objc_werror_flag - OBJCFLAGS="-g" - _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], - [ac_cv_prog_objc_g=yes])])]) - ac_objc_werror_flag=$ac_save_objc_werror_flag]) -if test "$ac_test_OBJCFLAGS" = set; then - OBJCFLAGS=$ac_save_OBJCFLAGS -elif test $ac_cv_prog_objc_g = yes; then - if test "$GOBJC" = yes; then - OBJCFLAGS="-g -O2" - else - OBJCFLAGS="-g" - fi -else - if test "$GOBJC" = yes; then - OBJCFLAGS="-O2" - else - OBJCFLAGS= - fi -fi[]dnl -])# _AC_PROG_OBJC_G - - - - - - -## ------------------------------- ## -## 4. Compilers' characteristics. ## -## ------------------------------- ## - - -# -------------------------------- # -# 4b. C compiler characteristics. # -# -------------------------------- # - -# _AC_PROG_CC_C89 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) -# ---------------------------------------------------------------- -# If the C compiler is not in ANSI C89 (ISO C90) mode by default, try -# to add an option to output variable CC to make it so. This macro -# tries various options that select ANSI C89 on some system or -# another. It considers the compiler to be in ANSI C89 mode if it -# handles function prototypes correctly. -AC_DEFUN([_AC_PROG_CC_C89], -[_AC_C_STD_TRY([c89], -[[#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv;]], -[[return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];]], -dnl Don't try gcc -ansi; that turns off useful extensions and -dnl breaks some systems' header files. -dnl AIX circa 2003 -qlanglvl=extc89 -dnl old AIX -qlanglvl=ansi -dnl Ultrix, OSF/1, Tru64 -std -dnl HP-UX 10.20 and later -Ae -dnl HP-UX older versions -Aa -D_HPUX_SOURCE -dnl SVR4 -Xc -D__EXTENSIONS__ -[-qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"], [$1], [$2])[]dnl -])# _AC_PROG_CC_C89 - - -# _AC_C_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST, -# ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE) -# -------------------------------------------------------------- -# Check whether the C compiler accepts features of STANDARD (e.g `c89', `c99') -# by trying to compile a program of TEST-PROLOGUE and TEST-BODY. If this fails, -# try again with each compiler option in the space-separated OPTION-LIST; if one -# helps, append it to CC. If eventually successful, run ACTION-IF-AVAILABLE, -# else ACTION-IF-UNAVAILABLE. -AC_DEFUN([_AC_C_STD_TRY], -[AC_MSG_CHECKING([for $CC option to accept ISO ]m4_translit($1, [c], [C])) -AC_CACHE_VAL(ac_cv_prog_cc_$1, -[ac_cv_prog_cc_$1=no -ac_save_CC=$CC -AC_LANG_CONFTEST([AC_LANG_PROGRAM([$2], [$3])]) -for ac_arg in '' $4 -do - CC="$ac_save_CC $ac_arg" - _AC_COMPILE_IFELSE([], [ac_cv_prog_cc_$1=$ac_arg]) - test "x$ac_cv_prog_cc_$1" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -])# AC_CACHE_VAL -case "x$ac_cv_prog_cc_$1" in - x) - AC_MSG_RESULT([none needed]) ;; - xno) - AC_MSG_RESULT([unsupported]) ;; - *) - CC="$CC $ac_cv_prog_cc_$1" - AC_MSG_RESULT([$ac_cv_prog_cc_$1]) ;; -esac -AS_IF([test "x$ac_cv_prog_cc_$1" != xno], [$5], [$6]) -])# _AC_C_STD_TRY - - -# _AC_PROG_CC_C99 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) -# ---------------------------------------------------------------- -# If the C compiler is not in ISO C99 mode by default, try to add an -# option to output variable CC to make it so. This macro tries -# various options that select ISO C99 on some system or another. It -# considers the compiler to be in ISO C99 mode if it handles _Bool, -# // comments, flexible array members, inline, long long int, mixed -# code and declarations, named initialization of structs, restrict, -# va_copy, varargs macros, variable declarations in for loops and -# variable length arrays. -AC_DEFUN([_AC_PROG_CC_C99], -[_AC_C_STD_TRY([c99], -[[#include -#include -#include -#include -#include - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -#define debug(...) fprintf (stderr, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - your preprocessor is broken; -#endif -#if BIG_OK -#else - your preprocessor is broken; -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\0'; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static void -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str; - int number; - float fnumber; - - while (*format) - { - switch (*format++) - { - case 's': // string - str = va_arg (args_copy, const char *); - break; - case 'd': // int - number = va_arg (args_copy, int); - break; - case 'f': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); -} -]], -[[ - // Check bool. - _Bool success = false; - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - test_varargs ("s, d' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' - || dynamic_array[ni.number - 1] != 543); -]], -dnl Try -dnl GCC -std=gnu99 (unused restrictive modes: -std=c99 -std=iso9899:1999) -dnl AIX -qlanglvl=extc99 (unused restrictive mode: -qlanglvl=stdc99) -dnl Intel ICC -c99 -dnl IRIX -c99 -dnl Solaris (unused because it causes the compiler to assume C99 semantics for -dnl library functions, and this is invalid before Solaris 10: -xc99) -dnl Tru64 -c99 -dnl with extended modes being tried first. -[[-std=gnu99 -c99 -qlanglvl=extc99]], [$1], [$2])[]dnl -])# _AC_PROG_CC_C99 - - -# AC_PROG_CC_C89 -# -------------- -AC_DEFUN([AC_PROG_CC_C89], -[ AC_REQUIRE([AC_PROG_CC])dnl - _AC_PROG_CC_C89 -]) - - -# AC_PROG_CC_C99 -# -------------- -AC_DEFUN([AC_PROG_CC_C99], -[ AC_REQUIRE([AC_PROG_CC])dnl - _AC_PROG_CC_C99 -]) - - -# AC_PROG_CC_STDC -# --------------- -AC_DEFUN([AC_PROG_CC_STDC], -[ AC_REQUIRE([AC_PROG_CC])dnl - AS_CASE([$ac_cv_prog_cc_stdc], - [no], [ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no], - [_AC_PROG_CC_C99([ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99], - [_AC_PROG_CC_C89([ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89], - [ac_cv_prog_cc_stdc=no])])])dnl - AC_MSG_CHECKING([for $CC option to accept ISO Standard C]) - AC_CACHE_VAL([ac_cv_prog_cc_stdc], []) - AS_CASE([$ac_cv_prog_cc_stdc], - [no], [AC_MSG_RESULT([unsupported])], - [''], [AC_MSG_RESULT([none needed])], - [AC_MSG_RESULT([$ac_cv_prog_cc_stdc])]) -]) - - -# AC_C_BACKSLASH_A -# ---------------- -AC_DEFUN([AC_C_BACKSLASH_A], -[ - AC_CACHE_CHECK([whether backslash-a works in strings], ac_cv_c_backslash_a, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], - [[ -#if '\a' == 'a' - syntax error; -#endif - char buf['\a' == 'a' ? -1 : 1]; - buf[0] = '\a'; - return buf[0] != "\a"[0]; - ]])], - [ac_cv_c_backslash_a=yes], - [ac_cv_c_backslash_a=no])]) - if test $ac_cv_c_backslash_a = yes; then - AC_DEFINE(HAVE_C_BACKSLASH_A, 1, - [Define if backslash-a works in C strings.]) - fi -]) - - -# AC_C_CROSS -# ---------- -# Has been merged into AC_PROG_CC. -AU_DEFUN([AC_C_CROSS], []) - - -# AC_C_CHAR_UNSIGNED -# ------------------ -AC_DEFUN([AC_C_CHAR_UNSIGNED], -[AH_VERBATIM([__CHAR_UNSIGNED__], -[/* Define to 1 if type `char' is unsigned and you are not using gcc. */ -#ifndef __CHAR_UNSIGNED__ -# undef __CHAR_UNSIGNED__ -#endif])dnl -AC_CACHE_CHECK(whether char is unsigned, ac_cv_c_char_unsigned, -[AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([AC_INCLUDES_DEFAULT([])], - [((char) -1) < 0])], - ac_cv_c_char_unsigned=no, ac_cv_c_char_unsigned=yes)]) -if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then - AC_DEFINE(__CHAR_UNSIGNED__) -fi -])# AC_C_CHAR_UNSIGNED - - -# AC_C_BIGENDIAN ([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN]) -# ------------------------------------------------------------------------- -AC_DEFUN([AC_C_BIGENDIAN], -[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian, -[# See if sys/param.h defines the BYTE_ORDER macro. -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include -#include -], -[#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ - && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) - bogus endian macros -#endif -])], -[# It does; now see whether it defined to BIG_ENDIAN or not. -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include -#include -], [#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif -])], [ac_cv_c_bigendian=yes], [ac_cv_c_bigendian=no])], -[# It does not; compile a test program. -AC_RUN_IFELSE( -[AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[ - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l = 1; - return u.c[sizeof (long int) - 1] == 1; -]])], - [ac_cv_c_bigendian=no], - [ac_cv_c_bigendian=yes], -[# try to guess the endianness by grepping values into an object file - ac_cv_c_bigendian=unknown - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( -[[short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; -void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; -void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }]], -[[ _ascii (); _ebcdic (); ]])], -[if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then - ac_cv_c_bigendian=yes -fi -if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi -fi])])])]) -case $ac_cv_c_bigendian in - yes) - m4_default([$1], - [AC_DEFINE([WORDS_BIGENDIAN], 1, - [Define to 1 if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX).])]) ;; - no) - $2 ;; - *) - m4_default([$3], - [AC_MSG_ERROR([unknown endianness -presetting ac_cv_c_bigendian=no (or yes) will help])]) ;; -esac -])# AC_C_BIGENDIAN - - -# AC_C_INLINE -# ----------- -# Do nothing if the compiler accepts the inline keyword. -# Otherwise define inline to __inline__ or __inline if one of those work, -# otherwise define inline to be empty. -# -# HP C version B.11.11.04 doesn't allow a typedef as the return value for an -# inline function, only builtin types. -# -AN_IDENTIFIER([inline], [AC_C_INLINE]) -AC_DEFUN([AC_C_INLINE], -[AC_CACHE_CHECK([for inline], ac_cv_c_inline, -[ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - AC_COMPILE_IFELSE([AC_LANG_SOURCE( -[#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif -])], - [ac_cv_c_inline=$ac_kw]) - test "$ac_cv_c_inline" != no && break -done -]) -AH_VERBATIM([inline], -[/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif]) -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac -])# AC_C_INLINE - - -# AC_C_CONST -# ---------- -AN_IDENTIFIER([const], [AC_C_CONST]) -AC_DEFUN([AC_C_CONST], -[AC_CACHE_CHECK([for an ANSI C-conforming const], ac_cv_c_const, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], -[[/* FIXME: Include the comments suggested by Paul. */ -#ifndef __cplusplus - /* Ultrix mips cc rejects this. */ - typedef int charset[2]; - const charset cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* NEC SVR4.0.2 mips cc rejects this. */ - struct point {int x, y;}; - static struct point const zero = {0,0}; - /* AIX XL C 1.02.0.0 rejects this. - It does not let you subtract one const X* pointer from another in - an arm of an if-expression whose if-part is not a constant - expression */ - const char *g = "string"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 0; - } - { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ - int x[] = {25, 17}; - const int *foo = &x[0]; - ++foo; - } - { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ - typedef const int *iptr; - iptr p = 0; - ++p; - } - { /* AIX XL C 1.02.0.0 rejects this saying - "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ - struct s { int j; const int *ap[3]; }; - struct s *b; b->j = 5; - } - { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ - const int foo = 10; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif -]])], - [ac_cv_c_const=yes], - [ac_cv_c_const=no])]) -if test $ac_cv_c_const = no; then - AC_DEFINE(const,, - [Define to empty if `const' does not conform to ANSI C.]) -fi -])# AC_C_CONST - - -# AC_C_RESTRICT -# ------------- -# based on acx_restrict.m4, from the GNU Autoconf Macro Archive at: -# http://autoconf-archive.cryp.to/acx_restrict.html -# -# Determine whether the C/C++ compiler supports the "restrict" keyword -# introduced in ANSI C99, or an equivalent. Do nothing if the compiler -# accepts it. Otherwise, if the compiler supports an equivalent, -# define "restrict" to be that. Here are some variants: -# - GCC supports both __restrict and __restrict__ -# - older DEC Alpha C compilers support only __restrict -# - _Restrict is the only spelling accepted by Sun WorkShop 6 update 2 C -# Otherwise, define "restrict" to be empty. -AN_IDENTIFIER([restrict], [AC_C_RESTRICT]) -AC_DEFUN([AC_C_RESTRICT], -[AC_CACHE_CHECK([for C/C++ restrict keyword], ac_cv_c_restrict, - [ac_cv_c_restrict=no - # Try the official restrict keyword, then gcc's __restrict, and - # the less common variants. - for ac_kw in restrict __restrict __restrict__ _Restrict; do - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; - }]], - [[int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t)]])], - [ac_cv_c_restrict=$ac_kw]) - test "$ac_cv_c_restrict" != no && break - done - ]) - case $ac_cv_c_restrict in - restrict) ;; - no) AC_DEFINE(restrict,, - [Define to equivalent of C99 restrict keyword, or to nothing if this - is not supported. Do not define if restrict is supported directly.]) ;; - *) AC_DEFINE_UNQUOTED(restrict, $ac_cv_c_restrict) ;; - esac -])# AC_C_RESTRICT - - -# AC_C_VOLATILE -# ------------- -# Note that, unlike const, #defining volatile to be the empty string can -# actually turn a correct program into an incorrect one, since removing -# uses of volatile actually grants the compiler permission to perform -# optimizations that could break the user's code. So, do not #define -# volatile away unless it is really necessary to allow the user's code -# to compile cleanly. Benign compiler failures should be tolerated. -AN_IDENTIFIER([volatile], [AC_C_VOLATILE]) -AC_DEFUN([AC_C_VOLATILE], -[AC_CACHE_CHECK([for working volatile], ac_cv_c_volatile, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [ -volatile int x; -int * volatile y = (int *) 0; -return !x && !y;])], - [ac_cv_c_volatile=yes], - [ac_cv_c_volatile=no])]) -if test $ac_cv_c_volatile = no; then - AC_DEFINE(volatile,, - [Define to empty if the keyword `volatile' does not work. - Warning: valid code using `volatile' can become incorrect - without. Disable with care.]) -fi -])# AC_C_VOLATILE - - -# AC_C_STRINGIZE -# -------------- -# Checks if `#' can be used to glue strings together at the CPP level. -# Defines HAVE_STRINGIZE if positive. -AC_DEFUN([AC_C_STRINGIZE], -[AC_CACHE_CHECK([for preprocessor stringizing operator], - [ac_cv_c_stringize], -[AC_EGREP_CPP([@%:@teststring], - [@%:@define x(y) #y - -char *s = x(teststring);], - [ac_cv_c_stringize=no], - [ac_cv_c_stringize=yes])]) -if test $ac_cv_c_stringize = yes; then - AC_DEFINE(HAVE_STRINGIZE, 1, - [Define to 1 if cpp supports the ANSI @%:@ stringizing operator.]) -fi -])# AC_C_STRINGIZE - - -# AC_C_PROTOTYPES -# --------------- -# Check if the C compiler supports prototypes, included if it needs -# options. -AC_DEFUN([AC_C_PROTOTYPES], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_MSG_CHECKING([for function prototypes]) -if test "$ac_cv_prog_cc_c89" != no; then - AC_MSG_RESULT([yes]) - AC_DEFINE(PROTOTYPES, 1, - [Define to 1 if the C compiler supports function prototypes.]) - AC_DEFINE(__PROTOTYPES, 1, - [Define like PROTOTYPES; this can be used by system headers.]) -else - AC_MSG_RESULT([no]) -fi -])# AC_C_PROTOTYPES - - -# AC_C_FLEXIBLE_ARRAY_MEMBER -# -------------------------- -# Check whether the C compiler supports flexible array members. -AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER], -[ - AC_CACHE_CHECK([for flexible array members], - ac_cv_c_flexmember, - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - #include - #include - struct s { int n; double d[]; };]], - [[int m = getchar (); - struct s *p = malloc (offsetof (struct s, d) - + m * sizeof (double)); - p->d[0] = 0.0; - return p->d != (double *) NULL;]])], - [ac_cv_c_flexmember=yes], - [ac_cv_c_flexmember=no])]) - if test $ac_cv_c_flexmember = yes; then - AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [], - [Define to nothing if C supports flexible array members, and to - 1 if it does not. That way, with a declaration like `struct s - { int n; double d@<:@FLEXIBLE_ARRAY_MEMBER@:>@; };', the struct hack - can be used with pre-C99 compilers. - When computing the size of such an object, don't use 'sizeof (struct s)' - as it overestimates the size. Use 'offsetof (struct s, d)' instead. - Don't use 'offsetof (struct s, d@<:@0@:>@)', as this doesn't work with - MSVC and with C++ compilers.]) - else - AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], 1) - fi -]) - - -# AC_C_VARARRAYS -# -------------- -# Check whether the C compiler supports variable-length arrays. -AC_DEFUN([AC_C_VARARRAYS], -[ - AC_CACHE_CHECK([for variable-length arrays], - ac_cv_c_vararrays, - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([], - [[static int x; char a[++x]; a[sizeof a - 1] = 0; return a[0];]])], - [ac_cv_c_vararrays=yes], - [ac_cv_c_vararrays=no])]) - if test $ac_cv_c_vararrays = yes; then - AC_DEFINE([HAVE_C_VARARRAYS], 1, - [Define to 1 if C supports variable-length arrays.]) - fi -]) - - -# AC_C_TYPEOF -# ----------- -# Check if the C compiler supports GCC's typeof syntax. -# The test case provokes incompatibilities in the Sun C compilers -# (both Solaris 8 and Solaris 10). -AC_DEFUN([AC_C_TYPEOF], -[ - AC_CACHE_CHECK([for typeof syntax and keyword spelling], ac_cv_c_typeof, - [ac_cv_c_typeof=no - for ac_kw in typeof __typeof__ no; do - test $ac_kw = no && break - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], - [[ - int value; - typedef struct { - char a [1 - + ! (($ac_kw (value)) - (($ac_kw (value)) 0 < ($ac_kw (value)) -1 - ? ($ac_kw (value)) - 1 - : ~ (~ ($ac_kw (value)) 0 - << sizeof ($ac_kw (value)))))]; } - ac__typeof_type_; - return - (! ((void) ((ac__typeof_type_ *) 0), 0)); - ]])], - [ac_cv_c_typeof=$ac_kw]) - test $ac_cv_c_typeof != no && break - done]) - if test $ac_cv_c_typeof != no; then - AC_DEFINE([HAVE_TYPEOF], 1, - [Define to 1 if typeof works with your compiler.]) - if test $ac_cv_c_typeof != typeof; then - AC_DEFINE_UNQUOTED([typeof], [$ac_cv_c_typeof], - [Define to __typeof__ if your compiler spells it that way.]) - fi - fi -]) diff --git a/build/autoconf_prepend-include/autoconf/functions.m4 b/build/autoconf_prepend-include/autoconf/functions.m4 deleted file mode 100644 index 4efa980250..0000000000 --- a/build/autoconf_prepend-include/autoconf/functions.m4 +++ /dev/null @@ -1,2048 +0,0 @@ -# This file is part of Autoconf. -*- Autoconf -*- -# Checking for functions. -# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software -# Foundation, Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception, the Free Software Foundation gives unlimited -# permission to copy, distribute and modify the configure scripts that -# are the output of Autoconf. You need not follow the terms of the GNU -# General Public License when using or distributing such scripts, even -# though portions of the text of Autoconf appear in them. The GNU -# General Public License (GPL) does govern all other use of the material -# that constitutes the Autoconf program. -# -# Certain portions of the Autoconf source text are designed to be copied -# (in certain cases, depending on the input) into the output of -# Autoconf. We call these the "data" portions. The rest of the Autoconf -# source text consists of comments plus executable code that decides which -# of the data portions to output in any given case. We call these -# comments and executable code the "non-data" portions. Autoconf never -# copies any of the non-data portions into its output. -# -# This special exception to the GPL applies to versions of Autoconf -# released by the Free Software Foundation. When you make and -# distribute a modified version of Autoconf, you may extend this special -# exception to the GPL to apply to your modified version as well, *unless* -# your modified version has the potential to copy into its output some -# of the text that was the non-data portion of the version that you started -# with. (In other words, unless your change moves or copies text from -# the non-data portions to the data portions.) If your modification has -# such potential, you must delete any notice of this special exception -# to the GPL from your modified version. -# -# Written by David MacKenzie, with help from -# Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, -# Roland McGrath, Noah Friedman, david d zuhn, and many others. - - -# Table of contents -# -# 1. Generic tests for functions. -# 2. Functions to check with AC_CHECK_FUNCS -# 3. Tests for specific functions. - - -## -------------------------------- ## -## 1. Generic tests for functions. ## -## -------------------------------- ## - - -# AC_CHECK_FUNC(FUNCTION, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# ----------------------------------------------------------------- -AC_DEFUN([AC_CHECK_FUNC], -[AS_VAR_PUSHDEF([ac_var], [ac_cv_func_$1])dnl -AC_CACHE_CHECK([for $1], [ac_var], -[AC_LINK_IFELSE([AC_LANG_FUNC_LINK_TRY([$1])], - [AS_VAR_SET([ac_var], [yes])], - [AS_VAR_SET([ac_var], [no])])]) -AS_IF([test AS_VAR_GET([ac_var]) = yes], [$2], [$3])dnl -AS_VAR_POPDEF([ac_var])dnl -])# AC_CHECK_FUNC - - -# _AH_CHECK_FUNCS(FUNCTION...) -# ---------------------------- -m4_define([_AH_CHECK_FUNCS], -[m4_foreach_w([AC_Func], [$1], - [AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([AC_Func])), - [Define to 1 if you have the `]m4_defn([AC_Func])[' function.])])]) - - -# AC_CHECK_FUNCS(FUNCTION..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# --------------------------------------------------------------------- -AC_DEFUN([AC_CHECK_FUNCS], -[_AH_CHECK_FUNCS([$1])dnl -for ac_func in $1 -do -AC_CHECK_FUNC($ac_func, - [AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$ac_func])]) $2], - [$3])dnl -done -]) - - -# AC_CHECK_FUNCS_ONCE(FUNCTION...) -# -------------------------------- -AC_DEFUN([AC_CHECK_FUNCS_ONCE], -[ - _AH_CHECK_FUNCS([$1]) - m4_foreach_w([AC_Func], [$1], - [AC_DEFUN([_AC_Func_]m4_defn([AC_Func]), - [m4_divert_text([INIT_PREPARE], - [ac_func_list="$ac_func_list AC_Func"]) - _AC_FUNCS_EXPANSION]) - AC_REQUIRE([_AC_Func_]m4_defn([AC_Func]))]) -]) -m4_define([_AC_FUNCS_EXPANSION], -[ - m4_divert_text([DEFAULTS], [ac_func_list=]) - AC_CHECK_FUNCS([$ac_func_list]) - m4_define([_AC_FUNCS_EXPANSION], []) -]) - - -# AC_REPLACE_FUNCS(FUNCTION...) -# ----------------------------- -AC_DEFUN([AC_REPLACE_FUNCS], -[m4_foreach_w([AC_Func], [$1], [AC_LIBSOURCE(AC_Func.c)])dnl -AC_CHECK_FUNCS([$1], , [_AC_LIBOBJ($ac_func)]) -]) - - -# AC_TRY_LINK_FUNC(FUNC, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND) -# ------------------------------------------------------------ -# Try to link a program that calls FUNC, handling GCC builtins. If -# the link succeeds, execute ACTION-IF-FOUND; otherwise, execute -# ACTION-IF-NOT-FOUND. -AC_DEFUN([AC_TRY_LINK_FUNC], -[AC_LINK_IFELSE([AC_LANG_CALL([], [$1])], [$2], [$3])]) - - -# AU::AC_FUNC_CHECK -# ----------------- -AU_ALIAS([AC_FUNC_CHECK], [AC_CHECK_FUNC]) - - -# AU::AC_HAVE_FUNCS -# ----------------- -AU_ALIAS([AC_HAVE_FUNCS], [AC_CHECK_FUNCS]) - - - - -## ------------------------------------------- ## -## 2. Functions to check with AC_CHECK_FUNCS. ## -## ------------------------------------------- ## - -AN_FUNCTION([__argz_count], [AC_CHECK_FUNCS]) -AN_FUNCTION([__argz_next], [AC_CHECK_FUNCS]) -AN_FUNCTION([__argz_stringify], [AC_CHECK_FUNCS]) -AN_FUNCTION([__fpending], [AC_CHECK_FUNCS]) -AN_FUNCTION([acl], [AC_CHECK_FUNCS]) -AN_FUNCTION([alarm], [AC_CHECK_FUNCS]) -AN_FUNCTION([atexit], [AC_CHECK_FUNCS]) -AN_FUNCTION([btowc], [AC_CHECK_FUNCS]) -AN_FUNCTION([bzero], [AC_CHECK_FUNCS]) -AN_FUNCTION([clock_gettime], [AC_CHECK_FUNCS]) -AN_FUNCTION([doprnt], [AC_CHECK_FUNCS]) -AN_FUNCTION([dup2], [AC_CHECK_FUNCS]) -AN_FUNCTION([endgrent], [AC_CHECK_FUNCS]) -AN_FUNCTION([endpwent], [AC_CHECK_FUNCS]) -AN_FUNCTION([euidaccess], [AC_CHECK_FUNCS]) -AN_FUNCTION([fchdir], [AC_CHECK_FUNCS]) -AN_FUNCTION([fdatasync], [AC_CHECK_FUNCS]) -AN_FUNCTION([fesetround], [AC_CHECK_FUNCS]) -AN_FUNCTION([floor], [AC_CHECK_FUNCS]) -AN_FUNCTION([fs_stat_dev], [AC_CHECK_FUNCS]) -AN_FUNCTION([ftime], [AC_CHECK_FUNCS]) -AN_FUNCTION([ftruncate], [AC_CHECK_FUNCS]) -AN_FUNCTION([getcwd], [AC_CHECK_FUNCS]) -AN_FUNCTION([getdelim], [AC_CHECK_FUNCS]) -AN_FUNCTION([gethostbyaddr], [AC_CHECK_FUNCS]) -AN_FUNCTION([gethostbyname], [AC_CHECK_FUNCS]) -AN_FUNCTION([gethostname], [AC_CHECK_FUNCS]) -AN_FUNCTION([gethrtime], [AC_CHECK_FUNCS]) -AN_FUNCTION([getmntent], [AC_CHECK_FUNCS]) -AN_FUNCTION([getmntinfo], [AC_CHECK_FUNCS]) -AN_FUNCTION([getpagesize], [AC_CHECK_FUNCS]) -AN_FUNCTION([getpass], [AC_CHECK_FUNCS]) -AN_FUNCTION([getspnam], [AC_CHECK_FUNCS]) -AN_FUNCTION([gettimeofday], [AC_CHECK_FUNCS]) -AN_FUNCTION([getusershell], [AC_CHECK_FUNCS]) -AN_FUNCTION([hasmntopt], [AC_CHECK_FUNCS]) -AN_FUNCTION([inet_ntoa], [AC_CHECK_FUNCS]) -AN_FUNCTION([isascii], [AC_CHECK_FUNCS]) -AN_FUNCTION([iswprint], [AC_CHECK_FUNCS]) -AN_FUNCTION([lchown], [AC_CHECK_FUNCS]) -AN_FUNCTION([listmntent], [AC_CHECK_FUNCS]) -AN_FUNCTION([localeconv], [AC_CHECK_FUNCS]) -AN_FUNCTION([localtime_r], [AC_CHECK_FUNCS]) -AN_FUNCTION([mblen], [AC_CHECK_FUNCS]) -AN_FUNCTION([mbrlen], [AC_CHECK_FUNCS]) -AN_FUNCTION([memchr], [AC_CHECK_FUNCS]) -AN_FUNCTION([memmove], [AC_CHECK_FUNCS]) -AN_FUNCTION([mempcpy], [AC_CHECK_FUNCS]) -AN_FUNCTION([memset], [AC_CHECK_FUNCS]) -AN_FUNCTION([mkdir], [AC_CHECK_FUNCS]) -AN_FUNCTION([mkfifo], [AC_CHECK_FUNCS]) -AN_FUNCTION([modf], [AC_CHECK_FUNCS]) -AN_FUNCTION([munmap], [AC_CHECK_FUNCS]) -AN_FUNCTION([next_dev], [AC_CHECK_FUNCS]) -AN_FUNCTION([nl_langinfo], [AC_CHECK_FUNCS]) -AN_FUNCTION([pathconf], [AC_CHECK_FUNCS]) -AN_FUNCTION([pow], [AC_CHECK_FUNCS]) -AN_FUNCTION([pstat_getdynamic], [AC_CHECK_FUNCS]) -AN_FUNCTION([putenv], [AC_CHECK_FUNCS]) -AN_FUNCTION([re_comp], [AC_CHECK_FUNCS]) -AN_FUNCTION([realpath], [AC_CHECK_FUNCS]) -AN_FUNCTION([regcmp], [AC_CHECK_FUNCS]) -AN_FUNCTION([regcomp], [AC_CHECK_FUNCS]) -AN_FUNCTION([resolvepath], [AC_CHECK_FUNCS]) -AN_FUNCTION([rint], [AC_CHECK_FUNCS]) -AN_FUNCTION([rmdir], [AC_CHECK_FUNCS]) -AN_FUNCTION([rpmatch], [AC_CHECK_FUNCS]) -AN_FUNCTION([select], [AC_CHECK_FUNCS]) -AN_FUNCTION([setenv], [AC_CHECK_FUNCS]) -AN_FUNCTION([sethostname], [AC_CHECK_FUNCS]) -AN_FUNCTION([setlocale], [AC_CHECK_FUNCS]) -AN_FUNCTION([socket], [AC_CHECK_FUNCS]) -AN_FUNCTION([sqrt], [AC_CHECK_FUNCS]) -AN_FUNCTION([stime], [AC_CHECK_FUNCS]) -AN_FUNCTION([stpcpy], [AC_CHECK_FUNCS]) -AN_FUNCTION([strcasecmp], [AC_CHECK_FUNCS]) -AN_FUNCTION([strchr], [AC_CHECK_FUNCS]) -AN_FUNCTION([strcspn], [AC_CHECK_FUNCS]) -AN_FUNCTION([strdup], [AC_CHECK_FUNCS]) -AN_FUNCTION([strerror], [AC_CHECK_FUNCS]) -AN_FUNCTION([strncasecmp], [AC_CHECK_FUNCS]) -AN_FUNCTION([strndup], [AC_CHECK_FUNCS]) -AN_FUNCTION([strpbrk], [AC_CHECK_FUNCS]) -AN_FUNCTION([strrchr], [AC_CHECK_FUNCS]) -AN_FUNCTION([strspn], [AC_CHECK_FUNCS]) -AN_FUNCTION([strstr], [AC_CHECK_FUNCS]) -AN_FUNCTION([strtol], [AC_CHECK_FUNCS]) -AN_FUNCTION([strtoul], [AC_CHECK_FUNCS]) -AN_FUNCTION([strtoull], [AC_CHECK_FUNCS]) -AN_FUNCTION([strtoumax], [AC_CHECK_FUNCS]) -AN_FUNCTION([strverscmp], [AC_CHECK_FUNCS]) -AN_FUNCTION([sysinfo], [AC_CHECK_FUNCS]) -AN_FUNCTION([tzset], [AC_CHECK_FUNCS]) -AN_FUNCTION([uname], [AC_CHECK_FUNCS]) -AN_FUNCTION([utime], [AC_CHECK_FUNCS]) -AN_FUNCTION([utmpname], [AC_CHECK_FUNCS]) -AN_FUNCTION([utmpxname], [AC_CHECK_FUNCS]) -AN_FUNCTION([wcwidth], [AC_CHECK_FUNCS]) - - -AN_FUNCTION([dcgettext], [AM_GNU_GETTEXT]) -AN_FUNCTION([getwd], [warn: getwd is deprecated, use getcwd instead]) - - -## --------------------------------- ## -## 3. Tests for specific functions. ## -## --------------------------------- ## - - -# The macros are sorted: -# -# 1. AC_FUNC_* macros are sorted by alphabetical order. -# -# 2. Helping macros such as _AC_LIBOBJ_* are before the macro that -# uses it. -# -# 3. Obsolete macros are right after the modern macro. - - - -# _AC_LIBOBJ_ALLOCA -# ----------------- -# Set up the LIBOBJ replacement of `alloca'. Well, not exactly -# AC_LIBOBJ since we actually set the output variable `ALLOCA'. -# Nevertheless, for Automake, AC_LIBSOURCES it. -m4_define([_AC_LIBOBJ_ALLOCA], -[# The SVR3 libPW and SVR4 libucb both contain incompatible functions -# that cause trouble. Some versions do not even contain alloca or -# contain a buggy version. If you still want to use their alloca, -# use ar to extract alloca.o from them instead of compiling alloca.c. -AC_LIBSOURCES(alloca.c) -AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl -AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using `alloca.c'.]) - -AC_CACHE_CHECK(whether `alloca.c' needs Cray hooks, ac_cv_os_cray, -[AC_EGREP_CPP(webecray, -[#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif -], ac_cv_os_cray=yes, ac_cv_os_cray=no)]) -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - AC_CHECK_FUNC($ac_func, - [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func, - [Define to one of `_getb67', `GETB67', - `getb67' for Cray-2 and Cray-YMP - systems. This function is required for - `alloca.c' support on those systems.]) - break]) - done -fi - -AC_CACHE_CHECK([stack direction for C alloca], - [ac_cv_c_stack_direction], -[AC_RUN_IFELSE([AC_LANG_SOURCE( -[AC_INCLUDES_DEFAULT -int -find_stack_direction () -{ - static char *addr = 0; - auto char dummy; - if (addr == 0) - { - addr = &dummy; - return find_stack_direction (); - } - else - return (&dummy > addr) ? 1 : -1; -} - -int -main () -{ - return find_stack_direction () < 0; -}])], - [ac_cv_c_stack_direction=1], - [ac_cv_c_stack_direction=-1], - [ac_cv_c_stack_direction=0])]) -AH_VERBATIM([STACK_DIRECTION], -[/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -@%:@undef STACK_DIRECTION])dnl -AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) -])# _AC_LIBOBJ_ALLOCA - - -# AC_FUNC_ALLOCA -# -------------- -AN_FUNCTION([alloca], [AC_FUNC_ALLOCA]) -AN_HEADER([alloca.h], [AC_FUNC_ALLOCA]) -AC_DEFUN([AC_FUNC_ALLOCA], -[# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -AC_CACHE_CHECK([for working alloca.h], ac_cv_working_alloca_h, -[AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[@%:@include ]], - [[char *p = (char *) alloca (2 * sizeof (int)); - if (p) return 0;]])], - [ac_cv_working_alloca_h=yes], - [ac_cv_working_alloca_h=no])]) -if test $ac_cv_working_alloca_h = yes; then - AC_DEFINE(HAVE_ALLOCA_H, 1, - [Define to 1 if you have and it should be used - (not on Ultrix).]) -fi - -AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works, -[AC_LINK_IFELSE([AC_LANG_PROGRAM( -[[#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER -# include -# define alloca _alloca -# else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -char *alloca (); -# endif -# endif -# endif -# endif -#endif -]], [[char *p = (char *) alloca (1); - if (p) return 0;]])], - [ac_cv_func_alloca_works=yes], - [ac_cv_func_alloca_works=no])]) - -if test $ac_cv_func_alloca_works = yes; then - AC_DEFINE(HAVE_ALLOCA, 1, - [Define to 1 if you have `alloca', as a function or macro.]) -else - _AC_LIBOBJ_ALLOCA -fi -])# AC_FUNC_ALLOCA - - -# AU::AC_ALLOCA -# ------------- -AU_ALIAS([AC_ALLOCA], [AC_FUNC_ALLOCA]) - - -# AC_FUNC_CHOWN -# ------------- -# Determine whether chown accepts arguments of -1 for uid and gid. -AN_FUNCTION([chown], [AC_FUNC_CHOWN]) -AC_DEFUN([AC_FUNC_CHOWN], -[AC_REQUIRE([AC_TYPE_UID_T])dnl -AC_CHECK_HEADERS(unistd.h) -AC_CACHE_CHECK([for working chown], ac_cv_func_chown_works, -[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT -#include -], -[[ char *f = "conftest.chown"; - struct stat before, after; - - if (creat (f, 0600) < 0) - return 1; - if (stat (f, &before) < 0) - return 1; - if (chown (f, (uid_t) -1, (gid_t) -1) == -1) - return 1; - if (stat (f, &after) < 0) - return 1; - return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid); -]])], - [ac_cv_func_chown_works=yes], - [ac_cv_func_chown_works=no], - [ac_cv_func_chown_works=no]) -rm -f conftest.chown -]) -if test $ac_cv_func_chown_works = yes; then - AC_DEFINE(HAVE_CHOWN, 1, - [Define to 1 if your system has a working `chown' function.]) -fi -])# AC_FUNC_CHOWN - - -# AC_FUNC_CLOSEDIR_VOID -# --------------------- -# Check whether closedir returns void, and #define CLOSEDIR_VOID in -# that case. -AN_FUNCTION([closedir], [AC_FUNC_CLOSEDIR_VOID]) -AC_DEFUN([AC_FUNC_CLOSEDIR_VOID], -[AC_REQUIRE([AC_HEADER_DIRENT])dnl -AC_CACHE_CHECK([whether closedir returns void], - [ac_cv_func_closedir_void], -[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT -#include <$ac_header_dirent> -#ifndef __cplusplus -int closedir (); -#endif -], - [[return closedir (opendir (".")) != 0;]])], - [ac_cv_func_closedir_void=no], - [ac_cv_func_closedir_void=yes], - [ac_cv_func_closedir_void=yes])]) -if test $ac_cv_func_closedir_void = yes; then - AC_DEFINE(CLOSEDIR_VOID, 1, - [Define to 1 if the `closedir' function returns void instead - of `int'.]) -fi -]) - - -# AC_FUNC_ERROR_AT_LINE -# --------------------- -AN_FUNCTION([error], [AC_FUNC_ERROR_AT_LINE]) -AN_FUNCTION([error_at_line], [AC_FUNC_ERROR_AT_LINE]) -AC_DEFUN([AC_FUNC_ERROR_AT_LINE], -[AC_LIBSOURCES([error.h, error.c])dnl -AC_CACHE_CHECK([for error_at_line], ac_cv_lib_error_at_line, -[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], - [error_at_line (0, 0, "", 0, "an error occurred");])], - [ac_cv_lib_error_at_line=yes], - [ac_cv_lib_error_at_line=no])]) -if test $ac_cv_lib_error_at_line = no; then - AC_LIBOBJ(error) -fi -]) - - -# AU::AM_FUNC_ERROR_AT_LINE -# ------------------------- -AU_ALIAS([AM_FUNC_ERROR_AT_LINE], [AC_FUNC_ERROR_AT_LINE]) - - -# _AC_FUNC_FNMATCH_IF(STANDARD = GNU | POSIX, CACHE_VAR, IF-TRUE, IF-FALSE) -# ------------------------------------------------------------------------- -# If a STANDARD compliant fnmatch is found, run IF-TRUE, otherwise -# IF-FALSE. Use CACHE_VAR. -AC_DEFUN([_AC_FUNC_FNMATCH_IF], -[AC_CACHE_CHECK( - [for working $1 fnmatch], - [$2], - [# Some versions of Solaris, SCO, and the GNU C Library - # have a broken or incompatible fnmatch. - # So we run a test program. If we are cross-compiling, take no chance. - # Thanks to John Oleynick, Franc,ois Pinard, and Paul Eggert for this test. - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [#include -# define y(a, b, c) (fnmatch (a, b, c) == 0) -# define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH) - ], - [return - (!(y ("a*", "abc", 0) - && n ("d*/*1", "d/s/1", FNM_PATHNAME) - && y ("a\\\\bc", "abc", 0) - && n ("a\\\\bc", "abc", FNM_NOESCAPE) - && y ("*x", ".x", 0) - && n ("*x", ".x", FNM_PERIOD) - && m4_if([$1], [GNU], - [y ("xxXX", "xXxX", FNM_CASEFOLD) - && y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH) - && n ("d*/*1", "d/s/1", FNM_FILE_NAME) - && y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR) - && y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR) - && y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)], - 1)));])], - [$2=yes], - [$2=no], - [$2=cross])]) -AS_IF([test $$2 = yes], [$3], [$4]) -])# _AC_FUNC_FNMATCH_IF - - -# AC_FUNC_FNMATCH -# --------------- -AC_DEFUN([AC_FUNC_FNMATCH], -[_AC_FUNC_FNMATCH_IF([POSIX], [ac_cv_func_fnmatch_works], - [AC_DEFINE([HAVE_FNMATCH], 1, - [Define to 1 if your system has a working POSIX `fnmatch' - function.])]) -])# AC_FUNC_FNMATCH - - -# _AC_LIBOBJ_FNMATCH -# ------------------ -# Prepare the replacement of fnmatch. -AC_DEFUN([_AC_LIBOBJ_FNMATCH], -[AC_REQUIRE([AC_C_CONST])dnl -AC_REQUIRE([AC_FUNC_ALLOCA])dnl -AC_REQUIRE([AC_TYPE_MBSTATE_T])dnl -AC_CHECK_DECLS([getenv]) -AC_CHECK_FUNCS([btowc mbsrtowcs mempcpy wmempcpy]) -AC_CHECK_HEADERS([wchar.h wctype.h]) -AC_LIBOBJ([fnmatch]) -AC_CONFIG_LINKS([$ac_config_libobj_dir/fnmatch.h:$ac_config_libobj_dir/fnmatch_.h]) -AC_DEFINE(fnmatch, rpl_fnmatch, - [Define to rpl_fnmatch if the replacement function should be used.]) -])# _AC_LIBOBJ_FNMATCH - - -# AC_REPLACE_FNMATCH -# ------------------ -AN_FUNCTION([fnmatch], [AC_REPLACE_FNMATCH]) -AC_DEFUN([AC_REPLACE_FNMATCH], -[_AC_FUNC_FNMATCH_IF([POSIX], [ac_cv_func_fnmatch_works], - [rm -f "$ac_config_libobj_dir/fnmatch.h"], - [_AC_LIBOBJ_FNMATCH]) -])# AC_REPLACE_FNMATCH - - -# AC_FUNC_FNMATCH_GNU -# ------------------- -AC_DEFUN([AC_FUNC_FNMATCH_GNU], -[AC_REQUIRE([AC_GNU_SOURCE]) -_AC_FUNC_FNMATCH_IF([GNU], [ac_cv_func_fnmatch_gnu], - [rm -f "$ac_config_libobj_dir/fnmatch.h"], - [_AC_LIBOBJ_FNMATCH]) -])# AC_FUNC_FNMATCH_GNU - - -# AU::AM_FUNC_FNMATCH -# AU::fp_FUNC_FNMATCH -# ------------------- -AU_ALIAS([AM_FUNC_FNMATCH], [AC_FUNC_FNMATCH]) -AU_ALIAS([fp_FUNC_FNMATCH], [AC_FUNC_FNMATCH]) - - -# AC_FUNC_FSEEKO -# -------------- -AN_FUNCTION([ftello], [AC_FUNC_FSEEKO]) -AN_FUNCTION([fseeko], [AC_FUNC_FSEEKO]) -AC_DEFUN([AC_FUNC_FSEEKO], -[_AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1, - [ac_cv_sys_largefile_source], - [Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).], - [[#include /* for off_t */ - #include ]], - [[int (*fp) (FILE *, off_t, int) = fseeko; - return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);]]) - -# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug -# in glibc 2.1.3, but that breaks too many other things. -# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. -if test $ac_cv_sys_largefile_source != unknown; then - AC_DEFINE(HAVE_FSEEKO, 1, - [Define to 1 if fseeko (and presumably ftello) exists and is declared.]) -fi -])# AC_FUNC_FSEEKO - - -# AC_FUNC_GETGROUPS -# ----------------- -# Try to find `getgroups', and check that it works. -# When cross-compiling, assume getgroups is broken. -AN_FUNCTION([getgroups], [AC_FUNC_GETGROUPS]) -AC_DEFUN([AC_FUNC_GETGROUPS], -[AC_REQUIRE([AC_TYPE_GETGROUPS])dnl -AC_REQUIRE([AC_TYPE_SIZE_T])dnl -AC_CHECK_FUNC(getgroups) - -# If we don't yet have getgroups, see if it's in -lbsd. -# This is reported to be necessary on an ITOS 3000WS running SEIUX 3.1. -ac_save_LIBS=$LIBS -if test $ac_cv_func_getgroups = no; then - AC_CHECK_LIB(bsd, getgroups, [GETGROUPS_LIB=-lbsd]) -fi - -# Run the program to test the functionality of the system-supplied -# getgroups function only if there is such a function. -if test $ac_cv_func_getgroups = yes; then - AC_CACHE_CHECK([for working getgroups], ac_cv_func_getgroups_works, - [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], - [[/* On Ultrix 4.3, getgroups (0, 0) always fails. */ - return getgroups (0, 0) == -1;]])], - [ac_cv_func_getgroups_works=yes], - [ac_cv_func_getgroups_works=no], - [ac_cv_func_getgroups_works=no]) - ]) - if test $ac_cv_func_getgroups_works = yes; then - AC_DEFINE(HAVE_GETGROUPS, 1, - [Define to 1 if your system has a working `getgroups' function.]) - fi -fi -LIBS=$ac_save_LIBS -])# AC_FUNC_GETGROUPS - - -# _AC_LIBOBJ_GETLOADAVG -# --------------------- -# Set up the AC_LIBOBJ replacement of `getloadavg'. -m4_define([_AC_LIBOBJ_GETLOADAVG], -[AC_LIBOBJ(getloadavg) -AC_DEFINE(C_GETLOADAVG, 1, [Define to 1 if using `getloadavg.c'.]) -# Figure out what our getloadavg.c needs. -ac_have_func=no -AC_CHECK_HEADER(sys/dg_sys_info.h, -[ac_have_func=yes - AC_DEFINE(DGUX, 1, [Define to 1 for DGUX with .]) - AC_CHECK_LIB(dgc, dg_sys_info)]) - -AC_CHECK_HEADER(locale.h) -AC_CHECK_FUNCS(setlocale) - -# We cannot check for , because Solaris 2 does not use dwarf (it -# uses stabs), but it is still SVR4. We cannot check for because -# Irix 4.0.5F has the header but not the library. -if test $ac_have_func = no && test "$ac_cv_lib_elf_elf_begin" = yes; then - ac_have_func=yes - AC_DEFINE(SVR4, 1, [Define to 1 on System V Release 4.]) -fi - -if test $ac_have_func = no; then - AC_CHECK_HEADER(inq_stats/cpustats.h, - [ac_have_func=yes - AC_DEFINE(UMAX, 1, [Define to 1 for Encore UMAX.]) - AC_DEFINE(UMAX4_3, 1, - [Define to 1 for Encore UMAX 4.3 that has - instead of .])]) -fi - -if test $ac_have_func = no; then - AC_CHECK_HEADER(sys/cpustats.h, - [ac_have_func=yes; AC_DEFINE(UMAX)]) -fi - -if test $ac_have_func = no; then - AC_CHECK_HEADERS(mach/mach.h) -fi - -AC_CHECK_HEADERS(nlist.h, -[AC_CHECK_MEMBERS([struct nlist.n_un.n_name], - [AC_DEFINE(NLIST_NAME_UNION, 1, - [Define to 1 if your `struct nlist' has an - `n_un' member. Obsolete, depend on - `HAVE_STRUCT_NLIST_N_UN_N_NAME])], [], - [@%:@include ]) -])dnl -])# _AC_LIBOBJ_GETLOADAVG - - -# AC_FUNC_GETLOADAVG -# ------------------ -AN_FUNCTION([getloadavg], [AC_FUNC_GETLOADAVG]) -AC_DEFUN([AC_FUNC_GETLOADAVG], -[ac_have_func=no # yes means we've found a way to get the load average. - -# Make sure getloadavg.c is where it belongs, at configure-time. -test -f "$srcdir/$ac_config_libobj_dir/getloadavg.c" || - AC_MSG_ERROR([$srcdir/$ac_config_libobj_dir/getloadavg.c is missing]) - -ac_save_LIBS=$LIBS - -# Check for getloadavg, but be sure not to touch the cache variable. -(AC_CHECK_FUNC(getloadavg, exit 0, exit 1)) && ac_have_func=yes - -# On HPUX9, an unprivileged user can get load averages through this function. -AC_CHECK_FUNCS(pstat_getdynamic) - -# Solaris has libkstat which does not require root. -AC_CHECK_LIB(kstat, kstat_open) -test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes - -# Some systems with -lutil have (and need) -lkvm as well, some do not. -# On Solaris, -lkvm requires nlist from -lelf, so check that first -# to get the right answer into the cache. -# For kstat on solaris, we need libelf to force the definition of SVR4 below. -if test $ac_have_func = no; then - AC_CHECK_LIB(elf, elf_begin, LIBS="-lelf $LIBS") -fi -if test $ac_have_func = no; then - AC_CHECK_LIB(kvm, kvm_open, LIBS="-lkvm $LIBS") - # Check for the 4.4BSD definition of getloadavg. - AC_CHECK_LIB(util, getloadavg, - [LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes]) -fi - -if test $ac_have_func = no; then - # There is a commonly available library for RS/6000 AIX. - # Since it is not a standard part of AIX, it might be installed locally. - ac_getloadavg_LIBS=$LIBS - LIBS="-L/usr/local/lib $LIBS" - AC_CHECK_LIB(getloadavg, getloadavg, - [LIBS="-lgetloadavg $LIBS"], [LIBS=$ac_getloadavg_LIBS]) -fi - -# Make sure it is really in the library, if we think we found it, -# otherwise set up the replacement function. -AC_CHECK_FUNCS(getloadavg, [], - [_AC_LIBOBJ_GETLOADAVG]) - -# Some definitions of getloadavg require that the program be installed setgid. -AC_CACHE_CHECK(whether getloadavg requires setgid, - ac_cv_func_getloadavg_setgid, -[AC_EGREP_CPP([Yowza Am I SETGID yet], -[#include "$srcdir/$ac_config_libobj_dir/getloadavg.c" -#ifdef LDAV_PRIVILEGED -Yowza Am I SETGID yet -@%:@endif], - ac_cv_func_getloadavg_setgid=yes, - ac_cv_func_getloadavg_setgid=no)]) -if test $ac_cv_func_getloadavg_setgid = yes; then - NEED_SETGID=true - AC_DEFINE(GETLOADAVG_PRIVILEGED, 1, - [Define to 1 if the `getloadavg' function needs to be run setuid - or setgid.]) -else - NEED_SETGID=false -fi -AC_SUBST(NEED_SETGID)dnl - -if test $ac_cv_func_getloadavg_setgid = yes; then - AC_CACHE_CHECK(group of /dev/kmem, ac_cv_group_kmem, -[ # On Solaris, /dev/kmem is a symlink. Get info on the real file. - ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null` - # If we got an error (system does not support symlinks), try without -L. - test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem` - ac_cv_group_kmem=`echo $ac_ls_output \ - | sed -ne ['s/[ ][ ]*/ /g; - s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/; - / /s/.* //;p;']` -]) - AC_SUBST(KMEM_GROUP, $ac_cv_group_kmem)dnl -fi -if test "x$ac_save_LIBS" = x; then - GETLOADAVG_LIBS=$LIBS -else - GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"` -fi -LIBS=$ac_save_LIBS - -AC_SUBST(GETLOADAVG_LIBS)dnl -])# AC_FUNC_GETLOADAVG - - -# AU::AC_GETLOADAVG -# ----------------- -AU_ALIAS([AC_GETLOADAVG], [AC_FUNC_GETLOADAVG]) - - -# AC_FUNC_GETMNTENT -# ----------------- -AN_FUNCTION([getmntent], [AC_FUNC_GETMNTENT]) -AC_DEFUN([AC_FUNC_GETMNTENT], -[# getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, -# -lseq on Dynix/PTX, -lgen on Unixware. -AC_SEARCH_LIBS(getmntent, [sun seq gen], - [ac_cv_func_getmntent=yes - AC_DEFINE([HAVE_GETMNTENT], [1], - [Define to 1 if you have the `getmntent' function.])], - [ac_cv_func_getmntent=no]) -]) - - -# AC_FUNC_GETPGRP -# --------------- -# Figure out whether getpgrp requires zero arguments. -AN_FUNCTION([getpgrp], [AC_FUNC_GETPGRP]) -AC_DEFUN([AC_FUNC_GETPGRP], -[AC_CACHE_CHECK(whether getpgrp requires zero arguments, - ac_cv_func_getpgrp_void, -[# Use it with a single arg. -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [getpgrp (0);])], - [ac_cv_func_getpgrp_void=no], - [ac_cv_func_getpgrp_void=yes]) -]) -if test $ac_cv_func_getpgrp_void = yes; then - AC_DEFINE(GETPGRP_VOID, 1, - [Define to 1 if the `getpgrp' function requires zero arguments.]) -fi -])# AC_FUNC_GETPGRP - - -# AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK -# ------------------------------------- -# When cross-compiling, be pessimistic so we will end up using the -# replacement version of lstat that checks for trailing slashes and -# calls lstat a second time when necessary. -AN_FUNCTION([lstat], [AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) -AC_DEFUN([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK], -[AC_CACHE_CHECK( - [whether lstat dereferences a symlink specified with a trailing slash], - [ac_cv_func_lstat_dereferences_slashed_symlink], -[rm -f conftest.sym conftest.file -echo >conftest.file -if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], - [struct stat sbuf; - /* Linux will dereference the symlink and fail. - That is better in the sense that it means we will not - have to compile and use the lstat wrapper. */ - return lstat ("conftest.sym/", &sbuf) == 0;])], - [ac_cv_func_lstat_dereferences_slashed_symlink=yes], - [ac_cv_func_lstat_dereferences_slashed_symlink=no], - [ac_cv_func_lstat_dereferences_slashed_symlink=no]) -else - # If the `ln -s' command failed, then we probably don't even - # have an lstat function. - ac_cv_func_lstat_dereferences_slashed_symlink=no -fi -rm -f conftest.sym conftest.file -]) - -test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && - AC_DEFINE_UNQUOTED(LSTAT_FOLLOWS_SLASHED_SYMLINK, 1, - [Define to 1 if `lstat' dereferences a symlink specified - with a trailing slash.]) - -if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then - AC_LIBOBJ(lstat) -fi -]) - - -# _AC_FUNC_MALLOC_IF(IF-WORKS, IF-NOT) -# ------------------------------------ -# If `malloc (0)' properly handled, run IF-WORKS, otherwise, IF-NOT. -AC_DEFUN([_AC_FUNC_MALLOC_IF], -[AC_REQUIRE([AC_HEADER_STDC])dnl -AC_CHECK_HEADERS(stdlib.h) -AC_CACHE_CHECK([for GNU libc compatible malloc], ac_cv_func_malloc_0_nonnull, -[AC_RUN_IFELSE( -[AC_LANG_PROGRAM( -[[#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *malloc (); -#endif -]], - [return ! malloc (0);])], - [ac_cv_func_malloc_0_nonnull=yes], - [ac_cv_func_malloc_0_nonnull=no], - [ac_cv_func_malloc_0_nonnull=no])]) -AS_IF([test $ac_cv_func_malloc_0_nonnull = yes], [$1], [$2]) -])# AC_FUNC_MALLOC - - -# AC_FUNC_MALLOC -# -------------- -# Report whether `malloc (0)' properly handled, and replace malloc if -# needed. -AN_FUNCTION([malloc], [AC_FUNC_MALLOC]) -AC_DEFUN([AC_FUNC_MALLOC], -[_AC_FUNC_MALLOC_IF( - [AC_DEFINE([HAVE_MALLOC], 1, - [Define to 1 if your system has a GNU libc compatible `malloc' - function, and to 0 otherwise.])], - [AC_DEFINE([HAVE_MALLOC], 0) - AC_LIBOBJ(malloc) - AC_DEFINE([malloc], [rpl_malloc], - [Define to rpl_malloc if the replacement function should be used.])]) -])# AC_FUNC_MALLOC - - -# AC_FUNC_MBRTOWC -# --------------- -AN_FUNCTION([mbrtowc], [AC_FUNC_MBRTOWC]) -AC_DEFUN([AC_FUNC_MBRTOWC], -[ - AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared], - ac_cv_func_mbrtowc, - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[@%:@include ]], - [[wchar_t wc; - char const s[] = ""; - size_t n = 1; - mbstate_t state; - return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])], - ac_cv_func_mbrtowc=yes, - ac_cv_func_mbrtowc=no)]) - if test $ac_cv_func_mbrtowc = yes; then - AC_DEFINE([HAVE_MBRTOWC], 1, - [Define to 1 if mbrtowc and mbstate_t are properly declared.]) - fi -]) - - -# AC_FUNC_MEMCMP -# -------------- -AN_FUNCTION([memcmp], [AC_FUNC_MEMCMP]) -AC_DEFUN([AC_FUNC_MEMCMP], -[AC_CACHE_CHECK([for working memcmp], ac_cv_func_memcmp_working, -[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[ - /* Some versions of memcmp are not 8-bit clean. */ - char c0 = '\100', c1 = '\200', c2 = '\201'; - if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - return 1; - - /* The Next x86 OpenStep bug shows up only when comparing 16 bytes - or more and with at least one buffer not starting on a 4-byte boundary. - William Lewis provided this test program. */ - { - char foo[21]; - char bar[21]; - int i; - for (i = 0; i < 4; i++) - { - char *a = foo + i; - char *b = bar + i; - strcpy (a, "--------01111111"); - strcpy (b, "--------10000000"); - if (memcmp (a, b, 16) >= 0) - return 1; - } - return 0; - } -]])], - [ac_cv_func_memcmp_working=yes], - [ac_cv_func_memcmp_working=no], - [ac_cv_func_memcmp_working=no])]) -test $ac_cv_func_memcmp_working = no && AC_LIBOBJ([memcmp]) -])# AC_FUNC_MEMCMP - - -# AC_FUNC_MKTIME -# -------------- -AN_FUNCTION([mktime], [AC_FUNC_MKTIME]) -AC_DEFUN([AC_FUNC_MKTIME], -[AC_REQUIRE([AC_HEADER_TIME])dnl -AC_CHECK_HEADERS_ONCE(sys/time.h unistd.h) -AC_CHECK_FUNCS_ONCE(alarm) -AC_CACHE_CHECK([for working mktime], ac_cv_func_working_mktime, -[AC_RUN_IFELSE([AC_LANG_SOURCE( -[[/* Test program from Paul Eggert and Tony Leneis. */ -#ifdef TIME_WITH_SYS_TIME -# include -# include -#else -# ifdef HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - -#include - -#ifdef HAVE_UNISTD_H -# include -#endif - -#ifndef HAVE_ALARM -# define alarm(X) /* empty */ -#endif - -/* Work around redefinition to rpl_putenv by other config tests. */ -#undef putenv - -static time_t time_t_max; -static time_t time_t_min; - -/* Values we'll use to set the TZ environment variable. */ -static char *tz_strings[] = { - (char *) 0, "TZ=GMT0", "TZ=JST-9", - "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" -}; -#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) - -/* Return 0 if mktime fails to convert a date in the spring-forward gap. - Based on a problem report from Andreas Jaeger. */ -static int -spring_forward_gap () -{ - /* glibc (up to about 1998-10-07) failed this test. */ - struct tm tm; - - /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" - instead of "TZ=America/Vancouver" in order to detect the bug even - on systems that don't support the Olson extension, or don't have the - full zoneinfo tables installed. */ - putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); - - tm.tm_year = 98; - tm.tm_mon = 3; - tm.tm_mday = 5; - tm.tm_hour = 2; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - return mktime (&tm) != (time_t) -1; -} - -static int -mktime_test1 (now) - time_t now; -{ - struct tm *lt; - return ! (lt = localtime (&now)) || mktime (lt) == now; -} - -static int -mktime_test (now) - time_t now; -{ - return (mktime_test1 (now) - && mktime_test1 ((time_t) (time_t_max - now)) - && mktime_test1 ((time_t) (time_t_min + now))); -} - -static int -irix_6_4_bug () -{ - /* Based on code from Ariel Faigon. */ - struct tm tm; - tm.tm_year = 96; - tm.tm_mon = 3; - tm.tm_mday = 0; - tm.tm_hour = 0; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - mktime (&tm); - return tm.tm_mon == 2 && tm.tm_mday == 31; -} - -static int -bigtime_test (j) - int j; -{ - struct tm tm; - time_t now; - tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; - now = mktime (&tm); - if (now != (time_t) -1) - { - struct tm *lt = localtime (&now); - if (! (lt - && lt->tm_year == tm.tm_year - && lt->tm_mon == tm.tm_mon - && lt->tm_mday == tm.tm_mday - && lt->tm_hour == tm.tm_hour - && lt->tm_min == tm.tm_min - && lt->tm_sec == tm.tm_sec - && lt->tm_yday == tm.tm_yday - && lt->tm_wday == tm.tm_wday - && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) - == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) - return 0; - } - return 1; -} - -static int -year_2050_test () -{ - /* The correct answer for 2050-02-01 00:00:00 in Pacific time, - ignoring leap seconds. */ - unsigned long int answer = 2527315200UL; - - struct tm tm; - time_t t; - tm.tm_year = 2050 - 1900; - tm.tm_mon = 2 - 1; - tm.tm_mday = 1; - tm.tm_hour = tm.tm_min = tm.tm_sec = 0; - tm.tm_isdst = -1; - - /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" - instead of "TZ=America/Vancouver" in order to detect the bug even - on systems that don't support the Olson extension, or don't have the - full zoneinfo tables installed. */ - putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); - - t = mktime (&tm); - - /* Check that the result is either a failure, or close enough - to the correct answer that we can assume the discrepancy is - due to leap seconds. */ - return (t == (time_t) -1 - || (0 < t && answer - 120 <= t && t <= answer + 120)); -} - -int -main () -{ - time_t t, delta; - int i, j; - - /* This test makes some buggy mktime implementations loop. - Give up after 60 seconds; a mktime slower than that - isn't worth using anyway. */ - alarm (60); - - for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2) - continue; - time_t_max--; - if ((time_t) -1 < 0) - for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2) - continue; - delta = time_t_max / 997; /* a suitable prime number */ - for (i = 0; i < N_STRINGS; i++) - { - if (tz_strings[i]) - putenv (tz_strings[i]); - - for (t = 0; t <= time_t_max - delta; t += delta) - if (! mktime_test (t)) - return 1; - if (! (mktime_test ((time_t) 1) - && mktime_test ((time_t) (60 * 60)) - && mktime_test ((time_t) (60 * 60 * 24)))) - return 1; - - for (j = 1; 0 < j; j *= 2) - if (! bigtime_test (j)) - return 1; - if (! bigtime_test (j - 1)) - return 1; - } - return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); -}]])], - [ac_cv_func_working_mktime=yes], - [ac_cv_func_working_mktime=no], - [ac_cv_func_working_mktime=no])]) -if test $ac_cv_func_working_mktime = no; then - AC_LIBOBJ([mktime]) -fi -])# AC_FUNC_MKTIME - - -# AU::AM_FUNC_MKTIME -# ------------------ -AU_ALIAS([AM_FUNC_MKTIME], [AC_FUNC_MKTIME]) - - -# AC_FUNC_MMAP -# ------------ -AN_FUNCTION([mmap], [AC_FUNC_MMAP]) -AC_DEFUN([AC_FUNC_MMAP], -[AC_CHECK_HEADERS(stdlib.h unistd.h) -AC_CHECK_FUNCS(getpagesize) -AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped, -[AC_RUN_IFELSE([AC_LANG_SOURCE([AC_INCLUDES_DEFAULT] -[[/* malloc might have been renamed as rpl_malloc. */ -#undef malloc - -/* Thanks to Mike Haertel and Jim Avera for this test. - Here is a matrix of mmap possibilities: - mmap private not fixed - mmap private fixed at somewhere currently unmapped - mmap private fixed at somewhere already mapped - mmap shared not fixed - mmap shared fixed at somewhere currently unmapped - mmap shared fixed at somewhere already mapped - For private mappings, we should verify that changes cannot be read() - back from the file, nor mmap's back from the file at a different - address. (There have been systems where private was not correctly - implemented like the infamous i386 svr4.0, and systems where the - VM page cache was not coherent with the file system buffer cache - like early versions of FreeBSD and possibly contemporary NetBSD.) - For shared mappings, we should conversely verify that changes get - propagated back to all the places they're supposed to be. - - Grep wants private fixed already mapped. - The main things grep needs to know about mmap are: - * does it exist and is it safe to write into the mmap'd area - * how to use it (BSD variants) */ - -#include -#include - -#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H -char *malloc (); -#endif - -/* This mess was copied from the GNU getpagesize.h. */ -#ifndef HAVE_GETPAGESIZE -/* Assume that all systems that can run configure have sys/param.h. */ -# ifndef HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif - -# ifdef _SC_PAGESIZE -# define getpagesize() sysconf(_SC_PAGESIZE) -# else /* no _SC_PAGESIZE */ -# ifdef HAVE_SYS_PARAM_H -# include -# ifdef EXEC_PAGESIZE -# define getpagesize() EXEC_PAGESIZE -# else /* no EXEC_PAGESIZE */ -# ifdef NBPG -# define getpagesize() NBPG * CLSIZE -# ifndef CLSIZE -# define CLSIZE 1 -# endif /* no CLSIZE */ -# else /* no NBPG */ -# ifdef NBPC -# define getpagesize() NBPC -# else /* no NBPC */ -# ifdef PAGESIZE -# define getpagesize() PAGESIZE -# endif /* PAGESIZE */ -# endif /* no NBPC */ -# endif /* no NBPG */ -# endif /* no EXEC_PAGESIZE */ -# else /* no HAVE_SYS_PARAM_H */ -# define getpagesize() 8192 /* punt totally */ -# endif /* no HAVE_SYS_PARAM_H */ -# endif /* no _SC_PAGESIZE */ - -#endif /* no HAVE_GETPAGESIZE */ - -int -main () -{ - char *data, *data2, *data3; - int i, pagesize; - int fd; - - pagesize = getpagesize (); - - /* First, make a file with some known garbage in it. */ - data = (char *) malloc (pagesize); - if (!data) - return 1; - for (i = 0; i < pagesize; ++i) - *(data + i) = rand (); - umask (0); - fd = creat ("conftest.mmap", 0600); - if (fd < 0) - return 1; - if (write (fd, data, pagesize) != pagesize) - return 1; - close (fd); - - /* Next, try to mmap the file at a fixed address which already has - something else allocated at it. If we can, also make sure that - we see the same garbage. */ - fd = open ("conftest.mmap", O_RDWR); - if (fd < 0) - return 1; - data2 = (char *) malloc (2 * pagesize); - if (!data2) - return 1; - data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); - if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_FIXED, fd, 0L)) - return 1; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data2 + i)) - return 1; - - /* Finally, make sure that changes to the mapped area do not - percolate back to the file as seen by read(). (This is a bug on - some variants of i386 svr4.0.) */ - for (i = 0; i < pagesize; ++i) - *(data2 + i) = *(data2 + i) + 1; - data3 = (char *) malloc (pagesize); - if (!data3) - return 1; - if (read (fd, data3, pagesize) != pagesize) - return 1; - for (i = 0; i < pagesize; ++i) - if (*(data + i) != *(data3 + i)) - return 1; - close (fd); - return 0; -}]])], - [ac_cv_func_mmap_fixed_mapped=yes], - [ac_cv_func_mmap_fixed_mapped=no], - [ac_cv_func_mmap_fixed_mapped=no])]) -if test $ac_cv_func_mmap_fixed_mapped = yes; then - AC_DEFINE(HAVE_MMAP, 1, - [Define to 1 if you have a working `mmap' system call.]) -fi -rm -f conftest.mmap -])# AC_FUNC_MMAP - - -# AU::AC_MMAP -# ----------- -AU_ALIAS([AC_MMAP], [AC_FUNC_MMAP]) - - -# AC_FUNC_OBSTACK -# --------------- -# Ensure obstack support. Yeah, this is not exactly a `FUNC' check. -AN_FUNCTION([obstack_init], [AC_FUNC_OBSTACK]) -AN_IDENTIFIER([obstack], [AC_FUNC_OBSTACK]) -AC_DEFUN([AC_FUNC_OBSTACK], -[AC_LIBSOURCES([obstack.h, obstack.c])dnl -AC_CACHE_CHECK([for obstacks], ac_cv_func_obstack, -[AC_LINK_IFELSE( - [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT - [@%:@include "obstack.h"]], - [[struct obstack mem; - @%:@define obstack_chunk_alloc malloc - @%:@define obstack_chunk_free free - obstack_init (&mem); - obstack_free (&mem, 0);]])], - [ac_cv_func_obstack=yes], - [ac_cv_func_obstack=no])]) -if test $ac_cv_func_obstack = yes; then - AC_DEFINE(HAVE_OBSTACK, 1, [Define to 1 if libc includes obstacks.]) -else - AC_LIBOBJ(obstack) -fi -])# AC_FUNC_OBSTACK - - -# AU::AM_FUNC_OBSTACK -# ------------------- -AU_ALIAS([AM_FUNC_OBSTACK], [AC_FUNC_OBSTACK]) - - - -# _AC_FUNC_REALLOC_IF(IF-WORKS, IF-NOT) -# ------------------------------------- -# If `realloc (0, 0)' is properly handled, run IF-WORKS, otherwise, IF-NOT. -AC_DEFUN([_AC_FUNC_REALLOC_IF], -[AC_REQUIRE([AC_HEADER_STDC])dnl -AC_CHECK_HEADERS(stdlib.h) -AC_CACHE_CHECK([for GNU libc compatible realloc], ac_cv_func_realloc_0_nonnull, -[AC_RUN_IFELSE( -[AC_LANG_PROGRAM( -[[#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *realloc (); -#endif -]], - [return ! realloc (0, 0);])], - [ac_cv_func_realloc_0_nonnull=yes], - [ac_cv_func_realloc_0_nonnull=no], - [ac_cv_func_realloc_0_nonnull=no])]) -AS_IF([test $ac_cv_func_realloc_0_nonnull = yes], [$1], [$2]) -])# AC_FUNC_REALLOC - - -# AC_FUNC_REALLOC -# --------------- -# Report whether `realloc (0, 0)' is properly handled, and replace realloc if -# needed. -AN_FUNCTION([realloc], [AC_FUNC_REALLOC]) -AC_DEFUN([AC_FUNC_REALLOC], -[_AC_FUNC_REALLOC_IF( - [AC_DEFINE([HAVE_REALLOC], 1, - [Define to 1 if your system has a GNU libc compatible `realloc' - function, and to 0 otherwise.])], - [AC_DEFINE([HAVE_REALLOC], 0) - AC_LIBOBJ([realloc]) - AC_DEFINE([realloc], [rpl_realloc], - [Define to rpl_realloc if the replacement function should be used.])]) -])# AC_FUNC_REALLOC - - -# AC_FUNC_SELECT_ARGTYPES -# ----------------------- -# Determine the correct type to be passed to each of the `select' -# function's arguments, and define those types in `SELECT_TYPE_ARG1', -# `SELECT_TYPE_ARG234', and `SELECT_TYPE_ARG5'. -AN_FUNCTION([select], [AC_FUNC_SELECT_ARGTYPES]) -AC_DEFUN([AC_FUNC_SELECT_ARGTYPES], -[AC_CHECK_HEADERS(sys/select.h sys/socket.h) -AC_CACHE_CHECK([types of arguments for select], -[ac_cv_func_select_args], -[for ac_arg234 in 'fd_set *' 'int *' 'void *'; do - for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do - for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( -[AC_INCLUDES_DEFAULT -#ifdef HAVE_SYS_SELECT_H -# include -#endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif -], - [extern int select ($ac_arg1, - $ac_arg234, $ac_arg234, $ac_arg234, - $ac_arg5);])], - [ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3]) - done - done -done -# Provide a safe default value. -: ${ac_cv_func_select_args='int,int *,struct timeval *'} -]) -ac_save_IFS=$IFS; IFS=',' -set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` -IFS=$ac_save_IFS -shift -AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG1, $[1], - [Define to the type of arg 1 for `select'.]) -AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG234, ($[2]), - [Define to the type of args 2, 3 and 4 for `select'.]) -AC_DEFINE_UNQUOTED(SELECT_TYPE_ARG5, ($[3]), - [Define to the type of arg 5 for `select'.]) -rm -f conftest* -])# AC_FUNC_SELECT_ARGTYPES - - -# AC_FUNC_SETPGRP -# --------------- -AN_FUNCTION([setpgrp], [AC_FUNC_SETPGRP]) -AC_DEFUN([AC_FUNC_SETPGRP], -[AC_CACHE_CHECK(whether setpgrp takes no argument, ac_cv_func_setpgrp_void, -[AC_RUN_IFELSE( -[AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], -[/* If this system has a BSD-style setpgrp which takes arguments, - setpgrp(1, 1) will fail with ESRCH and return -1, in that case - exit successfully. */ - return setpgrp (1,1) != -1;])], - [ac_cv_func_setpgrp_void=no], - [ac_cv_func_setpgrp_void=yes], - [AC_MSG_ERROR([cannot check setpgrp when cross compiling])])]) -if test $ac_cv_func_setpgrp_void = yes; then - AC_DEFINE(SETPGRP_VOID, 1, - [Define to 1 if the `setpgrp' function takes no argument.]) -fi -])# AC_FUNC_SETPGRP - - -# _AC_FUNC_STAT(STAT | LSTAT) -# --------------------------- -# Determine whether stat or lstat have the bug that it succeeds when -# given the zero-length file name argument. The stat and lstat from -# SunOS4.1.4 and the Hurd (as of 1998-11-01) do this. -# -# If it does, then define HAVE_STAT_EMPTY_STRING_BUG (or -# HAVE_LSTAT_EMPTY_STRING_BUG) and arrange to compile the wrapper -# function. -m4_define([_AC_FUNC_STAT], -[AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])dnl -AC_CACHE_CHECK([whether $1 accepts an empty string], - [ac_cv_func_$1_empty_string_bug], -[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], -[[struct stat sbuf; - return $1 ("", &sbuf) == 0;]])], - [ac_cv_func_$1_empty_string_bug=no], - [ac_cv_func_$1_empty_string_bug=yes], - [ac_cv_func_$1_empty_string_bug=yes])]) -if test $ac_cv_func_$1_empty_string_bug = yes; then - AC_LIBOBJ([$1]) - AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1_EMPTY_STRING_BUG]), 1, - [Define to 1 if `$1' has the bug that it succeeds when - given the zero-length file name argument.]) -fi -])# _AC_FUNC_STAT - - -# AC_FUNC_STAT & AC_FUNC_LSTAT -# ---------------------------- -AN_FUNCTION([stat], [AC_FUNC_STAT]) -AC_DEFUN([AC_FUNC_STAT], [_AC_FUNC_STAT(stat)]) -AN_FUNCTION([lstat], [AC_FUNC_LSTAT]) -AC_DEFUN([AC_FUNC_LSTAT], [_AC_FUNC_STAT(lstat)]) - - -# _AC_LIBOBJ_STRTOD -# ----------------- -m4_define([_AC_LIBOBJ_STRTOD], -[AC_LIBOBJ(strtod) -AC_CHECK_FUNC(pow) -if test $ac_cv_func_pow = no; then - AC_CHECK_LIB(m, pow, - [POW_LIB=-lm], - [AC_MSG_WARN([cannot find library containing definition of pow])]) -fi -])# _AC_LIBOBJ_STRTOD - - -# AC_FUNC_STRTOD -# -------------- -AN_FUNCTION([strtod], [AC_FUNC_STRTOD]) -AC_DEFUN([AC_FUNC_STRTOD], -[AC_SUBST(POW_LIB)dnl -AC_CACHE_CHECK(for working strtod, ac_cv_func_strtod, -[AC_RUN_IFELSE([AC_LANG_SOURCE([[ -]AC_INCLUDES_DEFAULT[ -#ifndef strtod -double strtod (); -#endif -int -main() -{ - { - /* Some versions of Linux strtod mis-parse strings with leading '+'. */ - char *string = " +69"; - char *term; - double value; - value = strtod (string, &term); - if (value != 69 || term != (string + 4)) - return 1; - } - - { - /* Under Solaris 2.4, strtod returns the wrong value for the - terminating character under some conditions. */ - char *string = "NaN"; - char *term; - strtod (string, &term); - if (term != string && *(term - 1) == 0) - return 1; - } - return 0; -} -]])], - ac_cv_func_strtod=yes, - ac_cv_func_strtod=no, - ac_cv_func_strtod=no)]) -if test $ac_cv_func_strtod = no; then - _AC_LIBOBJ_STRTOD -fi -]) - - -# AC_FUNC_STRTOLD -# --------------- -AC_DEFUN([AC_FUNC_STRTOLD], -[ - AC_CACHE_CHECK([whether strtold conforms to C99], - [ac_cv_func_strtold], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[/* On HP-UX before 11.23, strtold returns a struct instead of - long double. Reject implementations like that, by requiring - compatibility with the C99 prototype. */ -# include - static long double (*p) (char const *, char **) = strtold; - static long double - test (char const *nptr, char **endptr) - { - long double r; - r = strtold (nptr, endptr); - return r; - }]], - [[return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;]])], - [ac_cv_func_strtold=yes], - [ac_cv_func_strtold=no])]) - if test $ac_cv_func_strtold = yes; then - AC_DEFINE([HAVE_STRTOLD], 1, - [Define to 1 if strtold exists and conforms to C99.]) - fi -])# AC_FUNC_STRTOLD - - -# AU::AM_FUNC_STRTOD -# ------------------ -AU_ALIAS([AM_FUNC_STRTOD], [AC_FUNC_STRTOD]) - - -# AC_FUNC_STRERROR_R -# ------------------ -AN_FUNCTION([strerror_r], [AC_FUNC_STRERROR_R]) -AC_DEFUN([AC_FUNC_STRERROR_R], -[AC_CHECK_DECLS([strerror_r]) -AC_CHECK_FUNCS([strerror_r]) -AC_CACHE_CHECK([whether strerror_r returns char *], - ac_cv_func_strerror_r_char_p, - [ - ac_cv_func_strerror_r_char_p=no - if test $ac_cv_have_decl_strerror_r = yes; then - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], - [[ - char buf[100]; - char x = *strerror_r (0, buf, sizeof buf); - char *p = strerror_r (0, buf, sizeof buf); - return !p || x; - ]])], - ac_cv_func_strerror_r_char_p=yes) - else - # strerror_r is not declared. Choose between - # systems that have relatively inaccessible declarations for the - # function. BeOS and DEC UNIX 4.0 fall in this category, but the - # former has a strerror_r that returns char*, while the latter - # has a strerror_r that returns `int'. - # This test should segfault on the DEC system. - AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT - extern char *strerror_r ();], - [[char buf[100]; - char x = *strerror_r (0, buf, sizeof buf); - return ! isalpha (x);]])], - ac_cv_func_strerror_r_char_p=yes, , :) - fi - ]) -if test $ac_cv_func_strerror_r_char_p = yes; then - AC_DEFINE([STRERROR_R_CHAR_P], 1, - [Define to 1 if strerror_r returns char *.]) -fi -])# AC_FUNC_STRERROR_R - - -# AC_FUNC_STRFTIME -# ---------------- -AN_FUNCTION([strftime], [AC_FUNC_STRFTIME]) -AC_DEFUN([AC_FUNC_STRFTIME], -[AC_CHECK_FUNCS(strftime, [], -[# strftime is in -lintl on SCO UNIX. -AC_CHECK_LIB(intl, strftime, - [AC_DEFINE(HAVE_STRFTIME) -LIBS="-lintl $LIBS"])])dnl -])# AC_FUNC_STRFTIME - - -# AC_FUNC_STRNLEN -# --------------- -AN_FUNCTION([strnlen], [AC_FUNC_STRNLEN]) -AC_DEFUN([AC_FUNC_STRNLEN], -[AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])dnl -AC_CACHE_CHECK([for working strnlen], ac_cv_func_strnlen_working, -[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[ -#define S "foobar" -#define S_LEN (sizeof S - 1) - - /* At least one implementation is buggy: that of AIX 4.3 would - give strnlen (S, 1) == 3. */ - - int i; - for (i = 0; i < S_LEN + 1; ++i) - { - int expected = i <= S_LEN ? i : S_LEN; - if (strnlen (S, i) != expected) - return 1; - } - return 0; -]])], - [ac_cv_func_strnlen_working=yes], - [ac_cv_func_strnlen_working=no], - [ac_cv_func_strnlen_working=no])]) -test $ac_cv_func_strnlen_working = no && AC_LIBOBJ([strnlen]) -])# AC_FUNC_STRNLEN - - -# AC_FUNC_SETVBUF_REVERSED -# ------------------------ -AN_FUNCTION([setvbuf], [AC_FUNC_SETVBUF_REVERSED]) -AC_DEFUN([AC_FUNC_SETVBUF_REVERSED], -[AC_REQUIRE([AC_C_PROTOTYPES])dnl -AC_CACHE_CHECK(whether setvbuf arguments are reversed, - ac_cv_func_setvbuf_reversed, - [ac_cv_func_setvbuf_reversed=no - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include -# ifdef PROTOTYPES - int (setvbuf) (FILE *, int, char *, size_t); -# endif]], - [[char buf; return setvbuf (stdout, _IOLBF, &buf, 1);]])], - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include -# ifdef PROTOTYPES - int (setvbuf) (FILE *, int, char *, size_t); -# endif]], - [[char buf; return setvbuf (stdout, &buf, _IOLBF, 1);]])], - [# It compiles and links either way, so it must not be declared - # with a prototype and most likely this is a K&R C compiler. - # Try running it. - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [AC_INCLUDES_DEFAULT], - [[/* This call has the arguments reversed. - A reversed system may check and see that the address of buf - is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */ - char buf; - if (setvbuf (stdout, _IOLBF, &buf, 1) != 0) - return 1; - putchar ('\r'); - return 0; /* Non-reversed systems SEGV here. */]])], - [ac_cv_func_setvbuf_reversed=yes], - [], - [[: # Assume setvbuf is not reversed when cross-compiling.]])] - ac_cv_func_setvbuf_reversed=yes)])]) -if test $ac_cv_func_setvbuf_reversed = yes; then - AC_DEFINE(SETVBUF_REVERSED, 1, - [Define to 1 if the `setvbuf' function takes the buffering type as - its second argument and the buffer pointer as the third, as on - System V before release 3.]) -fi -])# AC_FUNC_SETVBUF_REVERSED - - -# AU::AC_SETVBUF_REVERSED -# ----------------------- -AU_ALIAS([AC_SETVBUF_REVERSED], [AC_FUNC_SETVBUF_REVERSED]) - - -# AC_FUNC_STRCOLL -# --------------- -AN_FUNCTION([strcoll], [AC_FUNC_STRCOLL]) -AC_DEFUN([AC_FUNC_STRCOLL], -[AC_CACHE_CHECK(for working strcoll, ac_cv_func_strcoll_works, -[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], - [[return (strcoll ("abc", "def") >= 0 || - strcoll ("ABC", "DEF") >= 0 || - strcoll ("123", "456") >= 0)]])], - ac_cv_func_strcoll_works=yes, - ac_cv_func_strcoll_works=no, - ac_cv_func_strcoll_works=no)]) -if test $ac_cv_func_strcoll_works = yes; then - AC_DEFINE(HAVE_STRCOLL, 1, - [Define to 1 if you have the `strcoll' function and it is properly - defined.]) -fi -])# AC_FUNC_STRCOLL - - -# AU::AC_STRCOLL -# -------------- -AU_ALIAS([AC_STRCOLL], [AC_FUNC_STRCOLL]) - - -# AC_FUNC_UTIME_NULL -# ------------------ -AN_FUNCTION([utime], [AC_FUNC_UTIME_NULL]) -AC_DEFUN([AC_FUNC_UTIME_NULL], -[AC_CHECK_HEADERS_ONCE(utime.h) -AC_CACHE_CHECK(whether utime accepts a null argument, ac_cv_func_utime_null, -[rm -f conftest.data; >conftest.data -# Sequent interprets utime(file, 0) to mean use start of epoch. Wrong. -AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT - #ifdef HAVE_UTIME_H - # include - #endif], -[[struct stat s, t; - return ! (stat ("conftest.data", &s) == 0 - && utime ("conftest.data", 0) == 0 - && stat ("conftest.data", &t) == 0 - && t.st_mtime >= s.st_mtime - && t.st_mtime - s.st_mtime < 120);]])], - ac_cv_func_utime_null=yes, - ac_cv_func_utime_null=no, - ac_cv_func_utime_null=no)]) -if test $ac_cv_func_utime_null = yes; then - AC_DEFINE(HAVE_UTIME_NULL, 1, - [Define to 1 if `utime(file, NULL)' sets file's timestamp to the - present.]) -fi -rm -f conftest.data -])# AC_FUNC_UTIME_NULL - - -# AU::AC_UTIME_NULL -# ----------------- -AU_ALIAS([AC_UTIME_NULL], [AC_FUNC_UTIME_NULL]) - - -# AC_FUNC_FORK -# ------------- -AN_FUNCTION([fork], [AC_FUNC_FORK]) -AN_FUNCTION([vfork], [AC_FUNC_FORK]) -AC_DEFUN([AC_FUNC_FORK], -[AC_REQUIRE([AC_TYPE_PID_T])dnl -AC_CHECK_HEADERS(vfork.h) -AC_CHECK_FUNCS(fork vfork) -if test "x$ac_cv_func_fork" = xyes; then - _AC_FUNC_FORK -else - ac_cv_func_fork_works=$ac_cv_func_fork -fi -if test "x$ac_cv_func_fork_works" = xcross; then - case $host in - *-*-amigaos* | *-*-msdosdjgpp*) - # Override, as these systems have only a dummy fork() stub - ac_cv_func_fork_works=no - ;; - *) - ac_cv_func_fork_works=yes - ;; - esac - AC_MSG_WARN([result $ac_cv_func_fork_works guessed because of cross compilation]) -fi -ac_cv_func_vfork_works=$ac_cv_func_vfork -if test "x$ac_cv_func_vfork" = xyes; then - _AC_FUNC_VFORK -fi; -if test "x$ac_cv_func_fork_works" = xcross; then - ac_cv_func_vfork_works=$ac_cv_func_vfork - AC_MSG_WARN([result $ac_cv_func_vfork_works guessed because of cross compilation]) -fi - -if test "x$ac_cv_func_vfork_works" = xyes; then - AC_DEFINE(HAVE_WORKING_VFORK, 1, [Define to 1 if `vfork' works.]) -else - AC_DEFINE(vfork, fork, [Define as `fork' if `vfork' does not work.]) -fi -if test "x$ac_cv_func_fork_works" = xyes; then - AC_DEFINE(HAVE_WORKING_FORK, 1, [Define to 1 if `fork' works.]) -fi -])# AC_FUNC_FORK - - -# _AC_FUNC_FORK -# ------------- -AC_DEFUN([_AC_FUNC_FORK], - [AC_CACHE_CHECK(for working fork, ac_cv_func_fork_works, - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], - [ - /* By Ruediger Kuhlmann. */ - return fork () < 0; - ])], - [ac_cv_func_fork_works=yes], - [ac_cv_func_fork_works=no], - [ac_cv_func_fork_works=cross])])] -)# _AC_FUNC_FORK - - -# _AC_FUNC_VFORK -# ------------- -AC_DEFUN([_AC_FUNC_VFORK], -[AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works, -[AC_RUN_IFELSE([AC_LANG_SOURCE([[/* Thanks to Paul Eggert for this test. */ -]AC_INCLUDES_DEFAULT[ -#include -#ifdef HAVE_VFORK_H -# include -#endif -/* On some sparc systems, changes by the child to local and incoming - argument registers are propagated back to the parent. The compiler - is told about this with #include , but some compilers - (e.g. gcc -O) don't grok . Test for this by using a - static variable whose address is put into a register that is - clobbered by the vfork. */ -static void -#ifdef __cplusplus -sparc_address_test (int arg) -# else -sparc_address_test (arg) int arg; -#endif -{ - static pid_t child; - if (!child) { - child = vfork (); - if (child < 0) { - perror ("vfork"); - _exit(2); - } - if (!child) { - arg = getpid(); - write(-1, "", 0); - _exit (arg); - } - } -} - -int -main () -{ - pid_t parent = getpid (); - pid_t child; - - sparc_address_test (0); - - child = vfork (); - - if (child == 0) { - /* Here is another test for sparc vfork register problems. This - test uses lots of local variables, at least as many local - variables as main has allocated so far including compiler - temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris - 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should - reuse the register of parent for one of the local variables, - since it will think that parent can't possibly be used any more - in this routine. Assigning to the local variable will thus - munge parent in the parent process. */ - pid_t - p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), - p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); - /* Convince the compiler that p..p7 are live; otherwise, it might - use the same hardware register for all 8 local variables. */ - if (p != p1 || p != p2 || p != p3 || p != p4 - || p != p5 || p != p6 || p != p7) - _exit(1); - - /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent - from child file descriptors. If the child closes a descriptor - before it execs or exits, this munges the parent's descriptor - as well. Test for this by closing stdout in the child. */ - _exit(close(fileno(stdout)) != 0); - } else { - int status; - struct stat st; - - while (wait(&status) != child) - ; - return ( - /* Was there some problem with vforking? */ - child < 0 - - /* Did the child fail? (This shouldn't happen.) */ - || status - - /* Did the vfork/compiler bug occur? */ - || parent != getpid() - - /* Did the file descriptor bug occur? */ - || fstat(fileno(stdout), &st) != 0 - ); - } -}]])], - [ac_cv_func_vfork_works=yes], - [ac_cv_func_vfork_works=no], - [ac_cv_func_vfork_works=cross])]) -])# _AC_FUNC_VFORK - - -# AU::AC_FUNC_VFORK -# ------------ -AU_ALIAS([AC_FUNC_VFORK], [AC_FUNC_FORK]) - -# AU::AC_VFORK -# ------------ -AU_ALIAS([AC_VFORK], [AC_FUNC_FORK]) - - -# AC_FUNC_VPRINTF -# --------------- -# Why the heck is that _doprnt does not define HAVE__DOPRNT??? -# That the logical name! -AN_FUNCTION([vfprintf], [AC_FUNC_VPRINTF]) -AN_FUNCTION([vprintf], [AC_FUNC_VPRINTF]) -AN_FUNCTION([vsprintf], [AC_FUNC_VPRINTF]) -AN_FUNCTION([_doprnt], [AC_FUNC_VPRINTF]) -AC_DEFUN([AC_FUNC_VPRINTF], -[AC_CHECK_FUNCS(vprintf, [] -[AC_CHECK_FUNC(_doprnt, - [AC_DEFINE(HAVE_DOPRNT, 1, - [Define to 1 if you don't have `vprintf' but do have - `_doprnt.'])])]) -]) - - -# AU::AC_VPRINTF -# -------------- -AU_ALIAS([AC_VPRINTF], [AC_FUNC_VPRINTF]) - - -# AC_FUNC_WAIT3 -# ------------- -# Don't bother too hard maintaining this macro, as it's obsoleted. -# We don't AU define it, since we don't have any alternative to propose, -# any invocation should be removed, and the code adjusted. -AN_FUNCTION([wait3], [AC_FUNC_WAIT3]) -AC_DEFUN([AC_FUNC_WAIT3], -[AC_DIAGNOSE([obsolete], -[$0: `wait3' has been removed from POSIX. -Remove this `AC_FUNC_WAIT3' and adjust your code to use `waitpid' instead.])dnl -AC_CACHE_CHECK([for wait3 that fills in rusage], - [ac_cv_func_wait3_rusage], -[AC_RUN_IFELSE([AC_LANG_SOURCE( -[AC_INCLUDES_DEFAULT[ -#include -#include -#include -/* HP-UX has wait3 but does not fill in rusage at all. */ -int -main () -{ - struct rusage r; - int i; - /* Use a field that we can force nonzero -- - voluntary context switches. - For systems like NeXT and OSF/1 that don't set it, - also use the system CPU time. And page faults (I/O) for Linux. */ - r.ru_nvcsw = 0; - r.ru_stime.tv_sec = 0; - r.ru_stime.tv_usec = 0; - r.ru_majflt = r.ru_minflt = 0; - switch (fork ()) - { - case 0: /* Child. */ - sleep(1); /* Give up the CPU. */ - _exit(0); - break; - case -1: /* What can we do? */ - _exit(0); - break; - default: /* Parent. */ - wait3(&i, 0, &r); - /* Avoid "text file busy" from rm on fast HP-UX machines. */ - sleep(2); - return (r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0 - && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0); - } -}]])], - [ac_cv_func_wait3_rusage=yes], - [ac_cv_func_wait3_rusage=no], - [ac_cv_func_wait3_rusage=no])]) -if test $ac_cv_func_wait3_rusage = yes; then - AC_DEFINE(HAVE_WAIT3, 1, - [Define to 1 if you have the `wait3' system call. - Deprecated, you should no longer depend upon `wait3'.]) -fi -])# AC_FUNC_WAIT3 - - -# AU::AC_WAIT3 -# ------------ -AU_ALIAS([AC_WAIT3], [AC_FUNC_WAIT3]) diff --git a/build/autoconf_prepend-include/autoconf/general.m4 b/build/autoconf_prepend-include/autoconf/general.m4 deleted file mode 100644 index 3ec20bb89f..0000000000 --- a/build/autoconf_prepend-include/autoconf/general.m4 +++ /dev/null @@ -1,2730 +0,0 @@ -# This file is part of Autoconf. -*- Autoconf -*- -# Parameterized macros. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception, the Free Software Foundation gives unlimited -# permission to copy, distribute and modify the configure scripts that -# are the output of Autoconf. You need not follow the terms of the GNU -# General Public License when using or distributing such scripts, even -# though portions of the text of Autoconf appear in them. The GNU -# General Public License (GPL) does govern all other use of the material -# that constitutes the Autoconf program. -# -# Certain portions of the Autoconf source text are designed to be copied -# (in certain cases, depending on the input) into the output of -# Autoconf. We call these the "data" portions. The rest of the Autoconf -# source text consists of comments plus executable code that decides which -# of the data portions to output in any given case. We call these -# comments and executable code the "non-data" portions. Autoconf never -# copies any of the non-data portions into its output. -# -# This special exception to the GPL applies to versions of Autoconf -# released by the Free Software Foundation. When you make and -# distribute a modified version of Autoconf, you may extend this special -# exception to the GPL to apply to your modified version as well, *unless* -# your modified version has the potential to copy into its output some -# of the text that was the non-data portion of the version that you started -# with. (In other words, unless your change moves or copies text from -# the non-data portions to the data portions.) If your modification has -# such potential, you must delete any notice of this special exception -# to the GPL from your modified version. -# -# Written by David MacKenzie, with help from -# Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, -# Roland McGrath, Noah Friedman, david d zuhn, and many others. - - -## ---------------- ## -## The diversions. ## -## ---------------- ## - - -# We heavily use m4's diversions both for the initializations and for -# required macros (see AC_REQUIRE), because in both cases we have to -# issue high in `configure' something which is discovered late. -# -# KILL is only used to suppress output. -# -# The layers of `configure'. We let m4 undivert them by itself, when -# it reaches the end of `configure.ac'. -# -# - BINSH -# #! /bin/sh -# - HEADER-REVISION -# Sent by AC_REVISION -# - HEADER-COMMENT -# Purpose of the script. -# - HEADER-COPYRIGHT -# Copyright notice(s) -# - M4SH-INIT -# Initialization of bottom layers. -# -# - DEFAULTS -# early initializations (defaults) -# - PARSE_ARGS -# initialization code, option handling loop. -# -# - HELP_BEGIN -# Handling `configure --help'. -# - HELP_CANON -# Help msg for AC_CANONICAL_* -# - HELP_ENABLE -# Help msg from AC_ARG_ENABLE. -# - HELP_WITH -# Help msg from AC_ARG_WITH. -# - HELP_VAR -# Help msg from AC_ARG_VAR. -# - HELP_VAR_END -# A small paragraph on the use of the variables. -# - HELP_END -# Tail of the handling of --help. -# -# - VERSION_BEGIN -# Head of the handling of --version. -# - VERSION_FSF -# FSF copyright notice for --version. -# - VERSION_USER -# User copyright notice for --version. -# - VERSION_END -# Tail of the handling of --version. -# -# - INIT_PREPARE -# Tail of initialization code. -# -# - BODY -# the tests and output code -# - - -# _m4_divert(DIVERSION-NAME) -# -------------------------- -# Convert a diversion name into its number. Otherwise, return -# DIVERSION-NAME which is supposed to be an actual diversion number. -# Of course it would be nicer to use m4_case here, instead of zillions -# of little macros, but it then takes twice longer to run `autoconf'! -# -# From M4sugar: -# -1. KILL -# 10000. GROW -# -# From M4sh: -# 0. BINSH -# 1. HEADER-REVISION -# 2. HEADER-COMMENT -# 3. HEADER-COPYRIGHT -# 4. M4SH-INIT -# 1000. BODY -m4_define([_m4_divert(DEFAULTS)], 10) -m4_define([_m4_divert(PARSE_ARGS)], 20) - -m4_define([_m4_divert(HELP_BEGIN)], 100) -m4_define([_m4_divert(HELP_CANON)], 101) -m4_define([_m4_divert(HELP_ENABLE)], 102) -m4_define([_m4_divert(HELP_WITH)], 103) -m4_define([_m4_divert(HELP_VAR)], 104) -m4_define([_m4_divert(HELP_VAR_END)], 105) -m4_define([_m4_divert(HELP_END)], 106) - -m4_define([_m4_divert(VERSION_BEGIN)], 200) -m4_define([_m4_divert(VERSION_FSF)], 201) -m4_define([_m4_divert(VERSION_USER)], 202) -m4_define([_m4_divert(VERSION_END)], 203) - -m4_define([_m4_divert(INIT_PREPARE)], 300) - - - -# AC_DIVERT_PUSH(DIVERSION-NAME) -# AC_DIVERT_POP -# ------------------------------ -m4_copy([m4_divert_push],[AC_DIVERT_PUSH]) -m4_copy([m4_divert_pop], [AC_DIVERT_POP]) - - - -## ------------------------------------ ## -## Defining/requiring Autoconf macros. ## -## ------------------------------------ ## - - -# AC_DEFUN(NAME, EXPANSION) -# AC_DEFUN_ONCE(NAME, EXPANSION) -# AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME) -# AC_REQUIRE(STRING) -# AC_PROVIDE(MACRO-NAME) -# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) -# ----------------------------------------------------------- -m4_copy([m4_defun], [AC_DEFUN]) -m4_copy([m4_defun_once], [AC_DEFUN_ONCE]) -m4_copy([m4_before], [AC_BEFORE]) -m4_copy([m4_require], [AC_REQUIRE]) -m4_copy([m4_provide], [AC_PROVIDE]) -m4_copy([m4_provide_if], [AC_PROVIDE_IFELSE]) - - -# AC_OBSOLETE(THIS-MACRO-NAME, [SUGGESTION]) -# ------------------------------------------ -m4_define([AC_OBSOLETE], -[AC_DIAGNOSE([obsolete], [$1 is obsolete$2])]) - - - -## ----------------------------- ## -## Implementing Autoconf loops. ## -## ----------------------------- ## - - -# AU::AC_FOREACH(VARIABLE, LIST, EXPRESSION) -# ------------------------------------------ -AU_DEFUN([AC_FOREACH], [[m4_foreach_w($@)]]) -AC_DEFUN([AC_FOREACH], [m4_foreach_w($@)dnl -AC_DIAGNOSE([obsolete], [The macro `AC_FOREACH' is obsolete. -You should run autoupdate.])]) - - - -## ----------------------------------- ## -## Helping macros to display strings. ## -## ----------------------------------- ## - - -# AU::AC_HELP_STRING(LHS, RHS, [COLUMN]) -# -------------------------------------- -AU_ALIAS([AC_HELP_STRING], [AS_HELP_STRING]) - - - -## ---------------------------------------------- ## -## Information on the package being Autoconf'ed. ## -## ---------------------------------------------- ## - - -# It is suggested that the macros in this section appear before -# AC_INIT in `configure.ac'. Nevertheless, this is just stylistic, -# and from the implementation point of view, AC_INIT *must* be expanded -# beforehand: it puts data in diversions which must appear before the -# data provided by the macros of this section. - -# The solution is to require AC_INIT in each of these macros. AC_INIT -# has the needed magic so that it can't be expanded twice. - - - -# _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION, BUG-REPORT, [TARNAME]) -# -------------------------------------------------------------- -m4_define([_AC_INIT_PACKAGE], -[AS_LITERAL_IF([$1], [], [m4_warn([syntax], [AC_INIT: not a literal: $1])]) -AS_LITERAL_IF([$2], [], [m4_warn([syntax], [AC_INIT: not a literal: $2])]) -AS_LITERAL_IF([$3], [], [m4_warn([syntax], [AC_INIT: not a literal: $3])]) -m4_ifndef([AC_PACKAGE_NAME], - [m4_define([AC_PACKAGE_NAME], [$1])]) -m4_ifndef([AC_PACKAGE_TARNAME], - [m4_define([AC_PACKAGE_TARNAME], - m4_default([$4], - [m4_bpatsubst(m4_tolower(m4_bpatsubst([[[$1]]], - [GNU ])), - [[^_abcdefghijklmnopqrstuvwxyz0123456789]], - [-])]))]) -m4_ifndef([AC_PACKAGE_VERSION], - [m4_define([AC_PACKAGE_VERSION], [$2])]) -m4_ifndef([AC_PACKAGE_STRING], - [m4_define([AC_PACKAGE_STRING], [$1 $2])]) -m4_ifndef([AC_PACKAGE_BUGREPORT], - [m4_define([AC_PACKAGE_BUGREPORT], [$3])]) -]) - - -# AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER]) -# ------------------------------------------------------ -# Emit TEXT, a copyright notice, in the top of `configure' and in -# --version output. Macros in TEXT are evaluated once. -m4_define([AC_COPYRIGHT], -[AS_COPYRIGHT([$1])[]dnl -m4_divert_text(m4_default([$2], [VERSION_USER]), -[ -$1])dnl -])# AC_COPYRIGHT - - -# AC_REVISION(REVISION-INFO) -# -------------------------- -# The second quote in the translit is just to cope with font-lock-mode -# which sees the opening of a string. -m4_define([AC_REVISION], -[m4_divert_text([HEADER-REVISION], - [@%:@ From __file__ m4_translit([$1], [$""]).])dnl -]) - - - - -## ---------------------------------------- ## -## Requirements over the Autoconf version. ## -## ---------------------------------------- ## - - -# AU::AC_PREREQ(VERSION) -# ---------------------- -# Update this `AC_PREREQ' statement to require the current version of -# Autoconf. But fail if ever this autoupdate is too old. -# -# Note that `m4_defn([m4_PACKAGE_VERSION])' below are expanded before -# calling `AU_DEFUN', i.e., it is hard coded. Otherwise it would be -# quite complex for autoupdate to import the value of -# `m4_PACKAGE_VERSION'. We could `AU_DEFUN' `m4_PACKAGE_VERSION', but -# this would replace all its occurrences with the current version of -# Autoconf, which is certainly not what the user intended. -AU_DEFUN([AC_PREREQ], -[m4_version_prereq([$1])[]dnl -[AC_PREREQ(]]m4_defn([m4_PACKAGE_VERSION])[[)]]) - - -# AC_PREREQ(VERSION) -# ------------------ -# Complain and exit if the Autoconf version is less than VERSION. -m4_copy([m4_version_prereq], [AC_PREREQ]) - - - - - - -## ---------------- ## -## Initialization. ## -## ---------------- ## - - -# All the following macros are used by AC_INIT. Ideally, they should -# be presented in the order in which they are output. Please, help us -# sorting it, or at least, don't augment the entropy. - - -# _AC_INIT_NOTICE -# --------------- -m4_define([_AC_INIT_NOTICE], -[m4_divert_text([HEADER-COMMENT], -[@%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by m4_PACKAGE_STRING[]dnl -m4_ifset([AC_PACKAGE_STRING], [ for AC_PACKAGE_STRING]).]) - -m4_ifset([AC_PACKAGE_BUGREPORT], - [m4_divert_text([HEADER-COMMENT], - [@%:@ -@%:@ Report bugs to .])]) -]) - - -# _AC_INIT_COPYRIGHT -# ------------------ -# We dump to VERSION_FSF to make sure we are inserted before the -# user copyrights, and after the setup of the --version handling. -m4_define([_AC_INIT_COPYRIGHT], -[AC_COPYRIGHT( -[Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it.], - [VERSION_FSF])dnl -]) - - -# File Descriptors -# ---------------- -# Set up the file descriptors used by `configure'. -# File descriptor usage: -# 0 standard input (/dev/null) -# 1 file creation -# 2 errors and warnings -# AS_MESSAGE_LOG_FD compiler messages saved in config.log -# AS_MESSAGE_FD checking for... messages and results -# AS_ORIGINAL_STDIN_FD original standard input (still open) -# -# stdin is /dev/null because checks that run programs may -# inadvertently run interactive ones, which would stop configuration -# until someone typed an EOF. -m4_define([AS_MESSAGE_FD], 6) -m4_define([AS_ORIGINAL_STDIN_FD], 7) -# That's how they used to be named. -AU_ALIAS([AC_FD_CC], [AS_MESSAGE_LOG_FD]) -AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD]) - - -# _AC_INIT_DEFAULTS -# ----------------- -# Values which defaults can be set from `configure.ac'. -# `/bin/machine' is used in `glibcbug'. The others are used in config.* -m4_define([_AC_INIT_DEFAULTS], -[m4_divert_push([DEFAULTS])dnl - -exec AS_ORIGINAL_STDIN_FD<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIB@&t@OBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])dnl -AC_SUBST([PATH_SEPARATOR])dnl - -# Identity of this package. -AC_SUBST([PACKAGE_NAME], - [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])dnl -AC_SUBST([PACKAGE_TARNAME], - [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])dnl -AC_SUBST([PACKAGE_VERSION], - [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])dnl -AC_SUBST([PACKAGE_STRING], - [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])dnl -AC_SUBST([PACKAGE_BUGREPORT], - [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl - -m4_divert_pop([DEFAULTS])dnl -m4_wrap([m4_divert_text([DEFAULTS], -[ac_subst_vars='m4_ifdef([_AC_SUBST_VARS], [m4_defn([_AC_SUBST_VARS])])' -ac_subst_files='m4_ifdef([_AC_SUBST_FILES], [m4_defn([_AC_SUBST_FILES])])' -m4_ifdef([_AC_PRECIOUS_VARS], - [_AC_ARG_VAR_STORE[]dnl - _AC_ARG_VAR_VALIDATE[]dnl - ac_precious_vars='m4_defn([_AC_PRECIOUS_VARS])']) -m4_ifdef([_AC_LIST_SUBDIRS], - [ac_subdirs_all='m4_defn([_AC_LIST_SUBDIRS])'])dnl -])])dnl -])# _AC_INIT_DEFAULTS - - -# AC_PREFIX_DEFAULT(PREFIX) -# ------------------------- -AC_DEFUN([AC_PREFIX_DEFAULT], -[m4_divert_text([DEFAULTS], [ac_default_prefix=$1])]) - - -# AC_PREFIX_PROGRAM(PROGRAM) -# -------------------------- -# Guess the value for the `prefix' variable by looking for -# the argument program along PATH and taking its parent. -# Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc, -# set `prefix' to /usr/local/gnu. -# This comes too late to find a site file based on the prefix, -# and it might use a cached value for the path. -# No big loss, I think, since most configures don't use this macro anyway. -AC_DEFUN([AC_PREFIX_PROGRAM], -[if test "x$prefix" = xNONE; then -dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle. - _AS_ECHO_N([checking for prefix by ]) - AC_PATH_PROG(ac_prefix_program, [$1]) - if test -n "$ac_prefix_program"; then - prefix=`AS_DIRNAME(["$ac_prefix_program"])` - prefix=`AS_DIRNAME(["$prefix"])` - fi -fi -])# AC_PREFIX_PROGRAM - - -# AC_CONFIG_SRCDIR([UNIQUE-FILE-IN-SOURCE-DIR]) -# --------------------------------------------- -# UNIQUE-FILE-IN-SOURCE-DIR is a file name unique to this package, -# relative to the directory that configure is in, which we can look -# for to find out if srcdir is correct. -AC_DEFUN([AC_CONFIG_SRCDIR], -[m4_divert_text([DEFAULTS], [ac_unique_file="$1"])]) - - -# _AC_INIT_DIRCHECK -# ----------------- -# Set ac_pwd, and sanity-check it and the source and installation directories. -# -# (This macro is AC_REQUIREd by _AC_INIT_SRCDIR, so it has to be AC_DEFUNed.) -# -AC_DEFUN([_AC_INIT_DIRCHECK], -[m4_divert_push([PARSE_ARGS])dnl - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - AC_MSG_ERROR([Working directory cannot be determined]) -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - AC_MSG_ERROR([pwd does not report name of working directory]) - -m4_divert_pop([PARSE_ARGS])dnl -])# _AC_INIT_DIRCHECK - -# _AC_INIT_SRCDIR -# --------------- -# Compute `srcdir' based on `$ac_unique_file'. -# -# (We have to AC_DEFUN it, since we use AC_REQUIRE.) -# -AC_DEFUN([_AC_INIT_SRCDIR], -[AC_REQUIRE([_AC_INIT_DIRCHECK])dnl -m4_divert_push([PARSE_ARGS])dnl - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`AS_DIRNAME(["$[0]"])` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - AC_MSG_ERROR([cannot find sources ($ac_unique_file) in $srcdir]) -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || AC_MSG_ERROR([$ac_msg]) - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[[^/]]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -m4_divert_pop([PARSE_ARGS])dnl -])# _AC_INIT_SRCDIR - - -# _AC_INIT_PARSE_ARGS -# ------------------- -m4_define([_AC_INIT_PARSE_ARGS], -[m4_divert_push([PARSE_ARGS])dnl - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -AC_SUBST(exec_prefix, NONE)dnl -no_create= -no_recursion= -AC_SUBST(prefix, NONE)dnl -program_prefix=NONE -program_suffix=NONE -AC_SUBST(program_transform_name, [s,x,x,])dnl -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -AC_SUBST([bindir], ['${exec_prefix}/bin'])dnl -AC_SUBST([sbindir], ['${exec_prefix}/sbin'])dnl -AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])dnl -AC_SUBST([datarootdir], ['${prefix}/share'])dnl -AC_SUBST([datadir], ['${datarootdir}'])dnl -AC_SUBST([sysconfdir], ['${prefix}/etc'])dnl -AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl -AC_SUBST([localstatedir], ['${prefix}/var'])dnl -AC_SUBST([includedir], ['${prefix}/include'])dnl -AC_SUBST([oldincludedir], ['/usr/include'])dnl -AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], - ['${datarootdir}/doc/${PACKAGE_TARNAME}'], - ['${datarootdir}/doc/${PACKAGE}'])])dnl -AC_SUBST([infodir], ['${datarootdir}/info'])dnl -AC_SUBST([htmldir], ['${docdir}'])dnl -AC_SUBST([dvidir], ['${docdir}'])dnl -AC_SUBST([pdfdir], ['${docdir}'])dnl -AC_SUBST([psdir], ['${docdir}'])dnl -AC_SUBST([libdir], ['${exec_prefix}/lib'])dnl -AC_SUBST([localedir], ['${datarootdir}/locale'])dnl -AC_SUBST([mandir], ['${datarootdir}/man'])dnl - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[[^=]]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -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 ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - _AC_INIT_PARSE_ENABLE([disable], [feature], [no]) - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - _AC_INIT_PARSE_ENABLE([enable], [feature], [\$ac_optarg]) - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -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) - ac_prev=program_transform_name ;; - -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=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - _AC_INIT_PARSE_ENABLE([with], [package], [\$ac_optarg]) - - _AC_INIT_PARSE_ENABLE([without], [package], [no]) - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -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 ;; - - -*) AC_MSG_ERROR([unrecognized option: $ac_option -Try `$[0] --help' for more information.]) - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([[^=]]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : "[.*[^_$as_cr_alnum]]" >/dev/null && - AC_MSG_ERROR([invalid variable name: $ac_envvar]) - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - AC_MSG_WARN([you should use --build, --host, --target]) - expr "x$ac_option" : "[.*[^-._$as_cr_alnum]]" >/dev/null && - AC_MSG_WARN([invalid host type: $ac_option]) - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - AC_MSG_ERROR([missing argument to $ac_option]) -fi - -# Be sure to have absolute directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - case $ac_val in - [[\\/$]]* | ?:[[\\/]]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - AC_MSG_ERROR([expected an absolute directory name for --$ac_var: $ac_val]) -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - AC_MSG_WARN([If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used.]) - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec AS_MESSAGE_FD>/dev/null - -m4_divert_pop([PARSE_ARGS])dnl -])# _AC_INIT_PARSE_ARGS - - -# _AC_INIT_PARSE_ENABLE(OPTION-NAME, FEATURE, VALUE) -# -------------------------------------------------- -# Handle an `--enable' or a `--with' option. -# -m4_define([_AC_INIT_PARSE_ENABLE], -[-$1-* | --$1-*) - ac_$2=`expr "x$ac_option" : 'x-*$1-\(m4_bmatch([$1], [^\(enable\|with\)$], [[[^=]]], [.])*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_$2" : "[.*[^-._$as_cr_alnum]]" >/dev/null && - AC_MSG_ERROR([invalid $2 name: $ac_$2]) - [ac_$2=`echo $ac_$2 | sed 's/[-.]/_/g'`] - eval m4_bmatch([$1], [^\(enable\|disable\)$], [enable], [with])_$ac_$2=$3 ;;dnl -]) - - -# _AC_INIT_HELP -# ------------- -# Handle the `configure --help' message. -m4_define([_AC_INIT_HELP], -[m4_divert_push([HELP_BEGIN])dnl - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures m4_ifset([AC_PACKAGE_STRING], - [AC_PACKAGE_STRING], - [this package]) to adapt to many kinds of systems. - -Usage: $[0] [[OPTION]]... [[VAR=VALUE]]... - -[To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root ]@<:@DATAROOTDIR/doc/m4_ifset([AC_PACKAGE_TARNAME], [AC_PACKAGE_TARNAME], [PACKAGE])@:>@[ - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF] -m4_divert_pop([HELP_BEGIN])dnl -dnl The order of the diversions here is -dnl - HELP_BEGIN -dnl which may be extended by extra generic options such as with X or -dnl AC_ARG_PROGRAM. Displayed only in long --help. -dnl -dnl - HELP_CANON -dnl Support for cross compilation (--build, --host and --target). -dnl Display only in long --help. -dnl -dnl - HELP_ENABLE -dnl which starts with the trailer of the HELP_BEGIN, HELP_CANON section, -dnl then implements the header of the non generic options. -dnl -dnl - HELP_WITH -dnl -dnl - HELP_VAR -dnl -dnl - HELP_VAR_END -dnl -dnl - HELP_END -dnl initialized below, in which we dump the trailer (handling of the -dnl recursion for instance). -m4_divert_push([HELP_ENABLE])dnl -_ACEOF -fi - -if test -n "$ac_init_help"; then -m4_ifset([AC_PACKAGE_STRING], -[ case $ac_init_help in - short | recursive ) echo "Configuration of AC_PACKAGE_STRING:";; - esac]) - cat <<\_ACEOF -m4_divert_pop([HELP_ENABLE])dnl -m4_divert_push([HELP_END])dnl -m4_ifset([AC_PACKAGE_BUGREPORT], [ -Report bugs to .]) -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue - _AC_SRCDIRS(["$ac_dir"]) - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - AC_MSG_WARN([no configuration information is in $ac_dir]) - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -m4_divert_pop([HELP_END])dnl -])# _AC_INIT_HELP - - -# _AC_INIT_VERSION -# ---------------- -# Handle the `configure --version' message. -m4_define([_AC_INIT_VERSION], -[m4_divert_text([VERSION_BEGIN], -[if $ac_init_version; then - cat <<\_ACEOF -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])configure[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -generated by m4_PACKAGE_STRING]) -m4_divert_text([VERSION_END], -[_ACEOF - exit -fi])dnl -])# _AC_INIT_VERSION - - -# _AC_INIT_CONFIG_LOG -# ------------------- -# Initialize the config.log file descriptor and write header to it. -m4_define([_AC_INIT_CONFIG_LOG], -[m4_divert_text([INIT_PREPARE], -[m4_define([AS_MESSAGE_LOG_FD], 5)dnl -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl -$as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was -generated by m4_PACKAGE_STRING. Invocation command line was - - $ $[0] $[@] - -_ACEOF -exec AS_MESSAGE_LOG_FD>>config.log -AS_UNAME >&AS_MESSAGE_LOG_FD - -cat >&AS_MESSAGE_LOG_FD <<_ACEOF - - -m4_text_box([Core tests.]) - -_ACEOF -])])# _AC_INIT_CONFIG_LOG - - -# _AC_INIT_PREPARE -# ---------------- -# Called by AC_INIT to build the preamble of the `configure' scripts. -# 1. Trap and clean up various tmp files. -# 2. Set up the fd and output files -# 3. Remember the options given to `configure' for `config.status --recheck'. -# 4. Initiates confdefs.h -# 5. Loads site and cache files -m4_define([_AC_INIT_PREPARE], -[m4_divert_push([INIT_PREPARE])dnl - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" -dnl If trying to remove duplicates, be sure to (i) keep the *last* -dnl value (e.g. --prefix=1 --prefix=2 --prefix=1 might keep 2 only), -dnl and (ii) not to strip long options (--prefix foo --prefix bar might -dnl give --prefix foo bar). - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in -dnl Use broad patterns, as arguments that would have already made configure -dnl exit don't matter. - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args '$ac_arg'" - ;; - esac - done -done -AS_UNSET(ac_configure_args0) -AS_UNSET(ac_configure_args1) - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - AS_BOX([Cache variables.]) - echo - m4_bpatsubsts(m4_defn([_AC_CACHE_DUMP]), - [^ *\(#.*\)? -], [], - ['], ['\\'']) - echo - - AS_BOX([Output variables.]) - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - AS_BOX([File substitutions.]) - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - AS_BOX([confdefs.h.]) - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&AS_MESSAGE_LOG_FD - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$[$]* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; AS_EXIT([1])' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h -dnl AIX cpp loses on an empty file, NextStep 3.3 (patch 3) loses on a file -dnl containing less than 14 bytes (including the newline). -dnl But the defines below solve this problem. - -# Predefined preprocessor variables. -AC_DEFINE_UNQUOTED([PACKAGE_NAME], ["$PACKAGE_NAME"], - [Define to the full name of this package.]) -AC_DEFINE_UNQUOTED([PACKAGE_TARNAME], ["$PACKAGE_TARNAME"], - [Define to the one symbol short name of this package.]) -AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$PACKAGE_VERSION"], - [Define to the version of this package.]) -AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["$PACKAGE_STRING"], - [Define to the full name and version of this package.]) -AC_DEFINE_UNQUOTED([PACKAGE_BUGREPORT], ["$PACKAGE_BUGREPORT"], - [Define to the address where bug reports for this package - should be sent.]) - -# Let the site file select an alternate cache file if it wants to. -AC_SITE_LOAD -AC_CACHE_LOAD -m4_divert_pop([INIT_PREPARE])dnl -])# _AC_INIT_PREPARE - - -# AU::AC_INIT([UNIQUE-FILE-IN-SOURCE-DIR]) -# ---------------------------------------- -# This macro is used only for Autoupdate. -AU_DEFUN([AC_INIT], -[m4_ifval([$2], [[AC_INIT($@)]], - [m4_ifval([$1], -[[AC_INIT] -AC_CONFIG_SRCDIR([$1])], [[AC_INIT]])])[]dnl -]) - - -# AC_INIT([PACKAGE, VERSION, [BUG-REPORT]) -# ---------------------------------------- -# Include the user macro files, prepare the diversions, and output the -# preamble of the `configure' script. -# Note that the order is important: first initialize, then set the -# AC_CONFIG_SRCDIR. -m4_define([AC_INIT], -[# Forbidden tokens and exceptions. -m4_pattern_forbid([^_?A[CHUM]_]) -m4_pattern_forbid([_AC_]) -m4_pattern_forbid([^LIBOBJS$], - [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) -# Actually reserved by M4sh. -m4_pattern_allow([^AS_FLAGS$]) -AS_INIT -AS_PREPARE -m4_ifval([$2], [_AC_INIT_PACKAGE($@)]) -_AC_INIT_DEFAULTS -_AC_INIT_PARSE_ARGS -_AC_INIT_DIRCHECK -_AC_INIT_SRCDIR -_AC_INIT_HELP -_AC_INIT_VERSION -_AC_INIT_CONFIG_LOG -_AC_INIT_PREPARE -_AC_INIT_NOTICE -_AC_INIT_COPYRIGHT -m4_ifval([$2], , [m4_ifval([$1], [AC_CONFIG_SRCDIR([$1])])])dnl -dnl -dnl Substitute for predefined variables. -AC_SUBST([DEFS])dnl -AC_SUBST([ECHO_C])dnl -AC_SUBST([ECHO_N])dnl -AC_SUBST([ECHO_T])dnl -AC_SUBST([LIBS])dnl -_AC_ARG_VAR_PRECIOUS([build_alias])AC_SUBST([build_alias])dnl -_AC_ARG_VAR_PRECIOUS([host_alias])AC_SUBST([host_alias])dnl -_AC_ARG_VAR_PRECIOUS([target_alias])AC_SUBST([target_alias])dnl -dnl -AC_LANG_PUSH(C) -]) - - - - -## ------------------------------------------------------------- ## -## Selecting optional features, working with optional software. ## -## ------------------------------------------------------------- ## - -# AC_PRESERVE_HELP_ORDER -# ---------------------- -# Emit help strings in the order given, rather than grouping all --enable-FOO -# and all --with-BAR. -AC_DEFUN([AC_PRESERVE_HELP_ORDER], -[m4_divert_once([HELP_ENABLE], [[ -Optional Features and Packages: - --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)]]) -m4_define([_m4_divert(HELP_ENABLE)], _m4_divert(HELP_WITH)) -])# AC_PRESERVE_HELP_ORDER - -# _AC_ENABLE_IF(OPTION, FEATURE, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -# ------------------------------------------------------------------- -# Common code for AC_ARG_ENABLE and AC_ARG_WITH. -# OPTION is either "enable" or "with". -# -m4_define([_AC_ENABLE_IF], -[# Check whether --$1-$2 was given. -_AC_ENABLE_IF_ACTION([$1], m4_translit([$2], [-.], [__]), [$3], [$4])[]dnl -]) - -m4_define([_AC_ENABLE_IF_ACTION], -[AS_IF([test "${$1_$2+set}" = set], [$1val=$$1_$2; $3], [$4])dnl -]) - -# AC_ARG_ENABLE(FEATURE, HELP-STRING, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -# ------------------------------------------------------------------------ -AC_DEFUN([AC_ARG_ENABLE], -[AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER], -[], -[m4_divert_once([HELP_ENABLE], [[ -Optional Features: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes]]])])dnl -m4_divert_once([HELP_ENABLE], [$2])dnl -_AC_ENABLE_IF([enable], [$1], [$3], [$4])dnl -])# AC_ARG_ENABLE - - -AU_DEFUN([AC_ENABLE], -[AC_ARG_ENABLE([$1], [ --enable-$1], [$2], [$3])]) - - -# AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE, [ACTION-IF-FALSE]) -# -------------------------------------------------------------------- -AC_DEFUN([AC_ARG_WITH], -[AC_PROVIDE_IFELSE([AC_PRESERVE_HELP_ORDER], -[], -[m4_divert_once([HELP_WITH], [[ -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)]])]) -m4_divert_once([HELP_WITH], [$2])dnl -_AC_ENABLE_IF([with], [$1], [$3], [$4])dnl -])# AC_ARG_WITH - -AU_DEFUN([AC_WITH], -[AC_ARG_WITH([$1], [ --with-$1], [$2], [$3])]) - - - -## ----------------------------------------- ## -## Remembering variables for reconfiguring. ## -## ----------------------------------------- ## - - -# AC_ARG_VAR(VARNAME, DOCUMENTATION) -# ---------------------------------- -# Register VARNAME as a precious variable, and document it in -# `configure --help' (but only once). -AC_DEFUN([AC_ARG_VAR], -[m4_divert_once([HELP_VAR], [[ -Some influential environment variables:]])dnl -m4_divert_once([HELP_VAR_END], [[ -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations.]])dnl -m4_expand_once([m4_divert_text([HELP_VAR], - [AS_HELP_STRING([$1], [$2], [ ])])], - [$0($1)])dnl -AC_SUBST([$1])dnl -_AC_ARG_VAR_PRECIOUS([$1])dnl -])# AC_ARG_VAR - - -# _AC_ARG_VAR_PRECIOUS(VARNAME) -# ----------------------------- -# Declare VARNAME is precious. -m4_define([_AC_ARG_VAR_PRECIOUS], -[m4_append_uniq([_AC_PRECIOUS_VARS], [$1], [ -])dnl -]) - - -# _AC_ARG_VAR_STORE -# ----------------- -# We try to diagnose when precious variables have changed. To do this, -# make two early snapshots (after the option processing to take -# explicit variables into account) of those variables: one (ac_env_) -# which represents the current run, and a second (ac_cv_env_) which, -# at the first run, will be saved in the cache. As an exception to -# the cache mechanism, its loading will override these variables (non -# `ac_cv_env_' cache value are only set when unset). -# -# In subsequent runs, after having loaded the cache, compare -# ac_cv_env_foo against ac_env_foo. See _AC_ARG_VAR_VALIDATE. -m4_define([_AC_ARG_VAR_STORE], -[m4_divert_text([PARSE_ARGS], -[for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done])dnl -]) - - -# _AC_ARG_VAR_VALIDATE -# -------------------- -# The precious variables are saved twice at the beginning of -# configure. E.g., PRECIOUS is saved as `ac_env_PRECIOUS_set' and -# `ac_env_PRECIOUS_value' on the one hand and `ac_cv_env_PRECIOUS_set' -# and `ac_cv_env_PRECIOUS_value' on the other hand. -# -# Now the cache has just been loaded, so `ac_cv_env_' represents the -# content of the cached values, while `ac_env_' represents that of the -# current values. -# -# So we check that `ac_env_' and `ac_cv_env_' are consistent. If -# they aren't, die. -m4_define([_AC_ARG_VAR_VALIDATE], -[m4_divert_text([INIT_PREPARE], -[# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - AS_MESSAGE([error: `$ac_var' was set to `$ac_old_val' in the previous run], 2) - ac_cache_corrupted=: ;; - ,set) - AS_MESSAGE([error: `$ac_var' was not set in the previous run], 2) - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - AS_MESSAGE([error: `$ac_var' has changed since the previous run:], 2) - AS_MESSAGE([ former value: $ac_old_val], 2) - AS_MESSAGE([ current value: $ac_new_val], 2) - ac_cache_corrupted=: - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - AS_MESSAGE([error: changes in the environment can compromise the build], 2) - AS_ERROR([run `make distclean' and/or `rm $cache_file' and start over]) -fi])dnl -])# _AC_ARG_VAR_VALIDATE - - - - - -## ---------------------------- ## -## Transforming program names. ## -## ---------------------------- ## - - -# AC_ARG_PROGRAM -# -------------- -# This macro is expanded only once, to avoid that `foo' ends up being -# installed as `ggfoo'. -AC_DEFUN_ONCE([AC_ARG_PROGRAM], -[dnl Document the options. -m4_divert_push([HELP_BEGIN])dnl - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names -m4_divert_pop([HELP_BEGIN])dnl -test "$program_prefix" != NONE && - program_transform_name="s&^&$program_prefix&;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. -# By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -[s/[\\$]/&&/g;s/;s,x,x,$//] -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm -f conftest.sed -])# AC_ARG_PROGRAM - - - - - -## ------------------------- ## -## Finding auxiliary files. ## -## ------------------------- ## - - -# AC_CONFIG_AUX_DIR(DIR) -# ---------------------- -# Find install-sh, config.sub, config.guess, and Cygnus configure -# in directory DIR. These are auxiliary files used in configuration. -# DIR can be either absolute or relative to $srcdir. -AC_DEFUN([AC_CONFIG_AUX_DIR], -[AC_CONFIG_AUX_DIRS($1 "$srcdir"/$1)]) - - -# AC_CONFIG_AUX_DIR_DEFAULT -# ------------------------- -# The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'. -# There's no need to call this macro explicitly; just AC_REQUIRE it. -AC_DEFUN([AC_CONFIG_AUX_DIR_DEFAULT], -[AC_CONFIG_AUX_DIRS("$srcdir" "$srcdir/.." "$srcdir/../..")]) - - -# AC_CONFIG_AUX_DIRS(DIR ...) -# --------------------------- -# Internal subroutine. -# Search for the configuration auxiliary files in directory list $1. -# We look only for install-sh, so users of AC_PROG_INSTALL -# do not automatically need to distribute the other auxiliary files. -AC_DEFUN([AC_CONFIG_AUX_DIRS], -[ac_aux_dir= -for ac_dir in $1; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - AC_MSG_ERROR([cannot find install-sh or install.sh in $1]) -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - -AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -])# AC_CONFIG_AUX_DIRS - - - - -## ------------------------ ## -## Finding aclocal macros. ## -## ------------------------ ## - - -# AC_CONFIG_MACRO_DIR(DIR) -# ------------------------ -# Declare directory containing additional macros for aclocal. -AC_DEFUN([AC_CONFIG_MACRO_DIR], []) - - - -## --------------------- ## -## Requiring aux files. ## -## --------------------- ## - -# AC_REQUIRE_AUX_FILE(FILE) -# ------------------------- -# This macro does nothing, it's a hook to be read with `autoconf --trace'. -# It announces FILE is required in the auxdir. -m4_define([AC_REQUIRE_AUX_FILE], -[AS_LITERAL_IF([$1], [], - [AC_FATAL([$0: requires a literal argument])])]) - - - -## ----------------------------------- ## -## Getting the canonical system type. ## -## ----------------------------------- ## - -# The inputs are: -# configure --host=HOST --target=TARGET --build=BUILD -# -# The rules are: -# 1. Build defaults to the current platform, as determined by config.guess. -# 2. Host defaults to build. -# 3. Target defaults to host. - - -# _AC_CANONICAL_SPLIT(THING) -# -------------------------- -# Generate the variables THING, THING_{alias cpu vendor os}. -m4_define([_AC_CANONICAL_SPLIT], -[case $ac_cv_$1 in -*-*-*) ;; -*) AC_MSG_ERROR([invalid value of canonical $1]);; -esac -AC_SUBST([$1], [$ac_cv_$1])dnl -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_$1 -shift -AC_SUBST([$1_cpu], [$[1]])dnl -AC_SUBST([$1_vendor], [$[2]])dnl -shift; shift -[# Remember, the first character of IFS is used to create $]*, -# except with old shells: -$1_os=$[*] -IFS=$ac_save_IFS -case $$1_os in *\ *) $1_os=`echo "$$1_os" | sed 's/ /-/g'`;; esac -AC_SUBST([$1_os])dnl -])# _AC_CANONICAL_SPLIT - - -# AC_CANONICAL_BUILD -# ------------------ -AC_DEFUN([AC_CANONICAL_BUILD], -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_REQUIRE_AUX_FILE([config.sub])dnl -AC_REQUIRE_AUX_FILE([config.guess])dnl -m4_divert_once([HELP_CANON], -[[ -System types: - --build=BUILD configure for building on BUILD [guessed]]])dnl -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - AC_MSG_ERROR([cannot run $SHELL $ac_aux_dir/config.sub]) - -AC_CACHE_CHECK([build system type], [ac_cv_build], -[ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - AC_MSG_ERROR([cannot guess build type; you must specify one]) -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $ac_build_alias failed]) -]) -_AC_CANONICAL_SPLIT(build) -])# AC_CANONICAL_BUILD - - -# AC_CANONICAL_HOST -# ----------------- -AC_DEFUN([AC_CANONICAL_HOST], -[AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_divert_once([HELP_CANON], -[[ --host=HOST cross-compile to build programs to run on HOST [BUILD]]])dnl -AC_CACHE_CHECK([host system type], [ac_cv_host], -[if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $host_alias failed]) -fi -]) -_AC_CANONICAL_SPLIT([host]) -])# AC_CANONICAL_HOST - - -# AC_CANONICAL_TARGET -# ------------------- -AC_DEFUN([AC_CANONICAL_TARGET], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl -m4_divert_once([HELP_CANON], -[[ --target=TARGET configure for building compilers for TARGET [HOST]]])dnl -AC_CACHE_CHECK([target system type], [ac_cv_target], -[if test "x$target_alias" = x; then - ac_cv_target=$ac_cv_host -else - ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - AC_MSG_ERROR([$SHELL $ac_aux_dir/config.sub $target_alias failed]) -fi -]) -_AC_CANONICAL_SPLIT([target]) - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}-[]dnl -])# AC_CANONICAL_TARGET - - -AU_ALIAS([AC_CANONICAL_SYSTEM], [AC_CANONICAL_TARGET]) - - -# AU::AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD]) -# ------------------------------------------ -# If the cache file is inconsistent with the current host, -# target and build system types, execute CMD or print a default -# error message. Now handled via _AC_ARG_VAR_PRECIOUS. -AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], []) - - -## ---------------------- ## -## Caching test results. ## -## ---------------------- ## - - -# AC_SITE_LOAD -# ------------ -# Look for site or system specific initialization scripts. -m4_define([AC_SITE_LOAD], -[# Prefer explicitly selected file to automatically selected ones. -if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" -fi -shift -for ac_site_file -do - if test -r "$ac_site_file"; then - AC_MSG_NOTICE([loading site script $ac_site_file]) - sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD - . "$ac_site_file" - fi -done -]) - - -# AC_CACHE_LOAD -# ------------- -m4_define([AC_CACHE_LOAD], -[if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - AC_MSG_NOTICE([loading cache $cache_file]) - case $cache_file in - [[\\/]]* | ?:[[\\/]]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - AC_MSG_NOTICE([creating cache $cache_file]) - >$cache_file -fi -])# AC_CACHE_LOAD - - -# _AC_CACHE_DUMP -# -------------- -# Dump the cache to stdout. It can be in a pipe (this is a requirement). -m4_define([_AC_CACHE_DUMP], -[# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n ['s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p']`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) AC_MSG_WARN([Cache variable $ac_var contains a newline.]) ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - ["s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"] - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n ["/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"] - ;; - esac | - sort -)dnl -])# _AC_CACHE_DUMP - - -# AC_CACHE_SAVE -# ------------- -# Save the cache. -# Allow a site initialization script to override cache values. -m4_define([AC_CACHE_SAVE], -[cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -_AC_CACHE_DUMP() | - sed [' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end'] >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && - AC_MSG_NOTICE([updating cache $cache_file]) - cat confcache >$cache_file - else - AC_MSG_NOTICE([not updating unwritable cache $cache_file]) - fi -fi -rm -f confcache[]dnl -])# AC_CACHE_SAVE - - -# AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT) -# ------------------------------------------ -# The name of shell var CACHE-ID must contain `_cv_' in order to get saved. -# Should be dnl'ed. Try to catch common mistakes. -m4_defun([AC_CACHE_VAL], -[m4_bmatch([$2], [AC_DEFINE], - [AC_DIAGNOSE([syntax], -[$0($1, ...): suspicious presence of an AC_DEFINE in the second argument, ]dnl -[where no actions should be taken])])dnl -AS_VAR_SET_IF([$1], - [_AS_ECHO_N([(cached) ])], - [$2])]) - - -# AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS) -# ------------------------------------------- -# Do not call this macro with a dnl right behind. -m4_defun([AC_CACHE_CHECK], -[AC_MSG_CHECKING([$1]) -AC_CACHE_VAL([$2], [$3])dnl -AS_LITERAL_IF([$2], - [AC_MSG_RESULT([$$2])], - [ac_res=AS_VAR_GET([$2]) - AC_MSG_RESULT([$ac_res])])dnl -]) - -# _AC_CACHE_CHECK_INT(MESSAGE, CACHE-ID, EXPRESSION, -# [PROLOGUE = DEFAULT-INCLUDES], [IF-FAILS]) -# ------------------------------------------------------------- -AC_DEFUN([_AC_CACHE_CHECK_INT], -[AC_CACHE_CHECK([$1], [$2], - [AC_COMPUTE_INT([$2], [$3], [$4], [$5])]) -])# _AC_CACHE_CHECK_INT - - - -## ---------------------- ## -## Defining CPP symbols. ## -## ---------------------- ## - - -# AC_DEFINE_TRACE_LITERAL(LITERAL-CPP-SYMBOL) -# ------------------------------------------- -# Used by --trace to collect the list of AC_DEFINEd macros. -m4_define([AC_DEFINE_TRACE_LITERAL], -[m4_pattern_allow([^$1$])]) - - -# AC_DEFINE_TRACE(CPP-SYMBOL) -# --------------------------- -# This macro is a wrapper around AC_DEFINE_TRACE_LITERAL which filters -# out non literal symbols. -m4_define([AC_DEFINE_TRACE], -[AS_LITERAL_IF([$1], [AC_DEFINE_TRACE_LITERAL([$1])])]) - - -# AC_DEFINE(VARIABLE, [VALUE], [DESCRIPTION]) -# ------------------------------------------- -# Set VARIABLE to VALUE, verbatim, or 1. Remember the value -# and if VARIABLE is affected the same VALUE, do nothing, else -# die. The third argument is used by autoheader. -m4_define([AC_DEFINE], [_AC_DEFINE_Q([\], $@)]) - - -# AC_DEFINE_UNQUOTED(VARIABLE, [VALUE], [DESCRIPTION]) -# ---------------------------------------------------- -# Similar, but perform shell substitutions $ ` \ once on VALUE. -m4_define([AC_DEFINE_UNQUOTED], [_AC_DEFINE_Q([], $@)]) - - -# _AC_DEFINE_Q(QUOTE, VARIABLE, [VALUE], [DESCRIPTION]) -# ----------------------------------------------------- -m4_define([_AC_DEFINE_Q], -[AC_DEFINE_TRACE([$2])dnl -m4_ifval([$4], [AH_TEMPLATE(m4_bpatsubst([[$2]], [(.*)]), [$4])])dnl -cat >>confdefs.h <<$1_ACEOF -[@%:@define] $2 m4_if($#, 2, 1, [$3]) -_ACEOF -]) - - - -## -------------------------- ## -## Setting output variables. ## -## -------------------------- ## - - -# AC_SUBST_TRACE(VARIABLE) -# ------------------------ -# This macro is used with --trace to collect the list of substituted variables. -m4_define([AC_SUBST_TRACE]) - - -# AC_SUBST(VARIABLE, [VALUE]) -# --------------------------- -# Create an output variable from a shell VARIABLE. If VALUE is given -# assign it to VARIABLE. Use `""' is you want to set VARIABLE to an -# empty value, not an empty second argument. -# -m4_define([AC_SUBST], -[AC_SUBST_TRACE([$1])dnl -m4_pattern_allow([^$1$])dnl -m4_ifvaln([$2], [$1=$2])[]dnl -m4_append_uniq([_AC_SUBST_VARS], [$1], [ -])dnl -])# AC_SUBST - - -# AC_SUBST_FILE(VARIABLE) -# ----------------------- -# Read the comments of the preceding macro. -m4_define([AC_SUBST_FILE], -[m4_pattern_allow([^$1$])dnl -m4_append_uniq([_AC_SUBST_FILES], [$1], [ -])]) - - - -## --------------------------------------- ## -## Printing messages at autoconf runtime. ## -## --------------------------------------- ## - -# In fact, I think we should promote the use of m4_warn and m4_fatal -# directly. This will also avoid to some people to get it wrong -# between AC_FATAL and AC_MSG_ERROR. - - -# AC_DIAGNOSE(CATEGORY, MESSAGE) -# AC_FATAL(MESSAGE, [EXIT-STATUS]) -# -------------------------------- -m4_define([AC_DIAGNOSE], [m4_warn($@)]) -m4_define([AC_FATAL], [m4_fatal($@)]) - - -# AC_WARNING(MESSAGE) -# ------------------- -# Report a MESSAGE to the user of autoconf if `-W' or `-W all' was -# specified. -m4_define([AC_WARNING], -[AC_DIAGNOSE([syntax], [$1])]) - - - - -## ---------------------------------------- ## -## Printing messages at configure runtime. ## -## ---------------------------------------- ## - - -# AC_MSG_CHECKING(FEATURE) -# ------------------------ -m4_define([AC_MSG_CHECKING], -[{ _AS_ECHO_LOG([checking $1]) -_AS_ECHO_N([checking $1... ]); }dnl -]) - - -# AC_MSG_RESULT(RESULT) -# --------------------- -m4_define([AC_MSG_RESULT], -[{ _AS_ECHO_LOG([result: $1]) -_AS_ECHO([${ECHO_T}$1]); }dnl -]) - - -# AC_MSG_WARN(PROBLEM) -# AC_MSG_NOTICE(STRING) -# AC_MSG_ERROR(ERROR, [EXIT-STATUS = 1]) -# AC_MSG_FAILURE(ERROR, [EXIT-STATUS = 1]) -# ---------------------------------------- -m4_copy([AS_WARN], [AC_MSG_WARN]) -m4_copy([AS_MESSAGE], [AC_MSG_NOTICE]) -m4_copy([AS_ERROR], [AC_MSG_ERROR]) -m4_define([AC_MSG_FAILURE], -[AC_MSG_ERROR([$1 -See `config.log' for more details.], [$2])]) - - -# _AC_MSG_LOG_CONFTEST -# -------------------- -m4_define([_AC_MSG_LOG_CONFTEST], -[echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD -sed 's/^/| /' conftest.$ac_ext >&AS_MESSAGE_LOG_FD -]) - - -# AU::AC_CHECKING(FEATURE) -# ------------------------ -AU_DEFUN([AC_CHECKING], -[AS_MESSAGE([checking $1...])]) - - -# AU::AC_MSG_RESULT_UNQUOTED(RESULT) -# ---------------------------------- -# No escaping, so it performed also backtick substitution. -AU_DEFUN([AC_MSG_RESULT_UNQUOTED], -[_AS_ECHO_UNQUOTED([$as_me:$LINENO: result: $1], AS_MESSAGE_LOG_FD) -_AS_ECHO_UNQUOTED([${ECHO_T}$1])[]dnl -]) - - -# AU::AC_VERBOSE(STRING) -# ---------------------- -AU_ALIAS([AC_VERBOSE], [AC_MSG_RESULT]) - - - - - - -## ---------------------------- ## -## Compiler-running mechanics. ## -## ---------------------------- ## - - -# _AC_RUN_LOG(COMMAND, LOG-COMMANDS) -# ---------------------------------- -# Eval COMMAND, save the exit status in ac_status, and log it. -AC_DEFUN([_AC_RUN_LOG], -[{ ($2) >&AS_MESSAGE_LOG_FD - ($1) 2>&AS_MESSAGE_LOG_FD - ac_status=$? - _AS_ECHO_LOG([\$? = $ac_status]) - (exit $ac_status); }]) - - -# _AC_RUN_LOG_STDERR(COMMAND, LOG-COMMANDS) -# ----------------------------------------- -# Run COMMAND, save its stderr into conftest.err, save the exit status -# in ac_status, and log it. Don't forget to clean up conftest.err after -# use. -# Note that when tracing, most shells will leave the traces in stderr -# starting with "+": that's what this macro tries to address. -AC_DEFUN([_AC_RUN_LOG_STDERR], -[{ ($2) >&AS_MESSAGE_LOG_FD - ($1) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&AS_MESSAGE_LOG_FD - _AS_ECHO_LOG([\$? = $ac_status]) - (exit $ac_status); }]) - -# _AC_DO_ECHO(COMMAND) -# -------------------- -# Echo COMMAND. This is designed to be used just before evaluating COMMAND. -AC_DEFUN([_AC_DO_ECHO], -[m4_if([$1], [$ac_try], [], [ac_try="$1" -])dnl -dnl If the string contains '"', '`', or '\', then just echo it rather -dnl than expanding it. This is a hack, but it is safer, while also -dnl typically expanding simple substrings like '$CC', which is what we want. -dnl -dnl The rest of this macro body is quoted, to work around misuses like -dnl `AC_CHECK_FUNC(sigblock, , AC_CHECK_LIB(bsd, sigblock))', -dnl which underquotes the 3rd arg and would misbehave if we didn't quote here. -dnl The "(($ac_try" instead of $ac_try avoids problems with even-worse -dnl underquoting misuses, such as -dnl `AC_CHECK_FUNC(foo, , AC_CHECK_LIB(a, foo, , AC_CHECK_LIB(b, foo)))'. -dnl We normally wouldn't bother with this kind of workaround for invalid code -dnl but this change was put in just before Autoconf 2.60 and we wanted to -dnl minimize the integration hassle. -[case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\""]]) - -# _AC_DO(COMMAND) -# --------------- -# Eval COMMAND, save the exit status in ac_status, and log it. -# For internal use only. -AC_DEFUN([_AC_DO], -[_AC_RUN_LOG([eval "$1"], - [_AC_DO_ECHO([$1])])]) - - -# _AC_DO_STDERR(COMMAND) -# ---------------------- -# Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND. -AC_DEFUN([_AC_DO_STDERR], -[_AC_RUN_LOG_STDERR([eval "$1"], - [_AC_DO_ECHO([$1])])]) - - -# _AC_DO_VAR(VARIABLE) -# -------------------- -# Evaluate "$VARIABLE", which should be a valid shell command. -# The purpose of this macro is to write "configure:123: command line" -# into config.log for every test run. -AC_DEFUN([_AC_DO_VAR], -[_AC_DO([$$1])]) - - -# _AC_DO_TOKENS(COMMAND) -# ---------------------- -# Like _AC_DO_VAR, but execute COMMAND instead, where COMMAND is a series of -# tokens of the shell command language. -AC_DEFUN([_AC_DO_TOKENS], -[{ ac_try='$1' - _AC_DO([$ac_try]); }]) - - -# _AC_EVAL(COMMAND) -# ----------------- -# Eval COMMAND, save the exit status in ac_status, and log it. -# Unlike _AC_DO, this macro mishandles quoted arguments in some cases. -# It is present only for backward compatibility with previous Autoconf versions. -AC_DEFUN([_AC_EVAL], -[_AC_RUN_LOG([eval $1], - [eval echo "$as_me:$LINENO: \"$1\""])]) - - -# _AC_EVAL_STDERR(COMMAND) -# ------------------------ -# Like _AC_RUN_LOG_STDERR, but eval (instead of running) COMMAND. -# Unlike _AC_DO_STDERR, this macro mishandles quoted arguments in some cases. -# It is present only for backward compatibility with previous Autoconf versions. -AC_DEFUN([_AC_EVAL_STDERR], -[_AC_RUN_LOG_STDERR([eval $1], - [eval echo "$as_me:$LINENO: \"$1\""])]) - - -# AC_TRY_EVAL(VARIABLE) -# --------------------- -# Evaluate $VARIABLE, which should be a valid shell command. -# The purpose of this macro is to write "configure:123: command line" -# into config.log for every test run. -# -# The AC_TRY_EVAL and AC_TRY_COMMAND macros are dangerous and -# undocumented, and should not be used. -# They may be removed or their API changed in a future release. -# Autoconf itself no longer uses these two macros; they are present -# only for backward compatibility with previous versions of Autoconf. -# Not every shell command will work due to problems with eval -# and quoting, and the rules for exactly what does work are tricky. -# Worse, due to double-expansion during evaluation, arbitrary unintended -# shell commands could be executed in some situations. -AC_DEFUN([AC_TRY_EVAL], -[_AC_EVAL([$$1])]) - - -# AC_TRY_COMMAND(COMMAND) -# ----------------------- -# Like AC_TRY_EVAL, but execute COMMAND instead, where COMMAND is a series of -# tokens of the shell command language. -# This macro should not be used; see the comments under AC_TRY_EVAL for why. -AC_DEFUN([AC_TRY_COMMAND], -[{ ac_try='$1' - _AC_EVAL([$ac_try]); }]) - - -# AC_RUN_LOG(COMMAND) -# ------------------- -AC_DEFUN([AC_RUN_LOG], -[_AC_RUN_LOG([$1], - [echo "$as_me:$LINENO: AS_ESCAPE([$1])"])]) - - - - -## ------------------------ ## -## Examining declarations. ## -## ------------------------ ## - - - -# _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -# ---------------------------------------------------------------- -# Try to preprocess PROGRAM. -# -# This macro can be used during the selection of a preprocessor. -# eval is necessary to expand ac_cpp. -AC_DEFUN([_AC_PREPROC_IFELSE], -[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl -AS_IF([_AC_DO_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null && { - test -z "$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag$ac_[]_AC_LANG_ABBREV[]_werror_flag" || - test ! -s conftest.err - }], - [$2], - [_AC_MSG_LOG_CONFTEST - $3]) -rm -f conftest.err m4_ifval([$1], [conftest.$ac_ext])[]dnl -])# _AC_PREPROC_IFELSE - - -# AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -# --------------------------------------------------------------- -# Try to preprocess PROGRAM. Requires that the preprocessor for the -# current language was checked for, hence do not use this macro in macros -# looking for a preprocessor. -AC_DEFUN([AC_PREPROC_IFELSE], -[AC_LANG_PREPROC_REQUIRE()dnl -_AC_PREPROC_IFELSE($@)]) - - -# AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -# --------------------------------------------------------- -# AC_TRY_CPP is used to check whether particular header files exist. -# (But it actually tests whether INCLUDES produces no CPP errors.) -# -# INCLUDES are not defaulted and are double quoted. -AU_DEFUN([AC_TRY_CPP], -[AC_PREPROC_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])]) - - -# AC_EGREP_CPP(PATTERN, PROGRAM, -# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# ------------------------------------------------------ -# Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must -# come early, it is not included in AC_BEFORE checks. -AC_DEFUN([AC_EGREP_CPP], -[AC_LANG_PREPROC_REQUIRE()dnl -AC_REQUIRE([AC_PROG_EGREP])dnl -AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])]) -AS_IF([dnl eval is necessary to expand ac_cpp. -dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell. -(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | -dnl Quote $1 to prevent m4 from eating character classes - $EGREP "[$1]" >/dev/null 2>&1], - [$3], - [$4])dnl -rm -f conftest* -])# AC_EGREP_CPP - - -# AC_EGREP_HEADER(PATTERN, HEADER-FILE, -# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# --------------------------------------------------------- -AC_DEFUN([AC_EGREP_HEADER], -[AC_EGREP_CPP([$1], -[#include <$2> -], [$3], [$4])]) - - - - -## ------------------ ## -## Examining syntax. ## -## ------------------ ## - - -# _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -# ---------------------------------------------------------------- -# Try to compile PROGRAM. -# This macro can be used during the selection of a compiler. -m4_define([_AC_COMPILE_IFELSE], -[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl -rm -f conftest.$ac_objext -AS_IF([_AC_DO_STDERR($ac_compile) && { - test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext], - [$2], - [_AC_MSG_LOG_CONFTEST - $3]) -rm -f core conftest.err conftest.$ac_objext m4_ifval([$1], [conftest.$ac_ext])[]dnl -])# _AC_COMPILE_IFELSE - - -# AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -# --------------------------------------------------------------- -# Try to compile PROGRAM. Requires that the compiler for the current -# language was checked for, hence do not use this macro in macros looking -# for a compiler. -AC_DEFUN([AC_COMPILE_IFELSE], -[AC_LANG_COMPILER_REQUIRE()dnl -_AC_COMPILE_IFELSE($@)]) - - -# AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY, -# [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -# --------------------------------------------------- -AU_DEFUN([AC_TRY_COMPILE], -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])]) - - - -## --------------------- ## -## Examining libraries. ## -## --------------------- ## - - -# _AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -# ------------------------------------------------------------- -# Try to link PROGRAM. -# This macro can be used during the selection of a compiler. -m4_define([_AC_LINK_IFELSE], -[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl -rm -f conftest.$ac_objext conftest$ac_exeext -AS_IF([_AC_DO_STDERR($ac_link) && { - test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - AS_TEST_X([conftest$ac_exeext])], - [$2], - [_AC_MSG_LOG_CONFTEST - $3]) -dnl Delete also the IPA/IPO (Inter Procedural Analysis/Optimization) -dnl information created by the PGI compiler (conftest_ipa8_conftest.oo), -dnl as it would interfere with the next link command. -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext m4_ifval([$1], [conftest.$ac_ext])[]dnl -])# _AC_LINK_IFELSE - - -# AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -# ------------------------------------------------------------ -# Try to link PROGRAM. Requires that the compiler for the current -# language was checked for, hence do not use this macro in macros looking -# for a compiler. -AC_DEFUN([AC_LINK_IFELSE], -[AC_LANG_COMPILER_REQUIRE()dnl -_AC_LINK_IFELSE($@)]) - - -# AC_TRY_LINK(INCLUDES, FUNCTION-BODY, -# [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -# ------------------------------------------------ -# Contrarily to AC_LINK_IFELSE, this macro double quote its first two args. -AU_DEFUN([AC_TRY_LINK], -[AC_LINK_IFELSE([AC_LANG_PROGRAM([[$1]], [[$2]])], [$3], [$4])]) - - -# AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY, -# ACTION-IF-TRUE, [ACTION-IF-FALSE]) -# --------------------------------------------------- -AU_DEFUN([AC_COMPILE_CHECK], -[m4_ifvaln([$1], [AC_MSG_CHECKING([for $1])])dnl -AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])]) - - - - -## ------------------------------- ## -## Checking for runtime features. ## -## ------------------------------- ## - - -# _AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -# ------------------------------------------------------------ -# Compile, link, and run. -# This macro can be used during the selection of a compiler. -# We also remove conftest.o as if the compilation fails, some compilers -# don't remove it. We remove gmon.out and bb.out, which may be -# created during the run if the program is built with profiling support. -m4_define([_AC_RUN_IFELSE], -[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl -rm -f conftest$ac_exeext -AS_IF([_AC_DO_VAR(ac_link) && _AC_DO_TOKENS(./conftest$ac_exeext)], - [$2], - [echo "$as_me: program exited with status $ac_status" >&AS_MESSAGE_LOG_FD -_AC_MSG_LOG_CONFTEST -m4_ifvaln([$3], - [( exit $ac_status ) -$3])dnl])[]dnl -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext m4_ifval([$1], - [conftest.$ac_ext])[]dnl -])# _AC_RUN_IFELSE - - -# AC_RUN_IFELSE(PROGRAM, -# [ACTION-IF-TRUE], [ACTION-IF-FALSE], -# [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR]) -# ---------------------------------------------------------- -# Compile, link, and run. Requires that the compiler for the current -# language was checked for, hence do not use this macro in macros looking -# for a compiler. -AC_DEFUN([AC_RUN_IFELSE], -[AC_LANG_COMPILER_REQUIRE()dnl -m4_ifval([$4], [], - [AC_DIAGNOSE([cross], - [$0 called without default to allow cross compiling])])dnl -AS_IF([test "$cross_compiling" = yes], - [m4_default([$4], - [AC_MSG_FAILURE([cannot run test program while cross compiling])])], - [_AC_RUN_IFELSE($@)]) -]) - - -# AC_TRY_RUN(PROGRAM, -# [ACTION-IF-TRUE], [ACTION-IF-FALSE], -# [ACTION-IF-CROSS-COMPILING = RUNTIME-ERROR]) -# -------------------------------------------------------- -AU_DEFUN([AC_TRY_RUN], -[AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3], [$4])]) - - - -## ------------------------------------- ## -## Checking for the existence of files. ## -## ------------------------------------- ## - -# AC_CHECK_FILE(FILE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# ------------------------------------------------------------- -# -# Check for the existence of FILE. -AC_DEFUN([AC_CHECK_FILE], -[AC_DIAGNOSE([cross], - [cannot check for file existence when cross compiling])dnl -AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl -AC_CACHE_CHECK([for $1], [ac_File], -[test "$cross_compiling" = yes && - AC_MSG_ERROR([cannot check for file existence when cross compiling]) -if test -r "$1"; then - AS_VAR_SET([ac_File], [yes]) -else - AS_VAR_SET([ac_File], [no]) -fi]) -AS_IF([test AS_VAR_GET([ac_File]) = yes], [$2], [$3])[]dnl -AS_VAR_POPDEF([ac_File])dnl -])# AC_CHECK_FILE - - -# AC_CHECK_FILES(FILE..., [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# ----------------------------------------------------------------- -AC_DEFUN([AC_CHECK_FILES], -[m4_foreach_w([AC_FILE_NAME], [$1], - [AC_CHECK_FILE(AC_FILE_NAME, - [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_FILE_NAME), 1, - [Define to 1 if you have the - file `]AC_File['.]) -$2], - [$3])])]) - - -## ------------------------------- ## -## Checking for declared symbols. ## -## ------------------------------- ## - - -# AC_CHECK_DECL(SYMBOL, -# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], -# [INCLUDES = DEFAULT-INCLUDES]) -# ------------------------------------------------------- -# Check whether SYMBOL (a function, variable, or constant) is declared. -AC_DEFUN([AC_CHECK_DECL], -[AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])dnl -AC_CACHE_CHECK([whether $1 is declared], [ac_Symbol], -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])], -[#ifndef $1 - (void) $1; -#endif -])], - [AS_VAR_SET([ac_Symbol], [yes])], - [AS_VAR_SET([ac_Symbol], [no])])]) -AS_IF([test AS_VAR_GET([ac_Symbol]) = yes], [$2], [$3])[]dnl -AS_VAR_POPDEF([ac_Symbol])dnl -])# AC_CHECK_DECL - - -# AC_CHECK_DECLS(SYMBOLS, -# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], -# [INCLUDES = DEFAULT-INCLUDES]) -# -------------------------------------------------------- -# Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise. See the -# documentation for a detailed explanation of this difference with -# other AC_CHECK_*S macros. SYMBOLS is an m4 list. -AC_DEFUN([AC_CHECK_DECLS], -[m4_foreach([AC_Symbol], [$1], - [AC_CHECK_DECL(AC_Symbol, - [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 1, - [Define to 1 if you have the declaration - of `]AC_Symbol[', and to 0 if you don't.]) -$2], - [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_DECL_]AC_Symbol), 0) -$3], - [$4])]) -])# AC_CHECK_DECLS - - -# AC_CHECK_DECLS_ONCE(SYMBOLS) -# ---------------------------- -# Like AC_CHECK_DECLS(SYMBOLS), but do it at most once. -AC_DEFUN([AC_CHECK_DECLS_ONCE], -[ - m4_foreach([AC_Symbol], [$1], - [AC_DEFUN([_AC_Check_Decl_]m4_defn([AC_Symbol]), - [AC_CHECK_DECLS(m4_defn([AC_Symbol]))]) - AC_REQUIRE([_AC_Check_Decl_]m4_defn([AC_Symbol]))]) -]) - - - -## ---------------------------------- ## -## Replacement of library functions. ## -## ---------------------------------- ## - - -# AC_CONFIG_LIBOBJ_DIR(DIRNAME) -# ----------------------------- -# Announce LIBOBJ replacement files are in $top_srcdir/DIRNAME. -AC_DEFUN_ONCE([AC_CONFIG_LIBOBJ_DIR], -[m4_divert_text([DEFAULTS], [ac_config_libobj_dir=$1])]) - - -# AC_LIBSOURCE(FILE-NAME) -# ----------------------- -# Announce we might need the file `FILE-NAME'. -m4_define([AC_LIBSOURCE], []) - - -# AC_LIBSOURCES([FILE-NAME1, ...]) -# ------------------------------- -# Announce we might need these files. -m4_define([AC_LIBSOURCES], -[m4_foreach([_AC_FILE_NAME], [$1], - [AC_LIBSOURCE(_AC_FILE_NAME)])]) - - -# _AC_LIBOBJ(FILE-NAME-NOEXT, ACTION-IF-INDIR) -# -------------------------------------------- -# We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'. -m4_define([_AC_LIBOBJ], -[AS_LITERAL_IF([$1], - [AC_LIBSOURCE([$1.c])], - [$2])dnl -case " $LIB@&t@OBJS " in - *" $1.$ac_objext "* ) ;; - *) AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS $1.$ac_objext"]) ;; -esac -]) - - -# AC_LIBOBJ(FILE-NAME-NOEXT) -# ------------------------- -# We need `FILE-NAME-NOEXT.o', save this into `LIBOBJS'. -m4_define([AC_LIBOBJ], -[_AC_LIBOBJ([$1], - [AC_DIAGNOSE(syntax, - [$0($1): you should use literals])])dnl -]) - - -# _AC_LIBOBJS_NORMALIZE -# --------------------- -# Clean up LIBOBJS and LTLIBOBJS so that they work with 1. ac_objext, -# 2. Automake's ANSI2KNR, 3. Libtool, 4. combination of the three. -# Used with AC_CONFIG_COMMANDS_PRE. -AC_DEFUN([_AC_LIBOBJS_NORMALIZE], -[ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -done -AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) -AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) -]) - - -## ----------------------------------- ## -## Checking compiler characteristics. ## -## ----------------------------------- ## - - -# _AC_COMPUTE_INT_COMPILE(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS]) -# ------------------------------------------------------------------- -# Compute the integer EXPRESSION and store the result in the VARIABLE. -# Works OK if cross compiling, but assumes twos-complement arithmetic. -m4_define([_AC_COMPUTE_INT_COMPILE], -[# Depending upon the size, compute the lo and hi bounds. -_AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= 0])], - [ac_lo=0 ac_mid=0 - while :; do - _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])], - [ac_hi=$ac_mid; break], - [ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1`]) - done], -[AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) < 0])], - [ac_hi=-1 ac_mid=-1 - while :; do - _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) >= $ac_mid])], - [ac_lo=$ac_mid; break], - [ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid`]) - done], - [ac_lo= ac_hi=])]) -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - _AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([$3], [($1) <= $ac_mid])], - [ac_hi=$ac_mid], [ac_lo=`expr '(' $ac_mid ')' + 1`]) -done -case $ac_lo in -?*) $2=$ac_lo;; -'') $4 ;; -esac[]dnl -])# _AC_COMPUTE_INT_COMPILE - - -# _AC_COMPUTE_INT_RUN(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS]) -# --------------------------------------------------------------- -# Store the evaluation of the integer EXPRESSION in VARIABLE. -m4_define([_AC_COMPUTE_INT_RUN], -[_AC_RUN_IFELSE([AC_LANG_INT_SAVE([$3], [$1])], - [$2=`cat conftest.val`], [$4])]) - - -# AC_COMPUTE_INT(VARIABLE, EXPRESSION, PROLOGUE, [IF-FAILS]) -# ---------------------------------------------------------- -AC_DEFUN([AC_COMPUTE_INT], -[AC_LANG_COMPILER_REQUIRE()dnl -if test "$cross_compiling" = yes; then - _AC_COMPUTE_INT_COMPILE([$2], [$1], [$3], [$4]) -else - _AC_COMPUTE_INT_RUN([$2], [$1], [$3], [$4]) -fi -rm -f conftest.val[]dnl -])# _AC_COMPUTE_INT - -# _AC_COMPUTE_INT(EXPRESSION, VARIABLE, PROLOGUE, [IF-FAILS]) -# ----------------------------------------------------------- -# FIXME: this private interface was used by several packages. -# Give them time to transition to AC_COMPUTE_INT and then delete this one. -AC_DEFUN([_AC_COMPUTE_INT], -[AC_COMPUTE_INT([$2], [$1], [$3], [$4]) -AC_DIAGNOSE([obsolete], -[The macro `_AC_COMPUTE_INT' is obsolete and will be deleted in a -future version or Autoconf. Hence, it is suggested that you use -instead the public AC_COMPUTE_INT macro. Note that the arguments are -slightly different between the two.])dnl -])# _AC_COMPUTE_INT diff --git a/build/autoconf_prepend-include/autoconf/libs.m4 b/build/autoconf_prepend-include/autoconf/libs.m4 deleted file mode 100644 index d70babf3ed..0000000000 --- a/build/autoconf_prepend-include/autoconf/libs.m4 +++ /dev/null @@ -1,496 +0,0 @@ -# This file is part of Autoconf. -*- Autoconf -*- -# Checking for libraries. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception, the Free Software Foundation gives unlimited -# permission to copy, distribute and modify the configure scripts that -# are the output of Autoconf. You need not follow the terms of the GNU -# General Public License when using or distributing such scripts, even -# though portions of the text of Autoconf appear in them. The GNU -# General Public License (GPL) does govern all other use of the material -# that constitutes the Autoconf program. -# -# Certain portions of the Autoconf source text are designed to be copied -# (in certain cases, depending on the input) into the output of -# Autoconf. We call these the "data" portions. The rest of the Autoconf -# source text consists of comments plus executable code that decides which -# of the data portions to output in any given case. We call these -# comments and executable code the "non-data" portions. Autoconf never -# copies any of the non-data portions into its output. -# -# This special exception to the GPL applies to versions of Autoconf -# released by the Free Software Foundation. When you make and -# distribute a modified version of Autoconf, you may extend this special -# exception to the GPL to apply to your modified version as well, *unless* -# your modified version has the potential to copy into its output some -# of the text that was the non-data portion of the version that you started -# with. (In other words, unless your change moves or copies text from -# the non-data portions to the data portions.) If your modification has -# such potential, you must delete any notice of this special exception -# to the GPL from your modified version. -# -# Written by David MacKenzie, with help from -# Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, -# Roland McGrath, Noah Friedman, david d zuhn, and many others. - -# Table of contents -# -# 1. Generic tests for libraries -# 2. Tests for specific libraries - - -## --------------------------------- ## -## 1. Generic tests for libraries.## ## -## --------------------------------- ## - - - -# AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS, -# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], -# [OTHER-LIBRARIES]) -# -------------------------------------------------------- -# Search for a library defining FUNC, if it's not already available. -AC_DEFUN([AC_SEARCH_LIBS], -[AS_VAR_PUSHDEF([ac_Search], [ac_cv_search_$1])dnl -AC_CACHE_CHECK([for library containing $1], [ac_Search], -[ac_func_search_save_LIBS=$LIBS -AC_LANG_CONFTEST([AC_LANG_CALL([], [$1])]) -for ac_lib in '' $2; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $5 $ac_func_search_save_LIBS" - fi - AC_LINK_IFELSE([], [AS_VAR_SET([ac_Search], [$ac_res])]) - AS_VAR_SET_IF([ac_Search], [break])dnl -done -AS_VAR_SET_IF([ac_Search], , [AS_VAR_SET([ac_Search], [no])])dnl -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS]) -ac_res=AS_VAR_GET([ac_Search]) -AS_IF([test "$ac_res" != no], - [test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - $3], - [$4])dnl -AS_VAR_POPDEF([ac_Search])dnl -]) - - - -# AC_CHECK_LIB(LIBRARY, FUNCTION, -# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], -# [OTHER-LIBRARIES]) -# ------------------------------------------------------ -# -# Use a cache variable name containing both the library and function name, -# because the test really is for library $1 defining function $2, not -# just for library $1. Separate tests with the same $1 and different $2s -# may have different results. -# -# Note that using directly AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2]) -# is asking for troubles, since AC_CHECK_LIB($lib, fun) would give -# ac_cv_lib_$lib_fun, which is definitely not what was meant. Hence -# the AS_LITERAL_IF indirection. -# -# FIXME: This macro is extremely suspicious. It DEFINEs unconditionally, -# whatever the FUNCTION, in addition to not being a *S macro. Note -# that the cache does depend upon the function we are looking for. -# -# It is on purpose we used `ac_check_lib_save_LIBS' and not just -# `ac_save_LIBS': there are many macros which don't want to see `LIBS' -# changed but still want to use AC_CHECK_LIB, so they save `LIBS'. -# And ``ac_save_LIBS' is too tempting a name, so let's leave them some -# freedom. -AC_DEFUN([AC_CHECK_LIB], -[m4_ifval([$3], , [AH_CHECK_LIB([$1])])dnl -AS_LITERAL_IF([$1], - [AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])], - [AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1''_$2])])dnl -AC_CACHE_CHECK([for $2 in -l$1], [ac_Lib], -[ac_check_lib_save_LIBS=$LIBS -LIBS="-l$1 $5 $LIBS" -AC_LINK_IFELSE([AC_LANG_CALL([], [$2])], - [AS_VAR_SET([ac_Lib], [yes])], - [AS_VAR_SET([ac_Lib], [no])]) -LIBS=$ac_check_lib_save_LIBS]) -AS_IF([test AS_VAR_GET([ac_Lib]) = yes], - [m4_default([$3], [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIB$1)) - LIBS="-l$1 $LIBS" -])], - [$4])dnl -AS_VAR_POPDEF([ac_Lib])dnl -])# AC_CHECK_LIB - - -# AH_CHECK_LIB(LIBNAME) -# --------------------- -m4_define([AH_CHECK_LIB], -[AH_TEMPLATE(AS_TR_CPP([HAVE_LIB$1]), - [Define to 1 if you have the `$1' library (-l$1).])]) - - -# AC_HAVE_LIBRARY(LIBRARY, -# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], -# [OTHER-LIBRARIES]) -# --------------------------------------------------------- -# -# This macro is equivalent to calling `AC_CHECK_LIB' with a FUNCTION -# argument of `main'. In addition, LIBRARY can be written as any of -# `foo', `-lfoo', or `libfoo.a'. In all of those cases, the compiler -# is passed `-lfoo'. However, LIBRARY cannot be a shell variable; -# it must be a literal name. -AU_DEFUN([AC_HAVE_LIBRARY], -[m4_pushdef([AC_Lib_Name], - m4_bpatsubst(m4_bpatsubst([[$1]], - [lib\([^\.]*\)\.a], [\1]), - [-l], []))dnl -AC_CHECK_LIB(AC_Lib_Name, main, [$2], [$3], [$4])dnl -ac_cv_lib_[]AC_Lib_Name()=ac_cv_lib_[]AC_Lib_Name()_main -m4_popdef([AC_Lib_Name])dnl -]) - - - - -## --------------------------------- ## -## 2. Tests for specific libraries. ## -## --------------------------------- ## - - - -# --------------------- # -# Checks for X window. # -# --------------------- # - - -# _AC_PATH_X_XMKMF -# ---------------- -# Internal subroutine of _AC_PATH_X. -# Set ac_x_includes and/or ac_x_libraries. -m4_define([_AC_PATH_X_XMKMF], -[AC_ARG_VAR(XMKMF, [Path to xmkmf, Makefile generator for X Window System])dnl -rm -f -r conftest.dir -if mkdir conftest.dir; then - cd conftest.dir - cat >Imakefile <<'_ACEOF' -incroot: - @echo incroot='${INCROOT}' -usrlibdir: - @echo usrlibdir='${USRLIBDIR}' -libdir: - @echo libdir='${LIBDIR}' -_ACEOF - if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then - # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - for ac_var in incroot usrlibdir libdir; do - eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" - done - # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. - for ac_extension in a so sl; do - if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && - test -f "$ac_im_libdir/libX11.$ac_extension"; then - ac_im_usrlibdir=$ac_im_libdir; break - fi - done - # Screen out bogus values from the imake configuration. They are - # bogus both because they are the default anyway, and because - # using them would break gcc on systems where it needs fixed includes. - case $ac_im_incroot in - /usr/include) ac_x_includes= ;; - *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; - esac - case $ac_im_usrlibdir in - /usr/lib | /lib) ;; - *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; - esac - fi - cd .. - rm -f -r conftest.dir -fi -])# _AC_PATH_X_XMKMF - - -# _AC_PATH_X_DIRECT -# ----------------- -# Internal subroutine of _AC_PATH_X. -# Set ac_x_includes and/or ac_x_libraries. -m4_define([_AC_PATH_X_DIRECT], -[# Standard set of common directories for X headers. -# Check X11 before X11Rn because it is often a symlink to the current release. -ac_x_header_dirs=' -/usr/X11/include -/usr/X11R6/include -/usr/X11R5/include -/usr/X11R4/include - -/usr/include/X11 -/usr/include/X11R6 -/usr/include/X11R5 -/usr/include/X11R4 - -/usr/local/X11/include -/usr/local/X11R6/include -/usr/local/X11R5/include -/usr/local/X11R4/include - -/usr/local/include/X11 -/usr/local/include/X11R6 -/usr/local/include/X11R5 -/usr/local/include/X11R4 - -/usr/X386/include -/usr/x386/include -/usr/XFree86/include/X11 - -/usr/include -/usr/local/include -/usr/unsupported/include -/usr/athena/include -/usr/local/x11r5/include -/usr/lpp/Xamples/include - -/usr/openwin/include -/usr/openwin/share/include' - -if test "$ac_x_includes" = no; then - # Guess where to find include files, by looking for Xlib.h. - # First, try using that file with no special directory specified. - AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include ])], -[# We can compile using X headers with no special include directory. -ac_x_includes=], -[for ac_dir in $ac_x_header_dirs; do - if test -r "$ac_dir/X11/Xlib.h"; then - ac_x_includes=$ac_dir - break - fi -done]) -fi # $ac_x_includes = no - -if test "$ac_x_libraries" = no; then - # Check for the libraries. - # See if we find them without any special options. - # Don't add to $LIBS permanently. - ac_save_LIBS=$LIBS - LIBS="-lX11 $LIBS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include ], - [XrmInitialize ()])], - [LIBS=$ac_save_LIBS -# We can link X programs with no special library path. -ac_x_libraries=], - [LIBS=$ac_save_LIBS -for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` -do - # Don't even attempt the hair of trying to link an X program! - for ac_extension in a so sl; do - if test -r "$ac_dir/libX11.$ac_extension"; then - ac_x_libraries=$ac_dir - break 2 - fi - done -done]) -fi # $ac_x_libraries = no -])# _AC_PATH_X_DIRECT - - -# _AC_PATH_X -# ---------- -# Compute ac_cv_have_x. -AC_DEFUN([_AC_PATH_X], -[AC_CACHE_VAL(ac_cv_have_x, -[# One or both of the vars are not set, and there is no cached value. -ac_x_includes=no ac_x_libraries=no -_AC_PATH_X_XMKMF -_AC_PATH_X_DIRECT -case $ac_x_includes,$ac_x_libraries in #( - no,* | *,no | *\'*) - # Didn't find X, or a directory has "'" in its name. - ac_cv_have_x="have_x=no";; #( - *) - # Record where we found X for the cache. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$ac_x_includes'\ - ac_x_libraries='$ac_x_libraries'" -esac])dnl -]) - - -# AC_PATH_X -# --------- -# If we find X, set shell vars x_includes and x_libraries to the -# paths, otherwise set no_x=yes. -# Uses ac_ vars as temps to allow command line to override cache and checks. -# --without-x overrides everything else, but does not touch the cache. -AN_HEADER([X11/Xlib.h], [AC_PATH_X]) -AC_DEFUN([AC_PATH_X], -[dnl Document the X abnormal options inherited from history. -m4_divert_once([HELP_BEGIN], [ -X features: - --x-includes=DIR X include files are in DIR - --x-libraries=DIR X library files are in DIR])dnl -AC_MSG_CHECKING([for X]) - -AC_ARG_WITH(x, [ --with-x use the X Window System]) -# $have_x is `yes', `no', `disabled', or empty when we do not yet know. -if test "x$with_x" = xno; then - # The user explicitly disabled X. - have_x=disabled -else - case $x_includes,$x_libraries in #( - *\'*) AC_MSG_ERROR([Cannot use X directory names containing ']);; #( - *,NONE | NONE,*) _AC_PATH_X;; #( - *) have_x=yes;; - esac - eval "$ac_cv_have_x" -fi # $with_x != no - -if test "$have_x" != yes; then - AC_MSG_RESULT([$have_x]) - no_x=yes -else - # If each of the values was on the command line, it overrides each guess. - test "x$x_includes" = xNONE && x_includes=$ac_x_includes - test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries - # Update the cache value to reflect the command line values. - ac_cv_have_x="have_x=yes\ - ac_x_includes='$x_includes'\ - ac_x_libraries='$x_libraries'" - AC_MSG_RESULT([libraries $x_libraries, headers $x_includes]) -fi -])# AC_PATH_X - - - -# AC_PATH_XTRA -# ------------ -# Find additional X libraries, magic flags, etc. -AC_DEFUN([AC_PATH_XTRA], -[AC_REQUIRE([AC_PATH_X])dnl -if test "$no_x" = yes; then - # Not all programs may use this symbol, but it does not hurt to define it. - AC_DEFINE([X_DISPLAY_MISSING], 1, - [Define to 1 if the X Window System is missing or not being used.]) - X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= -else - if test -n "$x_includes"; then - X_CFLAGS="$X_CFLAGS -I$x_includes" - fi - - # It would also be nice to do this for all -L options, not just this one. - if test -n "$x_libraries"; then - X_LIBS="$X_LIBS -L$x_libraries" - # For Solaris; some versions of Sun CC require a space after -R and - # others require no space. Words are not sufficient . . . . - AC_MSG_CHECKING([whether -R must be followed by a space]) - ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" - ac_xsave_[]_AC_LANG_ABBREV[]_werror_flag=$ac_[]_AC_LANG_ABBREV[]_werror_flag - ac_[]_AC_LANG_ABBREV[]_werror_flag=yes - AC_LINK_IFELSE([AC_LANG_PROGRAM()], - [AC_MSG_RESULT([no]) - X_LIBS="$X_LIBS -R$x_libraries"], - [LIBS="$ac_xsave_LIBS -R $x_libraries" - AC_LINK_IFELSE([AC_LANG_PROGRAM()], - [AC_MSG_RESULT([yes]) - X_LIBS="$X_LIBS -R $x_libraries"], - [AC_MSG_RESULT([neither works])])]) - ac_[]_AC_LANG_ABBREV[]_werror_flag=$ac_xsave_[]_AC_LANG_ABBREV[]_werror_flag - LIBS=$ac_xsave_LIBS - fi - - # Check for system-dependent libraries X programs must link with. - # Do this before checking for the system-independent R6 libraries - # (-lICE), since we may need -lsocket or whatever for X linking. - - if test "$ISC" = yes; then - X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" - else - # Martyn Johnson says this is needed for Ultrix, if the X - # libraries were built with DECnet support. And Karl Berry says - # the Alpha needs dnet_stub (dnet does not exist). - ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" - AC_LINK_IFELSE([AC_LANG_CALL([], [XOpenDisplay])], - [], - [AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"]) - if test $ac_cv_lib_dnet_dnet_ntoa = no; then - AC_CHECK_LIB(dnet_stub, dnet_ntoa, - [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"]) - fi]) - LIBS="$ac_xsave_LIBS" - - # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, - # to get the SysV transport functions. - # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) - # needs -lnsl. - # The nsl library prevents programs from opening the X display - # on Irix 5.2, according to T.E. Dickey. - # The functions gethostbyname, getservbyname, and inet_addr are - # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. - AC_CHECK_FUNC(gethostbyname) - if test $ac_cv_func_gethostbyname = no; then - AC_CHECK_LIB(nsl, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl") - if test $ac_cv_lib_nsl_gethostbyname = no; then - AC_CHECK_LIB(bsd, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd") - fi - fi - - # lieder@skyler.mavd.honeywell.com says without -lsocket, - # socket/setsockopt and other routines are undefined under SCO ODT - # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary - # on later versions), says Simon Leinen: it contains gethostby* - # variants that don't use the name server (or something). -lsocket - # must be given before -lnsl if both are needed. We assume that - # if connect needs -lnsl, so does gethostbyname. - AC_CHECK_FUNC(connect) - if test $ac_cv_func_connect = no; then - AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", , - $X_EXTRA_LIBS) - fi - - # Guillermo Gomez says -lposix is necessary on A/UX. - AC_CHECK_FUNC(remove) - if test $ac_cv_func_remove = no; then - AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix") - fi - - # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. - AC_CHECK_FUNC(shmat) - if test $ac_cv_func_shmat = no; then - AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc") - fi - fi - - # Check for libraries that X11R6 Xt/Xaw programs need. - ac_save_LDFLAGS=$LDFLAGS - test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" - # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to - # check for ICE first), but we must link in the order -lSM -lICE or - # we get undefined symbols. So assume we have SM if we have ICE. - # These have to be linked with before -lX11, unlike the other - # libraries we check for below, so use a different variable. - # John Interrante, Karl Berry - AC_CHECK_LIB(ICE, IceConnectionNumber, - [X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"], , $X_EXTRA_LIBS) - LDFLAGS=$ac_save_LDFLAGS - -fi -AC_SUBST(X_CFLAGS)dnl -AC_SUBST(X_PRE_LIBS)dnl -AC_SUBST(X_LIBS)dnl -AC_SUBST(X_EXTRA_LIBS)dnl -])# AC_PATH_XTRA diff --git a/build/autoconf_prepend-include/autoconf/status.m4 b/build/autoconf_prepend-include/autoconf/status.m4 deleted file mode 100644 index 7f39190678..0000000000 --- a/build/autoconf_prepend-include/autoconf/status.m4 +++ /dev/null @@ -1,1536 +0,0 @@ -# This file is part of Autoconf. -*- Autoconf -*- -# Parameterizing and creating config.status. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, USA. - -# As a special exception, the Free Software Foundation gives unlimited -# permission to copy, distribute and modify the configure scripts that -# are the output of Autoconf. You need not follow the terms of the GNU -# General Public License when using or distributing such scripts, even -# though portions of the text of Autoconf appear in them. The GNU -# General Public License (GPL) does govern all other use of the material -# that constitutes the Autoconf program. -# -# Certain portions of the Autoconf source text are designed to be copied -# (in certain cases, depending on the input) into the output of -# Autoconf. We call these the "data" portions. The rest of the Autoconf -# source text consists of comments plus executable code that decides which -# of the data portions to output in any given case. We call these -# comments and executable code the "non-data" portions. Autoconf never -# copies any of the non-data portions into its output. -# -# This special exception to the GPL applies to versions of Autoconf -# released by the Free Software Foundation. When you make and -# distribute a modified version of Autoconf, you may extend this special -# exception to the GPL to apply to your modified version as well, *unless* -# your modified version has the potential to copy into its output some -# of the text that was the non-data portion of the version that you started -# with. (In other words, unless your change moves or copies text from -# the non-data portions to the data portions.) If your modification has -# such potential, you must delete any notice of this special exception -# to the GPL from your modified version. -# -# Written by David MacKenzie, with help from -# Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, -# Roland McGrath, Noah Friedman, david d zuhn, and many others. - - -# This file handles about all the preparation aspects for -# `config.status': registering the configuration files, the headers, -# the links, and the commands `config.status' will run. There is a -# little mixture though of things actually handled by `configure', -# such as running the `configure' in the sub directories. Minor -# detail. -# -# There are two kinds of commands: -# -# COMMANDS: -# -# They are output into `config.status' via a quoted here doc. These -# commands are always associated to a tag which the user can use to -# tell `config.status' what are the commands she wants to run. -# -# INIT-CMDS: -# -# They are output via an *unquoted* here-doc. As a consequence $var -# will be output as the value of VAR. This is typically used by -# `configure' to give `config.status' some variables it needs to run -# the COMMANDS. At the difference of COMMANDS, the INIT-CMDS are -# always run. -# -# -# Honorable members of this family are AC_CONFIG_FILES, -# AC_CONFIG_HEADERS, AC_CONFIG_LINKS and AC_CONFIG_COMMANDS. Bad boys -# are AC_LINK_FILES, AC_OUTPUT_COMMANDS and AC_OUTPUT when used with -# arguments. False members are AC_CONFIG_SRCDIR, AC_CONFIG_SUBDIRS -# and AC_CONFIG_AUX_DIR. Cousins are AC_CONFIG_COMMANDS_PRE and -# AC_CONFIG_COMMANDS_POST. - - -## ------------------ ## -## Auxiliary macros. ## -## ------------------ ## - -# _AC_SRCDIRS(BUILD-DIR-NAME) -# --------------------------- -# Inputs: -# - BUILD-DIR-NAME is `top-build -> build' and `top-src -> src' -# - `$srcdir' is `top-build -> top-src' -# -# Outputs: -# - `ac_builddir' is `.', for symmetry only. -# - `ac_top_builddir_sub' is `build -> top_build'. -# This is used for @top_builddir@. -# - `ac_top_build_prefix' is `build -> top_build'. -# If not empty, has a trailing slash. -# - `ac_srcdir' is `build -> src'. -# - `ac_top_srcdir' is `build -> top-src'. -# and `ac_abs_builddir' etc., the absolute directory names. -m4_define([_AC_SRCDIRS], -[ac_builddir=. - -case $1 in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo $1 | sed 's,^\.[[\\/]],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[[^\\/]]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [[\\/]]* | ?:[[\\/]]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -])# _AC_SRCDIRS - - - -## ---------------------- ## -## Registering the tags. ## -## ---------------------- ## - - -# _AC_CONFIG_COMMANDS_INIT([INIT-COMMANDS]) -# ----------------------------------------- -# -# Register INIT-COMMANDS as command pasted *unquoted* in -# `config.status'. This is typically used to pass variables from -# `configure' to `config.status'. Note that $[1] is not over quoted as -# was the case in AC_OUTPUT_COMMANDS. -m4_define([_AC_CONFIG_COMMANDS_INIT], -[m4_ifval([$1], - [m4_append([_AC_OUTPUT_COMMANDS_INIT], - [$1 -])])]) - - -# AC_FILE_DEPENDENCY_TRACE(DEST, SOURCE1, [SOURCE2...]) -# ----------------------------------------------------- -# This macro does nothing, it's a hook to be read with `autoconf --trace'. -# -# It announces DEST depends upon the SOURCE1 etc. -m4_define([AC_FILE_DEPENDENCY_TRACE], []) - - -# _AC_FILE_DEPENDENCY_TRACE_COLON(DEST:SOURCE1[:SOURCE2...]) -# ---------------------------------------------------------- -# Declare that DEST depends upon SOURCE1 etc. -# -m4_define([_AC_FILE_DEPENDENCY_TRACE_COLON], -[AC_FILE_DEPENDENCY_TRACE(m4_bpatsubst([$1], [:], [,]))dnl -]) - - -# _AC_CONFIG_DEPENDENCY(MODE, DEST[:SOURCE1...]) -# --------------------------------------------- -# MODE is `FILES', `HEADERS', or `LINKS'. -# -# Be sure that a missing dependency is expressed as a dependency upon -# `DEST.in' (except with config links). -# -m4_define([_AC_CONFIG_DEPENDENCY], -[_AC_FILE_DEPENDENCY_TRACE_COLON([$2]_AC_CONFIG_DEPENDENCY_DEFAULT($@))dnl -]) - - -# _AC_CONFIG_DEPENDENCY_DEFAULT(MODE, DEST[:SOURCE1...]) -# ------------------------------------------------------ -# Expand to `:DEST.in' if appropriate, or to empty string otherwise. -# -# More detailed edscription: -# If the tag contains `:', expand to nothing. -# Otherwise, for a config file or header, add `:DEST.in'. -# For config link, DEST.in is not appropriate: -# - if the tag is literal, complain. -# - otherwise, just expand to nothing and proceed with fingers crossed. -# (We get to this case from the obsolete AC_LINK_FILES, for example.) -# -m4_define([_AC_CONFIG_DEPENDENCY_DEFAULT], -[m4_bmatch([$2], [:], [], - [m4_if([$1], [LINKS], - [AS_LITERAL_IF([$2], [AC_FATAL([Invalid AC_CONFIG_LINKS tag: `$2'])])], - [:$2.in])])dnl -]) - - -# _AC_CONFIG_UNIQUE(MODE, DEST) -# ----------------------------- -# MODE is `FILES', `HEADERS', `LINKS', `COMMANDS', or `SUBDIRS'. -# -# Verify that there is no double definition of an output file. -# -m4_define([_AC_CONFIG_UNIQUE], -[m4_ifdef([_AC_SEEN_TAG($2)], - [AC_FATAL([`$2' is already registered with AC_CONFIG_]m4_defn([_AC_SEEN_TAG($2)]).)], - [m4_define([_AC_SEEN_TAG($2)], [$1])])dnl -]) - - -# _AC_CONFIG_FOOS(MODE, TAGS..., [COMMANDS], [INIT-CMDS]) -# ------------------------------------------------------- -# MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'. -# -# Associate the COMMANDS to each TAG, i.e., when config.status creates TAG, -# run COMMANDS afterwards. (This is done in _AC_CONFIG_REGISTER_DEST.) -# -# For COMMANDS, do not m4_normalize TAGS before adding it to ac_config_commands. -# This historical difference allows macro calls in TAGS. -# -m4_define([_AC_CONFIG_FOOS], -[m4_foreach_w([AC_File], [$2], - [_AC_CONFIG_REGISTER([$1], m4_defn([AC_File]), [$3])])dnl -m4_define([_AC_SEEN_CONFIG(ANY)])dnl -m4_define([_AC_SEEN_CONFIG($1)])dnl -_AC_CONFIG_COMMANDS_INIT([$4])dnl -ac_config_[]m4_tolower([$1])="$ac_config_[]m4_tolower([$1]) dnl -m4_if([$1], [COMMANDS], [$2], [m4_normalize([$2])])" -]) - - -# _AC_CONFIG_REGISTER(MODE, TAG, [COMMANDS]) -# ------------------------------------------ -# MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'. -# -m4_define([_AC_CONFIG_REGISTER], -[m4_if([$1], [COMMANDS], - [], - [_AC_CONFIG_DEPENDENCY([$1], [$2])])dnl -_AC_CONFIG_REGISTER_DEST([$1], [$2], m4_bpatsubst([[$2]], [:.*\(.\)$], [\1]), [$3])dnl -]) - - -# _AC_CONFIG_REGISTER_DEST(MODE, TAG, DEST, [COMMANDS]) -# ----------------------------------------------------- -# MODE is `FILES', `HEADERS', `LINKS', or `COMMANDS'. -# TAG is in the form DEST[:SOURCE...]. -# Thus parameter $3 is the first part of $2. -# -# With CONFIG_LINKS, reject DEST=., because it is makes it hard for ./config.status -# to guess the links to establish (`./config.status .'). -# -# Save the name of the first config header to AH_HEADER. -# -m4_define([_AC_CONFIG_REGISTER_DEST], -[_AC_CONFIG_UNIQUE([$1], [$3])dnl -m4_if([$1 $3], [LINKS .], - [AC_FATAL([invalid destination of a config link: `.'])])dnl -m4_if([$1], [HEADERS], - [m4_define_default([AH_HEADER], [$3])])dnl -dnl -dnl Recognize TAG as an argument to config.status: -dnl -m4_append([_AC_LIST_TAGS], -[ "$3") CONFIG_$1="$CONFIG_$1 $2" ;; -])dnl -dnl -dnl Register the associated commands, if any: -dnl -m4_ifval([$4], -[m4_append([_AC_LIST_TAG_COMMANDS], -[ "$3":]m4_bpatsubst([$1], [^\(.\).*$], [\1])[) $4 ;; -])])dnl -])# _AC_CONFIG_REGISTER_DEST - - - - -## --------------------- ## -## Configuration files. ## -## --------------------- ## - - -# AC_CONFIG_FILES(FILE..., [COMMANDS], [INIT-CMDS]) -# ------------------------------------------------- -# Specify output files, i.e., files that are configured with AC_SUBST. -# -AC_DEFUN([AC_CONFIG_FILES], [_AC_CONFIG_FOOS([FILES], $@)]) - - -# _AC_SED_CMD_LIMIT -# ----------------- -# Evaluate to an m4 number equal to the maximum number of commands to put -# in any single sed program, not counting ":" commands. -# -# Some seds have small command number limits, like on Digital OSF/1 and HP-UX. -m4_define([_AC_SED_CMD_LIMIT], -dnl One cannot portably go further than 99 commands because of HP-UX. -[99]) - - -# _AC_OUTPUT_FILES_PREPARE -# ------------------------ -# Create the sed scripts needed for CONFIG_FILES. -# Support multiline substitutions and make sure that the substitutions are -# not evaluated recursively. -# The intention is to have readable config.status and configure, even -# though this m4 code might be scaring. -# -# This code was written by Dan Manthey. -# -# This macro is expanded inside a here document. If the here document is -# closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF". -# -m4_define([_AC_OUTPUT_FILES_PREPARE], -[# -# Set up the sed scripts for CONFIG_FILES section. -# -dnl ... and define _AC_SED_CMDS, the pipeline which executes them. -m4_define([_AC_SED_CMDS], [])dnl - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - -_ACEOF - -m4_pushdef([_AC_SED_FRAG_NUM], 0)dnl Fragment number. -m4_pushdef([_AC_SED_CMD_NUM], 2)dnl Num of commands in current frag so far. -m4_pushdef([_AC_SED_DELIM_NUM], 0)dnl Expected number of delimiters in file. -m4_pushdef([_AC_SED_FRAG], [])dnl The constant part of the current fragment. -dnl -m4_ifdef([_AC_SUBST_FILES], -[# Create sed commands to just substitute file output variables. - -m4_foreach_w([_AC_Var], m4_defn([_AC_SUBST_FILES]), -[dnl End fragments at beginning of loop so that last fragment is not ended. -m4_if(m4_eval(_AC_SED_CMD_NUM + 3 > _AC_SED_CMD_LIMIT), 1, -[dnl Fragment is full and not the last one, so no need for the final un-escape. -dnl Increment fragment number. -m4_define([_AC_SED_FRAG_NUM], m4_incr(_AC_SED_FRAG_NUM))dnl -dnl Record that this fragment will need to be used. -m4_define([_AC_SED_CMDS], - m4_defn([_AC_SED_CMDS])[| sed -f "$tmp/subs-]_AC_SED_FRAG_NUM[.sed" ])dnl -[cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-]_AC_SED_FRAG_NUM[.sed" <<\CEOF -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -]m4_defn([_AC_SED_FRAG])dnl -[CEOF - -_ACEOF -]m4_define([_AC_SED_CMD_NUM], 2)m4_define([_AC_SED_FRAG])dnl -])dnl Last fragment ended. -m4_define([_AC_SED_CMD_NUM], m4_eval(_AC_SED_CMD_NUM + 3))dnl -m4_define([_AC_SED_FRAG], -m4_defn([_AC_SED_FRAG])dnl -[/^[ ]*@]_AC_Var[@[ ]*$/{ -r $]_AC_Var[ -d -} -])dnl -])dnl -# Remaining file output variables are in a fragment that also has non-file -# output varibles. - -]) -dnl -m4_define([_AC_SED_FRAG], [ -]m4_defn([_AC_SED_FRAG]))dnl -m4_foreach_w([_AC_Var], -m4_ifdef([_AC_SUBST_VARS], [m4_defn([_AC_SUBST_VARS]) ])[@END@], -[m4_if(_AC_SED_DELIM_NUM, 0, -[m4_if(_AC_Var, [@END@], -[dnl The whole of the last fragment would be the final deletion of `|#_!!_#|'. -m4_define([_AC_SED_CMDS], m4_defn([_AC_SED_CMDS])[| sed 's/|#_!!_#|//g' ])], -[ -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -])])dnl -m4_if(_AC_Var, [@END@], - [m4_if(m4_eval(_AC_SED_CMD_NUM + 2 <= _AC_SED_CMD_LIMIT), 1, - [m4_define([_AC_SED_FRAG], [ end]m4_defn([_AC_SED_FRAG]))])], -[m4_define([_AC_SED_CMD_NUM], m4_incr(_AC_SED_CMD_NUM))dnl -m4_define([_AC_SED_DELIM_NUM], m4_incr(_AC_SED_DELIM_NUM))dnl -_AC_Var!$_AC_Var$ac_delim -])dnl -m4_if(_AC_SED_CMD_LIMIT, - m4_if(_AC_Var, [@END@], m4_if(_AC_SED_CMD_NUM, 2, 2, _AC_SED_CMD_LIMIT), _AC_SED_CMD_NUM), -[_ACEOF - -dnl Do not use grep on conf$$subs.sed, since AIX grep has a line length limit. - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = _AC_SED_DELIM_NUM; then - break - elif $ac_last_try; then - AC_MSG_ERROR([could not make $CONFIG_STATUS]) - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -dnl Similarly, avoid grep here too. -ac_eof=`sed -n '/^CEOF[[0-9]]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -dnl Increment fragment number. -m4_define([_AC_SED_FRAG_NUM], m4_incr(_AC_SED_FRAG_NUM))dnl -dnl Record that this fragment will need to be used. -m4_define([_AC_SED_CMDS], -m4_defn([_AC_SED_CMDS])[| sed -f "$tmp/subs-]_AC_SED_FRAG_NUM[.sed" ])dnl -[cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-]_AC_SED_FRAG_NUM[.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b]m4_defn([_AC_SED_FRAG])dnl -[_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -]m4_if(_AC_Var, [@END@], -[m4_if(m4_eval(_AC_SED_CMD_NUM + 2 > _AC_SED_CMD_LIMIT), 1, -[m4_define([_AC_SED_CMDS], m4_defn([_AC_SED_CMDS])[| sed 's/|#_!!_#|//g' ])], -[[:end -s/|#_!!_#|//g -]])])dnl -CEOF$ac_eof -_ACEOF -m4_define([_AC_SED_FRAG], [ -])m4_define([_AC_SED_DELIM_NUM], 0)m4_define([_AC_SED_CMD_NUM], 2)dnl - -])])dnl -dnl -m4_popdef([_AC_SED_FRAG_NUM])dnl -m4_popdef([_AC_SED_CMD_NUM])dnl -m4_popdef([_AC_SED_DELIM_NUM])dnl -m4_popdef([_AC_SED_FRAG])dnl - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub=['/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ -s/:*$// -s/^[^=]*=[ ]*$// -}'] -fi - -cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - -])# _AC_OUTPUT_FILES_PREPARE - - -# _AC_OUTPUT_FILE -# --------------- -# Do the variable substitutions to create the Makefiles or whatever. -# -# This macro is expanded inside a here document. If the here document is -# closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF". -# -m4_define([_AC_OUTPUT_FILE], -[ - # - # CONFIG_FILE - # - -AC_PROVIDE_IFELSE([AC_PROG_INSTALL], -[ case $INSTALL in - [[\\/$]]* | ?:[[\\/]]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac -])dnl -AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P], -[ ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [[\\/$]]* | ?:[[\\/]]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -])dnl -_ACEOF - -m4_ifndef([AC_DATAROOTDIR_CHECKED], -[cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -m4_define([_AC_datarootdir_vars], - [datadir, docdir, infodir, localedir, mandir]) -case `sed -n '/datarootdir/ { - p - q -} -m4_foreach([_AC_Var], m4_defn([_AC_datarootdir_vars]), - [/@_AC_Var@/p -])' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@[]m4_join([@*|*@], _AC_datarootdir_vars)@*) - AC_MSG_WARN([$ac_file_inputs seems to ignore the --datarootdir setting]) -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - m4_foreach([_AC_Var], m4_defn([_AC_datarootdir_vars]), - [s&@_AC_Var@&$_AC_Var&g - ])dnl - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF -])dnl - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -[/@[a-zA-Z_][a-zA-Z_0-9]*@/!b] -dnl configure_input is a somewhat special, so we don't call AC_SUBST_TRACE. -s&@configure_input@&$configure_input&;t t -dnl During the transition period, this is a special case: -s&@top_builddir@&$ac_top_builddir_sub&;t t[]AC_SUBST_TRACE([top_builddir]) -m4_foreach([_AC_Var], [srcdir, abs_srcdir, top_srcdir, abs_top_srcdir, - builddir, abs_builddir, - abs_top_builddir]AC_PROVIDE_IFELSE([AC_PROG_INSTALL], [[, INSTALL]])AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P], [[, MKDIR_P]]), - [s&@_AC_Var@&$ac_[]_AC_Var&;t t[]AC_SUBST_TRACE(_AC_Var) -])dnl -m4_ifndef([AC_DATAROOTDIR_CHECKED], [$ac_datarootdir_hack -])dnl -" $ac_file_inputs m4_defn([_AC_SED_CMDS])>$tmp/out - -m4_ifndef([AC_DATAROOTDIR_CHECKED], -[test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[[ ]]*datarootdir[[ ]]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - AC_MSG_WARN([$ac_file contains a reference to the variable `datarootdir' -which seems to be undefined. Please make sure it is defined.]) -])dnl - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac -dnl This would break Makefile dependencies: -dnl if diff $ac_file "$tmp/out" >/dev/null 2>&1; then -dnl echo "$ac_file is unchanged" -dnl else -dnl rm -f $ac_file; mv "$tmp/out" $ac_file -dnl fi -])# _AC_OUTPUT_FILE - - - - -## ----------------------- ## -## Configuration headers. ## -## ----------------------- ## - - -# AC_CONFIG_HEADERS(HEADERS..., [COMMANDS], [INIT-CMDS]) -# ------------------------------------------------------ -# Specify that the HEADERS are to be created by instantiation of the -# AC_DEFINEs. -# -AC_DEFUN([AC_CONFIG_HEADERS], [_AC_CONFIG_FOOS([HEADERS], $@)]) - - -# AC_CONFIG_HEADER(HEADER-TO-CREATE ...) -# -------------------------------------- -# FIXME: Make it obsolete? -AC_DEFUN([AC_CONFIG_HEADER], -[AC_CONFIG_HEADERS([$1])]) - - -# _AC_OUTPUT_HEADER -# ----------------- -# -# Output the code which instantiates the `config.h' files from their -# `config.h.in'. -# -# This macro is expanded inside a here document. If the here document is -# closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF". -# -m4_define([_AC_OUTPUT_HEADER], -[ - # - # CONFIG_HEADER - # -_ACEOF - -# Transform confdefs.h into a sed script `conftest.defines', that -# substitutes the proper values into config.h.in to produce config.h. -rm -f conftest.defines conftest.tail -# First, append a space to every undef/define line, to ease matching. -echo 's/$/ /' >conftest.defines -# Then, protect against being on the right side of a sed subst, or in -# an unquoted here document, in config.status. If some macros were -# called several times there might be several #defines for the same -# symbol, which is useless. But do not sort them, since the last -# AC_DEFINE must be honored. -dnl -dnl Quote, for `[ ]' and `define'. -[ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where -# NAME is the cpp macro being defined, VALUE is the value it is being given. -# PARAMS is the parameter list in the macro definition--in most cases, it's -# just an empty string. -ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' -ac_dB='\\)[ (].*,\\1define\\2' -ac_dC=' ' -ac_dD=' ,'] -dnl ac_dD used to contain `;t' at the end, but that was both slow and incorrect. -dnl 1) Since the script must be broken into chunks containing 100 commands, -dnl the extra command meant extra calls to sed. -dnl 2) The code was incorrect: in the unusual case where a symbol has multiple -dnl different AC_DEFINEs, the last one should be honored. -dnl -dnl ac_dB works because every line has a space appended. ac_dD reinserts -dnl the space, because some symbol may have been AC_DEFINEd several times. -dnl -dnl The first use of ac_dA has a space prepended, so that the second -dnl use does not match the initial 's' of $ac_dA. -[ -uniq confdefs.h | - sed -n ' - t rset - :rset - s/^[ ]*#[ ]*define[ ][ ]*// - t ok - d - :ok - s/[\\&,]/\\&/g - s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p - s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p - ' >>conftest.defines -] -# Remove the space that was appended to ease matching. -# Then replace #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. -# (The regexp can be short, since the line contains either #define or #undef.) -echo 's/ $// -[s,^[ #]*u.*,/* & */,]' >>conftest.defines - -# Break up conftest.defines: -dnl If we cared only about not exceeding line count limits, we would use this: -dnl ac_max_sed_lines=m4_eval(_AC_SED_CMD_LIMIT - 3) -dnl But in practice this can generate scripts that contain too many bytes; -dnl and this can cause obscure 'sed' failures, e.g., -dnl http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00127.html -dnl So instead, we use the following, which is about half the size we'd like: -ac_max_sed_lines=50 -dnl In the future, let's use awk or sh instead of sed to do substitutions, -dnl since we have so many problems with sed. - -# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" -# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" -# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" -# et cetera. -ac_in='$ac_file_inputs' -ac_out='"$tmp/out1"' -ac_nxt='"$tmp/out2"' - -while : -do - # Write a here document: - dnl Quote, for the `[ ]' and `define'. -[ cat >>$CONFIG_STATUS <<_ACEOF - # First, check the format of the line: - cat >"\$tmp/defines.sed" <<\\CEOF -/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def -/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def -b -:def -_ACEOF] - sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS - ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in - sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail - grep . conftest.tail >/dev/null || break - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines conftest.tail - -dnl Now back to your regularly scheduled config.status. -echo "ac_result=$ac_in" >>$CONFIG_STATUS -cat >>$CONFIG_STATUS <<\_ACEOF - if test x"$ac_file" != x-; then - echo "/* $configure_input */" >"$tmp/config.h" - cat "$ac_result" >>"$tmp/config.h" - if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then - AC_MSG_NOTICE([$ac_file is unchanged]) - else - rm -f $ac_file - mv "$tmp/config.h" $ac_file - fi - else - echo "/* $configure_input */" - cat "$ac_result" - fi - rm -f "$tmp/out[12]" -dnl If running for Automake, be ready to perform additional -dnl commands to set up the timestamp files. -m4_ifdef([_AC_AM_CONFIG_HEADER_HOOK], - [_AC_AM_CONFIG_HEADER_HOOK([$ac_file]) -])dnl -])# _AC_OUTPUT_HEADER - - - -## --------------------- ## -## Configuration links. ## -## --------------------- ## - - -# AC_CONFIG_LINKS(DEST:SOURCE..., [COMMANDS], [INIT-CMDS]) -# -------------------------------------------------------- -# Specify that config.status should establish a (symbolic if possible) -# link from TOP_SRCDIR/SOURCE to TOP_SRCDIR/DEST. -# Reject DEST=., because it is makes it hard for ./config.status -# to guess the links to establish (`./config.status .'). -# -AC_DEFUN([AC_CONFIG_LINKS], [_AC_CONFIG_FOOS([LINKS], $@)]) - - -# AC_LINK_FILES(SOURCE..., DEST...) -# --------------------------------- -# Link each of the existing files SOURCE... to the corresponding -# link name in DEST... -# -# Unfortunately we can't provide a very good autoupdate service here, -# since in `AC_LINK_FILES($from, $to)' it is possible that `$from' -# and `$to' are actually lists. It would then be completely wrong to -# replace it with `AC_CONFIG_LINKS($to:$from). It is possible in the -# case of literal values though, but because I don't think there is any -# interest in creating config links with literal values, no special -# mechanism is implemented to handle them. -# -# _AC_LINK_FILES_CNT is used to be robust to multiple calls. -AU_DEFUN([AC_LINK_FILES], -[m4_if($#, 2, , - [m4_fatal([$0: incorrect number of arguments])])dnl -m4_define_default([_AC_LINK_FILES_CNT], 0)dnl -m4_define([_AC_LINK_FILES_CNT], m4_incr(_AC_LINK_FILES_CNT))dnl -ac_sources="$1" -ac_dests="$2" -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_config_links_]_AC_LINK_FILES_CNT="$[ac_config_links_]_AC_LINK_FILES_CNT $ac_dest:$ac_source" -done -AC_CONFIG_LINKS($[ac_config_links_]_AC_LINK_FILES_CNT)dnl -], -[It is technically impossible to `autoupdate' cleanly from AC_LINK_FILES -to AC_CONFIG_LINKS. `autoupdate' provides a functional but inelegant -update, you should probably tune the result yourself.])# AC_LINK_FILES - - -# _AC_OUTPUT_LINK -# --------------- -# This macro is expanded inside a here document. If the here document is -# closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF". -m4_define([_AC_OUTPUT_LINK], -[ - # - # CONFIG_LINK - # - - AC_MSG_NOTICE([linking $srcdir/$ac_source to $ac_file]) - - if test ! -r "$srcdir/$ac_source"; then - AC_MSG_ERROR([$srcdir/$ac_source: file not found]) - fi - rm -f "$ac_file" - - # Try a relative symlink, then a hard link, then a copy. - case $srcdir in - [[\\/$]]* | ?:[[\\/]]* ) ac_rel_source=$srcdir/$ac_source ;; - *) ac_rel_source=$ac_top_build_prefix$srcdir/$ac_source ;; - esac - ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || - ln "$srcdir/$ac_source" "$ac_file" 2>/dev/null || - cp -p "$srcdir/$ac_source" "$ac_file" || - AC_MSG_ERROR([cannot link or copy $srcdir/$ac_source to $ac_file]) -])# _AC_OUTPUT_LINK - - - -## ------------------------ ## -## Configuration commands. ## -## ------------------------ ## - - -# AC_CONFIG_COMMANDS(NAME...,[COMMANDS], [INIT-CMDS]) -# --------------------------------------------------- -# -# Specify additional commands to be run by config.status. This -# commands must be associated with a NAME, which should be thought -# as the name of a file the COMMANDS create. -# -AC_DEFUN([AC_CONFIG_COMMANDS], [_AC_CONFIG_FOOS([COMMANDS], $@)]) - - -# AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS) -# ----------------------------------------- -# -# Add additional commands for AC_OUTPUT to put into config.status. -# -# This macro is an obsolete version of AC_CONFIG_COMMANDS. The only -# difficulty in mapping AC_OUTPUT_COMMANDS to AC_CONFIG_COMMANDS is -# to give a unique key. The scheme we have chosen is `default-1', -# `default-2' etc. for each call. -# -# Unfortunately this scheme is fragile: bad things might happen -# if you update an included file and configure.ac: you might have -# clashes :( On the other hand, I'd like to avoid weird keys (e.g., -# depending upon __file__ or the pid). -AU_DEFUN([AC_OUTPUT_COMMANDS], -[m4_define_default([_AC_OUTPUT_COMMANDS_CNT], 0)dnl -m4_define([_AC_OUTPUT_COMMANDS_CNT], m4_incr(_AC_OUTPUT_COMMANDS_CNT))dnl -dnl Double quoted since that was the case in the original macro. -AC_CONFIG_COMMANDS([default-]_AC_OUTPUT_COMMANDS_CNT, [[$1]], [[$2]])dnl -]) - - -# _AC_OUTPUT_COMMAND -# ------------------ -# This macro is expanded inside a here document. If the here document is -# closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF". -m4_define([_AC_OUTPUT_COMMAND], -[ AC_MSG_NOTICE([executing $ac_file commands]) -]) - - - -## -------------------------------------- ## -## Pre- and post-config.status commands. ## -## -------------------------------------- ## - - -# AC_CONFIG_COMMANDS_PRE(CMDS) -# ---------------------------- -# Commands to run right before config.status is created. Accumulates. -AC_DEFUN([AC_CONFIG_COMMANDS_PRE], -[m4_append([AC_OUTPUT_COMMANDS_PRE], [$1 -])]) - - -# AC_OUTPUT_COMMANDS_PRE -# ---------------------- -# A *variable* in which we append all the actions that must be -# performed before *creating* config.status. For a start, clean -# up all the LIBOBJ mess. -m4_define([AC_OUTPUT_COMMANDS_PRE], -[_AC_LIBOBJS_NORMALIZE -]) - - -# AC_CONFIG_COMMANDS_POST(CMDS) -# ----------------------------- -# Commands to run after config.status was created. Accumulates. -AC_DEFUN([AC_CONFIG_COMMANDS_POST], -[m4_append([AC_OUTPUT_COMMANDS_POST], [$1 -])]) - -# Initialize. -m4_define([AC_OUTPUT_COMMANDS_POST]) - - - -## ----------------------- ## -## Configuration subdirs. ## -## ----------------------- ## - - -# AC_CONFIG_SUBDIRS(DIR ...) -# -------------------------- -# We define two variables: -# - _AC_LIST_SUBDIRS -# A statically built list, should contain *all* the arguments of -# AC_CONFIG_SUBDIRS. The final value is assigned to ac_subdirs_all in -# the `default' section, and used for --help=recursive. -# It is also used in _AC_CONFIG_UNIQUE. -# It makes no sense for arguments which are sh variables. -# - subdirs -# Shell variable built at runtime, so some of these dirs might not be -# included, if for instance the user refused a part of the tree. -# This is used in _AC_OUTPUT_SUBDIRS. -AC_DEFUN([AC_CONFIG_SUBDIRS], -[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -m4_foreach_w([_AC_Sub], [$1], - [_AC_CONFIG_UNIQUE([SUBDIRS], - m4_bpatsubst(m4_defn([_AC_Sub]), [:.*]))])dnl -m4_append([_AC_LIST_SUBDIRS], [$1], [ -])dnl -AS_LITERAL_IF([$1], [], - [AC_DIAGNOSE([syntax], [$0: you should use literals])])dnl -AC_SUBST([subdirs], ["$subdirs m4_normalize([$1])"])dnl -]) - - -# _AC_OUTPUT_SUBDIRS -# ------------------ -# This is a subroutine of AC_OUTPUT, but it does not go into -# config.status, rather, it is called after running config.status. -m4_define([_AC_OUTPUT_SUBDIRS], -[ -# -# CONFIG_SUBDIRS section. -# -if test "$no_recursion" != yes; then - - # Remove --cache-file and --srcdir arguments so they do not pile up. - ac_sub_configure_args= - ac_prev= - eval "set x $ac_configure_args" - shift - for ac_arg - do - 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=*) - ;; - --config-cache | -C) - ;; - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - ;; - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - ;; - *) - case $ac_arg in - *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;; - esac - done - - # Always prepend --prefix to ensure using the same prefix - # in subdir configurations. - ac_arg="--prefix=$prefix" - case $ac_arg in - *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" - - # Pass --silent - if test "$silent" = yes; then - ac_sub_configure_args="--silent $ac_sub_configure_args" - fi - - ac_popdir=`pwd` - for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue - - # Do not complain, so a configure script can configure whichever - # parts of a large source tree are present. - test -d "$srcdir/$ac_dir" || continue - - ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" - _AS_ECHO_LOG([$ac_msg]) - _AS_ECHO([$ac_msg]) - AS_MKDIR_P(["$ac_dir"]) - _AC_SRCDIRS(["$ac_dir"]) - - cd "$ac_dir" - - # Check for guested configure; otherwise get Cygnus style configure. - if test -f "$ac_srcdir/configure.gnu"; then - ac_sub_configure=$ac_srcdir/configure.gnu - elif test -f "$ac_srcdir/configure"; then - ac_sub_configure=$ac_srcdir/configure - elif test -f "$ac_srcdir/configure.in"; then - # This should be Cygnus configure. - ac_sub_configure=$ac_aux_dir/configure - else - AC_MSG_WARN([no configuration information is in $ac_dir]) - ac_sub_configure= - fi - - # The recursion is here. - if test -n "$ac_sub_configure"; then - # Make the cache file name correct relative to the subdirectory. - case $cache_file in - [[\\/]]* | ?:[[\\/]]* ) ac_sub_cache_file=$cache_file ;; - *) # Relative name. - ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; - esac - - AC_MSG_NOTICE([running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir]) - # The eval makes quoting arguments work. - eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ - --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || - AC_MSG_ERROR([$ac_sub_configure failed for $ac_dir]) - fi - - cd "$ac_popdir" - done -fi -])# _AC_OUTPUT_SUBDIRS - - - - -## -------------------------- ## -## Outputting config.status. ## -## -------------------------- ## - - -# AU::AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS]) -# ----------------------------------------------------------- -# -# If there are arguments given to AC_OUTPUT, dispatch them to the -# proper modern macros. -AU_DEFUN([AC_OUTPUT], -[m4_ifvaln([$1], - [AC_CONFIG_FILES([$1])])dnl -m4_ifvaln([$2$3], - [AC_CONFIG_COMMANDS(default, [$2], [$3])])dnl -[AC_OUTPUT]]) - - -# AC_OUTPUT([CONFIG_FILES...], [EXTRA-CMDS], [INIT-CMDS]) -# ------------------------------------------------------- -# The big finish. -# Produce config.status, config.h, and links; and configure subdirs. -# -m4_define([AC_OUTPUT], -[dnl Dispatch the extra arguments to their native macros. -m4_ifvaln([$1], - [AC_CONFIG_FILES([$1])])dnl -m4_ifvaln([$2$3], - [AC_CONFIG_COMMANDS(default, [$2], [$3])])dnl -m4_ifval([$1$2$3], - [AC_DIAGNOSE([obsolete], - [$0 should be used without arguments. -You should run autoupdate.])])dnl -AC_CACHE_SAVE - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()]) - -dnl Commands to run before creating config.status. -AC_OUTPUT_COMMANDS_PRE()dnl - -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -_AC_OUTPUT_CONFIG_STATUS()dnl -ac_clean_files=$ac_clean_files_save - -dnl Commands to run after config.status was created -AC_OUTPUT_COMMANDS_POST()dnl - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec AS_MESSAGE_LOG_FD>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || AS_EXIT([1]) -fi -dnl config.status should not do recursion. -AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [_AC_OUTPUT_SUBDIRS()])dnl -])# AC_OUTPUT - - -# _AC_OUTPUT_CONFIG_STATUS -# ------------------------ -# Produce config.status. Called by AC_OUTPUT. -# Pay special attention not to have too long here docs: some old -# shells die. Unfortunately the limit is not known precisely... -m4_define([_AC_OUTPUT_CONFIG_STATUS], -[AC_MSG_NOTICE([creating $CONFIG_STATUS]) -dnl AS_MESSAGE_LOG_FD is not available yet: -m4_rename([AS_MESSAGE_LOG_FD], [_AC_save_AS_MESSAGE_LOG_FD])dnl -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -AS_SHELL_SANITIZE -dnl Watch out, this is directly the initializations, do not use -dnl AS_PREPARE, otherwise you'd get it output in the initialization -dnl of configure, not config.status. -_AS_PREPARE -exec AS_MESSAGE_FD>&1 - -# Save the log message, to keep $[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])dnl -$as_me[]m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]), which was -generated by m4_PACKAGE_STRING. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $[0] $[@] - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -# Files that config.status was made for. -m4_ifdef([_AC_SEEN_CONFIG(FILES)], -[config_files="$ac_config_files" -])dnl -m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], -[config_headers="$ac_config_headers" -])dnl -m4_ifdef([_AC_SEEN_CONFIG(LINKS)], -[config_links="$ac_config_links" -])dnl -m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], -[config_commands="$ac_config_commands" -])dnl - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $[0] [[OPTIONS]] [[FILE]]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions -m4_ifdef([_AC_SEEN_CONFIG(FILES)], -[[ --file=FILE[:TEMPLATE] - instantiate the configuration file FILE -]])dnl -m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], -[[ --header=FILE[:TEMPLATE] - instantiate the configuration header FILE -]])dnl - -m4_ifdef([_AC_SEEN_CONFIG(FILES)], -[Configuration files: -$config_files - -])dnl -m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], -[Configuration headers: -$config_headers - -])dnl -m4_ifdef([_AC_SEEN_CONFIG(LINKS)], -[Configuration links: -$config_links - -])dnl -m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], -[Configuration commands: -$config_commands - -])dnl -Report bugs to ." - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.status[]dnl -m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) -configured by $[0], generated by m4_PACKAGE_STRING, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[[\\""\`\$]]/\\\\&/g'`\\" - -Copyright (C) 2006 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -AC_PROVIDE_IFELSE([AC_PROG_INSTALL], -[INSTALL='$INSTALL' -])dnl -AC_PROVIDE_IFELSE([AC_PROG_MKDIR_P], -[MKDIR_P='$MKDIR_P' -])dnl -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $[#] != 0 -do - case $[1] in - --*=*) - ac_option=`expr "X$[1]" : 'X\([[^=]]*\)='` - ac_optarg=`expr "X$[1]" : 'X[[^=]]*=\(.*\)'` - ac_shift=: - ;; - *) - ac_option=$[1] - ac_optarg=$[2] - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; -m4_ifdef([_AC_SEEN_CONFIG(FILES)], [dnl - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; -])dnl -m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [dnl - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - AC_MSG_ERROR([ambiguous option: $[1] -Try `$[0] --help' for more information.]);; -], [ --he | --h |])dnl - --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try `$[0] --help' for more information.]) ;; - - *) ac_config_targets="$ac_config_targets $[1]" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec AS_MESSAGE_FD>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -dnl Check this before opening the log, to avoid a bug on MinGW, -dnl which prohibits the recursive instance from truncating an open log. -if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $[0] "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&AS_MESSAGE_FD - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$[0]"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -dnl Open the log: -m4_rename([_AC_save_AS_MESSAGE_LOG_FD], [AS_MESSAGE_LOG_FD])dnl -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) - echo "$ac_log" -} >&AS_MESSAGE_LOG_FD - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -m4_ifdef([_AC_OUTPUT_COMMANDS_INIT], -[# -# INIT-COMMANDS -# -_AC_OUTPUT_COMMANDS_INIT -])dnl -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in -m4_ifdef([_AC_LIST_TAGS], [_AC_LIST_TAGS]) - *) AC_MSG_ERROR([invalid argument: $ac_config_target]);; - esac -done - -m4_ifdef([_AC_SEEN_CONFIG(ANY)], [_AC_OUTPUT_MAIN_LOOP])[]dnl - -AS_EXIT(0) -_ACEOF -chmod +x $CONFIG_STATUS -])# _AC_OUTPUT_CONFIG_STATUS - -# _AC_OUTPUT_MAIN_LOOP -# -------------------- -# The main loop in $CONFIG_STATUS. -# -# This macro is expanded inside a here document. If the here document is -# closed, it has to be reopened with "cat >>$CONFIG_STATUS <<\_ACEOF". -# -AC_DEFUN([_AC_OUTPUT_MAIN_LOOP], -[ -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then -m4_ifdef([_AC_SEEN_CONFIG(FILES)], -[ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -])dnl -m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], -[ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers -])dnl -m4_ifdef([_AC_SEEN_CONFIG(LINKS)], -[ test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links -])dnl -m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], -[ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -])dnl -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status -' 0 - trap 'AS_EXIT([1])' 1 2 13 15 -} -dnl The comment above AS_TMPDIR says at most 4 chars are allowed. -AS_TMPDIR([conf], [.]) - -m4_ifdef([_AC_SEEN_CONFIG(FILES)], [_AC_OUTPUT_FILES_PREPARE])[]dnl - -for ac_tag in[]dnl - m4_ifdef([_AC_SEEN_CONFIG(FILES)], [:F $CONFIG_FILES])[]dnl - m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [:H $CONFIG_HEADERS])[]dnl - m4_ifdef([_AC_SEEN_CONFIG(LINKS)], [:L $CONFIG_LINKS])[]dnl - m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], [:C $CONFIG_COMMANDS]) -do - case $ac_tag in - :[[FHLC]]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[[FHL]]*:*);; - :L* | :C*:*) AC_MSG_ERROR([Invalid tag $ac_tag.]);; - :[[FH]]-) ac_tag=-:-;; - :[[FH]]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$[1] - shift - - case $ac_mode in - :L) ac_source=$[1];; - :[[FH]]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [[\\/$]]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - AC_MSG_ERROR([cannot find input file: $ac_f]);; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $[*] | sed ['s|^[^:]*/||;s|:[^:]*/|, |g']`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - AC_MSG_NOTICE([creating $ac_file]) - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; - esac - - ac_dir=`AS_DIRNAME(["$ac_file"])` - AS_MKDIR_P(["$ac_dir"]) - _AC_SRCDIRS(["$ac_dir"]) - - case $ac_mode in - m4_ifdef([_AC_SEEN_CONFIG(FILES)], [:F)_AC_OUTPUT_FILE ;;]) - m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], [:H)_AC_OUTPUT_HEADER ;;]) - m4_ifdef([_AC_SEEN_CONFIG(LINKS)], [:L)_AC_OUTPUT_LINK ;;]) - m4_ifdef([_AC_SEEN_CONFIG(COMMANDS)], [:C)_AC_OUTPUT_COMMAND ;;]) - esac - -dnl Some shells don't like empty case/esac -m4_ifdef([_AC_LIST_TAG_COMMANDS], [ - case $ac_file$ac_mode in -_AC_LIST_TAG_COMMANDS - esac -])dnl -done # for ac_tag - -])# _AC_OUTPUT_MAIN_LOOP - - -# AC_OUTPUT_MAKE_DEFS -# ------------------- -# Set the DEFS variable to the -D options determined earlier. -# This is a subroutine of AC_OUTPUT. -# It is called inside configure, outside of config.status. -m4_define([AC_OUTPUT_MAKE_DEFS], -[[# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -ac_script=' -t clear -:clear -s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g -t quote -s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g -t quote -b any -:quote -s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g -s/\[/\\&/g -s/\]/\\&/g -s/\$/$$/g -H -:any -${ - g - s/^\n// - s/\n/ /g - p -} -' -DEFS=`sed -n "$ac_script" confdefs.h` -]])# AC_OUTPUT_MAKE_DEFS diff --git a/build/autogen.mk b/build/autogen.mk index 774e924b5b..8a87424b45 100644 --- a/build/autogen.mk +++ b/build/autogen.mk @@ -16,18 +16,11 @@ ACLOCAL=aclocal AUTOCONF=autoconf BAKEFILE_GEN=bakefile_gen -AUTOHACKS_PREPEND_INCLUDE_DIR=build/autoconf_prepend-include # configure depends on everything else so this will build everything. .PHONY: all all: configure -.PHONY: autoconf_m4f - -# Invoke make on wxAutohacks dir, but don't fail if it's not present -autoconf_m4f: - -make -C $(AUTOHACKS_PREPEND_INCLUDE_DIR) - BAKEFILES=\ build/bakefiles/wx.bkl \ build/bakefiles/common.bkl \ @@ -46,9 +39,8 @@ autoconf_inc.m4 Makefile.in: $(BAKEFILES) $(BAKEFILE_GEN) -f autoconf # Run configure whenever configure.in, aclocal.m4 or autoconf_inc.m4 is updated -# Depend on our custom autoconf.m4f -configure: configure.in aclocal.m4 autoconf_inc.m4 autoconf_m4f - $(AUTOCONF) -B $(AUTOHACKS_PREPEND_INCLUDE_DIR) +configure: configure.in aclocal.m4 autoconf_inc.m4 + $(AUTOCONF) ACLOCAL_SOURCES = \ build/aclocal/ac_raf_func_which_getservbyname_r.m4 \ diff --git a/build/tools/autoconf/Dockerfile b/build/tools/autoconf/Dockerfile index f4cd5f86be..c3bac97463 100644 --- a/build/tools/autoconf/Dockerfile +++ b/build/tools/autoconf/Dockerfile @@ -7,4 +7,4 @@ VOLUME /wx WORKDIR /wx -CMD ["autoconf", "-B", "build/autoconf_prepend-include"] +CMD ["autoconf"] diff --git a/docs/contributing/how-to-release.md b/docs/contributing/how-to-release.md index 542bb6fb1d..817282df92 100644 --- a/docs/contributing/how-to-release.md +++ b/docs/contributing/how-to-release.md @@ -164,7 +164,7 @@ Then from the build/bakesfiles directory run and from the root directory run - autoconf -B build/autoconf_prepend-include + autoconf or, if you're not using Debian Stable version of autoconf, see the instructions in `build/tools/autoconf/README.md` for regenerating configure on a different