Blame acgeneral.m4

Packit 1ca270
dnl Parameterized macros.
Packit 1ca270
dnl Requires GNU m4.
Packit 1ca270
dnl This file is part of Autoconf.
Packit 1ca270
dnl Copyright (C) 1992, 93, 94, 95, 96, 1998 Free Software Foundation, Inc.
Packit 1ca270
dnl
Packit 1ca270
dnl This program is free software; you can redistribute it and/or modify
Packit 1ca270
dnl it under the terms of the GNU General Public License as published by
Packit 1ca270
dnl the Free Software Foundation; either version 2, or (at your option)
Packit 1ca270
dnl any later version.
Packit 1ca270
dnl
Packit 1ca270
dnl This program is distributed in the hope that it will be useful,
Packit 1ca270
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 1ca270
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 1ca270
dnl GNU General Public License for more details.
Packit 1ca270
dnl
Packit 1ca270
dnl You should have received a copy of the GNU General Public License
Packit 1ca270
dnl along with this program; if not, write to the Free Software
Packit 1ca270
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
Packit 1ca270
dnl 02111-1307, USA.
Packit 1ca270
dnl
Packit 1ca270
dnl As a special exception, the Free Software Foundation gives unlimited
Packit 1ca270
dnl permission to copy, distribute and modify the configure scripts that
Packit 1ca270
dnl are the output of Autoconf.  You need not follow the terms of the GNU
Packit 1ca270
dnl General Public License when using or distributing such scripts, even
Packit 1ca270
dnl though portions of the text of Autoconf appear in them.  The GNU
Packit 1ca270
dnl General Public License (GPL) does govern all other use of the material
Packit 1ca270
dnl that constitutes the Autoconf program.
Packit 1ca270
dnl
Packit 1ca270
dnl Certain portions of the Autoconf source text are designed to be copied
Packit 1ca270
dnl (in certain cases, depending on the input) into the output of
Packit 1ca270
dnl Autoconf.  We call these the "data" portions.  The rest of the Autoconf
Packit 1ca270
dnl source text consists of comments plus executable code that decides which
Packit 1ca270
dnl of the data portions to output in any given case.  We call these
Packit 1ca270
dnl comments and executable code the "non-data" portions.  Autoconf never
Packit 1ca270
dnl copies any of the non-data portions into its output.
Packit 1ca270
dnl
Packit 1ca270
dnl This special exception to the GPL applies to versions of Autoconf
Packit 1ca270
dnl released by the Free Software Foundation.  When you make and
Packit 1ca270
dnl distribute a modified version of Autoconf, you may extend this special
Packit 1ca270
dnl exception to the GPL to apply to your modified version as well, *unless*
Packit 1ca270
dnl your modified version has the potential to copy into its output some
Packit 1ca270
dnl of the text that was the non-data portion of the version that you started
Packit 1ca270
dnl with.  (In other words, unless your change moves or copies text from
Packit 1ca270
dnl the non-data portions to the data portions.)  If your modification has
Packit 1ca270
dnl such potential, you must delete any notice of this special exception
Packit 1ca270
dnl to the GPL from your modified version.
Packit 1ca270
dnl
Packit 1ca270
dnl Written by David MacKenzie, with help from
Packit 1ca270
dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
Packit 1ca270
dnl Roland McGrath, Noah Friedman, david d zuhn, and many others.
Packit 1ca270
dnl
Packit 1ca270
divert(-1)dnl Throw away output until AC_INIT is called.
Packit 1ca270
changequote([, ])
Packit 1ca270
Packit 1ca270
define(AC_ACVERSION, 2.13)
Packit 1ca270
Packit 1ca270
dnl Some old m4's don't support m4exit.  But they provide
Packit 1ca270
dnl equivalent functionality by core dumping because of the
Packit 1ca270
dnl long macros we define.
Packit 1ca270
ifdef([__gnu__], , [errprint(Autoconf requires GNU m4.
Packit 1ca270
Install it before installing Autoconf or set the
Packit 1ca270
M4 environment variable to its path name.
Packit 1ca270
)m4exit(2)])
Packit 1ca270
Packit 1ca270
undefine([eval])
Packit 1ca270
undefine([include])
Packit 1ca270
undefine([shift])
Packit 1ca270
undefine([format])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Defining macros
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl m4 output diversions.  We let m4 output them all in order at the end,
Packit 1ca270
dnl except that we explicitly undivert AC_DIVERSION_SED, AC_DIVERSION_CMDS,
Packit 1ca270
dnl and AC_DIVERSION_ICMDS.
Packit 1ca270
Packit 1ca270
dnl AC_DIVERSION_NOTICE - 1 (= 0)	AC_REQUIRE'd #! /bin/sh line
Packit 1ca270
define(AC_DIVERSION_NOTICE, 1)dnl	copyright notice & option help strings
Packit 1ca270
define(AC_DIVERSION_INIT, 2)dnl		initialization code
Packit 1ca270
define(AC_DIVERSION_NORMAL_4, 3)dnl	AC_REQUIRE'd code, 4 level deep
Packit 1ca270
define(AC_DIVERSION_NORMAL_3, 4)dnl	AC_REQUIRE'd code, 3 level deep
Packit 1ca270
define(AC_DIVERSION_NORMAL_2, 5)dnl	AC_REQUIRE'd code, 2 level deep
Packit 1ca270
define(AC_DIVERSION_NORMAL_1, 6)dnl	AC_REQUIRE'd code, 1 level deep
Packit 1ca270
define(AC_DIVERSION_NORMAL, 7)dnl	the tests and output code
Packit 1ca270
define(AC_DIVERSION_SED, 8)dnl		variable substitutions in config.status
Packit 1ca270
define(AC_DIVERSION_CMDS, 9)dnl		extra shell commands in config.status
Packit 1ca270
define(AC_DIVERSION_ICMDS, 10)dnl	extra initialization in config.status
Packit 1ca270
Packit 1ca270
dnl Change the diversion stream to STREAM, while stacking old values.
Packit 1ca270
dnl AC_DIVERT_PUSH(STREAM)
Packit 1ca270
define(AC_DIVERT_PUSH,
Packit 1ca270
[pushdef([AC_DIVERSION_CURRENT], $1)dnl
Packit 1ca270
divert(AC_DIVERSION_CURRENT)dnl
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl Change the diversion stream to its previous value, unstacking it.
Packit 1ca270
dnl AC_DIVERT_POP()
Packit 1ca270
define(AC_DIVERT_POP,
Packit 1ca270
[popdef([AC_DIVERSION_CURRENT])dnl
Packit 1ca270
divert(AC_DIVERSION_CURRENT)dnl
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl Initialize the diversion setup.
Packit 1ca270
define([AC_DIVERSION_CURRENT], AC_DIVERSION_NORMAL)
Packit 1ca270
dnl This will be popped by AC_REQUIRE in AC_INIT.
Packit 1ca270
pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_NOTICE)
Packit 1ca270
Packit 1ca270
dnl The prologue for Autoconf macros.
Packit 1ca270
dnl AC_PRO(MACRO-NAME)
Packit 1ca270
define(AC_PRO,
Packit 1ca270
[define([AC_PROVIDE_$1], )dnl
Packit 1ca270
ifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL,
Packit 1ca270
[AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))],
Packit 1ca270
[pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_CURRENT)])dnl
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl The Epilogue for Autoconf macros.
Packit 1ca270
dnl AC_EPI()
Packit 1ca270
define(AC_EPI,
Packit 1ca270
[AC_DIVERT_POP()dnl
Packit 1ca270
ifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL,
Packit 1ca270
[undivert(AC_DIVERSION_NORMAL_4)dnl
Packit 1ca270
undivert(AC_DIVERSION_NORMAL_3)dnl
Packit 1ca270
undivert(AC_DIVERSION_NORMAL_2)dnl
Packit 1ca270
undivert(AC_DIVERSION_NORMAL_1)dnl
Packit 1ca270
])dnl
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl Define a macro which automatically provides itself.  Add machinery
Packit 1ca270
dnl so the macro automatically switches expansion to the diversion
Packit 1ca270
dnl stack if it is not already using it.  In this case, once finished,
Packit 1ca270
dnl it will bring back all the code accumulated in the diversion stack.
Packit 1ca270
dnl This, combined with AC_REQUIRE, achieves the topological ordering of
Packit 1ca270
dnl macros.  We don't use this macro to define some frequently called
Packit 1ca270
dnl macros that are not involved in ordering constraints, to save m4
Packit 1ca270
dnl processing.
Packit 1ca270
dnl AC_DEFUN(NAME, EXPANSION)
Packit 1ca270
define([AC_DEFUN],
Packit 1ca270
[define($1, [AC_PRO([$1])$2[]AC_EPI()])])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Initialization
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_INIT_NOTICE()
Packit 1ca270
AC_DEFUN(AC_INIT_NOTICE,
Packit 1ca270
[# Guess values for system-dependent variables and create Makefiles.
Packit 1ca270
# Generated automatically using autoconf version] AC_ACVERSION [
Packit 1ca270
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
Packit 1ca270
#
Packit 1ca270
# This configure script is free software; the Free Software Foundation
Packit 1ca270
# gives unlimited permission to copy, distribute and modify it.
Packit 1ca270
Packit 1ca270
# Defaults:
Packit 1ca270
ac_help=
Packit 1ca270
ac_default_prefix=/usr/local
Packit 1ca270
[#] Any additions from configure.in:])
Packit 1ca270
Packit 1ca270
dnl AC_PREFIX_DEFAULT(PREFIX)
Packit 1ca270
AC_DEFUN(AC_PREFIX_DEFAULT,
Packit 1ca270
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
Packit 1ca270
ac_default_prefix=$1
Packit 1ca270
AC_DIVERT_POP()])
Packit 1ca270
Packit 1ca270
dnl AC_INIT_PARSE_ARGS()
Packit 1ca270
AC_DEFUN(AC_INIT_PARSE_ARGS,
Packit 1ca270
[
Packit 1ca270
# Initialize some variables set by options.
Packit 1ca270
# The variables have the same names as the options, with
Packit 1ca270
# dashes changed to underlines.
Packit 1ca270
build=NONE
Packit 1ca270
cache_file=./config.cache
Packit 1ca270
exec_prefix=NONE
Packit 1ca270
host=NONE
Packit 1ca270
no_create=
Packit 1ca270
nonopt=NONE
Packit 1ca270
no_recursion=
Packit 1ca270
prefix=NONE
Packit 1ca270
program_prefix=NONE
Packit 1ca270
program_suffix=NONE
Packit 1ca270
program_transform_name=s,x,x,
Packit 1ca270
silent=
Packit 1ca270
site=
Packit 1ca270
srcdir=
Packit 1ca270
target=NONE
Packit 1ca270
verbose=
Packit 1ca270
x_includes=NONE
Packit 1ca270
x_libraries=NONE
Packit 1ca270
dnl Installation directory options.
Packit 1ca270
dnl These are left unexpanded so users can "make install exec_prefix=/foo"
Packit 1ca270
dnl and all the variables that are supposed to be based on exec_prefix
Packit 1ca270
dnl by default will actually change.
Packit 1ca270
dnl Use braces instead of parens because sh, perl, etc. also accept them.
Packit 1ca270
bindir='${exec_prefix}/bin'
Packit 1ca270
sbindir='${exec_prefix}/sbin'
Packit 1ca270
libexecdir='${exec_prefix}/libexec'
Packit 1ca270
datadir='${prefix}/share'
Packit 1ca270
sysconfdir='${prefix}/etc'
Packit 1ca270
sharedstatedir='${prefix}/com'
Packit 1ca270
localstatedir='${prefix}/var'
Packit 1ca270
libdir='${exec_prefix}/lib'
Packit 1ca270
includedir='${prefix}/include'
Packit 1ca270
oldincludedir='/usr/include'
Packit 1ca270
infodir='${prefix}/info'
Packit 1ca270
mandir='${prefix}/man'
Packit 1ca270
Packit 1ca270
# Initialize some other variables.
Packit 1ca270
subdirs=
Packit 1ca270
MFLAGS= MAKEFLAGS=
Packit 1ca270
SHELL=${CONFIG_SHELL-/bin/sh}
Packit 1ca270
# Maximum number of lines to put in a shell here document.
Packit 1ca270
ac_max_here_lines=12
Packit 1ca270
Packit 1ca270
ac_prev=
Packit 1ca270
for ac_option
Packit 1ca270
do
Packit 1ca270
Packit 1ca270
  # If the previous option needs an argument, assign it.
Packit 1ca270
  if test -n "$ac_prev"; then
Packit 1ca270
    eval "$ac_prev=\$ac_option"
Packit 1ca270
    ac_prev=
Packit 1ca270
    continue
Packit 1ca270
  fi
Packit 1ca270
Packit 1ca270
  case "$ac_option" in
Packit 1ca270
changequote(, )dnl
Packit 1ca270
  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
  *) ac_optarg= ;;
Packit 1ca270
  esac
Packit 1ca270
Packit 1ca270
  # Accept the important Cygnus configure options, so we can diagnose typos.
Packit 1ca270
Packit 1ca270
  case "$ac_option" in
Packit 1ca270
Packit 1ca270
  -bindir | --bindir | --bindi | --bind | --bin | --bi)
Packit 1ca270
    ac_prev=bindir ;;
Packit 1ca270
  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Packit 1ca270
    bindir="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -build | --build | --buil | --bui | --bu)
Packit 1ca270
    ac_prev=build ;;
Packit 1ca270
  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Packit 1ca270
    build="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -cache-file | --cache-file | --cache-fil | --cache-fi \
Packit 1ca270
  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
Packit 1ca270
    ac_prev=cache_file ;;
Packit 1ca270
  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
Packit 1ca270
  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Packit 1ca270
    cache_file="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
Packit 1ca270
    ac_prev=datadir ;;
Packit 1ca270
  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
Packit 1ca270
  | --da=*)
Packit 1ca270
    datadir="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -disable-* | --disable-*)
Packit 1ca270
    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Packit 1ca270
    # Reject names that are not valid shell variable names.
Packit 1ca270
changequote(, )dnl
Packit 1ca270
    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
      AC_MSG_ERROR($ac_feature: invalid feature name)
Packit 1ca270
    fi
Packit 1ca270
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
Packit 1ca270
    eval "enable_${ac_feature}=no" ;;
Packit 1ca270
Packit 1ca270
  -enable-* | --enable-*)
Packit 1ca270
    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Packit 1ca270
    # Reject names that are not valid shell variable names.
Packit 1ca270
changequote(, )dnl
Packit 1ca270
    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
      AC_MSG_ERROR($ac_feature: invalid feature name)
Packit 1ca270
    fi
Packit 1ca270
    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
Packit 1ca270
    case "$ac_option" in
Packit 1ca270
      *=*) ;;
Packit 1ca270
      *) ac_optarg=yes ;;
Packit 1ca270
    esac
Packit 1ca270
    eval "enable_${ac_feature}='$ac_optarg'" ;;
Packit 1ca270
Packit 1ca270
  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
Packit 1ca270
  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
Packit 1ca270
  | --exec | --exe | --ex)
Packit 1ca270
    ac_prev=exec_prefix ;;
Packit 1ca270
  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
Packit 1ca270
  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
Packit 1ca270
  | --exec=* | --exe=* | --ex=*)
Packit 1ca270
    exec_prefix="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -gas | --gas | --ga | --g)
Packit 1ca270
    # Obsolete; use --with-gas.
Packit 1ca270
    with_gas=yes ;;
Packit 1ca270
Packit 1ca270
  -help | --help | --hel | --he)
Packit 1ca270
    # Omit some internal or obsolete options to make the list less imposing.
Packit 1ca270
    # This message is too long to be a string in the A/UX 3.1 sh.
Packit 1ca270
    cat << EOF
Packit 1ca270
changequote(, )dnl
Packit 1ca270
Usage: configure [options] [host]
Packit 1ca270
Options: [defaults in brackets after descriptions]
Packit 1ca270
Configuration:
Packit 1ca270
  --cache-file=FILE       cache test results in FILE
Packit 1ca270
  --help                  print this message
Packit 1ca270
  --no-create             do not create output files
Packit 1ca270
  --quiet, --silent       do not print \`checking...' messages
Packit 1ca270
  --version               print the version of autoconf that created configure
Packit 1ca270
Directory and file names:
Packit 1ca270
  --prefix=PREFIX         install architecture-independent files in PREFIX
Packit 1ca270
                          [$ac_default_prefix]
Packit 1ca270
  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
Packit 1ca270
                          [same as prefix]
Packit 1ca270
  --bindir=DIR            user executables in DIR [EPREFIX/bin]
Packit 1ca270
  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
Packit 1ca270
  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
Packit 1ca270
  --datadir=DIR           read-only architecture-independent data in DIR
Packit 1ca270
                          [PREFIX/share]
Packit 1ca270
  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
Packit 1ca270
  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
Packit 1ca270
                          [PREFIX/com]
Packit 1ca270
  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
Packit 1ca270
  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
Packit 1ca270
  --includedir=DIR        C header files in DIR [PREFIX/include]
Packit 1ca270
  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
Packit 1ca270
  --infodir=DIR           info documentation in DIR [PREFIX/info]
Packit 1ca270
  --mandir=DIR            man documentation in DIR [PREFIX/man]
Packit 1ca270
  --srcdir=DIR            find the sources in DIR [configure dir or ..]
Packit 1ca270
  --program-prefix=PREFIX prepend PREFIX to installed program names
Packit 1ca270
  --program-suffix=SUFFIX append SUFFIX to installed program names
Packit 1ca270
  --program-transform-name=PROGRAM
Packit 1ca270
                          run sed PROGRAM on installed program names
Packit 1ca270
EOF
Packit 1ca270
    cat << EOF
Packit 1ca270
Host type:
Packit 1ca270
  --build=BUILD           configure for building on BUILD [BUILD=HOST]
Packit 1ca270
  --host=HOST             configure for HOST [guessed]
Packit 1ca270
  --target=TARGET         configure for TARGET [TARGET=HOST]
Packit 1ca270
Features and packages:
Packit 1ca270
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
Packit 1ca270
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
Packit 1ca270
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
Packit 1ca270
  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
Packit 1ca270
  --x-includes=DIR        X include files are in DIR
Packit 1ca270
  --x-libraries=DIR       X library files are in DIR
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
EOF
Packit 1ca270
    if test -n "$ac_help"; then
Packit 1ca270
      echo "--enable and --with options recognized:$ac_help"
Packit 1ca270
    fi
Packit 1ca270
    exit 0 ;;
Packit 1ca270
Packit 1ca270
  -host | --host | --hos | --ho)
Packit 1ca270
    ac_prev=host ;;
Packit 1ca270
  -host=* | --host=* | --hos=* | --ho=*)
Packit 1ca270
    host="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -includedir | --includedir | --includedi | --included | --include \
Packit 1ca270
  | --includ | --inclu | --incl | --inc)
Packit 1ca270
    ac_prev=includedir ;;
Packit 1ca270
  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
Packit 1ca270
  | --includ=* | --inclu=* | --incl=* | --inc=*)
Packit 1ca270
    includedir="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -infodir | --infodir | --infodi | --infod | --info | --inf)
Packit 1ca270
    ac_prev=infodir ;;
Packit 1ca270
  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Packit 1ca270
    infodir="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -libdir | --libdir | --libdi | --libd)
Packit 1ca270
    ac_prev=libdir ;;
Packit 1ca270
  -libdir=* | --libdir=* | --libdi=* | --libd=*)
Packit 1ca270
    libdir="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
Packit 1ca270
  | --libexe | --libex | --libe)
Packit 1ca270
    ac_prev=libexecdir ;;
Packit 1ca270
  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
Packit 1ca270
  | --libexe=* | --libex=* | --libe=*)
Packit 1ca270
    libexecdir="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -localstatedir | --localstatedir | --localstatedi | --localstated \
Packit 1ca270
  | --localstate | --localstat | --localsta | --localst \
Packit 1ca270
  | --locals | --local | --loca | --loc | --lo)
Packit 1ca270
    ac_prev=localstatedir ;;
Packit 1ca270
  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Packit 1ca270
  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
Packit 1ca270
  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Packit 1ca270
    localstatedir="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
Packit 1ca270
    ac_prev=mandir ;;
Packit 1ca270
  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Packit 1ca270
    mandir="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -nfp | --nfp | --nf)
Packit 1ca270
    # Obsolete; use --without-fp.
Packit 1ca270
    with_fp=no ;;
Packit 1ca270
Packit 1ca270
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Packit 1ca270
  | --no-cr | --no-c)
Packit 1ca270
    no_create=yes ;;
Packit 1ca270
Packit 1ca270
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
Packit 1ca270
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
Packit 1ca270
    no_recursion=yes ;;
Packit 1ca270
Packit 1ca270
  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
Packit 1ca270
  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
Packit 1ca270
  | --oldin | --oldi | --old | --ol | --o)
Packit 1ca270
    ac_prev=oldincludedir ;;
Packit 1ca270
  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
Packit 1ca270
  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
Packit 1ca270
  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Packit 1ca270
    oldincludedir="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
Packit 1ca270
    ac_prev=prefix ;;
Packit 1ca270
  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Packit 1ca270
    prefix="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -program-prefix | --program-prefix | --program-prefi | --program-pref \
Packit 1ca270
  | --program-pre | --program-pr | --program-p)
Packit 1ca270
    ac_prev=program_prefix ;;
Packit 1ca270
  -program-prefix=* | --program-prefix=* | --program-prefi=* \
Packit 1ca270
  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Packit 1ca270
    program_prefix="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -program-suffix | --program-suffix | --program-suffi | --program-suff \
Packit 1ca270
  | --program-suf | --program-su | --program-s)
Packit 1ca270
    ac_prev=program_suffix ;;
Packit 1ca270
  -program-suffix=* | --program-suffix=* | --program-suffi=* \
Packit 1ca270
  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Packit 1ca270
    program_suffix="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -program-transform-name | --program-transform-name \
Packit 1ca270
  | --program-transform-nam | --program-transform-na \
Packit 1ca270
  | --program-transform-n | --program-transform- \
Packit 1ca270
  | --program-transform | --program-transfor \
Packit 1ca270
  | --program-transfo | --program-transf \
Packit 1ca270
  | --program-trans | --program-tran \
Packit 1ca270
  | --progr-tra | --program-tr | --program-t)
Packit 1ca270
    ac_prev=program_transform_name ;;
Packit 1ca270
  -program-transform-name=* | --program-transform-name=* \
Packit 1ca270
  | --program-transform-nam=* | --program-transform-na=* \
Packit 1ca270
  | --program-transform-n=* | --program-transform-=* \
Packit 1ca270
  | --program-transform=* | --program-transfor=* \
Packit 1ca270
  | --program-transfo=* | --program-transf=* \
Packit 1ca270
  | --program-trans=* | --program-tran=* \
Packit 1ca270
  | --progr-tra=* | --program-tr=* | --program-t=*)
Packit 1ca270
    program_transform_name="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
Packit 1ca270
  | -silent | --silent | --silen | --sile | --sil)
Packit 1ca270
    silent=yes ;;
Packit 1ca270
Packit 1ca270
  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
Packit 1ca270
    ac_prev=sbindir ;;
Packit 1ca270
  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
Packit 1ca270
  | --sbi=* | --sb=*)
Packit 1ca270
    sbindir="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -sharedstatedir | --sharedstatedir | --sharedstatedi \
Packit 1ca270
  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
Packit 1ca270
  | --sharedst | --shareds | --shared | --share | --shar \
Packit 1ca270
  | --sha | --sh)
Packit 1ca270
    ac_prev=sharedstatedir ;;
Packit 1ca270
  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
Packit 1ca270
  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
Packit 1ca270
  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
Packit 1ca270
  | --sha=* | --sh=*)
Packit 1ca270
    sharedstatedir="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -site | --site | --sit)
Packit 1ca270
    ac_prev=site ;;
Packit 1ca270
  -site=* | --site=* | --sit=*)
Packit 1ca270
    site="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
Packit 1ca270
    ac_prev=srcdir ;;
Packit 1ca270
  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Packit 1ca270
    srcdir="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
Packit 1ca270
  | --syscon | --sysco | --sysc | --sys | --sy)
Packit 1ca270
    ac_prev=sysconfdir ;;
Packit 1ca270
  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
Packit 1ca270
  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Packit 1ca270
    sysconfdir="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -target | --target | --targe | --targ | --tar | --ta | --t)
Packit 1ca270
    ac_prev=target ;;
Packit 1ca270
  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Packit 1ca270
    target="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -v | -verbose | --verbose | --verbos | --verbo | --verb)
Packit 1ca270
    verbose=yes ;;
Packit 1ca270
Packit 1ca270
  -version | --version | --versio | --versi | --vers)
Packit 1ca270
    echo "configure generated by autoconf version AC_ACVERSION"
Packit 1ca270
    exit 0 ;;
Packit 1ca270
Packit 1ca270
  -with-* | --with-*)
Packit 1ca270
    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Packit 1ca270
    # Reject names that are not valid shell variable names.
Packit 1ca270
changequote(, )dnl
Packit 1ca270
    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
      AC_MSG_ERROR($ac_package: invalid package name)
Packit 1ca270
    fi
Packit 1ca270
    ac_package=`echo $ac_package| sed 's/-/_/g'`
Packit 1ca270
    case "$ac_option" in
Packit 1ca270
      *=*) ;;
Packit 1ca270
      *) ac_optarg=yes ;;
Packit 1ca270
    esac
Packit 1ca270
    eval "with_${ac_package}='$ac_optarg'" ;;
Packit 1ca270
Packit 1ca270
  -without-* | --without-*)
Packit 1ca270
    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Packit 1ca270
    # Reject names that are not valid shell variable names.
Packit 1ca270
changequote(, )dnl
Packit 1ca270
    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
      AC_MSG_ERROR($ac_package: invalid package name)
Packit 1ca270
    fi
Packit 1ca270
    ac_package=`echo $ac_package| sed 's/-/_/g'`
Packit 1ca270
    eval "with_${ac_package}=no" ;;
Packit 1ca270
Packit 1ca270
  --x)
Packit 1ca270
    # Obsolete; use --with-x.
Packit 1ca270
    with_x=yes ;;
Packit 1ca270
Packit 1ca270
  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
Packit 1ca270
  | --x-incl | --x-inc | --x-in | --x-i)
Packit 1ca270
    ac_prev=x_includes ;;
Packit 1ca270
  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
Packit 1ca270
  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Packit 1ca270
    x_includes="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -x-libraries | --x-libraries | --x-librarie | --x-librari \
Packit 1ca270
  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
Packit 1ca270
    ac_prev=x_libraries ;;
Packit 1ca270
  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
Packit 1ca270
  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Packit 1ca270
    x_libraries="$ac_optarg" ;;
Packit 1ca270
Packit 1ca270
  -*) AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage])
Packit 1ca270
    ;;
Packit 1ca270
Packit 1ca270
  *)
Packit 1ca270
changequote(, )dnl
Packit 1ca270
    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
      AC_MSG_WARN($ac_option: invalid host type)
Packit 1ca270
    fi
Packit 1ca270
    if test "x$nonopt" != xNONE; then
Packit 1ca270
      AC_MSG_ERROR(can only configure for one host and one target at a time)
Packit 1ca270
    fi
Packit 1ca270
    nonopt="$ac_option"
Packit 1ca270
    ;;
Packit 1ca270
Packit 1ca270
  esac
Packit 1ca270
done
Packit 1ca270
Packit 1ca270
if test -n "$ac_prev"; then
Packit 1ca270
  AC_MSG_ERROR(missing argument to --`echo $ac_prev | sed 's/_/-/g'`)
Packit 1ca270
fi
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl Try to have only one #! line, so the script doesn't look funny
Packit 1ca270
dnl for users of AC_REVISION.
Packit 1ca270
dnl AC_INIT_BINSH()
Packit 1ca270
AC_DEFUN(AC_INIT_BINSH,
Packit 1ca270
[#! /bin/sh
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl AC_INIT(UNIQUE-FILE-IN-SOURCE-DIR)
Packit 1ca270
AC_DEFUN(AC_INIT,
Packit 1ca270
[sinclude(acsite.m4)dnl
Packit 1ca270
sinclude(./aclocal.m4)dnl
Packit 1ca270
AC_REQUIRE([AC_INIT_BINSH])dnl
Packit 1ca270
AC_INIT_NOTICE
Packit 1ca270
AC_DIVERT_POP()dnl to NORMAL
Packit 1ca270
AC_DIVERT_PUSH(AC_DIVERSION_INIT)dnl
Packit 1ca270
AC_INIT_PARSE_ARGS
Packit 1ca270
AC_INIT_PREPARE($1)dnl
Packit 1ca270
AC_DIVERT_POP()dnl to NORMAL
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl AC_INIT_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR)
Packit 1ca270
AC_DEFUN(AC_INIT_PREPARE,
Packit 1ca270
[trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Packit 1ca270
Packit 1ca270
# File descriptor usage:
Packit 1ca270
# 0 standard input
Packit 1ca270
# 1 file creation
Packit 1ca270
# 2 errors and warnings
Packit 1ca270
# 3 some systems may open it to /dev/tty
Packit 1ca270
# 4 used on the Kubota Titan
Packit 1ca270
define(AC_FD_MSG, 6)dnl
Packit 1ca270
[#] AC_FD_MSG checking for... messages and results
Packit 1ca270
define(AC_FD_CC, 5)dnl
Packit 1ca270
[#] AC_FD_CC compiler messages saved in config.log
Packit 1ca270
if test "$silent" = yes; then
Packit 1ca270
  exec AC_FD_MSG>/dev/null
Packit 1ca270
else
Packit 1ca270
  exec AC_FD_MSG>&1
Packit 1ca270
fi
Packit 1ca270
exec AC_FD_CC>./config.log
Packit 1ca270
Packit 1ca270
echo "\
Packit 1ca270
This file contains any messages produced by compilers while
Packit 1ca270
running configure, to aid debugging if configure makes a mistake.
Packit 1ca270
" 1>&AC_FD_CC
Packit 1ca270
Packit 1ca270
# Strip out --no-create and --no-recursion so they do not pile up.
Packit 1ca270
# Also quote any args containing shell metacharacters.
Packit 1ca270
ac_configure_args=
Packit 1ca270
for ac_arg
Packit 1ca270
do
Packit 1ca270
  case "$ac_arg" in
Packit 1ca270
  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Packit 1ca270
  | --no-cr | --no-c) ;;
Packit 1ca270
  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
Packit 1ca270
  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
Packit 1ca270
changequote(<<, >>)dnl
Packit 1ca270
dnl If you change this globbing pattern, test it on an old shell --
Packit 1ca270
dnl it's sensitive.  Putting any kind of quote in it causes syntax errors.
Packit 1ca270
  *" "*|*"	"*|*[\[\]\~\<<#>>\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
Packit 1ca270
  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Packit 1ca270
  esac
Packit 1ca270
done
Packit 1ca270
Packit 1ca270
# NLS nuisances.
Packit 1ca270
# Only set these to C if already set.  These must not be set unconditionally
Packit 1ca270
# because not all systems understand e.g. LANG=C (notably SCO).
Packit 1ca270
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
Packit 1ca270
# Non-C LC_CTYPE values break the ctype check.
Packit 1ca270
if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
Packit 1ca270
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
Packit 1ca270
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
Packit 1ca270
if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
Packit 1ca270
Packit 1ca270
# confdefs.h avoids OS command line length limits that DEFS can exceed.
Packit 1ca270
rm -rf conftest* confdefs.h
Packit 1ca270
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
Packit 1ca270
echo > confdefs.h
Packit 1ca270
Packit 1ca270
# A filename unique to this package, relative to the directory that
Packit 1ca270
# configure is in, which we can look for to find out if srcdir is correct.
Packit 1ca270
ac_unique_file=$1
Packit 1ca270
Packit 1ca270
# Find the source files, if location was not specified.
Packit 1ca270
if test -z "$srcdir"; then
Packit 1ca270
  ac_srcdir_defaulted=yes
Packit 1ca270
  # Try the directory containing this script, then its parent.
Packit 1ca270
  ac_prog=[$]0
Packit 1ca270
changequote(, )dnl
Packit 1ca270
  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
Packit 1ca270
  srcdir=$ac_confdir
Packit 1ca270
  if test ! -r $srcdir/$ac_unique_file; then
Packit 1ca270
    srcdir=..
Packit 1ca270
  fi
Packit 1ca270
else
Packit 1ca270
  ac_srcdir_defaulted=no
Packit 1ca270
fi
Packit 1ca270
if test ! -r $srcdir/$ac_unique_file; then
Packit 1ca270
  if test "$ac_srcdir_defaulted" = yes; then
Packit 1ca270
    AC_MSG_ERROR(can not find sources in $ac_confdir or ..)
Packit 1ca270
  else
Packit 1ca270
    AC_MSG_ERROR(can not find sources in $srcdir)
Packit 1ca270
  fi
Packit 1ca270
fi
Packit 1ca270
dnl Double slashes in pathnames in object file debugging info
Packit 1ca270
dnl mess up M-x gdb in Emacs.
Packit 1ca270
changequote(, )dnl
Packit 1ca270
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
Packit 1ca270
dnl Let the site file select an alternate cache file if it wants to.
Packit 1ca270
AC_SITE_LOAD
Packit 1ca270
AC_CACHE_LOAD
Packit 1ca270
AC_LANG_C
Packit 1ca270
dnl By default always use an empty string as the executable
Packit 1ca270
dnl extension.  Only change it if the script calls AC_EXEEXT.
Packit 1ca270
ac_exeext=
Packit 1ca270
dnl By default assume that objects files use an extension of .o.  Only
Packit 1ca270
dnl change it if the script calls AC_OBJEXT.
Packit 1ca270
ac_objext=o
Packit 1ca270
AC_PROG_ECHO_N
Packit 1ca270
dnl Substitute for predefined variables.
Packit 1ca270
AC_SUBST(SHELL)dnl
Packit 1ca270
AC_SUBST(CFLAGS)dnl
Packit 1ca270
AC_SUBST(CPPFLAGS)dnl
Packit 1ca270
AC_SUBST(CXXFLAGS)dnl
Packit 1ca270
AC_SUBST(FFLAGS)dnl
Packit 1ca270
AC_SUBST(DEFS)dnl
Packit 1ca270
AC_SUBST(LDFLAGS)dnl
Packit 1ca270
AC_SUBST(LIBS)dnl
Packit 1ca270
AC_SUBST(exec_prefix)dnl
Packit 1ca270
AC_SUBST(prefix)dnl
Packit 1ca270
AC_SUBST(program_transform_name)dnl
Packit 1ca270
dnl Installation directory options.
Packit 1ca270
AC_SUBST(bindir)dnl
Packit 1ca270
AC_SUBST(sbindir)dnl
Packit 1ca270
AC_SUBST(libexecdir)dnl
Packit 1ca270
AC_SUBST(datadir)dnl
Packit 1ca270
AC_SUBST(sysconfdir)dnl
Packit 1ca270
AC_SUBST(sharedstatedir)dnl
Packit 1ca270
AC_SUBST(localstatedir)dnl
Packit 1ca270
AC_SUBST(libdir)dnl
Packit 1ca270
AC_SUBST(includedir)dnl
Packit 1ca270
AC_SUBST(oldincludedir)dnl
Packit 1ca270
AC_SUBST(infodir)dnl
Packit 1ca270
AC_SUBST(mandir)dnl
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Selecting optional features
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_ARG_ENABLE(FEATURE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
Packit 1ca270
AC_DEFUN(AC_ARG_ENABLE,
Packit 1ca270
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
Packit 1ca270
ac_help="$ac_help
Packit 1ca270
[$2]"
Packit 1ca270
AC_DIVERT_POP()dnl
Packit 1ca270
[#] Check whether --enable-[$1] or --disable-[$1] was given.
Packit 1ca270
if test "[${enable_]patsubst([$1], -, _)+set}" = set; then
Packit 1ca270
  enableval="[$enable_]patsubst([$1], -, _)"
Packit 1ca270
  ifelse([$3], , :, [$3])
Packit 1ca270
ifelse([$4], , , [else
Packit 1ca270
  $4
Packit 1ca270
])dnl
Packit 1ca270
fi
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
AC_DEFUN(AC_ENABLE,
Packit 1ca270
[AC_OBSOLETE([$0], [; instead use AC_ARG_ENABLE])dnl
Packit 1ca270
AC_ARG_ENABLE([$1], [  --enable-$1], [$2], [$3])dnl
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Working with optional software
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
Packit 1ca270
AC_DEFUN(AC_ARG_WITH,
Packit 1ca270
[AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
Packit 1ca270
ac_help="$ac_help
Packit 1ca270
[$2]"
Packit 1ca270
AC_DIVERT_POP()dnl
Packit 1ca270
[#] Check whether --with-[$1] or --without-[$1] was given.
Packit 1ca270
if test "[${with_]patsubst([$1], -, _)+set}" = set; then
Packit 1ca270
  withval="[$with_]patsubst([$1], -, _)"
Packit 1ca270
  ifelse([$3], , :, [$3])
Packit 1ca270
ifelse([$4], , , [else
Packit 1ca270
  $4
Packit 1ca270
])dnl
Packit 1ca270
fi
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
AC_DEFUN(AC_WITH,
Packit 1ca270
[AC_OBSOLETE([$0], [; instead use AC_ARG_WITH])dnl
Packit 1ca270
AC_ARG_WITH([$1], [  --with-$1], [$2], [$3])dnl
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Transforming program names.
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_ARG_PROGRAM()
Packit 1ca270
AC_DEFUN(AC_ARG_PROGRAM,
Packit 1ca270
[if test "$program_transform_name" = s,x,x,; then
Packit 1ca270
  program_transform_name=
Packit 1ca270
else
Packit 1ca270
  # Double any \ or $.  echo might interpret backslashes.
Packit 1ca270
  cat <<\EOF_SED > conftestsed
Packit 1ca270
s,\\,\\\\,g; s,\$,$$,g
Packit 1ca270
EOF_SED
Packit 1ca270
  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
Packit 1ca270
  rm -f conftestsed
Packit 1ca270
fi
Packit 1ca270
test "$program_prefix" != NONE &&
Packit 1ca270
  program_transform_name="s,^,${program_prefix},; $program_transform_name"
Packit 1ca270
# Use a double $ so make ignores it.
Packit 1ca270
test "$program_suffix" != NONE &&
Packit 1ca270
  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
Packit 1ca270
Packit 1ca270
# sed with no file args requires a program.
Packit 1ca270
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Version numbers
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_REVISION(REVISION-INFO)
Packit 1ca270
AC_DEFUN(AC_REVISION,
Packit 1ca270
[AC_REQUIRE([AC_INIT_BINSH])dnl
Packit 1ca270
[# From configure.in] translit([$1], $")])
Packit 1ca270
Packit 1ca270
dnl Subroutines of AC_PREREQ.
Packit 1ca270
Packit 1ca270
dnl Change the dots in NUMBER into commas.
Packit 1ca270
dnl AC_PREREQ_SPLIT(NUMBER)
Packit 1ca270
define(AC_PREREQ_SPLIT,
Packit 1ca270
[translit($1, ., [, ])])
Packit 1ca270
Packit 1ca270
dnl Default the ternary version number to 0 (e.g., 1, 7 -> 1, 7, 0).
Packit 1ca270
dnl AC_PREREQ_CANON(MAJOR, MINOR [,TERNARY])
Packit 1ca270
define(AC_PREREQ_CANON,
Packit 1ca270
[$1, $2, ifelse([$3], , 0, [$3])])
Packit 1ca270
Packit 1ca270
dnl Complain and exit if version number 1 is less than version number 2.
Packit 1ca270
dnl PRINTABLE2 is the printable version of version number 2.
Packit 1ca270
dnl AC_PREREQ_COMPARE(MAJOR1, MINOR1, TERNARY1, MAJOR2, MINOR2, TERNARY2,
Packit 1ca270
dnl                   PRINTABLE2)
Packit 1ca270
define(AC_PREREQ_COMPARE,
Packit 1ca270
[ifelse(builtin([eval],
Packit 1ca270
[$3 + $2 * 1000 + $1 * 1000000 < $6 + $5 * 1000 + $4 * 1000000]), 1,
Packit 1ca270
[errprint(dnl
Packit 1ca270
FATAL ERROR: Autoconf version $7 or higher is required for this script
Packit 1ca270
)m4exit(3)])])
Packit 1ca270
Packit 1ca270
dnl Complain and exit if the Autoconf version is less than VERSION.
Packit 1ca270
dnl AC_PREREQ(VERSION)
Packit 1ca270
define(AC_PREREQ,
Packit 1ca270
[AC_PREREQ_COMPARE(AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)),
Packit 1ca270
AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1])])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Getting the canonical system type
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl Find install-sh, config.sub, config.guess, and Cygnus configure
Packit 1ca270
dnl in directory DIR.  These are auxiliary files used in configuration.
Packit 1ca270
dnl DIR can be either absolute or relative to $srcdir.
Packit 1ca270
dnl AC_CONFIG_AUX_DIR(DIR)
Packit 1ca270
AC_DEFUN(AC_CONFIG_AUX_DIR,
Packit 1ca270
[AC_CONFIG_AUX_DIRS($1 $srcdir/$1)])
Packit 1ca270
Packit 1ca270
dnl The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
Packit 1ca270
dnl There's no need to call this macro explicitly; just AC_REQUIRE it.
Packit 1ca270
AC_DEFUN(AC_CONFIG_AUX_DIR_DEFAULT,
Packit 1ca270
[AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)])
Packit 1ca270
Packit 1ca270
dnl Internal subroutine.
Packit 1ca270
dnl Search for the configuration auxiliary files in directory list $1.
Packit 1ca270
dnl We look only for install-sh, so users of AC_PROG_INSTALL
Packit 1ca270
dnl do not automatically need to distribute the other auxiliary files.
Packit 1ca270
dnl AC_CONFIG_AUX_DIRS(DIR ...)
Packit 1ca270
AC_DEFUN(AC_CONFIG_AUX_DIRS,
Packit 1ca270
[ac_aux_dir=
Packit 1ca270
for ac_dir in $1; do
Packit 1ca270
  if test -f $ac_dir/install-sh; then
Packit 1ca270
    ac_aux_dir=$ac_dir
Packit 1ca270
    ac_install_sh="$ac_aux_dir/install-sh -c"
Packit 1ca270
    break
Packit 1ca270
  elif test -f $ac_dir/install.sh; then
Packit 1ca270
    ac_aux_dir=$ac_dir
Packit 1ca270
    ac_install_sh="$ac_aux_dir/install.sh -c"
Packit 1ca270
    break
Packit 1ca270
  fi
Packit 1ca270
done
Packit 1ca270
if test -z "$ac_aux_dir"; then
Packit 1ca270
  AC_MSG_ERROR([can not find install-sh or install.sh in $1])
Packit 1ca270
fi
Packit 1ca270
ac_config_guess=$ac_aux_dir/config.guess
Packit 1ca270
ac_config_sub=$ac_aux_dir/config.sub
Packit 1ca270
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
Packit 1ca270
AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl Canonicalize the host, target, and build system types.
Packit 1ca270
AC_DEFUN(AC_CANONICAL_SYSTEM,
Packit 1ca270
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
Packit 1ca270
AC_BEFORE([$0], [AC_ARG_PROGRAM])
Packit 1ca270
# Do some error checking and defaulting for the host and target type.
Packit 1ca270
# The inputs are:
Packit 1ca270
#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
Packit 1ca270
#
Packit 1ca270
# The rules are:
Packit 1ca270
# 1. You are not allowed to specify --host, --target, and nonopt at the
Packit 1ca270
#    same time.
Packit 1ca270
# 2. Host defaults to nonopt.
Packit 1ca270
# 3. If nonopt is not specified, then host defaults to the current host,
Packit 1ca270
#    as determined by config.guess.
Packit 1ca270
# 4. Target and build default to nonopt.
Packit 1ca270
# 5. If nonopt is not specified, then target and build default to host.
Packit 1ca270
Packit 1ca270
# The aliases save the names the user supplied, while $host etc.
Packit 1ca270
# will get canonicalized.
Packit 1ca270
case $host---$target---$nonopt in
Packit 1ca270
NONE---*---* | *---NONE---* | *---*---NONE) ;;
Packit 1ca270
*) AC_MSG_ERROR(can only configure for one host and one target at a time) ;;
Packit 1ca270
esac
Packit 1ca270
Packit 1ca270
AC_CANONICAL_HOST
Packit 1ca270
AC_CANONICAL_TARGET
Packit 1ca270
AC_CANONICAL_BUILD
Packit 1ca270
test "$host_alias" != "$target_alias" &&
Packit 1ca270
  test "$program_prefix$program_suffix$program_transform_name" = \
Packit 1ca270
    NONENONEs,x,x, &&
Packit 1ca270
  program_prefix=${target_alias}-
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl Subroutines of AC_CANONICAL_SYSTEM.
Packit 1ca270
Packit 1ca270
AC_DEFUN(AC_CANONICAL_HOST,
Packit 1ca270
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
Packit 1ca270
Packit 1ca270
# Make sure we can run config.sub.
Packit 1ca270
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
Packit 1ca270
else AC_MSG_ERROR(can not run $ac_config_sub)
Packit 1ca270
fi
Packit 1ca270
Packit 1ca270
AC_MSG_CHECKING(host system type)
Packit 1ca270
Packit 1ca270
dnl Set host_alias.
Packit 1ca270
host_alias=$host
Packit 1ca270
case "$host_alias" in
Packit 1ca270
NONE)
Packit 1ca270
  case $nonopt in
Packit 1ca270
  NONE)
Packit 1ca270
    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
Packit 1ca270
    else AC_MSG_ERROR(can not guess host type; you must specify one)
Packit 1ca270
    fi ;;
Packit 1ca270
  *) host_alias=$nonopt ;;
Packit 1ca270
  esac ;;
Packit 1ca270
esac
Packit 1ca270
Packit 1ca270
dnl Set the other host vars.
Packit 1ca270
changequote(<<, >>)dnl
Packit 1ca270
host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
Packit 1ca270
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
Packit 1ca270
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
Packit 1ca270
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
AC_MSG_RESULT($host)
Packit 1ca270
AC_SUBST(host)dnl
Packit 1ca270
AC_SUBST(host_alias)dnl
Packit 1ca270
AC_SUBST(host_cpu)dnl
Packit 1ca270
AC_SUBST(host_vendor)dnl
Packit 1ca270
AC_SUBST(host_os)dnl
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl Internal use only.
Packit 1ca270
AC_DEFUN(AC_CANONICAL_TARGET,
Packit 1ca270
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
Packit 1ca270
AC_MSG_CHECKING(target system type)
Packit 1ca270
Packit 1ca270
dnl Set target_alias.
Packit 1ca270
target_alias=$target
Packit 1ca270
case "$target_alias" in
Packit 1ca270
NONE)
Packit 1ca270
  case $nonopt in
Packit 1ca270
  NONE) target_alias=$host_alias ;;
Packit 1ca270
  *) target_alias=$nonopt ;;
Packit 1ca270
  esac ;;
Packit 1ca270
esac
Packit 1ca270
Packit 1ca270
dnl Set the other target vars.
Packit 1ca270
changequote(<<, >>)dnl
Packit 1ca270
target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
Packit 1ca270
target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
Packit 1ca270
target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
Packit 1ca270
target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
AC_MSG_RESULT($target)
Packit 1ca270
AC_SUBST(target)dnl
Packit 1ca270
AC_SUBST(target_alias)dnl
Packit 1ca270
AC_SUBST(target_cpu)dnl
Packit 1ca270
AC_SUBST(target_vendor)dnl
Packit 1ca270
AC_SUBST(target_os)dnl
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl Internal use only.
Packit 1ca270
AC_DEFUN(AC_CANONICAL_BUILD,
Packit 1ca270
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
Packit 1ca270
AC_MSG_CHECKING(build system type)
Packit 1ca270
Packit 1ca270
dnl Set build_alias.
Packit 1ca270
build_alias=$build
Packit 1ca270
case "$build_alias" in
Packit 1ca270
NONE)
Packit 1ca270
  case $nonopt in
Packit 1ca270
  NONE) build_alias=$host_alias ;;
Packit 1ca270
  *) build_alias=$nonopt ;;
Packit 1ca270
  esac ;;
Packit 1ca270
esac
Packit 1ca270
Packit 1ca270
dnl Set the other build vars.
Packit 1ca270
changequote(<<, >>)dnl
Packit 1ca270
build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
Packit 1ca270
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
Packit 1ca270
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
Packit 1ca270
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
AC_MSG_RESULT($build)
Packit 1ca270
AC_SUBST(build)dnl
Packit 1ca270
AC_SUBST(build_alias)dnl
Packit 1ca270
AC_SUBST(build_cpu)dnl
Packit 1ca270
AC_SUBST(build_vendor)dnl
Packit 1ca270
AC_SUBST(build_os)dnl
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_VALIDATE_CACHED_SYSTEM_TUPLE[(cmd)]
Packit 1ca270
dnl if the cache file is inconsistent with the current host,
Packit 1ca270
dnl target and build system types, execute CMD or print a default
Packit 1ca270
dnl error message.
Packit 1ca270
AC_DEFUN(AC_VALIDATE_CACHED_SYSTEM_TUPLE, [
Packit 1ca270
  AC_REQUIRE([AC_CANONICAL_SYSTEM])
Packit 1ca270
  AC_MSG_CHECKING([cached system tuple])
Packit 1ca270
  if { test x"${ac_cv_host_system_type+set}" = x"set" &&
Packit 1ca270
       test x"$ac_cv_host_system_type" != x"$host"; } ||
Packit 1ca270
     { test x"${ac_cv_build_system_type+set}" = x"set" &&
Packit 1ca270
       test x"$ac_cv_build_system_type" != x"$build"; } ||
Packit 1ca270
     { test x"${ac_cv_target_system_type+set}" = x"set" &&
Packit 1ca270
       test x"$ac_cv_target_system_type" != x"$target"; }; then
Packit 1ca270
      AC_MSG_RESULT([different])
Packit 1ca270
      ifelse($#, 1, [$1],
Packit 1ca270
        [AC_MSG_ERROR([remove config.cache and re-run configure])])
Packit 1ca270
  else
Packit 1ca270
    AC_MSG_RESULT(ok)
Packit 1ca270
  fi
Packit 1ca270
  ac_cv_host_system_type="$host"
Packit 1ca270
  ac_cv_build_system_type="$build"
Packit 1ca270
  ac_cv_target_system_type="$target"
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Caching test results
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl Look for site or system specific initialization scripts.
Packit 1ca270
dnl AC_SITE_LOAD()
Packit 1ca270
define(AC_SITE_LOAD,
Packit 1ca270
[# Prefer explicitly selected file to automatically selected ones.
Packit 1ca270
if test -z "$CONFIG_SITE"; then
Packit 1ca270
  if test "x$prefix" != xNONE; then
Packit 1ca270
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
Packit 1ca270
  else
Packit 1ca270
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
Packit 1ca270
  fi
Packit 1ca270
fi
Packit 1ca270
for ac_site_file in $CONFIG_SITE; do
Packit 1ca270
  if test -r "$ac_site_file"; then
Packit 1ca270
    echo "loading site script $ac_site_file"
Packit 1ca270
    . "$ac_site_file"
Packit 1ca270
  fi
Packit 1ca270
done
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl AC_CACHE_LOAD()
Packit 1ca270
define(AC_CACHE_LOAD,
Packit 1ca270
[if test -r "$cache_file"; then
Packit 1ca270
  echo "loading cache $cache_file"
Packit 1ca270
  . $cache_file
Packit 1ca270
else
Packit 1ca270
  echo "creating cache $cache_file"
Packit 1ca270
  > $cache_file
Packit 1ca270
fi
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl AC_CACHE_SAVE()
Packit 1ca270
define(AC_CACHE_SAVE,
Packit 1ca270
[cat > confcache <<\EOF
Packit 1ca270
# This file is a shell script that caches the results of configure
Packit 1ca270
# tests run on this system so they can be shared between configure
Packit 1ca270
# scripts and configure runs.  It is not useful on other systems.
Packit 1ca270
# If it contains results you don't want to keep, you may remove or edit it.
Packit 1ca270
#
Packit 1ca270
# By default, configure uses ./config.cache as the cache file,
Packit 1ca270
# creating it if it does not exist already.  You can give configure
Packit 1ca270
# the --cache-file=FILE option to use a different cache file; that is
Packit 1ca270
# what configure does when it calls configure scripts in
Packit 1ca270
# subdirectories, so they share the cache.
Packit 1ca270
# Giving --cache-file=/dev/null disables caching, for debugging configure.
Packit 1ca270
# config.status only pays attention to the cache file if you give it the
Packit 1ca270
# --recheck option to rerun configure.
Packit 1ca270
#
Packit 1ca270
EOF
Packit 1ca270
dnl Allow a site initialization script to override cache values.
Packit 1ca270
# The following way of writing the cache mishandles newlines in values,
Packit 1ca270
# but we know of no workaround that is simple, portable, and efficient.
Packit 1ca270
# So, don't put newlines in cache variables' values.
Packit 1ca270
# Ultrix sh set writes to stderr and can't be redirected directly,
Packit 1ca270
# and sets the high bit in the cache file unless we assign to the vars.
Packit 1ca270
changequote(, )dnl
Packit 1ca270
(set) 2>&1 |
Packit 1ca270
  case `(ac_space=' '; set | grep ac_space) 2>&1` in
Packit 1ca270
  *ac_space=\ *)
Packit 1ca270
    # `set' does not quote correctly, so add quotes (double-quote substitution
Packit 1ca270
    # turns \\\\ into \\, and sed turns \\ into \).
Packit 1ca270
    sed -n \
Packit 1ca270
      -e "s/'/'\\\\''/g" \
Packit 1ca270
      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
Packit 1ca270
    ;;
Packit 1ca270
  *)
Packit 1ca270
    # `set' quotes correctly as required by POSIX, so do not add quotes.
Packit 1ca270
    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
Packit 1ca270
    ;;
Packit 1ca270
  esac >> confcache
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
if cmp -s $cache_file confcache; then
Packit 1ca270
  :
Packit 1ca270
else
Packit 1ca270
  if test -w $cache_file; then
Packit 1ca270
    echo "updating cache $cache_file"
Packit 1ca270
    cat confcache > $cache_file
Packit 1ca270
  else
Packit 1ca270
    echo "not updating unwritable cache $cache_file"
Packit 1ca270
  fi
Packit 1ca270
fi
Packit 1ca270
rm -f confcache
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
Packit 1ca270
dnl AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
Packit 1ca270
define(AC_CACHE_VAL,
Packit 1ca270
[dnl We used to use the below line, but it fails if the 1st arg is a
Packit 1ca270
dnl shell variable, so we need the eval.
Packit 1ca270
dnl if test "${$1+set}" = set; then
Packit 1ca270
dnl the '' avoids an AIX 4.1 sh bug ("invalid expansion").
Packit 1ca270
if eval "test \"`echo '$''{'$1'+set}'`\" = set"; then
Packit 1ca270
  echo $ac_n "(cached) $ac_c" 1>&AC_FD_MSG
Packit 1ca270
else
Packit 1ca270
  $2
Packit 1ca270
fi
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl AC_CACHE_CHECK(MESSAGE, CACHE-ID, COMMANDS)
Packit 1ca270
define(AC_CACHE_CHECK,
Packit 1ca270
[AC_MSG_CHECKING([$1])
Packit 1ca270
AC_CACHE_VAL([$2], [$3])
Packit 1ca270
AC_MSG_RESULT([$]$2)])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Defining symbols
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl Set VARIABLE to VALUE, verbatim, or 1.
Packit 1ca270
dnl AC_DEFINE(VARIABLE [, VALUE])
Packit 1ca270
define(AC_DEFINE,
Packit 1ca270
[cat >> confdefs.h <<\EOF
Packit 1ca270
[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
Packit 1ca270
EOF
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl Similar, but perform shell substitutions $ ` \ once on VALUE.
Packit 1ca270
define(AC_DEFINE_UNQUOTED,
Packit 1ca270
[cat >> confdefs.h <
Packit 1ca270
[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
Packit 1ca270
EOF
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Setting output variables
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl This macro protects VARIABLE from being diverted twice
Packit 1ca270
dnl if this macro is called twice for it.
Packit 1ca270
dnl AC_SUBST(VARIABLE)
Packit 1ca270
define(AC_SUBST,
Packit 1ca270
[ifdef([AC_SUBST_$1], ,
Packit 1ca270
[define([AC_SUBST_$1], )dnl
Packit 1ca270
AC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
Packit 1ca270
s%@$1@%[$]$1%g
Packit 1ca270
AC_DIVERT_POP()dnl
Packit 1ca270
])])
Packit 1ca270
Packit 1ca270
dnl AC_SUBST_FILE(VARIABLE)
Packit 1ca270
define(AC_SUBST_FILE,
Packit 1ca270
[ifdef([AC_SUBST_$1], ,
Packit 1ca270
[define([AC_SUBST_$1], )dnl
Packit 1ca270
AC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
Packit 1ca270
/@$1@/r [$]$1
Packit 1ca270
s%@$1@%%g
Packit 1ca270
AC_DIVERT_POP()dnl
Packit 1ca270
])])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Printing messages
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_MSG_CHECKING(FEATURE-DESCRIPTION)
Packit 1ca270
define(AC_MSG_CHECKING,
Packit 1ca270
[echo $ac_n "checking $1""... $ac_c" 1>&AC_FD_MSG
Packit 1ca270
echo "configure:__oline__: checking $1" >&AC_FD_CC])
Packit 1ca270
Packit 1ca270
dnl AC_CHECKING(FEATURE-DESCRIPTION)
Packit 1ca270
define(AC_CHECKING,
Packit 1ca270
[echo "checking $1" 1>&AC_FD_MSG
Packit 1ca270
echo "configure:__oline__: checking $1" >&AC_FD_CC])
Packit 1ca270
Packit 1ca270
dnl AC_MSG_RESULT(RESULT-DESCRIPTION)
Packit 1ca270
define(AC_MSG_RESULT,
Packit 1ca270
[echo "$ac_t""$1" 1>&AC_FD_MSG])
Packit 1ca270
Packit 1ca270
dnl AC_VERBOSE(RESULT-DESCRIPTION)
Packit 1ca270
define(AC_VERBOSE,
Packit 1ca270
[AC_OBSOLETE([$0], [; instead use AC_MSG_RESULT])dnl
Packit 1ca270
echo "	$1" 1>&AC_FD_MSG])
Packit 1ca270
Packit 1ca270
dnl AC_MSG_WARN(PROBLEM-DESCRIPTION)
Packit 1ca270
define(AC_MSG_WARN,
Packit 1ca270
[echo "configure: warning: $1" 1>&2])
Packit 1ca270
Packit 1ca270
dnl AC_MSG_ERROR(ERROR-DESCRIPTION)
Packit 1ca270
define(AC_MSG_ERROR,
Packit 1ca270
[{ echo "configure: error: $1" 1>&2; exit 1; }])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Selecting which language to use for testing
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_LANG_C()
Packit 1ca270
AC_DEFUN(AC_LANG_C,
Packit 1ca270
[define([AC_LANG], [C])dnl
Packit 1ca270
ac_ext=c
Packit 1ca270
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Packit 1ca270
ac_cpp='$CPP $CPPFLAGS'
Packit 1ca270
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
Packit 1ca270
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
Packit 1ca270
cross_compiling=$ac_cv_prog_cc_cross
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl AC_LANG_CPLUSPLUS()
Packit 1ca270
AC_DEFUN(AC_LANG_CPLUSPLUS,
Packit 1ca270
[define([AC_LANG], [CPLUSPLUS])dnl
Packit 1ca270
ac_ext=C
Packit 1ca270
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Packit 1ca270
ac_cpp='$CXXCPP $CPPFLAGS'
Packit 1ca270
ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
Packit 1ca270
ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
Packit 1ca270
cross_compiling=$ac_cv_prog_cxx_cross
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl AC_LANG_FORTRAN77()
Packit 1ca270
AC_DEFUN(AC_LANG_FORTRAN77,
Packit 1ca270
[define([AC_LANG], [FORTRAN77])dnl
Packit 1ca270
ac_ext=f
Packit 1ca270
ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&AC_FD_CC'
Packit 1ca270
ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
Packit 1ca270
cross_compiling=$ac_cv_prog_f77_cross
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl Push the current language on a stack.
Packit 1ca270
dnl AC_LANG_SAVE()
Packit 1ca270
define(AC_LANG_SAVE,
Packit 1ca270
[pushdef([AC_LANG_STACK], AC_LANG)])
Packit 1ca270
Packit 1ca270
dnl Restore the current language from the stack.
Packit 1ca270
dnl AC_LANG_RESTORE()
Packit 1ca270
pushdef([AC_LANG_RESTORE],
Packit 1ca270
[ifelse(AC_LANG_STACK, [C], [AC_LANG_C],dnl
Packit 1ca270
AC_LANG_STACK, [CPLUSPLUS], [AC_LANG_CPLUSPLUS],dnl
Packit 1ca270
AC_LANG_STACK, [FORTRAN77], [AC_LANG_FORTRAN77])[]popdef([AC_LANG_STACK])])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Compiler-running mechanics
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl The purpose of this macro is to "configure:123: command line"
Packit 1ca270
dnl written into config.log for every test run.
Packit 1ca270
dnl AC_TRY_EVAL(VARIABLE)
Packit 1ca270
AC_DEFUN(AC_TRY_EVAL,
Packit 1ca270
[{ (eval echo configure:__oline__: \"[$]$1\") 1>&AC_FD_CC; dnl
Packit 1ca270
(eval [$]$1) 2>&AC_FD_CC; }])
Packit 1ca270
Packit 1ca270
dnl AC_TRY_COMMAND(COMMAND)
Packit 1ca270
AC_DEFUN(AC_TRY_COMMAND,
Packit 1ca270
[{ ac_try='$1'; AC_TRY_EVAL(ac_try); }])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Dependencies between macros
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
Packit 1ca270
define(AC_BEFORE,
Packit 1ca270
[ifdef([AC_PROVIDE_$2], [errprint(__file__:__line__: [$2 was called before $1
Packit 1ca270
])])])
Packit 1ca270
Packit 1ca270
dnl AC_REQUIRE(MACRO-NAME)
Packit 1ca270
define(AC_REQUIRE,
Packit 1ca270
[ifdef([AC_PROVIDE_$1], ,
Packit 1ca270
[AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))dnl
Packit 1ca270
indir([$1])
Packit 1ca270
AC_DIVERT_POP()dnl
Packit 1ca270
])])
Packit 1ca270
Packit 1ca270
dnl AC_PROVIDE(MACRO-NAME)
Packit 1ca270
define(AC_PROVIDE,
Packit 1ca270
[define([AC_PROVIDE_$1], )])
Packit 1ca270
Packit 1ca270
dnl AC_OBSOLETE(THIS-MACRO-NAME [, SUGGESTION])
Packit 1ca270
define(AC_OBSOLETE,
Packit 1ca270
[errprint(__file__:__line__: warning: [$1] is obsolete[$2]
Packit 1ca270
)])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Checking for programs
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND
Packit 1ca270
dnl               [, [VALUE-IF-NOT-FOUND] [, [PATH] [, [REJECT]]]])
Packit 1ca270
AC_DEFUN(AC_CHECK_PROG,
Packit 1ca270
[# Extract the first word of "$2", so it can be a program name with args.
Packit 1ca270
set dummy $2; ac_word=[$]2
Packit 1ca270
AC_MSG_CHECKING([for $ac_word])
Packit 1ca270
AC_CACHE_VAL(ac_cv_prog_$1,
Packit 1ca270
[if test -n "[$]$1"; then
Packit 1ca270
  ac_cv_prog_$1="[$]$1" # Let the user override the test.
Packit 1ca270
else
Packit 1ca270
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
Packit 1ca270
ifelse([$6], , , [  ac_prog_rejected=no
Packit 1ca270
])dnl
Packit 1ca270
dnl $ac_dummy forces splitting on constant user-supplied paths.
Packit 1ca270
dnl POSIX.2 word splitting is done only on the output of word expansions,
Packit 1ca270
dnl not every word.  This closes a longstanding sh security hole.
Packit 1ca270
  ac_dummy="ifelse([$5], , $PATH, [$5])"
Packit 1ca270
  for ac_dir in $ac_dummy; do
Packit 1ca270
    test -z "$ac_dir" && ac_dir=.
Packit 1ca270
    if test -f $ac_dir/$ac_word; then
Packit 1ca270
ifelse([$6], , , dnl
Packit 1ca270
[      if test "[$ac_dir/$ac_word]" = "$6"; then
Packit 1ca270
        ac_prog_rejected=yes
Packit 1ca270
	continue
Packit 1ca270
      fi
Packit 1ca270
])dnl
Packit 1ca270
      ac_cv_prog_$1="$3"
Packit 1ca270
      break
Packit 1ca270
    fi
Packit 1ca270
  done
Packit 1ca270
  IFS="$ac_save_ifs"
Packit 1ca270
ifelse([$6], , , [if test $ac_prog_rejected = yes; then
Packit 1ca270
  # We found a bogon in the path, so make sure we never use it.
Packit 1ca270
  set dummy [$]ac_cv_prog_$1
Packit 1ca270
  shift
Packit 1ca270
  if test [$]# -gt 0; then
Packit 1ca270
    # We chose a different compiler from the bogus one.
Packit 1ca270
    # However, it has the same basename, so the bogon will be chosen
Packit 1ca270
    # first if we set $1 to just the basename; use the full file name.
Packit 1ca270
    shift
Packit 1ca270
    set dummy "$ac_dir/$ac_word" "[$]@"
Packit 1ca270
    shift
Packit 1ca270
    ac_cv_prog_$1="[$]@"
Packit 1ca270
ifelse([$2], [$4], dnl
Packit 1ca270
[  else
Packit 1ca270
    # Default is a loser.
Packit 1ca270
    AC_MSG_ERROR([$1=$6 unacceptable, but no other $4 found in dnl
Packit 1ca270
ifelse([$5], , [\$]PATH, [$5])])
Packit 1ca270
])dnl
Packit 1ca270
  fi
Packit 1ca270
fi
Packit 1ca270
])dnl
Packit 1ca270
dnl If no 4th arg is given, leave the cache variable unset,
Packit 1ca270
dnl so AC_CHECK_PROGS will keep looking.
Packit 1ca270
ifelse([$4], , , [  test -z "[$]ac_cv_prog_$1" && ac_cv_prog_$1="$4"
Packit 1ca270
])dnl
Packit 1ca270
fi])dnl
Packit 1ca270
$1="$ac_cv_prog_$1"
Packit 1ca270
if test -n "[$]$1"; then
Packit 1ca270
  AC_MSG_RESULT([$]$1)
Packit 1ca270
else
Packit 1ca270
  AC_MSG_RESULT(no)
Packit 1ca270
fi
Packit 1ca270
AC_SUBST($1)dnl
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND [, PATH]])
Packit 1ca270
AC_DEFUN(AC_PATH_PROG,
Packit 1ca270
[# Extract the first word of "$2", so it can be a program name with args.
Packit 1ca270
set dummy $2; ac_word=[$]2
Packit 1ca270
AC_MSG_CHECKING([for $ac_word])
Packit 1ca270
AC_CACHE_VAL(ac_cv_path_$1,
Packit 1ca270
[case "[$]$1" in
Packit 1ca270
  /*)
Packit 1ca270
  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
Packit 1ca270
  ;;
Packit 1ca270
  ?:/*)			 
Packit 1ca270
  ac_cv_path_$1="[$]$1" # Let the user override the test with a dos path.
Packit 1ca270
  ;;
Packit 1ca270
  *)
Packit 1ca270
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
Packit 1ca270
dnl $ac_dummy forces splitting on constant user-supplied paths.
Packit 1ca270
dnl POSIX.2 word splitting is done only on the output of word expansions,
Packit 1ca270
dnl not every word.  This closes a longstanding sh security hole.
Packit 1ca270
  ac_dummy="ifelse([$4], , $PATH, [$4])"
Packit 1ca270
  for ac_dir in $ac_dummy; do 
Packit 1ca270
    test -z "$ac_dir" && ac_dir=.
Packit 1ca270
    if test -f $ac_dir/$ac_word; then
Packit 1ca270
      ac_cv_path_$1="$ac_dir/$ac_word"
Packit 1ca270
      break
Packit 1ca270
    fi
Packit 1ca270
  done
Packit 1ca270
  IFS="$ac_save_ifs"
Packit 1ca270
dnl If no 3rd arg is given, leave the cache variable unset,
Packit 1ca270
dnl so AC_PATH_PROGS will keep looking.
Packit 1ca270
ifelse([$3], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3"
Packit 1ca270
])dnl
Packit 1ca270
  ;;
Packit 1ca270
esac])dnl
Packit 1ca270
$1="$ac_cv_path_$1"
Packit 1ca270
if test -n "[$]$1"; then
Packit 1ca270
  AC_MSG_RESULT([$]$1)
Packit 1ca270
else
Packit 1ca270
  AC_MSG_RESULT(no)
Packit 1ca270
fi
Packit 1ca270
AC_SUBST($1)dnl
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
Packit 1ca270
dnl                [, PATH]])
Packit 1ca270
AC_DEFUN(AC_CHECK_PROGS,
Packit 1ca270
[for ac_prog in $2
Packit 1ca270
do
Packit 1ca270
AC_CHECK_PROG($1, [$]ac_prog, [$]ac_prog, , $4)
Packit 1ca270
test -n "[$]$1" && break
Packit 1ca270
done
Packit 1ca270
ifelse([$3], , , [test -n "[$]$1" || $1="$3"
Packit 1ca270
])])
Packit 1ca270
Packit 1ca270
dnl AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND
Packit 1ca270
dnl               [, PATH]])
Packit 1ca270
AC_DEFUN(AC_PATH_PROGS,
Packit 1ca270
[for ac_prog in $2
Packit 1ca270
do
Packit 1ca270
AC_PATH_PROG($1, [$]ac_prog, , $4)
Packit 1ca270
test -n "[$]$1" && break
Packit 1ca270
done
Packit 1ca270
ifelse([$3], , , [test -n "[$]$1" || $1="$3"
Packit 1ca270
])])
Packit 1ca270
Packit 1ca270
dnl Internal subroutine.
Packit 1ca270
AC_DEFUN(AC_CHECK_TOOL_PREFIX,
Packit 1ca270
[AC_REQUIRE([AC_CANONICAL_HOST])AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Packit 1ca270
if test $host != $build; then
Packit 1ca270
  ac_tool_prefix=${host_alias}-
Packit 1ca270
else
Packit 1ca270
  ac_tool_prefix=
Packit 1ca270
fi
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl AC_CHECK_TOOL(VARIABLE, PROG-TO-CHECK-FOR[, VALUE-IF-NOT-FOUND [, PATH]])
Packit 1ca270
AC_DEFUN(AC_CHECK_TOOL,
Packit 1ca270
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
Packit 1ca270
AC_CHECK_PROG($1, ${ac_tool_prefix}$2, ${ac_tool_prefix}$2,
Packit 1ca270
	      ifelse([$3], , [$2], ), $4)
Packit 1ca270
ifelse([$3], , , [
Packit 1ca270
if test -z "$ac_cv_prog_$1"; then
Packit 1ca270
if test -n "$ac_tool_prefix"; then
Packit 1ca270
  AC_CHECK_PROG($1, $2, $2, $3)
Packit 1ca270
else
Packit 1ca270
  $1="$3"
Packit 1ca270
fi
Packit 1ca270
fi])
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl Guess the value for the `prefix' variable by looking for
Packit 1ca270
dnl the argument program along PATH and taking its parent.
Packit 1ca270
dnl Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
Packit 1ca270
dnl set `prefix' to /usr/local/gnu.
Packit 1ca270
dnl This comes too late to find a site file based on the prefix,
Packit 1ca270
dnl and it might use a cached value for the path.
Packit 1ca270
dnl No big loss, I think, since most configures don't use this macro anyway.
Packit 1ca270
dnl AC_PREFIX_PROGRAM(PROGRAM)
Packit 1ca270
AC_DEFUN(AC_PREFIX_PROGRAM,
Packit 1ca270
[if test "x$prefix" = xNONE; then
Packit 1ca270
changequote(<<, >>)dnl
Packit 1ca270
define(<<AC_VAR_NAME>>, translit($1, [a-z], [A-Z]))dnl
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
dnl We reimplement AC_MSG_CHECKING (mostly) to avoid the ... in the middle.
Packit 1ca270
echo $ac_n "checking for prefix by $ac_c" 1>&AC_FD_MSG
Packit 1ca270
AC_PATH_PROG(AC_VAR_NAME, $1)
Packit 1ca270
changequote(<<, >>)dnl
Packit 1ca270
  if test -n "$ac_cv_path_<<>>AC_VAR_NAME"; then
Packit 1ca270
    prefix=`echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*//*[^/][^/]*$%%'`
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
  fi
Packit 1ca270
fi
Packit 1ca270
undefine([AC_VAR_NAME])dnl
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl Try to compile, link and execute TEST-PROGRAM.  Set WORKING-VAR to
Packit 1ca270
dnl `yes' if the current compiler works, otherwise set it ti `no'.  Set
Packit 1ca270
dnl CROSS-VAR to `yes' if the compiler and linker produce non-native
Packit 1ca270
dnl executables, otherwise set it to `no'.  Before calling
Packit 1ca270
dnl `AC_TRY_COMPILER()', call `AC_LANG_*' to set-up for the right
Packit 1ca270
dnl language.
Packit 1ca270
dnl 
Packit 1ca270
dnl AC_TRY_COMPILER(TEST-PROGRAM, WORKING-VAR, CROSS-VAR)
Packit 1ca270
AC_DEFUN(AC_TRY_COMPILER,
Packit 1ca270
[cat > conftest.$ac_ext << EOF
Packit 1ca270
ifelse(AC_LANG, [FORTRAN77], ,
Packit 1ca270
[
Packit 1ca270
[#]line __oline__ "configure"
Packit 1ca270
#include "confdefs.h"
Packit 1ca270
])
Packit 1ca270
[$1]
Packit 1ca270
EOF
Packit 1ca270
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
Packit 1ca270
  [$2]=yes
Packit 1ca270
  # If we can't run a trivial program, we are probably using a cross compiler.
Packit 1ca270
  if (./conftest; exit) 2>/dev/null; then
Packit 1ca270
    [$3]=no
Packit 1ca270
  else
Packit 1ca270
    [$3]=yes
Packit 1ca270
  fi
Packit 1ca270
else
Packit 1ca270
  echo "configure: failed program was:" >&AC_FD_CC
Packit 1ca270
  cat conftest.$ac_ext >&AC_FD_CC
Packit 1ca270
  [$2]=no
Packit 1ca270
fi
Packit 1ca270
rm -fr conftest*])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Checking for libraries
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_TRY_LINK_FUNC(func, action-if-found, action-if-not-found)
Packit 1ca270
dnl Try to link a program that calls FUNC, handling GCC builtins.  If
Packit 1ca270
dnl the link succeeds, execute ACTION-IF-FOUND; otherwise, execute
Packit 1ca270
dnl ACTION-IF-NOT-FOUND.
Packit 1ca270
Packit 1ca270
AC_DEFUN(AC_TRY_LINK_FUNC,
Packit 1ca270
AC_TRY_LINK(dnl
Packit 1ca270
ifelse([$1], [main], , dnl Avoid conflicting decl of main.
Packit 1ca270
[/* Override any gcc2 internal prototype to avoid an error.  */
Packit 1ca270
]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
Packit 1ca270
extern "C"
Packit 1ca270
#endif
Packit 1ca270
])dnl
Packit 1ca270
[/* We use char because int might match the return type of a gcc2
Packit 1ca270
    builtin and then its argument prototype would still apply.  */
Packit 1ca270
char $1();
Packit 1ca270
]),
Packit 1ca270
[$1()],
Packit 1ca270
[$2],
Packit 1ca270
[$3]))
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS [, ACTION-IF-FOUND
Packit 1ca270
dnl            [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
Packit 1ca270
dnl Search for a library defining FUNC, if it's not already available.
Packit 1ca270
Packit 1ca270
AC_DEFUN(AC_SEARCH_LIBS,
Packit 1ca270
[AC_PREREQ([2.13])
Packit 1ca270
AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1],
Packit 1ca270
[ac_func_search_save_LIBS="$LIBS"
Packit 1ca270
ac_cv_search_$1="no"
Packit 1ca270
AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"])
Packit 1ca270
test "$ac_cv_search_$1" = "no" && for i in $2; do
Packit 1ca270
LIBS="-l$i $5 $ac_func_search_save_LIBS"
Packit 1ca270
AC_TRY_LINK_FUNC([$1],
Packit 1ca270
[ac_cv_search_$1="-l$i"
Packit 1ca270
break])
Packit 1ca270
done
Packit 1ca270
LIBS="$ac_func_search_save_LIBS"])
Packit 1ca270
if test "$ac_cv_search_$1" != "no"; then
Packit 1ca270
  test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS"
Packit 1ca270
  $3
Packit 1ca270
else :
Packit 1ca270
  $4
Packit 1ca270
fi])
Packit 1ca270
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
Packit 1ca270
dnl              [, OTHER-LIBRARIES]]])
Packit 1ca270
AC_DEFUN(AC_CHECK_LIB,
Packit 1ca270
[AC_MSG_CHECKING([for $2 in -l$1])
Packit 1ca270
dnl Use a cache variable name containing both the library and function name,
Packit 1ca270
dnl because the test really is for library $1 defining function $2, not
Packit 1ca270
dnl just for library $1.  Separate tests with the same $1 and different $2s
Packit 1ca270
dnl may have different results.
Packit 1ca270
ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
Packit 1ca270
AC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
Packit 1ca270
[ac_save_LIBS="$LIBS"
Packit 1ca270
LIBS="-l$1 $5 $LIBS"
Packit 1ca270
AC_TRY_LINK(dnl
Packit 1ca270
ifelse(AC_LANG, [FORTRAN77], ,
Packit 1ca270
ifelse([$2], [main], , dnl Avoid conflicting decl of main.
Packit 1ca270
[/* Override any gcc2 internal prototype to avoid an error.  */
Packit 1ca270
]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
Packit 1ca270
extern "C"
Packit 1ca270
#endif
Packit 1ca270
])dnl
Packit 1ca270
[/* We use char because int might match the return type of a gcc2
Packit 1ca270
    builtin and then its argument prototype would still apply.  */
Packit 1ca270
char $2();
Packit 1ca270
])),
Packit 1ca270
	    [$2()],
Packit 1ca270
	    eval "ac_cv_lib_$ac_lib_var=yes",
Packit 1ca270
	    eval "ac_cv_lib_$ac_lib_var=no")
Packit 1ca270
LIBS="$ac_save_LIBS"
Packit 1ca270
])dnl
Packit 1ca270
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Packit 1ca270
  AC_MSG_RESULT(yes)
Packit 1ca270
  ifelse([$3], ,
Packit 1ca270
[changequote(, )dnl
Packit 1ca270
  ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
Packit 1ca270
    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
  AC_DEFINE_UNQUOTED($ac_tr_lib)
Packit 1ca270
  LIBS="-l$1 $LIBS"
Packit 1ca270
], [$3])
Packit 1ca270
else
Packit 1ca270
  AC_MSG_RESULT(no)
Packit 1ca270
ifelse([$4], , , [$4
Packit 1ca270
])dnl
Packit 1ca270
fi
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl AC_HAVE_LIBRARY(LIBRARY, [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
Packit 1ca270
dnl                 [, OTHER-LIBRARIES]]])
Packit 1ca270
AC_DEFUN(AC_HAVE_LIBRARY,
Packit 1ca270
[AC_OBSOLETE([$0], [; instead use AC_CHECK_LIB])dnl
Packit 1ca270
changequote(<<, >>)dnl
Packit 1ca270
define(<<AC_LIB_NAME>>, dnl
Packit 1ca270
patsubst(patsubst($1, <<lib\([^\.]*\)\.a>>, <<\1>>), <<-l>>, <<>>))dnl
Packit 1ca270
define(<<AC_CV_NAME>>, ac_cv_lib_<<>>AC_LIB_NAME)dnl
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
AC_MSG_CHECKING([for -l[]AC_LIB_NAME])
Packit 1ca270
AC_CACHE_VAL(AC_CV_NAME,
Packit 1ca270
[ac_save_LIBS="$LIBS"
Packit 1ca270
LIBS="-l[]AC_LIB_NAME[] $4 $LIBS"
Packit 1ca270
AC_TRY_LINK( , [main()], AC_CV_NAME=yes, AC_CV_NAME=no)
Packit 1ca270
LIBS="$ac_save_LIBS"
Packit 1ca270
])dnl
Packit 1ca270
AC_MSG_RESULT($AC_CV_NAME)
Packit 1ca270
if test "$AC_CV_NAME" = yes; then
Packit 1ca270
  ifelse([$2], ,
Packit 1ca270
[AC_DEFINE([HAVE_LIB]translit(AC_LIB_NAME, [a-z], [A-Z]))
Packit 1ca270
  LIBS="-l[]AC_LIB_NAME[] $LIBS"
Packit 1ca270
], [$2])
Packit 1ca270
ifelse([$3], , , [else
Packit 1ca270
  $3
Packit 1ca270
])dnl
Packit 1ca270
fi
Packit 1ca270
undefine([AC_LIB_NAME])dnl
Packit 1ca270
undefine([AC_CV_NAME])dnl
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Examining declarations
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
Packit 1ca270
AC_DEFUN(AC_TRY_CPP,
Packit 1ca270
[AC_REQUIRE_CPP()dnl
Packit 1ca270
cat > conftest.$ac_ext <
Packit 1ca270
[#]line __oline__ "configure"
Packit 1ca270
#include "confdefs.h"
Packit 1ca270
[$1]
Packit 1ca270
EOF
Packit 1ca270
dnl Capture the stderr of cpp.  eval is necessary to expand ac_cpp.
Packit 1ca270
dnl We used to copy stderr to stdout and capture it in a variable, but
Packit 1ca270
dnl that breaks under sh -x, which writes compile commands starting
Packit 1ca270
dnl with ` +' to stderr in eval and subshells.
Packit 1ca270
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Packit 1ca270
AC_TRY_EVAL(ac_try)
Packit 1ca270
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Packit 1ca270
if test -z "$ac_err"; then
Packit 1ca270
  ifelse([$2], , :, [rm -rf conftest*
Packit 1ca270
  $2])
Packit 1ca270
else
Packit 1ca270
  echo "$ac_err" >&AC_FD_CC
Packit 1ca270
  echo "configure: failed program was:" >&AC_FD_CC
Packit 1ca270
  cat conftest.$ac_ext >&AC_FD_CC
Packit 1ca270
ifelse([$3], , , [  rm -rf conftest*
Packit 1ca270
  $3
Packit 1ca270
])dnl
Packit 1ca270
fi
Packit 1ca270
rm -f conftest*])
Packit 1ca270
Packit 1ca270
dnl AC_EGREP_HEADER(PATTERN, HEADER-FILE, ACTION-IF-FOUND [,
Packit 1ca270
dnl                 ACTION-IF-NOT-FOUND])
Packit 1ca270
AC_DEFUN(AC_EGREP_HEADER,
Packit 1ca270
[AC_EGREP_CPP([$1], [#include <$2>], [$3], [$4])])
Packit 1ca270
Packit 1ca270
dnl Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
Packit 1ca270
dnl come early, it is not included in AC_BEFORE checks.
Packit 1ca270
dnl AC_EGREP_CPP(PATTERN, PROGRAM, [ACTION-IF-FOUND [,
Packit 1ca270
dnl              ACTION-IF-NOT-FOUND]])
Packit 1ca270
AC_DEFUN(AC_EGREP_CPP,
Packit 1ca270
[AC_REQUIRE_CPP()dnl
Packit 1ca270
cat > conftest.$ac_ext <
Packit 1ca270
[#]line __oline__ "configure"
Packit 1ca270
#include "confdefs.h"
Packit 1ca270
[$2]
Packit 1ca270
EOF
Packit 1ca270
dnl eval is necessary to expand ac_cpp.
Packit 1ca270
dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
Packit 1ca270
if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC |
Packit 1ca270
dnl Prevent m4 from eating character classes:
Packit 1ca270
changequote(, )dnl
Packit 1ca270
  egrep "$1" >/dev/null 2>&1; then
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
  ifelse([$3], , :, [rm -rf conftest*
Packit 1ca270
  $3])
Packit 1ca270
ifelse([$4], , , [else
Packit 1ca270
  rm -rf conftest*
Packit 1ca270
  $4
Packit 1ca270
])dnl
Packit 1ca270
fi
Packit 1ca270
rm -f conftest*
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Examining syntax
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
Packit 1ca270
dnl             [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
Packit 1ca270
AC_DEFUN(AC_TRY_COMPILE,
Packit 1ca270
[cat > conftest.$ac_ext <
Packit 1ca270
ifelse(AC_LANG, [FORTRAN77],
Packit 1ca270
[      program main
Packit 1ca270
[$2]
Packit 1ca270
      end],
Packit 1ca270
[dnl This sometimes fails to find confdefs.h, for some reason.
Packit 1ca270
dnl [#]line __oline__ "[$]0"
Packit 1ca270
[#]line __oline__ "configure"
Packit 1ca270
#include "confdefs.h"
Packit 1ca270
[$1]
Packit 1ca270
int main() {
Packit 1ca270
[$2]
Packit 1ca270
; return 0; }
Packit 1ca270
])EOF
Packit 1ca270
if AC_TRY_EVAL(ac_compile); then
Packit 1ca270
  ifelse([$3], , :, [rm -rf conftest*
Packit 1ca270
  $3])
Packit 1ca270
else
Packit 1ca270
  echo "configure: failed program was:" >&AC_FD_CC
Packit 1ca270
  cat conftest.$ac_ext >&AC_FD_CC
Packit 1ca270
ifelse([$4], , , [  rm -rf conftest*
Packit 1ca270
  $4
Packit 1ca270
])dnl
Packit 1ca270
fi
Packit 1ca270
rm -f conftest*])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Examining libraries
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
Packit 1ca270
dnl                  ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
Packit 1ca270
AC_DEFUN(AC_COMPILE_CHECK,
Packit 1ca270
[AC_OBSOLETE([$0], [; instead use AC_TRY_COMPILE or AC_TRY_LINK, and AC_MSG_CHECKING and AC_MSG_RESULT])dnl
Packit 1ca270
ifelse([$1], , , [AC_CHECKING([for $1])
Packit 1ca270
])dnl
Packit 1ca270
AC_TRY_LINK([$2], [$3], [$4], [$5])
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
Packit 1ca270
dnl             [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
Packit 1ca270
AC_DEFUN(AC_TRY_LINK,
Packit 1ca270
[cat > conftest.$ac_ext <
Packit 1ca270
ifelse(AC_LANG, [FORTRAN77],
Packit 1ca270
[
Packit 1ca270
      program main
Packit 1ca270
      call [$2]
Packit 1ca270
      end
Packit 1ca270
],
Packit 1ca270
[dnl This sometimes fails to find confdefs.h, for some reason.
Packit 1ca270
dnl [#]line __oline__ "[$]0"
Packit 1ca270
[#]line __oline__ "configure"
Packit 1ca270
#include "confdefs.h"
Packit 1ca270
[$1]
Packit 1ca270
int main() {
Packit 1ca270
[$2]
Packit 1ca270
; return 0; }
Packit 1ca270
])EOF
Packit 1ca270
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
Packit 1ca270
  ifelse([$3], , :, [rm -rf conftest*
Packit 1ca270
  $3])
Packit 1ca270
else
Packit 1ca270
  echo "configure: failed program was:" >&AC_FD_CC
Packit 1ca270
  cat conftest.$ac_ext >&AC_FD_CC
Packit 1ca270
ifelse([$4], , , [  rm -rf conftest*
Packit 1ca270
  $4
Packit 1ca270
])dnl
Packit 1ca270
fi
Packit 1ca270
rm -f conftest*])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Checking for run-time features
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_TRY_RUN(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE
Packit 1ca270
dnl            [, ACTION-IF-CROSS-COMPILING]]])
Packit 1ca270
AC_DEFUN(AC_TRY_RUN,
Packit 1ca270
[if test "$cross_compiling" = yes; then
Packit 1ca270
  ifelse([$4], ,
Packit 1ca270
    [errprint(__file__:__line__: warning: [AC_TRY_RUN] called without default to allow cross compiling
Packit 1ca270
)dnl
Packit 1ca270
  AC_MSG_ERROR(can not run test program while cross compiling)],
Packit 1ca270
  [$4])
Packit 1ca270
else
Packit 1ca270
  AC_TRY_RUN_NATIVE([$1], [$2], [$3])
Packit 1ca270
fi
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl Like AC_TRY_RUN but assumes a native-environment (non-cross) compiler.
Packit 1ca270
dnl AC_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
Packit 1ca270
AC_DEFUN(AC_TRY_RUN_NATIVE,
Packit 1ca270
[cat > conftest.$ac_ext <
Packit 1ca270
[#]line __oline__ "configure"
Packit 1ca270
#include "confdefs.h"
Packit 1ca270
[$1]
Packit 1ca270
EOF
Packit 1ca270
if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Packit 1ca270
then
Packit 1ca270
dnl Don't remove the temporary files here, so they can be examined.
Packit 1ca270
  ifelse([$2], , :, [$2])
Packit 1ca270
else
Packit 1ca270
  echo "configure: failed program was:" >&AC_FD_CC
Packit 1ca270
  cat conftest.$ac_ext >&AC_FD_CC
Packit 1ca270
ifelse([$3], , , [  rm -fr conftest*
Packit 1ca270
  $3
Packit 1ca270
])dnl
Packit 1ca270
fi
Packit 1ca270
rm -fr conftest*])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Checking for header files
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_CHECK_HEADER(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
Packit 1ca270
AC_DEFUN(AC_CHECK_HEADER,
Packit 1ca270
[dnl Do the transliteration at runtime so arg 1 can be a shell variable.
Packit 1ca270
ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
Packit 1ca270
AC_MSG_CHECKING([for $1])
Packit 1ca270
AC_CACHE_VAL(ac_cv_header_$ac_safe,
Packit 1ca270
[AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes",
Packit 1ca270
  eval "ac_cv_header_$ac_safe=no")])dnl
Packit 1ca270
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Packit 1ca270
  AC_MSG_RESULT(yes)
Packit 1ca270
  ifelse([$2], , :, [$2])
Packit 1ca270
else
Packit 1ca270
  AC_MSG_RESULT(no)
Packit 1ca270
ifelse([$3], , , [$3
Packit 1ca270
])dnl
Packit 1ca270
fi
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl AC_CHECK_HEADERS(HEADER-FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
Packit 1ca270
AC_DEFUN(AC_CHECK_HEADERS,
Packit 1ca270
[for ac_hdr in $1
Packit 1ca270
do
Packit 1ca270
AC_CHECK_HEADER($ac_hdr,
Packit 1ca270
[changequote(, )dnl
Packit 1ca270
  ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
  AC_DEFINE_UNQUOTED($ac_tr_hdr) $2], $3)dnl
Packit 1ca270
done
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Checking for the existence of files
Packit 1ca270
Packit 1ca270
dnl AC_CHECK_FILE(FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
Packit 1ca270
AC_DEFUN(AC_CHECK_FILE,
Packit 1ca270
[AC_REQUIRE([AC_PROG_CC])
Packit 1ca270
dnl Do the transliteration at runtime so arg 1 can be a shell variable.
Packit 1ca270
ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
Packit 1ca270
AC_MSG_CHECKING([for $1])
Packit 1ca270
AC_CACHE_VAL(ac_cv_file_$ac_safe,
Packit 1ca270
[if test "$cross_compiling" = yes; then
Packit 1ca270
  errprint(__file__:__line__: warning: Cannot check for file existence when cross compiling
Packit 1ca270
)dnl
Packit 1ca270
  AC_MSG_ERROR(Cannot check for file existence when cross compiling)
Packit 1ca270
else
Packit 1ca270
  if test -r $1; then
Packit 1ca270
    eval "ac_cv_file_$ac_safe=yes"
Packit 1ca270
  else
Packit 1ca270
    eval "ac_cv_file_$ac_safe=no"
Packit 1ca270
  fi
Packit 1ca270
fi])dnl
Packit 1ca270
if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
Packit 1ca270
  AC_MSG_RESULT(yes)
Packit 1ca270
  ifelse([$2], , :, [$2])
Packit 1ca270
else
Packit 1ca270
  AC_MSG_RESULT(no)
Packit 1ca270
ifelse([$3], , , [$3])
Packit 1ca270
fi
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl AC_CHECK_FILES(FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
Packit 1ca270
AC_DEFUN(AC_CHECK_FILES,
Packit 1ca270
[for ac_file in $1
Packit 1ca270
do
Packit 1ca270
AC_CHECK_FILE($ac_file,
Packit 1ca270
[changequote(, )dnl
Packit 1ca270
  ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
  AC_DEFINE_UNQUOTED($ac_tr_file) $2], $3)dnl
Packit 1ca270
done
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Checking for library functions
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_CHECK_FUNC(FUNCTION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
Packit 1ca270
AC_DEFUN(AC_CHECK_FUNC,
Packit 1ca270
[AC_MSG_CHECKING([for $1])
Packit 1ca270
AC_CACHE_VAL(ac_cv_func_$1,
Packit 1ca270
[AC_TRY_LINK(
Packit 1ca270
dnl Don't include <ctype.h> because on OSF/1 3.0 it includes <sys/types.h>
Packit 1ca270
dnl which includes <sys/select.h> which contains a prototype for
Packit 1ca270
dnl select.  Similarly for bzero.
Packit 1ca270
[/* System header to define __stub macros and hopefully few prototypes,
Packit 1ca270
    which can conflict with char $1(); below.  */
Packit 1ca270
#include <assert.h>
Packit 1ca270
/* Override any gcc2 internal prototype to avoid an error.  */
Packit 1ca270
]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
Packit 1ca270
extern "C"
Packit 1ca270
#endif
Packit 1ca270
])dnl
Packit 1ca270
[/* We use char because int might match the return type of a gcc2
Packit 1ca270
    builtin and then its argument prototype would still apply.  */
Packit 1ca270
char $1();
Packit 1ca270
], [
Packit 1ca270
/* The GNU C library defines this for functions which it implements
Packit 1ca270
    to always fail with ENOSYS.  Some functions are actually named
Packit 1ca270
    something starting with __ and the normal name is an alias.  */
Packit 1ca270
#if defined (__stub_$1) || defined (__stub___$1)
Packit 1ca270
choke me
Packit 1ca270
#else
Packit 1ca270
$1();
Packit 1ca270
#endif
Packit 1ca270
], eval "ac_cv_func_$1=yes", eval "ac_cv_func_$1=no")])
Packit 1ca270
if eval "test \"`echo '$ac_cv_func_'$1`\" = yes"; then
Packit 1ca270
  AC_MSG_RESULT(yes)
Packit 1ca270
  ifelse([$2], , :, [$2])
Packit 1ca270
else
Packit 1ca270
  AC_MSG_RESULT(no)
Packit 1ca270
ifelse([$3], , , [$3
Packit 1ca270
])dnl
Packit 1ca270
fi
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl AC_CHECK_FUNCS(FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
Packit 1ca270
AC_DEFUN(AC_CHECK_FUNCS,
Packit 1ca270
[for ac_func in $1
Packit 1ca270
do
Packit 1ca270
AC_CHECK_FUNC($ac_func,
Packit 1ca270
[changequote(, )dnl
Packit 1ca270
  ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
  AC_DEFINE_UNQUOTED($ac_tr_func) $2], $3)dnl
Packit 1ca270
done
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl AC_REPLACE_FUNCS(FUNCTION...)
Packit 1ca270
AC_DEFUN(AC_REPLACE_FUNCS,
Packit 1ca270
[AC_CHECK_FUNCS([$1], , [LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"])
Packit 1ca270
AC_SUBST(LIBOBJS)dnl
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Checking compiler characteristics
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_CHECK_SIZEOF(TYPE [, CROSS-SIZE])
Packit 1ca270
AC_DEFUN(AC_CHECK_SIZEOF,
Packit 1ca270
[changequote(<<, >>)dnl
Packit 1ca270
dnl The name to #define.
Packit 1ca270
define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
Packit 1ca270
dnl The cache variable name.
Packit 1ca270
define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
AC_MSG_CHECKING(size of $1)
Packit 1ca270
AC_CACHE_VAL(AC_CV_NAME,
Packit 1ca270
[AC_TRY_RUN([#include <stdio.h>
Packit Service bc2332
int main()
Packit 1ca270
{
Packit 1ca270
  FILE *f=fopen("conftestval", "w");
Packit Service bc2332
  if (!f) return(1);
Packit 1ca270
  fprintf(f, "%d\n", sizeof($1));
Packit Service bc2332
  return(0);
Packit 1ca270
}], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
Packit 1ca270
AC_MSG_RESULT($AC_CV_NAME)
Packit 1ca270
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
Packit 1ca270
undefine([AC_TYPE_NAME])dnl
Packit 1ca270
undefine([AC_CV_NAME])dnl
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Checking for typedefs
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_CHECK_TYPE(TYPE, DEFAULT)
Packit 1ca270
AC_DEFUN(AC_CHECK_TYPE,
Packit 1ca270
[AC_REQUIRE([AC_HEADER_STDC])dnl
Packit 1ca270
AC_MSG_CHECKING(for $1)
Packit 1ca270
AC_CACHE_VAL(ac_cv_type_$1,
Packit 1ca270
[AC_EGREP_CPP(dnl
Packit 1ca270
changequote(<<,>>)dnl
Packit 1ca270
<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
Packit 1ca270
changequote([,]), [#include <sys/types.h>
Packit 1ca270
#if STDC_HEADERS
Packit 1ca270
#include <stdlib.h>
Packit 1ca270
#include <stddef.h>
Packit 1ca270
#endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
Packit 1ca270
AC_MSG_RESULT($ac_cv_type_$1)
Packit 1ca270
if test $ac_cv_type_$1 = no; then
Packit 1ca270
  AC_DEFINE($1, $2)
Packit 1ca270
fi
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl ### Creating output files
Packit 1ca270
Packit 1ca270
Packit 1ca270
dnl AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
Packit 1ca270
AC_DEFUN(AC_CONFIG_HEADER,
Packit 1ca270
[define(AC_LIST_HEADER, $1)])
Packit 1ca270
Packit 1ca270
dnl Link each of the existing files SOURCE... to the corresponding
Packit 1ca270
dnl link name in DEST...
Packit 1ca270
dnl AC_LINK_FILES(SOURCE..., DEST...)
Packit 1ca270
AC_DEFUN(AC_LINK_FILES,
Packit 1ca270
[dnl
Packit 1ca270
define([AC_LIST_FILES], ifdef([AC_LIST_FILES], [AC_LIST_FILES ],)[$1])dnl
Packit 1ca270
define([AC_LIST_LINKS], ifdef([AC_LIST_LINKS], [AC_LIST_LINKS ],)[$2])])
Packit 1ca270
Packit 1ca270
dnl Add additional commands for AC_OUTPUT to put into config.status.
Packit 1ca270
dnl Use diversions instead of macros so we can be robust in the
Packit 1ca270
dnl presence of commas in $1 and/or $2.
Packit 1ca270
dnl AC_OUTPUT_COMMANDS(EXTRA-CMDS, INIT-CMDS)
Packit 1ca270
AC_DEFUN(AC_OUTPUT_COMMANDS,
Packit 1ca270
[AC_DIVERT_PUSH(AC_DIVERSION_CMDS)dnl
Packit 1ca270
[$1]
Packit 1ca270
AC_DIVERT_POP()dnl
Packit 1ca270
AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)dnl
Packit 1ca270
[$2]
Packit 1ca270
AC_DIVERT_POP()])
Packit 1ca270
Packit 1ca270
dnl AC_CONFIG_SUBDIRS(DIR ...)
Packit 1ca270
AC_DEFUN(AC_CONFIG_SUBDIRS,
Packit 1ca270
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
Packit 1ca270
define([AC_LIST_SUBDIRS], ifdef([AC_LIST_SUBDIRS], [AC_LIST_SUBDIRS ],)[$1])dnl
Packit 1ca270
subdirs="AC_LIST_SUBDIRS"
Packit 1ca270
AC_SUBST(subdirs)dnl
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl The big finish.
Packit 1ca270
dnl Produce config.status, config.h, and links; and configure subdirs.
Packit 1ca270
dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS])
Packit 1ca270
define(AC_OUTPUT,
Packit 1ca270
[trap '' 1 2 15
Packit 1ca270
AC_CACHE_SAVE
Packit 1ca270
trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Packit 1ca270
Packit 1ca270
test "x$prefix" = xNONE && prefix=$ac_default_prefix
Packit 1ca270
# Let make expand exec_prefix.
Packit 1ca270
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Packit 1ca270
Packit 1ca270
# Any assignment to VPATH causes Sun make to only execute
Packit 1ca270
# the first set of double-colon rules, so remove it if not needed.
Packit 1ca270
# If there is a colon in the path, we need to keep it.
Packit 1ca270
if test "x$srcdir" = x.; then
Packit 1ca270
changequote(, )dnl
Packit 1ca270
  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
fi
Packit 1ca270
Packit 1ca270
trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Packit 1ca270
Packit 1ca270
ifdef([AC_LIST_HEADER], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
Packit 1ca270
Packit 1ca270
# Without the "./", some shells look in PATH for config.status.
Packit 1ca270
: ${CONFIG_STATUS=./config.status}
Packit 1ca270
Packit 1ca270
echo creating $CONFIG_STATUS
Packit 1ca270
rm -f $CONFIG_STATUS
Packit 1ca270
cat > $CONFIG_STATUS <
Packit 1ca270
#! /bin/sh
Packit 1ca270
# Generated automatically by configure.
Packit 1ca270
# Run this file to recreate the current configuration.
Packit 1ca270
# This directory was configured as follows,
Packit 1ca270
dnl hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
Packit 1ca270
dnl so uname gets run too.
Packit 1ca270
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
Packit 1ca270
#
Packit 1ca270
[#] [$]0 [$]ac_configure_args
Packit 1ca270
#
Packit 1ca270
# Compiler output produced by configure, useful for debugging
Packit 1ca270
# configure, is in ./config.log if it exists.
Packit 1ca270
Packit 1ca270
changequote(, )dnl
Packit 1ca270
ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
for ac_option
Packit 1ca270
do
Packit 1ca270
  case "[\$]ac_option" in
Packit 1ca270
  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Packit 1ca270
    echo "running [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion"
Packit 1ca270
    exec [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion ;;
Packit 1ca270
  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Packit 1ca270
    echo "$CONFIG_STATUS generated by autoconf version AC_ACVERSION"
Packit 1ca270
    exit 0 ;;
Packit 1ca270
  -help | --help | --hel | --he | --h)
Packit 1ca270
    echo "[\$]ac_cs_usage"; exit 0 ;;
Packit 1ca270
  *) echo "[\$]ac_cs_usage"; exit 1 ;;
Packit 1ca270
  esac
Packit 1ca270
done
Packit 1ca270
Packit 1ca270
ac_given_srcdir=$srcdir
Packit 1ca270
ifdef([AC_PROVIDE_AC_PROG_INSTALL], [ac_given_INSTALL="$INSTALL"
Packit 1ca270
])dnl
Packit 1ca270
Packit 1ca270
changequote(<<, >>)dnl
Packit 1ca270
ifdef(<<AC_LIST_HEADER>>,
Packit 1ca270
<<trap 'rm -fr `echo "$1 AC_LIST_HEADER" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15>>,
Packit 1ca270
<<trap 'rm -fr `echo "$1" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15>>)
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
EOF
Packit 1ca270
cat >> $CONFIG_STATUS <
Packit 1ca270
Packit 1ca270
AC_OUTPUT_FILES($1)
Packit 1ca270
ifdef([AC_LIST_HEADER], [AC_OUTPUT_HEADER(AC_LIST_HEADER)])dnl
Packit 1ca270
ifdef([AC_LIST_LINKS], [AC_OUTPUT_LINKS(AC_LIST_FILES, AC_LIST_LINKS)])dnl
Packit 1ca270
EOF
Packit 1ca270
cat >> $CONFIG_STATUS <
Packit 1ca270
undivert(AC_DIVERSION_ICMDS)dnl
Packit 1ca270
$3
Packit 1ca270
EOF
Packit 1ca270
cat >> $CONFIG_STATUS <<\EOF
Packit 1ca270
undivert(AC_DIVERSION_CMDS)dnl
Packit 1ca270
$2
Packit 1ca270
exit 0
Packit 1ca270
EOF
Packit 1ca270
chmod +x $CONFIG_STATUS
Packit 1ca270
rm -fr confdefs* $ac_clean_files
Packit 1ca270
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Packit 1ca270
dnl config.status should not do recursion.
Packit 1ca270
ifdef([AC_LIST_SUBDIRS], [AC_OUTPUT_SUBDIRS(AC_LIST_SUBDIRS)])dnl
Packit 1ca270
])dnl
Packit 1ca270
Packit 1ca270
dnl Set the DEFS variable to the -D options determined earlier.
Packit 1ca270
dnl This is a subroutine of AC_OUTPUT.
Packit 1ca270
dnl It is called inside configure, outside of config.status.
Packit 1ca270
dnl AC_OUTPUT_MAKE_DEFS()
Packit 1ca270
define(AC_OUTPUT_MAKE_DEFS,
Packit 1ca270
[# Transform confdefs.h into DEFS.
Packit 1ca270
# Protect against shell expansion while executing Makefile rules.
Packit 1ca270
# Protect against Makefile macro expansion.
Packit Service 0433b5
#
Packit Service 0433b5
# If the first sed substitution is executed (which looks for macros that
Packit Service 0433b5
# take arguments), then we branch to the quote section.  Otherwise,
Packit Service 0433b5
# look for a macro that doesn't take arguments.
Packit Service 0433b5
cat >confdef2opt.sed <<\_ACEOF
Packit 1ca270
changequote(<<, >>)dnl
Packit Service 0433b5
t clear
Packit Service 0433b5
: clear
Packit Service 0433b5
s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	(][^ 	(]*([^)]*)\)[ 	]*\(.*\),-D\1=\2,g
Packit Service 0433b5
t quote
Packit Service 0433b5
s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\),-D\1=\2,g
Packit Service 0433b5
t quote
Packit Service 0433b5
d
Packit Service 0433b5
: quote
Packit Service 0433b5
s,[ 	`~#$^&*(){}\\|;'"<>?],\\&,g
Packit Service 0433b5
s,\[,\\&,g
Packit Service 0433b5
s,\],\\&,g
Packit Service 0433b5
s,\$,$$,g
Packit Service 0433b5
p
Packit 1ca270
changequote([, ])dnl
Packit Service 0433b5
_ACEOF
Packit Service 0433b5
# We use echo to avoid assuming a particular line-breaking character.
Packit Service 0433b5
# The extra dot is to prevent the shell from consuming trailing
Packit Service 0433b5
# line-breaks from the sub-command output.  A line-break within
Packit Service 0433b5
# single-quotes doesn't work because, if this script is created in a
Packit Service 0433b5
# platform that uses two characters for line-breaks (e.g., DOS), tr
Packit Service 0433b5
# would break.
Packit Service 0433b5
ac_LF_and_DOT=`echo; echo .`
Packit Service 0433b5
DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
Packit Service 0433b5
rm -f confdef2opt.sed
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl Do the variable substitutions to create the Makefiles or whatever.
Packit 1ca270
dnl This is a subroutine of AC_OUTPUT.  It is called inside an unquoted
Packit 1ca270
dnl here document whose contents are going into config.status, but
Packit 1ca270
dnl upon returning, the here document is being quoted.
Packit 1ca270
dnl AC_OUTPUT_FILES(FILE...)
Packit 1ca270
define(AC_OUTPUT_FILES,
Packit 1ca270
[# Protect against being on the right side of a sed subst in config.status.
Packit 1ca270
changequote(, )dnl
Packit 1ca270
sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/;;
Packit 1ca270
 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
dnl These here document variables are unquoted when configure runs
Packit 1ca270
dnl but quoted when config.status runs, so variables are expanded once.
Packit 1ca270
$ac_vpsub
Packit 1ca270
dnl Shell code in configure.in might set extrasub.
Packit 1ca270
$extrasub
Packit 1ca270
dnl Insert the sed substitutions of variables.
Packit 1ca270
undivert(AC_DIVERSION_SED)
Packit 1ca270
CEOF
Packit 1ca270
EOF
Packit 1ca270
Packit 1ca270
cat >> $CONFIG_STATUS <<\EOF
Packit 1ca270
Packit 1ca270
# Split the substitutions into bite-sized pieces for seds with
Packit 1ca270
# small command number limits, like on Digital OSF/1 and HP-UX.
Packit 1ca270
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
Packit 1ca270
ac_file=1 # Number of current file.
Packit 1ca270
ac_beg=1 # First line for current file.
Packit 1ca270
ac_end=$ac_max_sed_cmds # Line after last line for current file.
Packit 1ca270
ac_more_lines=:
Packit 1ca270
ac_sed_cmds=""
Packit 1ca270
while $ac_more_lines; do
Packit 1ca270
  if test $ac_beg -gt 1; then
Packit 1ca270
    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
Packit 1ca270
  else
Packit 1ca270
    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
Packit 1ca270
  fi
Packit 1ca270
  if test ! -s conftest.s$ac_file; then
Packit 1ca270
    ac_more_lines=false
Packit 1ca270
    rm -f conftest.s$ac_file
Packit 1ca270
  else
Packit 1ca270
    if test -z "$ac_sed_cmds"; then
Packit 1ca270
      ac_sed_cmds="sed -f conftest.s$ac_file"
Packit 1ca270
    else
Packit 1ca270
      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
Packit 1ca270
    fi
Packit 1ca270
    ac_file=`expr $ac_file + 1`
Packit 1ca270
    ac_beg=$ac_end
Packit 1ca270
    ac_end=`expr $ac_end + $ac_max_sed_cmds`
Packit 1ca270
  fi
Packit 1ca270
done
Packit 1ca270
if test -z "$ac_sed_cmds"; then
Packit 1ca270
  ac_sed_cmds=cat
Packit 1ca270
fi
Packit 1ca270
EOF
Packit 1ca270
Packit 1ca270
cat >> $CONFIG_STATUS <
Packit 1ca270
Packit 1ca270
CONFIG_FILES=\${CONFIG_FILES-"$1"}
Packit 1ca270
EOF
Packit 1ca270
cat >> $CONFIG_STATUS <<\EOF
Packit 1ca270
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Packit 1ca270
changequote(, )dnl
Packit 1ca270
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Packit 1ca270
  case "$ac_file" in
Packit 1ca270
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Packit 1ca270
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
Packit 1ca270
  *) ac_file_in="${ac_file}.in" ;;
Packit 1ca270
  esac
Packit 1ca270
Packit 1ca270
  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Packit 1ca270
Packit 1ca270
  # Remove last slash and all that follows it.  Not all systems have dirname.
Packit 1ca270
  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Packit 1ca270
    # The file is in a subdirectory.
Packit 1ca270
    test ! -d "$ac_dir" && mkdir "$ac_dir"
Packit 1ca270
    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Packit 1ca270
    # A "../" for each directory in $ac_dir_suffix.
Packit 1ca270
changequote(, )dnl
Packit 1ca270
    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
  else
Packit 1ca270
    ac_dir_suffix= ac_dots=
Packit 1ca270
  fi
Packit 1ca270
Packit 1ca270
  case "$ac_given_srcdir" in
Packit 1ca270
  .)  srcdir=.
Packit 1ca270
      if test -z "$ac_dots"; then top_srcdir=.
Packit 1ca270
      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
Packit 1ca270
  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
Packit 1ca270
  *) # Relative path.
Packit 1ca270
    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
Packit 1ca270
    top_srcdir="$ac_dots$ac_given_srcdir" ;;
Packit 1ca270
  esac
Packit 1ca270
Packit 1ca270
ifdef([AC_PROVIDE_AC_PROG_INSTALL],
Packit 1ca270
[  case "$ac_given_INSTALL" in
Packit 1ca270
changequote(, )dnl
Packit 1ca270
  [/$]*) INSTALL="$ac_given_INSTALL" ;;
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
Packit 1ca270
  esac
Packit 1ca270
])dnl
Packit 1ca270
Packit 1ca270
  echo creating "$ac_file"
Packit 1ca270
  rm -f "$ac_file"
Packit 1ca270
  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
Packit 1ca270
  case "$ac_file" in
Packit 1ca270
  *Makefile*) ac_comsub="1i\\
Packit 1ca270
# $configure_input" ;;
Packit 1ca270
  *) ac_comsub= ;;
Packit 1ca270
  esac
Packit 1ca270
Packit 1ca270
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
Packit 1ca270
  sed -e "$ac_comsub
Packit 1ca270
s%@configure_input@%$configure_input%g
Packit 1ca270
s%@srcdir@%$srcdir%g
Packit 1ca270
s%@top_srcdir@%$top_srcdir%g
Packit 1ca270
ifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%g
Packit 1ca270
])dnl
Packit 1ca270
dnl The parens around the eval prevent an "illegal io" in Ultrix sh.
Packit 1ca270
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Packit 1ca270
dnl This would break Makefile dependencies.
Packit 1ca270
dnl  if cmp -s $ac_file conftest.out 2>/dev/null; then
Packit 1ca270
dnl    echo "$ac_file is unchanged"
Packit 1ca270
dnl    rm -f conftest.out
Packit 1ca270
dnl   else
Packit 1ca270
dnl     rm -f $ac_file
Packit 1ca270
dnl    mv conftest.out $ac_file
Packit 1ca270
dnl  fi
Packit 1ca270
fi; done
Packit 1ca270
rm -f conftest.s*
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl Create the config.h files from the config.h.in files.
Packit 1ca270
dnl This is a subroutine of AC_OUTPUT.  It is called inside a quoted
Packit 1ca270
dnl here document whose contents are going into config.status.
Packit 1ca270
dnl AC_OUTPUT_HEADER(HEADER-FILE...)
Packit 1ca270
define(AC_OUTPUT_HEADER,
Packit 1ca270
[changequote(<<, >>)dnl
Packit 1ca270
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
Packit 1ca270
# NAME is the cpp macro being defined and VALUE is the value it is being given.
Packit 1ca270
#
Packit 1ca270
# ac_d sets the value in "#define NAME VALUE" lines.
Packit 1ca270
ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
Packit 1ca270
ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
Packit 1ca270
ac_dC='\3'
Packit 1ca270
ac_dD='%g'
Packit 1ca270
# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Packit 1ca270
ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
Packit 1ca270
ac_uB='\([ 	]\)%\1#\2define\3'
Packit 1ca270
ac_uC=' '
Packit 1ca270
ac_uD='\4%g'
Packit 1ca270
# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Packit 1ca270
ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
Packit 1ca270
ac_eB='<<$>>%\1#\2define\3'
Packit 1ca270
ac_eC=' '
Packit 1ca270
ac_eD='%g'
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
Packit 1ca270
if test "${CONFIG_HEADERS+set}" != set; then
Packit 1ca270
EOF
Packit 1ca270
dnl Support passing AC_CONFIG_HEADER a value containing shell variables.
Packit 1ca270
cat >> $CONFIG_STATUS <
Packit 1ca270
  CONFIG_HEADERS="$1"
Packit 1ca270
EOF
Packit 1ca270
cat >> $CONFIG_STATUS <<\EOF
Packit 1ca270
fi
Packit 1ca270
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Packit 1ca270
changequote(, )dnl
Packit 1ca270
  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Packit 1ca270
  case "$ac_file" in
Packit 1ca270
  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Packit 1ca270
       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
Packit 1ca270
  *) ac_file_in="${ac_file}.in" ;;
Packit 1ca270
  esac
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
Packit 1ca270
  echo creating $ac_file
Packit 1ca270
Packit 1ca270
  rm -f conftest.frag conftest.in conftest.out
Packit 1ca270
  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
Packit 1ca270
  cat $ac_file_inputs > conftest.in
Packit 1ca270
Packit 1ca270
EOF
Packit 1ca270
Packit 1ca270
# Transform confdefs.h into a sed script conftest.vals that substitutes
Packit 1ca270
# the proper values into config.h.in to produce config.h.  And first:
Packit 1ca270
# Protect against being on the right side of a sed subst in config.status.
Packit 1ca270
# Protect against being in an unquoted here document in config.status.
Packit 1ca270
rm -f conftest.vals
Packit 1ca270
dnl Using a here document instead of a string reduces the quoting nightmare.
Packit 1ca270
dnl Putting comments in sed scripts is not portable.
Packit 1ca270
cat > conftest.hdr <<\EOF
Packit 1ca270
changequote(<<, >>)dnl
Packit 1ca270
s/[\\&%]/\\&/g
Packit 1ca270
s%[\\$`]%\\&%g
Packit 1ca270
s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
Packit 1ca270
s%ac_d%ac_u%gp
Packit 1ca270
s%ac_u%ac_e%gp
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
EOF
Packit 1ca270
sed -n -f conftest.hdr confdefs.h > conftest.vals
Packit 1ca270
rm -f conftest.hdr
Packit 1ca270
Packit 1ca270
# This sed command replaces #undef with comments.  This is necessary, for
Packit 1ca270
# example, in the case of _POSIX_SOURCE, which is predefined and required
Packit 1ca270
# on some systems where configure will not decide to define it.
Packit 1ca270
cat >> conftest.vals <<\EOF
Packit 1ca270
changequote(, )dnl
Packit 1ca270
s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
EOF
Packit 1ca270
Packit 1ca270
# Break up conftest.vals because some shells have a limit on
Packit 1ca270
# the size of here documents, and old seds have small limits too.
Packit 1ca270
Packit 1ca270
rm -f conftest.tail
Packit 1ca270
while :
Packit 1ca270
do
Packit 1ca270
  ac_lines=`grep -c . conftest.vals`
Packit 1ca270
  # grep -c gives empty output for an empty file on some AIX systems.
Packit 1ca270
  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
Packit 1ca270
  # Write a limited-size here document to conftest.frag.
Packit 1ca270
  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
Packit 1ca270
  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
Packit 1ca270
  echo 'CEOF
Packit 1ca270
  sed -f conftest.frag conftest.in > conftest.out
Packit 1ca270
  rm -f conftest.in
Packit 1ca270
  mv conftest.out conftest.in
Packit 1ca270
' >> $CONFIG_STATUS
Packit 1ca270
  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
Packit 1ca270
  rm -f conftest.vals
Packit 1ca270
  mv conftest.tail conftest.vals
Packit 1ca270
done
Packit 1ca270
rm -f conftest.vals
Packit 1ca270
Packit 1ca270
dnl Now back to your regularly scheduled config.status.
Packit 1ca270
cat >> $CONFIG_STATUS <<\EOF
Packit 1ca270
  rm -f conftest.frag conftest.h
Packit 1ca270
  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
Packit 1ca270
  cat conftest.in >> conftest.h
Packit 1ca270
  rm -f conftest.in
Packit 1ca270
  if cmp -s $ac_file conftest.h 2>/dev/null; then
Packit 1ca270
    echo "$ac_file is unchanged"
Packit 1ca270
    rm -f conftest.h
Packit 1ca270
  else
Packit 1ca270
    # Remove last slash and all that follows it.  Not all systems have dirname.
Packit 1ca270
  changequote(, )dnl
Packit 1ca270
    ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Packit 1ca270
  changequote([, ])dnl
Packit 1ca270
    if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Packit 1ca270
      # The file is in a subdirectory.
Packit 1ca270
      test ! -d "$ac_dir" && mkdir "$ac_dir"
Packit 1ca270
    fi
Packit 1ca270
    rm -f $ac_file
Packit 1ca270
    mv conftest.h $ac_file
Packit 1ca270
  fi
Packit 1ca270
fi; done
Packit 1ca270
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl This is a subroutine of AC_OUTPUT.  It is called inside a quoted
Packit 1ca270
dnl here document whose contents are going into config.status.
Packit 1ca270
dnl AC_OUTPUT_LINKS(SOURCE..., DEST...)
Packit 1ca270
define(AC_OUTPUT_LINKS,
Packit 1ca270
[EOF
Packit 1ca270
Packit 1ca270
cat >> $CONFIG_STATUS <
Packit 1ca270
ac_sources="$1"
Packit 1ca270
ac_dests="$2"
Packit 1ca270
EOF
Packit 1ca270
Packit 1ca270
cat >> $CONFIG_STATUS <<\EOF
Packit 1ca270
srcdir=$ac_given_srcdir
Packit 1ca270
while test -n "$ac_sources"; do
Packit 1ca270
  set $ac_dests; ac_dest=[$]1; shift; ac_dests=[$]*
Packit 1ca270
  set $ac_sources; ac_source=[$]1; shift; ac_sources=[$]*
Packit 1ca270
Packit 1ca270
  echo "linking $srcdir/$ac_source to $ac_dest"
Packit 1ca270
Packit 1ca270
  if test ! -r $srcdir/$ac_source; then
Packit 1ca270
    AC_MSG_ERROR($srcdir/$ac_source: File not found)
Packit 1ca270
  fi
Packit 1ca270
  rm -f $ac_dest
Packit 1ca270
Packit 1ca270
  # Make relative symlinks.
Packit 1ca270
  # Remove last slash and all that follows it.  Not all systems have dirname.
Packit 1ca270
changequote(, )dnl
Packit 1ca270
  ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
  if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
Packit 1ca270
    # The dest file is in a subdirectory.
Packit 1ca270
    test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
Packit 1ca270
    ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
Packit 1ca270
    # A "../" for each directory in $ac_dest_dir_suffix.
Packit 1ca270
changequote(, )dnl
Packit 1ca270
    ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
  else
Packit 1ca270
    ac_dest_dir_suffix= ac_dots=
Packit 1ca270
  fi
Packit 1ca270
Packit 1ca270
  case "$srcdir" in
Packit 1ca270
changequote(, )dnl
Packit 1ca270
  [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
  *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
Packit 1ca270
  esac
Packit 1ca270
Packit 1ca270
  # Make a symlink if possible; otherwise try a hard link.
Packit 1ca270
  if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
Packit 1ca270
    ln $srcdir/$ac_source $ac_dest; then :
Packit 1ca270
  else
Packit 1ca270
    AC_MSG_ERROR(can not link $ac_dest to $srcdir/$ac_source)
Packit 1ca270
  fi
Packit 1ca270
done
Packit 1ca270
])
Packit 1ca270
Packit 1ca270
dnl This is a subroutine of AC_OUTPUT.
Packit 1ca270
dnl It is called after running config.status.
Packit 1ca270
dnl AC_OUTPUT_SUBDIRS(DIRECTORY...)
Packit 1ca270
define(AC_OUTPUT_SUBDIRS,
Packit 1ca270
[
Packit 1ca270
if test "$no_recursion" != yes; then
Packit 1ca270
Packit 1ca270
  # Remove --cache-file and --srcdir arguments so they do not pile up.
Packit 1ca270
  ac_sub_configure_args=
Packit 1ca270
  ac_prev=
Packit 1ca270
  for ac_arg in $ac_configure_args; do
Packit 1ca270
    if test -n "$ac_prev"; then
Packit 1ca270
      ac_prev=
Packit 1ca270
      continue
Packit 1ca270
    fi
Packit 1ca270
    case "$ac_arg" in
Packit 1ca270
    -cache-file | --cache-file | --cache-fil | --cache-fi \
Packit 1ca270
    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
Packit 1ca270
      ac_prev=cache_file ;;
Packit 1ca270
    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
Packit 1ca270
    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Packit 1ca270
      ;;
Packit 1ca270
    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
Packit 1ca270
      ac_prev=srcdir ;;
Packit 1ca270
    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Packit 1ca270
      ;;
Packit 1ca270
    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
Packit 1ca270
    esac
Packit 1ca270
  done
Packit 1ca270
Packit 1ca270
  for ac_config_dir in $1; do
Packit 1ca270
Packit 1ca270
    # Do not complain, so a configure script can configure whichever
Packit 1ca270
    # parts of a large source tree are present.
Packit 1ca270
    if test ! -d $srcdir/$ac_config_dir; then
Packit 1ca270
      continue
Packit 1ca270
    fi
Packit 1ca270
Packit 1ca270
    echo configuring in $ac_config_dir
Packit 1ca270
Packit 1ca270
    case "$srcdir" in
Packit 1ca270
    .) ;;
Packit 1ca270
    *)
Packit 1ca270
      if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
Packit 1ca270
      else
Packit 1ca270
        AC_MSG_ERROR(can not create `pwd`/$ac_config_dir)
Packit 1ca270
      fi
Packit 1ca270
      ;;
Packit 1ca270
    esac
Packit 1ca270
Packit 1ca270
    ac_popdir=`pwd`
Packit 1ca270
    cd $ac_config_dir
Packit 1ca270
Packit 1ca270
changequote(, )dnl
Packit 1ca270
      # A "../" for each directory in /$ac_config_dir.
Packit 1ca270
      ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
Packit 1ca270
    case "$srcdir" in
Packit 1ca270
    .) # No --srcdir option.  We are building in place.
Packit 1ca270
      ac_sub_srcdir=$srcdir ;;
Packit 1ca270
    /*) # Absolute path.
Packit 1ca270
      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
Packit 1ca270
    *) # Relative path.
Packit 1ca270
      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
Packit 1ca270
    esac
Packit 1ca270
Packit 1ca270
    # Check for guested configure; otherwise get Cygnus style configure.
Packit 1ca270
    if test -f $ac_sub_srcdir/configure; then
Packit 1ca270
      ac_sub_configure=$ac_sub_srcdir/configure
Packit 1ca270
    elif test -f $ac_sub_srcdir/configure.in; then
Packit 1ca270
      ac_sub_configure=$ac_configure
Packit 1ca270
    else
Packit 1ca270
      AC_MSG_WARN(no configuration information is in $ac_config_dir)
Packit 1ca270
      ac_sub_configure=
Packit 1ca270
    fi
Packit 1ca270
Packit 1ca270
    # The recursion is here.
Packit 1ca270
    if test -n "$ac_sub_configure"; then
Packit 1ca270
Packit 1ca270
      # Make the cache file name correct relative to the subdirectory.
Packit 1ca270
      case "$cache_file" in
Packit 1ca270
      /*) ac_sub_cache_file=$cache_file ;;
Packit 1ca270
      *) # Relative path.
Packit 1ca270
        ac_sub_cache_file="$ac_dots$cache_file" ;;
Packit 1ca270
      esac
Packit 1ca270
ifdef([AC_PROVIDE_AC_PROG_INSTALL],
Packit 1ca270
      [  case "$ac_given_INSTALL" in
Packit 1ca270
changequote(, )dnl
Packit 1ca270
        [/$]*) INSTALL="$ac_given_INSTALL" ;;
Packit 1ca270
changequote([, ])dnl
Packit 1ca270
        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
Packit 1ca270
        esac
Packit 1ca270
])dnl
Packit 1ca270
Packit 1ca270
      echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
Packit 1ca270
      # The eval makes quoting arguments work.
Packit 1ca270
      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
Packit 1ca270
      then :
Packit 1ca270
      else
Packit 1ca270
        AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir)
Packit 1ca270
      fi
Packit 1ca270
    fi
Packit 1ca270
Packit 1ca270
    cd $ac_popdir
Packit 1ca270
  done
Packit 1ca270
fi
Packit 1ca270
])