# PaCkAgE DaTaStReAm
autoconf 1 6596
# end of header
07070100067977000081a400000000000000000000000153b5000600000107000000b500010002ffffffffffffffff0000001100000000autoconf/pkginfo PKG=autoconf
NAME=GNU autoconf 2.69 i86pc Solaris 10
VERSION=2.69
PSTAMP=3rd July 2014
VENDOR=GNU
EMAIL=http://www.gnu.org/software/autoconf/
DESC=GNU autoconf m4 macro creator
ARCH=i386
CATEGORY=utility
CLASSES=none
BASEDIR=/
ISTATES=S s 1 2 3
RSTATES=S s 1 2 3
07070100067976000081a400000000000000000000000153b5000600001773000000b500010002ffffffffffffffff0000001000000000autoconf/pkgmap : 1 6596
1 d none /usr/local/bin 0755 root root
1 f none /usr/local/bin/autoconf 0755 root root 14774 43502 1404370882
1 f none /usr/local/bin/autoheader 0755 root root 8566 24453 1404370882
1 f none /usr/local/bin/autom4te 0755 root root 32219 17065 1404370882
1 f none /usr/local/bin/autoreconf 0755 root root 21110 5765 1404370882
1 f none /usr/local/bin/autoscan 0755 root root 17161 2286 1404370882
1 f none /usr/local/bin/autoupdate 0755 root root 33916 15309 1404370882
1 f none /usr/local/bin/ifnames 0755 root root 4154 7079 1404370882
1 d none /usr/local/share 0755 root root
1 d none /usr/local/share/autoconf 0755 root root
1 d none /usr/local/share/autoconf/Autom4te 0755 root root
1 f none /usr/local/share/autoconf/Autom4te/C4che.pm 0644 root root 4913 63875 1404370882
1 f none /usr/local/share/autoconf/Autom4te/ChannelDefs.pm 0644 root root 9174 24018 1404370882
1 f none /usr/local/share/autoconf/Autom4te/Channels.pm 0644 root root 20955 34057 1404370882
1 f none /usr/local/share/autoconf/Autom4te/Configure_ac.pm 0644 root root 3359 13210 1404370882
1 f none /usr/local/share/autoconf/Autom4te/FileUtils.pm 0644 root root 10095 3797 1404370882
1 f none /usr/local/share/autoconf/Autom4te/General.pm 0644 root root 8984 50139 1404370882
1 f none /usr/local/share/autoconf/Autom4te/Getopt.pm 0644 root root 2774 29340 1404370882
1 f none /usr/local/share/autoconf/Autom4te/Request.pm 0644 root root 2550 10502 1404370882
1 f none /usr/local/share/autoconf/Autom4te/XFile.pm 0644 root root 7775 27964 1404370882
1 f none /usr/local/share/autoconf/INSTALL 0644 root root 15749 2718 1404370882
1 d none /usr/local/share/autoconf/autoconf 0755 root root
1 f none /usr/local/share/autoconf/autoconf/autoconf.m4 0644 root root 3698 63425 1404370882
1 f none /usr/local/share/autoconf/autoconf/autoconf.m4f 0644 root root 485095 44745 1404370882
1 f none /usr/local/share/autoconf/autoconf/autoheader.m4 0644 root root 2741 21676 1404370882
1 f none /usr/local/share/autoconf/autoconf/autoscan.m4 0644 root root 2024 30126 1404370882
1 f none /usr/local/share/autoconf/autoconf/autotest.m4 0644 root root 2904 43197 1404370882
1 f none /usr/local/share/autoconf/autoconf/autoupdate.m4 0644 root root 4319 29093 1404370882
1 f none /usr/local/share/autoconf/autoconf/c.m4 0644 root root 60976 7043 1404370882
1 f none /usr/local/share/autoconf/autoconf/erlang.m4 0644 root root 9912 31266 1404370882
1 f none /usr/local/share/autoconf/autoconf/fortran.m4 0644 root root 65183 25955 1404370882
1 f none /usr/local/share/autoconf/autoconf/functions.m4 0644 root root 63592 14703 1404370882
1 f none /usr/local/share/autoconf/autoconf/general.m4 0644 root root 102370 37994 1404370882
1 f none /usr/local/share/autoconf/autoconf/go.m4 0644 root root 4637 18512 1404370882
1 f none /usr/local/share/autoconf/autoconf/headers.m4 0644 root root 30513 56294 1404370882
1 f none /usr/local/share/autoconf/autoconf/lang.m4 0644 root root 23852 52027 1404370882
1 f none /usr/local/share/autoconf/autoconf/libs.m4 0644 root root 16224 44158 1404370882
1 f none /usr/local/share/autoconf/autoconf/oldnames.m4 0644 root root 3871 29337 1404370882
1 f none /usr/local/share/autoconf/autoconf/programs.m4 0644 root root 29627 53441 1404370882
1 f none /usr/local/share/autoconf/autoconf/specific.m4 0644 root root 14376 10128 1404370882
1 f none /usr/local/share/autoconf/autoconf/status.m4 0644 root root 55776 40049 1404370882
1 f none /usr/local/share/autoconf/autoconf/types.m4 0644 root root 36190 8489 1404370882
1 f none /usr/local/share/autoconf/autom4te.cfg 0644 root root 4821 60087 1404370882
1 d none /usr/local/share/autoconf/autoscan 0755 root root
1 f none /usr/local/share/autoconf/autoscan/autoscan.list 0644 root root 9637 63697 1404370882
1 d none /usr/local/share/autoconf/autotest 0755 root root
1 f none /usr/local/share/autoconf/autotest/autotest.m4 0644 root root 1213 38324 1404370882
1 f none /usr/local/share/autoconf/autotest/autotest.m4f 0644 root root 129557 60013 1404370882
1 f none /usr/local/share/autoconf/autotest/general.m4 0644 root root 73617 1337 1404370882
1 f none /usr/local/share/autoconf/autotest/specific.m4 0644 root root 3042 48234 1404370882
1 d none /usr/local/share/autoconf/m4sugar 0755 root root
1 f none /usr/local/share/autoconf/m4sugar/foreach.m4 0644 root root 14754 48286 1404370882
1 f none /usr/local/share/autoconf/m4sugar/m4sh.m4 0644 root root 75554 60821 1404370882
1 f none /usr/local/share/autoconf/m4sugar/m4sh.m4f 0644 root root 71886 44514 1404370882
1 f none /usr/local/share/autoconf/m4sugar/m4sugar.m4 0644 root root 121864 50080 1404370882
1 f none /usr/local/share/autoconf/m4sugar/m4sugar.m4f 0644 root root 30636 54121 1404370882
1 f none /usr/local/share/autoconf/m4sugar/version.m4 0644 root root 523 39912 1404370882
1 d none /usr/local/share/info 0755 root root
1 f none /usr/local/share/info/autoconf.info 0644 root root 1142045 43868 1404370883
1 f none /usr/local/share/info/dir 0644 root root 18709 18217 1404370883
1 f none /usr/local/share/info/standards.info 0644 root root 227199 30231 1404370883
1 d none /usr/local/share/man 0755 root root
1 d none /usr/local/share/man/man1 0755 root root
1 f none /usr/local/share/man/man1/autoconf.1 0644 root root 2900 48987 1404370883
1 f none /usr/local/share/man/man1/autoheader.1 0644 root root 2648 28732 1404370883
1 f none /usr/local/share/man/man1/autom4te.1 0644 root root 4635 64 1404370883
1 f none /usr/local/share/man/man1/autoreconf.1 0644 root root 3535 41064 1404370883
1 f none /usr/local/share/man/man1/autoscan.1 0644 root root 2032 40815 1404370883
1 f none /usr/local/share/man/man1/autoupdate.1 0644 root root 2021 38289 1404370883
1 f none /usr/local/share/man/man1/config.guess.1 0644 root root 2083 38306 1404370883
1 f none /usr/local/share/man/man1/config.sub.1 0644 root root 1230 28853 1404370883
1 f none /usr/local/share/man/man1/ifnames.1 0644 root root 1762 16178 1404370883
1 i checkinstall 790 2504 1404370950
1 i pkginfo 263 20292 1404370950
07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000b00000000TRAILER!!! 07070100067977000081a400000000000000000000000153b5000600000107000000b500010002ffffffffffffffff0000000800000000pkginfo PKG=autoconf
NAME=GNU autoconf 2.69 i86pc Solaris 10
VERSION=2.69
PSTAMP=3rd July 2014
VENDOR=GNU
EMAIL=http://www.gnu.org/software/autoconf/
DESC=GNU autoconf m4 macro creator
ARCH=i386
CATEGORY=utility
CLASSES=none
BASEDIR=/
ISTATES=S s 1 2 3
RSTATES=S s 1 2 3
07070100067976000081a400000000000000000000000153b5000600001773000000b500010002ffffffffffffffff0000000700000000pkgmap : 1 6596
1 d none /usr/local/bin 0755 root root
1 f none /usr/local/bin/autoconf 0755 root root 14774 43502 1404370882
1 f none /usr/local/bin/autoheader 0755 root root 8566 24453 1404370882
1 f none /usr/local/bin/autom4te 0755 root root 32219 17065 1404370882
1 f none /usr/local/bin/autoreconf 0755 root root 21110 5765 1404370882
1 f none /usr/local/bin/autoscan 0755 root root 17161 2286 1404370882
1 f none /usr/local/bin/autoupdate 0755 root root 33916 15309 1404370882
1 f none /usr/local/bin/ifnames 0755 root root 4154 7079 1404370882
1 d none /usr/local/share 0755 root root
1 d none /usr/local/share/autoconf 0755 root root
1 d none /usr/local/share/autoconf/Autom4te 0755 root root
1 f none /usr/local/share/autoconf/Autom4te/C4che.pm 0644 root root 4913 63875 1404370882
1 f none /usr/local/share/autoconf/Autom4te/ChannelDefs.pm 0644 root root 9174 24018 1404370882
1 f none /usr/local/share/autoconf/Autom4te/Channels.pm 0644 root root 20955 34057 1404370882
1 f none /usr/local/share/autoconf/Autom4te/Configure_ac.pm 0644 root root 3359 13210 1404370882
1 f none /usr/local/share/autoconf/Autom4te/FileUtils.pm 0644 root root 10095 3797 1404370882
1 f none /usr/local/share/autoconf/Autom4te/General.pm 0644 root root 8984 50139 1404370882
1 f none /usr/local/share/autoconf/Autom4te/Getopt.pm 0644 root root 2774 29340 1404370882
1 f none /usr/local/share/autoconf/Autom4te/Request.pm 0644 root root 2550 10502 1404370882
1 f none /usr/local/share/autoconf/Autom4te/XFile.pm 0644 root root 7775 27964 1404370882
1 f none /usr/local/share/autoconf/INSTALL 0644 root root 15749 2718 1404370882
1 d none /usr/local/share/autoconf/autoconf 0755 root root
1 f none /usr/local/share/autoconf/autoconf/autoconf.m4 0644 root root 3698 63425 1404370882
1 f none /usr/local/share/autoconf/autoconf/autoconf.m4f 0644 root root 485095 44745 1404370882
1 f none /usr/local/share/autoconf/autoconf/autoheader.m4 0644 root root 2741 21676 1404370882
1 f none /usr/local/share/autoconf/autoconf/autoscan.m4 0644 root root 2024 30126 1404370882
1 f none /usr/local/share/autoconf/autoconf/autotest.m4 0644 root root 2904 43197 1404370882
1 f none /usr/local/share/autoconf/autoconf/autoupdate.m4 0644 root root 4319 29093 1404370882
1 f none /usr/local/share/autoconf/autoconf/c.m4 0644 root root 60976 7043 1404370882
1 f none /usr/local/share/autoconf/autoconf/erlang.m4 0644 root root 9912 31266 1404370882
1 f none /usr/local/share/autoconf/autoconf/fortran.m4 0644 root root 65183 25955 1404370882
1 f none /usr/local/share/autoconf/autoconf/functions.m4 0644 root root 63592 14703 1404370882
1 f none /usr/local/share/autoconf/autoconf/general.m4 0644 root root 102370 37994 1404370882
1 f none /usr/local/share/autoconf/autoconf/go.m4 0644 root root 4637 18512 1404370882
1 f none /usr/local/share/autoconf/autoconf/headers.m4 0644 root root 30513 56294 1404370882
1 f none /usr/local/share/autoconf/autoconf/lang.m4 0644 root root 23852 52027 1404370882
1 f none /usr/local/share/autoconf/autoconf/libs.m4 0644 root root 16224 44158 1404370882
1 f none /usr/local/share/autoconf/autoconf/oldnames.m4 0644 root root 3871 29337 1404370882
1 f none /usr/local/share/autoconf/autoconf/programs.m4 0644 root root 29627 53441 1404370882
1 f none /usr/local/share/autoconf/autoconf/specific.m4 0644 root root 14376 10128 1404370882
1 f none /usr/local/share/autoconf/autoconf/status.m4 0644 root root 55776 40049 1404370882
1 f none /usr/local/share/autoconf/autoconf/types.m4 0644 root root 36190 8489 1404370882
1 f none /usr/local/share/autoconf/autom4te.cfg 0644 root root 4821 60087 1404370882
1 d none /usr/local/share/autoconf/autoscan 0755 root root
1 f none /usr/local/share/autoconf/autoscan/autoscan.list 0644 root root 9637 63697 1404370882
1 d none /usr/local/share/autoconf/autotest 0755 root root
1 f none /usr/local/share/autoconf/autotest/autotest.m4 0644 root root 1213 38324 1404370882
1 f none /usr/local/share/autoconf/autotest/autotest.m4f 0644 root root 129557 60013 1404370882
1 f none /usr/local/share/autoconf/autotest/general.m4 0644 root root 73617 1337 1404370882
1 f none /usr/local/share/autoconf/autotest/specific.m4 0644 root root 3042 48234 1404370882
1 d none /usr/local/share/autoconf/m4sugar 0755 root root
1 f none /usr/local/share/autoconf/m4sugar/foreach.m4 0644 root root 14754 48286 1404370882
1 f none /usr/local/share/autoconf/m4sugar/m4sh.m4 0644 root root 75554 60821 1404370882
1 f none /usr/local/share/autoconf/m4sugar/m4sh.m4f 0644 root root 71886 44514 1404370882
1 f none /usr/local/share/autoconf/m4sugar/m4sugar.m4 0644 root root 121864 50080 1404370882
1 f none /usr/local/share/autoconf/m4sugar/m4sugar.m4f 0644 root root 30636 54121 1404370882
1 f none /usr/local/share/autoconf/m4sugar/version.m4 0644 root root 523 39912 1404370882
1 d none /usr/local/share/info 0755 root root
1 f none /usr/local/share/info/autoconf.info 0644 root root 1142045 43868 1404370883
1 f none /usr/local/share/info/dir 0644 root root 18709 18217 1404370883
1 f none /usr/local/share/info/standards.info 0644 root root 227199 30231 1404370883
1 d none /usr/local/share/man 0755 root root
1 d none /usr/local/share/man/man1 0755 root root
1 f none /usr/local/share/man/man1/autoconf.1 0644 root root 2900 48987 1404370883
1 f none /usr/local/share/man/man1/autoheader.1 0644 root root 2648 28732 1404370883
1 f none /usr/local/share/man/man1/autom4te.1 0644 root root 4635 64 1404370883
1 f none /usr/local/share/man/man1/autoreconf.1 0644 root root 3535 41064 1404370883
1 f none /usr/local/share/man/man1/autoscan.1 0644 root root 2032 40815 1404370883
1 f none /usr/local/share/man/man1/autoupdate.1 0644 root root 2021 38289 1404370883
1 f none /usr/local/share/man/man1/config.guess.1 0644 root root 2083 38306 1404370883
1 f none /usr/local/share/man/man1/config.sub.1 0644 root root 1230 28853 1404370883
1 f none /usr/local/share/man/man1/ifnames.1 0644 root root 1762 16178 1404370883
1 i checkinstall 790 2504 1404370950
1 i pkginfo 263 20292 1404370950
070701000679c3000041ed00000000000000000000000253b5000600000000000000b500010002ffffffffffffffff0000000800000000install 070701000679c4000081ed00000000000000000000000153b5000600000316000000b500010002ffffffffffffffff0000001500000000install/checkinstall #!/bin/sh
#
expected_bits="64"
expected_release="5.10"
expected_platform="i386"
#
release=`uname -r`
platform=`uname -p`
bits=`isainfo -b`
#
if [ ${platform} != ${expected_platform} ]; then
echo "\n\n\n\tThis package must be installed on a ${expected_platform} architecture\n"
echo "\tAborting installation.\n\n\n"
exit 1
fi
if [ ${release} != ${expected_release} ]; then
echo "\n\n\n\tThis package must be installed on a ${expected_release} machine\n"
echo "\tAborting installation.\n\n\n"
exit 1
fi
#if [ ${bits} != ${expected_bits} ]; then
# echo "\n\n\n\tThis package must be installed on a ${expected_bits} bit machine\n"
# echo "\tYour machine is running a ${bits} bit O.S. currently\n"
# echo "\tAborting installation.\n\n\n"
# exit 1
#fi
exit 0
07070100067978000041ed00000000000000000000000353b5000600000000000000b500010002ffffffffffffffff0000000500000000root 07070100067979000041ed00000000000000000000000353b5000600000000000000b500010002ffffffffffffffff0000000900000000root/usr 0707010006797a000041ed00000000000000000000000453b5000600000000000000b500010002ffffffffffffffff0000000f00000000root/usr/local 07070100067983000041ed00000000000000000000000553b5000600000000000000b500010002ffffffffffffffff0000001500000000root/usr/local/share 07070100067984000041ed00000000000000000000000753b5000600000000000000b500010002ffffffffffffffff0000001e00000000root/usr/local/share/autoconf 070701000679a5000081a400000000000000000000000153b4ffc2000012d5000000b500010002ffffffffffffffff0000002b00000000root/usr/local/share/autoconf/autom4te.cfg # Definition of Autom4te option sets. -*- Makefile -*-
#
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
## -------------------------- ##
## Autoheader preselections. ##
## -------------------------- ##
begin-language: "Autoheader-preselections"
args: --preselect AC_CONFIG_HEADERS
args: --preselect AH_OUTPUT
args: --preselect AC_DEFINE_TRACE_LITERAL
end-language: "Autoheader-preselections"
## ------------------------ ##
## Automake-preselections. ##
## ------------------------ ##
begin-language: "Automake-preselections"
args: --preselect AC_CANONICAL_BUILD
args: --preselect AC_CANONICAL_HOST
# AC_CANONICAL_SYSTEM was traced from Automake 1.7 to Automake 1.9.
# Later versions trace AC_CANONICAL_TARGET instead.
args: --preselect AC_CANONICAL_SYSTEM
args: --preselect AC_CANONICAL_TARGET
args: --preselect AC_CONFIG_AUX_DIR
args: --preselect AC_CONFIG_FILES
args: --preselect AC_CONFIG_HEADERS
args: --preselect AC_CONFIG_LIBOBJ_DIR
args: --preselect AC_CONFIG_LINKS
args: --preselect AC_FC_FREEFORM
args: --preselect AC_FC_SRCEXT
args: --preselect AC_FC_PP_DEFINE
args: --preselect AC_FC_PP_SRCEXT
args: --preselect AC_INIT
args: --preselect AC_LIBSOURCE
args: --preselect AC_REQUIRE_AUX_FILE
# Automake < 1.10 traces AC_SUBST. Automake >= 1.10 traces AC_SUBST_TRACE.
args: --preselect AC_SUBST
args: --preselect AC_SUBST_TRACE
args: --preselect AM_AUTOMAKE_VERSION
args: --preselect AM_CONDITIONAL
args: --preselect AM_ENABLE_MULTILIB
args: --preselect AM_GNU_GETTEXT
args: --preselect AM_GNU_GETTEXT_INTL_SUBDIR
args: --preselect AM_INIT_AUTOMAKE
args: --preselect AM_MAKEFILE_INCLUDE
args: --preselect AM_MAINTAINER_MODE
args: --preselect AM_NLS
args: --preselect AM_POT_TOOLS
args: --preselect AM_PATH_GUILE
args: --preselect AM_PROG_AR
args: --preselect AM_PROG_CC_C_O
args: --preselect AM_PROG_CXX_C_O
args: --preselect AM_PROG_F77_C_O
args: --preselect AM_PROG_FC_C_O
args: --preselect AM_PROG_MOC
args: --preselect AM_SILENT_RULES
args: --preselect AM_XGETTEXT_OPTION
args: --preselect _AM_MAKEFILE_INCLUDE
args: --preselect _AM_SUBST_NOTMAKE
args: --preselect _AM_COND_IF
args: --preselect _AM_COND_ELSE
args: --preselect _AM_COND_ENDIF
args: --preselect LT_SUPPORTED_TAG
args: --preselect _LT_AC_TAGCONFIG
args: --preselect m4_include
args: --preselect m4_sinclude
end-language: "Automake-preselections"
## -------------------------- ##
## Autoreconf-preselections. ##
## -------------------------- ##
begin-language: "Autoreconf-preselections"
args: --preselect AC_CONFIG_AUX_DIR
args: --preselect AC_CONFIG_HEADERS
args: --preselect AC_CONFIG_SUBDIRS
args: --preselect AC_INIT
args: --preselect AC_PROG_LIBTOOL
args: --preselect LT_INIT
args: --preselect LT_CONFIG_LTDL_DIR
args: --preselect AM_GNU_GETTEXT
end-language: "Autoreconf-preselections"
## ----------------------------- ##
## Autoconf without aclocal.m4. ##
## ----------------------------- ##
# This intermediate language is used by aclocal to build aclocal.m4.
begin-language: "Autoconf-without-aclocal-m4"
args: --prepend-include '/usr/local/share/autoconf'
args: --cache=autom4te.cache
args: autoconf/autoconf.m4f
args: acsite.m4?
args: --mode 777
args: --language M4sh
end-language: "Autoconf-without-aclocal-m4"
## ---------- ##
## Autoconf. ##
## ---------- ##
begin-language: "Autoconf"
args: --language Autoheader-preselections
args: --language Automake-preselections
args: --language Autoreconf-preselections
args: --language Autoconf-without-aclocal-m4
args: aclocal.m4?
end-language: "Autoconf"
## -------- ##
## Autotest ##
## -------- ##
begin-language: "Autotest"
args: --prepend-include '/usr/local/share/autoconf'
args: autotest/autotest.m4f
args: package.m4?
args: local.at?
args: --mode 777
args: --language M4sh
end-language: "Autotest"
## ---- ##
## M4sh ##
## ---- ##
begin-language: "M4sh"
args: --prepend-include '/usr/local/share/autoconf'
args: m4sugar/m4sh.m4f
args: --mode 777
args: --language M4sugar
end-language: "M4sh"
## ------- ##
## M4sugar ##
## ------- ##
begin-language: "M4sugar"
args: --prepend-include '/usr/local/share/autoconf'
args: m4sugar/m4sugar.m4f
args: --warnings syntax
end-language: "M4sugar"
0707010006798f000081a400000000000000000000000153b4ffc200003d85000000b500010002ffffffffffffffff0000002600000000root/usr/local/share/autoconf/INSTALL Installation Instructions
*************************
Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation,
Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without warranty of any kind.
Basic Installation
==================
Briefly, the shell commands './configure; make; make install' should
configure, build, and install this package. The following
more-detailed instructions are generic; see the 'README' file for
instructions specific to this package. Some packages provide this
'INSTALL' file but do not implement all of the features documented
below. The lack of an optional feature in a given package is not
necessarily a bug. More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.
The 'configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a 'Makefile' in each directory of the package.
It may also create one or more '.h' files containing system-dependent
definitions. Finally, it creates a shell script 'config.status' that
you can run in the future to recreate the current configuration, and a
file 'config.log' containing compiler output (useful mainly for
debugging 'configure').
It can also use an optional file (typically called 'config.cache'
and enabled with '--cache-file=config.cache' or simply '-C') that saves
the results of its tests to speed up reconfiguring. Caching is
disabled by default to prevent problems with accidental use of stale
cache files.
If you need to do unusual things to compile the package, please try
to figure out how 'configure' could check whether to do them, and mail
diffs or instructions to the address given in the 'README' so they can
be considered for the next release. If you are using the cache, and at
some point 'config.cache' contains results you don't want to keep, you
may remove or edit it.
The file 'configure.ac' (or 'configure.in') is used to create
'configure' by a program called 'autoconf'. You need 'configure.ac' if
you want to change it or regenerate 'configure' using a newer version
of 'autoconf'.
The simplest way to compile this package is:
1. 'cd' to the directory containing the package's source code and type
'./configure' to configure the package for your system.
Running 'configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type 'make' to compile the package.
3. Optionally, type 'make check' to run any self-tests that come with
the package, generally using the just-built uninstalled binaries.
4. Type 'make install' to install the programs and any data files and
documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular
user, and only the 'make install' phase executed with root
privileges.
5. Optionally, type 'make installcheck' to repeat any self-tests, but
this time using the binaries in their final installed location.
This target does not install anything. Running this target as a
regular user, particularly if the prior 'make install' required
root privileges, verifies that the installation completed
correctly.
6. You can remove the program binaries and object files from the
source code directory by typing 'make clean'. To also remove the
files that 'configure' created (so you can compile the package for
a different kind of computer), type 'make distclean'. There is
also a 'make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
7. Often, you can also type 'make uninstall' to remove the installed
files again. In practice, not all packages have tested that
uninstallation works correctly, even though it is required by the
GNU Coding Standards.
8. Some packages, particularly those that use Automake, provide `make
distcheck', which can by used by developers to test that all other
targets like 'make install' and 'make uninstall' work correctly.
This target is generally not run by end users.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the 'configure' script does not know about. Run './configure --help'
for details on some of the pertinent environment variables.
You can give 'configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU 'make'. 'cd' to the
directory where you want the object files and executables to go and run
the 'configure' script. 'configure' automatically checks for the
source code in the directory that 'configure' is in and in '..'. This
is known as a "VPATH" build.
With a non-GNU 'make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use 'make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple '-arch' options to the
compiler but only a single '-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the 'lipo' tool if you have problems.
Installation Names
==================
By default, 'make install' installs the package's commands under
'/usr/local/bin', include files under '/usr/local/include', etc. You
can specify an installation prefix other than '/usr/local' by giving
'configure' the option '--prefix=PREFIX', where PREFIX must be an
absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like '--bindir=DIR' to specify different values for particular
kinds of files. Run 'configure --help' for a list of the directories
you can set and what kinds of files go in them. In general, the
default for these options is expressed in terms of '${prefix}', so that
specifying just '--prefix' will affect all of the other directory
specifications that were not explicitly provided.
The most portable way to affect installation locations is to pass the
correct locations to 'configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
'make install' command line to change installation locations without
having to reconfigure or recompile.
The first method involves providing an override variable for each
affected directory. For example, `make install
prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of
'${prefix}'. Any directories that were specified during 'configure',
but not in terms of '${prefix}', must each be overridden at install
time for the entire installation to be relocated. The approach of
makefile variable overrides for each directory variable is required by
the GNU Coding Standards, and ideally causes no recompilation.
However, some platforms have known limitations with the semantics of
shared libraries that end up requiring recompilation when using this
method, particularly noticeable in packages that use GNU Libtool.
The second method involves providing the 'DESTDIR' variable. For
example, 'make install DESTDIR=/alternate/directory' will prepend
'/alternate/directory' before all installation names. The approach of
'DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even
when some directory options were not specified in terms of '${prefix}'
at 'configure' time.
Optional Features
=================
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving 'configure' the
option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
Some packages pay attention to '--enable-FEATURE' options to
'configure', where FEATURE indicates an optional part of the package.
They may also pay attention to '--with-PACKAGE' options, where PACKAGE
is something like 'gnu-as' or 'x' (for the X Window System). The
'README' should mention any '--enable-' and '--with-' options that the
package recognizes.
For packages that use the X Window System, 'configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the 'configure' options '--x-includes=DIR' and
'--x-libraries=DIR' to specify their locations.
Some packages offer the ability to configure how verbose the
execution of 'make' will be. For these packages, running `./configure
--enable-silent-rules' sets the default to minimal output, which can be
overridden with 'make V=1'; while running `./configure
--disable-silent-rules' sets the default to verbose, which can be
overridden with 'make V=0'.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
CC is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
HP-UX 'make' updates targets which have the same time stamps as
their prerequisites, which makes it generally unusable when shipped
generated files such as 'configure' are involved. Use GNU 'make'
instead.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its '' header file. The option '-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
to try
./configure CC="cc"
and if that doesn't work, try
./configure CC="cc -nodtk"
On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
directory contains several dysfunctional programs; working variants of
these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
in your 'PATH', put it _after_ '/usr/bin'.
On Haiku, software installed for all users goes in '/boot/common',
not '/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
Specifying the System Type
==========================
There may be some features 'configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, 'configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
'--build=TYPE' option. TYPE can either be a short name for the system
type, such as 'sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS
KERNEL-OS
See the file 'config.sub' for the possible values of each field. If
'config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option '--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with '--host=TYPE'.
Sharing Defaults
================
If you want to set default values for 'configure' scripts to share,
you can create a site shell script called 'config.site' that gives
default values for variables like 'CC', 'cache_file', and 'prefix'.
'configure' looks for 'PREFIX/share/config.site' if it exists, then
'PREFIX/etc/config.site' if it exists. Or, you can set the
'CONFIG_SITE' environment variable to the location of the site script.
A warning: not all 'configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to 'configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the 'configure' command line, using 'VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified 'gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for 'CONFIG_SHELL' due to
an Autoconf limitation. Until the limitation is lifted, you can use
this workaround:
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
'configure' Invocation
======================
'configure' recognizes the following options to control how it
operates.
'--help'
'-h'
Print a summary of all of the options to 'configure', and exit.
'--help=short'
'--help=recursive'
Print a summary of the options unique to this package's
'configure', and exit. The 'short' variant lists options used
only in the top level, while the 'recursive' variant lists options
also present in any nested packages.
'--version'
'-V'
Print the version of Autoconf used to generate the 'configure'
script, and exit.
'--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally 'config.cache'. FILE defaults to '/dev/null' to
disable caching.
'--config-cache'
'-C'
Alias for '--cache-file=config.cache'.
'--quiet'
'--silent'
'-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to '/dev/null' (any error
messages will still be shown).
'--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
'configure' can determine that directory automatically.
'--prefix=DIR'
Use DIR as the installation prefix. *note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
'--no-create'
'-n'
Run the configure checks, but stop before creating any output
files.
'configure' also accepts some other, not widely useful, options. Run
'configure --help' for more details.
070701000679ad000041ed00000000000000000000000253b5000600000000000000b500010002ffffffffffffffff0000002600000000root/usr/local/share/autoconf/m4sugar 070701000679b1000081a400000000000000000000000153b4ffc20001dc08000000b500010002ffffffffffffffff0000003100000000root/usr/local/share/autoconf/m4sugar/m4sugar.m4 divert(-1)# -*- Autoconf -*-
# This file is part of Autoconf.
# Base M4 layer.
# Requires GNU M4.
#
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
# This file is part of Autoconf. This program is free
# software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# Under Section 7 of GPL version 3, you are granted additional
# permissions described in the Autoconf Configure Script Exception,
# version 3.0, as published by the Free Software Foundation.
#
# You should have received a copy of the GNU General Public License
# and a copy of the Autoconf Configure Script Exception along with
# this program; see the files COPYINGv3 and COPYING.EXCEPTION
# respectively. If not, see .
# Written by Akim Demaille.
# Set the quotes, whatever the current quoting system.
changequote()
changequote([, ])
# Some old m4's don't support m4exit. But they provide
# equivalent functionality by core dumping because of the
# long macros we define.
ifdef([__gnu__], ,
[errprint(M4sugar requires GNU M4. Install it before installing M4sugar or
set the M4 environment variable to its absolute file name.)
m4exit(2)])
## ------------------------------- ##
## 1. Simulate --prefix-builtins. ##
## ------------------------------- ##
# m4_define
# m4_defn
# m4_undefine
define([m4_define], defn([define]))
define([m4_defn], defn([defn]))
define([m4_undefine], defn([undefine]))
m4_undefine([define])
m4_undefine([defn])
m4_undefine([undefine])
# m4_copy(SRC, DST)
# -----------------
# Define DST as the definition of SRC.
# What's the difference between:
# 1. m4_copy([from], [to])
# 2. m4_define([to], [from($@)])
# Well, obviously 1 is more expensive in space. Maybe 2 is more expensive
# in time, but because of the space cost of 1, it's not that obvious.
# Nevertheless, one huge difference is the handling of `$0'. If `from'
# uses `$0', then with 1, `to''s `$0' is `to', while it is `from' in 2.
# The user would certainly prefer to see `to'.
#
# This definition is in effect during m4sugar initialization, when
# there are no pushdef stacks; later on, we redefine it to something
# more powerful for all other clients to use.
m4_define([m4_copy],
[m4_define([$2], m4_defn([$1]))])
# m4_rename(SRC, DST)
# -------------------
# Rename the macro SRC to DST.
m4_define([m4_rename],
[m4_copy([$1], [$2])m4_undefine([$1])])
# m4_rename_m4(MACRO-NAME)
# ------------------------
# Rename MACRO-NAME to m4_MACRO-NAME.
m4_define([m4_rename_m4],
[m4_rename([$1], [m4_$1])])
# m4_copy_unm4(m4_MACRO-NAME)
# ---------------------------
# Copy m4_MACRO-NAME to MACRO-NAME.
m4_define([m4_copy_unm4],
[m4_copy([$1], m4_bpatsubst([$1], [^m4_\(.*\)], [[\1]]))])
# Some m4 internals have names colliding with tokens we might use.
# Rename them a` la `m4 --prefix-builtins'. Conditionals first, since
# some subsequent renames are conditional.
m4_rename_m4([ifdef])
m4_rename([ifelse], [m4_if])
m4_rename_m4([builtin])
m4_rename_m4([changecom])
m4_rename_m4([changequote])
m4_ifdef([changeword],dnl conditionally available in 1.4.x
[m4_undefine([changeword])])
m4_rename_m4([debugfile])
m4_rename_m4([debugmode])
m4_rename_m4([decr])
m4_rename_m4([divnum])
m4_rename_m4([dumpdef])
m4_rename_m4([errprint])
m4_rename_m4([esyscmd])
m4_rename_m4([eval])
m4_rename_m4([format])
m4_undefine([include])
m4_rename_m4([incr])
m4_rename_m4([index])
m4_rename_m4([indir])
m4_rename_m4([len])
m4_rename([m4exit], [m4_exit])
m4_undefine([m4wrap])
m4_ifdef([mkstemp],dnl added in M4 1.4.8
[m4_rename_m4([mkstemp])
m4_copy([m4_mkstemp], [m4_maketemp])
m4_undefine([maketemp])],
[m4_rename_m4([maketemp])
m4_copy([m4_maketemp], [m4_mkstemp])])
m4_rename([patsubst], [m4_bpatsubst])
m4_rename_m4([popdef])
m4_rename_m4([pushdef])
m4_rename([regexp], [m4_bregexp])
m4_rename_m4([shift])
m4_undefine([sinclude])
m4_rename_m4([substr])
m4_ifdef([symbols],dnl present only in alpha-quality 1.4o
[m4_rename_m4([symbols])])
m4_rename_m4([syscmd])
m4_rename_m4([sysval])
m4_rename_m4([traceoff])
m4_rename_m4([traceon])
m4_rename_m4([translit])
# _m4_defn(ARG)
# -------------
# _m4_defn is for internal use only - it bypasses the wrapper, so it
# must only be used on one argument at a time, and only on macros
# known to be defined. Make sure this still works if the user renames
# m4_defn but not _m4_defn.
m4_copy([m4_defn], [_m4_defn])
# _m4_divert_raw(NUM)
# -------------------
# _m4_divert_raw is for internal use only. Use this instead of
# m4_builtin([divert], NUM), so that tracing diversion flow is easier.
m4_rename([divert], [_m4_divert_raw])
# _m4_popdef(ARG...)
# ------------------
# _m4_popdef is for internal use only - it bypasses the wrapper, so it
# must only be used on macros known to be defined. Make sure this
# still works if the user renames m4_popdef but not _m4_popdef.
m4_copy([m4_popdef], [_m4_popdef])
# _m4_undefine(ARG...)
# --------------------
# _m4_undefine is for internal use only - it bypasses the wrapper, so
# it must only be used on macros known to be defined. Make sure this
# still works if the user renames m4_undefine but not _m4_undefine.
m4_copy([m4_undefine], [_m4_undefine])
# _m4_undivert(NUM...)
# --------------------
# _m4_undivert is for internal use only, and should always be given
# arguments. Use this instead of m4_builtin([undivert], NUM...), so
# that tracing diversion flow is easier.
m4_rename([undivert], [_m4_undivert])
## ------------------- ##
## 2. Error messages. ##
## ------------------- ##
# m4_location
# -----------
# Output the current file, colon, and the current line number.
m4_define([m4_location],
[__file__:__line__])
# m4_errprintn(MSG)
# -----------------
# Same as `errprint', but with the missing end of line.
m4_define([m4_errprintn],
[m4_errprint([$1
])])
# m4_warning(MSG)
# ---------------
# Warn the user.
m4_define([m4_warning],
[m4_errprintn(m4_location[: warning: $1])])
# m4_fatal(MSG, [EXIT-STATUS])
# ----------------------------
# Fatal the user. :)
m4_define([m4_fatal],
[m4_errprintn(m4_location[: error: $1]
m4_expansion_stack)m4_exit(m4_if([$2],, 1, [$2]))])
# m4_assert(EXPRESSION, [EXIT-STATUS = 1])
# ----------------------------------------
# This macro ensures that EXPRESSION evaluates to true, and exits if
# EXPRESSION evaluates to false.
m4_define([m4_assert],
[m4_if(m4_eval([$1]), 0,
[m4_fatal([assert failed: $1], [$2])])])
## ------------- ##
## 3. Warnings. ##
## ------------- ##
# _m4_warn(CATEGORY, MESSAGE, [STACK-TRACE])
# ------------------------------------------
# Report a MESSAGE to the user if the CATEGORY of warnings is enabled.
# This is for traces only.
# If present, STACK-TRACE is a \n-separated list of "LOCATION: MESSAGE",
# where the last line (and no other) ends with "the top level".
#
# Within m4, the macro is a no-op. This macro really matters
# when autom4te post-processes the trace output.
m4_define([_m4_warn], [])
# m4_warn(CATEGORY, MESSAGE)
# --------------------------
# Report a MESSAGE to the user if the CATEGORY of warnings is enabled.
m4_define([m4_warn],
[_m4_warn([$1], [$2],
m4_ifdef([_m4_expansion_stack], [m4_expansion_stack]))])
## ------------------- ##
## 4. File inclusion. ##
## ------------------- ##
# We also want to neutralize include (and sinclude for symmetry),
# but we want to extend them slightly: warn when a file is included
# several times. This is, in general, a dangerous operation, because
# too many people forget to quote the first argument of m4_define.
#
# For instance in the following case:
# m4_define(foo, [bar])
# then a second reading will turn into
# m4_define(bar, [bar])
# which is certainly not what was meant.
# m4_include_unique(FILE)
# -----------------------
# Declare that the FILE was loading; and warn if it has already
# been included.
m4_define([m4_include_unique],
[m4_ifdef([m4_include($1)],
[m4_warn([syntax], [file `$1' included several times])])dnl
m4_define([m4_include($1)])])
# m4_include(FILE)
# ----------------
# Like the builtin include, but warns against multiple inclusions.
m4_define([m4_include],
[m4_include_unique([$1])dnl
m4_builtin([include], [$1])])
# m4_sinclude(FILE)
# -----------------
# Like the builtin sinclude, but warns against multiple inclusions.
m4_define([m4_sinclude],
[m4_include_unique([$1])dnl
m4_builtin([sinclude], [$1])])
## ------------------------------------ ##
## 5. Additional branching constructs. ##
## ------------------------------------ ##
# Both `m4_ifval' and `m4_ifset' tests against the empty string. The
# difference is that `m4_ifset' is specialized on macros.
#
# In case of arguments of macros, eg. $1, it makes little difference.
# In the case of a macro `FOO', you don't want to check `m4_ifval(FOO,
# TRUE)', because if `FOO' expands with commas, there is a shifting of
# the arguments. So you want to run `m4_ifval([FOO])', but then you just
# compare the *string* `FOO' against `', which, of course fails.
#
# So you want the variation `m4_ifset' that expects a macro name as $1.
# If this macro is both defined and defined to a non empty value, then
# it runs TRUE, etc.
# m4_ifblank(COND, [IF-BLANK], [IF-TEXT])
# m4_ifnblank(COND, [IF-TEXT], [IF-BLANK])
# ----------------------------------------
# If COND is empty, or consists only of blanks (space, tab, newline),
# then expand IF-BLANK, otherwise expand IF-TEXT. This differs from
# m4_ifval only if COND has just whitespace, but it helps optimize in
# spite of users who mistakenly leave trailing space after what they
# thought was an empty argument:
# macro(
# []
# )
#
# Writing one macro in terms of the other causes extra overhead, so
# we inline both definitions.
m4_define([m4_ifblank],
[m4_if(m4_translit([[$1]], [ ][ ][
]), [], [$2], [$3])])
m4_define([m4_ifnblank],
[m4_if(m4_translit([[$1]], [ ][ ][
]), [], [$3], [$2])])
# m4_ifval(COND, [IF-TRUE], [IF-FALSE])
# -------------------------------------
# If COND is not the empty string, expand IF-TRUE, otherwise IF-FALSE.
# Comparable to m4_ifdef.
m4_define([m4_ifval],
[m4_if([$1], [], [$3], [$2])])
# m4_n(TEXT)
# ----------
# If TEXT is not empty, return TEXT and a new line, otherwise nothing.
m4_define([m4_n],
[m4_if([$1],
[], [],
[$1
])])
# m4_ifvaln(COND, [IF-TRUE], [IF-FALSE])
# --------------------------------------
# Same as `m4_ifval', but add an extra newline to IF-TRUE or IF-FALSE
# unless that argument is empty.
m4_define([m4_ifvaln],
[m4_if([$1],
[], [m4_n([$3])],
[m4_n([$2])])])
# m4_ifset(MACRO, [IF-TRUE], [IF-FALSE])
# --------------------------------------
# If MACRO has no definition, or of its definition is the empty string,
# expand IF-FALSE, otherwise IF-TRUE.
m4_define([m4_ifset],
[m4_ifdef([$1],
[m4_ifval(_m4_defn([$1]), [$2], [$3])],
[$3])])
# m4_ifndef(NAME, [IF-NOT-DEFINED], [IF-DEFINED])
# -----------------------------------------------
m4_define([m4_ifndef],
[m4_ifdef([$1], [$3], [$2])])
# m4_case(SWITCH, VAL1, IF-VAL1, VAL2, IF-VAL2, ..., DEFAULT)
# -----------------------------------------------------------
# m4 equivalent of
# switch (SWITCH)
# {
# case VAL1:
# IF-VAL1;
# break;
# case VAL2:
# IF-VAL2;
# break;
# ...
# default:
# DEFAULT;
# break;
# }.
# All the values are optional, and the macro is robust to active
# symbols properly quoted.
#
# Please keep foreach.m4 in sync with any adjustments made here.
m4_define([m4_case],
[m4_if([$#], 0, [],
[$#], 1, [],
[$#], 2, [$2],
[$1], [$2], [$3],
[$0([$1], m4_shift3($@))])])
# m4_bmatch(SWITCH, RE1, VAL1, RE2, VAL2, ..., DEFAULT)
# -----------------------------------------------------
# m4 equivalent of
#
# if (SWITCH =~ RE1)
# VAL1;
# elif (SWITCH =~ RE2)
# VAL2;
# elif ...
# ...
# else
# DEFAULT
#
# All the values are optional, and the macro is robust to active symbols
# properly quoted.
#
# Please keep foreach.m4 in sync with any adjustments made here.
m4_define([m4_bmatch],
[m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])],
[$#], 1, [m4_fatal([$0: too few arguments: $#: $1])],
[$#], 2, [$2],
[m4_if(m4_bregexp([$1], [$2]), -1, [$0([$1], m4_shift3($@))],
[$3])])])
# m4_argn(N, ARGS...)
# -------------------
# Extract argument N (greater than 0) from ARGS. Example:
# m4_define([b], [B])
# m4_argn([2], [a], [b], [c]) => b
#
# Rather than using m4_car(m4_shiftn([$1], $@)), we exploit the fact that
# GNU m4 can directly reference any argument, through an indirect macro.
m4_define([m4_argn],
[m4_assert([0 < $1])]dnl
[m4_pushdef([_$0], [_m4_popdef([_$0])]m4_dquote([$]m4_incr([$1])))_$0($@)])
# m4_car(ARGS...)
# m4_cdr(ARGS...)
# ---------------
# Manipulate m4 lists. m4_car returns the first argument. m4_cdr
# bundles all but the first argument into a quoted list. These two
# macros are generally used with list arguments, with quoting removed
# to break the list into multiple m4 ARGS.
m4_define([m4_car], [[$1]])
m4_define([m4_cdr],
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
[$#], 1, [],
[m4_dquote(m4_shift($@))])])
# _m4_cdr(ARGS...)
# ----------------
# Like m4_cdr, except include a leading comma unless only one argument
# remains. Why? Because comparing a large list against [] is more
# expensive in expansion time than comparing the number of arguments; so
# _m4_cdr can be used to reduce the number of arguments when it is time
# to end recursion.
m4_define([_m4_cdr],
[m4_if([$#], 1, [],
[, m4_dquote(m4_shift($@))])])
# m4_cond(TEST1, VAL1, IF-VAL1, TEST2, VAL2, IF-VAL2, ..., [DEFAULT])
# -------------------------------------------------------------------
# Similar to m4_if, except that each TEST is expanded when encountered.
# If the expansion of TESTn matches the string VALn, the result is IF-VALn.
# The result is DEFAULT if no tests passed. This macro allows
# short-circuiting of expensive tests, where it pays to arrange quick
# filter tests to run first.
#
# For an example, consider a previous implementation of _AS_QUOTE_IFELSE:
#
# m4_if(m4_index([$1], [\]), [-1], [$2],
# m4_eval(m4_index([$1], [\\]) >= 0), [1], [$2],
# m4_eval(m4_index([$1], [\$]) >= 0), [1], [$2],
# m4_eval(m4_index([$1], [\`]) >= 0), [1], [$3],
# m4_eval(m4_index([$1], [\"]) >= 0), [1], [$3],
# [$2])
#
# Here, m4_index is computed 5 times, and m4_eval 4, even if $1 contains
# no backslash. It is more efficient to do:
#
# m4_cond([m4_index([$1], [\])], [-1], [$2],
# [m4_eval(m4_index([$1], [\\]) >= 0)], [1], [$2],
# [m4_eval(m4_index([$1], [\$]) >= 0)], [1], [$2],
# [m4_eval(m4_index([$1], [\`]) >= 0)], [1], [$3],
# [m4_eval(m4_index([$1], [\"]) >= 0)], [1], [$3],
# [$2])
#
# In the common case of $1 with no backslash, only one m4_index expansion
# occurs, and m4_eval is avoided altogether.
#
# Please keep foreach.m4 in sync with any adjustments made here.
m4_define([m4_cond],
[m4_if([$#], [0], [m4_fatal([$0: cannot be called without arguments])],
[$#], [1], [$1],
m4_eval([$# % 3]), [2], [m4_fatal([$0: missing an argument])],
[_$0($@)])])
m4_define([_m4_cond],
[m4_if(($1), [($2)], [$3],
[$#], [3], [],
[$#], [4], [$4],
[$0(m4_shift3($@))])])
## ---------------------------------------- ##
## 6. Enhanced version of some primitives. ##
## ---------------------------------------- ##
# m4_bpatsubsts(STRING, RE1, SUBST1, RE2, SUBST2, ...)
# ----------------------------------------------------
# m4 equivalent of
#
# $_ = STRING;
# s/RE1/SUBST1/g;
# s/RE2/SUBST2/g;
# ...
#
# All the values are optional, and the macro is robust to active symbols
# properly quoted.
#
# I would have liked to name this macro `m4_bpatsubst', unfortunately,
# due to quotation problems, I need to double quote $1 below, therefore
# the anchors are broken :( I can't let users be trapped by that.
#
# Recall that m4_shift3 always results in an argument. Hence, we need
# to distinguish between a final deletion vs. ending recursion.
#
# Please keep foreach.m4 in sync with any adjustments made here.
m4_define([m4_bpatsubsts],
[m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])],
[$#], 1, [m4_fatal([$0: too few arguments: $#: $1])],
[$#], 2, [m4_unquote(m4_builtin([patsubst], [[$1]], [$2]))],
[$#], 3, [m4_unquote(m4_builtin([patsubst], [[$1]], [$2], [$3]))],
[_$0($@m4_if(m4_eval($# & 1), 0, [,]))])])
m4_define([_m4_bpatsubsts],
[m4_if([$#], 2, [$1],
[$0(m4_builtin([patsubst], [[$1]], [$2], [$3]),
m4_shift3($@))])])
# m4_copy(SRC, DST)
# -----------------
# Define the pushdef stack DST as a copy of the pushdef stack SRC;
# give an error if DST is already defined. This is particularly nice
# for copying self-modifying pushdef stacks, where the top definition
# includes one-shot initialization that is later popped to the normal
# definition. This version intentionally does nothing if SRC is
# undefined.
#
# Some macros simply can't be renamed with this method: namely, anything
# involved in the implementation of m4_stack_foreach_sep.
m4_define([m4_copy],
[m4_ifdef([$2], [m4_fatal([$0: won't overwrite defined macro: $2])],
[m4_stack_foreach_sep([$1], [m4_pushdef([$2],], [)])])]dnl
[m4_ifdef([m4_location($1)], [m4_define([m4_location($2)], m4_location)])])
# m4_copy_force(SRC, DST)
# m4_rename_force(SRC, DST)
# -------------------------
# Like m4_copy/m4_rename, except blindly overwrite any existing DST.
# Note that m4_copy_force tolerates undefined SRC, while m4_rename_force
# does not.
m4_define([m4_copy_force],
[m4_ifdef([$2], [_m4_undefine([$2])])m4_copy($@)])
m4_define([m4_rename_force],
[m4_ifdef([$2], [_m4_undefine([$2])])m4_rename($@)])
# m4_define_default(MACRO, VALUE)
# -------------------------------
# If MACRO is undefined, set it to VALUE.
m4_define([m4_define_default],
[m4_ifndef([$1], [m4_define($@)])])
# m4_default(EXP1, EXP2)
# m4_default_nblank(EXP1, EXP2)
# -----------------------------
# Returns EXP1 if not empty/blank, otherwise EXP2. Expand the result.
#
# m4_default is called on hot paths, so inline the contents of m4_ifval,
# for one less round of expansion.
m4_define([m4_default],
[m4_if([$1], [], [$2], [$1])])
m4_define([m4_default_nblank],
[m4_ifblank([$1], [$2], [$1])])
# m4_default_quoted(EXP1, EXP2)
# m4_default_nblank_quoted(EXP1, EXP2)
# ------------------------------------
# Returns EXP1 if non empty/blank, otherwise EXP2. Leave the result quoted.
#
# For comparison:
# m4_define([active], [ACTIVE])
# m4_default([active], [default]) => ACTIVE
# m4_default([], [active]) => ACTIVE
# -m4_default([ ], [active])- => - -
# -m4_default_nblank([ ], [active])- => -ACTIVE-
# m4_default_quoted([active], [default]) => active
# m4_default_quoted([], [active]) => active
# -m4_default_quoted([ ], [active])- => - -
# -m4_default_nblank_quoted([ ], [active])- => -active-
#
# m4_default macro is called on hot paths, so inline the contents of m4_ifval,
# for one less round of expansion.
m4_define([m4_default_quoted],
[m4_if([$1], [], [[$2]], [[$1]])])
m4_define([m4_default_nblank_quoted],
[m4_ifblank([$1], [[$2]], [[$1]])])
# m4_defn(NAME)
# -------------
# Like the original, except guarantee a warning when using something which is
# undefined (unlike M4 1.4.x). This replacement is not a full-featured
# replacement: if any of the defined macros contain unbalanced quoting, but
# when pasted together result in a well-quoted string, then only native m4
# support is able to get it correct. But that's where quadrigraphs come in
# handy, if you really need unbalanced quotes inside your macros.
#
# This macro is called frequently, so minimize the amount of additional
# expansions by skipping m4_ifndef. Better yet, if __m4_version__ exists,
# (added in M4 1.6), then let m4 do the job for us (see m4_init).
m4_define([m4_defn],
[m4_if([$#], [0], [[$0]],
[$#], [1], [m4_ifdef([$1], [_m4_defn([$1])],
[m4_fatal([$0: undefined macro: $1])])],
[m4_map_args([$0], $@)])])
# m4_dumpdef(NAME...)
# -------------------
# In m4 1.4.x, dumpdef writes to the current debugfile, rather than
# stderr. This in turn royally confuses autom4te; so we follow the
# lead of newer m4 and always dump to stderr. Unlike the original,
# this version requires an argument, since there is no convenient way
# in m4 1.4.x to grab the names of all defined macros. Newer m4
# always dumps to stderr, regardless of the current debugfile; it also
# provides m4symbols as a way to grab all current macro names. But
# dumpdefs is not frequently called, so we don't need to worry about
# conditionally using these newer features. Also, this version
# doesn't sort multiple arguments.
#
# If we detect m4 1.6 or newer, then provide an alternate definition,
# installed during m4_init, that allows builtins through.
# Unfortunately, there is no nice way in m4 1.4.x to dump builtins.
m4_define([m4_dumpdef],
[m4_if([$#], [0], [m4_fatal([$0: missing argument])],
[$#], [1], [m4_ifdef([$1], [m4_errprintn(
[$1: ]m4_dquote(_m4_defn([$1])))], [m4_fatal([$0: undefined macro: $1])])],
[m4_map_args([$0], $@)])])
m4_define([_m4_dumpdef],
[m4_if([$#], [0], [m4_fatal([$0: missing argument])],
[$#], [1], [m4_builtin([dumpdef], [$1])],
[m4_map_args_sep([m4_builtin([dumpdef],], [)], [], $@)])])
# m4_dumpdefs(NAME...)
# --------------------
# Similar to `m4_dumpdef(NAME)', but if NAME was m4_pushdef'ed, display its
# value stack (most recent displayed first). Also, this version silently
# ignores undefined macros, rather than erroring out.
#
# This macro cheats, because it relies on the current definition of NAME
# while the second argument of m4_stack_foreach_lifo is evaluated (which
# would be undefined according to the API).
m4_define([m4_dumpdefs],
[m4_if([$#], [0], [m4_fatal([$0: missing argument])],
[$#], [1], [m4_stack_foreach_lifo([$1], [m4_dumpdef([$1])m4_ignore])],
[m4_map_args([$0], $@)])])
# m4_esyscmd_s(COMMAND)
# ---------------------
# Like m4_esyscmd, except strip any trailing newlines, thus behaving
# more like shell command substitution.
m4_define([m4_esyscmd_s],
[m4_chomp_all(m4_esyscmd([$1]))])
# m4_popdef(NAME)
# ---------------
# Like the original, except guarantee a warning when using something which is
# undefined (unlike M4 1.4.x).
#
# This macro is called frequently, so minimize the amount of additional
# expansions by skipping m4_ifndef. Better yet, if __m4_version__ exists,
# (added in M4 1.6), then let m4 do the job for us (see m4_init).
m4_define([m4_popdef],
[m4_if([$#], [0], [[$0]],
[$#], [1], [m4_ifdef([$1], [_m4_popdef([$1])],
[m4_fatal([$0: undefined macro: $1])])],
[m4_map_args([$0], $@)])])
# m4_shiftn(N, ...)
# -----------------
# Returns ... shifted N times. Useful for recursive "varargs" constructs.
#
# Autoconf does not use this macro, because it is inherently slower than
# calling the common cases of m4_shift2 or m4_shift3 directly. But it
# might as well be fast for other clients, such as Libtool. One way to
# do this is to expand $@ only once in _m4_shiftn (otherwise, for long
# lists, the expansion of m4_if takes twice as much memory as what the
# list itself occupies, only to throw away the unused branch). The end
# result is strictly equivalent to
# m4_if([$1], 1, [m4_shift(,m4_shift(m4_shift($@)))],
# [_m4_shiftn(m4_decr([$1]), m4_shift(m4_shift($@)))])
# but with the final `m4_shift(m4_shift($@)))' shared between the two
# paths. The first leg uses a no-op m4_shift(,$@) to balance out the ().
#
# Please keep foreach.m4 in sync with any adjustments made here.
m4_define([m4_shiftn],
[m4_assert(0 < $1 && $1 < $#)_$0($@)])
m4_define([_m4_shiftn],
[m4_if([$1], 1, [m4_shift(],
[$0(m4_decr([$1])]), m4_shift(m4_shift($@)))])
# m4_shift2(...)
# m4_shift3(...)
# --------------
# Returns ... shifted twice, and three times. Faster than m4_shiftn.
m4_define([m4_shift2], [m4_shift(m4_shift($@))])
m4_define([m4_shift3], [m4_shift(m4_shift(m4_shift($@)))])
# _m4_shift2(...)
# _m4_shift3(...)
# ---------------
# Like m4_shift2 or m4_shift3, except include a leading comma unless shifting
# consumes all arguments. Why? Because in recursion, it is nice to
# distinguish between 1 element left and 0 elements left, based on how many
# arguments this shift expands to.
m4_define([_m4_shift2],
[m4_if([$#], [2], [],
[, m4_shift(m4_shift($@))])])
m4_define([_m4_shift3],
[m4_if([$#], [3], [],
[, m4_shift(m4_shift(m4_shift($@)))])])
# m4_undefine(NAME)
# -----------------
# Like the original, except guarantee a warning when using something which is
# undefined (unlike M4 1.4.x).
#
# This macro is called frequently, so minimize the amount of additional
# expansions by skipping m4_ifndef. Better yet, if __m4_version__ exists,
# (added in M4 1.6), then let m4 do the job for us (see m4_init).
m4_define([m4_undefine],
[m4_if([$#], [0], [[$0]],
[$#], [1], [m4_ifdef([$1], [_m4_undefine([$1])],
[m4_fatal([$0: undefined macro: $1])])],
[m4_map_args([$0], $@)])])
# _m4_wrap(PRE, POST)
# -------------------
# Helper macro for m4_wrap and m4_wrap_lifo. Allows nested calls to
# m4_wrap within wrapped text. Use _m4_defn and _m4_popdef for speed.
m4_define([_m4_wrap],
[m4_ifdef([$0_text],
[m4_define([$0_text], [$1]_m4_defn([$0_text])[$2])],
[m4_builtin([m4wrap], [m4_unquote(
_m4_defn([$0_text])_m4_popdef([$0_text]))])m4_define([$0_text], [$1$2])])])
# m4_wrap(TEXT)
# -------------
# Append TEXT to the list of hooks to be executed at the end of input.
# Whereas the order of the original may be LIFO in the underlying m4,
# this version is always FIFO.
m4_define([m4_wrap],
[_m4_wrap([], [$1[]])])
# m4_wrap_lifo(TEXT)
# ------------------
# Prepend TEXT to the list of hooks to be executed at the end of input.
# Whereas the order of m4_wrap may be FIFO in the underlying m4, this
# version is always LIFO.
m4_define([m4_wrap_lifo],
[_m4_wrap([$1[]])])
## ------------------------- ##
## 7. Quoting manipulation. ##
## ------------------------- ##
# m4_apply(MACRO, LIST)
# ---------------------
# Invoke MACRO, with arguments provided from the quoted list of
# comma-separated quoted arguments. If LIST is empty, invoke MACRO
# without arguments. The expansion will not be concatenated with
# subsequent text.
m4_define([m4_apply],
[m4_if([$2], [], [$1], [$1($2)])[]])
# _m4_apply(MACRO, LIST)
# ----------------------
# Like m4_apply, except do nothing if LIST is empty.
m4_define([_m4_apply],
[m4_if([$2], [], [], [$1($2)[]])])
# m4_count(ARGS)
# --------------
# Return a count of how many ARGS are present.
m4_define([m4_count], [$#])
# m4_curry(MACRO, ARG...)
# -----------------------
# Perform argument currying. The expansion of this macro is another
# macro that takes exactly one argument, appends it to the end of the
# original ARG list, then invokes MACRO. For example:
# m4_curry([m4_curry], [m4_reverse], [1])([2])([3]) => 3, 2, 1
# Not quite as practical as m4_incr, but you could also do:
# m4_define([add], [m4_eval(([$1]) + ([$2]))])
# m4_define([add_one], [m4_curry([add], [1])])
# add_one()([2]) => 3
m4_define([m4_curry], [$1(m4_shift($@,)_$0])
m4_define([_m4_curry], [[$1])])
# m4_do(STRING, ...)
# ------------------
# This macro invokes all its arguments (in sequence, of course). It is
# useful for making your macros more structured and readable by dropping
# unnecessary dnl's and have the macros indented properly. No concatenation
# occurs after a STRING; use m4_unquote(m4_join(,STRING)) for that.
#
# Please keep foreach.m4 in sync with any adjustments made here.
m4_define([m4_do],
[m4_if([$#], 0, [],
[$#], 1, [$1[]],
[$1[]$0(m4_shift($@))])])
# m4_dquote(ARGS)
# ---------------
# Return ARGS as a quoted list of quoted arguments.
m4_define([m4_dquote], [[$@]])
# m4_dquote_elt(ARGS)
# -------------------
# Return ARGS as an unquoted list of double-quoted arguments.
#
# Please keep foreach.m4 in sync with any adjustments made here.
m4_define([m4_dquote_elt],
[m4_if([$#], [0], [],
[$#], [1], [[[$1]]],
[[[$1]],$0(m4_shift($@))])])
# m4_echo(ARGS)
# -------------
# Return the ARGS, with the same level of quoting. Whitespace after
# unquoted commas are consumed.
m4_define([m4_echo], [$@])
# m4_expand(ARG)
# _m4_expand(ARG)
# ---------------
# Return the expansion of ARG as a single string. Unlike
# m4_quote($1), this preserves whitespace following single-quoted
# commas that appear within ARG. It also deals with shell case
# statements.
#
# m4_define([active], [ACT, IVE])
# m4_define([active2], [[ACT, IVE]])
# m4_quote(active, active2)
# => ACT,IVE,ACT, IVE
# m4_expand([active, active2])
# => ACT, IVE, ACT, IVE
#
# Unfortunately, due to limitations in m4, ARG must expand to
# something with balanced quotes (use quadrigraphs to get around
# this), and should not contain the unlikely delimiters -=<{( or
# )}>=-. It is possible to have unbalanced quoted `(' or `)', as well
# as unbalanced unquoted `)'. m4_expand can handle unterminated
# comments or dnl on the final line, at the expense of speed; it also
# aids in detecting attempts to incorrectly change the current
# diversion inside ARG. Meanwhile, _m4_expand is faster but must be
# given a terminated expansion, and has no safety checks for
# mis-diverted text.
#
# Exploit that extra unquoted () will group unquoted commas and the
# following whitespace. m4_bpatsubst can't handle newlines inside $1,
# and m4_substr strips quoting. So we (ab)use m4_changequote, using
# temporary quotes to remove the delimiters that conveniently included
# the unquoted () that were added prior to the changequote.
#
# Thanks to shell case statements, too many people are prone to pass
# underquoted `)', so we try to detect that by passing a marker as a
# fourth argument; if the marker is not present, then we assume that
# we encountered an early `)', and re-expand the first argument, but
# this time with one more `(' in the second argument and in the
# open-quote delimiter. We must also ignore the slop from the
# previous try. The final macro is thus half line-noise, half art.
m4_define([m4_expand],
[m4_pushdef([m4_divert], _m4_defn([_m4_divert_unsafe]))]dnl
[m4_pushdef([m4_divert_push], _m4_defn([_m4_divert_unsafe]))]dnl
[m4_chomp(_$0([$1
]))_m4_popdef([m4_divert], [m4_divert_push])])
m4_define([_m4_expand], [$0_([$1], [(], -=<{($1)}>=-, [}>=-])])
m4_define([_m4_expand_],
[m4_if([$4], [}>=-],
[m4_changequote([-=<{$2], [)}>=-])$3m4_changequote([, ])],
[$0([$1], [($2], -=<{($2$1)}>=-, [}>=-])m4_ignore$2])])
# m4_ignore(ARGS)
# ---------------
# Expands to nothing. Useful for conditionally ignoring an arbitrary
# number of arguments (see _m4_list_cmp for an example).
m4_define([m4_ignore])
# m4_make_list(ARGS)
# ------------------
# Similar to m4_dquote, this creates a quoted list of quoted ARGS. This
# version is less efficient than m4_dquote, but separates each argument
# with a comma and newline, rather than just comma, for readability.
# When developing an m4sugar algorithm, you could temporarily use
# m4_pushdef([m4_dquote],m4_defn([m4_make_list]))
# around your code to make debugging easier.
m4_define([m4_make_list], [m4_join([,
], m4_dquote_elt($@))])
# m4_noquote(STRING)
# ------------------
# Return the result of ignoring all quotes in STRING and invoking the
# macros it contains. Among other things, this is useful for enabling
# macro invocations inside strings with [] blocks (for instance regexps
# and help-strings). On the other hand, since all quotes are disabled,
# any macro expanded during this time that relies on nested [] quoting
# will likely crash and burn. This macro is seldom useful; consider
# m4_unquote or m4_expand instead.
m4_define([m4_noquote],
[m4_changequote([-=<{(],[)}>=-])$1-=<{()}>=-m4_changequote([,])])
# m4_quote(ARGS)
# --------------
# Return ARGS as a single argument. Any whitespace after unquoted commas
# is stripped. There is always output, even when there were no arguments.
#
# It is important to realize the difference between `m4_quote(exp)' and
# `[exp]': in the first case you obtain the quoted *result* of the
# expansion of EXP, while in the latter you just obtain the string
# `exp'.
m4_define([m4_quote], [[$*]])
# _m4_quote(ARGS)
# ---------------
# Like m4_quote, except that when there are no arguments, there is no
# output. For conditional scenarios (such as passing _m4_quote as the
# macro name in m4_mapall), this feature can be used to distinguish between
# one argument of the empty string vs. no arguments. However, in the
# normal case with arguments present, this is less efficient than m4_quote.
m4_define([_m4_quote],
[m4_if([$#], [0], [], [[$*]])])
# m4_reverse(ARGS)
# ----------------
# Output ARGS in reverse order.
#
# Please keep foreach.m4 in sync with any adjustments made here.
m4_define([m4_reverse],
[m4_if([$#], [0], [], [$#], [1], [[$1]],
[$0(m4_shift($@)), [$1]])])
# m4_unquote(ARGS)
# ----------------
# Remove one layer of quotes from each ARG, performing one level of
# expansion. For one argument, m4_unquote([arg]) is more efficient than
# m4_do([arg]), but for multiple arguments, the difference is that
# m4_unquote separates arguments with commas while m4_do concatenates.
# Follow this macro with [] if concatenation with subsequent text is
# undesired.
m4_define([m4_unquote], [$*])
## -------------------------- ##
## 8. Implementing m4 loops. ##
## -------------------------- ##
# m4_for(VARIABLE, FIRST, LAST, [STEP = +/-1], EXPRESSION)
# --------------------------------------------------------
# Expand EXPRESSION defining VARIABLE to FROM, FROM + 1, ..., TO with
# increments of STEP. Both limits are included, and bounds are
# checked for consistency. The algorithm is robust to indirect
# VARIABLE names. Changing VARIABLE inside EXPRESSION will not impact
# the number of iterations.
#
# Uses _m4_defn for speed, and avoid dnl in the macro body. Factor
# the _m4_for call so that EXPRESSION is only parsed once.
m4_define([m4_for],
[m4_pushdef([$1], m4_eval([$2]))]dnl
[m4_cond([m4_eval(([$3]) > ([$2]))], 1,
[m4_pushdef([_m4_step], m4_eval(m4_default_quoted([$4],
1)))m4_assert(_m4_step > 0)_$0(_m4_defn([$1]),
m4_eval((([$3]) - ([$2])) / _m4_step * _m4_step + ([$2])), _m4_step,],
[m4_eval(([$3]) < ([$2]))], 1,
[m4_pushdef([_m4_step], m4_eval(m4_default_quoted([$4],
-1)))m4_assert(_m4_step < 0)_$0(_m4_defn([$1]),
m4_eval((([$2]) - ([$3])) / -(_m4_step) * _m4_step + ([$2])), _m4_step,],
[m4_pushdef([_m4_step])_$0(_m4_defn([$1]), _m4_defn([$1]), 0,])]dnl
[[m4_define([$1],], [)$5])m4_popdef([_m4_step], [$1])])
# _m4_for(COUNT, LAST, STEP, PRE, POST)
# -------------------------------------
# Core of the loop, no consistency checks, all arguments are plain
# numbers. Expand PRE[COUNT]POST, then alter COUNT by STEP and
# iterate if COUNT is not LAST.
m4_define([_m4_for],
[$4[$1]$5[]m4_if([$1], [$2], [],
[$0(m4_eval([$1 + $3]), [$2], [$3], [$4], [$5])])])
# Implementing `foreach' loops in m4 is much more tricky than it may
# seem. For example, the old M4 1.4.4 manual had an incorrect example,
# which looked like this (when translated to m4sugar):
#
# | # foreach(VAR, (LIST), STMT)
# | m4_define([foreach],
# | [m4_pushdef([$1])_foreach([$1], [$2], [$3])m4_popdef([$1])])
# | m4_define([_arg1], [$1])
# | m4_define([_foreach],
# | [m4_if([$2], [()], ,
# | [m4_define([$1], _arg1$2)$3[]_foreach([$1], (m4_shift$2), [$3])])])
#
# But then if you run
#
# | m4_define(a, 1)
# | m4_define(b, 2)
# | m4_define(c, 3)
# | foreach([f], [([a], [(b], [c)])], [echo f
# | ])
#
# it gives
#
# => echo 1
# => echo (2,3)
#
# which is not what is expected.
#
# Of course the problem is that many quotes are missing. So you add
# plenty of quotes at random places, until you reach the expected
# result. Alternatively, if you are a quoting wizard, you directly
# reach the following implementation (but if you really did, then
# apply to the maintenance of m4sugar!).
#
# | # foreach(VAR, (LIST), STMT)
# | m4_define([foreach], [m4_pushdef([$1])_foreach($@)m4_popdef([$1])])
# | m4_define([_arg1], [[$1]])
# | m4_define([_foreach],
# | [m4_if($2, [()], ,
# | [m4_define([$1], [_arg1$2])$3[]_foreach([$1], [(m4_shift$2)], [$3])])])
#
# which this time answers
#
# => echo a
# => echo (b
# => echo c)
#
# Bingo!
#
# Well, not quite.
#
# With a better look, you realize that the parens are more a pain than
# a help: since anyway you need to quote properly the list, you end up
# with always using an outermost pair of parens and an outermost pair
# of quotes. Rejecting the parens both eases the implementation, and
# simplifies the use:
#
# | # foreach(VAR, (LIST), STMT)
# | m4_define([foreach], [m4_pushdef([$1])_foreach($@)m4_popdef([$1])])
# | m4_define([_arg1], [$1])
# | m4_define([_foreach],
# | [m4_if($2, [], ,
# | [m4_define([$1], [_arg1($2)])$3[]_foreach([$1], [m4_shift($2)], [$3])])])
#
#
# Now, just replace the `$2' with `m4_quote($2)' in the outer `m4_if'
# to improve robustness, and you come up with a nice implementation
# that doesn't require extra parentheses in the user's LIST.
#
# But wait - now the algorithm is quadratic, because every recursion of
# the algorithm keeps the entire LIST and merely adds another m4_shift to
# the quoted text. If the user has a lot of elements in LIST, you can
# bring the system to its knees with the memory m4 then requires, or trip
# the m4 --nesting-limit recursion factor. The only way to avoid
# quadratic growth is ensure m4_shift is expanded prior to the recursion.
# Hence the design below.
#
# The M4 manual now includes a chapter devoted to this issue, with
# the lessons learned from m4sugar. And still, this design is only
# optimal for M4 1.6; see foreach.m4 for yet more comments on why
# M4 1.4.x uses yet another implementation.
# m4_foreach(VARIABLE, LIST, EXPRESSION)
# --------------------------------------
#
# Expand EXPRESSION assigning each value of the LIST to VARIABLE.
# LIST should have the form `item_1, item_2, ..., item_n', i.e. the
# whole list must *quoted*. Quote members too if you don't want them
# to be expanded.
#
# This macro is robust to active symbols:
# | m4_define(active, [ACT, IVE])
# | m4_foreach(Var, [active, active], [-Var-])
# => -ACT--IVE--ACT--IVE-
#
# | m4_foreach(Var, [[active], [active]], [-Var-])
# => -ACT, IVE--ACT, IVE-
#
# | m4_foreach(Var, [[[active]], [[active]]], [-Var-])
# => -active--active-
#
# This macro is called frequently, so avoid extra expansions such as
# m4_ifval and dnl. Also, since $2 might be quite large, try to use it
# as little as possible in _m4_foreach; each extra use requires that much
# more memory for expansion. So, rather than directly compare $2 against
# [] and use m4_car/m4_cdr for recursion, we instead unbox the list (which
# requires swapping the argument order in the helper), insert an ignored
# third argument, and use m4_shift3 to detect when recursion is complete,
# at which point this looks very much like m4_map_args.
m4_define([m4_foreach],
[m4_if([$2], [], [],
[m4_pushdef([$1])_$0([m4_define([$1],], [)$3], [],
$2)m4_popdef([$1])])])
# _m4_foreach(PRE, POST, IGNORED, ARG...)
# ---------------------------------------
# Form the common basis of the m4_foreach and m4_map macros. For each
# ARG, expand PRE[ARG]POST[]. The IGNORED argument makes recursion
# easier, and must be supplied rather than implicit.
#
# Please keep foreach.m4 in sync with any adjustments made here.
m4_define([_m4_foreach],
[m4_if([$#], [3], [],
[$1[$4]$2[]$0([$1], [$2], m4_shift3($@))])])
# m4_foreach_w(VARIABLE, LIST, EXPRESSION)
# ----------------------------------------
# Like m4_foreach, but the list is whitespace separated. Depending on
# EXPRESSION, it may be more efficient to use m4_map_args_w.
#
# This macro is robust to active symbols:
# m4_foreach_w([Var], [ active
# b act\
# ive ], [-Var-])end
# => -active--b--active-end
#
# This used to use a slower implementation based on m4_foreach:
# m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])
m4_define([m4_foreach_w],
[m4_pushdef([$1])m4_map_args_w([$2],
[m4_define([$1],], [)$3])m4_popdef([$1])])
# m4_map(MACRO, LIST)
# m4_mapall(MACRO, LIST)
# ----------------------
# Invoke MACRO($1), MACRO($2) etc. where $1, $2... are the elements of
# LIST. $1, $2... must in turn be lists, appropriate for m4_apply.
# If LIST contains an empty sublist, m4_map skips the expansion of
# MACRO, while m4_mapall expands MACRO with no arguments.
#
# Since LIST may be quite large, we want to minimize how often it
# appears in the expansion. Rather than use m4_car/m4_cdr iteration,
# we unbox the list, and use _m4_foreach for iteration. For m4_map,
# an empty list behaves like an empty sublist and gets ignored; for
# m4_mapall, we must special-case the empty list.
m4_define([m4_map],
[_m4_foreach([_m4_apply([$1],], [)], [], $2)])
m4_define([m4_mapall],
[m4_if([$2], [], [],
[_m4_foreach([m4_apply([$1],], [)], [], $2)])])
# m4_map_sep(MACRO, [SEPARATOR], LIST)
# m4_mapall_sep(MACRO, [SEPARATOR], LIST)
# ---------------------------------------
# Invoke MACRO($1), SEPARATOR, MACRO($2), ..., MACRO($N) where $1,
# $2... $N are the elements of LIST, and are in turn lists appropriate
# for m4_apply. SEPARATOR is expanded, in order to allow the creation
# of a list of arguments by using a single-quoted comma as the
# separator. For each empty sublist, m4_map_sep skips the expansion
# of MACRO and SEPARATOR, while m4_mapall_sep expands MACRO with no
# arguments.
#
# For m4_mapall_sep, merely expand the first iteration without the
# separator, then include separator as part of subsequent recursion;
# but avoid extra expansion of LIST's side-effects via a helper macro.
# For m4_map_sep, things are trickier - we don't know if the first
# list element is an empty sublist, so we must define a self-modifying
# helper macro and use that as the separator instead.
m4_define([m4_map_sep],
[m4_pushdef([m4_Sep], [m4_define([m4_Sep], _m4_defn([m4_unquote]))])]dnl
[_m4_foreach([_m4_apply([m4_Sep([$2])[]$1],], [)], [], $3)m4_popdef([m4_Sep])])
m4_define([m4_mapall_sep],
[m4_if([$3], [], [], [_$0([$1], [$2], $3)])])
m4_define([_m4_mapall_sep],
[m4_apply([$1], [$3])_m4_foreach([m4_apply([$2[]$1],], [)], m4_shift2($@))])
# m4_map_args(EXPRESSION, ARG...)
# -------------------------------
# Expand EXPRESSION([ARG]) for each argument. More efficient than
# m4_foreach([var], [ARG...], [EXPRESSION(m4_defn([var]))])
# Shorthand for m4_map_args_sep([EXPRESSION(], [)], [], ARG...).
m4_define([m4_map_args],
[m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
[$#], [1], [],
[$#], [2], [$1([$2])[]],
[_m4_foreach([$1(], [)], $@)])])
# m4_map_args_pair(EXPRESSION, [END-EXPR = EXPRESSION], ARG...)
# -------------------------------------------------------------
# Perform a pairwise grouping of consecutive ARGs, by expanding
# EXPRESSION([ARG1], [ARG2]). If there are an odd number of ARGs, the
# final argument is expanded with END-EXPR([ARGn]).
#
# For example:
# m4_define([show], [($*)m4_newline])dnl
# m4_map_args_pair([show], [], [a], [b], [c], [d], [e])dnl
# => (a,b)
# => (c,d)
# => (e)
#
# Please keep foreach.m4 in sync with any adjustments made here.
m4_define([m4_map_args_pair],
[m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
[$#], [1], [m4_fatal([$0: too few arguments: $#: $1])],
[$#], [2], [],
[$#], [3], [m4_default([$2], [$1])([$3])[]],
[$#], [4], [$1([$3], [$4])[]],
[$1([$3], [$4])[]$0([$1], [$2], m4_shift(m4_shift3($@)))])])
# m4_map_args_sep([PRE], [POST], [SEP], ARG...)
# ---------------------------------------------
# Expand PRE[ARG]POST for each argument, with SEP between arguments.
m4_define([m4_map_args_sep],
[m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
[$#], [1], [],
[$#], [2], [],
[$#], [3], [],
[$#], [4], [$1[$4]$2[]],
[$1[$4]$2[]_m4_foreach([$3[]$1], [$2], m4_shift3($@))])])
# m4_map_args_w(STRING, [PRE], [POST], [SEP])
# -------------------------------------------
# Perform the expansion of PRE[word]POST[] for each word in STRING
# separated by whitespace. More efficient than:
# m4_foreach_w([var], [STRING], [PRE[]m4_defn([var])POST])
# Additionally, expand SEP between words.
#
# As long as we have to use m4_bpatsubst to split the string, we might
# as well make it also apply PRE and POST; this avoids iteration
# altogether. But we must be careful of any \ in PRE or POST.
# _m4_strip returns a quoted string, but that's okay, since it also
# supplies an empty leading and trailing argument due to our
# intentional whitespace around STRING. We use m4_substr to strip the
# empty elements and remove the extra layer of quoting.
m4_define([m4_map_args_w],
[_$0(_m4_split([ ]m4_flatten([$1])[ ], [[ ]+],
m4_if(m4_index([$2$3$4], [\]), [-1], [[$3[]$4[]$2]],
[m4_bpatsubst([[$3[]$4[]$2]], [\\], [\\\\])])),
m4_len([[]$3[]$4]), m4_len([$4[]$2[]]))])
m4_define([_m4_map_args_w],
[m4_substr([$1], [$2], m4_eval(m4_len([$1]) - [$2] - [$3]))])
# m4_stack_foreach(MACRO, FUNC)
# m4_stack_foreach_lifo(MACRO, FUNC)
# ----------------------------------
# Pass each stacked definition of MACRO to the one-argument macro FUNC.
# m4_stack_foreach proceeds in FIFO order, while m4_stack_foreach_lifo
# processes the topmost definitions first. In addition, FUNC should
# not push or pop definitions of MACRO, and should not expect anything about
# the active definition of MACRO (it will not be the topmost, and may not
# be the one passed to FUNC either).
#
# Some macros simply can't be examined with this method: namely,
# anything involved in the implementation of _m4_stack_reverse.
m4_define([m4_stack_foreach],
[_m4_stack_reverse([$1], [m4_tmp-$1])]dnl
[_m4_stack_reverse([m4_tmp-$1], [$1], [$2(_m4_defn([m4_tmp-$1]))])])
m4_define([m4_stack_foreach_lifo],
[_m4_stack_reverse([$1], [m4_tmp-$1], [$2(_m4_defn([m4_tmp-$1]))])]dnl
[_m4_stack_reverse([m4_tmp-$1], [$1])])
# m4_stack_foreach_sep(MACRO, [PRE], [POST], [SEP])
# m4_stack_foreach_sep_lifo(MACRO, [PRE], [POST], [SEP])
# ------------------------------------------------------
# Similar to m4_stack_foreach and m4_stack_foreach_lifo, in that every
# definition of a pushdef stack will be visited. But rather than
# passing the definition as a single argument to a macro, this variant
# expands the concatenation of PRE[]definition[]POST, and expands SEP
# between consecutive expansions. Note that m4_stack_foreach([a], [b])
# is equivalent to m4_stack_foreach_sep([a], [b(], [)]).
m4_define([m4_stack_foreach_sep],
[_m4_stack_reverse([$1], [m4_tmp-$1])]dnl
[_m4_stack_reverse([m4_tmp-$1], [$1], [$2[]_m4_defn([m4_tmp-$1])$3], [$4[]])])
m4_define([m4_stack_foreach_sep_lifo],
[_m4_stack_reverse([$1], [m4_tmp-$1], [$2[]_m4_defn([m4_tmp-$1])$3], [$4[]])]dnl
[_m4_stack_reverse([m4_tmp-$1], [$1])])
# _m4_stack_reverse(OLD, NEW, [ACTION], [SEP])
# --------------------------------------------
# A recursive worker for pushdef stack manipulation. Destructively
# copy the OLD stack into the NEW, and expanding ACTION for each
# iteration. After the first iteration, SEP is promoted to the front
# of ACTION (note that SEP should include a trailing [] if it is to
# avoid interfering with ACTION). The current definition is examined
# after the NEW has been pushed but before OLD has been popped; this
# order is important, as ACTION is permitted to operate on either
# _m4_defn([OLD]) or _m4_defn([NEW]). Since the operation is
# destructive, this macro is generally used twice, with a temporary
# macro name holding the swapped copy.
m4_define([_m4_stack_reverse],
[m4_ifdef([$1], [m4_pushdef([$2],
_m4_defn([$1]))$3[]_m4_popdef([$1])$0([$1], [$2], [$4$3])])])
## --------------------------- ##
## 9. More diversion support. ##
## --------------------------- ##
# m4_cleardivert(DIVERSION-NAME...)
# ---------------------------------
# Discard any text in DIVERSION-NAME.
#
# This works even inside m4_expand.
m4_define([m4_cleardivert],
[m4_if([$#], [0], [m4_fatal([$0: missing argument])],
[_m4_divert_raw([-1])m4_undivert($@)_m4_divert_raw(
_m4_divert(_m4_defn([_m4_divert_diversion]), [-]))])])
# _m4_divert(DIVERSION-NAME or NUMBER, [NOWARN])
# ----------------------------------------------
# If DIVERSION-NAME is the name of a diversion, return its number,
# otherwise if it is a NUMBER return it. Issue a warning about
# the use of a number instead of a name, unless NOWARN is provided.
m4_define([_m4_divert],
[m4_ifdef([_m4_divert($1)],
[m4_indir([_m4_divert($1)])],
[m4_if([$2], [], [m4_warn([syntax],
[prefer named diversions])])$1])])
# KILL is only used to suppress output.
m4_define([_m4_divert(KILL)], -1)
# The empty diversion name is a synonym for 0.
m4_define([_m4_divert()], 0)
# m4_divert_stack
# ---------------
# Print the diversion stack, if it's nonempty. The caller is
# responsible for any leading or trailing newline.
m4_define([m4_divert_stack],
[m4_stack_foreach_sep_lifo([_m4_divert_stack], [], [], [
])])
# m4_divert_stack_push(MACRO-NAME, DIVERSION-NAME)
# ------------------------------------------------
# Form an entry of the diversion stack from caller MACRO-NAME and
# entering DIVERSION-NAME and push it.
m4_define([m4_divert_stack_push],
[m4_pushdef([_m4_divert_stack], m4_location[: $1: $2])])
# m4_divert(DIVERSION-NAME)
# -------------------------
# Change the diversion stream to DIVERSION-NAME.
m4_define([m4_divert],
[m4_popdef([_m4_divert_stack])]dnl
[m4_define([_m4_divert_diversion], [$1])]dnl
[m4_divert_stack_push([$0], [$1])]dnl
[_m4_divert_raw(_m4_divert([$1]))])
# m4_divert_push(DIVERSION-NAME, [NOWARN])
# ----------------------------------------
# Change the diversion stream to DIVERSION-NAME, while stacking old values.
# For internal use only: if NOWARN is not empty, DIVERSION-NAME can be a
# number instead of a name.
m4_define([m4_divert_push],
[m4_divert_stack_push([$0], [$1])]dnl
[m4_pushdef([_m4_divert_diversion], [$1])]dnl
[_m4_divert_raw(_m4_divert([$1], [$2]))])
# m4_divert_pop([DIVERSION-NAME])
# -------------------------------
# Change the diversion stream to its previous value, unstacking it.
# If specified, verify we left DIVERSION-NAME.
# When we pop the last value from the stack, we divert to -1.
m4_define([m4_divert_pop],
[m4_if([$1], [], [],
[$1], _m4_defn([_m4_divert_diversion]), [],
[m4_fatal([$0($1): diversion mismatch:
]m4_divert_stack)])]dnl
[_m4_popdef([_m4_divert_stack], [_m4_divert_diversion])]dnl
[m4_ifdef([_m4_divert_diversion], [],
[m4_fatal([too many m4_divert_pop])])]dnl
[_m4_divert_raw(_m4_divert(_m4_defn([_m4_divert_diversion]), [-]))])
# m4_divert_text(DIVERSION-NAME, CONTENT)
# ---------------------------------------
# Output CONTENT into DIVERSION-NAME (which may be a number actually).
# An end of line is appended for free to CONTENT.
m4_define([m4_divert_text],
[m4_divert_push([$1])$2
m4_divert_pop([$1])])
# m4_divert_once(DIVERSION-NAME, CONTENT)
# ---------------------------------------
# Output CONTENT into DIVERSION-NAME once, if not already there.
# An end of line is appended for free to CONTENT.
m4_define([m4_divert_once],
[m4_expand_once([m4_divert_text([$1], [$2])])])
# _m4_divert_unsafe(DIVERSION-NAME)
# ---------------------------------
# Issue a warning that the attempt to change the current diversion to
# DIVERSION-NAME is unsafe, because this macro is being expanded
# during argument collection of m4_expand.
m4_define([_m4_divert_unsafe],
[m4_fatal([$0: cannot change diversion to `$1' inside m4_expand])])
# m4_undivert(DIVERSION-NAME...)
# ------------------------------
# Undivert DIVERSION-NAME. Unlike the M4 version, this requires at
# least one DIVERSION-NAME; also, due to support for named diversions,
# this should not be used to undivert files.
m4_define([m4_undivert],
[m4_if([$#], [0], [m4_fatal([$0: missing argument])],
[$#], [1], [_m4_undivert(_m4_divert([$1]))],
[m4_map_args([$0], $@)])])
## --------------------------------------------- ##
## 10. Defining macros with bells and whistles. ##
## --------------------------------------------- ##
# `m4_defun' is basically `m4_define' but it equips the macro with the
# needed machinery for `m4_require'. A macro must be m4_defun'd if
# either it is m4_require'd, or it m4_require's.
#
# Two things deserve attention and are detailed below:
# 1. Implementation of m4_require
# 2. Keeping track of the expansion stack
#
# 1. Implementation of m4_require
# ===============================
#
# Of course m4_defun calls m4_provide, so that a macro which has
# been expanded is not expanded again when m4_require'd, but the
# difficult part is the proper expansion of macros when they are
# m4_require'd.
#
# The implementation is based on three ideas, (i) using diversions to
# prepare the expansion of the macro and its dependencies (by Franc,ois
# Pinard), (ii) expand the most recently m4_require'd macros _after_
# the previous macros (by Axel Thimm), and (iii) track instances of
# provide before require (by Eric Blake).
#
#
# The first idea: why use diversions?
# -----------------------------------
#
# When a macro requires another, the other macro is expanded in new
# diversion, GROW. When the outer macro is fully expanded, we first
# undivert the most nested diversions (GROW - 1...), and finally
# undivert GROW. To understand why we need several diversions,
# consider the following example:
#
# | m4_defun([TEST1], [Test...m4_require([TEST2])1])
# | m4_defun([TEST2], [Test...m4_require([TEST3])2])
# | m4_defun([TEST3], [Test...3])
#
# Because m4_require is not required to be first in the outer macros, we
# must keep the expansions of the various levels of m4_require separated.
# Right before executing the epilogue of TEST1, we have:
#
# GROW - 2: Test...3
# GROW - 1: Test...2
# GROW: Test...1
# BODY:
#
# Finally the epilogue of TEST1 undiverts GROW - 2, GROW - 1, and
# GROW into the regular flow, BODY.
#
# GROW - 2:
# GROW - 1:
# GROW:
# BODY: Test...3; Test...2; Test...1
#
# (The semicolons are here for clarification, but of course are not
# emitted.) This is what Autoconf 2.0 (I think) to 2.13 (I'm sure)
# implement.
#
#
# The second idea: first required first out
# -----------------------------------------
#
# The natural implementation of the idea above is buggy and produces
# very surprising results in some situations. Let's consider the
# following example to explain the bug:
#
# | m4_defun([TEST1], [m4_require([TEST2a])m4_require([TEST2b])])
# | m4_defun([TEST2a], [])
# | m4_defun([TEST2b], [m4_require([TEST3])])
# | m4_defun([TEST3], [m4_require([TEST2a])])
# |
# | AC_INIT
# | TEST1
#
# The dependencies between the macros are:
#
# 3 --- 2b
# / \ is m4_require'd by
# / \ left -------------------- right
# 2a ------------ 1
#
# If you strictly apply the rules given in the previous section you get:
#
# GROW - 2: TEST3
# GROW - 1: TEST2a; TEST2b
# GROW: TEST1
# BODY:
#
# (TEST2a, although required by TEST3 is not expanded in GROW - 3
# because is has already been expanded before in GROW - 1, so it has
# been AC_PROVIDE'd, so it is not expanded again) so when you undivert
# the stack of diversions, you get:
#
# GROW - 2:
# GROW - 1:
# GROW:
# BODY: TEST3; TEST2a; TEST2b; TEST1
#
# i.e., TEST2a is expanded after TEST3 although the latter required the
# former.
#
# Starting from 2.50, we use an implementation provided by Axel Thimm.
# The idea is simple: the order in which macros are emitted must be the
# same as the one in which macros are expanded. (The bug above can
# indeed be described as: a macro has been m4_provide'd before its
# dependent, but it is emitted after: the lack of correlation between
# emission and expansion order is guilty).
#
# How to do that? You keep the stack of diversions to elaborate the
# macros, but each time a macro is fully expanded, emit it immediately.
#
# In the example above, when TEST2a is expanded, but it's epilogue is
# not run yet, you have:
#
# GROW - 2:
# GROW - 1: TEST2a
# GROW: Elaboration of TEST1
# BODY:
#
# The epilogue of TEST2a emits it immediately:
#
# GROW - 2:
# GROW - 1:
# GROW: Elaboration of TEST1
# BODY: TEST2a
#
# TEST2b then requires TEST3, so right before the epilogue of TEST3, you
# have:
#
# GROW - 2: TEST3
# GROW - 1: Elaboration of TEST2b
# GROW: Elaboration of TEST1
# BODY: TEST2a
#
# The epilogue of TEST3 emits it:
#
# GROW - 2:
# GROW - 1: Elaboration of TEST2b
# GROW: Elaboration of TEST1
# BODY: TEST2a; TEST3
#
# TEST2b is now completely expanded, and emitted:
#
# GROW - 2:
# GROW - 1:
# GROW: Elaboration of TEST1
# BODY: TEST2a; TEST3; TEST2b
#
# and finally, TEST1 is finished and emitted:
#
# GROW - 2:
# GROW - 1:
# GROW:
# BODY: TEST2a; TEST3; TEST2b: TEST1
#
# The idea is simple, but the implementation is a bit involved. If
# you are like me, you will want to see the actual functioning of this
# implementation to be convinced. The next section gives the full
# details.
#
#
# The Axel Thimm implementation at work
# -------------------------------------
#
# We consider the macros above, and this configure.ac:
#
# AC_INIT
# TEST1
#
# You should keep the definitions of _m4_defun_pro, _m4_defun_epi, and
# m4_require at hand to follow the steps.
#
# This implementation tries not to assume that the current diversion is
# BODY, so as soon as a macro (m4_defun'd) is expanded, we first
# record the current diversion under the name _m4_divert_dump (denoted
# DUMP below for short). This introduces an important difference with
# the previous versions of Autoconf: you cannot use m4_require if you
# are not inside an m4_defun'd macro, and especially, you cannot
# m4_require directly from the top level.
#
# We have not tried to simulate the old behavior (better yet, we
# diagnose it), because it is too dangerous: a macro m4_require'd from
# the top level is expanded before the body of `configure', i.e., before
# any other test was run. I let you imagine the result of requiring
# AC_STDC_HEADERS for instance, before AC_PROG_CC was actually run....
#
# After AC_INIT was run, the current diversion is BODY.
# * AC_INIT was run
# DUMP: undefined
# diversion stack: BODY |-
#
# * TEST1 is expanded
# The prologue of TEST1 sets _m4_divert_dump, which is the diversion
# where the current elaboration will be dumped, to the current
# diversion. It also m4_divert_push to GROW, where the full
# expansion of TEST1 and its dependencies will be elaborated.
# DUMP: BODY
# BODY: empty
# diversions: GROW, BODY |-
#
# * TEST1 requires TEST2a
# _m4_require_call m4_divert_pushes another temporary diversion,
# GROW - 1, and expands TEST2a in there.
# DUMP: BODY
# BODY: empty
# GROW - 1: TEST2a
# diversions: GROW - 1, GROW, BODY |-
# Then the content of the temporary diversion is moved to DUMP and the
# temporary diversion is popped.
# DUMP: BODY
# BODY: TEST2a
# diversions: GROW, BODY |-
#
# * TEST1 requires TEST2b
# Again, _m4_require_call pushes GROW - 1 and heads to expand TEST2b.
# DUMP: BODY
# BODY: TEST2a
# diversions: GROW - 1, GROW, BODY |-
#
# * TEST2b requires TEST3
# _m4_require_call pushes GROW - 2 and expands TEST3 here.
# (TEST3 requires TEST2a, but TEST2a has already been m4_provide'd, so
# nothing happens.)
# DUMP: BODY
# BODY: TEST2a
# GROW - 2: TEST3
# diversions: GROW - 2, GROW - 1, GROW, BODY |-
# Then the diversion is appended to DUMP, and popped.
# DUMP: BODY
# BODY: TEST2a; TEST3
# diversions: GROW - 1, GROW, BODY |-
#
# * TEST1 requires TEST2b (contd.)
# The content of TEST2b is expanded...
# DUMP: BODY
# BODY: TEST2a; TEST3
# GROW - 1: TEST2b,
# diversions: GROW - 1, GROW, BODY |-
# ... and moved to DUMP.
# DUMP: BODY
# BODY: TEST2a; TEST3; TEST2b
# diversions: GROW, BODY |-
#
# * TEST1 is expanded: epilogue
# TEST1's own content is in GROW...
# DUMP: BODY
# BODY: TEST2a; TEST3; TEST2b
# GROW: TEST1
# diversions: BODY |-
# ... and it's epilogue moves it to DUMP and then undefines DUMP.
# DUMP: undefined
# BODY: TEST2a; TEST3; TEST2b; TEST1
# diversions: BODY |-
#
#
# The third idea: track macros provided before they were required
# ---------------------------------------------------------------
#
# Using just the first two ideas, Autoconf 2.50 through 2.63 still had
# a subtle bug for more than seven years. Let's consider the
# following example to explain the bug:
#
# | m4_defun([TEST1], [1])
# | m4_defun([TEST2], [2[]m4_require([TEST1])])
# | m4_defun([TEST3], [3 TEST1 m4_require([TEST2])])
# | TEST3
#
# After the prologue of TEST3, we are collecting text in GROW with the
# intent of dumping it in BODY during the epilogue. Next, we
# encounter the direct invocation of TEST1, which provides the macro
# in place in GROW. From there, we encounter a requirement for TEST2,
# which must be collected in a new diversion. While expanding TEST2,
# we encounter a requirement for TEST1, but since it has already been
# expanded, the Axel Thimm algorithm states that we can treat it as a
# no-op. But that would lead to an end result of `2 3 1', meaning
# that we have once again output a macro (TEST2) prior to its
# requirements (TEST1).
#
# The problem can only occur if a single defun'd macro first provides,
# then later indirectly requires, the same macro. Note that directly
# expanding then requiring a macro is okay: because the dependency was
# met, the require phase can be a no-op. For that matter, the outer
# macro can even require two helpers, where the first helper expands
# the macro, and the second helper indirectly requires the macro.
# Out-of-order expansion is only present if the inner macro is
# required by something that will be hoisted in front of where the
# direct expansion occurred. In other words, we must be careful not
# to warn on:
#
# | m4_defun([TEST4], [4])
# | m4_defun([TEST5], [5 TEST4 m4_require([TEST4])])
# | TEST5 => 5 4
#
# or even the more complex:
#
# | m4_defun([TEST6], [6])
# | m4_defun([TEST7], [7 TEST6])
# | m4_defun([TEST8], [8 m4_require([TEST6])])
# | m4_defun([TEST9], [9 m4_require([TEST8])])
# | m4_defun([TEST10], [10 m4_require([TEST7]) m4_require([TEST9])])
# | TEST10 => 7 6 8 9 10
#
# So, to detect whether a require was direct or indirect, m4_defun and
# m4_require track the name of the macro that caused a diversion to be
# created (using the stack _m4_diverting, coupled with an O(1) lookup
# _m4_diverting([NAME])), and m4_provide stores the name associated
# with the diversion at which a macro was provided. A require call is
# direct if it occurs within the same diversion where the macro was
# provided, or if the diversion associated with the providing context
# has been collected.
#
# The implementation of the warning involves tracking the set of
# macros which have been provided since the start of the outermost
# defun'd macro (the set is named _m4_provide). When starting an
# outermost macro, the set is emptied; when a macro is provided, it is
# added to the set; when require expands the body of a macro, it is
# removed from the set; and when a macro is indirectly required, the
# set is checked. If a macro is in the set, then it has been provided
# before it was required, and we satisfy dependencies by expanding the
# macro as if it had never been provided; in the example given above,
# this means we now output `1 2 3 1'. Meanwhile, a warning is issued
# to inform the user that her macros trigger the bug in older autoconf
# versions, and that her output file now contains redundant contents
# (and possibly new problems, if the repeated macro was not
# idempotent). Meanwhile, macros defined by m4_defun_once instead of
# m4_defun are idempotent, avoiding any warning or duplicate output.
#
#
# 2. Keeping track of the expansion stack
# =======================================
#
# When M4 expansion goes wrong it is often extremely hard to find the
# path amongst macros that drove to the failure. What is needed is
# the stack of macro `calls'. One could imagine that GNU M4 would
# maintain a stack of macro expansions, unfortunately it doesn't, so
# we do it by hand. This is of course extremely costly, but the help
# this stack provides is worth it. Nevertheless to limit the
# performance penalty this is implemented only for m4_defun'd macros,
# not for define'd macros.
#
# Each time we enter an m4_defun'd macros, we add a definition in
# _m4_expansion_stack, and when we exit the macro, we remove it (thanks
# to pushdef/popdef). m4_stack_foreach is used to print the expansion
# stack in the rare cases when it's needed.
#
# In addition, we want to detect circular m4_require dependencies.
# Each time we expand a macro FOO we define _m4_expanding(FOO); and
# m4_require(BAR) simply checks whether _m4_expanding(BAR) is defined.
# m4_expansion_stack
# ------------------
# Expands to the entire contents of the expansion stack. The caller
# must supply a trailing newline. This macro always prints a
# location; check whether _m4_expansion_stack is defined to filter out
# the case when no defun'd macro is in force.
m4_define([m4_expansion_stack],
[m4_stack_foreach_sep_lifo([_$0], [_$0_entry(], [)
])m4_location[: the top level]])
# _m4_expansion_stack_entry(MACRO)
# --------------------------------
# Format an entry for MACRO found on the expansion stack.
m4_define([_m4_expansion_stack_entry],
[_m4_defn([m4_location($1)])[: $1 is expanded from...]])
# m4_expansion_stack_push(MACRO)
# ------------------------------
# Form an entry of the expansion stack on entry to MACRO and push it.
m4_define([m4_expansion_stack_push],
[m4_pushdef([_m4_expansion_stack], [$1])])
# _m4_divert(GROW)
# ----------------
# This diversion is used by the m4_defun/m4_require machinery. It is
# important to keep room before GROW because for each nested
# AC_REQUIRE we use an additional diversion (i.e., two m4_require's
# will use GROW - 2. More than 3 levels has never seemed to be
# needed.)
#
# ...
# - GROW - 2
# m4_require'd code, 2 level deep
# - GROW - 1
# m4_require'd code, 1 level deep
# - GROW
# m4_defun'd macros are elaborated here.
m4_define([_m4_divert(GROW)], 10000)
# _m4_defun_pro(MACRO-NAME)
# -------------------------
# The prologue for Autoconf macros.
#
# This is called frequently, so minimize the number of macro invocations
# by avoiding dnl and m4_defn overhead.
m4_define([_m4_defun_pro],
[m4_ifdef([_m4_expansion_stack], [], [_m4_defun_pro_outer([$1])])]dnl
[m4_expansion_stack_push([$1])m4_pushdef([_m4_expanding($1)])])
m4_define([_m4_defun_pro_outer],
[m4_set_delete([_m4_provide])]dnl
[m4_pushdef([_m4_diverting([$1])])m4_pushdef([_m4_diverting], [$1])]dnl
[m4_pushdef([_m4_divert_dump], m4_divnum)m4_divert_push([GROW])])
# _m4_defun_epi(MACRO-NAME)
# -------------------------
# The Epilogue for Autoconf macros. MACRO-NAME only helps tracing
# the PRO/EPI pairs.
#
# This is called frequently, so minimize the number of macro invocations
# by avoiding dnl and m4_popdef overhead.
m4_define([_m4_defun_epi],
[_m4_popdef([_m4_expanding($1)], [_m4_expansion_stack])]dnl
[m4_ifdef([_m4_expansion_stack], [], [_m4_defun_epi_outer([$1])])]dnl
[m4_provide([$1])])
m4_define([_m4_defun_epi_outer],
[_m4_popdef([_m4_divert_dump], [_m4_diverting([$1])], [_m4_diverting])]dnl
[m4_divert_pop([GROW])m4_undivert([GROW])])
# _m4_divert_dump
# ---------------
# If blank, we are outside of any defun'd macro. Otherwise, expands
# to the diversion number (not name) where require'd macros should be
# moved once completed.
m4_define([_m4_divert_dump])
# m4_divert_require(DIVERSION, NAME-TO-CHECK, [BODY-TO-EXPAND])
# -------------------------------------------------------------
# Same as m4_require, but BODY-TO-EXPAND goes into the named DIVERSION;
# requirements still go in the current diversion though.
#
m4_define([m4_divert_require],
[m4_ifdef([_m4_expanding($2)],
[m4_fatal([$0: circular dependency of $2])])]dnl
[m4_if(_m4_divert_dump, [],
[m4_fatal([$0($2): cannot be used outside of an m4_defun'd macro])])]dnl
[m4_provide_if([$2], [],
[_m4_require_call([$2], [$3], _m4_divert([$1], [-]))])])
# m4_defun(NAME, EXPANSION, [MACRO = m4_define])
# ----------------------------------------------
# Define a macro NAME which automatically provides itself. Add
# machinery so the macro automatically switches expansion to the
# diversion stack if it is not already using it, prior to EXPANSION.
# In this case, once finished, it will bring back all the code
# accumulated in the diversion stack. This, combined with m4_require,
# achieves the topological ordering of macros. We don't use this
# macro to define some frequently called macros that are not involved
# in ordering constraints, to save m4 processing.
#
# MACRO is an undocumented argument; when set to m4_pushdef, and NAME
# is already defined, the new definition is added to the pushdef
# stack, rather than overwriting the current definition. It can thus
# be used to write self-modifying macros, which pop themselves to a
# previously m4_define'd definition so that subsequent use of the
# macro is faster.
m4_define([m4_defun],
[m4_define([m4_location($1)], m4_location)]dnl
[m4_default([$3], [m4_define])([$1],
[_m4_defun_pro(]m4_dquote($[0])[)$2[]_m4_defun_epi(]m4_dquote($[0])[)])])
# m4_defun_init(NAME, INIT, COMMON)
# ---------------------------------
# Like m4_defun, but split EXPANSION into two portions: INIT which is
# done only the first time NAME is invoked, and COMMON which is
# expanded every time.
#
# For now, the COMMON definition is always m4_define'd, giving an even
# lighter-weight definition. m4_defun allows self-providing, but once
# a macro is provided, m4_require no longer cares if it is m4_define'd
# or m4_defun'd. m4_defun also provides location tracking to identify
# dependency bugs, but once the INIT has been expanded, we know there
# are no dependency bugs. However, if a future use needs COMMON to be
# m4_defun'd, we can add a parameter, similar to the third parameter
# to m4_defun.
m4_define([m4_defun_init],
[m4_define([$1], [$3[]])m4_defun([$1],
[$2[]_m4_popdef(]m4_dquote($[0])[)m4_indir(]m4_dquote($[0])dnl
[m4_if(]m4_dquote($[#])[, [0], [], ]m4_dquote([,$]@)[))], [m4_pushdef])])
# m4_defun_once(NAME, EXPANSION)
# ------------------------------
# Like m4_defun, but guarantee that EXPANSION only happens once
# (thereafter, using NAME is a no-op).
#
# If _m4_divert_dump is empty, we are called at the top level;
# otherwise, we must ensure that we are required in front of the
# current defun'd macro. Use a helper macro so that EXPANSION need
# only occur once in the definition of NAME, since it might be large.
m4_define([m4_defun_once],
[m4_define([m4_location($1)], m4_location)]dnl
[m4_define([$1], [_m4_defun_once([$1], [$2], m4_if(_m4_divert_dump, [],
[[_m4_defun_pro([$1])m4_unquote(], [)_m4_defun_epi([$1])]],
m4_ifdef([_m4_diverting([$1])], [-]), [-], [[m4_unquote(], [)]],
[[_m4_require_call([$1],], [, _m4_divert_dump)]]))])])
m4_define([_m4_defun_once],
[m4_pushdef([$1])$3[$2[]m4_provide([$1])]$4])
# m4_pattern_forbid(ERE, [WHY])
# -----------------------------
# Declare that no token matching the forbidden extended regular
# expression ERE should be seen in the output unless...
m4_define([m4_pattern_forbid], [])
# m4_pattern_allow(ERE)
# ---------------------
# ... that token also matches the allowed extended regular expression ERE.
# Both used via traces.
m4_define([m4_pattern_allow], [])
## --------------------------------- ##
## 11. Dependencies between macros. ##
## --------------------------------- ##
# m4_before(THIS-MACRO-NAME, CALLED-MACRO-NAME)
# ---------------------------------------------
# Issue a warning if CALLED-MACRO-NAME was called before THIS-MACRO-NAME.
m4_define([m4_before],
[m4_provide_if([$2],
[m4_warn([syntax], [$2 was called before $1])])])
# m4_require(NAME-TO-CHECK, [BODY-TO-EXPAND = NAME-TO-CHECK])
# -----------------------------------------------------------
# If NAME-TO-CHECK has never been expanded (actually, if it is not
# m4_provide'd), expand BODY-TO-EXPAND *before* the current macro
# expansion; follow the expansion with a newline. Once expanded, emit
# it in _m4_divert_dump. Keep track of the m4_require chain in
# _m4_expansion_stack.
#
# The normal cases are:
#
# - NAME-TO-CHECK == BODY-TO-EXPAND
# Which you can use for regular macros with or without arguments, e.g.,
# m4_require([AC_PROG_CC], [AC_PROG_CC])
# m4_require([AC_CHECK_HEADERS(limits.h)], [AC_CHECK_HEADERS(limits.h)])
# which is just the same as
# m4_require([AC_PROG_CC])
# m4_require([AC_CHECK_HEADERS(limits.h)])
#
# - BODY-TO-EXPAND == m4_indir([NAME-TO-CHECK])
# In the case of macros with irregular names. For instance:
# m4_require([AC_LANG_COMPILER(C)], [indir([AC_LANG_COMPILER(C)])])
# which means `if the macro named `AC_LANG_COMPILER(C)' (the parens are
# part of the name, it is not an argument) has not been run, then
# call it.'
# Had you used
# m4_require([AC_LANG_COMPILER(C)], [AC_LANG_COMPILER(C)])
# then m4_require would have tried to expand `AC_LANG_COMPILER(C)', i.e.,
# call the macro `AC_LANG_COMPILER' with `C' as argument.
#
# You could argue that `AC_LANG_COMPILER', when it receives an argument
# such as `C' should dispatch the call to `AC_LANG_COMPILER(C)'. But this
# `extension' prevents `AC_LANG_COMPILER' from having actual arguments that
# it passes to `AC_LANG_COMPILER(C)'.
#
# This is called frequently, so minimize the number of macro invocations
# by avoiding dnl and other overhead on the common path.
m4_define([m4_require],
[m4_ifdef([_m4_expanding($1)],
[m4_fatal([$0: circular dependency of $1])])]dnl
[m4_if(_m4_divert_dump, [],
[m4_fatal([$0($1): cannot be used outside of an ]dnl
m4_if([$0], [m4_require], [[m4_defun]], [[AC_DEFUN]])['d macro])])]dnl
[m4_provide_if([$1], [m4_set_contains([_m4_provide], [$1],
[_m4_require_check([$1], _m4_defn([m4_provide($1)]), [$0])], [m4_ignore])],
[_m4_require_call])([$1], [$2], _m4_divert_dump)])
# _m4_require_call(NAME-TO-CHECK, [BODY-TO-EXPAND = NAME-TO-CHECK],
# DIVERSION-NUMBER)
# -----------------------------------------------------------------
# If m4_require decides to expand the body, it calls this macro. The
# expansion is placed in DIVERSION-NUMBER.
#
# This is called frequently, so minimize the number of macro invocations
# by avoiding dnl and other overhead on the common path.
m4_define([_m4_require_call],
[m4_pushdef([_m4_divert_grow], m4_decr(_m4_divert_grow))]dnl
[m4_pushdef([_m4_diverting([$1])])m4_pushdef([_m4_diverting], [$1])]dnl
[m4_divert_push(_m4_divert_grow, [-])]dnl
[m4_if([$2], [], [$1], [$2])
m4_provide_if([$1], [m4_set_remove([_m4_provide], [$1])],
[m4_warn([syntax], [$1 is m4_require'd but not m4_defun'd])])]dnl
[_m4_divert_raw($3)_m4_undivert(_m4_divert_grow)]dnl
[m4_divert_pop(_m4_divert_grow)_m4_popdef([_m4_divert_grow],
[_m4_diverting([$1])], [_m4_diverting])])
# _m4_require_check(NAME-TO-CHECK, OWNER, CALLER)
# -----------------------------------------------
# NAME-TO-CHECK has been identified as previously expanded in the
# diversion owned by OWNER. If this is a problem, warn on behalf of
# CALLER and return _m4_require_call; otherwise return m4_ignore.
m4_define([_m4_require_check],
[m4_if(_m4_defn([_m4_diverting]), [$2], [m4_ignore],
m4_ifdef([_m4_diverting([$2])], [-]), [-], [m4_warn([syntax],
[$3: `$1' was expanded before it was required
http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required])_m4_require_call],
[m4_ignore])])
# _m4_divert_grow
# ---------------
# The counter for _m4_require_call.
m4_define([_m4_divert_grow], _m4_divert([GROW]))
# m4_expand_once(TEXT, [WITNESS = TEXT])
# --------------------------------------
# If TEXT has never been expanded, expand it *here*. Use WITNESS as
# as a memory that TEXT has already been expanded.
m4_define([m4_expand_once],
[m4_provide_if(m4_default_quoted([$2], [$1]),
[],
[m4_provide(m4_default_quoted([$2], [$1]))[]$1])])
# m4_provide(MACRO-NAME)
# ----------------------
m4_define([m4_provide],
[m4_ifdef([m4_provide($1)], [],
[m4_set_add([_m4_provide], [$1], [m4_define([m4_provide($1)],
m4_ifdef([_m4_diverting], [_m4_defn([_m4_diverting])]))])])])
# m4_provide_if(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
# -------------------------------------------------------
# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
# The purpose of this macro is to provide the user with a means to
# check macros which are provided without letting her know how the
# information is coded.
m4_define([m4_provide_if],
[m4_ifdef([m4_provide($1)],
[$2], [$3])])
## --------------------- ##
## 12. Text processing. ##
## --------------------- ##
# m4_cr_letters
# m4_cr_LETTERS
# m4_cr_Letters
# -------------
m4_define([m4_cr_letters], [abcdefghijklmnopqrstuvwxyz])
m4_define([m4_cr_LETTERS], [ABCDEFGHIJKLMNOPQRSTUVWXYZ])
m4_define([m4_cr_Letters],
m4_defn([m4_cr_letters])dnl
m4_defn([m4_cr_LETTERS])dnl
)
# m4_cr_digits
# ------------
m4_define([m4_cr_digits], [0123456789])
# m4_cr_alnum
# -----------
m4_define([m4_cr_alnum],
m4_defn([m4_cr_Letters])dnl
m4_defn([m4_cr_digits])dnl
)
# m4_cr_symbols1
# m4_cr_symbols2
# --------------
m4_define([m4_cr_symbols1],
m4_defn([m4_cr_Letters])dnl
_)
m4_define([m4_cr_symbols2],
m4_defn([m4_cr_symbols1])dnl
m4_defn([m4_cr_digits])dnl
)
# m4_cr_all
# ---------
# The character range representing everything, with `-' as the last
# character, since it is special to m4_translit. Use with care, because
# it contains characters special to M4 (fortunately, both ASCII and EBCDIC
# have [] in order, so m4_defn([m4_cr_all]) remains a valid string). It
# also contains characters special to terminals, so it should never be
# displayed in an error message. Also, attempts to map [ and ] to other
# characters via m4_translit must deal with the fact that m4_translit does
# not add quotes to the output.
#
# In EBCDIC, $ is immediately followed by *, which leads to problems
# if m4_cr_all is inlined into a macro definition; so swap them.
#
# It is mainly useful in generating inverted character range maps, for use
# in places where m4_translit is faster than an equivalent m4_bpatsubst;
# the regex `[^a-z]' is equivalent to:
# m4_translit(m4_dquote(m4_defn([m4_cr_all])), [a-z])
m4_define([m4_cr_all],
m4_translit(m4_dquote(m4_format(m4_dquote(m4_for(
,1,255,,[[%c]]))m4_for([i],1,255,,[,i]))), [$*-], [*$])-)
# _m4_define_cr_not(CATEGORY)
# ---------------------------
# Define m4_cr_not_CATEGORY as the inverse of m4_cr_CATEGORY.
m4_define([_m4_define_cr_not],
[m4_define([m4_cr_not_$1],
m4_translit(m4_dquote(m4_defn([m4_cr_all])),
m4_defn([m4_cr_$1])))])
# m4_cr_not_letters
# m4_cr_not_LETTERS
# m4_cr_not_Letters
# m4_cr_not_digits
# m4_cr_not_alnum
# m4_cr_not_symbols1
# m4_cr_not_symbols2
# ------------------
# Inverse character sets
_m4_define_cr_not([letters])
_m4_define_cr_not([LETTERS])
_m4_define_cr_not([Letters])
_m4_define_cr_not([digits])
_m4_define_cr_not([alnum])
_m4_define_cr_not([symbols1])
_m4_define_cr_not([symbols2])
# m4_newline([STRING])
# --------------------
# Expands to a newline, possibly followed by STRING. Exists mostly for
# formatting reasons.
m4_define([m4_newline], [
$1])
# m4_re_escape(STRING)
# --------------------
# Escape RE active characters in STRING.
m4_define([m4_re_escape],
[m4_bpatsubst([$1],
[[][*+.?\^$]], [\\\&])])
# m4_re_string
# ------------
# Regexp for `[a-zA-Z_0-9]*'
# m4_dquote provides literal [] for the character class.
m4_define([m4_re_string],
m4_dquote(m4_defn([m4_cr_symbols2]))dnl
[*]dnl
)
# m4_re_word
# ----------
# Regexp for `[a-zA-Z_][a-zA-Z_0-9]*'
m4_define([m4_re_word],
m4_dquote(m4_defn([m4_cr_symbols1]))dnl
m4_defn([m4_re_string])dnl
)
# m4_tolower(STRING)
# m4_toupper(STRING)
# ------------------
# These macros convert STRING to lowercase or uppercase.
#
# Rather than expand the m4_defn each time, we inline them up front.
m4_define([m4_tolower],
[m4_translit([[$1]], ]m4_dquote(m4_defn([m4_cr_LETTERS]))[,
]m4_dquote(m4_defn([m4_cr_letters]))[)])
m4_define([m4_toupper],
[m4_translit([[$1]], ]m4_dquote(m4_defn([m4_cr_letters]))[,
]m4_dquote(m4_defn([m4_cr_LETTERS]))[)])
# m4_split(STRING, [REGEXP])
# --------------------------
# Split STRING into an m4 list of quoted elements. The elements are
# quoted with [ and ]. Beginning spaces and end spaces *are kept*.
# Use m4_strip to remove them.
#
# REGEXP specifies where to split. Default is [\t ]+.
#
# If STRING is empty, the result is an empty list.
#
# Pay attention to the m4_changequotes. When m4 reads the definition of
# m4_split, it still has quotes set to [ and ]. Luckily, these are matched
# in the macro body, so the definition is stored correctly. Use the same
# alternate quotes as m4_noquote; it must be unlikely to appear in $1.
#
# Also, notice that $1 is quoted twice, since we want the result to
# be quoted. Then you should understand that the argument of
# patsubst is -=<{(STRING)}>=- (i.e., with additional -=<{( and )}>=-).
#
# This macro is safe on active symbols, i.e.:
# m4_define(active, ACTIVE)
# m4_split([active active ])end
# => [active], [active], []end
#
# Optimize on regex of ` ' (space), since m4_foreach_w already guarantees
# that the list contains single space separators, and a common case is
# splitting a single-element list. This macro is called frequently,
# so avoid unnecessary dnl inside the definition.
m4_define([m4_split],
[m4_if([$1], [], [],
[$2], [ ], [m4_if(m4_index([$1], [ ]), [-1], [[[$1]]],
[_$0([$1], [$2], [, ])])],
[$2], [], [_$0([$1], [[ ]+], [, ])],
[_$0([$1], [$2], [, ])])])
m4_define([_m4_split],
[m4_changequote([-=<{(],[)}>=-])]dnl
[[m4_bpatsubst(-=<{(-=<{($1)}>=-)}>=-, -=<{($2)}>=-,
-=<{(]$3[)}>=-)]m4_changequote([, ])])
# m4_chomp(STRING)
# m4_chomp_all(STRING)
# --------------------
# Return STRING quoted, but without a trailing newline. m4_chomp
# removes at most one newline, while m4_chomp_all removes all
# consecutive trailing newlines. Embedded newlines are not touched,
# and a trailing backslash-newline leaves just a trailing backslash.
#
# m4_bregexp is slower than m4_index, and we don't always want to
# remove all newlines; hence the two variants. We massage characters
# to give a nicer pattern to match, particularly since m4_bregexp is
# line-oriented. Both versions must guarantee a match, to avoid bugs
# with precision -1 in m4_format in older m4.
m4_define([m4_chomp],
[m4_format([[%.*s]], m4_index(m4_translit([[$1]], [
/.], [/ ])[./.], [/.]), [$1])])
m4_define([m4_chomp_all],
[m4_format([[%.*s]], m4_bregexp(m4_translit([[$1]], [
/], [/ ]), [/*$]), [$1])])
# m4_flatten(STRING)
# ------------------
# If STRING contains end of lines, replace them with spaces. If there
# are backslashed end of lines, remove them. This macro is safe with
# active symbols.
# m4_define(active, ACTIVE)
# m4_flatten([active
# act\
# ive])end
# => active activeend
#
# In m4, m4_bpatsubst is expensive, so first check for a newline.
m4_define([m4_flatten],
[m4_if(m4_index([$1], [
]), [-1], [[$1]],
[m4_translit(m4_bpatsubst([[[$1]]], [\\
]), [
], [ ])])])
# m4_strip(STRING)
# ----------------
# Expands into STRING with tabs and spaces singled out into a single
# space, and removing leading and trailing spaces.
#
# This macro is robust to active symbols.
# m4_define(active, ACTIVE)
# m4_strip([ active active ])end
# => active activeend
#
# First, notice that we guarantee trailing space. Why? Because regular
# expressions are greedy, and `.* ?' would always group the space into the
# .* portion. The algorithm is simpler by avoiding `?' at the end. The
# algorithm correctly strips everything if STRING is just ` '.
#
# Then notice the second pattern: it is in charge of removing the
# leading/trailing spaces. Why not just `[^ ]'? Because they are
# applied to over-quoted strings, i.e. more or less [STRING], due
# to the limitations of m4_bpatsubsts. So the leading space in STRING
# is the *second* character; equally for the trailing space.
m4_define([m4_strip],
[m4_bpatsubsts([$1 ],
[[ ]+], [ ],
[^. ?\(.*\) .$], [[[\1]]])])
# m4_normalize(STRING)
# --------------------
# Apply m4_flatten and m4_strip to STRING.
#
# The argument is quoted, so that the macro is robust to active symbols:
#
# m4_define(active, ACTIVE)
# m4_normalize([ act\
# ive
# active ])end
# => active activeend
m4_define([m4_normalize],
[m4_strip(m4_flatten([$1]))])
# m4_join(SEP, ARG1, ARG2...)
# ---------------------------
# Produce ARG1SEPARG2...SEPARGn. Avoid back-to-back SEP when a given ARG
# is the empty string. No expansion is performed on SEP or ARGs.
#
# Since the number of arguments to join can be arbitrarily long, we
# want to avoid having more than one $@ in the macro definition;
# otherwise, the expansion would require twice the memory of the already
# long list. Hence, m4_join merely looks for the first non-empty element,
# and outputs just that element; while _m4_join looks for all non-empty
# elements, and outputs them following a separator. The final trick to
# note is that we decide between recursing with $0 or _$0 based on the
# nested m4_if ending with `_'.
#
# Please keep foreach.m4 in sync with any adjustments made here.
m4_define([m4_join],
[m4_if([$#], [1], [],
[$#], [2], [[$2]],
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift2($@))])])
m4_define([_m4_join],
[m4_if([$#$2], [2], [],
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift2($@))])])
# m4_joinall(SEP, ARG1, ARG2...)
# ------------------------------
# Produce ARG1SEPARG2...SEPARGn. An empty ARG results in back-to-back SEP.
# No expansion is performed on SEP or ARGs.
#
# Please keep foreach.m4 in sync with any adjustments made here.
m4_define([m4_joinall], [[$2]_$0([$1], m4_shift($@))])
m4_define([_m4_joinall],
[m4_if([$#], [2], [], [[$1$3]$0([$1], m4_shift2($@))])])
# m4_combine([SEPARATOR], PREFIX-LIST, [INFIX], SUFFIX...)
# --------------------------------------------------------
# Produce the pairwise combination of every element in the quoted,
# comma-separated PREFIX-LIST with every element from the SUFFIX arguments.
# Each pair is joined with INFIX, and pairs are separated by SEPARATOR.
# No expansion occurs on SEPARATOR, INFIX, or elements of either list.
#
# For example:
# m4_combine([, ], [[a], [b], [c]], [-], [1], [2], [3])
# => a-1, a-2, a-3, b-1, b-2, b-3, c-1, c-2, c-3
#
# This definition is a bit hairy; the thing to realize is that we want
# to construct m4_map_args_sep([[prefix$3]], [], [[$1]], m4_shift3($@))
# as the inner loop, using each prefix generated by the outer loop,
# and without recalculating m4_shift3 every outer iteration.
m4_define([m4_combine],
[m4_if([$2], [], [], m4_eval([$# > 3]), [1],
[m4_map_args_sep([m4_map_args_sep(m4_dquote(], [)[[$3]], [], [[$1]],]]]dnl
[m4_dquote(m4_dquote(m4_shift3($@)))[[)], [[$1]], $2)])])
# m4_append(MACRO-NAME, STRING, [SEPARATOR])
# ------------------------------------------
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR`'STRING'
# at the end. It is valid to use this macro with MACRO-NAME undefined,
# in which case no SEPARATOR is added. Be aware that the criterion is
# `not being defined', and not `not being empty'.
#
# Note that neither STRING nor SEPARATOR are expanded here; rather, when
# you expand MACRO-NAME, they will be expanded at that point in time.
#
# This macro is robust to active symbols. It can be used to grow
# strings.
#
# | m4_define(active, ACTIVE)dnl
# | m4_append([sentence], [This is an])dnl
# | m4_append([sentence], [ active ])dnl
# | m4_append([sentence], [symbol.])dnl
# | sentence
# | m4_undefine([active])dnl
# | sentence
# => This is an ACTIVE symbol.
# => This is an active symbol.
#
# It can be used to define hooks.
#
# | m4_define(active, ACTIVE)dnl
# | m4_append([hooks], [m4_define([act1], [act2])])dnl
# | m4_append([hooks], [m4_define([act2], [active])])dnl
# | m4_undefine([active])dnl
# | act1
# | hooks
# | act1
# => act1
# =>
# => active
#
# It can also be used to create lists, although this particular usage was
# broken prior to autoconf 2.62.
# | m4_append([list], [one], [, ])dnl
# | m4_append([list], [two], [, ])dnl
# | m4_append([list], [three], [, ])dnl
# | list
# | m4_dquote(list)
# => one, two, three
# => [one],[two],[three]
#
# Note that m4_append can benefit from amortized O(n) m4 behavior, if
# the underlying m4 implementation is smart enough to avoid copying existing
# contents when enlarging a macro's definition into any pre-allocated storage
# (m4 1.4.x unfortunately does not implement this optimization). We do
# not implement m4_prepend, since it is inherently O(n^2) (pre-allocated
# storage only occurs at the end of a macro, so the existing contents must
# always be moved).
#
# Use _m4_defn for speed.
m4_define([m4_append],
[m4_define([$1], m4_ifdef([$1], [_m4_defn([$1])[$3]])[$2])])
# m4_append_uniq(MACRO-NAME, STRING, [SEPARATOR], [IF-UNIQ], [IF-DUP])
# --------------------------------------------------------------------
# Like `m4_append', but append only if not yet present. Additionally,
# expand IF-UNIQ if STRING was appended, or IF-DUP if STRING was already
# present. Also, warn if SEPARATOR is not empty and occurs within STRING,
# as the algorithm no longer guarantees uniqueness.
#
# Note that while m4_append can be O(n) (depending on the quality of the
# underlying M4 implementation), m4_append_uniq is inherently O(n^2)
# because each append operation searches the entire string.
m4_define([m4_append_uniq],
[m4_ifval([$3], [m4_if(m4_index([$2], [$3]), [-1], [],
[m4_warn([syntax],
[$0: `$2' contains `$3'])])])_$0($@)])
m4_define([_m4_append_uniq],
[m4_ifdef([$1],
[m4_if(m4_index([$3]_m4_defn([$1])[$3], [$3$2$3]), [-1],
[m4_append([$1], [$2], [$3])$4], [$5])],
[m4_define([$1], [$2])$4])])
# m4_append_uniq_w(MACRO-NAME, STRINGS)
# -------------------------------------
# For each of the words in the whitespace separated list STRINGS, append
# only the unique strings to the definition of MACRO-NAME.
#
# Use _m4_defn for speed.
m4_define([m4_append_uniq_w],
[m4_map_args_w([$2], [_m4_append_uniq([$1],], [, [ ])])])
# m4_escape(STRING)
# -----------------
# Output quoted STRING, but with embedded #, $, [ and ] turned into
# quadrigraphs.
#
# It is faster to check if STRING is already good using m4_translit
# than to blindly perform four m4_bpatsubst.
#
# Because the translit is stripping quotes, it must also neutralize
# anything that might be in a macro name, as well as comments, commas,
# and parentheses. All the problem characters are unified so that a
# single m4_index can scan the result.
#
# Rather than expand m4_defn every time m4_escape is expanded, we
# inline its expansion up front.
m4_define([m4_escape],
[m4_if(m4_index(m4_translit([$1],
[[]#,()]]m4_dquote(m4_defn([m4_cr_symbols2]))[, [$$$]), [$]),
[-1], [m4_echo], [_$0])([$1])])
m4_define([_m4_escape],
[m4_changequote([-=<{(],[)}>=-])]dnl
[m4_bpatsubst(m4_bpatsubst(m4_bpatsubst(m4_bpatsubst(
-=<{(-=<{(-=<{(-=<{(-=<{($1)}>=-)}>=-)}>=-)}>=-)}>=-,
-=<{(#)}>=-, -=<{(@%:@)}>=-),
-=<{(\[)}>=-, -=<{(@<:@)}>=-),
-=<{(\])}>=-, -=<{(@:>@)}>=-),
-=<{(\$)}>=-, -=<{(@S|@)}>=-)m4_changequote([,])])
# m4_text_wrap(STRING, [PREFIX], [FIRST-PREFIX], [WIDTH])
# -------------------------------------------------------
# Expands into STRING wrapped to hold in WIDTH columns (default = 79).
# If PREFIX is given, each line is prefixed with it. If FIRST-PREFIX is
# specified, then the first line is prefixed with it. As a special case,
# if the length of FIRST-PREFIX is greater than that of PREFIX, then
# FIRST-PREFIX will be left alone on the first line.
#
# No expansion occurs on the contents STRING, PREFIX, or FIRST-PREFIX,
# although quadrigraphs are correctly recognized. More precisely,
# you may redefine m4_qlen to recognize whatever escape sequences that
# you will post-process.
#
# Typical outputs are:
#
# m4_text_wrap([Short string */], [ ], [/* ], 20)
# => /* Short string */
#
# m4_text_wrap([Much longer string */], [ ], [/* ], 20)
# => /* Much longer
# => string */
#
# m4_text_wrap([Short doc.], [ ], [ --short ], 30)
# => --short Short doc.
#
# m4_text_wrap([Short doc.], [ ], [ --too-wide ], 30)
# => --too-wide
# => Short doc.
#
# m4_text_wrap([Super long documentation.], [ ], [ --too-wide ], 30)
# => --too-wide
# => Super long
# => documentation.
#
# FIXME: there is no checking of a longer PREFIX than WIDTH, but do
# we really want to bother with people trying each single corner
# of a software?
#
# This macro does not leave a trailing space behind the last word of a line,
# which complicates it a bit. The algorithm is otherwise stupid and simple:
# all the words are preceded by m4_Separator which is defined to empty for
# the first word, and then ` ' (single space) for all the others.
#
# The algorithm uses a helper that uses $2 through $4 directly, rather than
# using local variables, to avoid m4_defn overhead, or expansion swallowing
# any $. It also bypasses m4_popdef overhead with _m4_popdef since no user
# macro expansion occurs in the meantime. Also, the definition is written
# with m4_do, to avoid time wasted on dnl during expansion (since this is
# already a time-consuming macro).
m4_define([m4_text_wrap],
[_$0(m4_escape([$1]), [$2], m4_default_quoted([$3], [$2]),
m4_default_quoted([$4], [79]))])
m4_define([_m4_text_wrap],
m4_do(dnl set up local variables, to avoid repeated calculations
[[m4_pushdef([m4_Indent], m4_qlen([$2]))]],
[[m4_pushdef([m4_Cursor], m4_qlen([$3]))]],
[[m4_pushdef([m4_Separator], [m4_define([m4_Separator], [ ])])]],
dnl expand the first prefix, then check its length vs. regular prefix
dnl same length: nothing special
dnl prefix1 longer: output on line by itself, and reset cursor
dnl prefix1 shorter: pad to length of prefix, and reset cursor
[[[$3]m4_cond([m4_Cursor], m4_Indent, [],
[m4_eval(m4_Cursor > m4_Indent)], [1], [
[$2]m4_define([m4_Cursor], m4_Indent)],
[m4_format([%*s], m4_max([0],
m4_eval(m4_Indent - m4_Cursor)), [])m4_define([m4_Cursor], m4_Indent)])]],
dnl now, for each word, compute the cursor after the word is output, then
dnl check if the cursor would exceed the wrap column
dnl if so, reset cursor, and insert newline and prefix
dnl if not, insert the separator (usually a space)
dnl either way, insert the word
[[m4_map_args_w([$1], [$0_word(], [, [$2], [$4])])]],
dnl finally, clean up the local variables
[[_m4_popdef([m4_Separator], [m4_Cursor], [m4_Indent])]]))
m4_define([_m4_text_wrap_word],
[m4_define([m4_Cursor], m4_eval(m4_Cursor + m4_qlen([$1]) + 1))]dnl
[m4_if(m4_eval(m4_Cursor > ([$3])),
[1], [m4_define([m4_Cursor], m4_eval(m4_Indent + m4_qlen([$1]) + 1))
[$2]],
[m4_Separator[]])[$1]])
# m4_text_box(MESSAGE, [FRAME-CHARACTER = `-'])
# ---------------------------------------------
# Turn MESSAGE into:
# ## ------- ##
# ## MESSAGE ##
# ## ------- ##
# using FRAME-CHARACTER in the border.
#
# Quadrigraphs are correctly recognized. More precisely, you may
# redefine m4_qlen to recognize whatever escape sequences that you
# will post-process.
m4_define([m4_text_box],
[m4_pushdef([m4_Border],
m4_translit(m4_format([[[%*s]]], m4_decr(m4_qlen(_m4_expand([$1
]))), []), [ ], m4_default_quoted([$2], [-])))]dnl
[[##] _m4_defn([m4_Border]) [##]
[##] $1 [##]
[##] _m4_defn([m4_Border]) [##]_m4_popdef([m4_Border])])
# m4_qlen(STRING)
# ---------------
# Expands to the length of STRING after autom4te converts all quadrigraphs.
#
# If you use some other means of post-processing m4 output rather than
# autom4te, then you may redefine this macro to recognize whatever
# escape sequences your post-processor will handle. For that matter,
# m4_define([m4_qlen], m4_defn([m4_len])) is sufficient if you don't
# do any post-processing.
#
# Avoid bpatsubsts for the common case of no quadrigraphs. Cache
# results, as configure scripts tend to ask about lengths of common
# strings like `/*' and `*/' rather frequently. Minimize the number
# of times that $1 occurs in m4_qlen, so there is less text to parse
# on a cache hit.
m4_define([m4_qlen],
[m4_ifdef([$0-$1], [_m4_defn([$0-]], [_$0(])[$1])])
m4_define([_m4_qlen],
[m4_define([m4_qlen-$1],
m4_if(m4_index([$1], [@]), [-1], [m4_len([$1])],
[m4_len(m4_bpatsubst([[$1]],
[@\(\(<:\|:>\|S|\|%:\|\{:\|:\}\)\(@\)\|&t@\)],
[\3]))]))_m4_defn([m4_qlen-$1])])
# m4_copyright_condense(TEXT)
# ---------------------------
# Condense the copyright notice in TEXT to only display the final
# year, wrapping the results to fit in 80 columns.
m4_define([m4_copyright_condense],
[m4_text_wrap(m4_bpatsubst(m4_flatten([[$1]]),
[(C)[- ,0-9]*\([1-9][0-9][0-9][0-9]\)], [(C) \1]))])
## ----------------------- ##
## 13. Number processing. ##
## ----------------------- ##
# m4_cmp(A, B)
# ------------
# Compare two integer expressions.
# A < B -> -1
# A = B -> 0
# A > B -> 1
m4_define([m4_cmp],
[m4_eval((([$1]) > ([$2])) - (([$1]) < ([$2])))])
# m4_list_cmp(A, B)
# -----------------
#
# Compare the two lists of integer expressions A and B. For instance:
# m4_list_cmp([1, 0], [1]) -> 0
# m4_list_cmp([1, 0], [1, 0]) -> 0
# m4_list_cmp([1, 2], [1, 0]) -> 1
# m4_list_cmp([1, 2, 3], [1, 2]) -> 1
# m4_list_cmp([1, 2, -3], [1, 2]) -> -1
# m4_list_cmp([1, 0], [1, 2]) -> -1
# m4_list_cmp([1], [1, 2]) -> -1
# m4_define([xa], [oops])dnl
# m4_list_cmp([[0xa]], [5+5]) -> 0
#
# Rather than face the overhead of m4_case, we use a helper function whose
# expansion includes the name of the macro to invoke on the tail, either
# m4_ignore or m4_unquote. This is particularly useful when comparing
# long lists, since less text is being expanded for deciding when to end
# recursion. The recursion is between a pair of macros that alternate
# which list is trimmed by one element; this is more efficient than
# calling m4_cdr on both lists from a single macro. Guarantee exactly
# one expansion of both lists' side effects.
#
# Please keep foreach.m4 in sync with any adjustments made here.
m4_define([m4_list_cmp],
[_$0_raw(m4_dquote($1), m4_dquote($2))])
m4_define([_m4_list_cmp_raw],
[m4_if([$1], [$2], [0], [_m4_list_cmp_1([$1], $2)])])
m4_define([_m4_list_cmp],
[m4_if([$1], [], [0m4_ignore], [$2], [0], [m4_unquote], [$2m4_ignore])])
m4_define([_m4_list_cmp_1],
[_m4_list_cmp_2([$2], [m4_shift2($@)], $1)])
m4_define([_m4_list_cmp_2],
[_m4_list_cmp([$1$3], m4_cmp([$3+0], [$1+0]))(
[_m4_list_cmp_1(m4_dquote(m4_shift3($@)), $2)])])
# m4_max(EXPR, ...)
# m4_min(EXPR, ...)
# -----------------
# Return the decimal value of the maximum (or minimum) in a series of
# integer expressions.
#
# M4 1.4.x doesn't provide ?:. Hence this huge m4_eval. Avoid m4_eval
# if both arguments are identical, but be aware of m4_max(0xa, 10) (hence
# the use of <=, not just <, in the second multiply).
#
# Please keep foreach.m4 in sync with any adjustments made here.
m4_define([m4_max],
[m4_if([$#], [0], [m4_fatal([too few arguments to $0])],
[$#], [1], [m4_eval([$1])],
[$#$1], [2$2], [m4_eval([$1])],
[$#], [2], [_$0($@)],
[_m4_minmax([_$0], $@)])])
m4_define([_m4_max],
[m4_eval((([$1]) > ([$2])) * ([$1]) + (([$1]) <= ([$2])) * ([$2]))])
m4_define([m4_min],
[m4_if([$#], [0], [m4_fatal([too few arguments to $0])],
[$#], [1], [m4_eval([$1])],
[$#$1], [2$2], [m4_eval([$1])],
[$#], [2], [_$0($@)],
[_m4_minmax([_$0], $@)])])
m4_define([_m4_min],
[m4_eval((([$1]) < ([$2])) * ([$1]) + (([$1]) >= ([$2])) * ([$2]))])
# _m4_minmax(METHOD, ARG1, ARG2...)
# ---------------------------------
# Common recursion code for m4_max and m4_min. METHOD must be _m4_max
# or _m4_min, and there must be at least two arguments to combine.
#
# Please keep foreach.m4 in sync with any adjustments made here.
m4_define([_m4_minmax],
[m4_if([$#], [3], [$1([$2], [$3])],
[$0([$1], $1([$2], [$3]), m4_shift3($@))])])
# m4_sign(A)
# ----------
# The sign of the integer expression A.
m4_define([m4_sign],
[m4_eval((([$1]) > 0) - (([$1]) < 0))])
## ------------------------ ##
## 14. Version processing. ##
## ------------------------ ##
# m4_version_unletter(VERSION)
# ----------------------------
# Normalize beta version numbers with letters to numeric expressions, which
# can then be handed to m4_eval for the purpose of comparison.
#
# Nl -> (N+1).-1.(l#)
#
# for example:
# [2.14a] -> [0,2,14+1,-1,[0r36:a]] -> 2.15.-1.10
# [2.14b] -> [0,2,15+1,-1,[0r36:b]] -> 2.15.-1.11
# [2.61aa.b] -> [0,2.61,1,-1,[0r36:aa],+1,-1,[0r36:b]] -> 2.62.-1.370.1.-1.11
# [08] -> [0,[0r10:0]8] -> 8
#
# This macro expects reasonable version numbers, but can handle double
# letters and does not expand any macros. Original version strings can
# use both `.' and `-' separators.
#
# Inline constant expansions, to avoid m4_defn overhead.
# _m4_version_unletter is the real workhorse used by m4_version_compare,
# but since [0r36:a] and commas are less readable than 10 and dots, we
# provide a wrapper for human use.
m4_define([m4_version_unletter],
[m4_substr(m4_map_args([.m4_eval], m4_unquote(_$0([$1]))), [3])])
m4_define([_m4_version_unletter],
[m4_bpatsubst(m4_bpatsubst(m4_translit([[[[0,$1]]]], [.-], [,,]),]dnl
m4_dquote(m4_dquote(m4_defn([m4_cr_Letters])))[[+],
[+1,-1,[0r36:\&]]), [,0], [,[0r10:0]])])
# m4_version_compare(VERSION-1, VERSION-2)
# ----------------------------------------
# Compare the two version numbers and expand into
# -1 if VERSION-1 < VERSION-2
# 0 if =
# 1 if >
#
# Since _m4_version_unletter does not output side effects, we can
# safely bypass the overhead of m4_version_cmp.
m4_define([m4_version_compare],
[_m4_list_cmp_raw(_m4_version_unletter([$1]), _m4_version_unletter([$2]))])
# m4_PACKAGE_NAME
# m4_PACKAGE_TARNAME
# m4_PACKAGE_VERSION
# m4_PACKAGE_STRING
# m4_PACKAGE_BUGREPORT
# --------------------
# If m4sugar/version.m4 is present, then define version strings. This
# file is optional, provided by Autoconf but absent in Bison.
m4_sinclude([m4sugar/version.m4])
# m4_version_prereq(VERSION, [IF-OK], [IF-NOT = FAIL])
# ----------------------------------------------------
# Check this Autoconf version against VERSION.
m4_define([m4_version_prereq],
m4_ifdef([m4_PACKAGE_VERSION],
[[m4_if(m4_version_compare(]m4_dquote(m4_defn([m4_PACKAGE_VERSION]))[, [$1]),
[-1],
[m4_default([$3],
[m4_fatal([Autoconf version $1 or higher is required],
[63])])],
[$2])]],
[[m4_fatal([m4sugar/version.m4 not found])]]))
## ------------------ ##
## 15. Set handling. ##
## ------------------ ##
# Autoconf likes to create arbitrarily large sets; for example, as of
# this writing, the configure.ac for coreutils tracks a set of more
# than 400 AC_SUBST. How do we track all of these set members,
# without introducing duplicates? We could use m4_append_uniq, with
# the set NAME residing in the contents of the macro NAME.
# Unfortunately, m4_append_uniq is quadratic for set creation, because
# it costs O(n) to search the string for each of O(n) insertions; not
# to mention that with m4 1.4.x, even using m4_append is slow, costing
# O(n) rather than O(1) per insertion. Other set operations, not used
# by Autoconf but still possible by manipulation of the definition
# tracked in macro NAME, include O(n) deletion of one element and O(n)
# computation of set size. Because the set is exposed to the user via
# the definition of a single macro, we cannot cache any data about the
# set without risking the cache being invalidated by the user
# redefining NAME.
#
# Can we do better? Yes, because m4 gives us an O(1) search function
# for free: ifdef. Additionally, even m4 1.4.x gives us an O(1)
# insert operation for free: pushdef. But to use these, we must
# represent the set via a group of macros; to keep the set consistent,
# we must hide the set so that the user can only manipulate it through
# accessor macros. The contents of the set are maintained through two
# access points; _m4_set([name]) is a pushdef stack of values in the
# set, useful for O(n) traversal of the set contents; while the
# existence of _m4_set([name],value) with no particular value is
# useful for O(1) querying of set membership. And since the user
# cannot externally manipulate the set, we are free to add additional
# caching macros for other performance improvements. Deletion can be
# O(1) per element rather than O(n), by reworking the definition of
# _m4_set([name],value) to be 0 or 1 based on current membership, and
# adding _m4_set_cleanup(name) to defer the O(n) cleanup of
# _m4_set([name]) until we have another reason to do an O(n)
# traversal. The existence of _m4_set_cleanup(name) can then be used
# elsewhere to determine if we must dereference _m4_set([name],value),
# or assume that definition implies set membership. Finally, size can
# be tracked in an O(1) fashion with _m4_set_size(name).
#
# The quoting in _m4_set([name],value) is chosen so that there is no
# ambiguity with a set whose name contains a comma, and so that we can
# supply the value via _m4_defn([_m4_set([name])]) without needing any
# quote manipulation.
# m4_set_add(SET, VALUE, [IF-UNIQ], [IF-DUP])
# -------------------------------------------
# Add VALUE as an element of SET. Expand IF-UNIQ on the first
# addition, and IF-DUP if it is already in the set. Addition of one
# element is O(1), such that overall set creation is O(n).
#
# We do not want to add a duplicate for a previously deleted but
# unpruned element, but it is just as easy to check existence directly
# as it is to query _m4_set_cleanup($1).
m4_define([m4_set_add],
[m4_ifdef([_m4_set([$1],$2)],
[m4_if(m4_indir([_m4_set([$1],$2)]), [0],
[m4_define([_m4_set([$1],$2)],
[1])_m4_set_size([$1], [m4_incr])$3], [$4])],
[m4_define([_m4_set([$1],$2)],
[1])m4_pushdef([_m4_set([$1])],
[$2])_m4_set_size([$1], [m4_incr])$3])])
# m4_set_add_all(SET, VALUE...)
# -----------------------------
# Add each VALUE into SET. This is O(n) in the number of VALUEs, and
# can be faster than calling m4_set_add for each VALUE.
#
# Implement two recursion helpers; the check variant is slower but
# handles the case where an element has previously been removed but
# not pruned. The recursion helpers ignore their second argument, so
# that we can use the faster m4_shift2 and 2 arguments, rather than
# _m4_shift2 and one argument, as the signal to end recursion.
#
# Please keep foreach.m4 in sync with any adjustments made here.
m4_define([m4_set_add_all],
[m4_define([_m4_set_size($1)], m4_eval(m4_set_size([$1])
+ m4_len(m4_ifdef([_m4_set_cleanup($1)], [_$0_check], [_$0])([$1], $@))))])
m4_define([_m4_set_add_all],
[m4_if([$#], [2], [],
[m4_ifdef([_m4_set([$1],$3)], [],
[m4_define([_m4_set([$1],$3)], [1])m4_pushdef([_m4_set([$1])],
[$3])-])$0([$1], m4_shift2($@))])])
m4_define([_m4_set_add_all_check],
[m4_if([$#], [2], [],
[m4_set_add([$1], [$3])$0([$1], m4_shift2($@))])])
# m4_set_contains(SET, VALUE, [IF-PRESENT], [IF-ABSENT])
# ------------------------------------------------------
# Expand IF-PRESENT if SET contains VALUE, otherwise expand IF-ABSENT.
# This is always O(1).
m4_define([m4_set_contains],
[m4_ifdef([_m4_set_cleanup($1)],
[m4_if(m4_ifdef([_m4_set([$1],$2)],
[m4_indir([_m4_set([$1],$2)])], [0]), [1], [$3], [$4])],
[m4_ifdef([_m4_set([$1],$2)], [$3], [$4])])])
# m4_set_contents(SET, [SEP])
# ---------------------------
# Expand to a single string containing all the elements in SET,
# separated by SEP, without modifying SET. No provision is made for
# disambiguating set elements that contain non-empty SEP as a
# sub-string, or for recognizing a set that contains only the empty
# string. Order of the output is not guaranteed. If any elements
# have been previously removed from the set, this action will prune
# the unused memory. This is O(n) in the size of the set before
# pruning.
#
# Use _m4_popdef for speed. The existence of _m4_set_cleanup($1)
# determines which version of _1 helper we use.
m4_define([m4_set_contents],
[m4_set_map_sep([$1], [], [], [[$2]])])
# _m4_set_contents_1(SET)
# _m4_set_contents_1c(SET)
# _m4_set_contents_2(SET, [PRE], [POST], [SEP])
# ---------------------------------------------
# Expand to a list of quoted elements currently in the set, each
# surrounded by PRE and POST, and moving SEP in front of PRE on
# recursion. To avoid nesting limit restrictions, the algorithm must
# be broken into two parts; _1 destructively copies the stack in
# reverse into _m4_set_($1), producing no output; then _2
# destructively copies _m4_set_($1) back into the stack in reverse.
# If no elements were deleted, then this visits the set in the order
# that elements were inserted. Behavior is undefined if PRE/POST/SEP
# tries to recursively list or modify SET in any way other than
# calling m4_set_remove on the current element. Use _1 if all entries
# in the stack are guaranteed to be in the set, and _1c to prune
# removed entries. Uses _m4_defn and _m4_popdef for speed.
m4_define([_m4_set_contents_1],
[_m4_stack_reverse([_m4_set([$1])], [_m4_set_($1)])])
m4_define([_m4_set_contents_1c],
[m4_ifdef([_m4_set([$1])],
[m4_set_contains([$1], _m4_defn([_m4_set([$1])]),
[m4_pushdef([_m4_set_($1)], _m4_defn([_m4_set([$1])]))],
[_m4_popdef([_m4_set([$1],]_m4_defn(
[_m4_set([$1])])[)])])_m4_popdef([_m4_set([$1])])$0([$1])],
[_m4_popdef([_m4_set_cleanup($1)])])])
m4_define([_m4_set_contents_2],
[_m4_stack_reverse([_m4_set_($1)], [_m4_set([$1])],
[$2[]_m4_defn([_m4_set_($1)])$3], [$4[]])])
# m4_set_delete(SET)
# ------------------
# Delete all elements in SET, and reclaim any memory occupied by the
# set. This is O(n) in the set size.
#
# Use _m4_defn and _m4_popdef for speed.
m4_define([m4_set_delete],
[m4_ifdef([_m4_set([$1])],
[_m4_popdef([_m4_set([$1],]_m4_defn([_m4_set([$1])])[)],
[_m4_set([$1])])$0([$1])],
[m4_ifdef([_m4_set_cleanup($1)],
[_m4_popdef([_m4_set_cleanup($1)])])m4_ifdef(
[_m4_set_size($1)],
[_m4_popdef([_m4_set_size($1)])])])])
# m4_set_difference(SET1, SET2)
# -----------------------------
# Produce a LIST of quoted elements that occur in SET1 but not SET2.
# Output a comma prior to any elements, to distinguish the empty
# string from no elements. This can be directly used as a series of
# arguments, such as for m4_join, or wrapped inside quotes for use in
# m4_foreach. Order of the output is not guaranteed.
#
# Short-circuit the idempotence relation.
m4_define([m4_set_difference],
[m4_if([$1], [$2], [], [m4_set_map_sep([$1], [_$0([$2],], [)])])])
m4_define([_m4_set_difference],
[m4_set_contains([$1], [$2], [], [,[$2]])])
# m4_set_dump(SET, [SEP])
# -----------------------
# Expand to a single string containing all the elements in SET,
# separated by SEP, then delete SET. In general, if you only need to
# list the contents once, this is faster than m4_set_contents. No
# provision is made for disambiguating set elements that contain
# non-empty SEP as a sub-string. Order of the output is not
# guaranteed. This is O(n) in the size of the set before pruning.
#
# Use _m4_popdef for speed. Use existence of _m4_set_cleanup($1) to
# decide if more expensive recursion is needed.
m4_define([m4_set_dump],
[m4_ifdef([_m4_set_size($1)],
[_m4_popdef([_m4_set_size($1)])])m4_ifdef([_m4_set_cleanup($1)],
[_$0_check], [_$0])([$1], [], [$2])])
# _m4_set_dump(SET, [SEP], [PREP])
# _m4_set_dump_check(SET, [SEP], [PREP])
# --------------------------------------
# Print SEP and the current element, then delete the element and
# recurse with empty SEP changed to PREP. The check variant checks
# whether the element has been previously removed. Use _m4_defn and
# _m4_popdef for speed.
m4_define([_m4_set_dump],
[m4_ifdef([_m4_set([$1])],
[[$2]_m4_defn([_m4_set([$1])])_m4_popdef([_m4_set([$1],]_m4_defn(
[_m4_set([$1])])[)], [_m4_set([$1])])$0([$1], [$2$3])])])
m4_define([_m4_set_dump_check],
[m4_ifdef([_m4_set([$1])],
[m4_set_contains([$1], _m4_defn([_m4_set([$1])]),
[[$2]_m4_defn([_m4_set([$1])])])_m4_popdef(
[_m4_set([$1],]_m4_defn([_m4_set([$1])])[)],
[_m4_set([$1])])$0([$1], [$2$3])],
[_m4_popdef([_m4_set_cleanup($1)])])])
# m4_set_empty(SET, [IF-EMPTY], [IF-ELEMENTS])
# --------------------------------------------
# Expand IF-EMPTY if SET has no elements, otherwise IF-ELEMENTS.
m4_define([m4_set_empty],
[m4_ifdef([_m4_set_size($1)],
[m4_if(m4_indir([_m4_set_size($1)]), [0], [$2], [$3])], [$2])])
# m4_set_foreach(SET, VAR, ACTION)
# --------------------------------
# For each element of SET, define VAR to the element and expand
# ACTION. ACTION should not recursively list SET's contents, add
# elements to SET, nor delete any element from SET except the one
# currently in VAR. The order that the elements are visited in is not
# guaranteed. This is faster than the corresponding m4_foreach([VAR],
# m4_indir([m4_dquote]m4_set_listc([SET])), [ACTION])
m4_define([m4_set_foreach],
[m4_pushdef([$2])m4_set_map_sep([$1], [m4_define([$2],], [)$3])])
# m4_set_intersection(SET1, SET2)
# -------------------------------
# Produce a LIST of quoted elements that occur in both SET1 or SET2.
# Output a comma prior to any elements, to distinguish the empty
# string from no elements. This can be directly used as a series of
# arguments, such as for m4_join, or wrapped inside quotes for use in
# m4_foreach. Order of the output is not guaranteed.
#
# Iterate over the smaller set, and short-circuit the idempotence
# relation.
m4_define([m4_set_intersection],
[m4_if([$1], [$2], [m4_set_listc([$1])],
m4_eval(m4_set_size([$2]) < m4_set_size([$1])), [1], [$0([$2], [$1])],
[m4_set_map_sep([$1], [_$0([$2],], [)])])])
m4_define([_m4_set_intersection],
[m4_set_contains([$1], [$2], [,[$2]])])
# m4_set_list(SET)
# m4_set_listc(SET)
# -----------------
# Produce a LIST of quoted elements of SET. This can be directly used
# as a series of arguments, such as for m4_join or m4_set_add_all, or
# wrapped inside quotes for use in m4_foreach or m4_map. With
# m4_set_list, there is no way to distinguish an empty set from a set
# containing only the empty string; with m4_set_listc, a leading comma
# is output if there are any elements.
m4_define([m4_set_list],
[m4_set_map_sep([$1], [], [], [,])])
m4_define([m4_set_listc],
[m4_set_map_sep([$1], [,])])
# m4_set_map(SET, ACTION)
# -----------------------
# For each element of SET, expand ACTION with a single argument of the
# current element. ACTION should not recursively list SET's contents,
# add elements to SET, nor delete any element from SET except the one
# passed as an argument. The order that the elements are visited in
# is not guaranteed. This is faster than either of the corresponding
# m4_map_args([ACTION]m4_set_listc([SET]))
# m4_set_foreach([SET], [VAR], [ACTION(m4_defn([VAR]))])
m4_define([m4_set_map],
[m4_set_map_sep([$1], [$2(], [)])])
# m4_set_map_sep(SET, [PRE], [POST], [SEP])
# -----------------------------------------
# For each element of SET, expand PRE[value]POST[], and expand SEP
# between elements.
m4_define([m4_set_map_sep],
[m4_ifdef([_m4_set_cleanup($1)], [_m4_set_contents_1c],
[_m4_set_contents_1])([$1])_m4_set_contents_2($@)])
# m4_set_remove(SET, VALUE, [IF-PRESENT], [IF-ABSENT])
# ----------------------------------------------------
# If VALUE is an element of SET, delete it and expand IF-PRESENT.
# Otherwise expand IF-ABSENT. Deleting a single value is O(1),
# although it leaves memory occupied until the next O(n) traversal of
# the set which will compact the set.
#
# Optimize if the element being removed is the most recently added,
# since defining _m4_set_cleanup($1) slows down so many other macros.
# In particular, this plays well with m4_set_foreach and m4_set_map.
m4_define([m4_set_remove],
[m4_set_contains([$1], [$2], [_m4_set_size([$1],
[m4_decr])m4_if(_m4_defn([_m4_set([$1])]), [$2],
[_m4_popdef([_m4_set([$1],$2)], [_m4_set([$1])])],
[m4_define([_m4_set_cleanup($1)])m4_define(
[_m4_set([$1],$2)], [0])])$3], [$4])])
# m4_set_size(SET)
# ----------------
# Expand to the number of elements currently in SET. This operation
# is O(1), and thus more efficient than m4_count(m4_set_list([SET])).
m4_define([m4_set_size],
[m4_ifdef([_m4_set_size($1)], [m4_indir([_m4_set_size($1)])], [0])])
# _m4_set_size(SET, ACTION)
# -------------------------
# ACTION must be either m4_incr or m4_decr, and the size of SET is
# changed accordingly. If the set is empty, ACTION must not be
# m4_decr.
m4_define([_m4_set_size],
[m4_define([_m4_set_size($1)],
m4_ifdef([_m4_set_size($1)], [$2(m4_indir([_m4_set_size($1)]))],
[1]))])
# m4_set_union(SET1, SET2)
# ------------------------
# Produce a LIST of double quoted elements that occur in either SET1
# or SET2, without duplicates. Output a comma prior to any elements,
# to distinguish the empty string from no elements. This can be
# directly used as a series of arguments, such as for m4_join, or
# wrapped inside quotes for use in m4_foreach. Order of the output is
# not guaranteed.
#
# We can rely on the fact that m4_set_listc prunes SET1, so we don't
# need to check _m4_set([$1],element) for 0. Short-circuit the
# idempotence relation.
m4_define([m4_set_union],
[m4_set_listc([$1])m4_if([$1], [$2], [],
[m4_set_map_sep([$2], [_$0([$1],], [)])])])
m4_define([_m4_set_union],
[m4_ifdef([_m4_set([$1],$2)], [], [,[$2]])])
## ------------------- ##
## 16. File handling. ##
## ------------------- ##
# It is a real pity that M4 comes with no macros to bind a diversion
# to a file. So we have to deal without, which makes us a lot more
# fragile than we should.
# m4_file_append(FILE-NAME, CONTENT)
# ----------------------------------
m4_define([m4_file_append],
[m4_syscmd([cat >>$1 <<_m4eof
$2
_m4eof
])
m4_if(m4_sysval, [0], [],
[m4_fatal([$0: cannot write: $1])])])
## ------------------------ ##
## 17. Setting M4sugar up. ##
## ------------------------ ##
# _m4_divert_diversion should be defined.
m4_divert_push([KILL])
# m4_init
# -------
# Initialize the m4sugar language.
m4_define([m4_init],
[# All the M4sugar macros start with `m4_', except `dnl' kept as is
# for sake of simplicity.
m4_pattern_forbid([^_?m4_])
m4_pattern_forbid([^dnl$])
# If __m4_version__ is defined, we assume that we are being run by M4
# 1.6 or newer, thus $@ recursion is linear, and debugmode(+do)
# is available for faster checks of dereferencing undefined macros
# and forcing dumpdef to print to stderr regardless of debugfile.
# But if it is missing, we assume we are being run by M4 1.4.x, that
# $@ recursion is quadratic, and that we need foreach-based
# replacement macros. Also, m4 prior to 1.4.8 loses track of location
# during m4wrap text; __line__ should never be 0.
#
# Use the raw builtin to avoid tripping up include tracing.
# Meanwhile, avoid m4_copy, since it temporarily undefines m4_defn.
m4_ifdef([__m4_version__],
[m4_debugmode([+do])
m4_define([m4_defn], _m4_defn([_m4_defn]))
m4_define([m4_dumpdef], _m4_defn([_m4_dumpdef]))
m4_define([m4_popdef], _m4_defn([_m4_popdef]))
m4_define([m4_undefine], _m4_defn([_m4_undefine]))],
[m4_builtin([include], [m4sugar/foreach.m4])
m4_wrap_lifo([m4_if(__line__, [0], [m4_pushdef([m4_location],
]]m4_dquote(m4_dquote(m4_dquote(__file__:__line__)))[[)])])])
# Rewrite the first entry of the diversion stack.
m4_divert([KILL])
# Check the divert push/pop perfect balance.
# Some users are prone to also use m4_wrap to register last-minute
# m4_divert_text; so after our diversion cleanups, we restore
# KILL as the bottom of the diversion stack.
m4_wrap([m4_popdef([_m4_divert_diversion])m4_ifdef(
[_m4_divert_diversion], [m4_fatal([$0: unbalanced m4_divert_push:
]m4_divert_stack)])_m4_popdef([_m4_divert_stack])m4_divert_push([KILL])])
])
070701000679b2000081a400000000000000000000000153b4ffc2000077ac000000b500010002ffffffffffffffff0000003200000000root/usr/local/share/autoconf/m4sugar/m4sugar.m4f # This is a frozen state file generated by GNU M4 1.4.16
V1
Q1,1
[]
T10,154
m4_providem4_ifdef([m4_provide($1)], [],
[m4_set_add([_m4_provide], [$1], [m4_define([m4_provide($1)],
m4_ifdef([_m4_diverting], [_m4_defn([_m4_diverting])]))])])
T8,198
_m4_qlenm4_define([m4_qlen-$1],
m4_if(m4_index([$1], [@]), [-1], [m4_len([$1])],
[m4_len(m4_bpatsubst([[$1]],
[@\(\(<:\|:>\|S|\|%:\|\{:\|:\}\)\(@\)\|&t@\)],
[\3]))]))_m4_defn([m4_qlen-$1])
F7,4
m4_decrdecr
T14,42
m4_divert_textm4_divert_push([$1])$2
m4_divert_pop([$1])
T10,3
m4_newline
$1
T5,73
m4_dom4_if([$#], 0, [],
[$#], 1, [$1[]],
[$1[]$0(m4_shift($@))])
T7,2
m4_echo$@
T10,27
m4_defaultm4_if([$1], [], [$2], [$1])
T7,91
m4_argnm4_assert([0 < $1])m4_pushdef([_$0], [_m4_popdef([_$0])]m4_dquote([$]m4_incr([$1])))_$0($@)
T7,197
m4_copym4_ifdef([$2], [m4_fatal([$0: won't overwrite defined macro: $2])],
[m4_stack_foreach_sep([$1], [m4_pushdef([$2],], [)])])m4_ifdef([m4_location($1)], [m4_define([m4_location($2)], m4_location)])
T9,28
_m4_quotem4_if([$#], [0], [], [[$*]])
T8,33
m4_applym4_if([$2], [], [$1], [$1($2)])[]
T8,0
_m4_warn
T10,103
m4_flattenm4_if(m4_index([$1], [
]), [-1], [[$1]],
[m4_translit(m4_bpatsubst([[[$1]]], [\\
]), [
], [ ])])
F12,9
m4_debugmodedebugmode
T7,0
__gnu__
T9,35
m4_shiftnm4_assert(0 < $1 && $1 < $#)_$0($@)
T13,276
m4_set_deletem4_ifdef([_m4_set([$1])],
[_m4_popdef([_m4_set([$1],]_m4_defn([_m4_set([$1])])[)],
[_m4_set([$1])])$0([$1])],
[m4_ifdef([_m4_set_cleanup($1)],
[_m4_popdef([_m4_set_cleanup($1)])])m4_ifdef(
[_m4_set_size($1)],
[_m4_popdef([_m4_set_size($1)])])])
T7,84
_m4_for$4[$1]$5[]m4_if([$1], [$2], [],
[$0(m4_eval([$1 + $3]), [$2], [$3], [$4], [$5])])
T13,175
m4_defun_initm4_define([$1], [$3[]])m4_defun([$1],
[$2[]_m4_popdef(]m4_dquote($[0])[)m4_indir(]m4_dquote($[0])dnl
[m4_if(]m4_dquote($[#])[, [0], [], ]m4_dquote([,$]@)[))], [m4_pushdef])
T11,165
_m4_dumpdefm4_if([$#], [0], [m4_fatal([$0: missing argument])],
[$#], [1], [m4_builtin([dumpdef], [$1])],
[m4_map_args_sep([m4_builtin([dumpdef],], [)], [], $@)])
T17,94
_m4_stack_reversem4_ifdef([$1], [m4_pushdef([$2],
_m4_defn([$1]))$3[]_m4_popdef([$1])$0([$1], [$2], [$4$3])])
F8,4
_m4_defndefn
T7,119
m4_casem4_if([$#], 0, [],
[$#], 1, [],
[$#], 2, [$2],
[$1], [$2], [$3],
[$0([$1], m4_shift3($@))])
T21,76
_m4_set_add_all_checkm4_if([$#], [2], [],
[m4_set_add([$1], [$3])$0([$1], m4_shift2($@))])
T15,5
_m4_divert_grow10000
T10,54
m4_includem4_include_unique([$1])dnl
m4_builtin([include], [$1])
F9,6
m4_definedefine
F9,6
m4_sysvalsysval
T17,17
m4_PACKAGE_STRINGGNU Autoconf 2.69
T15,12
m4_PACKAGE_NAMEGNU Autoconf
T18,202
m4_cr_not_symbols1
!"#*%&'()$+,./0123456789:;<=>?@[\]^`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T18,192
m4_cr_not_symbols2
!"#*%&'()$+,./:;<=>?@[\]^`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T15,193
m4_cr_not_alnum
!"#*%&'()$+,./:;<=>?@[\]^_`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T10,62
m4_noquotem4_changequote([-=<{(],[)}>=-])$1-=<{()}>=-m4_changequote([,])
T10,211
m4_dumpdefm4_if([$#], [0], [m4_fatal([$0: missing argument])],
[$#], [1], [m4_ifdef([$1], [m4_errprintn(
[$1: ]m4_dquote(_m4_defn([$1])))], [m4_fatal([$0: undefined macro: $1])])],
[m4_map_args([$0], $@)])
T20,4
_m4_divert_diversionKILL
T12,26
m4_normalizem4_strip(m4_flatten([$1]))
T23,39
m4_expansion_stack_pushm4_pushdef([_m4_expansion_stack], [$1])
T12,48
m4_re_escapem4_bpatsubst([$1],
[[][*+.?\^$]], [\\\&])
T17,152
m4_version_prereqm4_if(m4_version_compare([2.69], [$1]),
[-1],
[m4_default([$3],
[m4_fatal([Autoconf version $1 or higher is required],
[63])])],
[$2])
T8,150
m4_defunm4_define([m4_location($1)], m4_location)m4_default([$3], [m4_define])([$1],
[_m4_defun_pro(]m4_dquote($[0])[)$2[]_m4_defun_epi(]m4_dquote($[0])[)])
T8,81
m4_chompm4_format([[%.*s]], m4_index(m4_translit([[$1]], [
/.], [/ ])[./.], [/.]), [$1])
T16,245
m4_cr_not_digits
!"#*%&'()$+,./:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
F11,7
m4_maketempmkstemp
F10,7
m4_builtinbuiltin
T12,16
m4_wrap_lifo_m4_wrap([$1[]])
T25,53
_m4_expansion_stack_entry_m4_defn([m4_location($1)])[: $1 is expanded from...]
T14,110
m4_divert_pushm4_divert_stack_push([$0], [$1])m4_pushdef([_m4_divert_diversion], [$1])_m4_divert_raw(_m4_divert([$1], [$2]))
T10,55
_m4_shift2m4_if([$#], [2], [],
[, m4_shift(m4_shift($@))])
T10,65
_m4_shift3m4_if([$#], [3], [],
[, m4_shift(m4_shift(m4_shift($@)))])
T12,55
m4_copy_unm4m4_copy([$1], m4_bpatsubst([$1], [^m4_\(.*\)], [[\1]]))
T13,41
_m4_set_unionm4_ifdef([_m4_set([$1],$2)], [], [,[$2]])
T9,57
m4_appendm4_define([$1], m4_ifdef([$1], [_m4_defn([$1])[$3]])[$2])
T15,148
_m4_append_uniqm4_ifdef([$1],
[m4_if(m4_index([$3]_m4_defn([$1])[$3], [$3$2$3]), [-1],
[m4_append([$1], [$2], [$3])$4], [$5])],
[m4_define([$1], [$2])$4])
T10,2
m4_unquote$*
T14,107
m4_set_map_sepm4_ifdef([_m4_set_cleanup($1)], [_m4_set_contents_1c],
[_m4_set_contents_1])([$1])_m4_set_contents_2($@)
F11,8
m4_translittranslit
F9,6
m4_substrsubstr
F12,8
_m4_undivertundivert
T25,111
m4_stack_foreach_sep_lifo_m4_stack_reverse([$1], [m4_tmp-$1], [$2[]_m4_defn([m4_tmp-$1])$3], [$4[]])_m4_stack_reverse([m4_tmp-$1], [$1])
T13,474
_m4_text_wrapm4_pushdef([m4_Indent], m4_qlen([$2]))m4_pushdef([m4_Cursor], m4_qlen([$3]))m4_pushdef([m4_Separator], [m4_define([m4_Separator], [ ])])[$3]m4_cond([m4_Cursor], m4_Indent, [],
[m4_eval(m4_Cursor > m4_Indent)], [1], [
[$2]m4_define([m4_Cursor], m4_Indent)],
[m4_format([%*s], m4_max([0],
m4_eval(m4_Indent - m4_Cursor)), [])m4_define([m4_Cursor], m4_Indent)])m4_map_args_w([$1], [$0_word(], [, [$2], [$4])])_m4_popdef([m4_Separator], [m4_Cursor], [m4_Indent])
T18,80
m4_expansion_stackm4_stack_foreach_sep_lifo([_$0], [_$0_entry(], [)
])m4_location[: the top level]
T9,75
m4_beforem4_provide_if([$2],
[m4_warn([syntax], [$2 was called before $1])])
T9,26
m4_ifndefm4_ifdef([$1], [$3], [$2])
T13,26
m4_cr_LETTERSABCDEFGHIJKLMNOPQRSTUVWXYZ
T16,452
_m4_require_callm4_pushdef([_m4_divert_grow], m4_decr(_m4_divert_grow))m4_pushdef([_m4_diverting([$1])])m4_pushdef([_m4_diverting], [$1])m4_divert_push(_m4_divert_grow, [-])m4_if([$2], [], [$1], [$2])
m4_provide_if([$1], [m4_set_remove([_m4_provide], [$1])],
[m4_warn([syntax], [$1 is m4_require'd but not m4_defun'd])])_m4_divert_raw($3)_m4_undivert(_m4_divert_grow)m4_divert_pop(_m4_divert_grow)_m4_popdef([_m4_divert_grow],
[_m4_diverting([$1])], [_m4_diverting])
T14,37
m4_PACKAGE_URLhttp://www.gnu.org/software/autoconf/
T11,62
m4_cr_alnumabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
T9,127
_m4_splitm4_changequote([-=<{(],[)}>=-])[m4_bpatsubst(-=<{(-=<{($1)}>=-)}>=-, -=<{($2)}>=-,
-=<{(]$3[)}>=-)]m4_changequote([, ])
T7,108
m4_joinm4_if([$#], [1], [],
[$#], [2], [[$2]],
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift2($@))])
F7,6
m4_exitm4exit
F12,8
_m4_undefineundefine
T11,136
m4_undivertm4_if([$#], [0], [m4_fatal([$0: missing argument])],
[$#], [1], [_m4_undivert(_m4_divert([$1]))],
[m4_map_args([$0], $@)])
T21,101
m4_stack_foreach_lifo_m4_stack_reverse([$1], [m4_tmp-$1], [$2(_m4_defn([m4_tmp-$1]))])_m4_stack_reverse([m4_tmp-$1], [$1])
T9,72
m4_mapallm4_if([$2], [], [],
[_m4_foreach([m4_apply([$1],], [)], [], $2)])
T17,229
m4_cr_not_LETTERS
!"#*%&'()$+,./0123456789:;<=>?@[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
F5,6
m4_ififelse
T13,47
m4_copy_forcem4_ifdef([$2], [_m4_undefine([$2])])m4_copy($@)
T10,168
m4_combinem4_if([$2], [], [], m4_eval([$# > 3]), [1],
[m4_map_args_sep([m4_map_args_sep(m4_dquote(], [)[[$3]], [], [[$1]],]]m4_dquote(m4_dquote(m4_shift3($@)))[[)], [[$1]], $2)])
T8,66
m4_ifsetm4_ifdef([$1],
[m4_ifval(_m4_defn([$1]), [$2], [$3])],
[$3])
T11,54
m4_ifnblankm4_if(m4_translit([[$1]], [ ][ ][
]), [], [$3], [$2])
F8,5
m4_shiftshift
T11,160
m4_undefinem4_if([$#], [0], [[$0]],
[$#], [1], [m4_ifdef([$1], [_m4_undefine([$1])],
[m4_fatal([$0: undefined macro: $1])])],
[m4_map_args([$0], $@)])
T20,20
m4_PACKAGE_BUGREPORTbug-autoconf@gnu.org
T20,111
m4_stack_foreach_sep_m4_stack_reverse([$1], [m4_tmp-$1])_m4_stack_reverse([m4_tmp-$1], [$1], [$2[]_m4_defn([m4_tmp-$1])$3], [$4[]])
T10,79
_m4_shiftnm4_if([$1], 1, [m4_shift(],
[$0(m4_decr([$1])]), m4_shift(m4_shift($@)))
T11,162
m4_dumpdefsm4_if([$#], [0], [m4_fatal([$0: missing argument])],
[$#], [1], [m4_stack_foreach_lifo([$1], [m4_dumpdef([$1])m4_ignore])],
[m4_map_args([$0], $@)])
T13,124
_m4_defun_prom4_ifdef([_m4_expansion_stack], [], [_m4_defun_pro_outer([$1])])m4_expansion_stack_push([$1])m4_pushdef([_m4_expanding($1)])
T4,37
m4_nm4_if([$1],
[], [],
[$1
])
T18,40
_m4_set_differencem4_set_contains([$1], [$2], [], [,[$2]])
T10,137
_m4_divertm4_ifdef([_m4_divert($1)],
[m4_indir([_m4_divert($1)])],
[m4_if([$2], [], [m4_warn([syntax],
[prefer named diversions])])$1])
T16,298
m4_map_args_pairm4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
[$#], [1], [m4_fatal([$0: too few arguments: $#: $1])],
[$#], [2], [],
[$#], [3], [m4_default([$2], [$1])([$3])[]],
[$#], [4], [$1([$3], [$4])[]],
[$1([$3], [$4])[]$0([$1], [$2], m4_shift(m4_shift3($@)))])
T18,256
_m4_set_dump_checkm4_ifdef([_m4_set([$1])],
[m4_set_contains([$1], _m4_defn([_m4_set([$1])]),
[[$2]_m4_defn([_m4_set([$1])])])_m4_popdef(
[_m4_set([$1],]_m4_defn([_m4_set([$1])])[)],
[_m4_set([$1])])$0([$1], [$2$3])],
[_m4_popdef([_m4_set_cleanup($1)])])
T8,0
__unix__
T15,49
m4_rename_forcem4_ifdef([$2], [_m4_undefine([$2])])m4_rename($@)
T14,166
m4_cleardivertm4_if([$#], [0], [m4_fatal([$0: missing argument])],
[_m4_divert_raw([-1])m4_undivert($@)_m4_divert_raw(
_m4_divert(_m4_defn([_m4_divert_diversion]), [-]))])
T14,42
_m4_defun_oncem4_pushdef([$1])$3[$2[]m4_provide([$1])]$4
T9,5
_m4_curry[$1])
T14,53
m4_cr_symbols1abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_
T14,63
m4_cr_symbols2abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789
T15,180
m4_set_containsm4_ifdef([_m4_set_cleanup($1)],
[m4_if(m4_ifdef([_m4_set([$1],$2)],
[m4_indir([_m4_set([$1],$2)])], [0]), [1], [$3], [$4])],
[m4_ifdef([_m4_set([$1],$2)], [$3], [$4])])
T9,174
m4_expandm4_pushdef([m4_divert], _m4_defn([_m4_divert_unsafe]))m4_pushdef([m4_divert_push], _m4_defn([_m4_divert_unsafe]))m4_chomp(_$0([$1
]))_m4_popdef([m4_divert], [m4_divert_push])
T14,96
_m4_bpatsubstsm4_if([$#], 2, [$1],
[$0(m4_builtin([patsubst], [[$1]], [$2], [$3]),
m4_shift3($@))])
T15,36
m4_set_contentsm4_set_map_sep([$1], [], [], [[$2]])
T12,24
m4_rename_m4m4_rename([$1], [m4_$1])
F14,11
m4_changequotechangequote
T12,69
_m4_list_cmpm4_if([$1], [], [0m4_ignore], [$2], [0], [m4_unquote], [$2m4_ignore])
T14,73
_m4_mapall_sepm4_apply([$1], [$3])_m4_foreach([m4_apply([$2[]$1],], [)], m4_shift2($@))
T9,132
m4_divertm4_popdef([_m4_divert_stack])m4_define([_m4_divert_diversion], [$1])m4_divert_stack_push([$0], [$1])_m4_divert_raw(_m4_divert([$1]))
T13,293
m4_defun_oncem4_define([m4_location($1)], m4_location)m4_define([$1], [_m4_defun_once([$1], [$2], m4_if(_m4_divert_dump, [],
[[_m4_defun_pro([$1])m4_unquote(], [)_m4_defun_epi([$1])]],
m4_ifdef([_m4_diverting([$1])], [-]), [-], [[m4_unquote(], [)]],
[[_m4_require_call([$1],], [, _m4_divert_dump)]]))])
T10,412
m4_requirem4_ifdef([_m4_expanding($1)],
[m4_fatal([$0: circular dependency of $1])])m4_if(_m4_divert_dump, [],
[m4_fatal([$0($1): cannot be used outside of an ]dnl
m4_if([$0], [m4_require], [[m4_defun]], [[AC_DEFUN]])['d macro])])m4_provide_if([$1], [m4_set_contains([_m4_provide], [$1],
[_m4_require_check([$1], _m4_defn([m4_provide($1)]), [$0])], [m4_ignore])],
[_m4_require_call])([$1], [$2], _m4_divert_dump)
F7,4
m4_incrincr
T8,87
m4_fatalm4_errprintn(m4_location[: error: $1]
m4_expansion_stack)m4_exit(m4_if([$2],, 1, [$2]))
T13,306
m4_bpatsubstsm4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])],
[$#], 1, [m4_fatal([$0: too few arguments: $#: $1])],
[$#], 2, [m4_unquote(m4_builtin([patsubst], [[$1]], [$2]))],
[$#], 3, [m4_unquote(m4_builtin([patsubst], [[$1]], [$2], [$3]))],
[_$0($@m4_if(m4_eval($# & 1), 0, [,]))])
F8,5
m4_ifdefifdef
T13,52
m4_cr_LettersabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
T14,109
m4_file_appendm4_syscmd([cat >>$1 <<_m4eof
$2
_m4eof
])
m4_if(m4_sysval, [0], [],
[m4_fatal([$0: cannot write: $1])])
T15,218
m4_map_args_sepm4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
[$#], [1], [],
[$#], [2], [],
[$#], [3], [],
[$#], [4], [$1[$4]$2[]],
[$1[$4]$2[]_m4_foreach([$3[]$1], [$2], m4_shift3($@))])
F12,8
m4_bpatsubstpatsubst
F8,8
__file____file__
T10,32
m4_set_mapm4_set_map_sep([$1], [$2(], [)])
T8,77
m4_stripm4_bpatsubsts([$1 ],
[[ ]+], [ ],
[^. ?\(.*\) .$], [[[\1]]])
T11,37
m4_list_cmp_$0_raw(m4_dquote($1), m4_dquote($2))
T13,41
m4_provide_ifm4_ifdef([m4_provide($1)],
[$2], [$3])
T19,109
_m4_defun_epi_outer_m4_popdef([_m4_divert_dump], [_m4_diverting([$1])], [_m4_diverting])m4_divert_pop([GROW])m4_undivert([GROW])
T12,32
m4_make_listm4_join([,
], m4_dquote_elt($@))
T17,203
m4_cr_not_Letters
!"#*%&'()$+,./0123456789:;<=>?@[\]^_`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T17,292
_m4_require_checkm4_if(_m4_defn([_m4_diverting]), [$2], [m4_ignore],
m4_ifdef([_m4_diverting([$2])], [-]), [-], [m4_warn([syntax],
[$3: `$1' was expanded before it was required
http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required])_m4_require_call],
[m4_ignore])
T13,42
m4_mapall_sepm4_if([$3], [], [], [_$0([$1], [$2], $3)])
F11,11
__program____program__
T17,105
_m4_define_cr_notm4_define([m4_cr_not_$1],
m4_translit(m4_dquote(m4_defn([m4_cr_all])),
m4_defn([m4_cr_$1])))
T15,4
m4_PACKAGE_YEAR2012
F14,6
_m4_divert_rawdivert
T18,72
m4_version_compare_m4_list_cmp_raw(_m4_version_unletter([$1]), _m4_version_unletter([$2]))
T14,122
m4_append_uniqm4_ifval([$3], [m4_if(m4_index([$2], [$3]), [-1], [],
[m4_warn([syntax],
[$0: `$2' contains `$3'])])])_$0($@)
T9,4
m4_dquote[$@]
T24,32
m4_default_nblank_quotedm4_ifblank([$1], [[$2]], [[$1]])
T17,28
m4_default_nblankm4_ifblank([$1], [$2], [$1])
T12,83
m4_set_unionm4_set_listc([$1])m4_if([$1], [$2], [],
[m4_set_map_sep([$2], [_$0([$1],], [)])])
T21,97
m4_copyright_condensem4_text_wrap(m4_bpatsubst(m4_flatten([[$1]]),
[(C)[- ,0-9]*\([1-9][0-9][0-9][0-9]\)], [(C) \1]))
T12,152
_m4_set_dumpm4_ifdef([_m4_set([$1])],
[[$2]_m4_defn([_m4_set([$1])])_m4_popdef([_m4_set([$1],]_m4_defn(
[_m4_set([$1])])[)], [_m4_set([$1])])$0([$1], [$2$3])])
T7,182
m4_condm4_if([$#], [0], [m4_fatal([$0: cannot be called without arguments])],
[$#], [1], [$1],
m4_eval([$# % 3]), [2], [m4_fatal([$0: missing an argument])],
[_$0($@)])
T14,62
m4_set_foreachm4_pushdef([$2])m4_set_map_sep([$1], [m4_define([$2],], [)$3])
T9,156
m4_escapem4_if(m4_index(m4_translit([$1],
[[]#,()][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789], [$$$]), [$]),
[-1], [m4_echo], [_$0])([$1])
T18,206
_m4_text_wrap_wordm4_define([m4_Cursor], m4_eval(m4_Cursor + m4_qlen([$1]) + 1))m4_if(m4_eval(m4_Cursor > ([$3])),
[1], [m4_define([m4_Cursor], m4_eval(m4_Indent + m4_qlen([$1]) + 1))
[$2]],
[m4_Separator[]])[$1]
T12,93
m4_text_wrap_$0(m4_escape([$1]), [$2], m4_default_quoted([$3], [$2]),
m4_default_quoted([$4], [79]))
T20,53
m4_divert_stack_pushm4_pushdef([_m4_divert_stack], m4_location[: $1: $2])
T10,40
m4_warningm4_errprintn(m4_location[: warning: $1])
F10,7
m4_mkstempmkstemp
T12,10
m4_cr_digits0123456789
T11,136
m4_set_dumpm4_ifdef([_m4_set_size($1)],
[_m4_popdef([_m4_set_size($1)])])m4_ifdef([_m4_set_cleanup($1)],
[_$0_check], [_$0])([$1], [], [$2])
T11,17
m4_location__file__:__line__
T8,4
m4_quote[$*]
F9,6
m4_syscmdsyscmd
T16,55
_m4_divert_stack../../lib/m4sugar/m4sugar.m4:3259: m4_divert_push: KILL
T9,31
_m4_applym4_if([$2], [], [], [$1($2)[]])
F11,8
m4_traceofftraceoff
T8,2
m4_count$#
F6,3
m4_lenlen
T14,113
m4_expand_oncem4_provide_if(m4_default_quoted([$2], [$1]),
[],
[m4_provide(m4_default_quoted([$2], [$1]))[]$1])
T11,53
_m4_joinallm4_if([$#], [2], [], [[$1$3]$0([$1], m4_shift2($@))])
T16,2
_m4_divert(KILL)-1
F8,5
m4_indirindir
T17,31
m4_default_quotedm4_if([$1], [], [[$2]], [[$1]])
T9,58
m4_ifvalnm4_if([$1],
[], [m4_n([$3])],
[m4_n([$2])])
F8,5
m4_indexindex
T8,85
_m4_joinm4_if([$#$2], [2], [],
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift2($@))])
T17,63
m4_set_differencem4_if([$1], [$2], [], [m4_set_map_sep([$1], [_$0([$2],], [)])])
T17,0
m4_pattern_forbid
F10,7
m4_traceontraceon
T10,84
_m4_minmaxm4_if([$#], [3], [$1([$2], [$3])],
[$0([$1], $1([$2], [$3]), m4_shift3($@))])
T12,110
_m4_set_sizem4_define([_m4_set_size($1)],
m4_ifdef([_m4_set_size($1)], [$2(m4_indir([_m4_set_size($1)]))],
[1]))
T10,86
m4_tolowerm4_translit([[$1]], [ABCDEFGHIJKLMNOPQRSTUVWXYZ],
[abcdefghijklmnopqrstuvwxyz])
T10,121
m4_re_word[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*
T13,82
m4_dquote_eltm4_if([$#], [0], [],
[$#], [1], [[[$1]]],
[[[$1]],$0(m4_shift($@))])
T10,36
_m4_expand$0_([$1], [(], -=<{($1)}>=-, [}>=-])
T12,66
m4_re_string[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*
F11,8
m4_errprinterrprint
T6,122
m4_cdrm4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
[$#], 1, [],
[m4_dquote(m4_shift($@))])
T18,4
m4_PACKAGE_VERSION2.69
T10,27
m4_joinall[$2]_$0([$1], m4_shift($@))
T17,64
_m4_divert_unsafem4_fatal([$0: cannot change diversion to `$1' inside m4_expand])
T13,333
m4_divert_popm4_if([$1], [], [],
[$1], _m4_defn([_m4_divert_diversion]), [],
[m4_fatal([$0($1): diversion mismatch:
]m4_divert_stack)])_m4_popdef([_m4_divert_stack], [_m4_divert_diversion])m4_ifdef([_m4_divert_diversion], [],
[m4_fatal([too many m4_divert_pop])])_m4_divert_raw(_m4_divert(_m4_defn([_m4_divert_diversion]), [-]))
T11,65
m4_set_sizem4_ifdef([_m4_set_size($1)], [m4_indir([_m4_set_size($1)])], [0])
T12,25
m4_set_listcm4_set_map_sep([$1], [,])
T10,54
m4_ifblankm4_if(m4_translit([[$1]], [ ][ ][
]), [], [$2], [$3])
T7,20
m4_wrap_m4_wrap([], [$1[]])
T15,165
_m4_set_add_allm4_if([$#], [2], [],
[m4_ifdef([_m4_set([$1],$3)], [],
[m4_define([_m4_set([$1],$3)], [1])m4_pushdef([_m4_set([$1])],
[$3])-])$0([$1], m4_shift2($@))])
T7,48
m4_qlenm4_ifdef([$0-$1], [_m4_defn([$0-]], [_$0(])[$1])
T14,41
_m4_list_cmp_1_m4_list_cmp_2([$2], [m4_shift2($@)], $1)
T14,95
_m4_list_cmp_2_m4_list_cmp([$1$3], m4_cmp([$3+0], [$1+0]))(
[_m4_list_cmp_1(m4_dquote(m4_shift3($@)), $2)])
T12,18
m4_errprintnm4_errprint([$1
])
T10,86
m4_toupperm4_translit([[$1]], [abcdefghijklmnopqrstuvwxyz],
[ABCDEFGHIJKLMNOPQRSTUVWXYZ])
T9,0
m4_ignore
T19,288
_m4_set_contents_1cm4_ifdef([_m4_set([$1])],
[m4_set_contains([$1], _m4_defn([_m4_set([$1])]),
[m4_pushdef([_m4_set_($1)], _m4_defn([_m4_set([$1])]))],
[_m4_popdef([_m4_set([$1],]_m4_defn(
[_m4_set([$1])])[)])])_m4_popdef([_m4_set([$1])])$0([$1])],
[_m4_popdef([_m4_set_cleanup($1)])])
T14,44
m4_divert_oncem4_expand_once([m4_divert_text([$1], [$2])])
T10,143
m4_map_sepm4_pushdef([m4_Sep], [m4_define([m4_Sep], _m4_defn([m4_unquote]))])_m4_foreach([_m4_apply([m4_Sep([$2])[]$1],], [)], [], $3)m4_popdef([m4_Sep])
T7,75
m4_warn_m4_warn([$1], [$2],
m4_ifdef([_m4_expansion_stack], [m4_expansion_stack]))
T9,36
m4_renamem4_copy([$1], [$2])m4_undefine([$1])
F12,9
m4_changecomchangecom
F3,3
dnldnl
T13,134
_m4_defun_epi_m4_popdef([_m4_expanding($1)], [_m4_expansion_stack])m4_ifdef([_m4_expansion_stack], [], [_m4_defun_epi_outer([$1])])m4_provide([$1])
F9,6
m4_formatformat
T7,54
_m4_cdrm4_if([$#], 1, [],
[, m4_dquote(m4_shift($@))])
T8,189
m4_splitm4_if([$1], [], [],
[$2], [ ], [m4_if(m4_index([$1], [ ]), [-1], [[[$1]]],
[_$0([$1], [$2], [, ])])],
[$2], [], [_$0([$1], [[ ]+], [, ])],
[_$0([$1], [$2], [, ])])
T17,253
m4_divert_requirem4_ifdef([_m4_expanding($2)],
[m4_fatal([$0: circular dependency of $2])])m4_if(_m4_divert_dump, [],
[m4_fatal([$0($2): cannot be used outside of an m4_defun'd macro])])m4_provide_if([$2], [],
[_m4_require_call([$2], [$3], _m4_divert([$1], [-]))])
T15,0
_m4_divert_dump
T6,43
m4_map_m4_foreach([_m4_apply([$1],], [)], [], $2)
T18,50
_m4_set_contents_1_m4_stack_reverse([_m4_set([$1])], [_m4_set_($1)])
T18,94
_m4_set_contents_2_m4_stack_reverse([_m4_set_($1)], [_m4_set([$1])],
[$2[]_m4_defn([_m4_set_($1)])$3], [$4[]])
T10,294
_m4_escapem4_changequote([-=<{(],[)}>=-])m4_bpatsubst(m4_bpatsubst(m4_bpatsubst(m4_bpatsubst(
-=<{(-=<{(-=<{(-=<{(-=<{($1)}>=-)}>=-)}>=-)}>=-)}>=-,
-=<{(#)}>=-, -=<{(@%:@)}>=-),
-=<{(\[)}>=-, -=<{(@<:@)}>=-),
-=<{(\])}>=-, -=<{(@:>@)}>=-),
-=<{(\$)}>=-, -=<{(@S|@)}>=-)m4_changequote([,])
T16,5
_m4_divert(GROW)10000
T6,190
m4_minm4_if([$#], [0], [m4_fatal([too few arguments to $0])],
[$#], [1], [m4_eval([$1])],
[$#$1], [2$2], [m4_eval([$1])],
[$#], [2], [_$0($@)],
[_m4_minmax([_$0], $@)])
T12,78
m4_foreach_wm4_pushdef([$1])m4_map_args_w([$2],
[m4_define([$1],], [)$3])m4_popdef([$1])
T11,55
m4_sincludem4_include_unique([$1])dnl
m4_builtin([sinclude], [$1])
T7,156
m4_defnm4_if([$#], [0], [[$0]],
[$#], [1], [m4_ifdef([$1], [_m4_defn([$1])],
[m4_fatal([$0: undefined macro: $1])])],
[m4_map_args([$0], $@)])
T6,190
m4_maxm4_if([$#], [0], [m4_fatal([too few arguments to $0])],
[$#], [1], [m4_eval([$1])],
[$#$1], [2$2], [m4_eval([$1])],
[$#], [2], [_$0($@)],
[_m4_minmax([_$0], $@)])
T16,0
m4_pattern_allow
T14,58
_m4_map_args_wm4_substr([$1], [$2], m4_eval(m4_len([$1]) - [$2] - [$3]))
T30,0
m4_include(m4sugar/version.m4)
T17,32
m4_define_defaultm4_ifndef([$1], [m4_define($@)])
T16,101
m4_stack_foreach_m4_stack_reverse([$1], [m4_tmp-$1])_m4_stack_reverse([m4_tmp-$1], [$1], [$2(_m4_defn([m4_tmp-$1]))])
F10,7
m4_pushdefpushdef
T13,26
m4_cr_lettersabcdefghijklmnopqrstuvwxyz
T18,8
m4_PACKAGE_TARNAMEautoconf
F8,8
__line____line__
T9,255
m4_cr_all
!"#*%&'()$+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T13,252
m4_set_removem4_set_contains([$1], [$2], [_m4_set_size([$1],
[m4_decr])m4_if(_m4_defn([_m4_set([$1])]), [$2],
[_m4_popdef([_m4_set([$1],$2)], [_m4_set([$1])])],
[m4_define([_m4_set_cleanup($1)])m4_define(
[_m4_set([$1],$2)], [0])])$3], [$4])
T17,229
m4_cr_not_letters
!"#*%&'()$+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T8,27
m4_ifvalm4_if([$1], [], [$3], [$2])
T13,207
m4_map_args_w_$0(_m4_split([ ]m4_flatten([$1])[ ], [[ ]+],
m4_if(m4_index([$2$3$4], [\]), [-1], [[$3[]$4[]$2]],
[m4_bpatsubst([[$3[]$4[]$2]], [\\], [\\\\])])),
m4_len([[]$3[]$4]), m4_len([$4[]$2[]]))
T17,117
m4_include_uniquem4_ifdef([m4_include($1)],
[m4_warn([syntax], [file `$1' included several times])])dnl
m4_define([m4_include($1)])
T12,30
m4_esyscmd_sm4_chomp_all(m4_esyscmd([$1]))
F10,6
_m4_popdefpopdef
T8,99
_m4_condm4_if(($1), [($2)], [$3],
[$#], [3], [],
[$#], [4], [$4],
[$0(m4_shift3($@))])
F9,6
m4_divnumdivnum
T12,77
m4_chomp_allm4_format([[%.*s]], m4_bregexp(m4_translit([[$1]], [
/], [/ ]), [/*$]), [$1])
F7,4
m4_evaleval
T8,19
m4_curry$1(m4_shift($@,)_$0
T9,222
m4_bmatchm4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])],
[$#], 1, [m4_fatal([$0: too few arguments: $#: $1])],
[$#], 2, [$2],
[m4_if(m4_bregexp([$1], [$2]), -1, [$0([$1], m4_shift3($@))],
[$3])])
T16,54
m4_append_uniq_wm4_map_args_w([$2], [_m4_append_uniq([$1],], [, [ ])])
T20,36
_m4_set_intersectionm4_set_contains([$1], [$2], [,[$2]])
T6,4
m4_car[$1]
T11,238
m4_text_boxm4_pushdef([m4_Border],
m4_translit(m4_format([[[%*s]]], m4_decr(m4_qlen(_m4_expand([$1
]))), []), [ ], m4_default_quoted([$2], [-])))[##] _m4_defn([m4_Border]) [##]
[##] $1 [##]
[##] _m4_defn([m4_Border]) [##]_m4_popdef([m4_Border])
T7,65
_m4_minm4_eval((([$1]) < ([$2])) * ([$1]) + (([$1]) >= ([$2])) * ([$2]))
T20,170
_m4_version_unletterm4_bpatsubst(m4_bpatsubst(m4_translit([[[[0,$1]]]], [.-], [,,]),[[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]][+],
[+1,-1,[0r36:\&]]), [,0], [,[0r10:0]])
T12,1
_m4_divert()0
T11,149
m4_map_argsm4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
[$#], [1], [],
[$#], [2], [$1([$2])[]],
[_m4_foreach([$1(], [)], $@)])
T6,46
m4_cmpm4_eval((([$1]) > ([$2])) - (([$1]) < ([$2])))
T7,65
_m4_maxm4_eval((([$1]) > ([$2])) * ([$1]) + (([$1]) <= ([$2])) * ([$2]))
T7,36
m4_signm4_eval((([$1]) > 0) - (([$1]) < 0))
T19,166
m4_set_intersectionm4_if([$1], [$2], [m4_set_listc([$1])],
m4_eval(m4_set_size([$2]) < m4_set_size([$1])), [1], [$0([$2], [$1])],
[m4_set_map_sep([$1], [_$0([$2],], [)])])
T9,158
m4_popdefm4_if([$#], [0], [[$0]],
[$#], [1], [m4_ifdef([$1], [_m4_popdef([$1])],
[m4_fatal([$0: undefined macro: $1])])],
[m4_map_args([$0], $@)])
T10,280
m4_set_addm4_ifdef([_m4_set([$1],$2)],
[m4_if(m4_indir([_m4_set([$1],$2)]), [0],
[m4_define([_m4_set([$1],$2)],
[1])_m4_set_size([$1], [m4_incr])$3], [$4])],
[m4_define([_m4_set([$1],$2)],
[1])m4_pushdef([_m4_set([$1])],
[$2])_m4_set_size([$1], [m4_incr])$3])
T14,131
m4_set_add_allm4_define([_m4_set_size($1)], m4_eval(m4_set_size([$1])
+ m4_len(m4_ifdef([_m4_set_cleanup($1)], [_$0_check], [_$0])([$1], $@))))
T19,62
m4_version_unletterm4_substr(m4_map_args([.m4_eval], m4_unquote(_$0([$1]))), [3])
T16,50
_m4_list_cmp_rawm4_if([$1], [$2], [0], [_m4_list_cmp_1([$1], $2)])
T11,33
m4_set_listm4_set_map_sep([$1], [], [], [,])
T10,72
m4_reversem4_if([$#], [0], [], [$#], [1], [[$1]],
[$0(m4_shift($@)), [$1]])
T7,1688
m4_init# All the M4sugar macros start with `m4_', except `dnl' kept as is
# for sake of simplicity.
m4_pattern_forbid([^_?m4_])
m4_pattern_forbid([^dnl$])
# If __m4_version__ is defined, we assume that we are being run by M4
# 1.6 or newer, thus $@ recursion is linear, and debugmode(+do)
# is available for faster checks of dereferencing undefined macros
# and forcing dumpdef to print to stderr regardless of debugfile.
# But if it is missing, we assume we are being run by M4 1.4.x, that
# $@ recursion is quadratic, and that we need foreach-based
# replacement macros. Also, m4 prior to 1.4.8 loses track of location
# during m4wrap text; __line__ should never be 0.
#
# Use the raw builtin to avoid tripping up include tracing.
# Meanwhile, avoid m4_copy, since it temporarily undefines m4_defn.
m4_ifdef([__m4_version__],
[m4_debugmode([+do])
m4_define([m4_defn], _m4_defn([_m4_defn]))
m4_define([m4_dumpdef], _m4_defn([_m4_dumpdef]))
m4_define([m4_popdef], _m4_defn([_m4_popdef]))
m4_define([m4_undefine], _m4_defn([_m4_undefine]))],
[m4_builtin([include], [m4sugar/foreach.m4])
m4_wrap_lifo([m4_if(__line__, [0], [m4_pushdef([m4_location],
]]m4_dquote(m4_dquote(m4_dquote(__file__:__line__)))[[)])])])
# Rewrite the first entry of the diversion stack.
m4_divert([KILL])
# Check the divert push/pop perfect balance.
# Some users are prone to also use m4_wrap to register last-minute
# m4_divert_text; so after our diversion cleanups, we restore
# KILL as the bottom of the diversion stack.
m4_wrap([m4_popdef([_m4_divert_diversion])m4_ifdef(
[_m4_divert_diversion], [m4_fatal([$0: unbalanced m4_divert_push:
]m4_divert_stack)])_m4_popdef([_m4_divert_stack])m4_divert_push([KILL])])
T11,70
_m4_foreachm4_if([$#], [3], [],
[$1[$4]$2[]$0([$1], [$2], m4_shift3($@))])
T12,93
m4_set_emptym4_ifdef([_m4_set_size($1)],
[m4_if(m4_indir([_m4_set_size($1)]), [0], [$2], [$3])], [$2])
F10,6
m4_bregexpregexp
T9,22
m4_shift2m4_shift(m4_shift($@))
T9,32
m4_shift3m4_shift(m4_shift(m4_shift($@)))
T6,598
m4_form4_pushdef([$1], m4_eval([$2]))m4_cond([m4_eval(([$3]) > ([$2]))], 1,
[m4_pushdef([_m4_step], m4_eval(m4_default_quoted([$4],
1)))m4_assert(_m4_step > 0)_$0(_m4_defn([$1]),
m4_eval((([$3]) - ([$2])) / _m4_step * _m4_step + ([$2])), _m4_step,],
[m4_eval(([$3]) < ([$2]))], 1,
[m4_pushdef([_m4_step], m4_eval(m4_default_quoted([$4],
-1)))m4_assert(_m4_step < 0)_$0(_m4_defn([$1]),
m4_eval((([$2]) - ([$3])) / -(_m4_step) * _m4_step + ([$2])), _m4_step,],
[m4_pushdef([_m4_step])_$0(_m4_defn([$1]), _m4_defn([$1]), 0,])[m4_define([$1],], [)$5])m4_popdef([_m4_step], [$1])
F10,7
m4_esyscmdesyscmd
F12,9
m4_debugfiledebugfile
T11,146
_m4_expand_m4_if([$4], [}>=-],
[m4_changequote([-=<{$2], [)}>=-])$3m4_changequote([, ])],
[$0([$1], [($2], -=<{($2$1)}>=-, [}>=-])m4_ignore$2])
T19,156
_m4_defun_pro_outerm4_set_delete([_m4_provide])m4_pushdef([_m4_diverting([$1])])m4_pushdef([_m4_diverting], [$1])m4_pushdef([_m4_divert_dump], m4_divnum)m4_divert_push([GROW])
T8,189
_m4_wrapm4_ifdef([$0_text],
[m4_define([$0_text], [$1]_m4_defn([$0_text])[$2])],
[m4_builtin([m4wrap], [m4_unquote(
_m4_defn([$0_text])_m4_popdef([$0_text]))])m4_define([$0_text], [$1$2])])
T10,100
m4_foreachm4_if([$2], [], [],
[m4_pushdef([$1])_$0([m4_define([$1],], [)$3], [],
$2)m4_popdef([$1])])
T15,58
m4_divert_stackm4_stack_foreach_sep_lifo([_m4_divert_stack], [], [], [
])
T9,69
m4_assertm4_if(m4_eval([$1]), 0,
[m4_fatal([assert failed: $1], [$2])])
D-1,0
# End of frozen state file
070701000679b0000081a400000000000000000000000153b4ffc2000118ce000000b500010002ffffffffffffffff0000002f00000000root/usr/local/share/autoconf/m4sugar/m4sh.m4f # This is a frozen state file generated by GNU M4 1.4.16
V1
Q1,1
[]
T10,154
m4_providem4_ifdef([m4_provide($1)], [],
[m4_set_add([_m4_provide], [$1], [m4_define([m4_provide($1)],
m4_ifdef([_m4_diverting], [_m4_defn([_m4_diverting])]))])])
T15,55
_AS_TR_SH_INDIR`AS_ECHO(["_AS_ESCAPE([[$1]], [`], [\])"]) | $as_tr_sh`
T21,342
_AS_BOURNE_COMPATIBLEAS_IF([test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1],
[emulate sh
NULLCMD=:
[#] Pre-4.2 versions of Zsh do word splitting on ${1+"$[@]"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$[@]"}'='"$[@]"'
setopt NO_GLOB_SUBST],
[AS_CASE([`(set -o) 2>/dev/null`], [*posix*], [set -o posix])])
T20,1
AS_ORIGINAL_STDIN_FD0
T29,30
m4_location(_AS_EXPR_PREPARE)../../lib/m4sugar/m4sh.m4:1108
T8,198
_m4_qlenm4_define([m4_qlen-$1],
m4_if(m4_index([$1], [@]), [-1], [m4_len([$1])],
[m4_len(m4_bpatsubst([[$1]],
[@\(\(<:\|:>\|S|\|%:\|\{:\|:\}\)\(@\)\|&t@\)],
[\3]))]))_m4_defn([m4_qlen-$1])
T7,30
AS_WARNAS_MESSAGE([WARNING: $1], [2])
T9,68
_AS_TR_SH_AS_LITERAL_IF([$1], [*][ ][
])([], [$0_INDIR], [$0_LITERAL])([$1])
F7,4
m4_decrdecr
T6,264
AS_FOR_m4_defun_pro([$0])m4_pushdef([$1], m4_if([$3], [], [[$$2]], m4_translit([$3], [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789][%+=:,./-]), [], [[$3]], [[$$2]]))for $2[]m4_ifval([$3], [ in $3])
do :
$4
done[]_m4_popdef([$1])[]_m4_defun_epi([$0])
T14,42
m4_divert_textm4_divert_push([$1])$2
m4_divert_pop([$1])
T10,3
m4_newline
$1
T20,181
AS_FUNCTION_DESCRIBE@%:@ $1[]m4_ifval([$2], [ $2])
@%:@ m4_translit(m4_format([%*s],
m4_decr(m4_qlen(_m4_expand([$1[]m4_ifval([$2], [ $2])
]))), []), [ ], [-])
m4_text_wrap([$3], [@%:@ ], [], [$4])
T5,73
m4_dom4_if([$#], 0, [],
[$#], 1, [$1[]],
[$1[]$0(m4_shift($@))])
T7,2
m4_echo$@
T10,27
m4_defaultm4_if([$1], [], [$2], [$1])
T22,30
m4_location(AS_ECHO_N)../../lib/m4sugar/m4sh.m4:1034
T16,103
AS_IDENTIFIER_IFm4_if(_$0(m4_if(m4_index([$1], [@]), [-1],
[[$1]], [m4_bpatsubst([[$1]], [@&t@])])), [-], [$2], [$3])
T7,91
m4_argnm4_assert([0 < $1])m4_pushdef([_$0], [_m4_popdef([_$0])]m4_dquote([$]m4_incr([$1])))_$0($@)
T10,91
AS_VAR_SETAS_LITERAL_WORD_IF([$1],
[$1=$2],
[eval "$1=_AS_ESCAPE([$2], [`], [\"$])"])
T7,197
m4_copym4_ifdef([$2], [m4_fatal([$0: won't overwrite defined macro: $2])],
[m4_stack_foreach_sep([$1], [m4_pushdef([$2],], [)])])m4_ifdef([m4_location($1)], [m4_define([m4_location($2)], m4_location)])
T17,780
_AS_ERROR_PREPAREAS_REQUIRE_SHELL_FN([as_fn_error],
[AS_FUNCTION_DESCRIBE([as_fn_error], [STATUS ERROR]m4_ifval(AS_MESSAGE_LOG_FD,
[[ [[LINENO LOG_FD]]]]),
[Output "`basename @S|@0`: error: ERROR" to stderr.]
m4_ifval(AS_MESSAGE_LOG_FD,
[[If LINENO and LOG_FD are provided, also output the error to LOG_FD,
referencing LINENO.]])
[Then exit the script with STATUS, using 1 if that was 0.])],
[ as_status=$[1]; test $as_status -eq 0 && as_status=1
m4_ifval(AS_MESSAGE_LOG_FD,
[m4_pushdef([AS_MESSAGE_LOG_FD], [$[4]])dnl
if test "$[4]"; then
AS_LINENO_PUSH([$[3]])
_AS_ECHO_LOG([error: $[2]])
fi
m4_define([AS_MESSAGE_LOG_FD])], [m4_pushdef([AS_MESSAGE_LOG_FD])])dnl
AS_MESSAGE([error: $[2]], [2])
_m4_popdef([AS_MESSAGE_LOG_FD])dnl
AS_EXIT([$as_status])])
T9,28
_m4_quotem4_if([$#], [0], [], [[$*]])
T8,33
m4_applym4_if([$2], [], [$1], [$1($2)])[]
T8,0
_m4_warn
T21,29
m4_location(AS_UNSET)../../lib/m4sugar/m4sh.m4:671
T10,103
m4_flattenm4_if(m4_index([$1], [
]), [-1], [[$1]],
[m4_translit(m4_bpatsubst([[[$1]]], [\\
]), [
], [ ])])
F12,9
m4_debugmodedebugmode
T20,30
m4_location(AS_LN_S)../../lib/m4sugar/m4sh.m4:1257
T7,0
__gnu__
T9,35
m4_shiftnm4_assert(0 < $1 && $1 < $#)_$0($@)
T13,276
m4_set_deletem4_ifdef([_m4_set([$1])],
[_m4_popdef([_m4_set([$1],]_m4_defn([_m4_set([$1])])[)],
[_m4_set([$1])])$0([$1])],
[m4_ifdef([_m4_set_cleanup($1)],
[_m4_popdef([_m4_set_cleanup($1)])])m4_ifdef(
[_m4_set_size($1)],
[_m4_popdef([_m4_set_size($1)])])])
T14,102
_AS_ME_PREPARE_m4_defun_pro([$0])AS_REQUIRE([_AS_BASENAME_PREPARE])as_me=`AS_BASENAME("$[0]")`
[]_m4_defun_epi([$0])
T7,84
_m4_for$4[$1]$5[]m4_if([$1], [$2], [],
[$0(m4_eval([$1 + $3]), [$2], [$3], [$4], [$5])])
T12,71
AS_COPYRIGHTm4_divert_text([HEADER-COPYRIGHT],
[m4_bpatsubst([
$1], [^], [@%:@ ])])
T13,1
AS_MESSAGE_FD1
T27,30
m4_location(_AS_CR_PREPARE)../../lib/m4sugar/m4sh.m4:1793
T18,1268
_AS_LINENO_PREPARE_m4_defun_pro([$0])AS_REQUIRE([_AS_CR_PREPARE])AS_REQUIRE([_AS_ME_PREPARE])_AS_DETECT_SUGGESTED([_AS_LINENO_WORKS])m4_pushdef([AS_MESSAGE_LOG_FD])m4_pushdef([AS_ERROR],
[{ AS_MESSAGE(]m4_dquote([error: $][1])[, [2]); AS_EXIT([1]); }])_AS_LINENO_WORKS || {
[ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
sed -n '
p
/[$]LINENO/=
' <$as_myself |
sed '
s/[$]LINENO.*/&-/
t lineno
b
:lineno
N
:loop
s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
t loop
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno"] ||
AS_ERROR([cannot create $as_me.lineno; rerun with a POSIX shell])
# If we had to re-execute with $CONFIG_SHELL, we're ensured to have
# already done that, so ensure we don't try to do so again and fall
# in an infinite loop. This has already happened in practice.
_as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
. "./$as_me.lineno"
# Exit status is that of the last command.
exit
}
_m4_popdef([AS_MESSAGE_LOG_FD], [AS_ERROR])[]_m4_defun_epi([$0])
T40,30
m4_location(_AS_VERSION_COMPARE_PREPARE)../../lib/m4sugar/m4sh.m4:1697
T11,31
_AS_IF_ELSEm4_ifnblank([$1],
[else
$1
])
T21,30
m4_location(AS_TR_SH)../../lib/m4sugar/m4sh.m4:1826
T30,29
m4_location(_AS_UNSET_PREPARE)../../lib/m4sugar/m4sh.m4:657
T16,400
_AS_EXIT_PREPARE_m4_defun_pro([$0])AS_REQUIRE_SHELL_FN([as_fn_set_status],
[AS_FUNCTION_DESCRIBE([as_fn_set_status], [STATUS],
[Set $? to STATUS, without forking.])], [ return $[]1])AS_REQUIRE_SHELL_FN([as_fn_exit],
[AS_FUNCTION_DESCRIBE([as_fn_exit], [STATUS],
[Exit the shell with STATUS, even in a "trap 0" or "set -e" context.])],
[ set +e
as_fn_set_status $[1]
exit $[1]])[]_m4_defun_epi([$0])
T13,175
m4_defun_initm4_define([$1], [$3[]])m4_defun([$1],
[$2[]_m4_popdef(]m4_dquote($[0])[)m4_indir(]m4_dquote($[0])dnl
[m4_if(]m4_dquote($[#])[, [0], [], ]m4_dquote([,$]@)[))], [m4_pushdef])
T23,30
m4_location(AS_DIRNAME)../../lib/m4sugar/m4sh.m4:1002
T11,165
_m4_dumpdefm4_if([$#], [0], [m4_fatal([$0: missing argument])],
[$#], [1], [m4_builtin([dumpdef], [$1])],
[m4_map_args_sep([m4_builtin([dumpdef],], [)], [], $@)])
T20,33
_AS_REQUIRE_SHELL_FN
m4_n([$2])$1 ()
{
$3
} @%:@ $1[]
T14,199
AS_SET_CATFILEcase $2 in @%:@((
.) AS_VAR_SET([$1], [$3]);;
*)
case $3 in @%:@(((
.) AS_VAR_SET([$1], [$2]);;
[[\\/]]* | ?:[[\\/]]* ) AS_VAR_SET([$1], [$3]);;
*) AS_VAR_SET([$1], [$2/$3]);;
esac;;
esac[]
T17,94
_m4_stack_reversem4_ifdef([$1], [m4_pushdef([$2],
_m4_defn([$1]))$3[]_m4_popdef([$1])$0([$1], [$2], [$4$3])])
F8,4
_m4_defndefn
T12,47
AS_VAR_ARITHas_fn_arith $2 && AS_VAR_SET([$1], [$as_val])[]
T12,197
AS_VAR_ARITH_m4_defun_pro([$0])_AS_DETECT_SUGGESTED([_AS_VAR_ARITH_WORKS])AS_REQUIRE([_AS_VAR_ARITH_PREPARE], [], [M4SH-INIT-FN])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T17,1
_m4_divert(BINSH)0
T24,1
_m4_divert(M4SH-INIT-FN)5
T20,96
_AS_DETECT_SUGGESTED_m4_defun_pro([$0])m4_set_add([_AS_DETECT_SUGGESTED_BODY], [$1 || AS_EXIT])[]_m4_defun_epi([$0])
T7,119
m4_casem4_if([$#], 0, [],
[$#], 1, [],
[$#], 2, [$2],
[$1], [$2], [$3],
[$0([$1], m4_shift3($@))])
T13,57
AS_ME_PREPARE_m4_defun_pro([$0])AS_REQUIRE([_$0])[]_m4_defun_epi([$0])
T20,30
m4_location(AS_ECHO)../../lib/m4sugar/m4sh.m4:1026
T21,76
_m4_set_add_all_checkm4_if([$#], [2], [],
[m4_set_add([$1], [$3])$0([$1], m4_shift2($@))])
T15,5
_m4_divert_grow10000
T10,54
m4_includem4_include_unique([$1])dnl
m4_builtin([include], [$1])
T14,181
_AS_LITERAL_IFm4_if(m4_index([$1], [@S|@]), [-1], [$0_(m4_translit([$1],
[-:=%/@{}[]#(),.$2]][[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]][,
[++++++$$`````]))], [$0_NO])
T19,147
AS_REQUIRE_SHELL_FNm4_provide_if([AS_SHELL_FN_$1], [],
[AS_REQUIRE([AS_SHELL_FN_$1],
[m4_provide([AS_SHELL_FN_$1])_$0($@)],
m4_default_quoted([$4], [M4SH-INIT-FN]))])
T16,283
_AS_TEST_PREPARE_m4_defun_pro([$0])AS_REQUIRE_SHELL_FN([as_fn_executable_p],
[AS_FUNCTION_DESCRIBE([as_fn_executable_p], [FILE],
[Test if FILE is an executable regular file.])],
[ test -f "$[]1" && test -x "$[]1"])as_test_x='test -x'
as_executable_p=as_fn_executable_p
[]_m4_defun_epi([$0])
T17,51
_AS_ECHO_UNQUOTEDAS_ECHO(["$1"]) >&m4_default([$2], [AS_MESSAGE_FD])
T13,110
_AS_CLEAN_DIRif test -d $1; then
find $1 -type d ! -perm -700 -exec chmod u+rwx {} \;
rm -fr $1/* $1/.[[!.]] $1/.??*
fi
T29,29
m4_location(_AS_EXIT_PREPARE)../../lib/m4sugar/m4sh.m4:568
F9,6
m4_definedefine
F9,6
m4_sysvalsysval
T17,17
m4_PACKAGE_STRINGGNU Autoconf 2.69
T15,12
m4_PACKAGE_NAMEGNU Autoconf
T10,82
AS_DIRNAME$as_dirname -- $1 ||
_AS_DIRNAME_EXPR([$1]) 2>/dev/null ||
_AS_DIRNAME_SED([$1])[]
T10,124
AS_DIRNAME_m4_defun_pro([$0])AS_REQUIRE([_$0_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T18,202
m4_cr_not_symbols1
!"#*%&'()$+,./0123456789:;<=>?@[\]^`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T16,225
_AS_LINENO_WORKS as_lineno_1=$LINENO as_lineno_1a=$LINENO
as_lineno_2=$LINENO as_lineno_2a=$LINENO
eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"'
T18,192
m4_cr_not_symbols2
!"#*%&'()$+,./:;<=>?@[\]^`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T15,23
AS_EXECUTABLE_Pas_fn_executable_p $1[]
T15,129
AS_EXECUTABLE_P_m4_defun_pro([$0])AS_REQUIRE([_AS_TEST_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T15,193
m4_cr_not_alnum
!"#*%&'()$+,./:;<=>?@[\]^_`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T10,62
m4_noquotem4_changequote([-=<{(],[)}>=-])$1-=<{()}>=-m4_changequote([,])
T32,30
m4_location(_AS_MKDIR_P_PREPARE)../../lib/m4sugar/m4sh.m4:1296
T10,211
m4_dumpdefm4_if([$#], [0], [m4_fatal([$0: missing argument])],
[$#], [1], [m4_ifdef([$1], [m4_errprintn(
[$1: ]m4_dquote(_m4_defn([$1])))], [m4_fatal([$0: undefined macro: $1])])],
[m4_map_args([$0], $@)])
T20,4
_m4_divert_diversionKILL
T14,28
AS_VAR_PUSHDEF_$0([$1], m4_expand([$2]))[]
T14,130
AS_VAR_PUSHDEF_m4_defun_pro([$0])AS_REQUIRE([_AS_TR_SH_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T12,26
m4_normalizem4_strip(m4_flatten([$1]))
T23,39
m4_expansion_stack_pushm4_pushdef([_m4_expansion_stack], [$1])
T12,48
m4_re_escapem4_bpatsubst([$1],
[[][*+.?\^$]], [\\\&])
T17,152
m4_version_prereqm4_if(m4_version_compare([2.69], [$1]),
[-1],
[m4_default([$3],
[m4_fatal([Autoconf version $1 or higher is required],
[63])])],
[$2])
T16,27
_AS_QUOTE_MODERN_AS_ESCAPE([$1], [`], [""])
T14,116
AS_LINENO_PUSH_m4_defun_pro([$0])as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack[]_m4_defun_epi([$0])
T17,478
AS_INIT_GENERATED_m4_defun_pro([$0])m4_require([AS_PREPARE])m4_pushdef([AS_MESSAGE_LOG_FD])as_write_fail=0
cat >$1 <<_ASEOF || as_write_fail=1
#! $SHELL
# Generated by $as_me.
$2
SHELL=\${CONFIG_SHELL-$SHELL}
export SHELL
_ASEOF
cat >>$1 <<\_ASEOF || as_write_fail=1
_AS_SHELL_SANITIZE
_AS_PREPARE
m4_if(AS_MESSAGE_FD, [1], [], [exec AS_MESSAGE_FD>&1
])m4_text_box([Main body of $1 script.])
_ASEOF
test $as_write_fail = 0 && chmod +x $1[]dnl
_m4_popdef([AS_MESSAGE_LOG_FD])[]_m4_defun_epi([$0])
T8,150
m4_defunm4_define([m4_location($1)], m4_location)m4_default([$3], [m4_define])([$1],
[_m4_defun_pro(]m4_dquote($[0])[)$2[]_m4_defun_epi(]m4_dquote($[0])[)])
T13,47
AS_LITERAL_IF_$0(m4_expand([$1]), [ ][
])([$4], [$3], [$2])
T8,81
m4_chompm4_format([[%.*s]], m4_index(m4_translit([[$1]], [
/.], [/ ])[./.], [/.]), [$1])
T8,115
AS_ERRORas_fn_error m4_default([$2], [$?]) "_AS_QUOTE([$1])"m4_ifval(AS_MESSAGE_LOG_FD,
[ "$LINENO" AS_MESSAGE_LOG_FD])[]
T8,187
AS_ERROR_m4_defun_pro([$0])m4_append_uniq([_AS_CLEANUP],
[m4_divert_text([M4SH-INIT-FN], [_AS_ERROR_PREPARE[]])])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T25,29
m4_location(_AS_ECHO_LOG)../../lib/m4sugar/m4sh.m4:790
T16,245
m4_cr_not_digits
!"#*%&'()$+,./:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
F11,7
m4_maketempmkstemp
T27,30
m4_location(AS_VAR_PUSHDEF)../../lib/m4sugar/m4sh.m4:2066
F10,7
m4_builtinbuiltin
T17,164
_AS_UNSET_PREPARE_m4_defun_pro([$0])AS_FUNCTION_DESCRIBE([as_fn_unset], [VAR], [Portably unset VAR.])
as_fn_unset ()
{
AS_UNSET([$[1]])
}
as_unset=as_fn_unset[]_m4_defun_epi([$0])
T7,16
AS_LN_S$as_ln_s $1 $2[]
T7,129
AS_LN_S_m4_defun_pro([$0])AS_REQUIRE([_AS_LN_S_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T12,16
m4_wrap_lifo_m4_wrap([$1[]])
T20,29
m4_location(AS_CASE)../../lib/m4sugar/m4sh.m4:550
T25,53
_m4_expansion_stack_entry_m4_defn([m4_location($1)])[: $1 is expanded from...]
T14,110
m4_divert_pushm4_divert_stack_push([$0], [$1])m4_pushdef([_m4_divert_diversion], [$1])_m4_divert_raw(_m4_divert([$1], [$2]))
T26,29
m4_location(AS_LINENO_POP)../../lib/m4sugar/m4sh.m4:904
T10,55
_m4_shift2m4_if([$#], [2], [],
[, m4_shift(m4_shift($@))])
T10,65
_m4_shift3m4_if([$#], [3], [],
[, m4_shift(m4_shift(m4_shift($@)))])
T30,30
m4_location(_AS_TR_SH_PREPARE)../../lib/m4sugar/m4sh.m4:1805
T12,55
m4_copy_unm4m4_copy([$1], m4_bpatsubst([$1], [^m4_\(.*\)], [[\1]]))
T13,41
_m4_set_unionm4_ifdef([_m4_set([$1],$2)], [], [,[$2]])
T9,57
m4_appendm4_define([$1], m4_ifdef([$1], [_m4_defn([$1])[$3]])[$2])
T15,148
_m4_append_uniqm4_ifdef([$1],
[m4_if(m4_index([$3]_m4_defn([$1])[$3], [$3$2$3]), [-1],
[m4_append([$1], [$2], [$3])$4], [$5])],
[m4_define([$1], [$2])$4])
T27,30
m4_location(_AS_TR_PREPARE)../../lib/m4sugar/m4sh.m4:1878
T10,2
m4_unquote$*
T14,107
m4_set_map_sepm4_ifdef([_m4_set_cleanup($1)], [_m4_set_contents_1c],
[_m4_set_contents_1])([$1])_m4_set_contents_2($@)
F11,8
m4_translittranslit
F9,6
m4_substrsubstr
F12,8
_m4_undivertundivert
T25,111
m4_stack_foreach_sep_lifo_m4_stack_reverse([$1], [m4_tmp-$1], [$2[]_m4_defn([m4_tmp-$1])$3], [$4[]])_m4_stack_reverse([m4_tmp-$1], [$1])
T29,29
m4_location(_AS_DIRNAME_EXPR)../../lib/m4sugar/m4sh.m4:975
T13,474
_m4_text_wrapm4_pushdef([m4_Indent], m4_qlen([$2]))m4_pushdef([m4_Cursor], m4_qlen([$3]))m4_pushdef([m4_Separator], [m4_define([m4_Separator], [ ])])[$3]m4_cond([m4_Cursor], m4_Indent, [],
[m4_eval(m4_Cursor > m4_Indent)], [1], [
[$2]m4_define([m4_Cursor], m4_Indent)],
[m4_format([%*s], m4_max([0],
m4_eval(m4_Indent - m4_Cursor)), [])m4_define([m4_Cursor], m4_Indent)])m4_map_args_w([$1], [$0_word(], [, [$2], [$4])])_m4_popdef([m4_Separator], [m4_Cursor], [m4_Indent])
T21,1
_m4_divert(M4SH-INIT)6
T16,4
_m4_divert(BODY)1000
T7,676
AS_INIT# Wrap our cleanup prior to m4sugar's cleanup.
m4_wrap([_AS_CLEANUP])
m4_init
m4_provide([AS_INIT])
# Forbidden tokens and exceptions.
m4_pattern_forbid([^_?AS_])
# Bangshe and minimal initialization.
m4_divert_text([BINSH], [@%:@! /bin/sh])
m4_divert_text([HEADER-COMMENT],
[@%:@ Generated from __file__ by m4_PACKAGE_STRING.])
m4_divert_text([M4SH-SANITIZE], [_AS_SHELL_SANITIZE])
m4_divert_text([M4SH-INIT-FN], [m4_text_box([M4sh Shell Functions.])])
# Let's go!
m4_divert([BODY])dnl
m4_text_box([Main body of script.])
_AS_DETECT_REQUIRED([_AS_SHELL_FN_WORK])dnl
_AS_DETECT_REQUIRED([_AS_TEST_X_WORKS])dnl
AS_REQUIRE([_AS_UNSET_PREPARE], [], [M4SH-INIT-FN])dnl
T13,100
AS_LINENO_POP_m4_defun_pro([$0])eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno[]_m4_defun_epi([$0])
T18,80
m4_expansion_stackm4_stack_foreach_sep_lifo([_$0], [_$0_entry(], [)
])m4_location[: the top level]
T9,75
m4_beforem4_provide_if([$2],
[m4_warn([syntax], [$2 was called before $1])])
T21,32
AS_LITERAL_HEREDOC_IF_$0(m4_expand([$1]))([$2], [$3])
T26,30
m4_location(_AS_PATH_WALK)../../lib/m4sugar/m4sh.m4:1339
T9,26
m4_ifndefm4_ifdef([$1], [$3], [$2])
T26,1
_m4_divert(HEADER-COMMENT)2
T13,26
m4_cr_LETTERSABCDEFGHIJKLMNOPQRSTUVWXYZ
T16,452
_m4_require_callm4_pushdef([_m4_divert_grow], m4_decr(_m4_divert_grow))m4_pushdef([_m4_diverting([$1])])m4_pushdef([_m4_diverting], [$1])m4_divert_push(_m4_divert_grow, [-])m4_if([$2], [], [$1], [$2])
m4_provide_if([$1], [m4_set_remove([_m4_provide], [$1])],
[m4_warn([syntax], [$1 is m4_require'd but not m4_defun'd])])_m4_divert_raw($3)_m4_undivert(_m4_divert_grow)m4_divert_pop(_m4_divert_grow)_m4_popdef([_m4_divert_grow],
[_m4_diverting([$1])], [_m4_diverting])
T14,37
m4_PACKAGE_URLhttp://www.gnu.org/software/autoconf/
T11,62
m4_cr_alnumabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
T9,127
_m4_splitm4_changequote([-=<{(],[)}>=-])[m4_bpatsubst(-=<{(-=<{($1)}>=-)}>=-, -=<{($2)}>=-,
-=<{(]$3[)}>=-)]m4_changequote([, ])
T7,108
m4_joinm4_if([$#], [1], [],
[$#], [2], [[$2]],
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift2($@))])
T10,120
_AS_ESCAPEm4_if(m4_index(m4_translit([[$1]], [$3], [$2$2$2$2]), [$2]), [-1],
[$0_], [m4_bpatsubst])([$1], [[$2$3]], [\\\&])
F7,6
m4_exitm4exit
F12,8
_m4_undefineundefine
T31,29
m4_location(_AS_SHELL_SANITIZE)../../lib/m4sugar/m4sh.m4:451
T11,136
m4_undivertm4_if([$#], [0], [m4_fatal([$0: missing argument])],
[$#], [1], [_m4_undivert(_m4_divert([$1]))],
[m4_map_args([$0], $@)])
T21,101
m4_stack_foreach_lifo_m4_stack_reverse([$1], [m4_tmp-$1], [$2(_m4_defn([m4_tmp-$1]))])_m4_stack_reverse([m4_tmp-$1], [$1])
T9,72
m4_mapallm4_if([$2], [], [],
[_m4_foreach([m4_apply([$1],], [)], [], $2)])
T17,229
m4_cr_not_LETTERS
!"#*%&'()$+,./0123456789:;<=>?@[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T5,113
AS_IF_m4_defun_pro([$0])if $1; then :
$2
m4_map_args_pair([_$0], [_$0_ELSE], m4_shift2($@))fi[][]_m4_defun_epi([$0])
F5,6
m4_ififelse
T13,47
m4_copy_forcem4_ifdef([$2], [_m4_undefine([$2])])m4_copy($@)
T10,168
m4_combinem4_if([$2], [], [], m4_eval([$# > 3]), [1],
[m4_map_args_sep([m4_map_args_sep(m4_dquote(], [)[[$3]], [], [[$1]],]]m4_dquote(m4_dquote(m4_shift3($@)))[[)], [[$1]], $2)])
T6,26
AS_BOX_$0(m4_expand([$1]), [$2])
T12,64
_AS_ECHO_LOG_AS_ECHO([$as_me:${as_lineno-$LINENO}: $1], AS_MESSAGE_LOG_FD)[]
T12,131
_AS_ECHO_LOG_m4_defun_pro([$0])AS_REQUIRE([_AS_LINENO_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T8,66
m4_ifsetm4_ifdef([$1],
[m4_ifval(_m4_defn([$1]), [$2], [$3])],
[$3])
T23,29
m4_location(AS_REQUIRE)../../lib/m4sugar/m4sh.m4:385
T27,1
_m4_divert(HEADER-REVISION)1
T15,76
_AS_BOX_LITERALAS_ECHO(["_AS_ESCAPE(m4_dquote(m4_expand([m4_text_box($@)])), [`], [\"$])"])
T13,116
_AS_BOX_INDIRsed 'h;s/./m4_default([$2], [-])/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
@%:@@%:@ $1 @%:@@%:@
_ASBOX
T11,54
m4_ifnblankm4_if(m4_translit([[$1]], [ ][ ][
]), [], [$3], [$2])
T8,94
AS_UNSET_m4_defun_pro([$0]){ AS_LITERAL_WORD_IF([$1], [], [eval ])$1=; unset $1;}[]_m4_defun_epi([$0])
T18,144
AS_VERSION_COMPAREas_arg_v1=$1
as_arg_v2=$2
awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
AS_CASE([$?],
[1], [$3],
[0], [$4],
[2], [$5])[]
T18,124
AS_VERSION_COMPARE_m4_defun_pro([$0])AS_REQUIRE([_$0_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
F8,5
m4_shiftshift
T28,1
_m4_divert(HEADER-COPYRIGHT)3
T16,222
_AS_BASENAME_SED_m4_defun_pro([$0])AS_ECHO([X/[]$1]) |
sed ['/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
}
/^X\/\(\/\/\)$/{
s//\1/
q
}
/^X\/\(\/\).*/{
s//\1/
q
}
s/.*/./; q'][]_m4_defun_epi([$0])
T11,160
m4_undefinem4_if([$#], [0], [[$0]],
[$#], [1], [m4_ifdef([$1], [_m4_undefine([$1])],
[m4_fatal([$0: undefined macro: $1])])],
[m4_map_args([$0], $@)])
T29,30
m4_location(_AS_LN_S_PREPARE)../../lib/m4sugar/m4sh.m4:1223
T20,20
m4_PACKAGE_BUGREPORTbug-autoconf@gnu.org
T21,479
_AS_VAR_ARITH_PREPARE_m4_defun_pro([$0])AS_FUNCTION_DESCRIBE([as_fn_arith], [ARG...],
[Perform arithmetic evaluation on the ARGs, and store the result in
the global $as_val. Take advantage of shells that can avoid forks.
The arguments must be portable across $(()) and expr.])
AS_IF([_AS_RUN(["AS_ESCAPE(m4_quote(_AS_VAR_ARITH_WORKS))"])],
[eval 'as_fn_arith ()
{
as_val=$(( $[]* ))
}'],
[as_fn_arith ()
{
as_val=`expr "$[]@" || test $? -eq 1`
}]) # as_fn_arith
[]_m4_defun_epi([$0])
T30,29
m4_location(_AS_BASENAME_EXPR)../../lib/m4sugar/m4sh.m4:921
T9,75
AS_ESCAPE_$0([$1], m4_if([$2], [], [[`], [\"$]], [m4_substr([$2], [0], [1]), [$2]]))
T20,111
m4_stack_foreach_sep_m4_stack_reverse([$1], [m4_tmp-$1])_m4_stack_reverse([m4_tmp-$1], [$1], [$2[]_m4_defn([m4_tmp-$1])$3], [$4[]])
T10,79
_m4_shiftnm4_if([$1], 1, [m4_shift(],
[$0(m4_decr([$1])]), m4_shift(m4_shift($@)))
T15,114
AS_VAR_TEST_SETAS_LITERAL_WORD_IF([$1],
[${$1+:} false],
[{ as_var=$1; eval \${$as_var+:} false; }],
[eval \${$1+:} false])
T11,162
m4_dumpdefsm4_if([$#], [0], [m4_fatal([$0: missing argument])],
[$#], [1], [m4_stack_foreach_lifo([$1], [m4_dumpdef([$1])m4_ignore])],
[m4_map_args([$0], $@)])
T13,124
_m4_defun_prom4_ifdef([_m4_expansion_stack], [], [_m4_defun_pro_outer([$1])])m4_expansion_stack_push([$1])m4_pushdef([_m4_expanding($1)])
T17,57
AS_LINENO_PREPARE_m4_defun_pro([$0])AS_REQUIRE([_$0])[]_m4_defun_epi([$0])
T7,13
AS_ECHO$as_echo $1[]
T7,124
AS_ECHO_m4_defun_pro([$0])AS_REQUIRE([_$0_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T4,37
m4_nm4_if([$1],
[], [],
[$1
])
T17,604
_AS_SHELL_FN_WORKas_fn_return () { (exit [$]1); }
as_fn_success () { as_fn_return 0; }
as_fn_failure () { as_fn_return 1; }
as_fn_ret_success () { return 0; }
as_fn_ret_failure () { return 1; }
exitcode=0
as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
AS_IF([( set x; as_fn_ret_success y && test x = "[$]1" )], [],
[exitcode=1; echo positional parameters were not saved.])
test x$exitcode = x0[]
T18,40
_m4_set_differencem4_set_contains([$1], [$2], [], [,[$2]])
T10,137
_m4_divertm4_ifdef([_m4_divert($1)],
[m4_indir([_m4_divert($1)])],
[m4_if([$2], [], [m4_warn([syntax],
[prefer named diversions])])$1])
T9,265
_AS_QUOTEm4_cond([m4_index([$1], [\])], [-1], [_AS_QUOTE_MODERN],
[m4_eval(m4_index(m4_translit([[$1]], [$], [\]), [\\]) >= 0)],
[1], [_AS_QUOTE_MODERN],
[m4_eval(m4_index(m4_translit([[$1]], ["], [`]), [\`]) >= 0)],dnl"
[1], [_AS_QUOTE_OLD],
[_AS_QUOTE_MODERN])([$1])
T16,137
_AS_DIRNAME_EXPR$as_expr X[]$1 : 'X\(.*[[^/]]\)//*[[^/][^/]]*/*$' \| \
X[]$1 : 'X\(//\)[[^/]]' \| \
X[]$1 : 'X\(//\)$' \| \
X[]$1 : 'X\(/\)' \| .[]
T16,129
_AS_DIRNAME_EXPR_m4_defun_pro([$0])AS_REQUIRE([_AS_EXPR_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T23,29
m4_location(AS_MESSAGE)../../lib/m4sugar/m4sh.m4:834
T16,298
m4_map_args_pairm4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
[$#], [1], [m4_fatal([$0: too few arguments: $#: $1])],
[$#], [2], [],
[$#], [3], [m4_default([$2], [$1])([$3])[]],
[$#], [4], [$1([$3], [$4])[]],
[$1([$3], [$4])[]$0([$1], [$2], m4_shift(m4_shift3($@)))])
T18,256
_m4_set_dump_checkm4_ifdef([_m4_set([$1])],
[m4_set_contains([$1], _m4_defn([_m4_set([$1])]),
[[$2]_m4_defn([_m4_set([$1])])])_m4_popdef(
[_m4_set([$1],]_m4_defn([_m4_set([$1])])[)],
[_m4_set([$1])])$0([$1], [$2$3])],
[_m4_popdef([_m4_set_cleanup($1)])])
T8,0
__unix__
T15,49
m4_rename_forcem4_ifdef([$2], [_m4_undefine([$2])])m4_rename($@)
T14,166
m4_cleardivertm4_if([$#], [0], [m4_fatal([$0: missing argument])],
[_m4_divert_raw([-1])m4_undivert($@)_m4_divert_raw(
_m4_divert(_m4_defn([_m4_divert_diversion]), [-]))])
T14,42
_m4_defun_oncem4_pushdef([$1])$3[$2[]m4_provide([$1])]$4
T9,5
_m4_curry[$1])
T24,29
m4_location(_AS_PREPARE)../../lib/m4sugar/m4sh.m4:322
T14,53
m4_cr_symbols1abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_
T14,63
m4_cr_symbols2abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789
T15,180
m4_set_containsm4_ifdef([_m4_set_cleanup($1)],
[m4_if(m4_ifdef([_m4_set([$1],$2)],
[m4_indir([_m4_set([$1],$2)])], [0]), [1], [$3], [$4])],
[m4_ifdef([_m4_set([$1],$2)], [$3], [$4])])
T9,174
m4_expandm4_pushdef([m4_divert], _m4_defn([_m4_divert_unsafe]))m4_pushdef([m4_divert_push], _m4_defn([_m4_divert_unsafe]))m4_chomp(_$0([$1
]))_m4_popdef([m4_divert], [m4_divert_push])
T23,3173
_AS_DETECT_BETTER_SHELL_m4_defun_pro([$0])m4_if(_AS_FORCE_REEXEC_WITH_CONFIG_SHELL, [yes],
[# Use a proper internal environment variable to ensure we don't fall
# into an infinite loop, continuously re-executing ourselves.
if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
_as_can_reexec=no; export _as_can_reexec;
_AS_REEXEC_WITH_SHELL([$CONFIG_SHELL])
fi
# We don't want this to propagate to other subprocesses.
dnl This might be especially important in case an m4sh-generated script
dnl is used to later execute other m4sh-generated scripts. This happens
dnl for example in autoconf's own testsuite (and happens *a lot* there,
dnl in fact).
AS_UNSET([_as_can_reexec])
])m4_set_map([_AS_DETECT_SUGGESTED_BODY], [_AS_DETECT_SUGGESTED_PRUNE])m4_pushdef([AS_EXIT], [exit m4_default(]m4_dquote([$][1])[, 1)])if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="AS_ESCAPE(_m4_expand([_AS_BOURNE_COMPATIBLE]))"
_AS_DETECT_EXPAND([as_required], [_AS_DETECT_REQUIRED_BODY])
_AS_DETECT_EXPAND([as_suggested], [_AS_DETECT_SUGGESTED_BODY])
AS_IF([_AS_RUN(["$as_required"])],
[as_have_required=yes],
[as_have_required=no])
AS_IF([test x$as_have_required = xyes && _AS_RUN(["$as_suggested"])],
[],
[_AS_PATH_WALK([/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH],
[case $as_dir in @%:@(
/*)
for as_base in sh bash ksh sh5; do
# Try only shells that exist, to save several forks.
as_shell=$as_dir/$as_base
AS_IF([{ test -f "$as_shell" || test -f "$as_shell.exe"; } &&
_AS_RUN(["$as_required"], ["$as_shell"])],
[CONFIG_SHELL=$as_shell as_have_required=yes
m4_set_empty([_AS_DETECT_SUGGESTED_BODY], [break 2],
[AS_IF([_AS_RUN(["$as_suggested"], ["$as_shell"])],
[break 2])])])
done;;
esac],
[AS_IF([{ test -f "$SHELL" || test -f "$SHELL.exe"; } &&
_AS_RUN(["$as_required"], ["$SHELL"])],
[CONFIG_SHELL=$SHELL as_have_required=yes])])
AS_IF([test "x$CONFIG_SHELL" != x],
[export CONFIG_SHELL
_AS_REEXEC_WITH_SHELL([$CONFIG_SHELL])])
dnl Unfortunately, $as_me isn't available here.
AS_IF([test x$as_have_required = xno],
[AS_ECHO(["$[]0: This script requires a shell more modern than all"])
AS_ECHO(["$[]0: the shells that I found on your system."])
if test x${ZSH_VERSION+set} = xset ; then
AS_ECHO(["$[]0: In particular, zsh $ZSH_VERSION has bugs and should"])
AS_ECHO(["$[]0: be upgraded to zsh 4.3.4 or later."])
else
AS_ECHO("m4_text_wrap([Please tell ]_m4_defn([m4_PACKAGE_BUGREPORT])
m4_ifset([AC_PACKAGE_BUGREPORT], [m4_if(_m4_defn([m4_PACKAGE_BUGREPORT]),
_m4_defn([AC_PACKAGE_BUGREPORT]), [], [and _m4_defn([AC_PACKAGE_BUGREPORT])])])
[about your system, including any error possibly output before this message.
Then install a modern shell, or manually run the script under such a
shell if you do have one.], [$[]0: ], [], [62])")
fi
AS_EXIT])])
fi
SHELL=${CONFIG_SHELL-/bin/sh}
export SHELL
# Unset more variables known to interfere with behavior of common tools.
CLICOLOR_FORCE= GREP_OPTIONS=
unset CLICOLOR_FORCE GREP_OPTIONS
_m4_popdef([AS_EXIT])[]_m4_defun_epi([$0])
T14,96
_m4_bpatsubstsm4_if([$#], 2, [$1],
[$0(m4_builtin([patsubst], [[$1]], [$2], [$3]),
m4_shift3($@))])
T15,36
m4_set_contentsm4_set_map_sep([$1], [], [], [[$2]])
T11,58
_AS_CLEANUPm4_divert_text([M4SH-SANITIZE], [_AS_DETECT_BETTER_SHELL])
T9,339
AS_VAR_IFAS_LITERAL_WORD_IF([$1],
[AS_IF(m4_ifval([$2], [[test "x$$1" = x[]$2]], [[${$1:+false} :]])],
[AS_VAR_COPY([as_val], [$1])
AS_IF(m4_ifval([$2], [[test "x$as_val" = x[]$2]], [[${as_val:+false} :]])],
[AS_IF(m4_ifval([$2],
[[eval test \"x\$"$1"\" = x"_AS_ESCAPE([$2], [`], [\"$])"]],
[[eval \${$1:+false} :]])]),
[$3], [$4])
T16,838
_AS_LN_S_PREPARE_m4_defun_pro([$0])rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
else
rm -f conf$$.dir
mkdir conf$$.dir 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
# In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -pR'
fi
else
as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
[]_m4_defun_epi([$0])
T10,66
_AS_ECHO_NAS_ECHO_N(["_AS_QUOTE([$1])"]) >&m4_default([$2], [AS_MESSAGE_FD])
T12,24
m4_rename_m4m4_rename([$1], [m4_$1])
T7,93
_AS_BOXm4_if(m4_index(m4_translit([[$1]], [`\"], [$$$]), [$]),
[-1], [$0_LITERAL], [$0_INDIR])($@)
T18,29
m4_location(AS_IF)../../lib/m4sugar/m4sh.m4:639
F14,11
m4_changequotechangequote
T12,69
_m4_list_cmpm4_if([$1], [], [0m4_ignore], [$2], [0], [m4_unquote], [$2m4_ignore])
T14,73
_m4_mapall_sepm4_apply([$1], [$3])_m4_foreach([m4_apply([$2[]$1],], [)], m4_shift2($@))
T9,132
m4_divertm4_popdef([_m4_divert_stack])m4_define([_m4_divert_diversion], [$1])m4_divert_stack_push([$0], [$1])_m4_divert_raw(_m4_divert([$1]))
T26,30
m4_location(AS_VAR_APPEND)../../lib/m4sugar/m4sh.m4:1939
T13,293
m4_defun_oncem4_define([m4_location($1)], m4_location)m4_define([$1], [_m4_defun_once([$1], [$2], m4_if(_m4_divert_dump, [],
[[_m4_defun_pro([$1])m4_unquote(], [)_m4_defun_epi([$1])]],
m4_ifdef([_m4_diverting([$1])], [-]), [-], [[m4_unquote(], [)]],
[[_m4_require_call([$1],], [, _m4_divert_dump)]]))])
T10,412
m4_requirem4_ifdef([_m4_expanding($1)],
[m4_fatal([$0: circular dependency of $1])])m4_if(_m4_divert_dump, [],
[m4_fatal([$0($1): cannot be used outside of an ]dnl
m4_if([$0], [m4_require], [[m4_defun]], [[AC_DEFUN]])['d macro])])m4_provide_if([$1], [m4_set_contains([_m4_provide], [$1],
[_m4_require_check([$1], _m4_defn([m4_provide($1)]), [$0])], [m4_ignore])],
[_m4_require_call])([$1], [$2], _m4_divert_dump)
T9,14
AS_TEST_Xtest -x $1[][]
T9,129
AS_TEST_X_m4_defun_pro([$0])AS_REQUIRE([_AS_TEST_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T7,146
AS_CASE_m4_defun_pro([$0])case $1 in[]m4_map_args_pair([_$0], [_$0_DEFAULT],
m4_shift($@m4_if(m4_eval([$# & 1]), [1], [,])))
esac[]_m4_defun_epi([$0])
F7,4
m4_incrincr
T8,87
m4_fatalm4_errprintn(m4_location[: error: $1]
m4_expansion_stack)m4_exit(m4_if([$2],, 1, [$2]))
T13,306
m4_bpatsubstsm4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])],
[$#], 1, [m4_fatal([$0: too few arguments: $#: $1])],
[$#], 2, [m4_unquote(m4_builtin([patsubst], [[$1]], [$2]))],
[$#], 3, [m4_unquote(m4_builtin([patsubst], [[$1]], [$2], [$3]))],
[_$0($@m4_if(m4_eval($# & 1), 0, [,]))])
F8,5
m4_ifdefifdef
T13,52
m4_cr_LettersabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
T14,109
m4_file_appendm4_syscmd([cat >>$1 <<_m4eof
$2
_m4eof
])
m4_if(m4_sysval, [0], [],
[m4_fatal([$0: cannot write: $1])])
T17,185
_AS_TR_SH_PREPARE_m4_defun_pro([$0])AS_REQUIRE([_AS_CR_PREPARE])# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[[^_$as_cr_alnum]]%_%g'"
[]_m4_defun_epi([$0])
T15,218
m4_map_args_sepm4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
[$#], [1], [],
[$#], [2], [],
[$#], [3], [],
[$#], [4], [$1[$4]$2[]],
[$1[$4]$2[]_m4_foreach([$3[]$1], [$2], m4_shift3($@))])
F12,8
m4_bpatsubstpatsubst
F8,8
__file____file__
T19,21
_AS_VAR_ARITH_WORKStest $(( 1 + 1 )) = 2
T10,32
m4_set_mapm4_set_map_sep([$1], [$2(], [)])
T8,77
m4_stripm4_bpatsubsts([$1 ],
[[ ]+], [ ],
[^. ?\(.*\) .$], [[[\1]]])
T20,201
_AS_BASENAME_PREPARE_m4_defun_pro([$0])AS_REQUIRE([_AS_EXPR_PREPARE])if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
[]_m4_defun_epi([$0])
T11,37
m4_list_cmp_$0_raw(m4_dquote($1), m4_dquote($2))
T13,41
m4_provide_ifm4_ifdef([m4_provide($1)],
[$2], [$3])
T19,109
_m4_defun_epi_outer_m4_popdef([_m4_divert_dump], [_m4_diverting([$1])], [_m4_diverting])m4_divert_pop([GROW])m4_undivert([GROW])
T12,32
m4_make_listm4_join([,
], m4_dquote_elt($@))
T17,203
m4_cr_not_Letters
!"#*%&'()$+,./0123456789:;<=>?@[\]^_`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T17,292
_m4_require_checkm4_if(_m4_defn([_m4_diverting]), [$2], [m4_ignore],
m4_ifdef([_m4_diverting([$2])], [-]), [-], [m4_warn([syntax],
[$3: `$1' was expanded before it was required
http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required])_m4_require_call],
[m4_ignore])
T13,42
m4_mapall_sepm4_if([$3], [], [], [_$0([$1], [$2], $3)])
T9,15
AS_ECHO_N$as_echo_n $1[]
T9,129
AS_ECHO_N_m4_defun_pro([$0])AS_REQUIRE([_AS_ECHO_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
F11,11
__program____program__
T17,105
_m4_define_cr_notm4_define([m4_cr_not_$1],
m4_translit(m4_dquote(m4_defn([m4_cr_all])),
m4_defn([m4_cr_$1])))
T32,30
m4_location(_AS_DIRNAME_PREPARE)../../lib/m4sugar/m4sh.m4:1011
T15,4
m4_PACKAGE_YEAR2012
F14,6
_m4_divert_rawdivert
T18,72
m4_version_compare_m4_list_cmp_raw(_m4_version_unletter([$1]), _m4_version_unletter([$2]))
T19,95
_AS_DETECT_REQUIRED_m4_defun_pro([$0])m4_set_add([_AS_DETECT_REQUIRED_BODY], [$1 || AS_EXIT])[]_m4_defun_epi([$0])
T14,122
m4_append_uniqm4_ifval([$3], [m4_if(m4_index([$2], [$3]), [-1], [],
[m4_warn([syntax],
[$0: `$2' contains `$3'])])])_$0($@)
T9,4
m4_dquote[$@]
T22,30
m4_location(AS_TR_CPP)../../lib/m4sugar/m4sh.m4:1859
T24,32
m4_default_nblank_quotedm4_ifblank([$1], [[$2]], [[$1]])
T27,30
m4_location(_AS_ME_PREPARE)../../lib/m4sugar/m4sh.m4:1122
T17,28
m4_default_nblankm4_ifblank([$1], [$2], [$1])
T12,83
m4_set_unionm4_set_listc([$1])m4_if([$1], [$2], [],
[m4_set_map_sep([$2], [_$0([$1],], [)])])
T21,97
m4_copyright_condensem4_text_wrap(m4_bpatsubst(m4_flatten([[$1]]),
[(C)[- ,0-9]*\([1-9][0-9][0-9][0-9]\)], [(C) \1]))
T12,152
_m4_set_dumpm4_ifdef([_m4_set([$1])],
[[$2]_m4_defn([_m4_set([$1])])_m4_popdef([_m4_set([$1],]_m4_defn(
[_m4_set([$1])])[)], [_m4_set([$1])])$0([$1], [$2$3])])
T7,182
m4_condm4_if([$#], [0], [m4_fatal([$0: cannot be called without arguments])],
[$#], [1], [$1],
m4_eval([$# % 3]), [2], [m4_fatal([$0: missing an argument])],
[_$0($@)])
T14,62
m4_set_foreachm4_pushdef([$2])m4_set_map_sep([$1], [m4_define([$2],], [)$3])
T9,156
m4_escapem4_if(m4_index(m4_translit([$1],
[[]#,()][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789], [$$$]), [$]),
[-1], [m4_echo], [_$0])([$1])
T18,206
_m4_text_wrap_wordm4_define([m4_Cursor], m4_eval(m4_Cursor + m4_qlen([$1]) + 1))m4_if(m4_eval(m4_Cursor > ([$3])),
[1], [m4_define([m4_Cursor], m4_eval(m4_Indent + m4_qlen([$1]) + 1))
[$2]],
[m4_Separator[]])[$1]
T17,2
_AS_LITERAL_IF_NO$2
T12,93
m4_text_wrap_$0(m4_escape([$1]), [$2], m4_default_quoted([$3], [$2]),
m4_default_quoted([$4], [79]))
T8,22
AS_TR_SH_$0(m4_expand([$1]))[]
T8,124
AS_TR_SH_m4_defun_pro([$0])AS_REQUIRE([_$0_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T20,53
m4_divert_stack_pushm4_pushdef([_m4_divert_stack], m4_location[: $1: $2])
T23,30
m4_location(AS_MKDIR_P)../../lib/m4sugar/m4sh.m4:1289
T10,40
m4_warningm4_errprintn(m4_location[: warning: $1])
F10,7
m4_mkstempmkstemp
T17,490
_AS_TR_SH_LITERALm4_translit([[$1]],
[*+[]][
!"#*%&'()$+,./:;<=>?@[\]^`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-],
[pp[]][_______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________])
T20,73
AS_BOURNE_COMPATIBLE# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
_$0
T31,30
m4_location(AS_VERSION_COMPARE)../../lib/m4sugar/m4sh.m4:1767
T11,544
_AS_PREPARE_m4_defun_pro([$0])m4_pushdef([AS_REQUIRE])m4_pushdef([AS_REQUIRE_SHELL_FN], _m4_defn([_AS_REQUIRE_SHELL_FN])
)m4_pushdef([AS_MESSAGE_LOG_FD], [-1])_AS_ERROR_PREPARE
_m4_popdef([AS_MESSAGE_LOG_FD])_AS_EXIT_PREPARE
_AS_UNSET_PREPARE
_AS_VAR_APPEND_PREPARE
_AS_VAR_ARITH_PREPARE
_AS_EXPR_PREPARE
_AS_BASENAME_PREPARE
_AS_DIRNAME_PREPARE
_AS_ME_PREPARE
_AS_CR_PREPARE
_AS_ECHO_N_PREPARE
_AS_LN_S_PREPARE
_AS_MKDIR_P_PREPARE
_AS_TEST_PREPARE
_AS_TR_CPP_PREPARE
_AS_TR_SH_PREPARE
_m4_popdef([AS_REQUIRE], [AS_REQUIRE_SHELL_FN])[]_m4_defun_epi([$0])
T12,10
m4_cr_digits0123456789
T18,1
_m4_divert(NOTICE)6
T11,136
m4_set_dumpm4_ifdef([_m4_set_size($1)],
[_m4_popdef([_m4_set_size($1)])])m4_ifdef([_m4_set_cleanup($1)],
[_$0_check], [_$0])([$1], [], [$2])
T20,29
m4_location(AS_EXIT)../../lib/m4sugar/m4sh.m4:585
T11,17
m4_location__file__:__line__
T8,4
m4_quote[$*]
T7,111
AS_EXIT_m4_defun_pro([$0])AS_REQUIRE([_AS_EXIT_PREPARE])[]as_fn_exit m4_ifval([$1], [$1], [$][?])[]_m4_defun_epi([$0])
F9,6
m4_syscmdsyscmd
T16,55
_m4_divert_stack../../lib/m4sugar/m4sugar.m4:3259: m4_divert_push: KILL
T9,31
_m4_applym4_if([$2], [], [], [$1($2)[]])
F11,8
m4_traceofftraceoff
T8,2
m4_count$#
T31,30
m4_location(_AS_TR_CPP_PREPARE)../../lib/m4sugar/m4sh.m4:1845
F6,3
m4_lenlen
T14,113
m4_expand_oncem4_provide_if(m4_default_quoted([$2], [$1]),
[],
[m4_provide(m4_default_quoted([$2], [$1]))[]$1])
T25,2
_AS_LITERAL_HEREDOC_IF_NO$2
T23,29
m4_location(AS_PREPARE)../../lib/m4sugar/m4sh.m4:353
T11,53
_m4_joinallm4_if([$#], [2], [], [[$1$3]$0([$1], m4_shift2($@))])
T16,2
_m4_divert(KILL)-1
T16,56
_AS_TR_CPP_INDIR`AS_ECHO(["_AS_ESCAPE([[$1]], [`], [\])"]) | $as_tr_cpp`
T9,373
AS_TMPDIR# Create a (secure) tmp directory for tmp files.
m4_if([$2], [], [: "${TMPDIR:=/tmp}"])
{
tmp=`(umask 077 && mktemp -d "m4_default([$2],
[$TMPDIR])/$1XXXXXX") 2>/dev/null` &&
test -d "$tmp"
} ||
{
tmp=m4_default([$2], [$TMPDIR])/$1$$-$RANDOM
(umask 077 && mkdir "$tmp")
} || AS_ERROR([cannot create a temporary directory in m4_default([$2],
[$TMPDIR])])
T10,728
AS_PREPARE_m4_defun_pro([$0])m4_divert_push([KILL])
m4_append_uniq([_AS_CLEANUP],
[m4_divert_text([M4SH-INIT-FN], [_AS_ERROR_PREPARE[]])])
AS_REQUIRE([_AS_EXPR_PREPARE])
AS_REQUIRE([_AS_BASENAME_PREPARE])
AS_REQUIRE([_AS_DIRNAME_PREPARE])
AS_REQUIRE([_AS_ME_PREPARE])
AS_REQUIRE([_AS_CR_PREPARE])
AS_REQUIRE([_AS_LINENO_PREPARE])
AS_REQUIRE([_AS_ECHO_N_PREPARE])
AS_REQUIRE([_AS_EXIT_PREPARE])
AS_REQUIRE([_AS_LN_S_PREPARE])
AS_REQUIRE([_AS_MKDIR_P_PREPARE])
AS_REQUIRE([_AS_TEST_PREPARE])
AS_REQUIRE([_AS_TR_CPP_PREPARE])
AS_REQUIRE([_AS_TR_SH_PREPARE])
AS_REQUIRE([_AS_UNSET_PREPARE])
AS_REQUIRE([_AS_VAR_APPEND_PREPARE], [], [M4SH-INIT-FN])
AS_REQUIRE([_AS_VAR_ARITH_PREPARE], [], [M4SH-INIT-FN])
m4_divert_pop[][]_m4_defun_epi([$0])
F8,5
m4_indirindir
T17,31
m4_default_quotedm4_if([$1], [], [[$2]], [[$1]])
T27,2052
_AS_VERSION_COMPARE_PREPARE_m4_defun_pro([$0])[as_awk_strverscmp='
# Use only awk features that work with 7th edition Unix awk (1978).
# My, what an old awk you have, Mr. Solaris!
END {
while (length(v1) && length(v2)) {
# Set d1 to be the next thing to compare from v1, and likewise for d2.
# Normally this is a single character, but if v1 and v2 contain digits,
# compare them as integers and fractions as strverscmp does.
if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) {
# Split v1 and v2 into their leading digit string components d1 and d2,
# and advance v1 and v2 past the leading digit strings.
for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue
for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue
d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1)
d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1)
if (d1 ~ /^0/) {
if (d2 ~ /^0/) {
# Compare two fractions.
while (d1 ~ /^0/ && d2 ~ /^0/) {
d1 = substr(d1, 2); len1--
d2 = substr(d2, 2); len2--
}
if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) {
# The two components differ in length, and the common prefix
# contains only leading zeros. Consider the longer to be less.
d1 = -len1
d2 = -len2
} else {
# Otherwise, compare as strings.
d1 = "x" d1
d2 = "x" d2
}
} else {
# A fraction is less than an integer.
exit 1
}
} else {
if (d2 ~ /^0/) {
# An integer is greater than a fraction.
exit 2
} else {
# Compare two integers.
d1 += 0
d2 += 0
}
}
} else {
# The normal case, without worrying about digits.
d1 = substr(v1, 1, 1); v1 = substr(v1, 2)
d2 = substr(v2, 1, 1); v2 = substr(v2, 2)
}
if (d1 < d2) exit 1
if (d1 > d2) exit 2
}
# Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10),
# which mishandles some comparisons of empty strings to integers.
if (length(v2)) exit 1
if (length(v1)) exit 2
}
'][]_m4_defun_epi([$0])
T9,58
m4_ifvalnm4_if([$1],
[], [m4_n([$3])],
[m4_n([$2])])
F8,5
m4_indexindex
T8,85
_m4_joinm4_if([$#$2], [2], [],
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift2($@))])
T17,63
m4_set_differencem4_if([$1], [$2], [], [m4_set_map_sep([$1], [_$0([$2],], [)])])
T17,0
m4_pattern_forbid
T22,527
_AS_VAR_APPEND_PREPARE_m4_defun_pro([$0])AS_FUNCTION_DESCRIBE([as_fn_append], [VAR VALUE],
[Append the text in VALUE to the end of the definition contained in
VAR. Take advantage of any shell optimizations that allow amortized
linear growth over repeated appends, instead of the typical quadratic
growth present in naive implementations.])
AS_IF([_AS_RUN(["AS_ESCAPE(m4_quote(_AS_VAR_APPEND_WORKS))"])],
[eval 'as_fn_append ()
{
eval $[]1+=\$[]2
}'],
[as_fn_append ()
{
eval $[]1=\$$[]1\$[]2
}]) # as_fn_append
[]_m4_defun_epi([$0])
F10,7
m4_traceontraceon
T39,30
m4_location(_AS_PATH_SEPARATOR_PREPARE)../../lib/m4sugar/m4sh.m4:1315
T10,84
_m4_minmaxm4_if([$#], [3], [$1([$2], [$3])],
[$0([$1], $1([$2], [$3]), m4_shift3($@))])
T22,133
_AS_LITERAL_HEREDOC_IFm4_if(m4_index([$1], [@S|@]), [-1],
[m4_if(m4_index(m4_translit([[$1]], [\`], [$]), [$]), [-1],
[$0_YES], [$0_NO])],
[$0_NO])
T31,30
m4_location(_AS_LINENO_PREPARE)../../lib/m4sugar/m4sh.m4:1167
T12,110
_m4_set_sizem4_define([_m4_set_size($1)],
m4_ifdef([_m4_set_size($1)], [$2(m4_indir([_m4_set_size($1)]))],
[1]))
T10,86
m4_tolowerm4_translit([[$1]], [ABCDEFGHIJKLMNOPQRSTUVWXYZ],
[abcdefghijklmnopqrstuvwxyz])
T10,121
m4_re_word[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*
T33,29
m4_location(_AS_BASENAME_PREPARE)../../lib/m4sugar/m4sh.m4:954
T25,1
_m4_divert(M4SH-SANITIZE)4
T13,82
m4_dquote_eltm4_if([$#], [0], [],
[$#], [1], [[[$1]]],
[[[$1]],$0(m4_shift($@))])
T27,29
m4_location(AS_LINENO_PUSH)../../lib/m4sugar/m4sh.m4:894
T10,36
_m4_expand$0_([$1], [(], -=<{($1)}>=-, [}>=-])
T12,66
m4_re_string[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*
T28,29
m4_location(_AS_DIRNAME_SED)../../lib/m4sugar/m4sh.m4:982
T28,30
m4_location(AS_EXECUTABLE_P)../../lib/m4sugar/m4sh.m4:1098
F11,8
m4_errprinterrprint
T6,122
m4_cdrm4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
[$#], 1, [],
[m4_dquote(m4_shift($@))])
T18,4
m4_PACKAGE_VERSION2.69
T18,207
_AS_TR_CPP_PREPARE_m4_defun_pro([$0])AS_REQUIRE([_AS_CR_PREPARE])# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[[^_$as_cr_alnum]]%_%g'"
[]_m4_defun_epi([$0])
T10,27
m4_joinall[$2]_$0([$1], m4_shift($@))
T17,64
_m4_divert_unsafem4_fatal([$0: cannot change diversion to `$1' inside m4_expand])
T13,333
m4_divert_popm4_if([$1], [], [],
[$1], _m4_defn([_m4_divert_diversion]), [],
[m4_fatal([$0($1): diversion mismatch:
]m4_divert_stack)])_m4_popdef([_m4_divert_stack], [_m4_divert_diversion])m4_ifdef([_m4_divert_diversion], [],
[m4_fatal([too many m4_divert_pop])])_m4_divert_raw(_m4_divert(_m4_defn([_m4_divert_diversion]), [-]))
T30,30
m4_location(AS_LINENO_PREPARE)../../lib/m4sugar/m4sh.m4:1166
T14,103
_AS_TR_PREPARE_m4_defun_pro([$0])AS_REQUIRE([_AS_TR_SH_PREPARE])AS_REQUIRE([_AS_TR_CPP_PREPARE])[]_m4_defun_epi([$0])
T11,65
m4_set_sizem4_ifdef([_m4_set_size($1)], [m4_indir([_m4_set_size($1)])], [0])
T12,25
m4_set_listcm4_set_map_sep([$1], [,])
T13,15
AS_VAR_POPDEFm4_popdef([$1])
T10,54
m4_ifblankm4_if(m4_translit([[$1]], [ ][ ][
]), [], [$2], [$3])
T7,20
m4_wrap_m4_wrap([], [$1[]])
T25,30
m4_location(AS_VAR_ARITH)../../lib/m4sugar/m4sh.m4:1981
T29,29
m4_location(_AS_BASENAME_SED)../../lib/m4sugar/m4sh.m4:926
T15,165
_m4_set_add_allm4_if([$#], [2], [],
[m4_ifdef([_m4_set([$1],$3)], [],
[m4_define([_m4_set([$1],$3)], [1])m4_pushdef([_m4_set([$1])],
[$3])-])$0([$1], m4_shift2($@))])
T29,30
m4_location(_AS_TEST_PREPARE)../../lib/m4sugar/m4sh.m4:1384
T8,42
_AS_ECHO_AS_ECHO_UNQUOTED([_AS_QUOTE([$1])], [$2])
T7,48
m4_qlenm4_ifdef([$0-$1], [_m4_defn([$0-]], [_$0(])[$1])
T14,41
_m4_list_cmp_1_m4_list_cmp_2([$2], [m4_shift2($@)], $1)
T19,191
_AS_DIRNAME_PREPARE_m4_defun_pro([$0])AS_REQUIRE([_AS_EXPR_PREPARE])if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
as_dirname=dirname
else
as_dirname=false
fi
[]_m4_defun_epi([$0])
T14,95
_m4_list_cmp_2_m4_list_cmp([$1$3], m4_cmp([$3+0], [$1+0]))(
[_m4_list_cmp_1(m4_dquote(m4_shift3($@)), $2)])
T34,30
m4_location(_AS_VAR_ARITH_PREPARE)../../lib/m4sugar/m4sh.m4:1948
T12,18
m4_errprintnm4_errprint([$1
])
T18,1601
_AS_SHELL_SANITIZE_m4_defun_pro([$0])m4_pushdef([AS_EXIT], [exit m4_default(]m4_dquote([$][1])[, 1)])m4_text_box([M4sh Initialization.])
AS_BOURNE_COMPATIBLE
_AS_ECHO_PREPARE
_AS_PATH_SEPARATOR_PREPARE
# IFS
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $[0] in @%:@((
*[[\\/]]* ) as_myself=$[0] ;;
*) _AS_PATH_WALK([],
[test -r "$as_dir/$[0]" && as_myself=$as_dir/$[0] && break])
;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$[0]
fi
if test ! -f "$as_myself"; then
AS_ECHO(["$as_myself: error: cannot find myself; rerun with an absolute file name"]) >&2
AS_EXIT
fi
# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there. '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
&& ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
_m4_popdef([AS_EXIT])[]_m4_defun_epi([$0])
T13,383
_AS_PATH_WALKas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
m4_ifvaln([$3], [as_found=false])dnl
m4_bmatch([$1], [[:;]],
[as_dummy="$1"
for as_dir in $as_dummy],
[for as_dir in m4_default([$1], [$PATH])])
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
m4_ifvaln([$3], [as_found=:])dnl
$2
m4_ifvaln([$3], [as_found=false])dnl
done
m4_ifvaln([$3], [$as_found || { $3; }])dnl
IFS=$as_save_IFS
[]
T13,139
_AS_PATH_WALK_m4_defun_pro([$0])AS_REQUIRE([_AS_PATH_SEPARATOR_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T17,136
_AS_BASENAME_EXPR_m4_defun_pro([$0])$as_expr X/[]$1 : '.*/\([[^/][^/]*]\)/*$' \| \
X[]$1 : 'X\(//\)$' \| \
X[]$1 : 'X\(/\)' \| .[]_m4_defun_epi([$0])
T10,86
m4_toupperm4_translit([[$1]], [abcdefghijklmnopqrstuvwxyz],
[ABCDEFGHIJKLMNOPQRSTUVWXYZ])
T18,2
_AS_LITERAL_IF_YES$3
T11,2
_AS_ESCAPE_$1
T9,0
m4_ignore
T19,288
_m4_set_contents_1cm4_ifdef([_m4_set([$1])],
[m4_set_contains([$1], _m4_defn([_m4_set([$1])]),
[m4_pushdef([_m4_set_($1)], _m4_defn([_m4_set([$1])]))],
[_m4_popdef([_m4_set([$1],]_m4_defn(
[_m4_set([$1])])[)])])_m4_popdef([_m4_set([$1])])$0([$1])],
[_m4_popdef([_m4_set_cleanup($1)])])
T17,0
AS_MESSAGE_LOG_FD
T14,44
m4_divert_oncem4_expand_once([m4_divert_text([$1], [$2])])
T17,129
_AS_DETECT_EXPAND$1="m4_bpatsubst(m4_dquote(AS_ESCAPE(_m4_expand(m4_set_contents([$2], [
])))), [\\\$LINENO\(.*\)$], [";$1=$$1$LINENO;$1=$$1"\1])"
T10,143
m4_map_sepm4_pushdef([m4_Sep], [m4_define([m4_Sep], _m4_defn([m4_unquote]))])_m4_foreach([_m4_apply([m4_Sep([$2])[]$1],], [)], [], $3)m4_popdef([m4_Sep])
T17,272
_AS_IDENTIFIER_IFm4_cond([[$1]], [], [],
[m4_eval(m4_len(m4_translit([[$1]], ][[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]][)) > 0)], [1], [],
[m4_len(m4_translit(m4_format([[%.1s]], [$1]), ][[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]][))], [0], [-])
T18,303
_AS_ECHO_N_PREPARE_m4_defun_pro([$0])ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in @%:@(((((
-n*)
case `echo 'xy\c'` in
*c*) ECHO_T=' ';; # ECHO_T is single tab character.
xy) ECHO_C='\c';;
*) echo `echo ksh88 bug on AIX 6.1` > /dev/null
ECHO_T=' ';;
esac;;
*)
ECHO_N='-n';;
esac
[]_m4_defun_epi([$0])
T7,75
m4_warn_m4_warn([$1], [$2],
m4_ifdef([_m4_expansion_stack], [m4_expansion_stack]))
T33,29
m4_location(_AS_DETECT_SUGGESTED)../../lib/m4sugar/m4sh.m4:167
T9,36
m4_renamem4_copy([$1], [$2])m4_undefine([$1])
T18,540
_AS_TR_CPP_LITERALm4_translit([[$1]],
[*[]][abcdefghijklmnopqrstuvwxyz
!"#*%&'()$+,./:;<=>?@[\]^`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-],
[P[]][ABCDEFGHIJKLMNOPQRSTUVWXYZ_______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________])
F12,9
m4_changecomchangecom
T31,29
m4_location(_AS_ECHO_N_PREPARE)../../lib/m4sugar/m4sh.m4:807
F3,3
dnldnl
T13,134
_m4_defun_epi_m4_popdef([_m4_expanding($1)], [_m4_expansion_stack])m4_ifdef([_m4_expansion_stack], [], [_m4_defun_epi_outer([$1])])m4_provide([$1])
F9,6
m4_formatformat
T10,68
_AS_TR_CPP_AS_LITERAL_IF([$1], [*][ ][
])([], [$0_INDIR], [$0_LITERAL])([$1])
T7,54
_m4_cdrm4_if([$#], 1, [],
[, m4_dquote(m4_shift($@))])
T8,189
m4_splitm4_if([$1], [], [],
[$2], [ ], [m4_if(m4_index([$1], [ ]), [-1], [[[$1]]],
[_$0([$1], [$2], [, ])])],
[$2], [], [_$0([$1], [[ ]+], [, ])],
[_$0([$1], [$2], [, ])])
T17,253
m4_divert_requirem4_ifdef([_m4_expanding($2)],
[m4_fatal([$0: circular dependency of $2])])m4_if(_m4_divert_dump, [],
[m4_fatal([$0($2): cannot be used outside of an m4_defun'd macro])])m4_provide_if([$2], [],
[_m4_require_call([$2], [$3], _m4_divert([$1], [-]))])
T15,0
_m4_divert_dump
T6,43
m4_map_m4_foreach([_m4_apply([$1],], [)], [], $2)
T18,50
_m4_set_contents_1_m4_stack_reverse([_m4_set([$1])], [_m4_set_($1)])
T18,94
_m4_set_contents_2_m4_stack_reverse([_m4_set_($1)], [_m4_set([$1])],
[$2[]_m4_defn([_m4_set_($1)])$3], [$4[]])
T10,294
_m4_escapem4_changequote([-=<{(],[)}>=-])m4_bpatsubst(m4_bpatsubst(m4_bpatsubst(m4_bpatsubst(
-=<{(-=<{(-=<{(-=<{(-=<{($1)}>=-)}>=-)}>=-)}>=-)}>=-,
-=<{(#)}>=-, -=<{(@%:@)}>=-),
-=<{(\[)}>=-, -=<{(@<:@)}>=-),
-=<{(\])}>=-, -=<{(@:>@)}>=-),
-=<{(\$)}>=-, -=<{(@S|@)}>=-)m4_changequote([,])
T8,28
_AS_CASE [@%:@(]
$1[)] :
$2 ;;
T16,5
_m4_divert(GROW)10000
T6,190
m4_minm4_if([$#], [0], [m4_fatal([too few arguments to $0])],
[$#], [1], [m4_eval([$1])],
[$#$1], [2$2], [m4_eval([$1])],
[$#], [2], [_$0($@)],
[_m4_minmax([_$0], $@)])
T6,21
_AS_IFelif $1; then :
$2
T12,78
m4_foreach_wm4_pushdef([$1])m4_map_args_w([$2],
[m4_define([$1],], [)$3])m4_popdef([$1])
T11,55
m4_sincludem4_include_unique([$1])dnl
m4_builtin([sinclude], [$1])
T7,156
m4_defnm4_if([$#], [0], [[$0]],
[$#], [1], [m4_ifdef([$1], [_m4_defn([$1])],
[m4_fatal([$0: undefined macro: $1])])],
[m4_map_args([$0], $@)])
T6,190
m4_maxm4_if([$#], [0], [m4_fatal([too few arguments to $0])],
[$#], [1], [m4_eval([$1])],
[$#$1], [2$2], [m4_eval([$1])],
[$#], [2], [_$0($@)],
[_m4_minmax([_$0], $@)])
T30,30
m4_location(AS_INIT_GENERATED)../../lib/m4sugar/m4sh.m4:2121
T16,0
m4_pattern_allow
T14,276
_AS_CR_PREPARE_m4_defun_pro([$0])# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
[]_m4_defun_epi([$0])
T21,29
m4_location(AS_ERROR)../../lib/m4sugar/m4sh.m4:883
T10,115
AS_VAR_GETAS_LITERAL_WORD_IF([$1],
[$$1],
[`eval 'as_val=${'_AS_ESCAPE([[$1]], [`], [\])'};AS_ECHO(["$as_val"])'`])
T14,58
_m4_map_args_wm4_substr([$1], [$2], m4_eval(m4_len([$1]) - [$2] - [$3]))
T30,0
m4_include(m4sugar/version.m4)
T11,498
_AS_MKDIR_Pcase $as_dir in #(
-*) as_dir=./$as_dir;;
esac
test -d "$as_dir" || eval $as_mkdir_p || {
as_dirs=
while :; do
case $as_dir in #(
*\'*) as_qdir=`AS_ECHO(["$as_dir"]) | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
as_dir=`AS_DIRNAME("$as_dir")`
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
} || test -d "$as_dir" || AS_ERROR([cannot create directory $as_dir])
T10,124
AS_MESSAGEm4_ifval(AS_MESSAGE_LOG_FD,
[{ _AS_ECHO_LOG([$1])
_AS_ECHO([$as_me: $1], [$2]);}],
[_AS_ECHO([$as_me: $1], [$2])])[][]
T10,127
AS_MESSAGE_m4_defun_pro([$0])AS_REQUIRE([_AS_ME_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T17,32
m4_define_defaultm4_ifndef([$1], [m4_define($@)])
T16,101
m4_stack_foreach_m4_stack_reverse([$1], [m4_tmp-$1])_m4_stack_reverse([m4_tmp-$1], [$1], [$2(_m4_defn([m4_tmp-$1]))])
F10,7
m4_pushdefpushdef
T9,22
AS_TR_CPP_$0(m4_expand([$1]))[]
T9,124
AS_TR_CPP_m4_defun_pro([$0])AS_REQUIRE([_$0_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T13,26
m4_cr_lettersabcdefghijklmnopqrstuvwxyz
T18,8
m4_PACKAGE_TARNAMEautoconf
T26,292
_AS_PATH_SEPARATOR_PREPARE_m4_defun_pro([$0])# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
PATH_SEPARATOR=';'
}
fi
[]_m4_defun_epi([$0])
F8,8
__line____line__
T20,40
_AS_VAR_APPEND_WORKSas_var=1; as_var+=2; test x$as_var = x12
T35,30
m4_location(_AS_VAR_APPEND_PREPARE)../../lib/m4sugar/m4sh.m4:1906
T9,255
m4_cr_all
!"#*%&'()$+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T13,84
_AS_QUOTE_OLDm4_warn([obsolete],
[back quotes and double quotes must not be escaped in: $1])$1
T19,29
m4_location(AS_FOR)../../lib/m4sugar/m4sh.m4:607
T13,252
m4_set_removem4_set_contains([$1], [$2], [_m4_set_size([$1],
[m4_decr])m4_if(_m4_defn([_m4_set([$1])]), [$2],
[_m4_popdef([_m4_set([$1],$2)], [_m4_set([$1])])],
[m4_define([_m4_set_cleanup($1)])m4_define(
[_m4_set([$1],$2)], [0])])$3], [$4])
T17,229
m4_cr_not_letters
!"#*%&'()$+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T8,27
m4_ifvalm4_if([$1], [], [$3], [$2])
T26,30
m4_location(AS_ME_PREPARE)../../lib/m4sugar/m4sh.m4:1121
T13,207
m4_map_args_w_$0(_m4_split([ ]m4_flatten([$1])[ ], [[ ]+],
m4_if(m4_index([$2$3$4], [\]), [-1], [[$3[]$4[]$2]],
[m4_bpatsubst([[$3[]$4[]$2]], [\\], [\\\\])])),
m4_len([[]$3[]$4]), m4_len([$4[]$2[]]))
T17,117
m4_include_uniquem4_ifdef([m4_include($1)],
[m4_warn([syntax], [file `$1' included several times])])dnl
m4_define([m4_include($1)])
T12,30
m4_esyscmd_sm4_chomp_all(m4_esyscmd([$1]))
F10,6
_m4_popdefpopdef
T10,26
AS_MKDIR_Pas_dir=$1; as_fn_mkdir_p[]
T10,124
AS_MKDIR_P_m4_defun_pro([$0])AS_REQUIRE([_$0_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T8,99
_m4_condm4_if(($1), [($2)], [$3],
[$#], [3], [],
[$#], [4], [$4],
[$0(m4_shift3($@))])
F9,6
m4_divnumdivnum
T15,99
_AS_LITERAL_IF_m4_if(m4_translit([$1], [+]), [], [$0YES],
m4_translit([$1], [$]), [], [m4_default], [$0NO])
T12,77
m4_chomp_allm4_format([[%.*s]], m4_bregexp(m4_translit([[$1]], [
/], [/ ]), [/*$]), [$1])
F7,4
m4_evaleval
T14,180
AS_HELP_STRINGm4_text_wrap([$2], m4_cond([[$3]], [], [ ],
[m4_eval([$3]+0)], [0], [[$3]],
[m4_format([[%*s]], [$3], [])]),
m4_expand([ $1 ]), [$4])
T8,19
m4_curry$1(m4_shift($@,)_$0
T9,222
m4_bmatchm4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])],
[$#], 1, [m4_fatal([$0: too few arguments: $#: $1])],
[$#], 2, [$2],
[m4_if(m4_bregexp([$1], [$2]), -1, [$0([$1], m4_shift3($@))],
[$3])])
T13,91
AS_SET_STATUS_m4_defun_pro([$0])AS_REQUIRE([_AS_EXIT_PREPARE])[]as_fn_set_status $1[]_m4_defun_epi([$0])
T16,54
m4_append_uniq_wm4_map_args_w([$2], [_m4_append_uniq([$1],], [, [ ])])
T20,36
_m4_set_intersectionm4_set_contains([$1], [$2], [,[$2]])
T29,30
m4_location(_AS_ECHO_PREPARE)../../lib/m4sugar/m4sh.m4:1044
T6,4
m4_car[$1]
T11,238
m4_text_boxm4_pushdef([m4_Border],
m4_translit(m4_format([[[%*s]]], m4_decr(m4_qlen(_m4_expand([$1
]))), []), [ ], m4_default_quoted([$2], [-])))[##] _m4_defn([m4_Border]) [##]
[##] $1 [##]
[##] _m4_defn([m4_Border]) [##]_m4_popdef([m4_Border])
T18,49
AS_LITERAL_WORD_IF_AS_LITERAL_IF(m4_expand([$1]))([$4], [$3], [$2])
T8,1075
AS_UNAME{
cat <<_ASUNAME
m4_text_box([Platform.])
hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
_ASUNAME
_AS_PATH_WALK([$PATH], [AS_ECHO(["PATH: $as_dir"])])
}
T32,29
m4_location(_AS_DETECT_REQUIRED)../../lib/m4sugar/m4sh.m4:156
T7,65
_m4_minm4_eval((([$1]) < ([$2])) * ([$1]) + (([$1]) >= ([$2])) * ([$2]))
T20,170
_m4_version_unletterm4_bpatsubst(m4_bpatsubst(m4_translit([[[[0,$1]]]], [.-], [,,]),[[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]][+],
[+1,-1,[0r36:\&]]), [,0], [,[0r10:0]])
T12,1
_m4_divert()0
T11,149
m4_map_argsm4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
[$#], [1], [],
[$#], [2], [$1([$2])[]],
[_m4_foreach([$1(], [)], $@)])
T6,46
m4_cmpm4_eval((([$1]) > ([$2])) - (([$1]) < ([$2])))
T21,696
_AS_REEXEC_WITH_SHELL_m4_defun_pro([$0])dnl
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in @%:@ ((((
*v*x* | *x*v* ) as_opts=-vx ;;
*v* ) as_opts=-v ;;
*x* ) as_opts=-x ;;
* ) as_opts= ;;
esac
exec $1 $as_opts "$as_myself" ${1+"$[@]"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
AS_ECHO(["$[]0: could not re-execute with $1"]) >&2
AS_EXIT([255])[]_m4_defun_epi([$0])
T7,65
_m4_maxm4_eval((([$1]) > ([$2])) * ([$1]) + (([$1]) <= ([$2])) * ([$2]))
T7,36
m4_signm4_eval((([$1]) > 0) - (([$1]) < 0))
T26,29
m4_location(AS_SET_STATUS)../../lib/m4sugar/m4sh.m4:649
T10,266
AS_REQUIRE_m4_defun_pro([$0])m4_define([_m4_divert_desired], [m4_default_quoted([$3], [M4SH-INIT])])m4_if(m4_eval(_m4_divert_dump - 0 <= _m4_divert(_m4_divert_desired, [-])),
1, [m4_require(],
[m4_divert_require(_m4_divert_desired,]) [$1], [$2])[]_m4_defun_epi([$0])
T19,166
m4_set_intersectionm4_if([$1], [$2], [m4_set_listc([$1])],
m4_eval(m4_set_size([$2]) < m4_set_size([$1])), [1], [$0([$2], [$1])],
[m4_set_map_sep([$1], [_$0([$2],], [)])])
T11,85
AS_BASENAME$as_basename -- $1 ||
_AS_BASENAME_EXPR([$1]) 2>/dev/null ||
_AS_BASENAME_SED([$1])[]
T11,124
AS_BASENAME_m4_defun_pro([$0])AS_REQUIRE([_$0_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T9,158
m4_popdefm4_if([$#], [0], [[$0]],
[$#], [1], [m4_ifdef([$1], [_m4_popdef([$1])],
[m4_fatal([$0: undefined macro: $1])])],
[m4_map_args([$0], $@)])
T10,280
m4_set_addm4_ifdef([_m4_set([$1],$2)],
[m4_if(m4_indir([_m4_set([$1],$2)]), [0],
[m4_define([_m4_set([$1],$2)],
[1])_m4_set_size([$1], [m4_incr])$3], [$4])],
[m4_define([_m4_set([$1],$2)],
[1])m4_pushdef([_m4_set([$1])],
[$2])_m4_set_size([$1], [m4_incr])$3])
T15,140
_AS_VAR_PUSHDEF_AS_LITERAL_IF([$2], [ ][
])([], [as_$1=_AS_TR_SH_INDIR([$2])
m4_pushdef([$1], [$as_[$1]])],
[m4_pushdef([$1], [_AS_TR_SH_LITERAL([$2])])])
T7,98
_AS_RUNm4_ifval([$2], [{ $as_echo "$as_bourne_compatible"$1 | as_run=a $2; }],
[(eval $1)]) 2>/dev/null
T26,2
_AS_LITERAL_HEREDOC_IF_YES$1
T14,131
m4_set_add_allm4_define([_m4_set_size($1)], m4_eval(m4_set_size([$1])
+ m4_len(m4_ifdef([_m4_set_cleanup($1)], [_$0_check], [_$0])([$1], $@))))
T19,62
m4_version_unletterm4_substr(m4_map_args([.m4_eval], m4_unquote(_$0([$1]))), [3])
T24,29
m4_location(AS_BASENAME)../../lib/m4sugar/m4sh.m4:942
T16,50
_m4_list_cmp_rawm4_if([$1], [$2], [0], [_m4_list_cmp_1([$1], $2)])
T11,33
m4_set_listm4_set_map_sep([$1], [], [], [,])
T36,29
m4_location(_AS_DETECT_BETTER_SHELL)../../lib/m4sugar/m4sh.m4:194
T10,72
m4_reversem4_if([$#], [0], [], [$#], [1], [[$1]],
[$0(m4_shift($@)), [$1]])
T17,196
AS_SHELL_SANITIZE_AS_SHELL_SANITIZE
m4_provide_if([AS_INIT], [],
[m4_provide([AS_INIT])
_AS_DETECT_REQUIRED([_AS_SHELL_FN_WORK])
_AS_DETECT_REQUIRED([_AS_TEST_X_WORKS])
_AS_DETECT_BETTER_SHELL
_AS_UNSET_PREPARE
])
T7,1688
m4_init# All the M4sugar macros start with `m4_', except `dnl' kept as is
# for sake of simplicity.
m4_pattern_forbid([^_?m4_])
m4_pattern_forbid([^dnl$])
# If __m4_version__ is defined, we assume that we are being run by M4
# 1.6 or newer, thus $@ recursion is linear, and debugmode(+do)
# is available for faster checks of dereferencing undefined macros
# and forcing dumpdef to print to stderr regardless of debugfile.
# But if it is missing, we assume we are being run by M4 1.4.x, that
# $@ recursion is quadratic, and that we need foreach-based
# replacement macros. Also, m4 prior to 1.4.8 loses track of location
# during m4wrap text; __line__ should never be 0.
#
# Use the raw builtin to avoid tripping up include tracing.
# Meanwhile, avoid m4_copy, since it temporarily undefines m4_defn.
m4_ifdef([__m4_version__],
[m4_debugmode([+do])
m4_define([m4_defn], _m4_defn([_m4_defn]))
m4_define([m4_dumpdef], _m4_defn([_m4_dumpdef]))
m4_define([m4_popdef], _m4_defn([_m4_popdef]))
m4_define([m4_undefine], _m4_defn([_m4_undefine]))],
[m4_builtin([include], [m4sugar/foreach.m4])
m4_wrap_lifo([m4_if(__line__, [0], [m4_pushdef([m4_location],
]]m4_dquote(m4_dquote(m4_dquote(__file__:__line__)))[[)])])])
# Rewrite the first entry of the diversion stack.
m4_divert([KILL])
# Check the divert push/pop perfect balance.
# Some users are prone to also use m4_wrap to register last-minute
# m4_divert_text; so after our diversion cleanups, we restore
# KILL as the bottom of the diversion stack.
m4_wrap([m4_popdef([_m4_divert_diversion])m4_ifdef(
[_m4_divert_diversion], [m4_fatal([$0: unbalanced m4_divert_push:
]m4_divert_stack)])_m4_popdef([_m4_divert_stack])m4_divert_push([KILL])])
T22,30
m4_location(AS_TEST_X)../../lib/m4sugar/m4sh.m4:1090
T11,70
_m4_foreachm4_if([$#], [3], [],
[$1[$4]$2[]$0([$1], [$2], m4_shift3($@))])
T12,93
m4_set_emptym4_ifdef([_m4_set_size($1)],
[m4_if(m4_indir([_m4_set_size($1)]), [0], [$2], [$3])], [$2])
F10,6
m4_bregexpregexp
T16,1346
_AS_ECHO_PREPARE_m4_defun_pro([$0])[as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
&& (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='print -r --'
as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='printf %s\n'
as_echo_n='printf %s'
else
if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
as_echo_body='eval /usr/ucb/echo -n "$][1$as_nl"'
as_echo_n='/usr/ucb/echo -n'
else
as_echo_body='eval expr "X$][1" : "X\\(.*\\)"'
as_echo_n_body='eval
arg=$][1;
case $arg in @%:@(
*"$as_nl"*)
expr "X$arg" : "X\\(.*\\)$as_nl";
arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
esac;
expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
'
export as_echo_n_body
as_echo_n='sh -c $as_echo_n_body as_echo'
fi
export as_echo_body
as_echo='sh -c $as_echo_body as_echo'
fi
][]_m4_defun_epi([$0])
T9,22
m4_shift2m4_shift(m4_shift($@))
T9,32
m4_shift3m4_shift(m4_shift(m4_shift($@)))
T34,29
m4_location(_AS_REEXEC_WITH_SHELL)../../lib/m4sugar/m4sh.m4:279
T6,598
m4_form4_pushdef([$1], m4_eval([$2]))m4_cond([m4_eval(([$3]) > ([$2]))], 1,
[m4_pushdef([_m4_step], m4_eval(m4_default_quoted([$4],
1)))m4_assert(_m4_step > 0)_$0(_m4_defn([$1]),
m4_eval((([$3]) - ([$2])) / _m4_step * _m4_step + ([$2])), _m4_step,],
[m4_eval(([$3]) < ([$2]))], 1,
[m4_pushdef([_m4_step], m4_eval(m4_default_quoted([$4],
-1)))m4_assert(_m4_step < 0)_$0(_m4_defn([$1]),
m4_eval((([$2]) - ([$3])) / -(_m4_step) * _m4_step + ([$2])), _m4_step,],
[m4_pushdef([_m4_step])_$0(_m4_defn([$1]), _m4_defn([$1]), 0,])[m4_define([$1],], [)$5])m4_popdef([_m4_step], [$1])
F10,7
m4_esyscmdesyscmd
F12,9
m4_debugfiledebugfile
T13,20
AS_VAR_APPENDas_fn_append $1 $2[]
T13,155
AS_VAR_APPEND_m4_defun_pro([$0])AS_REQUIRE([_AS_VAR_APPEND_PREPARE], [], [M4SH-INIT-FN])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T26,104
_AS_DETECT_SUGGESTED_PRUNEm4_set_contains([_AS_DETECT_REQUIRED_BODY], [$1],
[m4_set_remove([_AS_DETECT_SUGGESTED_BODY], [$1])])
T11,146
_m4_expand_m4_if([$4], [}>=-],
[m4_changequote([-=<{$2], [)}>=-])$3m4_changequote([, ])],
[$0([$1], [($2], -=<{($2$1)}>=-, [}>=-])m4_ignore$2])
T16,9
_AS_TEST_X_WORKStest -x /
T19,156
_m4_defun_pro_outerm4_set_delete([_m4_provide])m4_pushdef([_m4_diverting([$1])])m4_pushdef([_m4_diverting], [$1])m4_pushdef([_m4_divert_dump], m4_divnum)m4_divert_push([GROW])
T15,272
_AS_DIRNAME_SED_m4_defun_pro([$0])AS_ECHO([X[]$1]) |
sed ['/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'][]_m4_defun_epi([$0])
T16,27
_AS_CASE_DEFAULT [@%:@(]
*[)] :
$1 ;;
T8,189
_m4_wrapm4_ifdef([$0_text],
[m4_define([$0_text], [$1]_m4_defn([$0_text])[$2])],
[m4_builtin([m4wrap], [m4_unquote(
_m4_defn([$0_text])_m4_popdef([$0_text]))])m4_define([$0_text], [$1$2])])
T19,336
_AS_MKDIR_P_PREPARE_m4_defun_pro([$0])AS_REQUIRE_SHELL_FN([as_fn_mkdir_p],
[AS_FUNCTION_DESCRIBE([as_fn_mkdir_p], [],
[Create "$as_dir" as a directory, including parents if necessary.])],
[
_AS_MKDIR_P
])if mkdir -p . 2>/dev/null; then
as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
[]_m4_defun_epi([$0])
T16,169
_AS_EXPR_PREPARE_m4_defun_pro([$0])if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
[]_m4_defun_epi([$0])
T13,42
AS_VAR_SET_IFAS_IF([AS_VAR_TEST_SET([$1])], [$2], [$3])
T10,100
m4_foreachm4_if([$2], [], [],
[m4_pushdef([$1])_$0([m4_define([$1],], [)$3], [],
$2)m4_popdef([$1])])
T15,58
m4_divert_stackm4_stack_foreach_sep_lifo([_m4_divert_stack], [], [], [
])
T9,69
m4_assertm4_if(m4_eval([$1]), 0,
[m4_fatal([assert failed: $1], [$2])])
T11,54
AS_VAR_COPYAS_LITERAL_WORD_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])
D-1,0
# End of frozen state file
070701000679af000081a400000000000000000000000153b4ffc200012722000000b500010002ffffffffffffffff0000002e00000000root/usr/local/share/autoconf/m4sugar/m4sh.m4 # This file is part of Autoconf. -*- Autoconf -*-
# M4 sugar for common shell constructs.
# Requires GNU M4 and M4sugar.
#
# Copyright (C) 2000-2012 Free Software Foundation, Inc.
# This file is part of Autoconf. This program is free
# software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# Under Section 7 of GPL version 3, you are granted additional
# permissions described in the Autoconf Configure Script Exception,
# version 3.0, as published by the Free Software Foundation.
#
# You should have received a copy of the GNU General Public License
# and a copy of the Autoconf Configure Script Exception along with
# this program; see the files COPYINGv3 and COPYING.EXCEPTION
# respectively. If not, see .
# Written by Akim Demaille, Pavel Roskin, Alexandre Oliva, Lars J. Aas
# and many other people.
# We heavily use m4's diversions both for the initializations and for
# required macros, because in both cases we have to issue soon in
# output something which is discovered late.
#
#
# KILL is only used to suppress output.
#
# - BINSH
# AC_REQUIRE'd #! /bin/sh line
# - HEADER-REVISION
# RCS keywords etc.
# - HEADER-COMMENT
# Purpose of the script etc.
# - HEADER-COPYRIGHT
# Copyright notice(s)
# - M4SH-SANITIZE
# M4sh's shell setup
# - M4SH-INIT-FN
# M4sh initialization (shell functions)
# - M4SH-INIT
# M4sh initialization (detection code)
# - BODY
# The body of the script.
# _m4_divert(DIVERSION-NAME)
# --------------------------
# Convert a diversion name into its number. Otherwise, return
# DIVERSION-NAME which is supposed to be an actual diversion number.
# Of course it would be nicer to use m4_case here, instead of zillions
# of little macros, but it then takes twice longer to run `autoconf'!
m4_define([_m4_divert(BINSH)], 0)
m4_define([_m4_divert(HEADER-REVISION)], 1)
m4_define([_m4_divert(HEADER-COMMENT)], 2)
m4_define([_m4_divert(HEADER-COPYRIGHT)], 3)
m4_define([_m4_divert(M4SH-SANITIZE)], 4)
m4_define([_m4_divert(M4SH-INIT-FN)], 5)
m4_define([_m4_divert(M4SH-INIT)], 6)
m4_define([_m4_divert(BODY)], 1000)
# Aaarg. Yet it starts with compatibility issues... Libtool wants to
# use NOTICE to insert its own LIBTOOL-INIT stuff. People should ask
# before diving into our internals :(
m4_copy([_m4_divert(M4SH-INIT)], [_m4_divert(NOTICE)])
## ------------------------- ##
## 1. Sanitizing the shell. ##
## ------------------------- ##
# Please maintain lexicographic sorting of this section, ignoring leading _.
# AS_BOURNE_COMPATIBLE
# --------------------
# Try to be as Bourne and/or POSIX as possible.
#
# This does not set BIN_SH, due to the problems described in
# .
# People who need BIN_SH should set it in their environment before invoking
# configure; apparently this would include UnixWare, as described in
# .
m4_define([AS_BOURNE_COMPATIBLE],
[# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
_$0
])
# _AS_BOURNE_COMPATIBLE
# ---------------------
# This is the part of AS_BOURNE_COMPATIBLE which has to be repeated inside
# each instance.
m4_define([_AS_BOURNE_COMPATIBLE],
[AS_IF([test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1],
[emulate sh
NULLCMD=:
[#] Pre-4.2 versions of Zsh do word splitting on ${1+"$[@]"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$[@]"}'='"$[@]"'
setopt NO_GLOB_SUBST],
[AS_CASE([`(set -o) 2>/dev/null`], [*posix*], [set -o posix])])
])
# _AS_CLEANUP
# -----------
# Expanded as the last thing before m4sugar cleanup begins. Macros
# may append m4sh cleanup hooks to this as appropriate.
m4_define([_AS_CLEANUP],
[m4_divert_text([M4SH-SANITIZE], [_AS_DETECT_BETTER_SHELL])])
# AS_COPYRIGHT(TEXT)
# ------------------
# Emit TEXT, a copyright notice, as a shell comment near the top of the
# script. TEXT is evaluated once; to accomplish that, we do not prepend
# `# ' but `@%:@ '.
m4_define([AS_COPYRIGHT],
[m4_divert_text([HEADER-COPYRIGHT],
[m4_bpatsubst([
$1], [^], [@%:@ ])])])
# _AS_DETECT_EXPAND(VAR, SET)
# ---------------------------
# Assign the contents of VAR from the contents of SET, expanded in such
# a manner that VAR can be passed to _AS_RUN. In order to make
# _AS_LINENO_WORKS operate correctly, we must specially handle the
# first instance of $LINENO within any line being expanded (the first
# instance is important to tests using the current shell, leaving
# remaining instances for tests using a candidate shell). Bash loses
# track of line numbers if a double quote contains a newline, hence,
# we must piece-meal the assignment of VAR such that $LINENO expansion
# occurs in a single line.
m4_define([_AS_DETECT_EXPAND],
[$1="m4_bpatsubst(m4_dquote(AS_ESCAPE(_m4_expand(m4_set_contents([$2], [
])))), [\\\$LINENO\(.*\)$], [";$1=$$1$LINENO;$1=$$1"\1])"])
# _AS_DETECT_REQUIRED(TEST)
# -------------------------
# Refuse to execute under a shell that does not pass the given TEST.
# Does not do AS_REQUIRE for the better-shell detection code.
#
# M4sh should never require something not required by POSIX, although
# other clients are free to do so.
m4_defun([_AS_DETECT_REQUIRED],
[m4_set_add([_AS_DETECT_REQUIRED_BODY], [$1 || AS_EXIT])])
# _AS_DETECT_SUGGESTED(TEST)
# --------------------------
# Prefer to execute under a shell that passes the given TEST.
# Does not do AS_REQUIRE for the better-shell detection code.
#
# M4sh should never suggest something not required by POSIX, although
# other clients are free to do so.
m4_defun([_AS_DETECT_SUGGESTED],
[m4_set_add([_AS_DETECT_SUGGESTED_BODY], [$1 || AS_EXIT])])
# _AS_DETECT_SUGGESTED_PRUNE(TEST)
# --------------------------------
# If TEST is also a required test, remove it from the set of suggested tests.
m4_define([_AS_DETECT_SUGGESTED_PRUNE],
[m4_set_contains([_AS_DETECT_REQUIRED_BODY], [$1],
[m4_set_remove([_AS_DETECT_SUGGESTED_BODY], [$1])])])
# _AS_DETECT_BETTER_SHELL
# -----------------------
# The real workhorse for detecting a shell with the correct
# features.
#
# In previous versions, we prepended /usr/posix/bin to the path, but that
# caused a regression on OpenServer 6.0.0
#
# and on HP-UX 11.11, see the failure of test 120 in
#
#
# FIXME: The code should test for the OSF bug described in
# .
#
# This code is run outside any trap 0 context, hence we can simplify AS_EXIT.
m4_defun([_AS_DETECT_BETTER_SHELL],
dnl
dnl By default, do not force re-execution of the script just because
dnl the user has pre-set $CONFIG_SHELL; do so only if the m4sh client has
dnl defined the internal variable `_AS_FORCE_REEXEC_WITH_CONFIG_SHELL' to
dnl "yes".
dnl FIXME: This interface is acceptable for the moment, as a private,
dnl FIXME: internal one; but if we want to make the "always re-execute"
dnl FIXME: feature public, we should find a better interface!
[m4_if(_AS_FORCE_REEXEC_WITH_CONFIG_SHELL, [yes],
[# Use a proper internal environment variable to ensure we don't fall
# into an infinite loop, continuously re-executing ourselves.
if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
_as_can_reexec=no; export _as_can_reexec;
_AS_REEXEC_WITH_SHELL([$CONFIG_SHELL])
fi
# We don't want this to propagate to other subprocesses.
dnl This might be especially important in case an m4sh-generated script
dnl is used to later execute other m4sh-generated scripts. This happens
dnl for example in autoconf's own testsuite (and happens *a lot* there,
dnl in fact).
AS_UNSET([_as_can_reexec])
])]dnl
dnl Remove any tests from suggested that are also required
[m4_set_map([_AS_DETECT_SUGGESTED_BODY], [_AS_DETECT_SUGGESTED_PRUNE])]dnl
[m4_pushdef([AS_EXIT], [exit m4_default(]m4_dquote([$][1])[, 1)])]dnl
[if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="AS_ESCAPE(_m4_expand([_AS_BOURNE_COMPATIBLE]))"
_AS_DETECT_EXPAND([as_required], [_AS_DETECT_REQUIRED_BODY])
_AS_DETECT_EXPAND([as_suggested], [_AS_DETECT_SUGGESTED_BODY])
AS_IF([_AS_RUN(["$as_required"])],
[as_have_required=yes],
[as_have_required=no])
AS_IF([test x$as_have_required = xyes && _AS_RUN(["$as_suggested"])],
[],
[_AS_PATH_WALK([/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH],
[case $as_dir in @%:@(
/*)
for as_base in sh bash ksh sh5; do
# Try only shells that exist, to save several forks.
as_shell=$as_dir/$as_base
AS_IF([{ test -f "$as_shell" || test -f "$as_shell.exe"; } &&
_AS_RUN(["$as_required"], ["$as_shell"])],
[CONFIG_SHELL=$as_shell as_have_required=yes
m4_set_empty([_AS_DETECT_SUGGESTED_BODY], [break 2],
[AS_IF([_AS_RUN(["$as_suggested"], ["$as_shell"])],
[break 2])])])
done;;
esac],
[AS_IF([{ test -f "$SHELL" || test -f "$SHELL.exe"; } &&
_AS_RUN(["$as_required"], ["$SHELL"])],
[CONFIG_SHELL=$SHELL as_have_required=yes])])
AS_IF([test "x$CONFIG_SHELL" != x],
[export CONFIG_SHELL
_AS_REEXEC_WITH_SHELL([$CONFIG_SHELL])])
dnl Unfortunately, $as_me isn't available here.
AS_IF([test x$as_have_required = xno],
[AS_ECHO(["$[]0: This script requires a shell more modern than all"])
AS_ECHO(["$[]0: the shells that I found on your system."])
if test x${ZSH_VERSION+set} = xset ; then
AS_ECHO(["$[]0: In particular, zsh $ZSH_VERSION has bugs and should"])
AS_ECHO(["$[]0: be upgraded to zsh 4.3.4 or later."])
else
AS_ECHO("m4_text_wrap([Please tell ]_m4_defn([m4_PACKAGE_BUGREPORT])
m4_ifset([AC_PACKAGE_BUGREPORT], [m4_if(_m4_defn([m4_PACKAGE_BUGREPORT]),
_m4_defn([AC_PACKAGE_BUGREPORT]), [], [and _m4_defn([AC_PACKAGE_BUGREPORT])])])
[about your system, including any error possibly output before this message.
Then install a modern shell, or manually run the script under such a
shell if you do have one.], [$[]0: ], [], [62])")
fi
AS_EXIT])])
fi
SHELL=${CONFIG_SHELL-/bin/sh}
export SHELL
# Unset more variables known to interfere with behavior of common tools.
CLICOLOR_FORCE= GREP_OPTIONS=
unset CLICOLOR_FORCE GREP_OPTIONS
_m4_popdef([AS_EXIT])])# _AS_DETECT_BETTER_SHELL
# _AS_REEXEC_WITH_SHELL(SHELL)
# ----------------------------
# Re-execute the current script with the given shell, trying to preserve
# portable settings (e.g., the `xtrace' and `verbose' shell flag).
m4_defun([_AS_REEXEC_WITH_SHELL], [dnl
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in @%:@ ((((
*v*x* | *x*v* ) as_opts=-vx ;;
*v* ) as_opts=-v ;;
*x* ) as_opts=-x ;;
* ) as_opts= ;;
esac
exec $1 $as_opts "$as_myself" ${1+"$[@]"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
AS_ECHO(["$[]0: could not re-execute with $1"]) >&2
AS_EXIT([255])])# _AS_REEXEC_WITH_SHELL
# _AS_PREPARE
# -----------
# This macro has a very special status. Normal use of M4sh relies
# heavily on AS_REQUIRE, so that needed initializations (such as
# _AS_TEST_PREPARE) are performed on need, not on demand. But
# Autoconf is the first client of M4sh, and for two reasons: configure
# and config.status. Relying on AS_REQUIRE is of course fine for
# configure, but fails for config.status (which is created by
# configure). So we need a means to force the inclusion of the
# various _AS_*_PREPARE on top of config.status. That's basically why
# there are so many _AS_*_PREPARE below, and that's also why it is
# important not to forget some: config.status needs them.
# List any preparations that create shell functions first, then
# topologically sort the others by their dependencies.
#
# Special case: we do not need _AS_LINENO_PREPARE, because the
# parent will have substituted $LINENO for us when processing its
# own invocation of _AS_LINENO_PREPARE.
#
# Special case: the full definition of _AS_ERROR_PREPARE is not output
# unless AS_MESSAGE_LOG_FD is non-empty, although the value of
# AS_MESSAGE_LOG_FD is not relevant.
m4_defun([_AS_PREPARE],
[m4_pushdef([AS_REQUIRE])]dnl
[m4_pushdef([AS_REQUIRE_SHELL_FN], _m4_defn([_AS_REQUIRE_SHELL_FN])
)]dnl
[m4_pushdef([AS_MESSAGE_LOG_FD], [-1])]dnl
[_AS_ERROR_PREPARE
_m4_popdef([AS_MESSAGE_LOG_FD])]dnl
[_AS_EXIT_PREPARE
_AS_UNSET_PREPARE
_AS_VAR_APPEND_PREPARE
_AS_VAR_ARITH_PREPARE
_AS_EXPR_PREPARE
_AS_BASENAME_PREPARE
_AS_DIRNAME_PREPARE
_AS_ME_PREPARE
_AS_CR_PREPARE
_AS_ECHO_N_PREPARE
_AS_LN_S_PREPARE
_AS_MKDIR_P_PREPARE
_AS_TEST_PREPARE
_AS_TR_CPP_PREPARE
_AS_TR_SH_PREPARE
_m4_popdef([AS_REQUIRE], [AS_REQUIRE_SHELL_FN])])
# AS_PREPARE
# ----------
# Output all the M4sh possible initialization into the initialization
# diversion. We do not use _AS_PREPARE so that the m4_provide symbols for
# AS_REQUIRE and AS_REQUIRE_SHELL_FN are defined properly, and so that
# shell functions are placed in M4SH-INIT-FN.
m4_defun([AS_PREPARE],
[m4_divert_push([KILL])
m4_append_uniq([_AS_CLEANUP],
[m4_divert_text([M4SH-INIT-FN], [_AS_ERROR_PREPARE[]])])
AS_REQUIRE([_AS_EXPR_PREPARE])
AS_REQUIRE([_AS_BASENAME_PREPARE])
AS_REQUIRE([_AS_DIRNAME_PREPARE])
AS_REQUIRE([_AS_ME_PREPARE])
AS_REQUIRE([_AS_CR_PREPARE])
AS_REQUIRE([_AS_LINENO_PREPARE])
AS_REQUIRE([_AS_ECHO_N_PREPARE])
AS_REQUIRE([_AS_EXIT_PREPARE])
AS_REQUIRE([_AS_LN_S_PREPARE])
AS_REQUIRE([_AS_MKDIR_P_PREPARE])
AS_REQUIRE([_AS_TEST_PREPARE])
AS_REQUIRE([_AS_TR_CPP_PREPARE])
AS_REQUIRE([_AS_TR_SH_PREPARE])
AS_REQUIRE([_AS_UNSET_PREPARE])
AS_REQUIRE([_AS_VAR_APPEND_PREPARE], [], [M4SH-INIT-FN])
AS_REQUIRE([_AS_VAR_ARITH_PREPARE], [], [M4SH-INIT-FN])
m4_divert_pop[]])
# AS_REQUIRE(NAME-TO-CHECK, [BODY-TO-EXPAND = NAME-TO-CHECK],
# [DIVERSION = M4SH-INIT])
# -----------------------------------------------------------
# BODY-TO-EXPAND is some initialization which must be expanded in the
# given diversion when expanded (required or not). The expansion
# goes in the named diversion or an earlier one.
#
# Since $2 can be quite large, this is factored for faster execution, giving
# either m4_require([$1], [$2]) or m4_divert_require(desired, [$1], [$2]).
m4_defun([AS_REQUIRE],
[m4_define([_m4_divert_desired], [m4_default_quoted([$3], [M4SH-INIT])])]dnl
[m4_if(m4_eval(_m4_divert_dump - 0 <= _m4_divert(_m4_divert_desired, [-])),
1, [m4_require(],
[m4_divert_require(_m4_divert_desired,]) [$1], [$2])])
# _AS_REQUIRE_SHELL_FN(NAME-TO-CHECK, COMMENT, BODY-TO-EXPAND)
# ------------------------------------------------------------
# Core of AS_REQUIRE_SHELL_FN, but without diversion support.
m4_define([_AS_REQUIRE_SHELL_FN], [
m4_n([$2])$1 ()
{
$3
} @%:@ $1[]])
# AS_REQUIRE_SHELL_FN(NAME-TO-CHECK, COMMENT, BODY-TO-EXPAND,
# [DIVERSION = M4SH-INIT-FN])
# -----------------------------------------------------------
# BODY-TO-EXPAND is the body of a shell function to be emitted in the
# given diversion when expanded (required or not). Unlike other
# xx_REQUIRE macros, BODY-TO-EXPAND is mandatory. If COMMENT is
# provided (often via AS_FUNCTION_DESCRIBE), it is listed with a
# newline before the function name.
m4_define([AS_REQUIRE_SHELL_FN],
[m4_provide_if([AS_SHELL_FN_$1], [],
[AS_REQUIRE([AS_SHELL_FN_$1],
[m4_provide([AS_SHELL_FN_$1])_$0($@)],
m4_default_quoted([$4], [M4SH-INIT-FN]))])])
# _AS_RUN(TEST, [SHELL])
# ----------------------
# Run TEST under the current shell (if one parameter is used)
# or under the given SHELL, protecting it from syntax errors.
# Set as_run in order to assist _AS_LINENO_WORKS.
m4_define([_AS_RUN],
[m4_ifval([$2], [{ $as_echo "$as_bourne_compatible"$1 | as_run=a $2; }],
[(eval $1)]) 2>/dev/null])
# _AS_SHELL_FN_WORK
# -----------------
# This is a spy to detect "in the wild" shells that do not support shell
# functions correctly. It is based on the m4sh.at Autotest testcases.
m4_define([_AS_SHELL_FN_WORK],
[as_fn_return () { (exit [$]1); }
as_fn_success () { as_fn_return 0; }
as_fn_failure () { as_fn_return 1; }
as_fn_ret_success () { return 0; }
as_fn_ret_failure () { return 1; }
exitcode=0
as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
AS_IF([( set x; as_fn_ret_success y && test x = "[$]1" )], [],
[exitcode=1; echo positional parameters were not saved.])
test x$exitcode = x0[]])# _AS_SHELL_FN_WORK
# _AS_SHELL_SANITIZE
# ------------------
# This is the prolog that is emitted by AS_INIT and AS_INIT_GENERATED;
# it is executed prior to shell function definitions, hence the
# temporary redefinition of AS_EXIT.
m4_defun([_AS_SHELL_SANITIZE],
[m4_pushdef([AS_EXIT], [exit m4_default(]m4_dquote([$][1])[, 1)])]dnl
[m4_text_box([M4sh Initialization.])
AS_BOURNE_COMPATIBLE
_AS_ECHO_PREPARE
_AS_PATH_SEPARATOR_PREPARE
# IFS
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $[0] in @%:@((
*[[\\/]]* ) as_myself=$[0] ;;
*) _AS_PATH_WALK([],
[test -r "$as_dir/$[0]" && as_myself=$as_dir/$[0] && break])
;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$[0]
fi
if test ! -f "$as_myself"; then
AS_ECHO(["$as_myself: error: cannot find myself; rerun with an absolute file name"]) >&2
AS_EXIT
fi
# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there. '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
&& ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
_m4_popdef([AS_EXIT])])# _AS_SHELL_SANITIZE
# AS_SHELL_SANITIZE
# -----------------
# This is only needed for the sake of Libtool, which screws up royally
# in its usage of M4sh internals.
m4_define([AS_SHELL_SANITIZE],
[_AS_SHELL_SANITIZE
m4_provide_if([AS_INIT], [],
[m4_provide([AS_INIT])
_AS_DETECT_REQUIRED([_AS_SHELL_FN_WORK])
_AS_DETECT_REQUIRED([_AS_TEST_X_WORKS])
_AS_DETECT_BETTER_SHELL
_AS_UNSET_PREPARE
])])
## ----------------------------- ##
## 2. Wrappers around builtins. ##
## ----------------------------- ##
# This section is lexicographically sorted.
# AS_CASE(WORD, [PATTERN1], [IF-MATCHED1]...[DEFAULT])
# ----------------------------------------------------
# Expand into
# | case WORD in #(
# | PATTERN1) IF-MATCHED1 ;; #(
# | ...
# | *) DEFAULT ;;
# | esac
# The shell comments are intentional, to work around people who don't
# realize the impacts of using insufficient m4 quoting. This macro
# always uses : and provides a default case, to work around Solaris
# /bin/sh bugs regarding the exit status.
m4_define([_AS_CASE],
[ [@%:@(]
$1[)] :
$2 ;;])
m4_define([_AS_CASE_DEFAULT],
[ [@%:@(]
*[)] :
$1 ;;])
m4_defun([AS_CASE],
[case $1 in[]m4_map_args_pair([_$0], [_$0_DEFAULT],
m4_shift($@m4_if(m4_eval([$# & 1]), [1], [,])))
esac])# AS_CASE
# _AS_EXIT_PREPARE
# ----------------
# Ensure AS_EXIT and AS_SET_STATUS will work.
#
# We cannot simply use "exit N" because some shells (zsh and Solaris sh)
# will not set $? to N while running the code set by "trap 0"
# Some shells fork even for (exit N), so we use a helper function
# to set $? prior to the exit.
# Then there are shells that don't inherit $? correctly into the start of
# a shell function, so we must always be given an argument.
# Other shells don't use `$?' as default for `exit', hence just repeating
# the exit value can only help improving portability.
m4_defun([_AS_EXIT_PREPARE],
[AS_REQUIRE_SHELL_FN([as_fn_set_status],
[AS_FUNCTION_DESCRIBE([as_fn_set_status], [STATUS],
[Set $? to STATUS, without forking.])], [ return $[]1])]dnl
[AS_REQUIRE_SHELL_FN([as_fn_exit],
[AS_FUNCTION_DESCRIBE([as_fn_exit], [STATUS],
[Exit the shell with STATUS, even in a "trap 0" or "set -e" context.])],
[ set +e
as_fn_set_status $[1]
exit $[1]])])#_AS_EXIT_PREPARE
# AS_EXIT([EXIT-CODE = $?])
# -------------------------
# Exit, with status set to EXIT-CODE in the way that it's seen
# within "trap 0", and without interference from "set -e". If
# EXIT-CODE is omitted, then use $?.
m4_defun([AS_EXIT],
[AS_REQUIRE([_AS_EXIT_PREPARE])[]as_fn_exit m4_ifval([$1], [$1], [$][?])])
# AS_FOR(MACRO, SHELL-VAR, [LIST = "$@"], [BODY = :])
# ---------------------------------------------------
# Expand to a shell loop that assigns SHELL-VAR to each of the
# whitespace-separated entries in LIST (or "$@" if LIST is empty),
# then executes BODY. BODY may call break to abort the loop, or
# continue to proceed with the next element of LIST. Requires that
# IFS be set to the normal space-tab-newline. As an optimization,
# BODY should access MACRO rather than $SHELL-VAR. Normally, MACRO
# expands to $SHELL-VAR, but if LIST contains only a single element
# that needs no additional shell quoting, then MACRO will expand to
# that element, thus providing a direct value rather than a shell
# variable indirection.
#
# Only use the optimization if LIST can be used without additional
# shell quoting in either a literal or double-quoted context (that is,
# we give up on default IFS chars, parameter expansion, command
# substitution, shell quoting, globs, or quadrigraphs). Inline the
# m4_defn for speed.
m4_defun([AS_FOR],
[m4_pushdef([$1], m4_if([$3], [], [[$$2]], m4_translit([$3], ]dnl
m4_dquote(_m4_defn([m4_cr_symbols2]))[[%+=:,./-]), [], [[$3]], [[$$2]]))]dnl
[for $2[]m4_ifval([$3], [ in $3])
do :
$4
done[]_m4_popdef([$1])])
# AS_IF(TEST1, [IF-TRUE1 = :]...[IF-FALSE = :])
# ---------------------------------------------
# Expand into
# | if TEST1; then
# | IF-TRUE1
# | elif TEST2; then
# | IF-TRUE2
# [...]
# | else
# | IF-FALSE
# | fi
# with simplifications when IF-TRUE1 and/or IF-FALSE are empty.
#
m4_define([_AS_IF],
[elif $1; then :
$2
])
m4_define([_AS_IF_ELSE],
[m4_ifnblank([$1],
[else
$1
])])
m4_defun([AS_IF],
[if $1; then :
$2
m4_map_args_pair([_$0], [_$0_ELSE], m4_shift2($@))]dnl
[fi[]])# AS_IF
# AS_SET_STATUS(STATUS)
# ---------------------
# Set the shell status ($?) to STATUS, without forking.
m4_defun([AS_SET_STATUS],
[AS_REQUIRE([_AS_EXIT_PREPARE])[]as_fn_set_status $1])
# _AS_UNSET_PREPARE
# -----------------
# Define $as_unset to execute AS_UNSET, for backwards compatibility
# with older versions of M4sh.
m4_defun([_AS_UNSET_PREPARE],
[AS_FUNCTION_DESCRIBE([as_fn_unset], [VAR], [Portably unset VAR.])
as_fn_unset ()
{
AS_UNSET([$[1]])
}
as_unset=as_fn_unset])
# AS_UNSET(VAR)
# -------------
# Unset the env VAR, working around shells that do not allow unsetting
# a variable that is not already set. You should not unset MAIL and
# MAILCHECK, as that triggers a bug in Bash 2.01.
m4_defun([AS_UNSET],
[{ AS_LITERAL_WORD_IF([$1], [], [eval ])$1=; unset $1;}])
## ------------------------------------------ ##
## 3. Error and warnings at the shell level. ##
## ------------------------------------------ ##
# AS_MESSAGE_FD
# -------------
# Must expand to the fd where messages will be sent. Defaults to 1,
# although a script may reassign this value and use exec to either
# copy stdout to the new fd, or open the new fd on /dev/null.
m4_define([AS_MESSAGE_FD], [1])
# AS_MESSAGE_LOG_FD
# -----------------
# Must expand to either the empty string (when no logging is
# performed), or to the fd of a log file. Defaults to empty, although
# a script may reassign this value and use exec to open a log. When
# not empty, messages to AS_MESSAGE_FD are duplicated to the log,
# along with a LINENO reference.
m4_define([AS_MESSAGE_LOG_FD])
# AS_ORIGINAL_STDIN_FD
# --------------------
# Must expand to the fd of the script's original stdin. Defaults to
# 0, although the script may reassign this value and use exec to
# shuffle fd's.
m4_define([AS_ORIGINAL_STDIN_FD], [0])
# AS_ESCAPE(STRING, [CHARS = `\"$])
# ---------------------------------
# Add backslash escaping to the CHARS in STRING. In an effort to
# optimize use of this macro inside double-quoted shell constructs,
# the behavior is intentionally undefined if CHARS is longer than 4
# bytes, or contains bytes outside of the set [`\"$]. However,
# repeated bytes within the set are permissible (AS_ESCAPE([$1], [""])
# being a common way to be nice to syntax highlighting).
#
# Avoid the m4_bpatsubst if there are no interesting characters to escape.
# _AS_ESCAPE bypasses argument defaulting.
m4_define([AS_ESCAPE],
[_$0([$1], m4_if([$2], [], [[`], [\"$]], [m4_substr([$2], [0], [1]), [$2]]))])
# _AS_ESCAPE(STRING, KEY, SET)
# ----------------------------
# Backslash-escape all instances of the single byte KEY or up to four
# bytes in SET occurring in STRING. Although a character can occur
# multiple times, optimum efficiency occurs when KEY and SET are
# distinct, and when SET does not exceed two bytes. These particular
# semantics allow for the fewest number of parses of STRING, as well
# as taking advantage of the optimizations in m4 1.4.13+ when
# m4_translit is passed SET of size 2 or smaller.
m4_define([_AS_ESCAPE],
[m4_if(m4_index(m4_translit([[$1]], [$3], [$2$2$2$2]), [$2]), [-1],
[$0_], [m4_bpatsubst])([$1], [[$2$3]], [\\\&])])
m4_define([_AS_ESCAPE_], [$1])
# _AS_QUOTE(STRING)
# -----------------
# If there are quoted (via backslash) backquotes, output STRING
# literally and warn; otherwise, output STRING with ` and " quoted.
#
# Compatibility glue between the old AS_MSG suite which did not
# quote anything, and the modern suite which quotes the quotes.
# If STRING contains `\\' or `\$', it's modern.
# If STRING contains `\"' or `\`', it's old.
# Otherwise it's modern.
#
# Profiling shows that m4_index is 5 to 8x faster than m4_bregexp. The
# slower implementation used:
# m4_bmatch([$1],
# [\\[\\$]], [$2],
# [\\[`"]], [$3],
# [$2])
# The current implementation caters to the common case of no backslashes,
# to minimize m4_index expansions (hence the nested if).
m4_define([_AS_QUOTE],
[m4_cond([m4_index([$1], [\])], [-1], [_AS_QUOTE_MODERN],
[m4_eval(m4_index(m4_translit([[$1]], [$], [\]), [\\]) >= 0)],
[1], [_AS_QUOTE_MODERN],
[m4_eval(m4_index(m4_translit([[$1]], ["], [`]), [\`]) >= 0)],dnl"
[1], [_AS_QUOTE_OLD],
[_AS_QUOTE_MODERN])([$1])])
m4_define([_AS_QUOTE_MODERN],
[_AS_ESCAPE([$1], [`], [""])])
m4_define([_AS_QUOTE_OLD],
[m4_warn([obsolete],
[back quotes and double quotes must not be escaped in: $1])$1])
# _AS_ECHO_UNQUOTED(STRING, [FD = AS_MESSAGE_FD])
# -----------------------------------------------
# Perform shell expansions on STRING and echo the string to FD.
m4_define([_AS_ECHO_UNQUOTED],
[AS_ECHO(["$1"]) >&m4_default([$2], [AS_MESSAGE_FD])])
# _AS_ECHO(STRING, [FD = AS_MESSAGE_FD])
# --------------------------------------
# Protect STRING from backquote expansion, echo the result to FD.
m4_define([_AS_ECHO],
[_AS_ECHO_UNQUOTED([_AS_QUOTE([$1])], [$2])])
# _AS_ECHO_LOG(STRING)
# --------------------
# Log the string to AS_MESSAGE_LOG_FD.
m4_defun_init([_AS_ECHO_LOG],
[AS_REQUIRE([_AS_LINENO_PREPARE])],
[_AS_ECHO([$as_me:${as_lineno-$LINENO}: $1], AS_MESSAGE_LOG_FD)])
# _AS_ECHO_N_PREPARE
# ------------------
# Check whether to use -n, \c, or newline-tab to separate
# checking messages from result messages.
# Don't try to cache, since the results of this macro are needed to
# display the checking message. In addition, caching something used once
# has little interest.
# Idea borrowed from dist 3.0. Use `*c*,', not `*c,' because if `\c'
# failed there is also a newline to match. Use `xy' because `\c' echoed
# in a command substitution prints only the first character of the output
# with ksh version M-11/16/88f on AIX 6.1; it needs to be reset by another
# backquoted echo.
m4_defun([_AS_ECHO_N_PREPARE],
[ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in @%:@(((((
-n*)
case `echo 'xy\c'` in
*c*) ECHO_T=' ';; # ECHO_T is single tab character.
xy) ECHO_C='\c';;
*) echo `echo ksh88 bug on AIX 6.1` > /dev/null
ECHO_T=' ';;
esac;;
*)
ECHO_N='-n';;
esac
])# _AS_ECHO_N_PREPARE
# _AS_ECHO_N(STRING, [FD = AS_MESSAGE_FD])
# ----------------------------------------
# Same as _AS_ECHO, but echo doesn't return to a new line.
m4_define([_AS_ECHO_N],
[AS_ECHO_N(["_AS_QUOTE([$1])"]) >&m4_default([$2], [AS_MESSAGE_FD])])
# AS_MESSAGE(STRING, [FD = AS_MESSAGE_FD])
# ----------------------------------------
# Output "`basename $0`: STRING" to the open file FD, and if logging
# is enabled, copy it to the log with a reference to LINENO.
m4_defun_init([AS_MESSAGE],
[AS_REQUIRE([_AS_ME_PREPARE])],
[m4_ifval(AS_MESSAGE_LOG_FD,
[{ _AS_ECHO_LOG([$1])
_AS_ECHO([$as_me: $1], [$2]);}],
[_AS_ECHO([$as_me: $1], [$2])])[]])
# AS_WARN(PROBLEM)
# ----------------
# Output "`basename $0`: WARNING: PROBLEM" to stderr.
m4_define([AS_WARN],
[AS_MESSAGE([WARNING: $1], [2])])# AS_WARN
# _AS_ERROR_PREPARE
# -----------------
# Output the shell function used by AS_ERROR. This is designed to be
# expanded during the m4_wrap cleanup.
#
# If AS_MESSAGE_LOG_FD is non-empty at the end of the script, then
# make this function take optional parameters that use LINENO at the
# points where AS_ERROR was expanded with non-empty AS_MESSAGE_LOG_FD;
# otherwise, assume the entire script does not do logging.
m4_define([_AS_ERROR_PREPARE],
[AS_REQUIRE_SHELL_FN([as_fn_error],
[AS_FUNCTION_DESCRIBE([as_fn_error], [STATUS ERROR]m4_ifval(AS_MESSAGE_LOG_FD,
[[ [[LINENO LOG_FD]]]]),
[Output "`basename @S|@0`: error: ERROR" to stderr.]
m4_ifval(AS_MESSAGE_LOG_FD,
[[If LINENO and LOG_FD are provided, also output the error to LOG_FD,
referencing LINENO.]])
[Then exit the script with STATUS, using 1 if that was 0.])],
[ as_status=$[1]; test $as_status -eq 0 && as_status=1
m4_ifval(AS_MESSAGE_LOG_FD,
[m4_pushdef([AS_MESSAGE_LOG_FD], [$[4]])dnl
if test "$[4]"; then
AS_LINENO_PUSH([$[3]])
_AS_ECHO_LOG([error: $[2]])
fi
m4_define([AS_MESSAGE_LOG_FD])], [m4_pushdef([AS_MESSAGE_LOG_FD])])dnl
AS_MESSAGE([error: $[2]], [2])
_m4_popdef([AS_MESSAGE_LOG_FD])dnl
AS_EXIT([$as_status])])])
# AS_ERROR(ERROR, [EXIT-STATUS = max($?/1)])
# ------------------------------------------
# Output "`basename $0`: error: ERROR" to stderr, then exit the
# script with EXIT-STATUS.
m4_defun_init([AS_ERROR],
[m4_append_uniq([_AS_CLEANUP],
[m4_divert_text([M4SH-INIT-FN], [_AS_ERROR_PREPARE[]])])],
[as_fn_error m4_default([$2], [$?]) "_AS_QUOTE([$1])"m4_ifval(AS_MESSAGE_LOG_FD,
[ "$LINENO" AS_MESSAGE_LOG_FD])])
# AS_LINENO_PUSH([LINENO])
# ------------------------
# If this is the outermost call to AS_LINENO_PUSH, make sure that
# AS_MESSAGE will print LINENO as the line number.
m4_defun([AS_LINENO_PUSH],
[as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack])
# AS_LINENO_POP([LINENO])
# -----------------------
# If this is call balances the outermost call to AS_LINENO_PUSH,
# AS_MESSAGE will restart printing $LINENO as the line number.
#
# No need to use AS_UNSET, since as_lineno is necessarily set.
m4_defun([AS_LINENO_POP],
[eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno])
## -------------------------------------- ##
## 4. Portable versions of common tools. ##
## -------------------------------------- ##
# This section is lexicographically sorted.
# AS_BASENAME(FILE-NAME)
# ----------------------
# Simulate the command 'basename FILE-NAME'. Not all systems have basename.
# Also see the comments for AS_DIRNAME.
m4_defun([_AS_BASENAME_EXPR],
[$as_expr X/[]$1 : '.*/\([[^/][^/]*]\)/*$' \| \
X[]$1 : 'X\(//\)$' \| \
X[]$1 : 'X\(/\)' \| .])
m4_defun([_AS_BASENAME_SED],
[AS_ECHO([X/[]$1]) |
sed ['/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
}
/^X\/\(\/\/\)$/{
s//\1/
q
}
/^X\/\(\/\).*/{
s//\1/
q
}
s/.*/./; q']])
m4_defun_init([AS_BASENAME],
[AS_REQUIRE([_$0_PREPARE])],
[$as_basename -- $1 ||
_AS_BASENAME_EXPR([$1]) 2>/dev/null ||
_AS_BASENAME_SED([$1])])
# _AS_BASENAME_PREPARE
# --------------------
# Avoid Solaris 9 /usr/ucb/basename, as `basename /' outputs an empty line.
# Also, traditional basename mishandles --. Require here _AS_EXPR_PREPARE,
# to avoid problems when _AS_BASENAME is called from the M4SH-INIT diversion.
m4_defun([_AS_BASENAME_PREPARE],
[AS_REQUIRE([_AS_EXPR_PREPARE])]dnl
[if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
])# _AS_BASENAME_PREPARE
# AS_DIRNAME(FILE-NAME)
# ---------------------
# Simulate the command 'dirname FILE-NAME'. Not all systems have dirname.
# This macro must be usable from inside ` `.
#
# Prefer expr to echo|sed, since expr is usually faster and it handles
# backslashes and newlines correctly. However, older expr
# implementations (e.g. SunOS 4 expr and Solaris 8 /usr/ucb/expr) have
# a silly length limit that causes expr to fail if the matched
# substring is longer than 120 bytes. So fall back on echo|sed if
# expr fails.
m4_defun_init([_AS_DIRNAME_EXPR],
[AS_REQUIRE([_AS_EXPR_PREPARE])],
[$as_expr X[]$1 : 'X\(.*[[^/]]\)//*[[^/][^/]]*/*$' \| \
X[]$1 : 'X\(//\)[[^/]]' \| \
X[]$1 : 'X\(//\)$' \| \
X[]$1 : 'X\(/\)' \| .])
m4_defun([_AS_DIRNAME_SED],
[AS_ECHO([X[]$1]) |
sed ['/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q']])
m4_defun_init([AS_DIRNAME],
[AS_REQUIRE([_$0_PREPARE])],
[$as_dirname -- $1 ||
_AS_DIRNAME_EXPR([$1]) 2>/dev/null ||
_AS_DIRNAME_SED([$1])])
# _AS_DIRNAME_PREPARE
# -------------------
m4_defun([_AS_DIRNAME_PREPARE],
[AS_REQUIRE([_AS_EXPR_PREPARE])]dnl
[if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
as_dirname=dirname
else
as_dirname=false
fi
])# _AS_DIRNAME_PREPARE
# AS_ECHO(WORD)
# -------------
# Output WORD followed by a newline. WORD must be a single shell word
# (typically a quoted string). The bytes of WORD are output as-is, even
# if it starts with "-" or contains "\".
m4_defun_init([AS_ECHO],
[AS_REQUIRE([_$0_PREPARE])],
[$as_echo $1])
# AS_ECHO_N(WORD)
# ---------------
# Like AS_ECHO(WORD), except do not output the trailing newline.
m4_defun_init([AS_ECHO_N],
[AS_REQUIRE([_AS_ECHO_PREPARE])],
[$as_echo_n $1])
# _AS_ECHO_PREPARE
# ----------------
# Arrange for $as_echo 'FOO' to echo FOO without escape-interpretation;
# and similarly for $as_echo_n, which omits the trailing newline.
# 'FOO' is an optional single argument; a missing FOO is treated as empty.
m4_defun([_AS_ECHO_PREPARE],
[[as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
&& (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='print -r --'
as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='printf %s\n'
as_echo_n='printf %s'
else
if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
as_echo_body='eval /usr/ucb/echo -n "$][1$as_nl"'
as_echo_n='/usr/ucb/echo -n'
else
as_echo_body='eval expr "X$][1" : "X\\(.*\\)"'
as_echo_n_body='eval
arg=$][1;
case $arg in @%:@(
*"$as_nl"*)
expr "X$arg" : "X\\(.*\\)$as_nl";
arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
esac;
expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
'
export as_echo_n_body
as_echo_n='sh -c $as_echo_n_body as_echo'
fi
export as_echo_body
as_echo='sh -c $as_echo_body as_echo'
fi
]])# _AS_ECHO_PREPARE
# AS_TEST_X
# ---------
# Check whether a file has executable or search permissions.
# FIXME: This macro is no longer useful; consider deleting it in 2014
# after we ensure m4sh scripts can always find a shell with test -x.
m4_defun_init([AS_TEST_X],
[AS_REQUIRE([_AS_TEST_PREPARE])],
[test -x $1[]])# AS_TEST_X
# AS_EXECUTABLE_P
# ---------------
# Check whether a file is a regular file that has executable permissions.
m4_defun_init([AS_EXECUTABLE_P],
[AS_REQUIRE([_AS_TEST_PREPARE])],
[as_fn_executable_p $1])# AS_EXECUTABLE_P
# _AS_EXPR_PREPARE
# ----------------
# QNX 4.25 expr computes and issue the right result but exits with failure.
# Tru64 expr mishandles leading zeros in numeric strings.
# Detect these flaws.
m4_defun([_AS_EXPR_PREPARE],
[if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
])# _AS_EXPR_PREPARE
# _AS_ME_PREPARE
# --------------
# Define $as_me to the basename of the executable file's name.
m4_defun([AS_ME_PREPARE], [AS_REQUIRE([_$0])])
m4_defun([_AS_ME_PREPARE],
[AS_REQUIRE([_AS_BASENAME_PREPARE])]dnl
[as_me=`AS_BASENAME("$[0]")`
])
# _AS_LINENO_WORKS
# ----------------
# Succeed if the currently executing shell supports LINENO.
# This macro does not expand to a single shell command, so be careful
# when using it. Surrounding the body of this macro with {} would
# cause "bash -c '_ASLINENO_WORKS'" to fail (with Bash 2.05, anyway),
# but that bug is irrelevant to our use of LINENO. We can't use
# AS_VAR_ARITH, as this is expanded prior to shell functions.
#
# Testing for LINENO support is hard; we use _AS_LINENO_WORKS inside
# _AS_RUN, which sometimes eval's its argument (pdksh gives false
# negatives if $LINENO is expanded by eval), and sometimes passes the
# argument to another shell (if the current shell supports LINENO,
# then expanding $LINENO prior to the string leads to false
# positives). Hence, we perform two tests, and coordinate with
# _AS_DETECT_EXPAND (which ensures that only the first of two LINENO
# is expanded in advance) and _AS_RUN (which sets $as_run to 'a' when
# handing the test to another shell), so that we know which test to
# trust.
m4_define([_AS_LINENO_WORKS],
[ as_lineno_1=$LINENO as_lineno_1a=$LINENO
as_lineno_2=$LINENO as_lineno_2a=$LINENO
eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"'])
# _AS_LINENO_PREPARE
# ------------------
# If LINENO is not supported by the shell, produce a version of this
# script where LINENO is hard coded.
# Comparing LINENO against _oline_ is not a good solution, since in
# the case of embedded executables (such as config.status within
# configure) you'd compare LINENO wrt config.status vs. _oline_ wrt
# configure.
#
# AS_ERROR normally uses LINENO if logging, but AS_LINENO_PREPARE uses
# AS_ERROR. Besides, if the logging fd is open, we don't want to use
# $LINENO in the log complaining about broken LINENO. We break the
# circular require by changing AS_ERROR and AS_MESSAGE_LOG_FD.
m4_defun([AS_LINENO_PREPARE], [AS_REQUIRE([_$0])])
m4_defun([_AS_LINENO_PREPARE],
[AS_REQUIRE([_AS_CR_PREPARE])]dnl
[AS_REQUIRE([_AS_ME_PREPARE])]dnl
[_AS_DETECT_SUGGESTED([_AS_LINENO_WORKS])]dnl
[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
[m4_pushdef([AS_ERROR],
[{ AS_MESSAGE(]m4_dquote([error: $][1])[, [2]); AS_EXIT([1]); }])]dnl
dnl Create $as_me.lineno as a copy of $as_myself, but with $LINENO
dnl uniformly replaced by the line number. The first 'sed' inserts a
dnl line-number line after each line using $LINENO; the second 'sed'
dnl does the real work. The second script uses 'N' to pair each
dnl line-number line with the line containing $LINENO, and appends
dnl trailing '-' during substitution so that $LINENO is not a special
dnl case at line end. (Raja R Harinath suggested sed '=', and Paul
dnl Eggert wrote the scripts with optimization help from Paolo Bonzini).
[_AS_LINENO_WORKS || {
[ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
sed -n '
p
/[$]LINENO/=
' <$as_myself |
sed '
s/[$]LINENO.*/&-/
t lineno
b
:lineno
N
:loop
s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
t loop
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno"] ||
AS_ERROR([cannot create $as_me.lineno; rerun with a POSIX shell])
# If we had to re-execute with $CONFIG_SHELL, we're ensured to have
# already done that, so ensure we don't try to do so again and fall
# in an infinite loop. This has already happened in practice.
_as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
. "./$as_me.lineno"
# Exit status is that of the last command.
exit
}
_m4_popdef([AS_MESSAGE_LOG_FD], [AS_ERROR])])# _AS_LINENO_PREPARE
# _AS_LN_S_PREPARE
# ----------------
# Don't use conftest.sym to avoid file name issues on DJGPP, where this
# would yield conftest.sym.exe for DJGPP < 2.04. And don't use `conftest'
# as base name to avoid prohibiting concurrency (e.g., concurrent
# config.statuses). On read-only media, assume 'cp -pR' and hope we
# are just running --help anyway.
m4_defun([_AS_LN_S_PREPARE],
[rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
else
rm -f conf$$.dir
mkdir conf$$.dir 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
# In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -pR'
fi
else
as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
])# _AS_LN_S_PREPARE
# AS_LN_S(FILE, LINK)
# -------------------
# FIXME: Should we add the glue code to handle properly relative symlinks
# simulated with `ln' or `cp'?
m4_defun_init([AS_LN_S],
[AS_REQUIRE([_AS_LN_S_PREPARE])],
[$as_ln_s $1 $2])
# _AS_MKDIR_P
# -----------
# Emit code that can be used to emulate `mkdir -p` with plain `mkdir';
# the code assumes that "$as_dir" contains the directory to create.
# $as_dir is normalized, so there is no need to worry about using --.
m4_define([_AS_MKDIR_P],
[case $as_dir in #(
-*) as_dir=./$as_dir;;
esac
test -d "$as_dir" || eval $as_mkdir_p || {
as_dirs=
while :; do
case $as_dir in #(
*\'*) as_qdir=`AS_ECHO(["$as_dir"]) | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
as_dir=`AS_DIRNAME("$as_dir")`
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
} || test -d "$as_dir" || AS_ERROR([cannot create directory $as_dir])
])
# AS_MKDIR_P(DIR)
# ---------------
# Emulate `mkdir -p' with plain `mkdir' if needed.
m4_defun_init([AS_MKDIR_P],
[AS_REQUIRE([_$0_PREPARE])],
[as_dir=$1; as_fn_mkdir_p])# AS_MKDIR_P
# _AS_MKDIR_P_PREPARE
# -------------------
m4_defun([_AS_MKDIR_P_PREPARE],
[AS_REQUIRE_SHELL_FN([as_fn_mkdir_p],
[AS_FUNCTION_DESCRIBE([as_fn_mkdir_p], [],
[Create "$as_dir" as a directory, including parents if necessary.])],
[
_AS_MKDIR_P
])]dnl
[if mkdir -p . 2>/dev/null; then
as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
])# _AS_MKDIR_P_PREPARE
# _AS_PATH_SEPARATOR_PREPARE
# --------------------------
# Compute the path separator.
m4_defun([_AS_PATH_SEPARATOR_PREPARE],
[# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
PATH_SEPARATOR=';'
}
fi
])# _AS_PATH_SEPARATOR_PREPARE
# _AS_PATH_WALK([PATH = $PATH], BODY, [IF-NOT-FOUND])
# ---------------------------------------------------
# Walk through PATH running BODY for each `as_dir'. If BODY never does a
# `break', evaluate IF-NOT-FOUND.
#
# Still very private as its interface looks quite bad.
#
# `$as_dummy' forces splitting on constant user-supplied paths.
# POSIX.2 field splitting is done only on the result of word
# expansions, not on literal text. This closes a longstanding sh security
# hole. Optimize it away when not needed, i.e., if there are no literal
# path separators.
m4_defun_init([_AS_PATH_WALK],
[AS_REQUIRE([_AS_PATH_SEPARATOR_PREPARE])],
[as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
m4_ifvaln([$3], [as_found=false])dnl
m4_bmatch([$1], [[:;]],
[as_dummy="$1"
for as_dir in $as_dummy],
[for as_dir in m4_default([$1], [$PATH])])
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
m4_ifvaln([$3], [as_found=:])dnl
$2
m4_ifvaln([$3], [as_found=false])dnl
done
m4_ifvaln([$3], [$as_found || { $3; }])dnl
IFS=$as_save_IFS
])
# AS_SET_CATFILE(VAR, DIR-NAME, FILE-NAME)
# ----------------------------------------
# Set VAR to DIR-NAME/FILE-NAME.
# Optimize the common case where $2 or $3 is '.'.
m4_define([AS_SET_CATFILE],
[case $2 in @%:@((
.) AS_VAR_SET([$1], [$3]);;
*)
case $3 in @%:@(((
.) AS_VAR_SET([$1], [$2]);;
[[\\/]]* | ?:[[\\/]]* ) AS_VAR_SET([$1], [$3]);;
*) AS_VAR_SET([$1], [$2/$3]);;
esac;;
esac[]])# AS_SET_CATFILE
# _AS_TEST_X_WORKS
# ----------------
# These days, we require that `test -x' works.
m4_define([_AS_TEST_X_WORKS], [test -x /])
# _AS_TEST_PREPARE
# ----------------
# Provide back-compat to people that hooked into our undocumented
# internals (here's looking at you, libtool).
m4_defun([_AS_TEST_PREPARE],
[AS_REQUIRE_SHELL_FN([as_fn_executable_p],
[AS_FUNCTION_DESCRIBE([as_fn_executable_p], [FILE],
[Test if FILE is an executable regular file.])],
[ test -f "$[]1" && test -x "$[]1"])]dnl
[as_test_x='test -x'
as_executable_p=as_fn_executable_p
])# _AS_TEST_PREPARE
## ------------------ ##
## 5. Common idioms. ##
## ------------------ ##
# This section is lexicographically sorted.
# AS_BOX(MESSAGE, [FRAME-CHARACTER = `-'])
# ----------------------------------------
# Output MESSAGE, a single line text, framed with FRAME-CHARACTER (which
# must not be `/').
m4_define([AS_BOX],
[_$0(m4_expand([$1]), [$2])])
m4_define([_AS_BOX],
[m4_if(m4_index(m4_translit([[$1]], [`\"], [$$$]), [$]),
[-1], [$0_LITERAL], [$0_INDIR])($@)])
# _AS_BOX_LITERAL(MESSAGE, [FRAME-CHARACTER = `-'])
# -------------------------------------------------
m4_define([_AS_BOX_LITERAL],
[AS_ECHO(["_AS_ESCAPE(m4_dquote(m4_expand([m4_text_box($@)])), [`], [\"$])"])])
# _AS_BOX_INDIR(MESSAGE, [FRAME-CHARACTER = `-'])
# -----------------------------------------------
m4_define([_AS_BOX_INDIR],
[sed 'h;s/./m4_default([$2], [-])/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
@%:@@%:@ $1 @%:@@%:@
_ASBOX])
# _AS_CLEAN_DIR(DIR)
# ------------------
# Remove all contents from within DIR, including any unwritable
# subdirectories, but leave DIR itself untouched.
m4_define([_AS_CLEAN_DIR],
[if test -d $1; then
find $1 -type d ! -perm -700 -exec chmod u+rwx {} \;
rm -fr $1/* $1/.[[!.]] $1/.??*
fi])
# AS_FUNCTION_DESCRIBE(NAME, [ARGS], DESCRIPTION, [WRAP-COLUMN = 79])
# -------------------------------------------------------------------
# Output a shell comment describing NAME and its arguments ARGS, then
# a separator line, then the DESCRIPTION wrapped at a decimal
# WRAP-COLUMN. The output resembles:
# # NAME ARGS
# # ---------
# # Wrapped DESCRIPTION text
# NAME and ARGS are expanded, while DESCRIPTION is treated as a
# whitespace-separated list of strings that are not expanded.
m4_define([AS_FUNCTION_DESCRIBE],
[@%:@ $1[]m4_ifval([$2], [ $2])
@%:@ m4_translit(m4_format([%*s],
m4_decr(m4_qlen(_m4_expand([$1[]m4_ifval([$2], [ $2])
]))), []), [ ], [-])
m4_text_wrap([$3], [@%:@ ], [], [$4])])
# AS_HELP_STRING(LHS, RHS, [INDENT-COLUMN = 26], [WRAP-COLUMN = 79])
# ------------------------------------------------------------------
#
# Format a help string so that it looks pretty when the user executes
# "script --help". This macro takes up to four arguments, a
# "left hand side" (LHS), a "right hand side" (RHS), a decimal
# INDENT-COLUMN which is the column where wrapped lines should begin
# (the default of 26 is recommended), and a decimal WRAP-COLUMN which is
# the column where lines should wrap (the default of 79 is recommended).
# LHS is expanded, RHS is not.
#
# For backwards compatibility not documented in the manual, INDENT-COLUMN
# can also be specified as a string of white spaces, whose width
# determines the indentation column. Using TABs in INDENT-COLUMN is not
# recommended, since screen width of TAB is not computed.
#
# The resulting string is suitable for use in other macros that require
# a help string (e.g. AC_ARG_WITH).
#
# Here is the sample string from the Autoconf manual (Node: External
# Software) which shows the proper spacing for help strings.
#
# --with-readline support fancy command line editing
# ^ ^ ^
# | | |
# | column 2 column 26
# |
# column 0
#
# A help string is made up of a "left hand side" (LHS) and a "right
# hand side" (RHS). In the example above, the LHS is
# "--with-readline", while the RHS is "support fancy command line
# editing".
#
# If the LHS contains more than (INDENT-COLUMN - 3) characters, then the
# LHS is terminated with a newline so that the RHS starts on a line of its
# own beginning at INDENT-COLUMN. In the default case, this corresponds to an
# LHS with more than 23 characters.
#
# Therefore, in the example, if the LHS were instead
# "--with-readline-blah-blah-blah", then the AS_HELP_STRING macro would
# expand into:
#
#
# --with-readline-blah-blah-blah
# ^ ^ support fancy command line editing
# | | ^
# | column 2 |
# column 0 column 26
#
#
# m4_text_wrap hacks^Wworks around the fact that m4_format does not
# know quadrigraphs.
#
m4_define([AS_HELP_STRING],
[m4_text_wrap([$2], m4_cond([[$3]], [], [ ],
[m4_eval([$3]+0)], [0], [[$3]],
[m4_format([[%*s]], [$3], [])]),
m4_expand([ $1 ]), [$4])])# AS_HELP_STRING
# AS_IDENTIFIER_IF(EXPRESSION, IF-IDENT, IF-NOT-IDENT)
# ----------------------------------------------------
# If EXPRESSION serves as an identifier (ie, after removal of @&t@, it
# matches the regex `^[a-zA-Z_][a-zA-Z_0-9]*$'), execute IF-IDENT,
# otherwise IF-NOT-IDENT.
#
# This is generally faster than the alternative:
# m4_bmatch(m4_bpatsubst([[$1]], [@&t@]), ^m4_defn([m4_re_word])$,
# [$2], [$3])
#
# Rather than expand m4_defn every time AS_IDENTIFIER_IF is expanded, we
# inline its expansion up front. Only use a regular expression if we
# detect a potential quadrigraph.
#
# First, check if the entire string matches m4_cr_symbol2. Only then do
# we worry if the first character also matches m4_cr_symbol1 (ie. does not
# match m4_cr_digit).
m4_define([AS_IDENTIFIER_IF],
[m4_if(_$0(m4_if(m4_index([$1], [@]), [-1],
[[$1]], [m4_bpatsubst([[$1]], [@&t@])])), [-], [$2], [$3])])
m4_define([_AS_IDENTIFIER_IF],
[m4_cond([[$1]], [], [],
[m4_eval(m4_len(m4_translit([[$1]], ]]dnl
m4_dquote(m4_dquote(m4_defn([m4_cr_symbols2])))[[)) > 0)], [1], [],
[m4_len(m4_translit(m4_format([[%.1s]], [$1]), ]]dnl
m4_dquote(m4_dquote(m4_defn([m4_cr_symbols1])))[[))], [0], [-])])
# AS_LITERAL_IF(EXPRESSION, IF-LITERAL, IF-NOT-LITERAL,
# [IF-SIMPLE-REF = IF-NOT-LITERAL])
# -----------------------------------------------------
# If EXPRESSION has no shell indirections ($var or `expr`), expand
# IF-LITERAL, else IF-NOT-LITERAL. In some cases, IF-NOT-LITERAL
# must be complex to safely deal with ``, while a simpler
# expression IF-SIMPLE-REF can be used if the indirection
# involves only shell variable expansion (as in ${varname}).
#
# EXPRESSION is treated as a literal if it results in the same
# interpretation whether it is unquoted or contained within double
# quotes, with the exception that whitespace is ignored (on the
# assumption that it will be flattened to _). Therefore, neither `\$'
# nor `a''b' is a literal, since both backslash and single quotes have
# different quoting behavior in the two contexts; and `a*' is not a
# literal, because it has different globbing. Note, however, that
# while `${a+b}' is neither a literal nor a simple ref, `a+b' is a
# literal. This macro is an *approximation*: it is possible that
# there are some EXPRESSIONs which the shell would treat as literals,
# but which this macro does not recognize.
#
# Why do we reject EXPRESSION expanding with `[' or `]' as a literal?
# Because AS_TR_SH is MUCH faster if it can use m4_translit on literals
# instead of m4_bpatsubst; but m4_translit is much tougher to do safely
# if `[' is translated. That, and file globbing matters.
#
# Note that the quadrigraph @S|@ can result in non-literals, but outright
# rejecting all @ would make AC_INIT complain on its bug report address.
#
# We used to use m4_bmatch(m4_quote($1), [[`$]], [$3], [$2]), but
# profiling shows that it is faster to use m4_translit.
#
# Because the translit is stripping quotes, it must also neutralize
# anything that might be in a macro name, as well as comments, commas,
# or unbalanced parentheses. Valid shell variable characters and
# unambiguous literal characters are deleted (`a.b'), and remaining
# characters are normalized into `$' if they can form simple refs
# (${a}), `+' if they can potentially form literals (a+b), ``' if they
# can interfere with m4 parsing, or left alone otherwise. If both `$'
# and `+' are left, it is treated as a complex reference (${a+b}),
# even though it could technically be a simple reference (${a}+b).
# _AS_LITERAL_IF_ only has to check for an empty string after removing
# one of the two normalized characters.
#
# Rather than expand m4_defn every time AS_LITERAL_IF is expanded, we
# inline its expansion up front. _AS_LITERAL_IF expands to the name
# of a macro that takes three arguments: IF-SIMPLE-REF,
# IF-NOT-LITERAL, IF-LITERAL. It also takes an optional argument of
# any additional characters to allow as literals (useful for AS_TR_SH
# and AS_TR_CPP to perform inline conversion of whitespace to _). The
# order of the arguments allows reuse of m4_default.
m4_define([AS_LITERAL_IF],
[_$0(m4_expand([$1]), [ ][
])([$4], [$3], [$2])])
m4_define([_AS_LITERAL_IF],
[m4_if(m4_index([$1], [@S|@]), [-1], [$0_(m4_translit([$1],
[-:=%/@{}[]#(),.$2]]]m4_dquote(m4_dquote(m4_defn([m4_cr_symbols2])))[[,
[++++++$$`````]))], [$0_NO])])
m4_define([_AS_LITERAL_IF_],
[m4_if(m4_translit([$1], [+]), [], [$0YES],
m4_translit([$1], [$]), [], [m4_default], [$0NO])])
m4_define([_AS_LITERAL_IF_YES], [$3])
m4_define([_AS_LITERAL_IF_NO], [$2])
# AS_LITERAL_WORD_IF(EXPRESSION, IF-LITERAL, IF-NOT-LITERAL,
# [IF-SIMPLE-REF = IF-NOT-LITERAL])
# ----------------------------------------------------------
# Like AS_LITERAL_IF, except that spaces and tabs in EXPRESSION
# are treated as non-literal.
m4_define([AS_LITERAL_WORD_IF],
[_AS_LITERAL_IF(m4_expand([$1]))([$4], [$3], [$2])])
# AS_LITERAL_HEREDOC_IF(EXPRESSION, IF-LITERAL, IF-NOT-LITERAL)
# -------------------------------------------------------------
# Like AS_LITERAL_IF, except that a string is considered literal
# if it results in the same output in both quoted and unquoted
# here-documents.
m4_define([AS_LITERAL_HEREDOC_IF],
[_$0(m4_expand([$1]))([$2], [$3])])
m4_define([_AS_LITERAL_HEREDOC_IF],
[m4_if(m4_index([$1], [@S|@]), [-1],
[m4_if(m4_index(m4_translit([[$1]], [\`], [$]), [$]), [-1],
[$0_YES], [$0_NO])],
[$0_NO])])
m4_define([_AS_LITERAL_HEREDOC_IF_YES], [$1])
m4_define([_AS_LITERAL_HEREDOC_IF_NO], [$2])
# AS_TMPDIR(PREFIX, [DIRECTORY = $TMPDIR [= /tmp]])
# -------------------------------------------------
# Create as safely as possible a temporary directory in DIRECTORY
# which name is inspired by PREFIX (should be 2-4 chars max).
#
# Even though $tmp does not fit our normal naming scheme of $as_*,
# it is a documented part of the public API and must not be changed.
m4_define([AS_TMPDIR],
[# Create a (secure) tmp directory for tmp files.
m4_if([$2], [], [: "${TMPDIR:=/tmp}"])
{
tmp=`(umask 077 && mktemp -d "m4_default([$2],
[$TMPDIR])/$1XXXXXX") 2>/dev/null` &&
test -d "$tmp"
} ||
{
tmp=m4_default([$2], [$TMPDIR])/$1$$-$RANDOM
(umask 077 && mkdir "$tmp")
} || AS_ERROR([cannot create a temporary directory in m4_default([$2],
[$TMPDIR])])])# AS_TMPDIR
# AS_UNAME
# --------
# Try to describe this machine. Meant for logs.
m4_define([AS_UNAME],
[{
cat <<_ASUNAME
m4_text_box([Platform.])
hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
_ASUNAME
_AS_PATH_WALK([$PATH], [AS_ECHO(["PATH: $as_dir"])])
}])
# _AS_VERSION_COMPARE_PREPARE
# ---------------------------
# Output variables for comparing version numbers.
m4_defun([_AS_VERSION_COMPARE_PREPARE],
[[as_awk_strverscmp='
# Use only awk features that work with 7th edition Unix awk (1978).
# My, what an old awk you have, Mr. Solaris!
END {
while (length(v1) && length(v2)) {
# Set d1 to be the next thing to compare from v1, and likewise for d2.
# Normally this is a single character, but if v1 and v2 contain digits,
# compare them as integers and fractions as strverscmp does.
if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) {
# Split v1 and v2 into their leading digit string components d1 and d2,
# and advance v1 and v2 past the leading digit strings.
for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue
for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue
d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1)
d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1)
if (d1 ~ /^0/) {
if (d2 ~ /^0/) {
# Compare two fractions.
while (d1 ~ /^0/ && d2 ~ /^0/) {
d1 = substr(d1, 2); len1--
d2 = substr(d2, 2); len2--
}
if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) {
# The two components differ in length, and the common prefix
# contains only leading zeros. Consider the longer to be less.
d1 = -len1
d2 = -len2
} else {
# Otherwise, compare as strings.
d1 = "x" d1
d2 = "x" d2
}
} else {
# A fraction is less than an integer.
exit 1
}
} else {
if (d2 ~ /^0/) {
# An integer is greater than a fraction.
exit 2
} else {
# Compare two integers.
d1 += 0
d2 += 0
}
}
} else {
# The normal case, without worrying about digits.
d1 = substr(v1, 1, 1); v1 = substr(v1, 2)
d2 = substr(v2, 1, 1); v2 = substr(v2, 2)
}
if (d1 < d2) exit 1
if (d1 > d2) exit 2
}
# Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10),
# which mishandles some comparisons of empty strings to integers.
if (length(v2)) exit 1
if (length(v1)) exit 2
}
']])# _AS_VERSION_COMPARE_PREPARE
# AS_VERSION_COMPARE(VERSION-1, VERSION-2,
# [ACTION-IF-LESS], [ACTION-IF-EQUAL], [ACTION-IF-GREATER])
# ----------------------------------------------------------------------------
# Compare two strings possibly containing shell variables as version strings.
#
# This usage is portable even to ancient awk,
# so don't worry about finding a "nice" awk version.
m4_defun_init([AS_VERSION_COMPARE],
[AS_REQUIRE([_$0_PREPARE])],
[as_arg_v1=$1
as_arg_v2=$2
awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
AS_CASE([$?],
[1], [$3],
[0], [$4],
[2], [$5])])# AS_VERSION_COMPARE
## --------------------------------------- ##
## 6. Common m4/sh character translation. ##
## --------------------------------------- ##
# The point of this section is to provide high level macros comparable
# to m4's `translit' primitive, but m4/sh polymorphic.
# Transliteration of literal strings should be handled by m4, while
# shell variables' content will be translated at runtime (tr or sed).
# _AS_CR_PREPARE
# --------------
# Output variables defining common character ranges.
# See m4_cr_letters etc.
m4_defun([_AS_CR_PREPARE],
[# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
])
# _AS_TR_SH_PREPARE
# -----------------
m4_defun([_AS_TR_SH_PREPARE],
[AS_REQUIRE([_AS_CR_PREPARE])]dnl
[# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[[^_$as_cr_alnum]]%_%g'"
])
# AS_TR_SH(EXPRESSION)
# --------------------
# Transform EXPRESSION into a valid shell variable name.
# sh/m4 polymorphic.
# Be sure to update the definition of `$as_tr_sh' if you change this.
#
# AS_LITERAL_IF guarantees that a literal does not have any nested quotes,
# once $1 is expanded. m4_translit silently uses only the first occurrence
# of a character that appears multiple times in argument 2, since we know
# that m4_cr_not_symbols2 also contains [ and ]. m4_translit also silently
# ignores characters in argument 3 that do not match argument 2; we use this
# fact to skip worrying about the length of m4_cr_not_symbols2.
#
# For speed, we inline the literal definitions that can be computed up front.
m4_defun_init([AS_TR_SH],
[AS_REQUIRE([_$0_PREPARE])],
[_$0(m4_expand([$1]))])
m4_define([_AS_TR_SH],
[_AS_LITERAL_IF([$1], [*][ ][
])([], [$0_INDIR], [$0_LITERAL])([$1])])
m4_define([_AS_TR_SH_LITERAL],
[m4_translit([[$1]],
[*+[]]]m4_dquote(m4_defn([m4_cr_not_symbols2]))[,
[pp[]]]m4_dquote(m4_for(,1,255,,[[_]]))[)])
m4_define([_AS_TR_SH_INDIR],
[`AS_ECHO(["_AS_ESCAPE([[$1]], [`], [\])"]) | $as_tr_sh`])
# _AS_TR_CPP_PREPARE
# ------------------
m4_defun([_AS_TR_CPP_PREPARE],
[AS_REQUIRE([_AS_CR_PREPARE])]dnl
[# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[[^_$as_cr_alnum]]%_%g'"
])
# AS_TR_CPP(EXPRESSION)
# ---------------------
# Map EXPRESSION to an upper case string which is valid as rhs for a
# `#define'. sh/m4 polymorphic. Be sure to update the definition
# of `$as_tr_cpp' if you change this.
#
# See implementation comments in AS_TR_SH.
m4_defun_init([AS_TR_CPP],
[AS_REQUIRE([_$0_PREPARE])],
[_$0(m4_expand([$1]))])
m4_define([_AS_TR_CPP],
[_AS_LITERAL_IF([$1], [*][ ][
])([], [$0_INDIR], [$0_LITERAL])([$1])])
m4_define([_AS_TR_CPP_LITERAL],
[m4_translit([[$1]],
[*[]]]m4_dquote(m4_defn([m4_cr_letters])m4_defn([m4_cr_not_symbols2]))[,
[P[]]]m4_dquote(m4_defn([m4_cr_LETTERS])m4_for(,1,255,,[[_]]))[)])
m4_define([_AS_TR_CPP_INDIR],
[`AS_ECHO(["_AS_ESCAPE([[$1]], [`], [\])"]) | $as_tr_cpp`])
# _AS_TR_PREPARE
# --------------
m4_defun([_AS_TR_PREPARE],
[AS_REQUIRE([_AS_TR_SH_PREPARE])AS_REQUIRE([_AS_TR_CPP_PREPARE])])
## ------------------------------------------------------ ##
## 7. Common m4/sh handling of variables (indirections). ##
## ------------------------------------------------------ ##
# The purpose of this section is to provide a uniform API for
# reading/setting sh variables with or without indirection.
# Typically, one can write
# AS_VAR_SET(var, val)
# or
# AS_VAR_SET(as_$var, val)
# and expect the right thing to happen. In the descriptions below,
# a literal name matches the regex [a-zA-Z_][a-zA-Z0-9_]*, an
# indirect name is a shell expression that produces a literal name
# when passed through eval, and a polymorphic name is either type.
# _AS_VAR_APPEND_PREPARE
# ----------------------
# Define as_fn_append to the optimum definition for the current
# shell (bash and zsh provide the += assignment operator to avoid
# quadratic append growth over repeated appends).
m4_defun([_AS_VAR_APPEND_PREPARE],
[AS_FUNCTION_DESCRIBE([as_fn_append], [VAR VALUE],
[Append the text in VALUE to the end of the definition contained in
VAR. Take advantage of any shell optimizations that allow amortized
linear growth over repeated appends, instead of the typical quadratic
growth present in naive implementations.])
AS_IF([_AS_RUN(["AS_ESCAPE(m4_quote(_AS_VAR_APPEND_WORKS))"])],
[eval 'as_fn_append ()
{
eval $[]1+=\$[]2
}'],
[as_fn_append ()
{
eval $[]1=\$$[]1\$[]2
}]) # as_fn_append
])
# _AS_VAR_APPEND_WORKS
# --------------------
# Output a shell test to discover whether += works.
m4_define([_AS_VAR_APPEND_WORKS],
[as_var=1; as_var+=2; test x$as_var = x12])
# AS_VAR_APPEND(VAR, VALUE)
# -------------------------
# Append the shell expansion of VALUE to the end of the existing
# contents of the polymorphic shell variable VAR, taking advantage of
# any shell optimizations that allow repeated appends to result in
# amortized linear scaling rather than quadratic behavior. This macro
# is not worth the overhead unless the expected final size of the
# contents of VAR outweigh the typical VALUE size of repeated appends.
# Note that unlike AS_VAR_SET, VALUE must be properly quoted to avoid
# field splitting and file name expansion.
m4_defun_init([AS_VAR_APPEND],
[AS_REQUIRE([_AS_VAR_APPEND_PREPARE], [], [M4SH-INIT-FN])],
[as_fn_append $1 $2])
# _AS_VAR_ARITH_PREPARE
# ---------------------
# Define as_fn_arith to the optimum definition for the current
# shell (using POSIX $(()) where supported).
m4_defun([_AS_VAR_ARITH_PREPARE],
[AS_FUNCTION_DESCRIBE([as_fn_arith], [ARG...],
[Perform arithmetic evaluation on the ARGs, and store the result in
the global $as_val. Take advantage of shells that can avoid forks.
The arguments must be portable across $(()) and expr.])
AS_IF([_AS_RUN(["AS_ESCAPE(m4_quote(_AS_VAR_ARITH_WORKS))"])],
[eval 'as_fn_arith ()
{
as_val=$(( $[]* ))
}'],
[as_fn_arith ()
{
as_val=`expr "$[]@" || test $? -eq 1`
}]) # as_fn_arith
])
# _AS_VAR_ARITH_WORKS
# -------------------
# Output a shell test to discover whether $(()) works.
m4_define([_AS_VAR_ARITH_WORKS],
[test $(( 1 + 1 )) = 2])
# AS_VAR_ARITH(VAR, EXPR)
# -----------------------
# Perform the arithmetic evaluation of the arguments in EXPR, and set
# contents of the polymorphic shell variable VAR to the result, taking
# advantage of any shell optimizations that perform arithmetic without
# forks. Note that numbers occurring within EXPR must be written in
# decimal, and without leading zeroes; variables containing numbers
# must be expanded prior to arithmetic evaluation; the first argument
# must not be a negative number; there is no portable equality
# operator; and operators must be given as separate arguments and
# properly quoted.
m4_defun_init([AS_VAR_ARITH],
[_AS_DETECT_SUGGESTED([_AS_VAR_ARITH_WORKS])]dnl
[AS_REQUIRE([_AS_VAR_ARITH_PREPARE], [], [M4SH-INIT-FN])],
[as_fn_arith $2 && AS_VAR_SET([$1], [$as_val])])
# AS_VAR_COPY(DEST, SOURCE)
# -------------------------
# Set the polymorphic shell variable DEST to the contents of the polymorphic
# shell variable SOURCE.
m4_define([AS_VAR_COPY],
[AS_LITERAL_WORD_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])])
# AS_VAR_GET(VARIABLE)
# --------------------
# Get the value of the shell VARIABLE.
# Evaluates to $VARIABLE if there is no indirection in VARIABLE,
# else to the appropriate `eval' sequence.
# This macro is deprecated because it sometimes mishandles trailing newlines;
# use AS_VAR_COPY instead.
m4_define([AS_VAR_GET],
[AS_LITERAL_WORD_IF([$1],
[$$1],
[`eval 'as_val=${'_AS_ESCAPE([[$1]], [`], [\])'};AS_ECHO(["$as_val"])'`])])
# AS_VAR_IF(VARIABLE, VALUE, IF-TRUE, IF-FALSE)
# ---------------------------------------------
# Implement a shell `if test $VARIABLE = VALUE; then-else'.
# Polymorphic, and avoids sh expansion error upon interrupt or term signal.
m4_define([AS_VAR_IF],
[AS_LITERAL_WORD_IF([$1],
[AS_IF(m4_ifval([$2], [[test "x$$1" = x[]$2]], [[${$1:+false} :]])],
[AS_VAR_COPY([as_val], [$1])
AS_IF(m4_ifval([$2], [[test "x$as_val" = x[]$2]], [[${as_val:+false} :]])],
[AS_IF(m4_ifval([$2],
[[eval test \"x\$"$1"\" = x"_AS_ESCAPE([$2], [`], [\"$])"]],
[[eval \${$1:+false} :]])]),
[$3], [$4])])
# AS_VAR_PUSHDEF and AS_VAR_POPDEF
# --------------------------------
#
# Sometimes we may have to handle literals (e.g. `stdlib.h'), while at
# other moments, the same code may have to get the value from a
# variable (e.g., `ac_header'). To have a uniform handling of both
# cases, when a new value is about to be processed, declare a local
# variable, e.g.:
#
# AS_VAR_PUSHDEF([header], [ac_cv_header_$1])
#
# and then in the body of the macro, use `header' as is. It is of
# first importance to use `AS_VAR_*' to access this variable.
#
# If the value `$1' was a literal (e.g. `stdlib.h'), then `header' is
# in fact the value `ac_cv_header_stdlib_h'. If `$1' was indirect,
# then `header's value in m4 is in fact `$as_header', the shell
# variable that holds all of the magic to get the expansion right.
#
# At the end of the block, free the variable with
#
# AS_VAR_POPDEF([header])
# AS_VAR_POPDEF(VARNAME)
# ----------------------
# Free the shell variable accessor VARNAME. To be dnl'ed.
m4_define([AS_VAR_POPDEF],
[m4_popdef([$1])])
# AS_VAR_PUSHDEF(VARNAME, VALUE)
# ------------------------------
# Define the m4 macro VARNAME to an accessor to the shell variable
# named VALUE. VALUE does not need to be a valid shell variable name:
# the transliteration is handled here. To be dnl'ed.
#
# AS_TR_SH attempts to play with diversions if _AS_TR_SH_PREPARE has
# not been expanded. However, users are expected to do subsequent
# calls that trigger AS_LITERAL_IF([VARNAME]), and that macro performs
# expansion inside an argument collection context, where diversions
# don't work. Therefore, we must require the preparation ourselves.
m4_defun_init([AS_VAR_PUSHDEF],
[AS_REQUIRE([_AS_TR_SH_PREPARE])],
[_$0([$1], m4_expand([$2]))])
m4_define([_AS_VAR_PUSHDEF],
[_AS_LITERAL_IF([$2], [ ][
])([], [as_$1=_AS_TR_SH_INDIR([$2])
m4_pushdef([$1], [$as_[$1]])],
[m4_pushdef([$1], [_AS_TR_SH_LITERAL([$2])])])])
# AS_VAR_SET(VARIABLE, VALUE)
# ---------------------------
# Set the contents of the polymorphic shell VARIABLE to the shell
# expansion of VALUE. VALUE is immune to field splitting and file
# name expansion.
m4_define([AS_VAR_SET],
[AS_LITERAL_WORD_IF([$1],
[$1=$2],
[eval "$1=_AS_ESCAPE([$2], [`], [\"$])"])])
# AS_VAR_SET_IF(VARIABLE, IF-TRUE, IF-FALSE)
# ------------------------------------------
# Implement a shell `if-then-else' depending whether VARIABLE is set
# or not. Polymorphic.
m4_define([AS_VAR_SET_IF],
[AS_IF([AS_VAR_TEST_SET([$1])], [$2], [$3])])
# AS_VAR_TEST_SET(VARIABLE)
# -------------------------
# Expands into an expression which is true if VARIABLE
# is set. Polymorphic.
m4_define([AS_VAR_TEST_SET],
[AS_LITERAL_WORD_IF([$1],
[${$1+:} false],
[{ as_var=$1; eval \${$as_var+:} false; }],
[eval \${$1+:} false])])
## -------------------- ##
## 8. Setting M4sh up. ##
## -------------------- ##
# AS_INIT_GENERATED(FILE, [COMMENT])
# ----------------------------------
# Generate a child script FILE with all initialization necessary to
# reuse the environment learned by the parent script, and make the
# file executable. If COMMENT is supplied, it is inserted after the
# `#!' sequence but before initialization text begins. After this
# macro, additional text can be appended to FILE to form the body of
# the child script. The macro ends with non-zero status if the
# file could not be fully written (such as if the disk is full).
m4_defun([AS_INIT_GENERATED],
[m4_require([AS_PREPARE])]dnl
[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
[as_write_fail=0
cat >$1 <<_ASEOF || as_write_fail=1
#! $SHELL
# Generated by $as_me.
$2
SHELL=\${CONFIG_SHELL-$SHELL}
export SHELL
_ASEOF
cat >>$1 <<\_ASEOF || as_write_fail=1
_AS_SHELL_SANITIZE
_AS_PREPARE
m4_if(AS_MESSAGE_FD, [1], [], [exec AS_MESSAGE_FD>&1
])]dnl
[m4_text_box([Main body of $1 script.])
_ASEOF
test $as_write_fail = 0 && chmod +x $1[]dnl
_m4_popdef([AS_MESSAGE_LOG_FD])])# AS_INIT_GENERATED
# AS_INIT
# -------
# Initialize m4sh.
m4_define([AS_INIT],
[# Wrap our cleanup prior to m4sugar's cleanup.
m4_wrap([_AS_CLEANUP])
m4_init
m4_provide([AS_INIT])
# Forbidden tokens and exceptions.
m4_pattern_forbid([^_?AS_])
# Bangshe and minimal initialization.
m4_divert_text([BINSH], [@%:@! /bin/sh])
m4_divert_text([HEADER-COMMENT],
[@%:@ Generated from __file__ by m4_PACKAGE_STRING.])
m4_divert_text([M4SH-SANITIZE], [_AS_SHELL_SANITIZE])
m4_divert_text([M4SH-INIT-FN], [m4_text_box([M4sh Shell Functions.])])
# Let's go!
m4_divert([BODY])dnl
m4_text_box([Main body of script.])
_AS_DETECT_REQUIRED([_AS_SHELL_FN_WORK])dnl
_AS_DETECT_REQUIRED([_AS_TEST_X_WORKS])dnl
AS_REQUIRE([_AS_UNSET_PREPARE], [], [M4SH-INIT-FN])dnl
])
070701000679ae000081a400000000000000000000000153b4ffc2000039a2000000b500010002ffffffffffffffff0000003100000000root/usr/local/share/autoconf/m4sugar/foreach.m4 # -*- Autoconf -*-
# This file is part of Autoconf.
# foreach-based replacements for recursive functions.
# Speeds up GNU M4 1.4.x by avoiding quadratic $@ recursion, but penalizes
# GNU M4 1.6 by requiring more memory and macro expansions.
#
# Copyright (C) 2008-2012 Free Software Foundation, Inc.
# This file is part of Autoconf. This program is free
# software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# Under Section 7 of GPL version 3, you are granted additional
# permissions described in the Autoconf Configure Script Exception,
# version 3.0, as published by the Free Software Foundation.
#
# You should have received a copy of the GNU General Public License
# and a copy of the Autoconf Configure Script Exception along with
# this program; see the files COPYINGv3 and COPYING.EXCEPTION
# respectively. If not, see .
# Written by Eric Blake.
# In M4 1.4.x, every byte of $@ is rescanned. This means that an
# algorithm on n arguments that recurses with one less argument each
# iteration will scan n * (n + 1) / 2 arguments, for O(n^2) time. In
# M4 1.6, this was fixed so that $@ is only scanned once, then
# back-references are made to information stored about the scan.
# Thus, n iterations need only scan n arguments, for O(n) time.
# Additionally, in M4 1.4.x, recursive algorithms did not clean up
# memory very well, requiring O(n^2) memory rather than O(n) for n
# iterations.
#
# This file is designed to overcome the quadratic nature of $@
# recursion by writing a variant of m4_foreach that uses m4_for rather
# than $@ recursion to operate on the list. This involves more macro
# expansions, but avoids the need to rescan a quadratic number of
# arguments, making these replacements very attractive for M4 1.4.x.
# On the other hand, in any version of M4, expanding additional macros
# costs additional time; therefore, in M4 1.6, where $@ recursion uses
# fewer macros, these replacements actually pessimize performance.
# Additionally, the use of $10 to mean the tenth argument violates
# POSIX; although all versions of m4 1.4.x support this meaning, a
# future m4 version may switch to take it as the first argument
# concatenated with a literal 0, so the implementations in this file
# are not future-proof. Thus, this file is conditionally included as
# part of m4_init(), only when it is detected that M4 probably has
# quadratic behavior (ie. it lacks the macro __m4_version__).
#
# Please keep this file in sync with m4sugar.m4.
# _m4_foreach(PRE, POST, IGNORED, ARG...)
# ---------------------------------------
# Form the common basis of the m4_foreach and m4_map macros. For each
# ARG, expand PRE[ARG]POST[]. The IGNORED argument makes recursion
# easier, and must be supplied rather than implicit.
#
# This version minimizes the number of times that $@ is evaluated by
# using m4_for to generate a boilerplate into _m4_f then passing $@ to
# that temporary macro. Thus, the recursion is done in m4_for without
# reparsing any user input, and is not quadratic. For an idea of how
# this works, note that m4_foreach(i,[1,2],[i]) calls
# _m4_foreach([m4_define([i],],[)i],[],[1],[2])
# which defines _m4_f:
# $1[$4]$2[]$1[$5]$2[]_m4_popdef([_m4_f])
# then calls _m4_f([m4_define([i],],[)i],[],[1],[2]) for a net result:
# m4_define([i],[1])i[]m4_define([i],[2])i[]_m4_popdef([_m4_f]).
m4_define([_m4_foreach],
[m4_if([$#], [3], [],
[m4_pushdef([_m4_f], _m4_for([4], [$#], [1],
[$0_([1], [2],], [)])[_m4_popdef([_m4_f])])_m4_f($@)])])
m4_define([_m4_foreach_],
[[$$1[$$3]$$2[]]])
# m4_case(SWITCH, VAL1, IF-VAL1, VAL2, IF-VAL2, ..., DEFAULT)
# -----------------------------------------------------------
# Find the first VAL that SWITCH matches, and expand the corresponding
# IF-VAL. If there are no matches, expand DEFAULT.
#
# Use m4_for to create a temporary macro in terms of a boilerplate
# m4_if with final cleanup. If $# is even, we have DEFAULT; if it is
# odd, then rounding the last $# up in the temporary macro is
# harmless. For example, both m4_case(1,2,3,4,5) and
# m4_case(1,2,3,4,5,6) result in the intermediate _m4_case being
# m4_if([$1],[$2],[$3],[$1],[$4],[$5],_m4_popdef([_m4_case])[$6])
m4_define([m4_case],
[m4_if(m4_eval([$# <= 2]), [1], [$2],
[m4_pushdef([_$0], [m4_if(]_m4_for([2], m4_eval([($# - 1) / 2 * 2]), [2],
[_$0_(], [)])[_m4_popdef(
[_$0])]m4_dquote($m4_eval([($# + 1) & ~1]))[)])_$0($@)])])
m4_define([_m4_case_],
[$0_([1], [$1], m4_incr([$1]))])
m4_define([_m4_case__],
[[[$$1],[$$2],[$$3],]])
# m4_bmatch(SWITCH, RE1, VAL1, RE2, VAL2, ..., DEFAULT)
# -----------------------------------------------------
# m4 equivalent of
#
# if (SWITCH =~ RE1)
# VAL1;
# elif (SWITCH =~ RE2)
# VAL2;
# elif ...
# ...
# else
# DEFAULT
#
# We build the temporary macro _m4_b:
# m4_define([_m4_b], _m4_defn([_m4_bmatch]))_m4_b([$1], [$2], [$3])...
# _m4_b([$1], [$m-1], [$m])_m4_b([], [], [$m+1]_m4_popdef([_m4_b]))
# then invoke m4_unquote(_m4_b($@)), for concatenation with later text.
m4_define([m4_bmatch],
[m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])],
[$#], 1, [m4_fatal([$0: too few arguments: $#: $1])],
[$#], 2, [$2],
[m4_pushdef([_m4_b], [m4_define([_m4_b],
_m4_defn([_$0]))]_m4_for([3], m4_eval([($# + 1) / 2 * 2 - 1]),
[2], [_$0_(], [)])[_m4_b([], [],]m4_dquote([$]m4_eval(
[($# + 1) / 2 * 2]))[_m4_popdef([_m4_b]))])m4_unquote(_m4_b($@))])])
m4_define([_m4_bmatch],
[m4_if(m4_bregexp([$1], [$2]), [-1], [], [[$3]m4_define([$0])])])
m4_define([_m4_bmatch_],
[$0_([1], m4_decr([$1]), [$1])])
m4_define([_m4_bmatch__],
[[_m4_b([$$1], [$$2], [$$3])]])
# m4_cond(TEST1, VAL1, IF-VAL1, TEST2, VAL2, IF-VAL2, ..., [DEFAULT])
# -------------------------------------------------------------------
# Similar to m4_if, except that each TEST is expanded when encountered.
# If the expansion of TESTn matches the string VALn, the result is IF-VALn.
# The result is DEFAULT if no tests passed. This macro allows
# short-circuiting of expensive tests, where it pays to arrange quick
# filter tests to run first.
#
# m4_cond already guarantees either 3*n or 3*n + 1 arguments, 1 <= n.
# We only have to speed up _m4_cond, by building the temporary _m4_c:
# m4_define([_m4_c], _m4_defn([m4_unquote]))_m4_c([m4_if(($1), [($2)],
# [[$3]m4_define([_m4_c])])])_m4_c([m4_if(($4), [($5)],
# [[$6]m4_define([_m4_c])])])..._m4_c([m4_if(($m-2), [($m-1)],
# [[$m]m4_define([_m4_c])])])_m4_c([[$m+1]]_m4_popdef([_m4_c]))
# We invoke m4_unquote(_m4_c($@)), for concatenation with later text.
m4_define([_m4_cond],
[m4_pushdef([_m4_c], [m4_define([_m4_c],
_m4_defn([m4_unquote]))]_m4_for([2], m4_eval([$# / 3 * 3 - 1]), [3],
[$0_(], [)])[_m4_c(]m4_dquote(m4_dquote(
[$]m4_eval([$# / 3 * 3 + 1])))[_m4_popdef([_m4_c]))])m4_unquote(_m4_c($@))])
m4_define([_m4_cond_],
[$0_(m4_decr([$1]), [$1], m4_incr([$1]))])
m4_define([_m4_cond__],
[[_m4_c([m4_if(($$1), [($$2)], [[$$3]m4_define([_m4_c])])])]])
# m4_bpatsubsts(STRING, RE1, SUBST1, RE2, SUBST2, ...)
# ----------------------------------------------------
# m4 equivalent of
#
# $_ = STRING;
# s/RE1/SUBST1/g;
# s/RE2/SUBST2/g;
# ...
#
# m4_bpatsubsts already validated an odd number of arguments; we only
# need to speed up _m4_bpatsubsts. To avoid nesting, we build the
# temporary _m4_p:
# m4_define([_m4_p], [$1])m4_define([_m4_p],
# m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$2], [$3]))m4_define([_m4_p],
# m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$4], [$5]))m4_define([_m4_p],...
# m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$m-1], [$m]))m4_unquote(
# _m4_defn([_m4_p])_m4_popdef([_m4_p]))
m4_define([_m4_bpatsubsts],
[m4_pushdef([_m4_p], [m4_define([_m4_p],
]m4_dquote([$]1)[)]_m4_for([3], [$#], [2], [$0_(],
[)])[m4_unquote(_m4_defn([_m4_p])_m4_popdef([_m4_p]))])_m4_p($@)])
m4_define([_m4_bpatsubsts_],
[$0_(m4_decr([$1]), [$1])])
m4_define([_m4_bpatsubsts__],
[[m4_define([_m4_p],
m4_bpatsubst(m4_dquote(_m4_defn([_m4_p])), [$$1], [$$2]))]])
# m4_shiftn(N, ...)
# -----------------
# Returns ... shifted N times. Useful for recursive "varargs" constructs.
#
# m4_shiftn already validated arguments; we only need to speed up
# _m4_shiftn. If N is 3, then we build the temporary _m4_s, defined as
# ,[$5],[$6],...,[$m]_m4_popdef([_m4_s])
# before calling m4_shift(_m4_s($@)).
m4_define([_m4_shiftn],
[m4_if(m4_incr([$1]), [$#], [], [m4_pushdef([_m4_s],
_m4_for(m4_eval([$1 + 2]), [$#], [1],
[[,]m4_dquote($], [)])[_m4_popdef([_m4_s])])m4_shift(_m4_s($@))])])
# m4_do(STRING, ...)
# ------------------
# This macro invokes all its arguments (in sequence, of course). It is
# useful for making your macros more structured and readable by dropping
# unnecessary dnl's and have the macros indented properly.
#
# Here, we use the temporary macro _m4_do, defined as
# $1[]$2[]...[]$n[]_m4_popdef([_m4_do])
m4_define([m4_do],
[m4_if([$#], [0], [],
[m4_pushdef([_$0], _m4_for([1], [$#], [1],
[$], [[[]]])[_m4_popdef([_$0])])_$0($@)])])
# m4_dquote_elt(ARGS)
# -------------------
# Return ARGS as an unquoted list of double-quoted arguments.
#
# _m4_foreach to the rescue.
m4_define([m4_dquote_elt],
[m4_if([$#], [0], [], [[[$1]]_m4_foreach([,m4_dquote(], [)], $@)])])
# m4_reverse(ARGS)
# ----------------
# Output ARGS in reverse order.
#
# Invoke _m4_r($@) with the temporary _m4_r built as
# [$m], [$m-1], ..., [$2], [$1]_m4_popdef([_m4_r])
m4_define([m4_reverse],
[m4_if([$#], [0], [], [$#], [1], [[$1]],
[m4_pushdef([_m4_r], [[$$#]]_m4_for(m4_decr([$#]), [1], [-1],
[[, ]m4_dquote($], [)])[_m4_popdef([_m4_r])])_m4_r($@)])])
# m4_map_args_pair(EXPRESSION, [END-EXPR = EXPRESSION], ARG...)
# -------------------------------------------------------------
# Perform a pairwise grouping of consecutive ARGs, by expanding
# EXPRESSION([ARG1], [ARG2]). If there are an odd number of ARGs, the
# final argument is expanded with END-EXPR([ARGn]).
#
# Build the temporary macro _m4_map_args_pair, with the $2([$m+1])
# only output if $# is odd:
# $1([$3], [$4])[]$1([$5], [$6])[]...$1([$m-1],
# [$m])[]m4_default([$2], [$1])([$m+1])[]_m4_popdef([_m4_map_args_pair])
m4_define([m4_map_args_pair],
[m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
[$#], [1], [m4_fatal([$0: too few arguments: $#: $1])],
[$#], [2], [],
[$#], [3], [m4_default([$2], [$1])([$3])[]],
[m4_pushdef([_$0], _m4_for([3],
m4_eval([$# / 2 * 2 - 1]), [2], [_$0_(], [)])_$0_end(
[1], [2], [$#])[_m4_popdef([_$0])])_$0($@)])])
m4_define([_m4_map_args_pair_],
[$0_([1], [$1], m4_incr([$1]))])
m4_define([_m4_map_args_pair__],
[[$$1([$$2], [$$3])[]]])
m4_define([_m4_map_args_pair_end],
[m4_if(m4_eval([$3 & 1]), [1], [[m4_default([$$2], [$$1])([$$3])[]]])])
# m4_join(SEP, ARG1, ARG2...)
# ---------------------------
# Produce ARG1SEPARG2...SEPARGn. Avoid back-to-back SEP when a given ARG
# is the empty string. No expansion is performed on SEP or ARGs.
#
# Use a self-modifying separator, since we don't know how many
# arguments might be skipped before a separator is first printed, but
# be careful if the separator contains $. _m4_foreach to the rescue.
m4_define([m4_join],
[m4_pushdef([_m4_sep], [m4_define([_m4_sep], _m4_defn([m4_echo]))])]dnl
[_m4_foreach([_$0([$1],], [)], $@)_m4_popdef([_m4_sep])])
m4_define([_m4_join],
[m4_if([$2], [], [], [_m4_sep([$1])[$2]])])
# m4_joinall(SEP, ARG1, ARG2...)
# ------------------------------
# Produce ARG1SEPARG2...SEPARGn. An empty ARG results in back-to-back SEP.
# No expansion is performed on SEP or ARGs.
#
# A bit easier than m4_join. _m4_foreach to the rescue.
m4_define([m4_joinall],
[[$2]m4_if(m4_eval([$# <= 2]), [1], [],
[_m4_foreach([$1], [], m4_shift($@))])])
# m4_list_cmp(A, B)
# -----------------
# Compare the two lists of integer expressions A and B.
#
# m4_list_cmp takes care of any side effects; we only override
# _m4_list_cmp_raw, where we can safely expand lists multiple times.
# First, insert padding so that both lists are the same length; the
# trailing +0 is necessary to handle a missing list. Next, create a
# temporary macro to perform pairwise comparisons until an inequality
# is found. For example, m4_list_cmp([1], [1,2]) creates _m4_cmp as
# m4_if(m4_eval([($1) != ($3)]), [1], [m4_cmp([$1], [$3])],
# m4_eval([($2) != ($4)]), [1], [m4_cmp([$2], [$4])],
# [0]_m4_popdef([_m4_cmp]))
# then calls _m4_cmp([1+0], [0*2], [1], [2+0])
m4_define([_m4_list_cmp_raw],
[m4_if([$1], [$2], 0,
[_m4_list_cmp($1+0_m4_list_pad(m4_count($1), m4_count($2)),
$2+0_m4_list_pad(m4_count($2), m4_count($1)))])])
m4_define([_m4_list_pad],
[m4_if(m4_eval($1 < $2), [1],
[_m4_for(m4_incr([$1]), [$2], [1], [,0*])])])
m4_define([_m4_list_cmp],
[m4_pushdef([_m4_cmp], [m4_if(]_m4_for(
[1], m4_eval([$# >> 1]), [1], [$0_(], [,]m4_eval([$# >> 1])[)])[
[0]_m4_popdef([_m4_cmp]))])_m4_cmp($@)])
m4_define([_m4_list_cmp_],
[$0_([$1], m4_eval([$1 + $2]))])
m4_define([_m4_list_cmp__],
[[m4_eval([($$1) != ($$2)]), [1], [m4_cmp([$$1], [$$2])],
]])
# m4_max(EXPR, ...)
# m4_min(EXPR, ...)
# -----------------
# Return the decimal value of the maximum (or minimum) in a series of
# integer expressions.
#
# _m4_foreach to the rescue; we only need to replace _m4_minmax. Here,
# we need a temporary macro to track the best answer so far, so that
# the foreach expression is tractable.
m4_define([_m4_minmax],
[m4_pushdef([_m4_best], m4_eval([$2]))_m4_foreach(
[m4_define([_m4_best], $1(_m4_best,], [))], m4_shift($@))]dnl
[_m4_best[]_m4_popdef([_m4_best])])
# m4_set_add_all(SET, VALUE...)
# -----------------------------
# Add each VALUE into SET. This is O(n) in the number of VALUEs, and
# can be faster than calling m4_set_add for each VALUE.
#
# _m4_foreach to the rescue. If no deletions have occurred, then
# avoid the speed penalty of m4_set_add.
m4_define([m4_set_add_all],
[m4_if([$#], [0], [], [$#], [1], [],
[m4_define([_m4_set_size($1)], m4_eval(m4_set_size([$1])
+ m4_len(_m4_foreach(m4_ifdef([_m4_set_cleanup($1)],
[[m4_set_add]], [[_$0]])[([$1],], [)], $@))))])])
m4_define([_m4_set_add_all],
[m4_ifdef([_m4_set([$1],$2)], [],
[m4_define([_m4_set([$1],$2)],
[1])m4_pushdef([_m4_set([$1])], [$2])-])])
070701000679b3000081a400000000000000000000000153b4ffc20000020b000000b500010002ffffffffffffffff0000003100000000root/usr/local/share/autoconf/m4sugar/version.m4 # This file is part of -*- Autoconf -*-.
# Version of Autoconf.
# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2007, 2009
# Free Software Foundation, Inc.
m4_define([m4_PACKAGE_NAME], [GNU Autoconf])
m4_define([m4_PACKAGE_TARNAME], [autoconf])
m4_define([m4_PACKAGE_VERSION], [2.69])
m4_define([m4_PACKAGE_STRING], [GNU Autoconf 2.69])
m4_define([m4_PACKAGE_BUGREPORT], [bug-autoconf@gnu.org])
m4_define([m4_PACKAGE_URL], [http://www.gnu.org/software/autoconf/])
m4_define([m4_PACKAGE_YEAR], [2012])
070701000679a8000041ed00000000000000000000000253b5000600000000000000b500010002ffffffffffffffff0000002700000000root/usr/local/share/autoconf/autotest 070701000679a9000081a400000000000000000000000153b4ffc2000004bd000000b500010002ffffffffffffffff0000003300000000root/usr/local/share/autoconf/autotest/autotest.m4 # This file is part of Autoconf. -*- Autoconf -*-
# M4 macros used in building test suites.
# Copyright (C) 2000-2002, 2009-2012 Free Software Foundation, Inc.
# This file is part of Autoconf. This program is free
# software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# Under Section 7 of GPL version 3, you are granted additional
# permissions described in the Autoconf Configure Script Exception,
# version 3.0, as published by the Free Software Foundation.
#
# You should have received a copy of the GNU General Public License
# and a copy of the Autoconf Configure Script Exception along with
# this program; see the files COPYINGv3 and COPYING.EXCEPTION
# respectively. If not, see .
m4_include([autotest/general.m4])
m4_include([autotest/specific.m4])
070701000679ab000081a400000000000000000000000153b4ffc200011f91000000b500010002ffffffffffffffff0000003200000000root/usr/local/share/autoconf/autotest/general.m4 # This file is part of Autoconf. -*- Autoconf -*-
# M4 macros used in building test suites.
m4_define([_AT_COPYRIGHT_YEARS], [
Copyright (C) 2000-2012 Free Software Foundation, Inc.
])
# This file is part of Autoconf. This program is free
# software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# Under Section 7 of GPL version 3, you are granted additional
# permissions described in the Autoconf Configure Script Exception,
# version 3.0, as published by the Free Software Foundation.
#
# You should have received a copy of the GNU General Public License
# and a copy of the Autoconf Configure Script Exception along with
# this program; see the files COPYINGv3 and COPYING.EXCEPTION
# respectively. If not, see .
# _m4_divert(DIVERSION-NAME)
# --------------------------
# Convert a diversion name into its number. Otherwise, return
# DIVERSION-NAME which is supposed to be an actual diversion number.
# Of course it would be nicer to use m4_case here, instead of zillions
# of little macros, but it then takes twice longer to run `autoconf'!
#
# From M4sugar:
# -1. KILL
# 10000. GROW
#
# From M4sh:
# 0. BINSH
# 1. HEADER-REVISION
# 2. HEADER-COMMENT
# 3. HEADER-COPYRIGHT
# 4. M4SH-SANITIZE
# 5. M4SH-INIT
# 1000. BODY
#
# Defined below:
# - DEFAULTS
# Overall initialization, value of $at_groups_all.
# - PARSE_ARGS_BEGIN
# Setup defaults required for option processing.
# - PARSE_ARGS
# Option processing. After AT_INIT, user options can be entered here as
# cases of a case statement.
# - PARSE_ARGS_END
# Finish up the option processing.
#
# - HELP
# Start printing the help message.
# - HELP_MODES
# Modes help text. Additional modes can be appended as self-contained
# cat'd here-docs as generated by AS_HELP_STRING.
# - HELP_TUNING_BEGIN
# Tuning help text. This is for Autotest-provided text.
# - HELP_TUNING
# Additional tuning options' help text can be appended here as
# self-contained cat'd here-docs as generated by AS_HELP_STRING.
# - HELP_OTHER
# User help can be appended to this as self-contained cat'd here-docs.
# - HELP_END
# Finish up the help texts.
#
# - VERSION
# Head of the handling of --version.
# - VERSION_NOTICES
# Copyright notices for --version.
# - VERSION_END
# Tail of the handling of --version.
#
# - BANNERS
# Output shell initialization for the associative array of banner text.
# - TESTS_BEGIN
# Like DEFAULTS but run after argument processing for purposes of
# optimization. Do anything else that needs to be done to prepare for
# tests. Sets up verbose and log file descriptors. Sets and logs PATH.
# - PREPARE_TESTS
# Declares functions shared among the tests. Perform any user
# initialization to be shared among all tests.
# - TESTS
# The core of the test suite.
#
# - TEST_SCRIPT
# The collector for code for each test, the ``normal'' diversion, but
# undiverted into other locations before final output.
#
# - TEST_GROUPS
# Contents of each test group. The tests deliberately occur after the
# end of the shell script, so that the shell need not spend time parsing
# commands it will not execute.
m4_define([_m4_divert(DEFAULTS)], 100)
m4_define([_m4_divert(PARSE_ARGS_BEGIN)], 200)
m4_define([_m4_divert(PARSE_ARGS)], 201)
m4_define([_m4_divert(PARSE_ARGS_END)], 202)
m4_define([_m4_divert(HELP)], 300)
m4_define([_m4_divert(HELP_MODES)], 301)
m4_define([_m4_divert(HELP_TUNING_BEGIN)], 302)
m4_define([_m4_divert(HELP_TUNING)], 303)
m4_define([_m4_divert(HELP_OTHER)], 304)
m4_define([_m4_divert(HELP_END)], 305)
m4_define([_m4_divert(VERSION)], 350)
m4_define([_m4_divert(VERSION_NOTICES)], 351)
m4_define([_m4_divert(VERSION_END)], 352)
m4_define([_m4_divert(BANNERS)], 400)
m4_define([_m4_divert(TESTS_BEGIN)], 401)
m4_define([_m4_divert(PREPARE_TESTS)], 402)
m4_define([_m4_divert(TESTS)], 403)
m4_define([_m4_divert(TEST_SCRIPT)], 450)
m4_define([_m4_divert(TEST_GROUPS)], 500)
# AT_LINE
# -------
# Return the current file sans directory, a colon, and the current
# line. Be sure to return a _quoted_ file name, so if, for instance,
# the user is lunatic enough to have a file named `dnl' (and I, for
# one, love to be brainless and stubborn sometimes), then we return a
# quoted name.
#
# Gee, we can't use simply
#
# m4_bpatsubst(__file__, [^.*/\(.*\)], [[\1]])
#
# since then, since `dnl' doesn't match the pattern, it is returned
# with once quotation level less, so you lose! And since GNU M4
# is one of the biggest junk in the whole universe wrt regexp, don't
# even think about using `?' or `\?'. Bah, `*' will do.
# Pleeeeeeeease, Gary, provide us with dirname and ERE!
#
# M4 recompiles the regular expression for every m4_bpatsubst, but __file__
# rarely changes. Be fast - only compute the dirname when necessary; for
# autoconf alone, this shaves off several seconds in building testsuite.
m4_define([_AT_LINE_file])
m4_define([_AT_LINE_base])
m4_define([AT_LINE],
[m4_if(m4_defn([_AT_LINE_file]), __file__, [],
[m4_do([m4_define([_AT_LINE_file], __file__)],
[m4_define([_AT_LINE_base],
m4_bregexp(/__file__, [/\([^/]*\)$], [[\1]]))])])dnl
m4_defn([_AT_LINE_base]):__line__])
# _AT_LINE_ESCAPED
# ----------------
# Same as AT_LINE, but already escaped for the shell.
m4_define([_AT_LINE_ESCAPED], ["AS_ESCAPE(m4_dquote(AT_LINE))"])
# _AT_NORMALIZE_TEST_GROUP_NUMBER(SHELL-VAR)
# ------------------------------------------
# Normalize SHELL-VAR so that its value has the same number of digits as
# all the other test group numbers.
m4_define([_AT_NORMALIZE_TEST_GROUP_NUMBER],
[
eval 'while :; do
case $$1 in #(
'"$at_format"'*) break;;
esac
$1=0$$1
done'
])
# _AT_DEFINE_INIT(NAME, [DEFINITION])
# -----------------------------------
# Define macro NAME to die if invoked prior to AT_INIT, and to DEFINITION
# after AT_INIT.
m4_define([_AT_DEFINE_INIT],
[m4_define($@)m4_pushdef([$1], [m4_fatal([$1: missing AT_INIT detected])])dnl
m4_append([_AT_DEFINE_INIT_LIST], [[$1]], [,])])
# _AT_DEFINE_SETUP(NAME, [DEFINITION])
# ------------------------------------
# Define macro NAME to die if invoked outside AT_SETUP/AT_CLEANUP, and
# to DEFINITION otherwise.
m4_define([_AT_DEFINE_SETUP],
[m4_define([$1], [m4_ifndef([AT_ingroup],
[m4_fatal([$1: missing AT_SETUP detected])])$2])])
# AT_INIT([TESTSUITE-NAME])
# -------------------------
# Begin test suite.
m4_define([AT_INIT],
[m4_pushdef([AT_INIT], [m4_fatal([$0: invoked multiple times])])]
[m4_pattern_forbid([^_?AT_])]
[m4_pattern_allow([^_ATEOF$])]
[m4_ifndef([AT_PACKAGE_BUGREPORT], [m4_fatal(
[$1: AT_PACKAGE_BUGREPORT is missing, consider writing package.m4])])]
[m4_define([AT_TESTSUITE_NAME],
m4_defn([AT_PACKAGE_STRING])[ test suite]m4_ifval([$1],
[m4_expand([: $1])]))]
[m4_define([AT_ordinal], 0)]
[m4_define([AT_banner_ordinal], 0)]
[m4_define([AT_help_all], [])]
[m4_map_args([_m4_popdef], _AT_DEFINE_INIT_LIST)]
[m4_wrap([_AT_FINISH])]
[AS_INIT[]]dnl
dnl We don't use m4sh's BODY diversion, but AS_INIT sticks a banner there.
dnl This trick removes that banner, since it adds nothing to autotest.
[m4_cleardivert([BODY])]dnl
[AS_ME_PREPARE[]]dnl
[m4_divert_push([DEFAULTS])]dnl
[AT_COPYRIGHT(m4_defn([_AT_COPYRIGHT_YEARS]), [
m4_copyright_condense])]
[AT_COPYRIGHT(
[This test suite is free software; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.], [m4_echo])]
[AS_PREPARE
SHELL=${CONFIG_SHELL-/bin/sh}
# How were we run?
at_cli_args="$[@]"
m4_divert_push([BANNERS])dnl
# Should we print banners? Yes if more than one test is run.
case $at_groups in #(
*$as_nl* )
at_print_banners=: ;; #(
* ) at_print_banners=false ;;
esac
# Text for banner N, set to a single space once printed.
m4_divert_pop([BANNERS])dnl back to DEFAULTS
m4_divert_push([PREPARE_TESTS])dnl
m4_text_box([Autotest shell functions.])
AS_FUNCTION_DESCRIBE([at_fn_banner], [NUMBER],
[Output banner NUMBER, provided the testsuite is running multiple groups
and this particular banner has not yet been printed.])
at_fn_banner ()
{
$at_print_banners || return 0
eval at_banner_text=\$at_banner_text_$[1]
test "x$at_banner_text" = "x " && return 0
eval "at_banner_text_$[1]=\" \""
if test -z "$at_banner_text"; then
$at_first || echo
else
AS_ECHO(["$as_nl$at_banner_text$as_nl"])
fi
} # at_fn_banner
AS_FUNCTION_DESCRIBE([at_fn_check_prepare_notrace], [REASON LINE],
[Perform AT_CHECK preparations for the command at LINE for an
untraceable command; REASON is the reason for disabling tracing.])
at_fn_check_prepare_notrace ()
{
$at_trace_echo "Not enabling shell tracing (command contains $[1])"
AS_ECHO(["$[2]"]) >"$at_check_line_file"
at_check_trace=: at_check_filter=:
: >"$at_stdout"; : >"$at_stderr"
}
AS_FUNCTION_DESCRIBE([at_fn_check_prepare_trace], [LINE],
[Perform AT_CHECK preparations for the command at LINE for a traceable
command.])
at_fn_check_prepare_trace ()
{
AS_ECHO(["$[1]"]) >"$at_check_line_file"
at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
: >"$at_stdout"; : >"$at_stderr"
}
AS_FUNCTION_DESCRIBE([at_fn_check_prepare_dynamic], [COMMAND LINE],
[Decide if COMMAND at LINE is traceable at runtime, and call the
appropriate preparation function.])
at_fn_check_prepare_dynamic ()
{
case $[1] in
*$as_nl*)
at_fn_check_prepare_notrace 'an embedded newline' "$[2]" ;;
*)
at_fn_check_prepare_trace "$[2]" ;;
esac
}
AS_FUNCTION_DESCRIBE([at_fn_filter_trace], [],
[Remove the lines in the file "$at_stderr" generated by "set -x" and print
them to stderr.])
at_fn_filter_trace ()
{
mv "$at_stderr" "$at_stder1"
grep '^ *+' "$at_stder1" >&2
grep -v '^ *+' "$at_stder1" >"$at_stderr"
}
AS_FUNCTION_DESCRIBE([at_fn_log_failure], [FILE-LIST],
[Copy the files in the list on stdout with a "> " prefix, and exit the shell
with a failure exit code.])
at_fn_log_failure ()
{
for file
do AS_ECHO(["$file:"]); sed 's/^/> /' "$file"; done
echo 1 > "$at_status_file"
exit 1
}
AS_FUNCTION_DESCRIBE([at_fn_check_skip], [EXIT-CODE LINE],
[Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
the test group subshell with that same exit code. Use LINE in any report
about test failure.])
at_fn_check_skip ()
{
case $[1] in
99) echo 99 > "$at_status_file"; at_failed=:
AS_ECHO(["$[2]: hard failure"]); exit 99;;
77) echo 77 > "$at_status_file"; exit 77;;
esac
}
AS_FUNCTION_DESCRIBE([at_fn_check_status], [EXPECTED EXIT-CODE LINE],
[Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
Otherwise, if it is 77 or 99, exit the test group subshell with that same
exit code; if it is anything else print an error message referring to LINE,
and fail the test.])
at_fn_check_status ()
{
dnl This order ensures that we don't `skip' if we are precisely checking
dnl $? = 77 or $? = 99.
case $[2] in
$[1] ) ;;
77) echo 77 > "$at_status_file"; exit 77;;
99) echo 99 > "$at_status_file"; at_failed=:
AS_ECHO(["$[3]: hard failure"]); exit 99;;
*) AS_ECHO(["$[3]: exit code was $[2], expected $[1]"])
at_failed=:;;
esac
}
AS_FUNCTION_DESCRIBE([at_fn_diff_devnull], [FILE],
[Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless
diff invocations.])
at_fn_diff_devnull ()
{
test -s "$[1]" || return 0
$at_diff "$at_devnull" "$[1]"
}
AS_FUNCTION_DESCRIBE([at_fn_test], [NUMBER],
[Parse out test NUMBER from the tail of this file.])
at_fn_test ()
{
eval at_sed=\$at_sed$[1]
sed "$at_sed" "$at_myself" > "$at_test_source"
}
AS_FUNCTION_DESCRIBE([at_fn_create_debugging_script], [],
[Create the debugging script $at_group_dir/run which will reproduce the
current test group.])
at_fn_create_debugging_script ()
{
{
echo "#! /bin/sh" &&
echo 'test "${ZSH_VERSION+set}" = set dnl
&& alias -g '\''${1+"$[@]"}'\''='\''"$[@]"'\''' &&
AS_ECHO(["cd '$at_dir'"]) &&
AS_ECHO(["exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d ]dnl
[$at_debug_args $at_group \${1+\"\$[@]\"}"]) &&
echo 'exit 1'
} >"$at_group_dir/run" &&
chmod +x "$at_group_dir/run"
}
m4_text_box([End of autotest shell functions.])
m4_divert_pop([PREPARE_TESTS])dnl back to DEFAULTS
# Not all shells have the 'times' builtin; the subshell is needed to make
# sure we discard the 'times: not found' message from the shell.
at_times_p=false
(times) >/dev/null 2>&1 && at_times_p=:
# CLI Arguments to pass to the debugging scripts.
at_debug_args=
# -e sets to true
at_errexit_p=false
# Shall we be verbose? ':' means no, empty means yes.
at_verbose=:
at_quiet=
# Running several jobs in parallel, 0 means as many as test groups.
at_jobs=1
at_traceon=:
at_trace_echo=:
at_check_filter_trace=:
# Shall we keep the debug scripts? Must be `:' when the suite is
# run by a debug script, so that the script doesn't remove itself.
at_debug_p=false
# Display help message?
at_help_p=false
# Display the version message?
at_version_p=false
# List test groups?
at_list_p=false
# --clean
at_clean=false
# Test groups to run
at_groups=
# Whether to rerun failed tests.
at_recheck=
# Whether a write failure occurred
at_write_fail=0
# The directory we run the suite in. Default to . if no -C option.
at_dir=`pwd`
# An absolute reference to this testsuite script.
dnl m4-double quote, to preserve []
[case $as_myself in
[\\/]* | ?:[\\/]* ) at_myself=$as_myself ;;
* ) at_myself=$at_dir/$as_myself ;;
esac]
# Whether -C is in effect.
at_change_dir=false
m4_divert_pop([DEFAULTS])dnl
m4_define([_AT_FINISH],
[m4_ifdef([AT_ingroup], [m4_fatal([missing AT_CLEANUP detected])])dnl
m4_divert_text([DEFAULTS],
[
# Whether to enable colored test results.
at_color=m4_ifdef([AT_color], [AT_color], [no])
# List of the tested programs.
at_tested='m4_ifdef([AT_tested],
[m4_translit(m4_dquote(m4_defn([AT_tested])), [ ], m4_newline)])'
# As many question marks as there are digits in the last test group number.
# Used to normalize the test group numbers so that `ls' lists them in
# numerical order.
at_format='m4_bpatsubst(m4_defn([AT_ordinal]), [.], [?])'
# Description of all the test groups.
at_help_all="AS_ESCAPE(m4_dquote(m4_defn([AT_help_all])))"
# List of the all the test groups.
at_groups_all=`AS_ECHO(["$at_help_all"]) | sed 's/;.*//'`
AS_FUNCTION_DESCRIBE([at_fn_validate_ranges], [NAME...],
[Validate and normalize the test group number contained in each
variable NAME. Leading zeroes are treated as decimal.])
at_fn_validate_ranges ()
{
for at_grp
do
eval at_value=\$$at_grp
if test $at_value -lt 1 || test $at_value -gt AT_ordinal; then
AS_ECHO(["invalid test group: $at_value"]) >&2
exit 1
fi
case $at_value in
0*) # We want to treat leading 0 as decimal, like expr and test, but
# AS_VAR_ARITH treats it as octal if it uses $(( )).
# With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
# expr fork, but it is not worth the effort to determine if the
# shell supports XSI when the user can just avoid leading 0.
eval $at_grp='`expr $at_value + 0`' ;;
esac
done
}])])dnl
m4_divert_push([PARSE_ARGS])dnl
at_prev=
for at_option
do
# If the previous option needs an argument, assign it.
if test -n "$at_prev"; then
at_option=$at_prev=$at_option
at_prev=
fi
case $at_option in
*=?*) at_optarg=`expr "X$at_option" : '[[^=]]*=\(.*\)'` ;;
*) at_optarg= ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
case $at_option in
--help | -h )
at_help_p=:
;;
--list | -l )
at_list_p=:
;;
--version | -V )
at_version_p=:
;;
--clean | -c )
at_clean=:
;;
--color )
at_color=always
;;
--color=* )
case $at_optarg in
no | never | none) at_color=never ;;
auto | tty | if-tty) at_color=auto ;;
always | yes | force) at_color=always ;;
*) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'`
AS_ERROR([unrecognized argument to $at_optname: $at_optarg]) ;;
esac
;;
--debug | -d )
at_debug_p=:
;;
--errexit | -e )
at_debug_p=:
at_errexit_p=:
;;
--verbose | -v )
at_verbose=; at_quiet=:
;;
--trace | -x )
at_traceon='set -x'
at_trace_echo=echo
at_check_filter_trace=at_fn_filter_trace
;;
[[0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9]])
at_fn_validate_ranges at_option
AS_VAR_APPEND([at_groups], ["$at_option$as_nl"])
;;
# Ranges
[[0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-])
at_range_start=`echo $at_option |tr -d X-`
at_fn_validate_ranges at_range_start
at_range=`AS_ECHO(["$at_groups_all"]) | \
sed -ne '/^'$at_range_start'$/,$p'`
AS_VAR_APPEND([at_groups], ["$at_range$as_nl"])
;;
[-[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9]])
at_range_end=`echo $at_option |tr -d X-`
at_fn_validate_ranges at_range_end
at_range=`AS_ECHO(["$at_groups_all"]) | \
sed -ne '1,/^'$at_range_end'$/p'`
AS_VAR_APPEND([at_groups], ["$at_range$as_nl"])
;;
[[0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9]] | \
[[0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9]] | \
[[0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9]] | \
[[0-9][0-9][0-9]-[0-9][0-9][0-9]] | \
[[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]] | \
[[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]] )
at_range_start=`expr $at_option : '\(.*\)-'`
at_range_end=`expr $at_option : '.*-\(.*\)'`
if test $at_range_start -gt $at_range_end; then
at_tmp=$at_range_end
at_range_end=$at_range_start
at_range_start=$at_tmp
fi
at_fn_validate_ranges at_range_start at_range_end
at_range=`AS_ECHO(["$at_groups_all"]) | \
sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'`
AS_VAR_APPEND([at_groups], ["$at_range$as_nl"])
;;
# Directory selection.
--directory | -C )
at_prev=--directory
;;
--directory=* )
at_change_dir=:
at_dir=$at_optarg
if test x- = "x$at_dir" ; then
at_dir=./-
fi
;;
# Parallel execution.
--jobs | -j )
at_jobs=0
;;
--jobs=* | -j[[0-9]]* )
if test -n "$at_optarg"; then
at_jobs=$at_optarg
else
at_jobs=`expr X$at_option : 'X-j\(.*\)'`
fi
case $at_jobs in *[[!0-9]]*)
at_optname=`echo " $at_option" | sed 's/^ //; s/[[0-9=]].*//'`
AS_ERROR([non-numeric argument to $at_optname: $at_jobs]) ;;
esac
;;
# Keywords.
--keywords | -k )
at_prev=--keywords
;;
--keywords=* )
at_groups_selected=$at_help_all
at_save_IFS=$IFS
IFS=,
set X $at_optarg
shift
IFS=$at_save_IFS
for at_keyword
do
at_invert=
case $at_keyword in
'!'*)
at_invert="-v"
at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
;;
esac
# It is on purpose that we match the test group titles too.
at_groups_selected=`AS_ECHO(["$at_groups_selected"]) |
grep -i $at_invert ["^[1-9][^;]*;.*[; ]$at_keyword[ ;]"]`
done
# Smash the keywords.
at_groups_selected=`AS_ECHO(["$at_groups_selected"]) | sed 's/;.*//'`
AS_VAR_APPEND([at_groups], ["$at_groups_selected$as_nl"])
;;
--recheck)
at_recheck=:
;;
m4_divert_pop([PARSE_ARGS])dnl
dnl Process *=* last to allow for user specified --option=* type arguments.
m4_divert_push([PARSE_ARGS_END])dnl
*=*)
at_envvar=`expr "x$at_option" : 'x\([[^=]]*\)='`
# Reject names that are not valid shell variable names.
case $at_envvar in
'' | [[0-9]]* | *[[!_$as_cr_alnum]]* )
AS_ERROR([invalid variable name: `$at_envvar']) ;;
esac
at_value=`AS_ECHO(["$at_optarg"]) | sed "s/'/'\\\\\\\\''/g"`
# Export now, but save eval for later and for debug scripts.
export $at_envvar
AS_VAR_APPEND([at_debug_args], [" $at_envvar='$at_value'"])
;;
*) AS_ECHO(["$as_me: invalid option: $at_option"]) >&2
AS_ECHO(["Try \`$[0] --help' for more information."]) >&2
exit 1
;;
esac
done
# Verify our last option didn't require an argument
AS_IF([test -n "$at_prev"], [AS_ERROR([`$at_prev' requires an argument])])
# The file containing the suite.
at_suite_log=$at_dir/$as_me.log
# Selected test groups.
if test -z "$at_groups$at_recheck"; then
at_groups=$at_groups_all
else
if test -n "$at_recheck" && test -r "$at_suite_log"; then
at_oldfails=`sed -n ['
/^Failed tests:$/,/^Skipped tests:$/{
s/^[ ]*\([1-9][0-9]*\):.*/\1/p
}
/^Unexpected passes:$/,/^## Detailed failed tests/{
s/^[ ]*\([1-9][0-9]*\):.*/\1/p
}
/^## Detailed failed tests/q
'] "$at_suite_log"`
AS_VAR_APPEND([at_groups], ["$at_oldfails$as_nl"])
fi
# Sort the tests, removing duplicates.
at_groups=`AS_ECHO(["$at_groups"]) | sort -nu | sed '/^$/d'`
fi
if test x"$at_color" = xalways \
|| { test x"$at_color" = xauto && test -t 1; }; then
at_red=`printf '\033@<:@0;31m'`
at_grn=`printf '\033@<:@0;32m'`
at_lgn=`printf '\033@<:@1;32m'`
at_blu=`printf '\033@<:@1;34m'`
at_std=`printf '\033@<:@m'`
else
at_red= at_grn= at_lgn= at_blu= at_std=
fi
m4_divert_pop([PARSE_ARGS_END])dnl
m4_divert_push([HELP])dnl
# Help message.
if $at_help_p; then
cat <<_ATEOF || at_write_fail=1
Usage: $[0] [[OPTION]... [VARIABLE=VALUE]... [TESTS]]
Run all the tests, or the selected TESTS, given by numeric ranges, and
save a detailed log file. Upon failure, create debugging scripts.
Do not change environment variables directly. Instead, set them via
command line arguments. Set \`AUTOTEST_PATH' to select the executables
to exercise. Each relative directory is expanded as build and source
directories relative to the top level of this distribution.
E.g., from within the build directory /tmp/foo-1.0, invoking this:
$ $[0] AUTOTEST_PATH=bin
is equivalent to the following, assuming the source directory is /src/foo-1.0:
PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $[0]
_ATEOF
m4_divert_pop([HELP])dnl
m4_divert_push([HELP_MODES])dnl
cat <<_ATEOF || at_write_fail=1
Operation modes:
-h, --help print the help message, then exit
-V, --version print version number, then exit
-c, --clean remove all the files this test suite might create and exit
-l, --list describes all the tests, or the selected TESTS
_ATEOF
m4_divert_pop([HELP_MODES])dnl
m4_wrap([m4_divert_push([HELP_TUNING_BEGIN])dnl
cat <<_ATEOF || at_write_fail=1
dnl extra quoting prevents emacs whitespace mode from putting tabs in output
Execution tuning:
-C, --directory=DIR
[ change to directory DIR before starting]
--color[[=never|auto|always]]
[ ]m4_ifdef([AT_color],
[disable colored test results, or enable even without terminal],
[enable colored test results on terminal, or always])
-j, --jobs[[=N]]
[ Allow N jobs at once; infinite jobs with no arg (default 1)]
-k, --keywords=KEYWORDS
[ select the tests matching all the comma-separated KEYWORDS]
[ multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD]
--recheck select all tests that failed or passed unexpectedly last time
-e, --errexit abort as soon as a test fails; implies --debug
-v, --verbose force more detailed output
[ default for debugging scripts]
-d, --debug inhibit clean up and top-level logging
[ default for debugging scripts]
-x, --trace enable tests shell tracing
_ATEOF
m4_divert_pop([HELP_TUNING_BEGIN])])dnl
m4_divert_push([HELP_END])dnl
cat <<_ATEOF || at_write_fail=1
Report bugs to .dnl
m4_ifdef([AT_PACKAGE_NAME],
[m4_ifset([AT_PACKAGE_URL], [
m4_defn([AT_PACKAGE_NAME]) home page: .])dnl
m4_if(m4_index(m4_defn([AT_PACKAGE_NAME]), [GNU ]), [0], [
General help using GNU software: .])])
_ATEOF
exit $at_write_fail
fi
# List of tests.
if $at_list_p; then
cat <<_ATEOF || at_write_fail=1
AT_TESTSUITE_NAME test groups:
NUM: FILE-NAME:LINE TEST-GROUP-NAME
KEYWORDS
_ATEOF
# Pass an empty line as separator between selected groups and help.
AS_ECHO(["$at_groups$as_nl$as_nl$at_help_all"]) |
awk 'NF == 1 && FS != ";" {
selected[[$ 1]] = 1
next
}
/^$/ { FS = ";" }
NF > 0 {
if (selected[[$ 1]]) {
printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
if ($ 4) {
lmax = 79
indent = " "
line = indent
len = length (line)
n = split ($ 4, a, " ")
for (i = 1; i <= n; i++) {
l = length (a[[i]]) + 1
if (i > 1 && len + l > lmax) {
print line
line = indent " " a[[i]]
len = length (line)
} else {
line = line " " a[[i]]
len += l
}
}
if (n)
print line
}
}
}' || at_write_fail=1
exit $at_write_fail
fi
m4_divert_pop([HELP_END])dnl
m4_divert_push([VERSION])dnl
if $at_version_p; then
AS_ECHO(["$as_me (AT_PACKAGE_STRING)"]) &&
cat <<\_ATEOF || at_write_fail=1
m4_divert_pop([VERSION])dnl
m4_divert_push([VERSION_END])dnl
_ATEOF
exit $at_write_fail
fi
m4_divert_pop([VERSION_END])dnl
m4_divert_push([TESTS_BEGIN])dnl
# Take any -C into account.
if $at_change_dir ; then
test x != "x$at_dir" && cd "$at_dir" \
|| AS_ERROR([unable to change directory])
at_dir=`pwd`
fi
# Load the config files for any default variable assignments.
for at_file in atconfig atlocal
do
test -r $at_file || continue
. ./$at_file || AS_ERROR([invalid content: $at_file])
done
# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
: "${at_top_build_prefix=$at_top_builddir}"
# Perform any assignments requested during argument parsing.
eval "$at_debug_args"
# atconfig delivers names relative to the directory the test suite is
# in, but the groups themselves are run in testsuite-dir/group-dir.
if test -n "$at_top_srcdir"; then
builddir=../..
for at_dir_var in srcdir top_srcdir top_build_prefix
do
AS_VAR_COPY([at_val], [at_$at_dir_var])
case $at_val in
[[\\/$]]* | ?:[[\\/]]* ) at_prefix= ;;
*) at_prefix=../../ ;;
esac
AS_VAR_SET([$at_dir_var], [$at_prefix$at_val])
done
fi
m4_text_box([Directory structure.])
# This is the set of directories and files used by this script
# (non-literals are capitalized):
#
# TESTSUITE - the testsuite
# TESTSUITE.log - summarizes the complete testsuite run
# TESTSUITE.dir/ - created during a run, remains after -d or failed test
# + at-groups/ - during a run: status of all groups in run
# | + NNN/ - during a run: meta-data about test group NNN
# | | + check-line - location (source file and line) of current AT_CHECK
# | | + status - exit status of current AT_CHECK
# | | + stdout - stdout of current AT_CHECK
# | | + stder1 - stderr, including trace
# | | + stderr - stderr, with trace filtered out
# | | + test-source - portion of testsuite that defines group
# | | + times - timestamps for computing duration
# | | + pass - created if group passed
# | | + xpass - created if group xpassed
# | | + fail - created if group failed
# | | + xfail - created if group xfailed
# | | + skip - created if group skipped
# + at-stop - during a run: end the run if this file exists
# + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
# + 0..NNN/ - created for each group NNN, remains after -d or failed test
# | + TESTSUITE.log - summarizes the group results
# | + ... - files created during the group
# The directory the whole suite works in.
# Should be absolute to let the user `cd' at will.
at_suite_dir=$at_dir/$as_me.dir
# The file containing the suite ($at_dir might have changed since earlier).
at_suite_log=$at_dir/$as_me.log
# The directory containing helper files per test group.
at_helper_dir=$at_suite_dir/at-groups
# Stop file: if it exists, do not start new jobs.
at_stop_file=$at_suite_dir/at-stop
# The fifo used for the job dispatcher.
at_job_fifo=$at_suite_dir/at-job-fifo
if $at_clean; then
test -d "$at_suite_dir" &&
find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
rm -f -r "$at_suite_dir" "$at_suite_log"
exit $?
fi
# Don't take risks: use only absolute directories in PATH.
#
# For stand-alone test suites (ie. atconfig was not found),
# AUTOTEST_PATH is relative to `.'.
#
# For embedded test suites, AUTOTEST_PATH is relative to the top level
# of the package. Then expand it into build/src parts, since users
# may create executables in both places.
AUTOTEST_PATH=`AS_ECHO(["$AUTOTEST_PATH"]) | sed "s|:|$PATH_SEPARATOR|g"`
at_path=
_AS_PATH_WALK([$AUTOTEST_PATH $PATH],
[test -n "$at_path" && AS_VAR_APPEND([at_path], [$PATH_SEPARATOR])
case $as_dir in
[[\\/]]* | ?:[[\\/]]* )
AS_VAR_APPEND([at_path], ["$as_dir"])
;;
* )
if test -z "$at_top_build_prefix"; then
# Stand-alone test suite.
AS_VAR_APPEND([at_path], ["$as_dir"])
else
# Embedded test suite.
AS_VAR_APPEND([at_path], ["$at_top_build_prefix$as_dir$PATH_SEPARATOR"])
AS_VAR_APPEND([at_path], ["$at_top_srcdir/$as_dir"])
fi
;;
esac])
# Now build and simplify PATH.
#
# There might be directories that don't exist, but don't redirect
# builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
at_new_path=
_AS_PATH_WALK([$at_path],
[test -d "$as_dir" || continue
case $as_dir in
[[\\/]]* | ?:[[\\/]]* ) ;;
* ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
esac
case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
*$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
$PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
*) AS_VAR_APPEND([at_new_path], ["$PATH_SEPARATOR$as_dir"]) ;;
esac])
PATH=$at_new_path
export PATH
# Setting up the FDs.
m4_define([AS_MESSAGE_LOG_FD], [5])
dnl The parent needs two fds to the same fifo, otherwise, there is a race
dnl where the parent can read the fifo before a child opens it for writing
m4_define([AT_JOB_FIFO_IN_FD], [6])
m4_define([AT_JOB_FIFO_OUT_FD], [7])
[#] AS_MESSAGE_LOG_FD is the log file. Not to be overwritten if `-d'.
if $at_debug_p; then
at_suite_log=/dev/null
else
: >"$at_suite_log"
fi
exec AS_MESSAGE_LOG_FD>>"$at_suite_log"
# Banners and logs.
AS_BOX(m4_defn([AT_TESTSUITE_NAME])[.])
{
AS_BOX(m4_defn([AT_TESTSUITE_NAME])[.])
echo
AS_ECHO(["$as_me: command line was:"])
AS_ECHO([" \$ $[0] $at_cli_args"])
echo
# If ChangeLog exists, list a few lines in case it might help determining
# the exact version.
if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then
AS_BOX([ChangeLog.])
echo
sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
echo
fi
AS_UNAME
echo
# Contents of the config files.
for at_file in atconfig atlocal
do
test -r $at_file || continue
AS_ECHO(["$as_me: $at_file:"])
sed 's/^/| /' $at_file
echo
done
} >&AS_MESSAGE_LOG_FD
m4_divert_pop([TESTS_BEGIN])dnl
m4_divert_push([PREPARE_TESTS])dnl
{
AS_BOX([Tested programs.])
echo
} >&AS_MESSAGE_LOG_FD
# Report what programs are being tested.
for at_program in : $at_tested
do
test "$at_program" = : && continue
case $at_program in
[[\\/]* | ?:[\\/]* ) $at_program_=$at_program ;;]
* )
_AS_PATH_WALK([$PATH], [test -f "$as_dir/$at_program" && break])
at_program_=$as_dir/$at_program ;;
esac
if test -f "$at_program_"; then
{
AS_ECHO(["$at_srcdir/AT_LINE: $at_program_ --version"])
"$at_program_" --version &AS_MESSAGE_LOG_FD 2>&1
else
AS_ERROR([cannot find $at_program])
fi
done
{
AS_BOX([Running the tests.])
} >&AS_MESSAGE_LOG_FD
at_start_date=`date`
at_start_time=`date +%s 2>/dev/null`
AS_ECHO(["$as_me: starting at: $at_start_date"]) >&AS_MESSAGE_LOG_FD
m4_divert_pop([PREPARE_TESTS])dnl
m4_divert_push([TESTS])dnl
# Create the master directory if it doesn't already exist.
AS_MKDIR_P(["$at_suite_dir"]) ||
AS_ERROR([cannot create `$at_suite_dir'])
# Can we diff with `/dev/null'? DU 5.0 refuses.
if diff /dev/null /dev/null >/dev/null 2>&1; then
at_devnull=/dev/null
else
at_devnull=$at_suite_dir/devnull
>"$at_devnull"
fi
# Use `diff -u' when possible.
if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
then
at_diff='diff -u'
else
at_diff=diff
fi
# Get the last needed group.
for at_group in : $at_groups; do :; done
# Extract the start and end lines of each test group at the tail
# of this file
awk '
BEGIN { FS="" }
/^@%:@AT_START_/ {
start = NR
}
/^@%:@AT_STOP_/ {
test = substr ($ 0, 10)
print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
if (test == "'"$at_group"'") exit
}' "$at_myself" > "$at_suite_dir/at-source-lines" &&
. "$at_suite_dir/at-source-lines" ||
AS_ERROR([cannot create test line number cache])
rm -f "$at_suite_dir/at-source-lines"
# Set number of jobs for `-j'; avoid more jobs than test groups.
set X $at_groups; shift; at_max_jobs=$[@%:@]
if test $at_max_jobs -eq 0; then
at_jobs=1
fi
if test $at_jobs -ne 1 &&
{ test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
at_jobs=$at_max_jobs
fi
# If parallel mode, don't output banners, don't split summary lines.
if test $at_jobs -ne 1; then
at_print_banners=false
at_quiet=:
fi
# Set up helper dirs.
rm -rf "$at_helper_dir" &&
mkdir "$at_helper_dir" &&
cd "$at_helper_dir" &&
{ test -z "$at_groups" || mkdir $at_groups; } ||
AS_ERROR([testsuite directory setup failed])
# Functions for running a test group. We leave the actual
# test group execution outside of a shell function in order
# to avoid hitting zsh 4.x exit status bugs.
AS_FUNCTION_DESCRIBE([at_fn_group_prepare], [],
[Prepare for running a test group.])
at_fn_group_prepare ()
{
# The directory for additional per-group helper files.
at_job_dir=$at_helper_dir/$at_group
# The file containing the location of the last AT_CHECK.
at_check_line_file=$at_job_dir/check-line
# The file containing the exit status of the last command.
at_status_file=$at_job_dir/status
# The files containing the output of the tested commands.
at_stdout=$at_job_dir/stdout
at_stder1=$at_job_dir/stder1
at_stderr=$at_job_dir/stderr
# The file containing the code for a test group.
at_test_source=$at_job_dir/test-source
# The file containing dates.
at_times_file=$at_job_dir/times
# Be sure to come back to the top test directory.
cd "$at_suite_dir"
# Clearly separate the test groups when verbose.
$at_first || $at_verbose echo
at_group_normalized=$at_group
_AT_NORMALIZE_TEST_GROUP_NUMBER(at_group_normalized)
# Create a fresh directory for the next test group, and enter.
# If one already exists, the user may have invoked ./run from
# within that directory; we remove the contents, but not the
# directory itself, so that we aren't pulling the rug out from
# under the shell's notion of the current directory.
at_group_dir=$at_suite_dir/$at_group_normalized
at_group_log=$at_group_dir/$as_me.log
_AS_CLEAN_DIR("$at_group_dir") ||
AS_WARN([test directory for $at_group_normalized could not be cleaned])
# Be tolerant if the above `rm' was not able to remove the directory.
AS_MKDIR_P(["$at_group_dir"])
echo 0 > "$at_status_file"
# In verbose mode, append to the log file *and* show on
# the standard output; in quiet mode only write to the log.
if test -z "$at_verbose"; then
at_tee_pipe='tee -a "$at_group_log"'
else
at_tee_pipe='cat >> "$at_group_log"'
fi
}
AS_FUNCTION_DESCRIBE([at_fn_group_banner], [[ORDINAL LINE DESC PAD [BANNER]]],
[Declare the test group ORDINAL, located at LINE with group description
DESC, and residing under BANNER. Use PAD to align the status column.])
at_fn_group_banner ()
{
at_setup_line="$[2]"
test -n "$[5]" && at_fn_banner $[5]
at_desc="$[3]"
case $[1] in
[[0-9]]) at_desc_line=" $[1]: ";;
[[0-9][0-9]]) at_desc_line=" $[1]: " ;;
[*]) at_desc_line="$[1]: " ;;
esac
AS_VAR_APPEND([at_desc_line], ["$[3]$[4]"])
$at_quiet AS_ECHO_N(["$at_desc_line"])
echo "# -*- compilation -*-" >> "$at_group_log"
}
AS_FUNCTION_DESCRIBE([at_fn_group_postprocess], [],
[Perform cleanup after running a test group.])
at_fn_group_postprocess ()
{
# Be sure to come back to the suite directory, in particular
# since below we might `rm' the group directory we are in currently.
cd "$at_suite_dir"
if test ! -f "$at_check_line_file"; then
sed "s/^ */$as_me: WARNING: /" <<_ATEOF
A failure happened in a test group before any test could be
run. This means that test suite is improperly designed. Please
report this failure to .
_ATEOF
AS_ECHO(["$at_setup_line"]) >"$at_check_line_file"
at_status=99
fi
$at_verbose AS_ECHO_N(["$at_group. $at_setup_line: "])
AS_ECHO_N(["$at_group. $at_setup_line: "]) >> "$at_group_log"
case $at_xfail:$at_status in
yes:0)
at_msg="UNEXPECTED PASS"
at_res=xpass
at_errexit=$at_errexit_p
at_color=$at_red
;;
no:0)
at_msg="ok"
at_res=pass
at_errexit=false
at_color=$at_grn
;;
*:77)
at_msg='skipped ('`cat "$at_check_line_file"`')'
at_res=skip
at_errexit=false
at_color=$at_blu
;;
no:* | *:99)
at_msg='FAILED ('`cat "$at_check_line_file"`')'
at_res=fail
at_errexit=$at_errexit_p
at_color=$at_red
;;
yes:*)
at_msg='expected failure ('`cat "$at_check_line_file"`')'
at_res=xfail
at_errexit=false
at_color=$at_lgn
;;
esac
echo "$at_res" > "$at_job_dir/$at_res"
# In parallel mode, output the summary line only afterwards.
if test $at_jobs -ne 1 && test -n "$at_verbose"; then
AS_ECHO(["$at_desc_line $at_color$at_msg$at_std"])
else
# Make sure there is a separator even with long titles.
AS_ECHO([" $at_color$at_msg$at_std"])
fi
at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
case $at_status in
0|77)
# $at_times_file is only available if the group succeeded.
# We're not including the group log, so the success message
# is written in the global log separately. But we also
# write to the group log in case they're using -d.
if test -f "$at_times_file"; then
at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')'
rm -f "$at_times_file"
fi
AS_ECHO(["$at_log_msg"]) >> "$at_group_log"
AS_ECHO(["$at_log_msg"]) >&AS_MESSAGE_LOG_FD
# Cleanup the group directory, unless the user wants the files
# or the success was unexpected.
if $at_debug_p || test $at_res = xpass; then
at_fn_create_debugging_script
if test $at_res = xpass && $at_errexit; then
echo stop > "$at_stop_file"
fi
else
if test -d "$at_group_dir"; then
find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
rm -fr "$at_group_dir"
fi
rm -f "$at_test_source"
fi
;;
*)
# Upon failure, include the log into the testsuite's global
# log. The failure message is written in the group log. It
# is later included in the global log.
AS_ECHO(["$at_log_msg"]) >> "$at_group_log"
# Upon failure, keep the group directory for autopsy, and create
# the debugging script. With -e, do not start any further tests.
at_fn_create_debugging_script
if $at_errexit; then
echo stop > "$at_stop_file"
fi
;;
esac
}
m4_text_box([Driver loop.])
dnl Catching signals correctly:
dnl
dnl The first idea was: trap the signal, send it to all spawned jobs,
dnl then reset the handler and reraise the signal for ourselves.
dnl However, before exiting, ksh will then send the signal to all
dnl process group members, potentially killing the outer testsuite
dnl and/or the 'make' process driving us.
dnl So now the strategy is: trap the signal, send it to all spawned jobs,
dnl then exit the script with the right status.
dnl
dnl In order to let the jobs know about the signal, we cannot just send it
dnl to the current process group (kill $SIG 0), for the same reason as above.
dnl Also, it does not reliably stop the suite to send the signal to the
dnl spawned processes, because they might not transport it further
dnl (maybe this can be fixed?).
dnl
dnl So what we do is enable shell job control if available, which causes the
dnl shell to start each parallel task as its own shell job, thus as a new
dnl process group leader. We then send the signal to all new process groups.
dnl Do we have job control?
if (set -m && set +m && set +b) >/dev/null 2>&1; then
set +b
at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
else
at_job_control_on=: at_job_control_off=: at_job_group=
fi
for at_signal in 1 2 15; do
dnl This signal handler is not suitable for PIPE: it causes writes.
dnl The code that was interrupted may have the errexit, monitor, or xtrace
dnl flags enabled, so sanitize.
trap 'set +x; set +e
$at_job_control_off
at_signal='"$at_signal"'
dnl Safety belt: even with runaway processes, prevent starting new jobs.
echo stop > "$at_stop_file"
dnl Do not enter this area multiple times, do not kill self prematurely.
trap "" $at_signal
dnl Gather process group IDs of currently running jobs.
at_pgids=
for at_pgid in `jobs -p 2>/dev/null`; do
at_pgids="$at_pgids $at_job_group$at_pgid"
done
dnl Ignore `kill' errors, as some jobs may have finished in the meantime.
test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
dnl wait until all jobs have exited.
wait
dnl Status output. Do this after waiting for the jobs, for ordered output.
dnl Avoid scribbling onto the end of a possibly incomplete line.
if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
echo >&2
fi
at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
set x $at_signame
test $# -gt 2 && at_signame=$at_signal
AS_WARN([caught signal $at_signame, bailing out])
dnl Do not reinstall the default handler here and reraise the signal to
dnl let the default handler do its job, see the note about ksh above.
dnl trap - $at_signal
dnl kill -$at_signal $$
dnl Instead, exit with appropriate status.
AS_VAR_ARITH([exit_status], [128 + $at_signal])
AS_EXIT([$exit_status])' $at_signal
done
rm -f "$at_stop_file"
at_first=:
if test $at_jobs -ne 1 &&
rm -f "$at_job_fifo" &&
test -n "$at_job_group" &&
( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
then
# FIFO job dispatcher.
dnl Since we use job control, we need to propagate TSTP.
dnl This handler need not be used for serial execution.
dnl Again, we should stop all processes in the job groups, otherwise
dnl the stopping will not be effective while one test group is running.
dnl Apparently ksh does not honor the TSTP trap.
dnl As a safety measure, not use the same variable names as in the
dnl termination handlers above, one might get called during execution
dnl of the other.
trap 'at_pids=
for at_pid in `jobs -p`; do
at_pids="$at_pids $at_job_group$at_pid"
done
dnl Send it to all spawned jobs, ignoring those finished meanwhile.
if test -n "$at_pids"; then
dnl Unfortunately, ksh93 fork-bombs when we send TSTP, so send STOP
dnl if this might be ksh (STOP prevents possible TSTP handlers inside
dnl AT_CHECKs from running). Then stop ourselves.
at_sig=TSTP
test "${TMOUT+set}" = set && at_sig=STOP
kill -$at_sig $at_pids 2>/dev/null
fi
kill -STOP $$
dnl We got a CONT, so let's go again. Passing this to all processes
dnl in the groups is necessary (because we stopped them), but it may
dnl cause changed test semantics; e.g., a sleep will be interrupted.
test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
echo
# Turn jobs into a list of numbers, starting from 1.
at_joblist=`AS_ECHO(["$at_groups"]) | sed -n 1,${at_jobs}p`
set X $at_joblist
shift
for at_group in $at_groups; do
dnl Enable job control only for spawning the test group:
dnl Let the jobs to run in separate process groups, but
dnl avoid all the status output by the shell.
$at_job_control_on 2>/dev/null
(
# Start one test group.
$at_job_control_off
dnl First child must open the fifo to avoid blocking parent; all other
dnl children inherit it already opened from the parent.
if $at_first; then
exec AT_JOB_FIFO_OUT_FD>"$at_job_fifo"
else
dnl Children do not need parent's copy of fifo.
exec AT_JOB_FIFO_IN_FD<&-
fi
dnl When a child receives PIPE, be sure to write back the token,
dnl so the master does not hang waiting for it.
dnl errexit and xtrace should not be set in this shell instance,
dnl except as debug measures. However, shells such as dash may
dnl optimize away the _AT_CHECK subshell, so normalize here.
trap 'set +x; set +e
dnl Ignore PIPE signals that stem from writing back the token.
trap "" PIPE
echo stop > "$at_stop_file"
echo >&AT_JOB_FIFO_OUT_FD
dnl Do not reraise the default PIPE handler.
dnl It wreaks havoc with ksh, see above.
dnl trap - 13
dnl kill -13 $$
AS_EXIT([141])' PIPE
at_fn_group_prepare
if cd "$at_group_dir" &&
at_fn_test $at_group &&
. "$at_test_source"
then :; else
AS_WARN([unable to parse test group: $at_group])
at_failed=:
fi
at_fn_group_postprocess
echo >&AT_JOB_FIFO_OUT_FD
) &
$at_job_control_off
if $at_first; then
at_first=false
exec AT_JOB_FIFO_IN_FD<"$at_job_fifo" AT_JOB_FIFO_OUT_FD>"$at_job_fifo"
fi
shift # Consume one token.
if test $[@%:@] -gt 0; then :; else
read at_token <&AT_JOB_FIFO_IN_FD || break
set x $[*]
fi
test -f "$at_stop_file" && break
done
exec AT_JOB_FIFO_OUT_FD>&-
# Read back the remaining ($at_jobs - 1) tokens.
set X $at_joblist
shift
if test $[@%:@] -gt 0; then
shift
for at_job
do
read at_token
done <&AT_JOB_FIFO_IN_FD
fi
exec AT_JOB_FIFO_IN_FD<&-
wait
else
# Run serially, avoid forks and other potential surprises.
for at_group in $at_groups; do
at_fn_group_prepare
if cd "$at_group_dir" &&
at_fn_test $at_group &&
. "$at_test_source"; then :; else
AS_WARN([unable to parse test group: $at_group])
at_failed=:
fi
at_fn_group_postprocess
test -f "$at_stop_file" && break
at_first=false
done
fi
# Wrap up the test suite with summary statistics.
cd "$at_helper_dir"
# Use ?..???? when the list must remain sorted, the faster * otherwise.
at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
echo $f; done | sed '/?/d; s,/xpass,,'`
at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
echo $f; done | sed '/?/d; s,/fail,,'`
set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
shift; at_group_count=$[@%:@]
set X $at_xpass_list; shift; at_xpass_count=$[@%:@]; at_xpass_list=$[*]
set X $at_xfail_list; shift; at_xfail_count=$[@%:@]
set X $at_fail_list; shift; at_fail_count=$[@%:@]; at_fail_list=$[*]
set X $at_skip_list; shift; at_skip_count=$[@%:@]
AS_VAR_ARITH([at_run_count], [$at_group_count - $at_skip_count])
AS_VAR_ARITH([at_unexpected_count], [$at_xpass_count + $at_fail_count])
AS_VAR_ARITH([at_total_fail_count], [$at_xfail_count + $at_fail_count])
# Back to the top directory.
cd "$at_dir"
rm -rf "$at_helper_dir"
# Compute the duration of the suite.
at_stop_date=`date`
at_stop_time=`date +%s 2>/dev/null`
AS_ECHO(["$as_me: ending at: $at_stop_date"]) >&AS_MESSAGE_LOG_FD
case $at_start_time,$at_stop_time in
[[0-9]*,[0-9]*])
AS_VAR_ARITH([at_duration_s], [$at_stop_time - $at_start_time])
AS_VAR_ARITH([at_duration_m], [$at_duration_s / 60])
AS_VAR_ARITH([at_duration_h], [$at_duration_m / 60])
AS_VAR_ARITH([at_duration_s], [$at_duration_s % 60])
AS_VAR_ARITH([at_duration_m], [$at_duration_m % 60])
at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
AS_ECHO(["$as_me: test suite duration: $at_duration"]) >&AS_MESSAGE_LOG_FD
;;
esac
echo
AS_BOX([Test results.])
echo
{
echo
AS_BOX([Test results.])
echo
} >&AS_MESSAGE_LOG_FD
dnl
dnl FIXME: this code is as far from i18n-cleanness as man
dnl could imagine...
dnl
if test $at_run_count = 1; then
at_result="1 test"
at_were=was
else
at_result="$at_run_count tests"
at_were=were
fi
if $at_errexit_p && test $at_unexpected_count != 0; then
if test $at_xpass_count = 1; then
at_result="$at_result $at_were run, one passed"
else
at_result="$at_result $at_were run, one failed"
fi
at_result="$at_result unexpectedly and inhibited subsequent tests."
at_color=$at_red
else
# Don't you just love exponential explosion of the number of cases?
at_color=$at_red
case $at_xpass_count:$at_fail_count:$at_xfail_count in
# So far, so good.
0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
# Some unexpected failures
0:*:0) at_result="$at_result $at_were run,
$at_fail_count failed unexpectedly." ;;
# Some failures, both expected and unexpected
0:*:1) at_result="$at_result $at_were run,
$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
0:*:*) at_result="$at_result $at_were run,
$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
# No unexpected failures, but some xpasses
*:0:*) at_result="$at_result $at_were run,
$at_xpass_count passed unexpectedly." ;;
# No expected failures, but failures and xpasses
*:1:0) at_result="$at_result $at_were run,
$at_unexpected_count did not behave as expected dnl
($at_fail_count unexpected failure)." ;;
*:*:0) at_result="$at_result $at_were run,
$at_unexpected_count did not behave as expected dnl
($at_fail_count unexpected failures)." ;;
# All of them.
*:*:1) at_result="$at_result $at_were run,
$at_xpass_count passed unexpectedly,
$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
*:*:*) at_result="$at_result $at_were run,
$at_xpass_count passed unexpectedly,
$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
esac
if test $at_skip_count = 0 && test $at_run_count -gt 1; then
at_result="All $at_result"
fi
fi
# Now put skips in the mix.
case $at_skip_count in
0) ;;
1) at_result="$at_result
1 test was skipped." ;;
*) at_result="$at_result
$at_skip_count tests were skipped." ;;
esac
if test $at_unexpected_count = 0; then
echo "$at_color$at_result$at_std"
echo "$at_result" >&AS_MESSAGE_LOG_FD
else
echo "${at_color}ERROR: $at_result$at_std" >&2
echo "ERROR: $at_result" >&AS_MESSAGE_LOG_FD
{
echo
AS_BOX([Summary of the failures.])
# Summary of failed and skipped tests.
if test $at_fail_count != 0; then
echo "Failed tests:"
$SHELL "$at_myself" $at_fail_list --list
echo
fi
if test $at_skip_count != 0; then
echo "Skipped tests:"
$SHELL "$at_myself" $at_skip_list --list
echo
fi
if test $at_xpass_count != 0; then
echo "Unexpected passes:"
$SHELL "$at_myself" $at_xpass_list --list
echo
fi
if test $at_fail_count != 0; then
AS_BOX([Detailed failed tests.])
echo
for at_group in $at_fail_list
do
at_group_normalized=$at_group
_AT_NORMALIZE_TEST_GROUP_NUMBER(at_group_normalized)
cat "$at_suite_dir/$at_group_normalized/$as_me.log"
echo
done
echo
fi
if test -n "$at_top_srcdir"; then
AS_BOX([${at_top_build_prefix}config.log])
sed 's/^/| /' ${at_top_build_prefix}config.log
echo
fi
} >&AS_MESSAGE_LOG_FD
AS_BOX([$as_me.log was created.])
echo
if $at_debug_p; then
at_msg='per-test log files'
else
at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
fi
AS_ECHO(["Please send $at_msg and all information you think might help:
To:
Subject: @<:@AT_PACKAGE_STRING@:>@ $as_me: dnl
$at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}dnl
$at_xpass_list${at_xpass_list:+ passed unexpectedly}
You may investigate any problem if you feel able to do so, in which
case the test suite provides a good starting point. Its output may
be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
"])
exit 1
fi
exit 0
m4_text_box([Actual tests.])
m4_divert_pop([TESTS])dnl
dnl End of AT_INIT: divert to KILL, only test groups are to be
dnl output, the rest is ignored. Current diversion is BODY, inherited
dnl from M4sh.
m4_divert([KILL])
])# AT_INIT
# _AT_ARG_OPTION(OPTIONS,HELP-TEXT,[ARGS],[ACTION-IF-GIVEN],
# [ACTION-IF-NOT-GIVEN])
# ----------------------------------------------------------
# Internal implementation of AT_ARG_OPTION & AT_ARG_OPTION_ARG
m4_defun([_AT_ARG_OPTION],
[m4_divert_once([HELP_OTHER],
[cat <<_ATEOF || at_write_fail=1
Other options:
_ATEOF
])dnl m4_divert_once HELP_OTHER
m4_divert_text([HELP_OTHER],
[cat <<_ATEOF || at_write_fail=1
$2
_ATEOF])dnl
dnl Turn our options into our desired strings
m4_ifdef([AT_first_option],[m4_undefine([AT_first_option])])dnl
m4_ifdef([AT_case],[m4_undefine([AT_case])])dnl
m4_ifdef([AT_case_no],[m4_undefine([AT_case_no])])dnl
m4_ifdef([AT_case_arg],[m4_undefine([AT_case_arg])])dnl
m4_foreach([AT_option], m4_split(m4_normalize([$1]),[[ \|]+]),
[m4_define_default([AT_first_option],AT_option)dnl
m4_define_default([AT_first_option_tr],
[m4_bpatsubst(m4_defn([AT_first_option]), -, [_])])dnl
m4_append([AT_case],m4_if(m4_len(AT_option),1,[],[-])[-]AT_option, [ | ])dnl
m4_append([AT_case_no],[--no-]AT_option, [ | ])dnl
m4_append([AT_case_arg],
m4_if(m4_len(AT_option),1,[],[-])[-]AT_option[=*], [ | ])dnl
])dnl m4_foreach AT_option
dnl keep track so we or the user may process ACTION-IF-NOT-GIVEN
m4_divert_once([PARSE_ARGS_BEGIN],
[
##
## Set up package specific options.
##
])dnl
m4_divert_text([PARSE_ARGS_BEGIN],
[dnl Provide a default value for options without arguments.
m4_ifvaln([$3],,[at_arg_[]AT_first_option_tr=false])dnl
at_arg_given_[]AT_first_option_tr=false
])dnl m4_divert_text DEFAULTS
m4_divert_text([PARSE_ARGS],
[dnl Parse the options and args when necessary.
m4_ifvaln([$3],
[ AT_case )
at_prev=--AT_first_option_tr
;;
AT_case_arg )
at_arg_[]AT_first_option_tr=$at_optarg
at_arg_given_[]AT_first_option_tr=:
$4
;;],
[ AT_case )
at_optarg=:
at_arg_[]AT_first_option_tr=:
at_arg_given_[]AT_first_option_tr=:
m4_ifval([$4],[$4])[]dnl
;;
AT_case_no )
at_optarg=false
at_arg_[]AT_first_option_tr=false
at_arg_given_[]AT_first_option_tr=:
m4_ifval([$4],[$4])[]dnl
;;])dnl m4_ifvaln $3
])dnl m4_divert_text PARSE_ARGS
m4_ifvaln([$5],
[m4_divert_once([PARSE_ARGS_END],
[
##
## Process package specific options when _not_ supplied.
##])dnl m4_divert_once PARSE_ARGS_END
m4_divert_text([PARSE_ARGS_END],
[
AS_IF([$at_arg_given_[]AT_first_option_tr],,[$5])dnl
])dnl m4_divert_text PARSE_ARGS_END
])dnl m4_ifvaln $5
])dnl _AT_ARG_OPTION
# AT_ARG_OPTION(OPTIONS,HELP-TEXT,[ACTION-IF-GIVEN],[ACTION-IF-NOT-GIVEN])
# ------------------------------------------------------------------------
# Accept a list of space-separated OPTIONS, all aliases of the first one.
# Add HELP-TEXT to the HELP_OTHER diversion.
#
# Leading dashes should not be passed in OPTIONS. Users will be required
# to pass `--' before long options and `-' before single character options.
#
# $at_arg_OPTION will be set to `:' if this option is received, `false' if
# if --no-OPTION is received, and `false' by default.
#
# Run ACTION-IF-GIVEN each time an option in OPTIONS is encountered; here,
# $at_optarg will be set to `:' or `false' as appropriate. $at_optarg is
# actually just a copy of $at_arg_OPTION.
#
# ACTION-IF-NOT-GIVEN will be run once after option parsing is complete and
# if no option from OPTIONS was used.
m4_defun([AT_ARG_OPTION],[_AT_ARG_OPTION([$1],[$2],,[$3],[$4])])
# AT_ARG_OPTION_ARG(OPTIONS,HELP-TEXT,[ACTION-IF-GIVEN],[ACTION-IF-NOT-GIVEN])
# ----------------------------------------------------------------------------
# Accept a set of space-separated OPTIONS with arguments, all aliases of the
# first one. Add HELP-TEXT to the HELP_OTHER diversion.
#
# Leading dashes should not be passed in OPTIONS. Users will be required
# to pass `--' before long options and `-' before single character options.
#
# By default, any argument to these options will be assigned to the shell
# variable $at_arg_OPTION, where OPTION is the first option in OPTIONS with
# any `-' characters replaced with `_'.
#
# Run ACTION-IF-GIVEN each time an option in OPTIONS is encountered; here,
# $at_optarg will be set to the option argument. $at_optarg is actually just
# a copy of $at_arg_OPTION.
#
# ACTION-IF-NOT-GIVEN will be run once after option parsing is complete
# and if no option from OPTIONS was used.
m4_defun([AT_ARG_OPTION_ARG],[_AT_ARG_OPTION([$1],[$2],1,[$3],[$4])])
# AT_TESTED(PROGRAMS)
# -------------------
# Specify the list of programs exercised by the test suite. Their
# versions are logged, and in the case of embedded test suite, they
# must correspond to the version of the package. PATH should be
# already preset so the proper executable will be selected.
m4_define([AT_TESTED],
[m4_append_uniq_w([AT_tested], [$1])])
# AT_COPYRIGHT(TEXT, [FILTER = m4_newline])
# -----------------------------------------
# Emit TEXT, a copyright notice, in the top of the test suite and in
# --version output. Macros in TEXT are evaluated once. Process
# the --version output through FILTER (m4_newline, m4_do, and
# m4_copyright_condense are common filters).
m4_define([AT_COPYRIGHT],
[AS_COPYRIGHT([$1])[]]dnl
[m4_divert_text([VERSION_NOTICES],
[m4_default([$2], [m4_newline])([$1])])])# AT_COPYRIGHT
# AT_COLOR_TESTS
# --------------
# Enable colored test results if standard error is connected to a terminal.
m4_define([AT_COLOR_TESTS],
[m4_define([AT_color], [auto])])
# AT_SETUP(DESCRIPTION)
# ---------------------
# Start a group of related tests, all to be executed in the same subshell.
# The group is testing what DESCRIPTION says.
_AT_DEFINE_INIT([AT_SETUP],
[m4_ifdef([AT_ingroup], [m4_fatal([$0: nested AT_SETUP detected])],
[m4_define([AT_ingroup], [AS_ECHO(["$at_setup_line"]) >"$at_check_line_file"
])])
m4_ifdef([AT_keywords], [m4_undefine([AT_keywords])])
m4_define([AT_capture_files], [])
m4_define([AT_line], AT_LINE)
m4_define([AT_xfail], [at_xfail=no])
m4_define([AT_description], m4_expand([$1]))
m4_define([AT_ordinal], m4_incr(AT_ordinal))
m4_divert_push([TEST_GROUPS])dnl
[#AT_START_]AT_ordinal
at_fn_group_banner AT_ordinal 'm4_defn([AT_line])' \
"AS_ESCAPE(m4_dquote(m4_defn([AT_description])))" m4_format(["%*s"],
m4_max(0, m4_eval(47 - m4_qlen(m4_defn([AT_description])))), [])m4_if(
AT_banner_ordinal, [0], [], [ AT_banner_ordinal])
m4_divert_push([TEST_SCRIPT])dnl
])
# AT_FAIL_IF(SHELL-EXPRESSION)
# ----------------------------
# Make the test die with hard failure if SHELL-EXPRESSION evaluates to
# true (exitcode = 0).
_AT_DEFINE_SETUP([AT_FAIL_IF],
[dnl
dnl Try to limit the amount of conditionals that we emit.
m4_case([$1],
[], [],
[false], [],
[:], [_AT_CHECK_EXIT([], [99])],
[true], [_AT_CHECK_EXIT([], [99])],
[_AT_CHECK_EXIT([$1], [99])])])
# AT_SKIP_IF(SHELL-EXPRESSION)
# ----------------------------
# Skip the rest of the group if SHELL-EXPRESSION evaluates to true
# (exitcode = 0).
_AT_DEFINE_SETUP([AT_SKIP_IF],
[dnl
dnl Try to limit the amount of conditionals that we emit.
m4_case([$1],
[], [],
[false], [],
[:], [_AT_CHECK_EXIT([], [77])],
[true], [_AT_CHECK_EXIT([], [77])],
[_AT_CHECK_EXIT([$1], [77])])])
# AT_XFAIL_IF(SHELL-EXPRESSION)
# -----------------------------
# Set up the test to be expected to fail if SHELL-EXPRESSION evaluates to
# true (exitcode = 0).
_AT_DEFINE_SETUP([AT_XFAIL_IF],
[dnl
dnl Try to limit the amount of conditionals that we emit.
m4_case([$1],
[], [],
[false], [],
[:], [m4_define([AT_xfail], [at_xfail=yes])],
[true], [m4_define([AT_xfail], [at_xfail=yes])],
[m4_append([AT_xfail], [
$1 && at_xfail=yes])])])
# AT_KEYWORDS(KEYWORDS)
# ---------------------
# Declare a list of keywords associated to the current test group.
# Since the -k option is case-insensitive, the list is stored in lower case
# to avoid duplicates that differ only by case.
_AT_DEFINE_SETUP([AT_KEYWORDS],
[m4_append_uniq_w([AT_keywords], m4_tolower(_m4_expand([$1
])))])
# AT_CAPTURE_FILE(FILE)
# ---------------------
# If the current test group does not behave as expected, save the contents of
# FILE in the test suite log.
_AT_DEFINE_SETUP([AT_CAPTURE_FILE],
[m4_append_uniq([AT_capture_files], ["$1"], [ \
])])
# AT_CLEANUP
# ----------
# Complete a group of related tests.
_AT_DEFINE_INIT([AT_CLEANUP],
[m4_ifdef([AT_ingroup], [AT_ingroup[]_m4_undefine([AT_ingroup])],
[m4_fatal([$0: missing AT_SETUP detected])])dnl
m4_append([AT_help_all],
m4_defn([AT_ordinal]);m4_defn([AT_line]);m4_defn([AT_description]);dnl
m4_ifdef([AT_keywords], [m4_defn([AT_keywords])]);
)dnl
m4_divert_pop([TEST_SCRIPT])dnl Back to TEST_GROUPS
AT_xfail
(
AS_ECHO(["AT_ordinal. $at_setup_line: testing $at_desc ..."])
$at_traceon
m4_undivert([TEST_SCRIPT])dnl Insert the code here
set +x
$at_times_p && times >"$at_times_file"
) AS_MESSAGE_LOG_FD>&1 2>&1 AT_JOB_FIFO_OUT_FD>&- | eval $at_tee_pipe
read at_status <"$at_status_file"
[#AT_STOP_]AT_ordinal
m4_divert_pop([TEST_GROUPS])dnl Back to KILL.
])# AT_CLEANUP
# AT_BANNER([TEXT])
# -----------------
# Start a category of related test groups. If multiple groups are executed,
# output TEXT as a banner without any shell expansion, prior to any test
# from the category. If TEXT is empty, no banner is printed.
_AT_DEFINE_INIT([AT_BANNER],
[m4_ifdef([AT_ingroup], [m4_fatal([$0: nested AT_SETUP detected])])dnl
m4_define([AT_banner_ordinal], m4_incr(AT_banner_ordinal))
m4_divert_text([BANNERS],
[@%:@ Banner AT_banner_ordinal. AT_LINE
@%:@ Category starts at test group m4_incr(AT_ordinal).
at_banner_text_[]AT_banner_ordinal="AS_ESCAPE([$1])"])dnl
])# AT_BANNER
# AT_DATA(FILE, CONTENTS)
# -----------------------
# Initialize an input data FILE with given CONTENTS, which should be
# empty or end with a newline.
# This macro is not robust to active symbols in CONTENTS *on purpose*.
# If you don't want CONTENTS to be evaluated, quote it twice.
_AT_DEFINE_SETUP([AT_DATA],
[m4_if([$2], [], [: >$1],
[$2], [[]], [: >$1],
[cat >$1 <<'_ATEOF'
$2[]_ATEOF
])])
# AT_CHECK(COMMANDS, [STATUS = 0], STDOUT, STDERR,
# [RUN-IF-FAIL], [RUN-IF-PASS])
# ------------------------------------------------
# Execute a test by performing given shell COMMANDS. These commands
# should normally exit with STATUS, while producing expected STDOUT and
# STDERR contents. Shell metacharacters in STDOUT and STDERR are
# _not_ processed by the shell, but are treated as string literals.
#
# STATUS, STDOUT, and STDERR are not checked if equal to `ignore'.
#
# If STDOUT is `expout', then stdout is compared to the content of the file
# `expout'. Likewise for STDERR and `experr'.
#
# If STDOUT is `stdout', then the stdout is left in the file `stdout',
# likewise for STDERR and `stderr'. Don't do this:
#
# AT_CHECK([command >out])
# # Some checks on `out'
#
# do this instead:
#
# AT_CHECK([command], [], [stdout])
# # Some checks on `stdout'
#
# You might wonder why you can't just use `ignore', then directly use stdout
# and stderr left by the test suite:
#
# AT_CHECK([command], [], [ignore])
# AT_CHECK([check stdout])
#
# If the test suite always captured data in the file `stdout', then the
# second command would be trying to read and write from the same file, with
# undefined behavior. Therefore, the test suite actually captures data in
# an internal file of a different name, and only creates `stdout' when
# explicitly requested.
#
# Any line of stderr starting with leading blanks and a `+' are filtered
# out, since most shells when tracing include subshell traces in stderr.
# This may cause spurious failures when the test suite is run with `-x'.
#
_AT_DEFINE_SETUP([AT_CHECK],
[_AT_CHECK(m4_expand([$1]), [$2], AS_ESCAPE(m4_dquote(m4_expand([$3]))),
AS_ESCAPE(m4_dquote(m4_expand([$4]))), [$5], [$6])])
# AT_CHECK_UNQUOTED(COMMANDS, [STATUS = 0], STDOUT, STDERR,
# [RUN-IF-FAIL], [RUN-IF-PASS])
# ---------------------------------------------------------
# Like AT_CHECK, but do not AS_ESCAPE shell metacharacters in the STDOUT
# and STDERR arguments before running the comparison.
_AT_DEFINE_SETUP([AT_CHECK_UNQUOTED],
[_AT_CHECK(m4_expand([$1]), [$2], AS_ESCAPE(m4_dquote(m4_expand([$3])), [""]),
AS_ESCAPE(m4_dquote(m4_expand([$4])), [""]), [$5], [$6])])
# AT_CHECK_NOESCAPE(COMMANDS, [STATUS = 0], STDOUT, STDERR,
# [RUN-IF-FAIL], [RUN-IF-PASS])
# ---------------------------------------------------------
# Obsolete spelling of AT_CHECK_UNQUOTED.
m4_define([AT_CHECK_NOESCAPE],
[m4_warn([obsolete], [consider using AT_CHECK_UNQUOTED instead of $0])]dnl
[_AT_CHECK(m4_expand([$1]), [$2], m4_expand([$3]),
m4_expand([$4]), [$5], [$6])])
# _AT_DECIDE_TRACEABLE(COMMANDS)
# ------------------------------
# Worker for _AT_CHECK that expands to shell code. If COMMANDS are safe to
# trace with `set -x', the shell code will evaluate to true. Otherwise,
# the shell code will print a message stating an aspect of COMMANDS that makes
# tracing them unsafe, and evaluate to false.
#
# Tracing COMMANDS is not safe if they contain a command that spans multiple
# lines. When the test suite user passes `-x' or `--trace', the test suite
# precedes every command with a `set -x'. Since most tests expect a specific
# stderr, if only to confirm that it is empty, the test suite filters ^+ from
# the captured stderr before comparing with the expected stderr. If a command
# spans multiple lines, so will its trace, but a `+' only prefixes the first
# line of that trace:
#
# $ echo 'foo
# bar'
# => stdout
# foo
# bar
# => stderr
# + foo
# bar
#
# In a subset of cases, one could filter such extended shell traces from
# stderr. Since test commands spanning several lines are rare, I chose
# instead to simply not trace COMMANDS that could yield multiple trace lines.
# Distinguishing such COMMANDS became the task at hand.
#
# These features may cause a shell command to span multiple lines:
#
# (a) A quoted literal newline.
# Example:
# echo foo'
# 'bar
# M4 is a hostile language for the job of parsing COMMANDS to determine whether
# each literal newline is quoted, so we simply disable tracing for all COMMANDS
# that bear literal newlines.
#
# (b) A command substitution not subject to word splitting.
# Example:
# var=$(printf 'foo\nbar')
# Example:
# echo "`printf 'foo\\nbar`"
# One cannot know in general the number of lines a command substitution will
# yield without executing the substituted command. As such, we disable tracing
# for all COMMANDS containing these constructs.
#
# (c) A parameter expansion not subject to word splitting.
# Example:
# var=foo'
# 'bar
# echo "$var"
# Parameter expansions appear in COMMANDS with much greater frequency than do
# newlines and command substitutions, so disabling tracing for all such
# COMMANDS would much more substantially devalue `testsuite -x'. To determine
# which parameter expansions yield multiple lines, we escape all ``', `"',
# and `\' in a copy of COMMANDS and expand that string within double quotes
# at runtime. If the result of that expansion contains multiple lines, the
# test suite disables tracing for the command in question.
#
# This method leads the test suite to expand some parameters that the shell
# itself will never expand due to single-quotes or backslash escapes. This is
# not a problem for `$foo' expansions, which will simply yield the empty string
# or some unrelated value. A `${...}' expansion could actually form invalid
# shell code, however; consider `${=foo}'. Therefore, we disable tracing for
# all COMMANDS containing `${...}'. This affects few COMMANDS.
#
# This macro falls in a very hot path; the Autoconf test suite expands it 1640
# times as of this writing. To give a sense of the impact of the heuristics I
# just described, the test suite preemptively disables tracing for 31 of those,
# and 268 contain parameter expansions that require runtime evaluation. The
# balance are always safe to trace.
m4_define([_AT_DECIDE_TRACEABLE],
dnl Utility macro.
dnl
dnl Examine COMMANDS for a reason to never trace COMMANDS.
[m4_pushdef([at_reason],
m4_cond([m4_eval(m4_index([$1], [`]) >= 0)], [1],
[[a `...` command substitution]],
[m4_eval(m4_index([$1], [$(]) >= 0)], [1],
[[a $(...) command substitution]],
[m4_eval(m4_index([$1], [${]) >= 0)], [1],
[[a ${...} parameter expansion]],
[m4_eval(m4_index([$1], m4_newline) >= 0)], [1],
[[an embedded newline]],
[m4_eval(m4_bregexp([$1], [[^|]|[^|]]) >= 0)], [1],
[[a shell pipeline]],
[]))]dnl No reason.
[m4_if(m4_index(_m4_defn([at_reason]), [a]), [0],]dnl
dnl We know at build time that tracing COMMANDS is never safe.
[[at_fn_check_prepare_notrace '_m4_defn([at_reason])'],
m4_index([$1], [$]), [-1],]dnl
dnl We know at build time that tracing COMMANDS is always safe.
[[at_fn_check_prepare_trace],]dnl
dnl COMMANDS may contain parameter expansions; expand them at runtime.
[[at_fn_check_prepare_dynamic "AS_ESCAPE([[$1]], [`\"])"])[]]dnl
[_m4_popdef([at_reason])])
# AT_DIFF_STDERR/AT_DIFF_STDOUT
# -----------------------------
# These are subroutines of AT_CHECK. Using indirect dispatch is a tad
# faster than using m4_case, and these are called very frequently.
m4_define([AT_DIFF_STDERR(stderr)],
[echo stderr:; tee stderr <"$at_stderr"])
m4_define([AT_DIFF_STDERR(stderr-nolog)],
[echo stderr captured; cp "$at_stderr" stderr])
m4_define([AT_DIFF_STDERR(ignore)],
[echo stderr:; cat "$at_stderr"])
m4_define([AT_DIFF_STDERR(ignore-nolog)])
m4_define([AT_DIFF_STDERR(experr)],
[$at_diff experr "$at_stderr" || at_failed=:])
m4_define([AT_DIFF_STDERR()],
[at_fn_diff_devnull "$at_stderr" || at_failed=:])
m4_define([AT_DIFF_STDOUT(stdout)],
[echo stdout:; tee stdout <"$at_stdout"])
m4_define([AT_DIFF_STDOUT(stdout-nolog)],
[echo stdout captured; cp "$at_stdout" stdout])
m4_define([AT_DIFF_STDOUT(ignore)],
[echo stdout:; cat "$at_stdout"])
m4_define([AT_DIFF_STDOUT(ignore-nolog)])
m4_define([AT_DIFF_STDOUT(expout)],
[$at_diff expout "$at_stdout" || at_failed=:])
m4_define([AT_DIFF_STDOUT()],
[at_fn_diff_devnull "$at_stdout" || at_failed=:])
# _AT_CHECK(COMMANDS, [STATUS = 0], STDOUT, STDERR,
# [RUN-IF-FAIL], [RUN-IF-PASS])
# -------------------------------------------------
# Worker for AT_CHECK and AT_CHECK_UNQUOTED, with COMMANDS, STDOUT, and
# STDERR pre-expanded.
#
# Implementation Details
# ----------------------
# Ideally, we would like to run
#
# ( $at_traceon; COMMANDS >at-stdout 2> at-stderr )
#
# but we must group COMMANDS as it is not limited to a single command, and
# then the shells will save the traces in at-stderr. So we have to filter
# them out when checking stderr, and we must send them into the test suite's
# stderr to honor -x properly. Since only the first line of the trace of a
# multiline command starts with a `+', and I know of no straightforward way to
# filter out the unadorned trace lines, we disable shell tracing entirely for
# commands that could span multiple lines.
#
# Limiting COMMANDS to a single command is not good either, since then
# the user herself would use {} or (), and then we face the same problem.
#
# But then, there is no point in running
#
# ( $at_traceon { $1 ; } >at-stdout 2>at-stder1 )
#
# instead of the simpler
#
# ( $at_traceon; $1 ) >at-stdout 2>at-stder1
#
# Note that we truncate and append to the output files, to avoid losing
# output from multiple concurrent processes, e.g., an inner testsuite
# with parallel jobs.
m4_define([_AT_CHECK],
[m4_define([AT_ingroup])]dnl
[{ set +x
AS_ECHO(["$at_srcdir/AT_LINE: AS_ESCAPE([[$1]])"])
_AT_DECIDE_TRACEABLE([$1]) _AT_LINE_ESCAPED
( $at_check_trace; [$1]
) >>"$at_stdout" 2>>"$at_stderr" AS_MESSAGE_LOG_FD>&-
at_status=$? at_failed=false
$at_check_filter
m4_ifdef([AT_DIFF_STDERR($4)], [m4_indir([AT_DIFF_STDERR($4)])],
[echo >>"$at_stderr"; AS_ECHO([["$4"]]) | \
$at_diff - "$at_stderr" || at_failed=:])
m4_ifdef([AT_DIFF_STDOUT($3)], [m4_indir([AT_DIFF_STDOUT($3)])],
[echo >>"$at_stdout"; AS_ECHO([["$3"]]) | \
$at_diff - "$at_stdout" || at_failed=:])
m4_if([$2], [ignore], [at_fn_check_skip],
[at_fn_check_status m4_default([$2], [0])]) $at_status "$at_srcdir/AT_LINE"
m4_ifvaln([$5$6], [AS_IF($at_failed, [$5], [$6])])]dnl
[$at_failed && at_fn_log_failure AT_capture_files
$at_traceon; }
])# _AT_CHECK
# _AT_CHECK_EXIT(COMMANDS, [EXIT-STATUS-IF-PASS])
# -----------------------------------------------
# Minimal version of _AT_CHECK for AT_SKIP_IF and AT_FAIL_IF.
m4_define([_AT_CHECK_EXIT],
[m4_define([AT_ingroup])]dnl
[AS_ECHO(_AT_LINE_ESCAPED) >"$at_check_line_file"
m4_ifval([$1], [($1) \
&& ])at_fn_check_skip $2 "$at_srcdir/AT_LINE"])# _AT_CHECK_EXIT
070701000679aa000081a400000000000000000000000153b4ffc20001fa15000000b500010002ffffffffffffffff0000003400000000root/usr/local/share/autoconf/autotest/autotest.m4f # This is a frozen state file generated by GNU M4 1.4.16
V1
Q1,1
[]
T10,154
m4_providem4_ifdef([m4_provide($1)], [],
[m4_set_add([_m4_provide], [$1], [m4_define([m4_provide($1)],
m4_ifdef([_m4_diverting], [_m4_defn([_m4_diverting])]))])])
T13,0
_AT_LINE_file
T15,55
_AS_TR_SH_INDIR`AS_ECHO(["_AS_ESCAPE([[$1]], [`], [\])"]) | $as_tr_sh`
T21,342
_AS_BOURNE_COMPATIBLEAS_IF([test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1],
[emulate sh
NULLCMD=:
[#] Pre-4.2 versions of Zsh do word splitting on ${1+"$[@]"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$[@]"}'='"$[@]"'
setopt NO_GLOB_SUBST],
[AS_CASE([`(set -o) 2>/dev/null`], [*posix*], [set -o posix])])
T20,1
AS_ORIGINAL_STDIN_FD0
T29,30
m4_location(_AS_EXPR_PREPARE)../../lib/m4sugar/m4sh.m4:1108
T8,198
_m4_qlenm4_define([m4_qlen-$1],
m4_if(m4_index([$1], [@]), [-1], [m4_len([$1])],
[m4_len(m4_bpatsubst([[$1]],
[@\(\(<:\|:>\|S|\|%:\|\{:\|:\}\)\(@\)\|&t@\)],
[\3]))]))_m4_defn([m4_qlen-$1])
T7,30
AS_WARNAS_MESSAGE([WARNING: $1], [2])
T9,68
_AS_TR_SH_AS_LITERAL_IF([$1], [*][ ][
])([], [$0_INDIR], [$0_LITERAL])([$1])
F7,4
m4_decrdecr
T6,264
AS_FOR_m4_defun_pro([$0])m4_pushdef([$1], m4_if([$3], [], [[$$2]], m4_translit([$3], [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789][%+=:,./-]), [], [[$3]], [[$$2]]))for $2[]m4_ifval([$3], [ in $3])
do :
$4
done[]_m4_popdef([$1])[]_m4_defun_epi([$0])
T14,42
m4_divert_textm4_divert_push([$1])$2
m4_divert_pop([$1])
T8,734
AT_SETUPm4_ifdef([AT_ingroup], [m4_fatal([$0: nested AT_SETUP detected])],
[m4_define([AT_ingroup], [AS_ECHO(["$at_setup_line"]) >"$at_check_line_file"
])])
m4_ifdef([AT_keywords], [m4_undefine([AT_keywords])])
m4_define([AT_capture_files], [])
m4_define([AT_line], AT_LINE)
m4_define([AT_xfail], [at_xfail=no])
m4_define([AT_description], m4_expand([$1]))
m4_define([AT_ordinal], m4_incr(AT_ordinal))
m4_divert_push([TEST_GROUPS])dnl
[#AT_START_]AT_ordinal
at_fn_group_banner AT_ordinal 'm4_defn([AT_line])' \
"AS_ESCAPE(m4_dquote(m4_defn([AT_description])))" m4_format(["%*s"],
m4_max(0, m4_eval(47 - m4_qlen(m4_defn([AT_description])))), [])m4_if(
AT_banner_ordinal, [0], [], [ AT_banner_ordinal])
m4_divert_push([TEST_SCRIPT])dnl
T8,46
AT_SETUPm4_fatal([AT_SETUP: missing AT_INIT detected])
T10,3
m4_newline
$1
T20,181
AS_FUNCTION_DESCRIBE@%:@ $1[]m4_ifval([$2], [ $2])
@%:@ m4_translit(m4_format([%*s],
m4_decr(m4_qlen(_m4_expand([$1[]m4_ifval([$2], [ $2])
]))), []), [ ], [-])
m4_text_wrap([$3], [@%:@ ], [], [$4])
T5,73
m4_dom4_if([$#], 0, [],
[$#], 1, [$1[]],
[$1[]$0(m4_shift($@))])
T26,3
_m4_divert(PARSE_ARGS_END)202
T7,2
m4_echo$@
T10,27
m4_defaultm4_if([$1], [], [$2], [$1])
T22,30
m4_location(AS_ECHO_N)../../lib/m4sugar/m4sh.m4:1034
T16,103
AS_IDENTIFIER_IFm4_if(_$0(m4_if(m4_index([$1], [@]), [-1],
[[$1]], [m4_bpatsubst([[$1]], [@&t@])])), [-], [$2], [$3])
T7,91
m4_argnm4_assert([0 < $1])m4_pushdef([_$0], [_m4_popdef([_$0])]m4_dquote([$]m4_incr([$1])))_$0($@)
T10,91
AS_VAR_SETAS_LITERAL_WORD_IF([$1],
[$1=$2],
[eval "$1=_AS_ESCAPE([$2], [`], [\"$])"])
T7,197
m4_copym4_ifdef([$2], [m4_fatal([$0: won't overwrite defined macro: $2])],
[m4_stack_foreach_sep([$1], [m4_pushdef([$2],], [)])])m4_ifdef([m4_location($1)], [m4_define([m4_location($2)], m4_location)])
T17,780
_AS_ERROR_PREPAREAS_REQUIRE_SHELL_FN([as_fn_error],
[AS_FUNCTION_DESCRIBE([as_fn_error], [STATUS ERROR]m4_ifval(AS_MESSAGE_LOG_FD,
[[ [[LINENO LOG_FD]]]]),
[Output "`basename @S|@0`: error: ERROR" to stderr.]
m4_ifval(AS_MESSAGE_LOG_FD,
[[If LINENO and LOG_FD are provided, also output the error to LOG_FD,
referencing LINENO.]])
[Then exit the script with STATUS, using 1 if that was 0.])],
[ as_status=$[1]; test $as_status -eq 0 && as_status=1
m4_ifval(AS_MESSAGE_LOG_FD,
[m4_pushdef([AS_MESSAGE_LOG_FD], [$[4]])dnl
if test "$[4]"; then
AS_LINENO_PUSH([$[3]])
_AS_ECHO_LOG([error: $[2]])
fi
m4_define([AS_MESSAGE_LOG_FD])], [m4_pushdef([AS_MESSAGE_LOG_FD])])dnl
AS_MESSAGE([error: $[2]], [2])
_m4_popdef([AS_MESSAGE_LOG_FD])dnl
AS_EXIT([$as_status])])
T28,44
AT_DIFF_STDOUT(stdout-nolog)echo stdout captured; cp "$at_stdout" stdout
T28,44
AT_DIFF_STDERR(stderr-nolog)echo stderr captured; cp "$at_stderr" stderr
T15,131
AT_CAPTURE_FILEm4_ifndef([AT_ingroup],
[m4_fatal([AT_CAPTURE_FILE: missing AT_SETUP detected])])m4_append_uniq([AT_capture_files], ["$1"], [ \
])
T9,28
_m4_quotem4_if([$#], [0], [], [[$*]])
T8,33
m4_applym4_if([$2], [], [$1], [$1($2)])[]
T27,3
_m4_divert(VERSION_NOTICES)351
T19,3
_m4_divert(VERSION)350
T8,0
_m4_warn
T21,29
m4_location(AS_UNSET)../../lib/m4sugar/m4sh.m4:671
T10,103
m4_flattenm4_if(m4_index([$1], [
]), [-1], [[$1]],
[m4_translit(m4_bpatsubst([[[$1]]], [\\
]), [
], [ ])])
F12,9
m4_debugmodedebugmode
T20,30
m4_location(AS_LN_S)../../lib/m4sugar/m4sh.m4:1257
T7,0
__gnu__
T9,35
m4_shiftnm4_assert(0 < $1 && $1 < $#)_$0($@)
T13,276
m4_set_deletem4_ifdef([_m4_set([$1])],
[_m4_popdef([_m4_set([$1],]_m4_defn([_m4_set([$1])])[)],
[_m4_set([$1])])$0([$1])],
[m4_ifdef([_m4_set_cleanup($1)],
[_m4_popdef([_m4_set_cleanup($1)])])m4_ifdef(
[_m4_set_size($1)],
[_m4_popdef([_m4_set_size($1)])])])
T14,102
_AS_ME_PREPARE_m4_defun_pro([$0])AS_REQUIRE([_AS_BASENAME_PREPARE])as_me=`AS_BASENAME("$[0]")`
[]_m4_defun_epi([$0])
T7,84
_m4_for$4[$1]$5[]m4_if([$1], [$2], [],
[$0(m4_eval([$1 + $3]), [$2], [$3], [$4], [$5])])
T12,71
AS_COPYRIGHTm4_divert_text([HEADER-COPYRIGHT],
[m4_bpatsubst([
$1], [^], [@%:@ ])])
T8,199
AT_CHECKm4_ifndef([AT_ingroup],
[m4_fatal([AT_CHECK: missing AT_SETUP detected])])_AT_CHECK(m4_expand([$1]), [$2], AS_ESCAPE(m4_dquote(m4_expand([$3]))),
AS_ESCAPE(m4_dquote(m4_expand([$4]))), [$5], [$6])
T13,1
AS_MESSAGE_FD1
T27,30
m4_location(_AS_CR_PREPARE)../../lib/m4sugar/m4sh.m4:1793
T18,1268
_AS_LINENO_PREPARE_m4_defun_pro([$0])AS_REQUIRE([_AS_CR_PREPARE])AS_REQUIRE([_AS_ME_PREPARE])_AS_DETECT_SUGGESTED([_AS_LINENO_WORKS])m4_pushdef([AS_MESSAGE_LOG_FD])m4_pushdef([AS_ERROR],
[{ AS_MESSAGE(]m4_dquote([error: $][1])[, [2]); AS_EXIT([1]); }])_AS_LINENO_WORKS || {
[ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
sed -n '
p
/[$]LINENO/=
' <$as_myself |
sed '
s/[$]LINENO.*/&-/
t lineno
b
:lineno
N
:loop
s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
t loop
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno"] ||
AS_ERROR([cannot create $as_me.lineno; rerun with a POSIX shell])
# If we had to re-execute with $CONFIG_SHELL, we're ensured to have
# already done that, so ensure we don't try to do so again and fall
# in an infinite loop. This has already happened in practice.
_as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
. "./$as_me.lineno"
# Exit status is that of the last command.
exit
}
_m4_popdef([AS_MESSAGE_LOG_FD], [AS_ERROR])[]_m4_defun_epi([$0])
T40,30
m4_location(_AS_VERSION_COMPARE_PREPARE)../../lib/m4sugar/m4sh.m4:1697
T11,31
_AS_IF_ELSEm4_ifnblank([$1],
[else
$1
])
T21,30
m4_location(AS_TR_SH)../../lib/m4sugar/m4sh.m4:1826
T30,29
m4_location(_AS_UNSET_PREPARE)../../lib/m4sugar/m4sh.m4:657
T16,400
_AS_EXIT_PREPARE_m4_defun_pro([$0])AS_REQUIRE_SHELL_FN([as_fn_set_status],
[AS_FUNCTION_DESCRIBE([as_fn_set_status], [STATUS],
[Set $? to STATUS, without forking.])], [ return $[]1])AS_REQUIRE_SHELL_FN([as_fn_exit],
[AS_FUNCTION_DESCRIBE([as_fn_exit], [STATUS],
[Exit the shell with STATUS, even in a "trap 0" or "set -e" context.])],
[ set +e
as_fn_set_status $[1]
exit $[1]])[]_m4_defun_epi([$0])
T13,175
m4_defun_initm4_define([$1], [$3[]])m4_defun([$1],
[$2[]_m4_popdef(]m4_dquote($[0])[)m4_indir(]m4_dquote($[0])dnl
[m4_if(]m4_dquote($[#])[, [0], [], ]m4_dquote([,$]@)[))], [m4_pushdef])
T23,3
_m4_divert(TEST_GROUPS)500
T23,30
m4_location(AS_DIRNAME)../../lib/m4sugar/m4sh.m4:1002
T11,165
_m4_dumpdefm4_if([$#], [0], [m4_fatal([$0: missing argument])],
[$#], [1], [m4_builtin([dumpdef], [$1])],
[m4_map_args_sep([m4_builtin([dumpdef],], [)], [], $@)])
T23,3
_m4_divert(TESTS_BEGIN)401
T20,33
_AS_REQUIRE_SHELL_FN
m4_n([$2])$1 ()
{
$3
} @%:@ $1[]
T16,46
AT_DIFF_STDERR()at_fn_diff_devnull "$at_stderr" || at_failed=:
T14,199
AS_SET_CATFILEcase $2 in @%:@((
.) AS_VAR_SET([$1], [$3]);;
*)
case $3 in @%:@(((
.) AS_VAR_SET([$1], [$2]);;
[[\\/]]* | ?:[[\\/]]* ) AS_VAR_SET([$1], [$3]);;
*) AS_VAR_SET([$1], [$2/$3]);;
esac;;
esac[]
T17,94
_m4_stack_reversem4_ifdef([$1], [m4_pushdef([$2],
_m4_defn([$1]))$3[]_m4_popdef([$1])$0([$1], [$2], [$4$3])])
F8,4
_m4_defndefn
T12,47
AS_VAR_ARITHas_fn_arith $2 && AS_VAR_SET([$1], [$as_val])[]
T12,197
AS_VAR_ARITH_m4_defun_pro([$0])_AS_DETECT_SUGGESTED([_AS_VAR_ARITH_WORKS])AS_REQUIRE([_AS_VAR_ARITH_PREPARE], [], [M4SH-INIT-FN])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T17,1
_m4_divert(BINSH)0
T24,1
_m4_divert(M4SH-INIT-FN)5
T20,96
_AS_DETECT_SUGGESTED_m4_defun_pro([$0])m4_set_add([_AS_DETECT_SUGGESTED_BODY], [$1 || AS_EXIT])[]_m4_defun_epi([$0])
T22,38
AT_DIFF_STDOUT(stdout)echo stdout:; tee stdout <"$at_stdout"
T7,119
m4_casem4_if([$#], 0, [],
[$#], 1, [],
[$#], 2, [$2],
[$1], [$2], [$3],
[$0([$1], m4_shift3($@))])
T13,57
AS_ME_PREPARE_m4_defun_pro([$0])AS_REQUIRE([_$0])[]_m4_defun_epi([$0])
T20,30
m4_location(AS_ECHO)../../lib/m4sugar/m4sh.m4:1026
T21,76
_m4_set_add_all_checkm4_if([$#], [2], [],
[m4_set_add([$1], [$3])$0([$1], m4_shift2($@))])
T15,5
_m4_divert_grow10000
T10,54
m4_includem4_include_unique([$1])dnl
m4_builtin([include], [$1])
T14,181
_AS_LITERAL_IFm4_if(m4_index([$1], [@S|@]), [-1], [$0_(m4_translit([$1],
[-:=%/@{}[]#(),.$2]][[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]][,
[++++++$$`````]))], [$0_NO])
T19,147
AS_REQUIRE_SHELL_FNm4_provide_if([AS_SHELL_FN_$1], [],
[AS_REQUIRE([AS_SHELL_FN_$1],
[m4_provide([AS_SHELL_FN_$1])_$0($@)],
m4_default_quoted([$4], [M4SH-INIT-FN]))])
T16,283
_AS_TEST_PREPARE_m4_defun_pro([$0])AS_REQUIRE_SHELL_FN([as_fn_executable_p],
[AS_FUNCTION_DESCRIBE([as_fn_executable_p], [FILE],
[Test if FILE is an executable regular file.])],
[ test -f "$[]1" && test -x "$[]1"])as_test_x='test -x'
as_executable_p=as_fn_executable_p
[]_m4_defun_epi([$0])
T17,51
_AS_ECHO_UNQUOTEDAS_ECHO(["$1"]) >&m4_default([$2], [AS_MESSAGE_FD])
T13,110
_AS_CLEAN_DIRif test -d $1; then
find $1 -type d ! -perm -700 -exec chmod u+rwx {} \;
rm -fr $1/* $1/.[[!.]] $1/.??*
fi
T29,29
m4_location(_AS_EXIT_PREPARE)../../lib/m4sugar/m4sh.m4:568
F9,6
m4_definedefine
F9,6
m4_sysvalsysval
T17,17
m4_PACKAGE_STRINGGNU Autoconf 2.69
T15,12
m4_PACKAGE_NAMEGNU Autoconf
T10,82
AS_DIRNAME$as_dirname -- $1 ||
_AS_DIRNAME_EXPR([$1]) 2>/dev/null ||
_AS_DIRNAME_SED([$1])[]
T10,124
AS_DIRNAME_m4_defun_pro([$0])AS_REQUIRE([_$0_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T18,202
m4_cr_not_symbols1
!"#*%&'()$+,./0123456789:;<=>?@[\]^`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T16,225
_AS_LINENO_WORKS as_lineno_1=$LINENO as_lineno_1a=$LINENO
as_lineno_2=$LINENO as_lineno_2a=$LINENO
eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"'
T18,192
m4_cr_not_symbols2
!"#*%&'()$+,./:;<=>?@[\]^`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T15,23
AS_EXECUTABLE_Pas_fn_executable_p $1[]
T15,129
AS_EXECUTABLE_P_m4_defun_pro([$0])AS_REQUIRE([_AS_TEST_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T15,193
m4_cr_not_alnum
!"#*%&'()$+,./:;<=>?@[\]^_`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T10,62
m4_noquotem4_changequote([-=<{(],[)}>=-])$1-=<{()}>=-m4_changequote([,])
T32,30
m4_location(_AS_MKDIR_P_PREPARE)../../lib/m4sugar/m4sh.m4:1296
T10,211
m4_dumpdefm4_if([$#], [0], [m4_fatal([$0: missing argument])],
[$#], [1], [m4_ifdef([$1], [m4_errprintn(
[$1: ]m4_dquote(_m4_defn([$1])))], [m4_fatal([$0: undefined macro: $1])])],
[m4_map_args([$0], $@)])
T20,4
_m4_divert_diversionKILL
T14,28
AS_VAR_PUSHDEF_$0([$1], m4_expand([$2]))[]
T14,130
AS_VAR_PUSHDEF_m4_defun_pro([$0])AS_REQUIRE([_AS_TR_SH_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T12,26
m4_normalizem4_strip(m4_flatten([$1]))
T23,39
m4_expansion_stack_pushm4_pushdef([_m4_expansion_stack], [$1])
T12,48
m4_re_escapem4_bpatsubst([$1],
[[][*+.?\^$]], [\\\&])
T17,152
m4_version_prereqm4_if(m4_version_compare([2.69], [$1]),
[-1],
[m4_default([$3],
[m4_fatal([Autoconf version $1 or higher is required],
[63])])],
[$2])
T16,27
_AS_QUOTE_MODERN_AS_ESCAPE([$1], [`], [""])
T14,116
AS_LINENO_PUSH_m4_defun_pro([$0])as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack[]_m4_defun_epi([$0])
T17,478
AS_INIT_GENERATED_m4_defun_pro([$0])m4_require([AS_PREPARE])m4_pushdef([AS_MESSAGE_LOG_FD])as_write_fail=0
cat >$1 <<_ASEOF || as_write_fail=1
#! $SHELL
# Generated by $as_me.
$2
SHELL=\${CONFIG_SHELL-$SHELL}
export SHELL
_ASEOF
cat >>$1 <<\_ASEOF || as_write_fail=1
_AS_SHELL_SANITIZE
_AS_PREPARE
m4_if(AS_MESSAGE_FD, [1], [], [exec AS_MESSAGE_FD>&1
])m4_text_box([Main body of $1 script.])
_ASEOF
test $as_write_fail = 0 && chmod +x $1[]dnl
_m4_popdef([AS_MESSAGE_LOG_FD])[]_m4_defun_epi([$0])
T8,150
m4_defunm4_define([m4_location($1)], m4_location)m4_default([$3], [m4_define])([$1],
[_m4_defun_pro(]m4_dquote($[0])[)$2[]_m4_defun_epi(]m4_dquote($[0])[)])
T31,0
m4_include(autotest/general.m4)
T13,47
AS_LITERAL_IF_$0(m4_expand([$1]), [ ][
])([$4], [$3], [$2])
T8,81
m4_chompm4_format([[%.*s]], m4_index(m4_translit([[$1]], [
/.], [/ ])[./.], [/.]), [$1])
T8,115
AS_ERRORas_fn_error m4_default([$2], [$?]) "_AS_QUOTE([$1])"m4_ifval(AS_MESSAGE_LOG_FD,
[ "$LINENO" AS_MESSAGE_LOG_FD])[]
T8,187
AS_ERROR_m4_defun_pro([$0])m4_append_uniq([_AS_CLEANUP],
[m4_divert_text([M4SH-INIT-FN], [_AS_ERROR_PREPARE[]])])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T25,29
m4_location(_AS_ECHO_LOG)../../lib/m4sugar/m4sh.m4:790
T16,245
m4_cr_not_digits
!"#*%&'()$+,./:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
F11,7
m4_maketempmkstemp
T27,30
m4_location(AS_VAR_PUSHDEF)../../lib/m4sugar/m4sh.m4:2066
F10,7
m4_builtinbuiltin
T17,164
_AS_UNSET_PREPARE_m4_defun_pro([$0])AS_FUNCTION_DESCRIBE([as_fn_unset], [VAR], [Portably unset VAR.])
as_fn_unset ()
{
AS_UNSET([$[1]])
}
as_unset=as_fn_unset[]_m4_defun_epi([$0])
T7,16
AS_LN_S$as_ln_s $1 $2[]
T7,129
AS_LN_S_m4_defun_pro([$0])AS_REQUIRE([_AS_LN_S_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T12,16
m4_wrap_lifo_m4_wrap([$1[]])
T20,29
m4_location(AS_CASE)../../lib/m4sugar/m4sh.m4:550
T25,53
_m4_expansion_stack_entry_m4_defn([m4_location($1)])[: $1 is expanded from...]
T14,110
m4_divert_pushm4_divert_stack_push([$0], [$1])m4_pushdef([_m4_divert_diversion], [$1])_m4_divert_raw(_m4_divert([$1], [$2]))
T26,29
m4_location(AS_LINENO_POP)../../lib/m4sugar/m4sh.m4:904
T10,55
_m4_shift2m4_if([$#], [2], [],
[, m4_shift(m4_shift($@))])
T10,65
_m4_shift3m4_if([$#], [3], [],
[, m4_shift(m4_shift(m4_shift($@)))])
T12,93
AT_COPYRIGHTAS_COPYRIGHT([$1])[]m4_divert_text([VERSION_NOTICES],
[m4_default([$2], [m4_newline])([$1])])
T30,30
m4_location(_AS_TR_SH_PREPARE)../../lib/m4sugar/m4sh.m4:1805
T12,55
m4_copy_unm4m4_copy([$1], m4_bpatsubst([$1], [^m4_\(.*\)], [[\1]]))
T13,41
_m4_set_unionm4_ifdef([_m4_set([$1],$2)], [], [,[$2]])
T30,34
m4_location(AT_ARG_OPTION_ARG)../../lib/autotest/general.m4:1787
T9,57
m4_appendm4_define([$1], m4_ifdef([$1], [_m4_defn([$1])[$3]])[$2])
T16,31
_AT_LINE_ESCAPED"AS_ESCAPE(m4_dquote(AT_LINE))"
T15,148
_m4_append_uniqm4_ifdef([$1],
[m4_if(m4_index([$3]_m4_defn([$1])[$3], [$3$2$3]), [-1],
[m4_append([$1], [$2], [$3])$4], [$5])],
[m4_define([$1], [$2])$4])
T27,30
m4_location(_AS_TR_PREPARE)../../lib/m4sugar/m4sh.m4:1878
T17,149
AT_CHECK_NOESCAPEm4_warn([obsolete], [consider using AT_CHECK_UNQUOTED instead of $0])_AT_CHECK(m4_expand([$1]), [$2], m4_expand([$3]),
m4_expand([$4]), [$5], [$6])
T10,2
m4_unquote$*
T14,107
m4_set_map_sepm4_ifdef([_m4_set_cleanup($1)], [_m4_set_contents_1c],
[_m4_set_contents_1])([$1])_m4_set_contents_2($@)
F11,8
m4_translittranslit
F9,6
m4_substrsubstr
F12,8
_m4_undivertundivert
T25,111
m4_stack_foreach_sep_lifo_m4_stack_reverse([$1], [m4_tmp-$1], [$2[]_m4_defn([m4_tmp-$1])$3], [$4[]])_m4_stack_reverse([m4_tmp-$1], [$1])
T29,29
m4_location(_AS_DIRNAME_EXPR)../../lib/m4sugar/m4sh.m4:975
T13,474
_m4_text_wrapm4_pushdef([m4_Indent], m4_qlen([$2]))m4_pushdef([m4_Cursor], m4_qlen([$3]))m4_pushdef([m4_Separator], [m4_define([m4_Separator], [ ])])[$3]m4_cond([m4_Cursor], m4_Indent, [],
[m4_eval(m4_Cursor > m4_Indent)], [1], [
[$2]m4_define([m4_Cursor], m4_Indent)],
[m4_format([%*s], m4_max([0],
m4_eval(m4_Indent - m4_Cursor)), [])m4_define([m4_Cursor], m4_Indent)])m4_map_args_w([$1], [$0_word(], [, [$2], [$4])])_m4_popdef([m4_Separator], [m4_Cursor], [m4_Indent])
T21,1
_m4_divert(M4SH-INIT)6
T16,4
_m4_divert(BODY)1000
T7,676
AS_INIT# Wrap our cleanup prior to m4sugar's cleanup.
m4_wrap([_AS_CLEANUP])
m4_init
m4_provide([AS_INIT])
# Forbidden tokens and exceptions.
m4_pattern_forbid([^_?AS_])
# Bangshe and minimal initialization.
m4_divert_text([BINSH], [@%:@! /bin/sh])
m4_divert_text([HEADER-COMMENT],
[@%:@ Generated from __file__ by m4_PACKAGE_STRING.])
m4_divert_text([M4SH-SANITIZE], [_AS_SHELL_SANITIZE])
m4_divert_text([M4SH-INIT-FN], [m4_text_box([M4sh Shell Functions.])])
# Let's go!
m4_divert([BODY])dnl
m4_text_box([Main body of script.])
_AS_DETECT_REQUIRED([_AS_SHELL_FN_WORK])dnl
_AS_DETECT_REQUIRED([_AS_TEST_X_WORKS])dnl
AS_REQUIRE([_AS_UNSET_PREPARE], [], [M4SH-INIT-FN])dnl
T13,100
AS_LINENO_POP_m4_defun_pro([$0])eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno[]_m4_defun_epi([$0])
T18,80
m4_expansion_stackm4_stack_foreach_sep_lifo([_$0], [_$0_entry(], [)
])m4_location[: the top level]
T9,75
m4_beforem4_provide_if([$2],
[m4_warn([syntax], [$2 was called before $1])])
T21,32
AS_LITERAL_HEREDOC_IF_$0(m4_expand([$1]))([$2], [$3])
T26,30
m4_location(_AS_PATH_WALK)../../lib/m4sugar/m4sh.m4:1339
T9,26
m4_ifndefm4_ifdef([$1], [$3], [$2])
T26,1
_m4_divert(HEADER-COMMENT)2
T13,26
m4_cr_LETTERSABCDEFGHIJKLMNOPQRSTUVWXYZ
T16,452
_m4_require_callm4_pushdef([_m4_divert_grow], m4_decr(_m4_divert_grow))m4_pushdef([_m4_diverting([$1])])m4_pushdef([_m4_diverting], [$1])m4_divert_push(_m4_divert_grow, [-])m4_if([$2], [], [$1], [$2])
m4_provide_if([$1], [m4_set_remove([_m4_provide], [$1])],
[m4_warn([syntax], [$1 is m4_require'd but not m4_defun'd])])_m4_divert_raw($3)_m4_undivert(_m4_divert_grow)m4_divert_pop(_m4_divert_grow)_m4_popdef([_m4_divert_grow],
[_m4_diverting([$1])], [_m4_diverting])
T7,45675
AT_INITm4_pushdef([AT_INIT], [m4_fatal([$0: invoked multiple times])])
m4_pattern_forbid([^_?AT_])
m4_pattern_allow([^_ATEOF$])
m4_ifndef([AT_PACKAGE_BUGREPORT], [m4_fatal(
[$1: AT_PACKAGE_BUGREPORT is missing, consider writing package.m4])])
m4_define([AT_TESTSUITE_NAME],
m4_defn([AT_PACKAGE_STRING])[ test suite]m4_ifval([$1],
[m4_expand([: $1])]))
m4_define([AT_ordinal], 0)
m4_define([AT_banner_ordinal], 0)
m4_define([AT_help_all], [])
m4_map_args([_m4_popdef], _AT_DEFINE_INIT_LIST)
m4_wrap([_AT_FINISH])
AS_INIT[]m4_cleardivert([BODY])AS_ME_PREPARE[]m4_divert_push([DEFAULTS])AT_COPYRIGHT(m4_defn([_AT_COPYRIGHT_YEARS]), [
m4_copyright_condense])
AT_COPYRIGHT(
[This test suite is free software; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.], [m4_echo])
AS_PREPARE
SHELL=${CONFIG_SHELL-/bin/sh}
# How were we run?
at_cli_args="$[@]"
m4_divert_push([BANNERS])dnl
# Should we print banners? Yes if more than one test is run.
case $at_groups in #(
*$as_nl* )
at_print_banners=: ;; #(
* ) at_print_banners=false ;;
esac
# Text for banner N, set to a single space once printed.
m4_divert_pop([BANNERS])dnl back to DEFAULTS
m4_divert_push([PREPARE_TESTS])dnl
m4_text_box([Autotest shell functions.])
AS_FUNCTION_DESCRIBE([at_fn_banner], [NUMBER],
[Output banner NUMBER, provided the testsuite is running multiple groups
and this particular banner has not yet been printed.])
at_fn_banner ()
{
$at_print_banners || return 0
eval at_banner_text=\$at_banner_text_$[1]
test "x$at_banner_text" = "x " && return 0
eval "at_banner_text_$[1]=\" \""
if test -z "$at_banner_text"; then
$at_first || echo
else
AS_ECHO(["$as_nl$at_banner_text$as_nl"])
fi
} # at_fn_banner
AS_FUNCTION_DESCRIBE([at_fn_check_prepare_notrace], [REASON LINE],
[Perform AT_CHECK preparations for the command at LINE for an
untraceable command; REASON is the reason for disabling tracing.])
at_fn_check_prepare_notrace ()
{
$at_trace_echo "Not enabling shell tracing (command contains $[1])"
AS_ECHO(["$[2]"]) >"$at_check_line_file"
at_check_trace=: at_check_filter=:
: >"$at_stdout"; : >"$at_stderr"
}
AS_FUNCTION_DESCRIBE([at_fn_check_prepare_trace], [LINE],
[Perform AT_CHECK preparations for the command at LINE for a traceable
command.])
at_fn_check_prepare_trace ()
{
AS_ECHO(["$[1]"]) >"$at_check_line_file"
at_check_trace=$at_traceon at_check_filter=$at_check_filter_trace
: >"$at_stdout"; : >"$at_stderr"
}
AS_FUNCTION_DESCRIBE([at_fn_check_prepare_dynamic], [COMMAND LINE],
[Decide if COMMAND at LINE is traceable at runtime, and call the
appropriate preparation function.])
at_fn_check_prepare_dynamic ()
{
case $[1] in
*$as_nl*)
at_fn_check_prepare_notrace 'an embedded newline' "$[2]" ;;
*)
at_fn_check_prepare_trace "$[2]" ;;
esac
}
AS_FUNCTION_DESCRIBE([at_fn_filter_trace], [],
[Remove the lines in the file "$at_stderr" generated by "set -x" and print
them to stderr.])
at_fn_filter_trace ()
{
mv "$at_stderr" "$at_stder1"
grep '^ *+' "$at_stder1" >&2
grep -v '^ *+' "$at_stder1" >"$at_stderr"
}
AS_FUNCTION_DESCRIBE([at_fn_log_failure], [FILE-LIST],
[Copy the files in the list on stdout with a "> " prefix, and exit the shell
with a failure exit code.])
at_fn_log_failure ()
{
for file
do AS_ECHO(["$file:"]); sed 's/^/> /' "$file"; done
echo 1 > "$at_status_file"
exit 1
}
AS_FUNCTION_DESCRIBE([at_fn_check_skip], [EXIT-CODE LINE],
[Check whether EXIT-CODE is a special exit code (77 or 99), and if so exit
the test group subshell with that same exit code. Use LINE in any report
about test failure.])
at_fn_check_skip ()
{
case $[1] in
99) echo 99 > "$at_status_file"; at_failed=:
AS_ECHO(["$[2]: hard failure"]); exit 99;;
77) echo 77 > "$at_status_file"; exit 77;;
esac
}
AS_FUNCTION_DESCRIBE([at_fn_check_status], [EXPECTED EXIT-CODE LINE],
[Check whether EXIT-CODE is the EXPECTED exit code, and if so do nothing.
Otherwise, if it is 77 or 99, exit the test group subshell with that same
exit code; if it is anything else print an error message referring to LINE,
and fail the test.])
at_fn_check_status ()
{
dnl This order ensures that we don't `skip' if we are precisely checking
dnl $? = 77 or $? = 99.
case $[2] in
$[1] ) ;;
77) echo 77 > "$at_status_file"; exit 77;;
99) echo 99 > "$at_status_file"; at_failed=:
AS_ECHO(["$[3]: hard failure"]); exit 99;;
*) AS_ECHO(["$[3]: exit code was $[2], expected $[1]"])
at_failed=:;;
esac
}
AS_FUNCTION_DESCRIBE([at_fn_diff_devnull], [FILE],
[Emit a diff between /dev/null and FILE. Uses "test -s" to avoid useless
diff invocations.])
at_fn_diff_devnull ()
{
test -s "$[1]" || return 0
$at_diff "$at_devnull" "$[1]"
}
AS_FUNCTION_DESCRIBE([at_fn_test], [NUMBER],
[Parse out test NUMBER from the tail of this file.])
at_fn_test ()
{
eval at_sed=\$at_sed$[1]
sed "$at_sed" "$at_myself" > "$at_test_source"
}
AS_FUNCTION_DESCRIBE([at_fn_create_debugging_script], [],
[Create the debugging script $at_group_dir/run which will reproduce the
current test group.])
at_fn_create_debugging_script ()
{
{
echo "#! /bin/sh" &&
echo 'test "${ZSH_VERSION+set}" = set dnl
&& alias -g '\''${1+"$[@]"}'\''='\''"$[@]"'\''' &&
AS_ECHO(["cd '$at_dir'"]) &&
AS_ECHO(["exec \${CONFIG_SHELL-$SHELL} \"$at_myself\" -v -d ]dnl
[$at_debug_args $at_group \${1+\"\$[@]\"}"]) &&
echo 'exit 1'
} >"$at_group_dir/run" &&
chmod +x "$at_group_dir/run"
}
m4_text_box([End of autotest shell functions.])
m4_divert_pop([PREPARE_TESTS])dnl back to DEFAULTS
# Not all shells have the 'times' builtin; the subshell is needed to make
# sure we discard the 'times: not found' message from the shell.
at_times_p=false
(times) >/dev/null 2>&1 && at_times_p=:
# CLI Arguments to pass to the debugging scripts.
at_debug_args=
# -e sets to true
at_errexit_p=false
# Shall we be verbose? ':' means no, empty means yes.
at_verbose=:
at_quiet=
# Running several jobs in parallel, 0 means as many as test groups.
at_jobs=1
at_traceon=:
at_trace_echo=:
at_check_filter_trace=:
# Shall we keep the debug scripts? Must be `:' when the suite is
# run by a debug script, so that the script doesn't remove itself.
at_debug_p=false
# Display help message?
at_help_p=false
# Display the version message?
at_version_p=false
# List test groups?
at_list_p=false
# --clean
at_clean=false
# Test groups to run
at_groups=
# Whether to rerun failed tests.
at_recheck=
# Whether a write failure occurred
at_write_fail=0
# The directory we run the suite in. Default to . if no -C option.
at_dir=`pwd`
# An absolute reference to this testsuite script.
dnl m4-double quote, to preserve []
[case $as_myself in
[\\/]* | ?:[\\/]* ) at_myself=$as_myself ;;
* ) at_myself=$at_dir/$as_myself ;;
esac]
# Whether -C is in effect.
at_change_dir=false
m4_divert_pop([DEFAULTS])dnl
m4_define([_AT_FINISH],
[m4_ifdef([AT_ingroup], [m4_fatal([missing AT_CLEANUP detected])])dnl
m4_divert_text([DEFAULTS],
[
# Whether to enable colored test results.
at_color=m4_ifdef([AT_color], [AT_color], [no])
# List of the tested programs.
at_tested='m4_ifdef([AT_tested],
[m4_translit(m4_dquote(m4_defn([AT_tested])), [ ], m4_newline)])'
# As many question marks as there are digits in the last test group number.
# Used to normalize the test group numbers so that `ls' lists them in
# numerical order.
at_format='m4_bpatsubst(m4_defn([AT_ordinal]), [.], [?])'
# Description of all the test groups.
at_help_all="AS_ESCAPE(m4_dquote(m4_defn([AT_help_all])))"
# List of the all the test groups.
at_groups_all=`AS_ECHO(["$at_help_all"]) | sed 's/;.*//'`
AS_FUNCTION_DESCRIBE([at_fn_validate_ranges], [NAME...],
[Validate and normalize the test group number contained in each
variable NAME. Leading zeroes are treated as decimal.])
at_fn_validate_ranges ()
{
for at_grp
do
eval at_value=\$$at_grp
if test $at_value -lt 1 || test $at_value -gt AT_ordinal; then
AS_ECHO(["invalid test group: $at_value"]) >&2
exit 1
fi
case $at_value in
0*) # We want to treat leading 0 as decimal, like expr and test, but
# AS_VAR_ARITH treats it as octal if it uses $(( )).
# With XSI shells, ${at_value#${at_value%%[1-9]*}} avoids the
# expr fork, but it is not worth the effort to determine if the
# shell supports XSI when the user can just avoid leading 0.
eval $at_grp='`expr $at_value + 0`' ;;
esac
done
}])])dnl
m4_divert_push([PARSE_ARGS])dnl
at_prev=
for at_option
do
# If the previous option needs an argument, assign it.
if test -n "$at_prev"; then
at_option=$at_prev=$at_option
at_prev=
fi
case $at_option in
*=?*) at_optarg=`expr "X$at_option" : '[[^=]]*=\(.*\)'` ;;
*) at_optarg= ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
case $at_option in
--help | -h )
at_help_p=:
;;
--list | -l )
at_list_p=:
;;
--version | -V )
at_version_p=:
;;
--clean | -c )
at_clean=:
;;
--color )
at_color=always
;;
--color=* )
case $at_optarg in
no | never | none) at_color=never ;;
auto | tty | if-tty) at_color=auto ;;
always | yes | force) at_color=always ;;
*) at_optname=`echo " $at_option" | sed 's/^ //; s/=.*//'`
AS_ERROR([unrecognized argument to $at_optname: $at_optarg]) ;;
esac
;;
--debug | -d )
at_debug_p=:
;;
--errexit | -e )
at_debug_p=:
at_errexit_p=:
;;
--verbose | -v )
at_verbose=; at_quiet=:
;;
--trace | -x )
at_traceon='set -x'
at_trace_echo=echo
at_check_filter_trace=at_fn_filter_trace
;;
[[0-9] | [0-9][0-9] | [0-9][0-9][0-9] | [0-9][0-9][0-9][0-9]])
at_fn_validate_ranges at_option
AS_VAR_APPEND([at_groups], ["$at_option$as_nl"])
;;
# Ranges
[[0-9]- | [0-9][0-9]- | [0-9][0-9][0-9]- | [0-9][0-9][0-9][0-9]-])
at_range_start=`echo $at_option |tr -d X-`
at_fn_validate_ranges at_range_start
at_range=`AS_ECHO(["$at_groups_all"]) | \
sed -ne '/^'$at_range_start'$/,$p'`
AS_VAR_APPEND([at_groups], ["$at_range$as_nl"])
;;
[-[0-9] | -[0-9][0-9] | -[0-9][0-9][0-9] | -[0-9][0-9][0-9][0-9]])
at_range_end=`echo $at_option |tr -d X-`
at_fn_validate_ranges at_range_end
at_range=`AS_ECHO(["$at_groups_all"]) | \
sed -ne '1,/^'$at_range_end'$/p'`
AS_VAR_APPEND([at_groups], ["$at_range$as_nl"])
;;
[[0-9]-[0-9] | [0-9]-[0-9][0-9] | [0-9]-[0-9][0-9][0-9]] | \
[[0-9]-[0-9][0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9]] | \
[[0-9][0-9]-[0-9][0-9][0-9] | [0-9][0-9]-[0-9][0-9][0-9][0-9]] | \
[[0-9][0-9][0-9]-[0-9][0-9][0-9]] | \
[[0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]] | \
[[0-9][0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]] )
at_range_start=`expr $at_option : '\(.*\)-'`
at_range_end=`expr $at_option : '.*-\(.*\)'`
if test $at_range_start -gt $at_range_end; then
at_tmp=$at_range_end
at_range_end=$at_range_start
at_range_start=$at_tmp
fi
at_fn_validate_ranges at_range_start at_range_end
at_range=`AS_ECHO(["$at_groups_all"]) | \
sed -ne '/^'$at_range_start'$/,/^'$at_range_end'$/p'`
AS_VAR_APPEND([at_groups], ["$at_range$as_nl"])
;;
# Directory selection.
--directory | -C )
at_prev=--directory
;;
--directory=* )
at_change_dir=:
at_dir=$at_optarg
if test x- = "x$at_dir" ; then
at_dir=./-
fi
;;
# Parallel execution.
--jobs | -j )
at_jobs=0
;;
--jobs=* | -j[[0-9]]* )
if test -n "$at_optarg"; then
at_jobs=$at_optarg
else
at_jobs=`expr X$at_option : 'X-j\(.*\)'`
fi
case $at_jobs in *[[!0-9]]*)
at_optname=`echo " $at_option" | sed 's/^ //; s/[[0-9=]].*//'`
AS_ERROR([non-numeric argument to $at_optname: $at_jobs]) ;;
esac
;;
# Keywords.
--keywords | -k )
at_prev=--keywords
;;
--keywords=* )
at_groups_selected=$at_help_all
at_save_IFS=$IFS
IFS=,
set X $at_optarg
shift
IFS=$at_save_IFS
for at_keyword
do
at_invert=
case $at_keyword in
'!'*)
at_invert="-v"
at_keyword=`expr "X$at_keyword" : 'X!\(.*\)'`
;;
esac
# It is on purpose that we match the test group titles too.
at_groups_selected=`AS_ECHO(["$at_groups_selected"]) |
grep -i $at_invert ["^[1-9][^;]*;.*[; ]$at_keyword[ ;]"]`
done
# Smash the keywords.
at_groups_selected=`AS_ECHO(["$at_groups_selected"]) | sed 's/;.*//'`
AS_VAR_APPEND([at_groups], ["$at_groups_selected$as_nl"])
;;
--recheck)
at_recheck=:
;;
m4_divert_pop([PARSE_ARGS])dnl
dnl Process *=* last to allow for user specified --option=* type arguments.
m4_divert_push([PARSE_ARGS_END])dnl
*=*)
at_envvar=`expr "x$at_option" : 'x\([[^=]]*\)='`
# Reject names that are not valid shell variable names.
case $at_envvar in
'' | [[0-9]]* | *[[!_$as_cr_alnum]]* )
AS_ERROR([invalid variable name: `$at_envvar']) ;;
esac
at_value=`AS_ECHO(["$at_optarg"]) | sed "s/'/'\\\\\\\\''/g"`
# Export now, but save eval for later and for debug scripts.
export $at_envvar
AS_VAR_APPEND([at_debug_args], [" $at_envvar='$at_value'"])
;;
*) AS_ECHO(["$as_me: invalid option: $at_option"]) >&2
AS_ECHO(["Try \`$[0] --help' for more information."]) >&2
exit 1
;;
esac
done
# Verify our last option didn't require an argument
AS_IF([test -n "$at_prev"], [AS_ERROR([`$at_prev' requires an argument])])
# The file containing the suite.
at_suite_log=$at_dir/$as_me.log
# Selected test groups.
if test -z "$at_groups$at_recheck"; then
at_groups=$at_groups_all
else
if test -n "$at_recheck" && test -r "$at_suite_log"; then
at_oldfails=`sed -n ['
/^Failed tests:$/,/^Skipped tests:$/{
s/^[ ]*\([1-9][0-9]*\):.*/\1/p
}
/^Unexpected passes:$/,/^## Detailed failed tests/{
s/^[ ]*\([1-9][0-9]*\):.*/\1/p
}
/^## Detailed failed tests/q
'] "$at_suite_log"`
AS_VAR_APPEND([at_groups], ["$at_oldfails$as_nl"])
fi
# Sort the tests, removing duplicates.
at_groups=`AS_ECHO(["$at_groups"]) | sort -nu | sed '/^$/d'`
fi
if test x"$at_color" = xalways \
|| { test x"$at_color" = xauto && test -t 1; }; then
at_red=`printf '\033@<:@0;31m'`
at_grn=`printf '\033@<:@0;32m'`
at_lgn=`printf '\033@<:@1;32m'`
at_blu=`printf '\033@<:@1;34m'`
at_std=`printf '\033@<:@m'`
else
at_red= at_grn= at_lgn= at_blu= at_std=
fi
m4_divert_pop([PARSE_ARGS_END])dnl
m4_divert_push([HELP])dnl
# Help message.
if $at_help_p; then
cat <<_ATEOF || at_write_fail=1
Usage: $[0] [[OPTION]... [VARIABLE=VALUE]... [TESTS]]
Run all the tests, or the selected TESTS, given by numeric ranges, and
save a detailed log file. Upon failure, create debugging scripts.
Do not change environment variables directly. Instead, set them via
command line arguments. Set \`AUTOTEST_PATH' to select the executables
to exercise. Each relative directory is expanded as build and source
directories relative to the top level of this distribution.
E.g., from within the build directory /tmp/foo-1.0, invoking this:
$ $[0] AUTOTEST_PATH=bin
is equivalent to the following, assuming the source directory is /src/foo-1.0:
PATH=/tmp/foo-1.0/bin:/src/foo-1.0/bin:\$PATH $[0]
_ATEOF
m4_divert_pop([HELP])dnl
m4_divert_push([HELP_MODES])dnl
cat <<_ATEOF || at_write_fail=1
Operation modes:
-h, --help print the help message, then exit
-V, --version print version number, then exit
-c, --clean remove all the files this test suite might create and exit
-l, --list describes all the tests, or the selected TESTS
_ATEOF
m4_divert_pop([HELP_MODES])dnl
m4_wrap([m4_divert_push([HELP_TUNING_BEGIN])dnl
cat <<_ATEOF || at_write_fail=1
dnl extra quoting prevents emacs whitespace mode from putting tabs in output
Execution tuning:
-C, --directory=DIR
[ change to directory DIR before starting]
--color[[=never|auto|always]]
[ ]m4_ifdef([AT_color],
[disable colored test results, or enable even without terminal],
[enable colored test results on terminal, or always])
-j, --jobs[[=N]]
[ Allow N jobs at once; infinite jobs with no arg (default 1)]
-k, --keywords=KEYWORDS
[ select the tests matching all the comma-separated KEYWORDS]
[ multiple \`-k' accumulate; prefixed \`!' negates a KEYWORD]
--recheck select all tests that failed or passed unexpectedly last time
-e, --errexit abort as soon as a test fails; implies --debug
-v, --verbose force more detailed output
[ default for debugging scripts]
-d, --debug inhibit clean up and top-level logging
[ default for debugging scripts]
-x, --trace enable tests shell tracing
_ATEOF
m4_divert_pop([HELP_TUNING_BEGIN])])dnl
m4_divert_push([HELP_END])dnl
cat <<_ATEOF || at_write_fail=1
Report bugs to .dnl
m4_ifdef([AT_PACKAGE_NAME],
[m4_ifset([AT_PACKAGE_URL], [
m4_defn([AT_PACKAGE_NAME]) home page: .])dnl
m4_if(m4_index(m4_defn([AT_PACKAGE_NAME]), [GNU ]), [0], [
General help using GNU software: .])])
_ATEOF
exit $at_write_fail
fi
# List of tests.
if $at_list_p; then
cat <<_ATEOF || at_write_fail=1
AT_TESTSUITE_NAME test groups:
NUM: FILE-NAME:LINE TEST-GROUP-NAME
KEYWORDS
_ATEOF
# Pass an empty line as separator between selected groups and help.
AS_ECHO(["$at_groups$as_nl$as_nl$at_help_all"]) |
awk 'NF == 1 && FS != ";" {
selected[[$ 1]] = 1
next
}
/^$/ { FS = ";" }
NF > 0 {
if (selected[[$ 1]]) {
printf " %3d: %-18s %s\n", $ 1, $ 2, $ 3
if ($ 4) {
lmax = 79
indent = " "
line = indent
len = length (line)
n = split ($ 4, a, " ")
for (i = 1; i <= n; i++) {
l = length (a[[i]]) + 1
if (i > 1 && len + l > lmax) {
print line
line = indent " " a[[i]]
len = length (line)
} else {
line = line " " a[[i]]
len += l
}
}
if (n)
print line
}
}
}' || at_write_fail=1
exit $at_write_fail
fi
m4_divert_pop([HELP_END])dnl
m4_divert_push([VERSION])dnl
if $at_version_p; then
AS_ECHO(["$as_me (AT_PACKAGE_STRING)"]) &&
cat <<\_ATEOF || at_write_fail=1
m4_divert_pop([VERSION])dnl
m4_divert_push([VERSION_END])dnl
_ATEOF
exit $at_write_fail
fi
m4_divert_pop([VERSION_END])dnl
m4_divert_push([TESTS_BEGIN])dnl
# Take any -C into account.
if $at_change_dir ; then
test x != "x$at_dir" && cd "$at_dir" \
|| AS_ERROR([unable to change directory])
at_dir=`pwd`
fi
# Load the config files for any default variable assignments.
for at_file in atconfig atlocal
do
test -r $at_file || continue
. ./$at_file || AS_ERROR([invalid content: $at_file])
done
# Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
: "${at_top_build_prefix=$at_top_builddir}"
# Perform any assignments requested during argument parsing.
eval "$at_debug_args"
# atconfig delivers names relative to the directory the test suite is
# in, but the groups themselves are run in testsuite-dir/group-dir.
if test -n "$at_top_srcdir"; then
builddir=../..
for at_dir_var in srcdir top_srcdir top_build_prefix
do
AS_VAR_COPY([at_val], [at_$at_dir_var])
case $at_val in
[[\\/$]]* | ?:[[\\/]]* ) at_prefix= ;;
*) at_prefix=../../ ;;
esac
AS_VAR_SET([$at_dir_var], [$at_prefix$at_val])
done
fi
m4_text_box([Directory structure.])
# This is the set of directories and files used by this script
# (non-literals are capitalized):
#
# TESTSUITE - the testsuite
# TESTSUITE.log - summarizes the complete testsuite run
# TESTSUITE.dir/ - created during a run, remains after -d or failed test
# + at-groups/ - during a run: status of all groups in run
# | + NNN/ - during a run: meta-data about test group NNN
# | | + check-line - location (source file and line) of current AT_CHECK
# | | + status - exit status of current AT_CHECK
# | | + stdout - stdout of current AT_CHECK
# | | + stder1 - stderr, including trace
# | | + stderr - stderr, with trace filtered out
# | | + test-source - portion of testsuite that defines group
# | | + times - timestamps for computing duration
# | | + pass - created if group passed
# | | + xpass - created if group xpassed
# | | + fail - created if group failed
# | | + xfail - created if group xfailed
# | | + skip - created if group skipped
# + at-stop - during a run: end the run if this file exists
# + at-source-lines - during a run: cache of TESTSUITE line numbers for extraction
# + 0..NNN/ - created for each group NNN, remains after -d or failed test
# | + TESTSUITE.log - summarizes the group results
# | + ... - files created during the group
# The directory the whole suite works in.
# Should be absolute to let the user `cd' at will.
at_suite_dir=$at_dir/$as_me.dir
# The file containing the suite ($at_dir might have changed since earlier).
at_suite_log=$at_dir/$as_me.log
# The directory containing helper files per test group.
at_helper_dir=$at_suite_dir/at-groups
# Stop file: if it exists, do not start new jobs.
at_stop_file=$at_suite_dir/at-stop
# The fifo used for the job dispatcher.
at_job_fifo=$at_suite_dir/at-job-fifo
if $at_clean; then
test -d "$at_suite_dir" &&
find "$at_suite_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
rm -f -r "$at_suite_dir" "$at_suite_log"
exit $?
fi
# Don't take risks: use only absolute directories in PATH.
#
# For stand-alone test suites (ie. atconfig was not found),
# AUTOTEST_PATH is relative to `.'.
#
# For embedded test suites, AUTOTEST_PATH is relative to the top level
# of the package. Then expand it into build/src parts, since users
# may create executables in both places.
AUTOTEST_PATH=`AS_ECHO(["$AUTOTEST_PATH"]) | sed "s|:|$PATH_SEPARATOR|g"`
at_path=
_AS_PATH_WALK([$AUTOTEST_PATH $PATH],
[test -n "$at_path" && AS_VAR_APPEND([at_path], [$PATH_SEPARATOR])
case $as_dir in
[[\\/]]* | ?:[[\\/]]* )
AS_VAR_APPEND([at_path], ["$as_dir"])
;;
* )
if test -z "$at_top_build_prefix"; then
# Stand-alone test suite.
AS_VAR_APPEND([at_path], ["$as_dir"])
else
# Embedded test suite.
AS_VAR_APPEND([at_path], ["$at_top_build_prefix$as_dir$PATH_SEPARATOR"])
AS_VAR_APPEND([at_path], ["$at_top_srcdir/$as_dir"])
fi
;;
esac])
# Now build and simplify PATH.
#
# There might be directories that don't exist, but don't redirect
# builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
at_new_path=
_AS_PATH_WALK([$at_path],
[test -d "$as_dir" || continue
case $as_dir in
[[\\/]]* | ?:[[\\/]]* ) ;;
* ) as_dir=`(cd "$as_dir" && pwd) 2>/dev/null` ;;
esac
case $PATH_SEPARATOR$at_new_path$PATH_SEPARATOR in
*$PATH_SEPARATOR$as_dir$PATH_SEPARATOR*) ;;
$PATH_SEPARATOR$PATH_SEPARATOR) at_new_path=$as_dir ;;
*) AS_VAR_APPEND([at_new_path], ["$PATH_SEPARATOR$as_dir"]) ;;
esac])
PATH=$at_new_path
export PATH
# Setting up the FDs.
m4_define([AS_MESSAGE_LOG_FD], [5])
dnl The parent needs two fds to the same fifo, otherwise, there is a race
dnl where the parent can read the fifo before a child opens it for writing
m4_define([AT_JOB_FIFO_IN_FD], [6])
m4_define([AT_JOB_FIFO_OUT_FD], [7])
[#] AS_MESSAGE_LOG_FD is the log file. Not to be overwritten if `-d'.
if $at_debug_p; then
at_suite_log=/dev/null
else
: >"$at_suite_log"
fi
exec AS_MESSAGE_LOG_FD>>"$at_suite_log"
# Banners and logs.
AS_BOX(m4_defn([AT_TESTSUITE_NAME])[.])
{
AS_BOX(m4_defn([AT_TESTSUITE_NAME])[.])
echo
AS_ECHO(["$as_me: command line was:"])
AS_ECHO([" \$ $[0] $at_cli_args"])
echo
# If ChangeLog exists, list a few lines in case it might help determining
# the exact version.
if test -n "$at_top_srcdir" && test -f "$at_top_srcdir/ChangeLog"; then
AS_BOX([ChangeLog.])
echo
sed 's/^/| /;10q' "$at_top_srcdir/ChangeLog"
echo
fi
AS_UNAME
echo
# Contents of the config files.
for at_file in atconfig atlocal
do
test -r $at_file || continue
AS_ECHO(["$as_me: $at_file:"])
sed 's/^/| /' $at_file
echo
done
} >&AS_MESSAGE_LOG_FD
m4_divert_pop([TESTS_BEGIN])dnl
m4_divert_push([PREPARE_TESTS])dnl
{
AS_BOX([Tested programs.])
echo
} >&AS_MESSAGE_LOG_FD
# Report what programs are being tested.
for at_program in : $at_tested
do
test "$at_program" = : && continue
case $at_program in
[[\\/]* | ?:[\\/]* ) $at_program_=$at_program ;;]
* )
_AS_PATH_WALK([$PATH], [test -f "$as_dir/$at_program" && break])
at_program_=$as_dir/$at_program ;;
esac
if test -f "$at_program_"; then
{
AS_ECHO(["$at_srcdir/AT_LINE: $at_program_ --version"])
"$at_program_" --version &AS_MESSAGE_LOG_FD 2>&1
else
AS_ERROR([cannot find $at_program])
fi
done
{
AS_BOX([Running the tests.])
} >&AS_MESSAGE_LOG_FD
at_start_date=`date`
at_start_time=`date +%s 2>/dev/null`
AS_ECHO(["$as_me: starting at: $at_start_date"]) >&AS_MESSAGE_LOG_FD
m4_divert_pop([PREPARE_TESTS])dnl
m4_divert_push([TESTS])dnl
# Create the master directory if it doesn't already exist.
AS_MKDIR_P(["$at_suite_dir"]) ||
AS_ERROR([cannot create `$at_suite_dir'])
# Can we diff with `/dev/null'? DU 5.0 refuses.
if diff /dev/null /dev/null >/dev/null 2>&1; then
at_devnull=/dev/null
else
at_devnull=$at_suite_dir/devnull
>"$at_devnull"
fi
# Use `diff -u' when possible.
if at_diff=`diff -u "$at_devnull" "$at_devnull" 2>&1` && test -z "$at_diff"
then
at_diff='diff -u'
else
at_diff=diff
fi
# Get the last needed group.
for at_group in : $at_groups; do :; done
# Extract the start and end lines of each test group at the tail
# of this file
awk '
BEGIN { FS="" }
/^@%:@AT_START_/ {
start = NR
}
/^@%:@AT_STOP_/ {
test = substr ($ 0, 10)
print "at_sed" test "=\"1," start "d;" (NR-1) "q\""
if (test == "'"$at_group"'") exit
}' "$at_myself" > "$at_suite_dir/at-source-lines" &&
. "$at_suite_dir/at-source-lines" ||
AS_ERROR([cannot create test line number cache])
rm -f "$at_suite_dir/at-source-lines"
# Set number of jobs for `-j'; avoid more jobs than test groups.
set X $at_groups; shift; at_max_jobs=$[@%:@]
if test $at_max_jobs -eq 0; then
at_jobs=1
fi
if test $at_jobs -ne 1 &&
{ test $at_jobs -eq 0 || test $at_jobs -gt $at_max_jobs; }; then
at_jobs=$at_max_jobs
fi
# If parallel mode, don't output banners, don't split summary lines.
if test $at_jobs -ne 1; then
at_print_banners=false
at_quiet=:
fi
# Set up helper dirs.
rm -rf "$at_helper_dir" &&
mkdir "$at_helper_dir" &&
cd "$at_helper_dir" &&
{ test -z "$at_groups" || mkdir $at_groups; } ||
AS_ERROR([testsuite directory setup failed])
# Functions for running a test group. We leave the actual
# test group execution outside of a shell function in order
# to avoid hitting zsh 4.x exit status bugs.
AS_FUNCTION_DESCRIBE([at_fn_group_prepare], [],
[Prepare for running a test group.])
at_fn_group_prepare ()
{
# The directory for additional per-group helper files.
at_job_dir=$at_helper_dir/$at_group
# The file containing the location of the last AT_CHECK.
at_check_line_file=$at_job_dir/check-line
# The file containing the exit status of the last command.
at_status_file=$at_job_dir/status
# The files containing the output of the tested commands.
at_stdout=$at_job_dir/stdout
at_stder1=$at_job_dir/stder1
at_stderr=$at_job_dir/stderr
# The file containing the code for a test group.
at_test_source=$at_job_dir/test-source
# The file containing dates.
at_times_file=$at_job_dir/times
# Be sure to come back to the top test directory.
cd "$at_suite_dir"
# Clearly separate the test groups when verbose.
$at_first || $at_verbose echo
at_group_normalized=$at_group
_AT_NORMALIZE_TEST_GROUP_NUMBER(at_group_normalized)
# Create a fresh directory for the next test group, and enter.
# If one already exists, the user may have invoked ./run from
# within that directory; we remove the contents, but not the
# directory itself, so that we aren't pulling the rug out from
# under the shell's notion of the current directory.
at_group_dir=$at_suite_dir/$at_group_normalized
at_group_log=$at_group_dir/$as_me.log
_AS_CLEAN_DIR("$at_group_dir") ||
AS_WARN([test directory for $at_group_normalized could not be cleaned])
# Be tolerant if the above `rm' was not able to remove the directory.
AS_MKDIR_P(["$at_group_dir"])
echo 0 > "$at_status_file"
# In verbose mode, append to the log file *and* show on
# the standard output; in quiet mode only write to the log.
if test -z "$at_verbose"; then
at_tee_pipe='tee -a "$at_group_log"'
else
at_tee_pipe='cat >> "$at_group_log"'
fi
}
AS_FUNCTION_DESCRIBE([at_fn_group_banner], [[ORDINAL LINE DESC PAD [BANNER]]],
[Declare the test group ORDINAL, located at LINE with group description
DESC, and residing under BANNER. Use PAD to align the status column.])
at_fn_group_banner ()
{
at_setup_line="$[2]"
test -n "$[5]" && at_fn_banner $[5]
at_desc="$[3]"
case $[1] in
[[0-9]]) at_desc_line=" $[1]: ";;
[[0-9][0-9]]) at_desc_line=" $[1]: " ;;
[*]) at_desc_line="$[1]: " ;;
esac
AS_VAR_APPEND([at_desc_line], ["$[3]$[4]"])
$at_quiet AS_ECHO_N(["$at_desc_line"])
echo "# -*- compilation -*-" >> "$at_group_log"
}
AS_FUNCTION_DESCRIBE([at_fn_group_postprocess], [],
[Perform cleanup after running a test group.])
at_fn_group_postprocess ()
{
# Be sure to come back to the suite directory, in particular
# since below we might `rm' the group directory we are in currently.
cd "$at_suite_dir"
if test ! -f "$at_check_line_file"; then
sed "s/^ */$as_me: WARNING: /" <<_ATEOF
A failure happened in a test group before any test could be
run. This means that test suite is improperly designed. Please
report this failure to .
_ATEOF
AS_ECHO(["$at_setup_line"]) >"$at_check_line_file"
at_status=99
fi
$at_verbose AS_ECHO_N(["$at_group. $at_setup_line: "])
AS_ECHO_N(["$at_group. $at_setup_line: "]) >> "$at_group_log"
case $at_xfail:$at_status in
yes:0)
at_msg="UNEXPECTED PASS"
at_res=xpass
at_errexit=$at_errexit_p
at_color=$at_red
;;
no:0)
at_msg="ok"
at_res=pass
at_errexit=false
at_color=$at_grn
;;
*:77)
at_msg='skipped ('`cat "$at_check_line_file"`')'
at_res=skip
at_errexit=false
at_color=$at_blu
;;
no:* | *:99)
at_msg='FAILED ('`cat "$at_check_line_file"`')'
at_res=fail
at_errexit=$at_errexit_p
at_color=$at_red
;;
yes:*)
at_msg='expected failure ('`cat "$at_check_line_file"`')'
at_res=xfail
at_errexit=false
at_color=$at_lgn
;;
esac
echo "$at_res" > "$at_job_dir/$at_res"
# In parallel mode, output the summary line only afterwards.
if test $at_jobs -ne 1 && test -n "$at_verbose"; then
AS_ECHO(["$at_desc_line $at_color$at_msg$at_std"])
else
# Make sure there is a separator even with long titles.
AS_ECHO([" $at_color$at_msg$at_std"])
fi
at_log_msg="$at_group. $at_desc ($at_setup_line): $at_msg"
case $at_status in
0|77)
# $at_times_file is only available if the group succeeded.
# We're not including the group log, so the success message
# is written in the global log separately. But we also
# write to the group log in case they're using -d.
if test -f "$at_times_file"; then
at_log_msg="$at_log_msg ("`sed 1d "$at_times_file"`')'
rm -f "$at_times_file"
fi
AS_ECHO(["$at_log_msg"]) >> "$at_group_log"
AS_ECHO(["$at_log_msg"]) >&AS_MESSAGE_LOG_FD
# Cleanup the group directory, unless the user wants the files
# or the success was unexpected.
if $at_debug_p || test $at_res = xpass; then
at_fn_create_debugging_script
if test $at_res = xpass && $at_errexit; then
echo stop > "$at_stop_file"
fi
else
if test -d "$at_group_dir"; then
find "$at_group_dir" -type d ! -perm -700 -exec chmod u+rwx \{\} \;
rm -fr "$at_group_dir"
fi
rm -f "$at_test_source"
fi
;;
*)
# Upon failure, include the log into the testsuite's global
# log. The failure message is written in the group log. It
# is later included in the global log.
AS_ECHO(["$at_log_msg"]) >> "$at_group_log"
# Upon failure, keep the group directory for autopsy, and create
# the debugging script. With -e, do not start any further tests.
at_fn_create_debugging_script
if $at_errexit; then
echo stop > "$at_stop_file"
fi
;;
esac
}
m4_text_box([Driver loop.])
dnl Catching signals correctly:
dnl
dnl The first idea was: trap the signal, send it to all spawned jobs,
dnl then reset the handler and reraise the signal for ourselves.
dnl However, before exiting, ksh will then send the signal to all
dnl process group members, potentially killing the outer testsuite
dnl and/or the 'make' process driving us.
dnl So now the strategy is: trap the signal, send it to all spawned jobs,
dnl then exit the script with the right status.
dnl
dnl In order to let the jobs know about the signal, we cannot just send it
dnl to the current process group (kill $SIG 0), for the same reason as above.
dnl Also, it does not reliably stop the suite to send the signal to the
dnl spawned processes, because they might not transport it further
dnl (maybe this can be fixed?).
dnl
dnl So what we do is enable shell job control if available, which causes the
dnl shell to start each parallel task as its own shell job, thus as a new
dnl process group leader. We then send the signal to all new process groups.
dnl Do we have job control?
if (set -m && set +m && set +b) >/dev/null 2>&1; then
set +b
at_job_control_on='set -m' at_job_control_off='set +m' at_job_group=-
else
at_job_control_on=: at_job_control_off=: at_job_group=
fi
for at_signal in 1 2 15; do
dnl This signal handler is not suitable for PIPE: it causes writes.
dnl The code that was interrupted may have the errexit, monitor, or xtrace
dnl flags enabled, so sanitize.
trap 'set +x; set +e
$at_job_control_off
at_signal='"$at_signal"'
dnl Safety belt: even with runaway processes, prevent starting new jobs.
echo stop > "$at_stop_file"
dnl Do not enter this area multiple times, do not kill self prematurely.
trap "" $at_signal
dnl Gather process group IDs of currently running jobs.
at_pgids=
for at_pgid in `jobs -p 2>/dev/null`; do
at_pgids="$at_pgids $at_job_group$at_pgid"
done
dnl Ignore `kill' errors, as some jobs may have finished in the meantime.
test -z "$at_pgids" || kill -$at_signal $at_pgids 2>/dev/null
dnl wait until all jobs have exited.
wait
dnl Status output. Do this after waiting for the jobs, for ordered output.
dnl Avoid scribbling onto the end of a possibly incomplete line.
if test "$at_jobs" -eq 1 || test -z "$at_verbose"; then
echo >&2
fi
at_signame=`kill -l $at_signal 2>&1 || echo $at_signal`
set x $at_signame
test $# -gt 2 && at_signame=$at_signal
AS_WARN([caught signal $at_signame, bailing out])
dnl Do not reinstall the default handler here and reraise the signal to
dnl let the default handler do its job, see the note about ksh above.
dnl trap - $at_signal
dnl kill -$at_signal $$
dnl Instead, exit with appropriate status.
AS_VAR_ARITH([exit_status], [128 + $at_signal])
AS_EXIT([$exit_status])' $at_signal
done
rm -f "$at_stop_file"
at_first=:
if test $at_jobs -ne 1 &&
rm -f "$at_job_fifo" &&
test -n "$at_job_group" &&
( mkfifo "$at_job_fifo" && trap 'exit 1' PIPE STOP TSTP ) 2>/dev/null
then
# FIFO job dispatcher.
dnl Since we use job control, we need to propagate TSTP.
dnl This handler need not be used for serial execution.
dnl Again, we should stop all processes in the job groups, otherwise
dnl the stopping will not be effective while one test group is running.
dnl Apparently ksh does not honor the TSTP trap.
dnl As a safety measure, not use the same variable names as in the
dnl termination handlers above, one might get called during execution
dnl of the other.
trap 'at_pids=
for at_pid in `jobs -p`; do
at_pids="$at_pids $at_job_group$at_pid"
done
dnl Send it to all spawned jobs, ignoring those finished meanwhile.
if test -n "$at_pids"; then
dnl Unfortunately, ksh93 fork-bombs when we send TSTP, so send STOP
dnl if this might be ksh (STOP prevents possible TSTP handlers inside
dnl AT_CHECKs from running). Then stop ourselves.
at_sig=TSTP
test "${TMOUT+set}" = set && at_sig=STOP
kill -$at_sig $at_pids 2>/dev/null
fi
kill -STOP $$
dnl We got a CONT, so let's go again. Passing this to all processes
dnl in the groups is necessary (because we stopped them), but it may
dnl cause changed test semantics; e.g., a sleep will be interrupted.
test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
echo
# Turn jobs into a list of numbers, starting from 1.
at_joblist=`AS_ECHO(["$at_groups"]) | sed -n 1,${at_jobs}p`
set X $at_joblist
shift
for at_group in $at_groups; do
dnl Enable job control only for spawning the test group:
dnl Let the jobs to run in separate process groups, but
dnl avoid all the status output by the shell.
$at_job_control_on 2>/dev/null
(
# Start one test group.
$at_job_control_off
dnl First child must open the fifo to avoid blocking parent; all other
dnl children inherit it already opened from the parent.
if $at_first; then
exec AT_JOB_FIFO_OUT_FD>"$at_job_fifo"
else
dnl Children do not need parent's copy of fifo.
exec AT_JOB_FIFO_IN_FD<&-
fi
dnl When a child receives PIPE, be sure to write back the token,
dnl so the master does not hang waiting for it.
dnl errexit and xtrace should not be set in this shell instance,
dnl except as debug measures. However, shells such as dash may
dnl optimize away the _AT_CHECK subshell, so normalize here.
trap 'set +x; set +e
dnl Ignore PIPE signals that stem from writing back the token.
trap "" PIPE
echo stop > "$at_stop_file"
echo >&AT_JOB_FIFO_OUT_FD
dnl Do not reraise the default PIPE handler.
dnl It wreaks havoc with ksh, see above.
dnl trap - 13
dnl kill -13 $$
AS_EXIT([141])' PIPE
at_fn_group_prepare
if cd "$at_group_dir" &&
at_fn_test $at_group &&
. "$at_test_source"
then :; else
AS_WARN([unable to parse test group: $at_group])
at_failed=:
fi
at_fn_group_postprocess
echo >&AT_JOB_FIFO_OUT_FD
) &
$at_job_control_off
if $at_first; then
at_first=false
exec AT_JOB_FIFO_IN_FD<"$at_job_fifo" AT_JOB_FIFO_OUT_FD>"$at_job_fifo"
fi
shift # Consume one token.
if test $[@%:@] -gt 0; then :; else
read at_token <&AT_JOB_FIFO_IN_FD || break
set x $[*]
fi
test -f "$at_stop_file" && break
done
exec AT_JOB_FIFO_OUT_FD>&-
# Read back the remaining ($at_jobs - 1) tokens.
set X $at_joblist
shift
if test $[@%:@] -gt 0; then
shift
for at_job
do
read at_token
done <&AT_JOB_FIFO_IN_FD
fi
exec AT_JOB_FIFO_IN_FD<&-
wait
else
# Run serially, avoid forks and other potential surprises.
for at_group in $at_groups; do
at_fn_group_prepare
if cd "$at_group_dir" &&
at_fn_test $at_group &&
. "$at_test_source"; then :; else
AS_WARN([unable to parse test group: $at_group])
at_failed=:
fi
at_fn_group_postprocess
test -f "$at_stop_file" && break
at_first=false
done
fi
# Wrap up the test suite with summary statistics.
cd "$at_helper_dir"
# Use ?..???? when the list must remain sorted, the faster * otherwise.
at_pass_list=`for f in */pass; do echo $f; done | sed '/\*/d; s,/pass,,'`
at_skip_list=`for f in */skip; do echo $f; done | sed '/\*/d; s,/skip,,'`
at_xfail_list=`for f in */xfail; do echo $f; done | sed '/\*/d; s,/xfail,,'`
at_xpass_list=`for f in ?/xpass ??/xpass ???/xpass ????/xpass; do
echo $f; done | sed '/?/d; s,/xpass,,'`
at_fail_list=`for f in ?/fail ??/fail ???/fail ????/fail; do
echo $f; done | sed '/?/d; s,/fail,,'`
set X $at_pass_list $at_xpass_list $at_xfail_list $at_fail_list $at_skip_list
shift; at_group_count=$[@%:@]
set X $at_xpass_list; shift; at_xpass_count=$[@%:@]; at_xpass_list=$[*]
set X $at_xfail_list; shift; at_xfail_count=$[@%:@]
set X $at_fail_list; shift; at_fail_count=$[@%:@]; at_fail_list=$[*]
set X $at_skip_list; shift; at_skip_count=$[@%:@]
AS_VAR_ARITH([at_run_count], [$at_group_count - $at_skip_count])
AS_VAR_ARITH([at_unexpected_count], [$at_xpass_count + $at_fail_count])
AS_VAR_ARITH([at_total_fail_count], [$at_xfail_count + $at_fail_count])
# Back to the top directory.
cd "$at_dir"
rm -rf "$at_helper_dir"
# Compute the duration of the suite.
at_stop_date=`date`
at_stop_time=`date +%s 2>/dev/null`
AS_ECHO(["$as_me: ending at: $at_stop_date"]) >&AS_MESSAGE_LOG_FD
case $at_start_time,$at_stop_time in
[[0-9]*,[0-9]*])
AS_VAR_ARITH([at_duration_s], [$at_stop_time - $at_start_time])
AS_VAR_ARITH([at_duration_m], [$at_duration_s / 60])
AS_VAR_ARITH([at_duration_h], [$at_duration_m / 60])
AS_VAR_ARITH([at_duration_s], [$at_duration_s % 60])
AS_VAR_ARITH([at_duration_m], [$at_duration_m % 60])
at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
AS_ECHO(["$as_me: test suite duration: $at_duration"]) >&AS_MESSAGE_LOG_FD
;;
esac
echo
AS_BOX([Test results.])
echo
{
echo
AS_BOX([Test results.])
echo
} >&AS_MESSAGE_LOG_FD
dnl
dnl FIXME: this code is as far from i18n-cleanness as man
dnl could imagine...
dnl
if test $at_run_count = 1; then
at_result="1 test"
at_were=was
else
at_result="$at_run_count tests"
at_were=were
fi
if $at_errexit_p && test $at_unexpected_count != 0; then
if test $at_xpass_count = 1; then
at_result="$at_result $at_were run, one passed"
else
at_result="$at_result $at_were run, one failed"
fi
at_result="$at_result unexpectedly and inhibited subsequent tests."
at_color=$at_red
else
# Don't you just love exponential explosion of the number of cases?
at_color=$at_red
case $at_xpass_count:$at_fail_count:$at_xfail_count in
# So far, so good.
0:0:0) at_result="$at_result $at_were successful." at_color=$at_grn ;;
0:0:*) at_result="$at_result behaved as expected." at_color=$at_lgn ;;
# Some unexpected failures
0:*:0) at_result="$at_result $at_were run,
$at_fail_count failed unexpectedly." ;;
# Some failures, both expected and unexpected
0:*:1) at_result="$at_result $at_were run,
$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
0:*:*) at_result="$at_result $at_were run,
$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
# No unexpected failures, but some xpasses
*:0:*) at_result="$at_result $at_were run,
$at_xpass_count passed unexpectedly." ;;
# No expected failures, but failures and xpasses
*:1:0) at_result="$at_result $at_were run,
$at_unexpected_count did not behave as expected dnl
($at_fail_count unexpected failure)." ;;
*:*:0) at_result="$at_result $at_were run,
$at_unexpected_count did not behave as expected dnl
($at_fail_count unexpected failures)." ;;
# All of them.
*:*:1) at_result="$at_result $at_were run,
$at_xpass_count passed unexpectedly,
$at_total_fail_count failed ($at_xfail_count expected failure)." ;;
*:*:*) at_result="$at_result $at_were run,
$at_xpass_count passed unexpectedly,
$at_total_fail_count failed ($at_xfail_count expected failures)." ;;
esac
if test $at_skip_count = 0 && test $at_run_count -gt 1; then
at_result="All $at_result"
fi
fi
# Now put skips in the mix.
case $at_skip_count in
0) ;;
1) at_result="$at_result
1 test was skipped." ;;
*) at_result="$at_result
$at_skip_count tests were skipped." ;;
esac
if test $at_unexpected_count = 0; then
echo "$at_color$at_result$at_std"
echo "$at_result" >&AS_MESSAGE_LOG_FD
else
echo "${at_color}ERROR: $at_result$at_std" >&2
echo "ERROR: $at_result" >&AS_MESSAGE_LOG_FD
{
echo
AS_BOX([Summary of the failures.])
# Summary of failed and skipped tests.
if test $at_fail_count != 0; then
echo "Failed tests:"
$SHELL "$at_myself" $at_fail_list --list
echo
fi
if test $at_skip_count != 0; then
echo "Skipped tests:"
$SHELL "$at_myself" $at_skip_list --list
echo
fi
if test $at_xpass_count != 0; then
echo "Unexpected passes:"
$SHELL "$at_myself" $at_xpass_list --list
echo
fi
if test $at_fail_count != 0; then
AS_BOX([Detailed failed tests.])
echo
for at_group in $at_fail_list
do
at_group_normalized=$at_group
_AT_NORMALIZE_TEST_GROUP_NUMBER(at_group_normalized)
cat "$at_suite_dir/$at_group_normalized/$as_me.log"
echo
done
echo
fi
if test -n "$at_top_srcdir"; then
AS_BOX([${at_top_build_prefix}config.log])
sed 's/^/| /' ${at_top_build_prefix}config.log
echo
fi
} >&AS_MESSAGE_LOG_FD
AS_BOX([$as_me.log was created.])
echo
if $at_debug_p; then
at_msg='per-test log files'
else
at_msg="\`${at_testdir+${at_testdir}/}$as_me.log'"
fi
AS_ECHO(["Please send $at_msg and all information you think might help:
To:
Subject: @<:@AT_PACKAGE_STRING@:>@ $as_me: dnl
$at_fail_list${at_fail_list:+ failed${at_xpass_list:+, }}dnl
$at_xpass_list${at_xpass_list:+ passed unexpectedly}
You may investigate any problem if you feel able to do so, in which
case the test suite provides a good starting point. Its output may
be found below \`${at_testdir+${at_testdir}/}$as_me.dir'.
"])
exit 1
fi
exit 0
m4_text_box([Actual tests.])
m4_divert_pop([TESTS])dnl
dnl End of AT_INIT: divert to KILL, only test groups are to be
dnl output, the rest is ignored. Current diversion is BODY, inherited
dnl from M4sh.
m4_divert([KILL])
T14,37
m4_PACKAGE_URLhttp://www.gnu.org/software/autoconf/
T11,62
m4_cr_alnumabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
T9,127
_m4_splitm4_changequote([-=<{(],[)}>=-])[m4_bpatsubst(-=<{(-=<{($1)}>=-)}>=-, -=<{($2)}>=-,
-=<{(]$3[)}>=-)]m4_changequote([, ])
T20,3
_m4_divert(HELP_END)305
T7,108
m4_joinm4_if([$#], [1], [],
[$#], [2], [[$2]],
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift2($@))])
T10,120
_AS_ESCAPEm4_if(m4_index(m4_translit([[$1]], [$3], [$2$2$2$2]), [$2]), [-1],
[$0_], [m4_bpatsubst])([$1], [[$2$3]], [\\\&])
F7,6
m4_exitm4exit
F12,8
_m4_undefineundefine
T20,676
_AT_DECIDE_TRACEABLEm4_pushdef([at_reason],
m4_cond([m4_eval(m4_index([$1], [`]) >= 0)], [1],
[[a `...` command substitution]],
[m4_eval(m4_index([$1], [$(]) >= 0)], [1],
[[a $(...) command substitution]],
[m4_eval(m4_index([$1], [${]) >= 0)], [1],
[[a ${...} parameter expansion]],
[m4_eval(m4_index([$1], m4_newline) >= 0)], [1],
[[an embedded newline]],
[m4_eval(m4_bregexp([$1], [[^|]|[^|]]) >= 0)], [1],
[[a shell pipeline]],
[]))m4_if(m4_index(_m4_defn([at_reason]), [a]), [0],[at_fn_check_prepare_notrace '_m4_defn([at_reason])'],
m4_index([$1], [$]), [-1],[at_fn_check_prepare_trace],[at_fn_check_prepare_dynamic "AS_ESCAPE([[$1]], [`\"])"])[]_m4_popdef([at_reason])
T31,29
m4_location(_AS_SHELL_SANITIZE)../../lib/m4sugar/m4sh.m4:451
T22,38
AT_DIFF_STDERR(stderr)echo stderr:; tee stderr <"$at_stderr"
T11,136
m4_undivertm4_if([$#], [0], [m4_fatal([$0: missing argument])],
[$#], [1], [_m4_undivert(_m4_divert([$1]))],
[m4_map_args([$0], $@)])
T21,101
m4_stack_foreach_lifo_m4_stack_reverse([$1], [m4_tmp-$1], [$2(_m4_defn([m4_tmp-$1]))])_m4_stack_reverse([m4_tmp-$1], [$1])
T9,72
m4_mapallm4_if([$2], [], [],
[_m4_foreach([m4_apply([$1],], [)], [], $2)])
T17,229
m4_cr_not_LETTERS
!"#*%&'()$+,./0123456789:;<=>?@[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T16,46
AT_DIFF_STDOUT()at_fn_diff_devnull "$at_stdout" || at_failed=:
T5,113
AS_IF_m4_defun_pro([$0])if $1; then :
$2
m4_map_args_pair([_$0], [_$0_ELSE], m4_shift2($@))fi[][]_m4_defun_epi([$0])
F5,6
m4_ififelse
T13,47
m4_copy_forcem4_ifdef([$2], [_m4_undefine([$2])])m4_copy($@)
T10,168
m4_combinem4_if([$2], [], [], m4_eval([$# > 3]), [1],
[m4_map_args_sep([m4_map_args_sep(m4_dquote(], [)[[$3]], [], [[$1]],]]m4_dquote(m4_dquote(m4_shift3($@)))[[)], [[$1]], $2)])
T20,35
_AT_DEFINE_INIT_LIST[AT_SETUP],[AT_CLEANUP],[AT_BANNER]
T6,26
AS_BOX_$0(m4_expand([$1]), [$2])
T22,3
_m4_divert(PARSE_ARGS)201
T12,64
_AS_ECHO_LOG_AS_ECHO([$as_me:${as_lineno-$LINENO}: $1], AS_MESSAGE_LOG_FD)[]
T12,131
_AS_ECHO_LOG_m4_defun_pro([$0])AS_REQUIRE([_AS_LINENO_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T8,66
m4_ifsetm4_ifdef([$1],
[m4_ifval(_m4_defn([$1]), [$2], [$3])],
[$3])
T23,29
m4_location(AS_REQUIRE)../../lib/m4sugar/m4sh.m4:385
T23,3
_m4_divert(HELP_TUNING)303
T27,1
_m4_divert(HEADER-REVISION)1
T15,76
_AS_BOX_LITERALAS_ECHO(["_AS_ESCAPE(m4_dquote(m4_expand([m4_text_box($@)])), [`], [\"$])"])
T13,116
_AS_BOX_INDIRsed 'h;s/./m4_default([$2], [-])/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
@%:@@%:@ $1 @%:@@%:@
_ASBOX
T11,54
m4_ifnblankm4_if(m4_translit([[$1]], [ ][ ][
]), [], [$3], [$2])
T14,2182
_AT_ARG_OPTION_m4_defun_pro([$0])m4_divert_once([HELP_OTHER],
[cat <<_ATEOF || at_write_fail=1
Other options:
_ATEOF
])dnl m4_divert_once HELP_OTHER
m4_divert_text([HELP_OTHER],
[cat <<_ATEOF || at_write_fail=1
$2
_ATEOF])dnl
dnl Turn our options into our desired strings
m4_ifdef([AT_first_option],[m4_undefine([AT_first_option])])dnl
m4_ifdef([AT_case],[m4_undefine([AT_case])])dnl
m4_ifdef([AT_case_no],[m4_undefine([AT_case_no])])dnl
m4_ifdef([AT_case_arg],[m4_undefine([AT_case_arg])])dnl
m4_foreach([AT_option], m4_split(m4_normalize([$1]),[[ \|]+]),
[m4_define_default([AT_first_option],AT_option)dnl
m4_define_default([AT_first_option_tr],
[m4_bpatsubst(m4_defn([AT_first_option]), -, [_])])dnl
m4_append([AT_case],m4_if(m4_len(AT_option),1,[],[-])[-]AT_option, [ | ])dnl
m4_append([AT_case_no],[--no-]AT_option, [ | ])dnl
m4_append([AT_case_arg],
m4_if(m4_len(AT_option),1,[],[-])[-]AT_option[=*], [ | ])dnl
])dnl m4_foreach AT_option
dnl keep track so we or the user may process ACTION-IF-NOT-GIVEN
m4_divert_once([PARSE_ARGS_BEGIN],
[
##
## Set up package specific options.
##
])dnl
m4_divert_text([PARSE_ARGS_BEGIN],
[dnl Provide a default value for options without arguments.
m4_ifvaln([$3],,[at_arg_[]AT_first_option_tr=false])dnl
at_arg_given_[]AT_first_option_tr=false
])dnl m4_divert_text DEFAULTS
m4_divert_text([PARSE_ARGS],
[dnl Parse the options and args when necessary.
m4_ifvaln([$3],
[ AT_case )
at_prev=--AT_first_option_tr
;;
AT_case_arg )
at_arg_[]AT_first_option_tr=$at_optarg
at_arg_given_[]AT_first_option_tr=:
$4
;;],
[ AT_case )
at_optarg=:
at_arg_[]AT_first_option_tr=:
at_arg_given_[]AT_first_option_tr=:
m4_ifval([$4],[$4])[]dnl
;;
AT_case_no )
at_optarg=false
at_arg_[]AT_first_option_tr=false
at_arg_given_[]AT_first_option_tr=:
m4_ifval([$4],[$4])[]dnl
;;])dnl m4_ifvaln $3
])dnl m4_divert_text PARSE_ARGS
m4_ifvaln([$5],
[m4_divert_once([PARSE_ARGS_END],
[
##
## Process package specific options when _not_ supplied.
##])dnl m4_divert_once PARSE_ARGS_END
m4_divert_text([PARSE_ARGS_END],
[
AS_IF([$at_arg_given_[]AT_first_option_tr],,[$5])dnl
])dnl m4_divert_text PARSE_ARGS_END
])dnl m4_ifvaln $5
[]_m4_defun_epi([$0])
T8,94
AS_UNSET_m4_defun_pro([$0]){ AS_LITERAL_WORD_IF([$1], [], [eval ])$1=; unset $1;}[]_m4_defun_epi([$0])
T22,3
_m4_divert(HELP_OTHER)304
T18,144
AS_VERSION_COMPAREas_arg_v1=$1
as_arg_v2=$2
awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
AS_CASE([$?],
[1], [$3],
[0], [$4],
[2], [$5])[]
T18,124
AS_VERSION_COMPARE_m4_defun_pro([$0])AS_REQUIRE([_$0_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
F8,5
m4_shiftshift
T28,1
_m4_divert(HEADER-COPYRIGHT)3
T16,222
_AS_BASENAME_SED_m4_defun_pro([$0])AS_ECHO([X/[]$1]) |
sed ['/^.*\/\([^/][^/]*\)\/*$/{
s//\1/
q
}
/^X\/\(\/\/\)$/{
s//\1/
q
}
/^X\/\(\/\).*/{
s//\1/
q
}
s/.*/./; q'][]_m4_defun_epi([$0])
T11,160
m4_undefinem4_if([$#], [0], [[$0]],
[$#], [1], [m4_ifdef([$1], [_m4_undefine([$1])],
[m4_fatal([$0: undefined macro: $1])])],
[m4_map_args([$0], $@)])
T29,30
m4_location(_AS_LN_S_PREPARE)../../lib/m4sugar/m4sh.m4:1223
T20,20
m4_PACKAGE_BUGREPORTbug-autoconf@gnu.org
T21,479
_AS_VAR_ARITH_PREPARE_m4_defun_pro([$0])AS_FUNCTION_DESCRIBE([as_fn_arith], [ARG...],
[Perform arithmetic evaluation on the ARGs, and store the result in
the global $as_val. Take advantage of shells that can avoid forks.
The arguments must be portable across $(()) and expr.])
AS_IF([_AS_RUN(["AS_ESCAPE(m4_quote(_AS_VAR_ARITH_WORKS))"])],
[eval 'as_fn_arith ()
{
as_val=$(( $[]* ))
}'],
[as_fn_arith ()
{
as_val=`expr "$[]@" || test $? -eq 1`
}]) # as_fn_arith
[]_m4_defun_epi([$0])
T30,29
m4_location(_AS_BASENAME_EXPR)../../lib/m4sugar/m4sh.m4:921
T9,75
AS_ESCAPE_$0([$1], m4_if([$2], [], [[`], [\"$]], [m4_substr([$2], [0], [1]), [$2]]))
T20,111
m4_stack_foreach_sep_m4_stack_reverse([$1], [m4_tmp-$1])_m4_stack_reverse([m4_tmp-$1], [$1], [$2[]_m4_defn([m4_tmp-$1])$3], [$4[]])
T10,79
_m4_shiftnm4_if([$1], 1, [m4_shift(],
[$0(m4_decr([$1])]), m4_shift(m4_shift($@)))
T15,114
AS_VAR_TEST_SETAS_LITERAL_WORD_IF([$1],
[${$1+:} false],
[{ as_var=$1; eval \${$as_var+:} false; }],
[eval \${$1+:} false])
T11,162
m4_dumpdefsm4_if([$#], [0], [m4_fatal([$0: missing argument])],
[$#], [1], [m4_stack_foreach_lifo([$1], [m4_dumpdef([$1])m4_ignore])],
[m4_map_args([$0], $@)])
T13,124
_m4_defun_prom4_ifdef([_m4_expansion_stack], [], [_m4_defun_pro_outer([$1])])m4_expansion_stack_push([$1])m4_pushdef([_m4_expanding($1)])
T17,57
AS_LINENO_PREPARE_m4_defun_pro([$0])AS_REQUIRE([_$0])[]_m4_defun_epi([$0])
T7,13
AS_ECHO$as_echo $1[]
T7,124
AS_ECHO_m4_defun_pro([$0])AS_REQUIRE([_$0_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T4,37
m4_nm4_if([$1],
[], [],
[$1
])
T17,77
AT_ARG_OPTION_ARG_m4_defun_pro([$0])_AT_ARG_OPTION([$1],[$2],1,[$3],[$4])[]_m4_defun_epi([$0])
T13,76
AT_ARG_OPTION_m4_defun_pro([$0])_AT_ARG_OPTION([$1],[$2],,[$3],[$4])[]_m4_defun_epi([$0])
T17,604
_AS_SHELL_FN_WORKas_fn_return () { (exit [$]1); }
as_fn_success () { as_fn_return 0; }
as_fn_failure () { as_fn_return 1; }
as_fn_ret_success () { return 0; }
as_fn_ret_failure () { return 1; }
exitcode=0
as_fn_success || { exitcode=1; echo as_fn_success failed.; }
as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
AS_IF([( set x; as_fn_ret_success y && test x = "[$]1" )], [],
[exitcode=1; echo positional parameters were not saved.])
test x$exitcode = x0[]
T28,0
AT_DIFF_STDOUT(ignore-nolog)
T9,35
AT_TESTEDm4_append_uniq_w([AT_tested], [$1])
T18,40
_m4_set_differencem4_set_contains([$1], [$2], [], [,[$2]])
T10,137
_m4_divertm4_ifdef([_m4_divert($1)],
[m4_indir([_m4_divert($1)])],
[m4_if([$2], [], [m4_warn([syntax],
[prefer named diversions])])$1])
T9,265
_AS_QUOTEm4_cond([m4_index([$1], [\])], [-1], [_AS_QUOTE_MODERN],
[m4_eval(m4_index(m4_translit([[$1]], [$], [\]), [\\]) >= 0)],
[1], [_AS_QUOTE_MODERN],
[m4_eval(m4_index(m4_translit([[$1]], ["], [`]), [\`]) >= 0)],dnl"
[1], [_AS_QUOTE_OLD],
[_AS_QUOTE_MODERN])([$1])
T16,137
_AS_DIRNAME_EXPR$as_expr X[]$1 : 'X\(.*[[^/]]\)//*[[^/][^/]]*/*$' \| \
X[]$1 : 'X\(//\)[[^/]]' \| \
X[]$1 : 'X\(//\)$' \| \
X[]$1 : 'X\(/\)' \| .[]
T16,129
_AS_DIRNAME_EXPR_m4_defun_pro([$0])AS_REQUIRE([_AS_EXPR_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T23,29
m4_location(AS_MESSAGE)../../lib/m4sugar/m4sh.m4:834
T16,298
m4_map_args_pairm4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
[$#], [1], [m4_fatal([$0: too few arguments: $#: $1])],
[$#], [2], [],
[$#], [3], [m4_default([$2], [$1])([$3])[]],
[$#], [4], [$1([$3], [$4])[]],
[$1([$3], [$4])[]$0([$1], [$2], m4_shift(m4_shift3($@)))])
T18,256
_m4_set_dump_checkm4_ifdef([_m4_set([$1])],
[m4_set_contains([$1], _m4_defn([_m4_set([$1])]),
[[$2]_m4_defn([_m4_set([$1])])])_m4_popdef(
[_m4_set([$1],]_m4_defn([_m4_set([$1])])[)],
[_m4_set([$1])])$0([$1], [$2$3])],
[_m4_popdef([_m4_set_cleanup($1)])])
T8,0
__unix__
T15,49
m4_rename_forcem4_ifdef([$2], [_m4_undefine([$2])])m4_rename($@)
T14,166
m4_cleardivertm4_if([$#], [0], [m4_fatal([$0: missing argument])],
[_m4_divert_raw([-1])m4_undivert($@)_m4_divert_raw(
_m4_divert(_m4_defn([_m4_divert_diversion]), [-]))])
T14,42
_m4_defun_oncem4_pushdef([$1])$3[$2[]m4_provide([$1])]$4
T9,5
_m4_curry[$1])
T24,29
m4_location(_AS_PREPARE)../../lib/m4sugar/m4sh.m4:322
T14,53
m4_cr_symbols1abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_
T14,63
m4_cr_symbols2abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789
T15,180
m4_set_containsm4_ifdef([_m4_set_cleanup($1)],
[m4_if(m4_ifdef([_m4_set([$1],$2)],
[m4_indir([_m4_set([$1],$2)])], [0]), [1], [$3], [$4])],
[m4_ifdef([_m4_set([$1],$2)], [$3], [$4])])
T9,174
m4_expandm4_pushdef([m4_divert], _m4_defn([_m4_divert_unsafe]))m4_pushdef([m4_divert_push], _m4_defn([_m4_divert_unsafe]))m4_chomp(_$0([$1
]))_m4_popdef([m4_divert], [m4_divert_push])
T23,3173
_AS_DETECT_BETTER_SHELL_m4_defun_pro([$0])m4_if(_AS_FORCE_REEXEC_WITH_CONFIG_SHELL, [yes],
[# Use a proper internal environment variable to ensure we don't fall
# into an infinite loop, continuously re-executing ourselves.
if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
_as_can_reexec=no; export _as_can_reexec;
_AS_REEXEC_WITH_SHELL([$CONFIG_SHELL])
fi
# We don't want this to propagate to other subprocesses.
dnl This might be especially important in case an m4sh-generated script
dnl is used to later execute other m4sh-generated scripts. This happens
dnl for example in autoconf's own testsuite (and happens *a lot* there,
dnl in fact).
AS_UNSET([_as_can_reexec])
])m4_set_map([_AS_DETECT_SUGGESTED_BODY], [_AS_DETECT_SUGGESTED_PRUNE])m4_pushdef([AS_EXIT], [exit m4_default(]m4_dquote([$][1])[, 1)])if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="AS_ESCAPE(_m4_expand([_AS_BOURNE_COMPATIBLE]))"
_AS_DETECT_EXPAND([as_required], [_AS_DETECT_REQUIRED_BODY])
_AS_DETECT_EXPAND([as_suggested], [_AS_DETECT_SUGGESTED_BODY])
AS_IF([_AS_RUN(["$as_required"])],
[as_have_required=yes],
[as_have_required=no])
AS_IF([test x$as_have_required = xyes && _AS_RUN(["$as_suggested"])],
[],
[_AS_PATH_WALK([/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH],
[case $as_dir in @%:@(
/*)
for as_base in sh bash ksh sh5; do
# Try only shells that exist, to save several forks.
as_shell=$as_dir/$as_base
AS_IF([{ test -f "$as_shell" || test -f "$as_shell.exe"; } &&
_AS_RUN(["$as_required"], ["$as_shell"])],
[CONFIG_SHELL=$as_shell as_have_required=yes
m4_set_empty([_AS_DETECT_SUGGESTED_BODY], [break 2],
[AS_IF([_AS_RUN(["$as_suggested"], ["$as_shell"])],
[break 2])])])
done;;
esac],
[AS_IF([{ test -f "$SHELL" || test -f "$SHELL.exe"; } &&
_AS_RUN(["$as_required"], ["$SHELL"])],
[CONFIG_SHELL=$SHELL as_have_required=yes])])
AS_IF([test "x$CONFIG_SHELL" != x],
[export CONFIG_SHELL
_AS_REEXEC_WITH_SHELL([$CONFIG_SHELL])])
dnl Unfortunately, $as_me isn't available here.
AS_IF([test x$as_have_required = xno],
[AS_ECHO(["$[]0: This script requires a shell more modern than all"])
AS_ECHO(["$[]0: the shells that I found on your system."])
if test x${ZSH_VERSION+set} = xset ; then
AS_ECHO(["$[]0: In particular, zsh $ZSH_VERSION has bugs and should"])
AS_ECHO(["$[]0: be upgraded to zsh 4.3.4 or later."])
else
AS_ECHO("m4_text_wrap([Please tell ]_m4_defn([m4_PACKAGE_BUGREPORT])
m4_ifset([AC_PACKAGE_BUGREPORT], [m4_if(_m4_defn([m4_PACKAGE_BUGREPORT]),
_m4_defn([AC_PACKAGE_BUGREPORT]), [], [and _m4_defn([AC_PACKAGE_BUGREPORT])])])
[about your system, including any error possibly output before this message.
Then install a modern shell, or manually run the script under such a
shell if you do have one.], [$[]0: ], [], [62])")
fi
AS_EXIT])])
fi
SHELL=${CONFIG_SHELL-/bin/sh}
export SHELL
# Unset more variables known to interfere with behavior of common tools.
CLICOLOR_FORCE= GREP_OPTIONS=
unset CLICOLOR_FORCE GREP_OPTIONS
_m4_popdef([AS_EXIT])[]_m4_defun_epi([$0])
T14,96
_m4_bpatsubstsm4_if([$#], 2, [$1],
[$0(m4_builtin([patsubst], [[$1]], [$2], [$3]),
m4_shift3($@))])
T16,90
_AT_DEFINE_SETUPm4_define([$1], [m4_ifndef([AT_ingroup],
[m4_fatal([$1: missing AT_SETUP detected])])$2])
T15,36
m4_set_contentsm4_set_map_sep([$1], [], [], [[$2]])
T11,58
_AS_CLEANUPm4_divert_text([M4SH-SANITIZE], [_AS_DETECT_BETTER_SHELL])
T9,339
AS_VAR_IFAS_LITERAL_WORD_IF([$1],
[AS_IF(m4_ifval([$2], [[test "x$$1" = x[]$2]], [[${$1:+false} :]])],
[AS_VAR_COPY([as_val], [$1])
AS_IF(m4_ifval([$2], [[test "x$as_val" = x[]$2]], [[${as_val:+false} :]])],
[AS_IF(m4_ifval([$2],
[[eval test \"x\$"$1"\" = x"_AS_ESCAPE([$2], [`], [\"$])"]],
[[eval \${$1:+false} :]])]),
[$3], [$4])
T28,3
_m4_divert(PARSE_ARGS_BEGIN)200
T16,838
_AS_LN_S_PREPARE_m4_defun_pro([$0])rm -f conf$$ conf$$.exe conf$$.file
if test -d conf$$.dir; then
rm -f conf$$.dir/conf$$.file
else
rm -f conf$$.dir
mkdir conf$$.dir 2>/dev/null
fi
if (echo >conf$$.file) 2>/dev/null; then
if ln -s conf$$.file conf$$ 2>/dev/null; then
as_ln_s='ln -s'
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
# In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -pR'
fi
else
as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
[]_m4_defun_epi([$0])
T10,66
_AS_ECHO_NAS_ECHO_N(["_AS_QUOTE([$1])"]) >&m4_default([$2], [AS_MESSAGE_FD])
T12,24
m4_rename_m4m4_rename([$1], [m4_$1])
T7,93
_AS_BOXm4_if(m4_index(m4_translit([[$1]], [`\"], [$$$]), [$]),
[-1], [$0_LITERAL], [$0_INDIR])($@)
T18,29
m4_location(AS_IF)../../lib/m4sugar/m4sh.m4:639
F14,11
m4_changequotechangequote
T12,69
_m4_list_cmpm4_if([$1], [], [0m4_ignore], [$2], [0], [m4_unquote], [$2m4_ignore])
T14,73
_m4_mapall_sepm4_apply([$1], [$3])_m4_foreach([m4_apply([$2[]$1],], [)], m4_shift2($@))
T9,132
m4_divertm4_popdef([_m4_divert_stack])m4_define([_m4_divert_diversion], [$1])m4_divert_stack_push([$0], [$1])_m4_divert_raw(_m4_divert([$1]))
T26,30
m4_location(AS_VAR_APPEND)../../lib/m4sugar/m4sh.m4:1939
T13,293
m4_defun_oncem4_define([m4_location($1)], m4_location)m4_define([$1], [_m4_defun_once([$1], [$2], m4_if(_m4_divert_dump, [],
[[_m4_defun_pro([$1])m4_unquote(], [)_m4_defun_epi([$1])]],
m4_ifdef([_m4_diverting([$1])], [-]), [-], [[m4_unquote(], [)]],
[[_m4_require_call([$1],], [, _m4_divert_dump)]]))])
T14,29
AT_COLOR_TESTSm4_define([AT_color], [auto])
T10,412
m4_requirem4_ifdef([_m4_expanding($1)],
[m4_fatal([$0: circular dependency of $1])])m4_if(_m4_divert_dump, [],
[m4_fatal([$0($1): cannot be used outside of an ]dnl
m4_if([$0], [m4_require], [[m4_defun]], [[AC_DEFUN]])['d macro])])m4_provide_if([$1], [m4_set_contains([_m4_provide], [$1],
[_m4_require_check([$1], _m4_defn([m4_provide($1)]), [$0])], [m4_ignore])],
[_m4_require_call])([$1], [$2], _m4_divert_dump)
T9,14
AS_TEST_Xtest -x $1[][]
T9,129
AS_TEST_X_m4_defun_pro([$0])AS_REQUIRE([_AS_TEST_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T22,3
_m4_divert(HELP_MODES)301
T7,146
AS_CASE_m4_defun_pro([$0])case $1 in[]m4_map_args_pair([_$0], [_$0_DEFAULT],
m4_shift($@m4_if(m4_eval([$# & 1]), [1], [,])))
esac[]_m4_defun_epi([$0])
T26,34
m4_location(AT_ARG_OPTION)../../lib/autotest/general.m4:1766
F7,4
m4_incrincr
T8,87
m4_fatalm4_errprintn(m4_location[: error: $1]
m4_expansion_stack)m4_exit(m4_if([$2],, 1, [$2]))
T13,306
m4_bpatsubstsm4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])],
[$#], 1, [m4_fatal([$0: too few arguments: $#: $1])],
[$#], 2, [m4_unquote(m4_builtin([patsubst], [[$1]], [$2]))],
[$#], 3, [m4_unquote(m4_builtin([patsubst], [[$1]], [$2], [$3]))],
[_$0($@m4_if(m4_eval($# & 1), 0, [,]))])
F8,5
m4_ifdefifdef
T13,52
m4_cr_LettersabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
T23,3
_m4_divert(VERSION_END)352
T14,109
m4_file_appendm4_syscmd([cat >>$1 <<_m4eof
$2
_m4eof
])
m4_if(m4_sysval, [0], [],
[m4_fatal([$0: cannot write: $1])])
T17,185
_AS_TR_SH_PREPARE_m4_defun_pro([$0])AS_REQUIRE([_AS_CR_PREPARE])# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[[^_$as_cr_alnum]]%_%g'"
[]_m4_defun_epi([$0])
T15,218
m4_map_args_sepm4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
[$#], [1], [],
[$#], [2], [],
[$#], [3], [],
[$#], [4], [$1[$4]$2[]],
[$1[$4]$2[]_m4_foreach([$3[]$1], [$2], m4_shift3($@))])
F12,8
m4_bpatsubstpatsubst
F8,8
__file____file__
T19,21
_AS_VAR_ARITH_WORKStest $(( 1 + 1 )) = 2
T10,32
m4_set_mapm4_set_map_sep([$1], [$2(], [)])
T8,77
m4_stripm4_bpatsubsts([$1 ],
[[ ]+], [ ],
[^. ?\(.*\) .$], [[[\1]]])
T20,201
_AS_BASENAME_PREPARE_m4_defun_pro([$0])AS_REQUIRE([_AS_EXPR_PREPARE])if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
[]_m4_defun_epi([$0])
T11,37
m4_list_cmp_$0_raw(m4_dquote($1), m4_dquote($2))
T13,41
m4_provide_ifm4_ifdef([m4_provide($1)],
[$2], [$3])
T19,109
_m4_defun_epi_outer_m4_popdef([_m4_divert_dump], [_m4_diverting([$1])], [_m4_diverting])m4_divert_pop([GROW])m4_undivert([GROW])
T12,32
m4_make_listm4_join([,
], m4_dquote_elt($@))
T17,203
m4_cr_not_Letters
!"#*%&'()$+,./0123456789:;<=>?@[\]^_`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T17,292
_m4_require_checkm4_if(_m4_defn([_m4_diverting]), [$2], [m4_ignore],
m4_ifdef([_m4_diverting([$2])], [-]), [-], [m4_warn([syntax],
[$3: `$1' was expanded before it was required
http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required])_m4_require_call],
[m4_ignore])
T13,42
m4_mapall_sepm4_if([$3], [], [], [_$0([$1], [$2], $3)])
T9,15
AS_ECHO_N$as_echo_n $1[]
T9,129
AS_ECHO_N_m4_defun_pro([$0])AS_REQUIRE([_AS_ECHO_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
F11,11
__program____program__
T17,105
_m4_define_cr_notm4_define([m4_cr_not_$1],
m4_translit(m4_dquote(m4_defn([m4_cr_all])),
m4_defn([m4_cr_$1])))
T22,30
AT_DIFF_STDERR(ignore)echo stderr:; cat "$at_stderr"
T32,30
m4_location(_AS_DIRNAME_PREPARE)../../lib/m4sugar/m4sh.m4:1011
T15,4
m4_PACKAGE_YEAR2012
F14,6
_m4_divert_rawdivert
T10,302
AT_SKIP_IFm4_ifndef([AT_ingroup],
[m4_fatal([AT_SKIP_IF: missing AT_SETUP detected])])dnl
dnl Try to limit the amount of conditionals that we emit.
m4_case([$1],
[], [],
[false], [],
[:], [_AT_CHECK_EXIT([], [77])],
[true], [_AT_CHECK_EXIT([], [77])],
[_AT_CHECK_EXIT([$1], [77])])
T18,72
m4_version_compare_m4_list_cmp_raw(_m4_version_unletter([$1]), _m4_version_unletter([$2]))
T19,95
_AS_DETECT_REQUIRED_m4_defun_pro([$0])m4_set_add([_AS_DETECT_REQUIRED_BODY], [$1 || AS_EXIT])[]_m4_defun_epi([$0])
T14,122
m4_append_uniqm4_ifval([$3], [m4_if(m4_index([$2], [$3]), [-1], [],
[m4_warn([syntax],
[$0: `$2' contains `$3'])])])_$0($@)
T9,4
m4_dquote[$@]
T22,30
m4_location(AS_TR_CPP)../../lib/m4sugar/m4sh.m4:1859
T24,32
m4_default_nblank_quotedm4_ifblank([$1], [[$2]], [[$1]])
T19,54
_AT_COPYRIGHT_YEARSCopyright (C) 2009-2012 Free Software Foundation, Inc.
T27,30
m4_location(_AS_ME_PREPARE)../../lib/m4sugar/m4sh.m4:1122
T32,0
m4_include(autotest/specific.m4)
T17,28
m4_default_nblankm4_ifblank([$1], [$2], [$1])
T12,83
m4_set_unionm4_set_listc([$1])m4_if([$1], [$2], [],
[m4_set_map_sep([$2], [_$0([$1],], [)])])
T19,3
_m4_divert(BANNERS)400
T21,97
m4_copyright_condensem4_text_wrap(m4_bpatsubst(m4_flatten([[$1]]),
[(C)[- ,0-9]*\([1-9][0-9][0-9][0-9]\)], [(C) \1]))
T12,152
_m4_set_dumpm4_ifdef([_m4_set([$1])],
[[$2]_m4_defn([_m4_set([$1])])_m4_popdef([_m4_set([$1],]_m4_defn(
[_m4_set([$1])])[)], [_m4_set([$1])])$0([$1], [$2$3])])
T7,182
m4_condm4_if([$#], [0], [m4_fatal([$0: cannot be called without arguments])],
[$#], [1], [$1],
m4_eval([$# % 3]), [2], [m4_fatal([$0: missing an argument])],
[_$0($@)])
T14,62
m4_set_foreachm4_pushdef([$2])m4_set_map_sep([$1], [m4_define([$2],], [)$3])
T9,156
m4_escapem4_if(m4_index(m4_translit([$1],
[[]#,()][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789], [$$$]), [$]),
[-1], [m4_echo], [_$0])([$1])
T18,206
_m4_text_wrap_wordm4_define([m4_Cursor], m4_eval(m4_Cursor + m4_qlen([$1]) + 1))m4_if(m4_eval(m4_Cursor > ([$3])),
[1], [m4_define([m4_Cursor], m4_eval(m4_Indent + m4_qlen([$1]) + 1))
[$2]],
[m4_Separator[]])[$1]
T17,2
_AS_LITERAL_IF_NO$2
T12,93
m4_text_wrap_$0(m4_escape([$1]), [$2], m4_default_quoted([$3], [$2]),
m4_default_quoted([$4], [79]))
T11,353
AT_XFAIL_IFm4_ifndef([AT_ingroup],
[m4_fatal([AT_XFAIL_IF: missing AT_SETUP detected])])dnl
dnl Try to limit the amount of conditionals that we emit.
m4_case([$1],
[], [],
[false], [],
[:], [m4_define([AT_xfail], [at_xfail=yes])],
[true], [m4_define([AT_xfail], [at_xfail=yes])],
[m4_append([AT_xfail], [
$1 && at_xfail=yes])])
T8,22
AS_TR_SH_$0(m4_expand([$1]))[]
T8,124
AS_TR_SH_m4_defun_pro([$0])AS_REQUIRE([_$0_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T20,53
m4_divert_stack_pushm4_pushdef([_m4_divert_stack], m4_location[: $1: $2])
T23,30
m4_location(AS_MKDIR_P)../../lib/m4sugar/m4sh.m4:1289
T10,40
m4_warningm4_errprintn(m4_location[: warning: $1])
F10,7
m4_mkstempmkstemp
T17,490
_AS_TR_SH_LITERALm4_translit([[$1]],
[*+[]][
!"#*%&'()$+,./:;<=>?@[\]^`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-],
[pp[]][_______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________])
T20,73
AS_BOURNE_COMPATIBLE# Be more Bourne compatible
DUALCASE=1; export DUALCASE # for MKS sh
_$0
T31,30
m4_location(AS_VERSION_COMPARE)../../lib/m4sugar/m4sh.m4:1767
T11,544
_AS_PREPARE_m4_defun_pro([$0])m4_pushdef([AS_REQUIRE])m4_pushdef([AS_REQUIRE_SHELL_FN], _m4_defn([_AS_REQUIRE_SHELL_FN])
)m4_pushdef([AS_MESSAGE_LOG_FD], [-1])_AS_ERROR_PREPARE
_m4_popdef([AS_MESSAGE_LOG_FD])_AS_EXIT_PREPARE
_AS_UNSET_PREPARE
_AS_VAR_APPEND_PREPARE
_AS_VAR_ARITH_PREPARE
_AS_EXPR_PREPARE
_AS_BASENAME_PREPARE
_AS_DIRNAME_PREPARE
_AS_ME_PREPARE
_AS_CR_PREPARE
_AS_ECHO_N_PREPARE
_AS_LN_S_PREPARE
_AS_MKDIR_P_PREPARE
_AS_TEST_PREPARE
_AS_TR_CPP_PREPARE
_AS_TR_SH_PREPARE
_m4_popdef([AS_REQUIRE], [AS_REQUIRE_SHELL_FN])[]_m4_defun_epi([$0])
T12,10
m4_cr_digits0123456789
T18,1
_m4_divert(NOTICE)6
T11,136
m4_set_dumpm4_ifdef([_m4_set_size($1)],
[_m4_popdef([_m4_set_size($1)])])m4_ifdef([_m4_set_cleanup($1)],
[_$0_check], [_$0])([$1], [], [$2])
T20,29
m4_location(AS_EXIT)../../lib/m4sugar/m4sh.m4:585
T11,17
m4_location__file__:__line__
T8,4
m4_quote[$*]
T7,111
AS_EXIT_m4_defun_pro([$0])AS_REQUIRE([_AS_EXIT_PREPARE])[]as_fn_exit m4_ifval([$1], [$1], [$][?])[]_m4_defun_epi([$0])
F9,6
m4_syscmdsyscmd
T16,55
_m4_divert_stack../../lib/m4sugar/m4sugar.m4:3259: m4_divert_push: KILL
T9,31
_m4_applym4_if([$2], [], [], [$1($2)[]])
F11,8
m4_traceofftraceoff
T8,2
m4_count$#
T31,30
m4_location(_AS_TR_CPP_PREPARE)../../lib/m4sugar/m4sh.m4:1845
F6,3
m4_lenlen
T14,113
m4_expand_oncem4_provide_if(m4_default_quoted([$2], [$1]),
[],
[m4_provide(m4_default_quoted([$2], [$1]))[]$1])
T25,2
_AS_LITERAL_HEREDOC_IF_NO$2
T23,29
m4_location(AS_PREPARE)../../lib/m4sugar/m4sh.m4:353
T10,681
AT_CLEANUPm4_ifdef([AT_ingroup], [AT_ingroup[]_m4_undefine([AT_ingroup])],
[m4_fatal([$0: missing AT_SETUP detected])])dnl
m4_append([AT_help_all],
m4_defn([AT_ordinal]);m4_defn([AT_line]);m4_defn([AT_description]);dnl
m4_ifdef([AT_keywords], [m4_defn([AT_keywords])]);
)dnl
m4_divert_pop([TEST_SCRIPT])dnl Back to TEST_GROUPS
AT_xfail
(
AS_ECHO(["AT_ordinal. $at_setup_line: testing $at_desc ..."])
$at_traceon
m4_undivert([TEST_SCRIPT])dnl Insert the code here
set +x
$at_times_p && times >"$at_times_file"
) AS_MESSAGE_LOG_FD>&1 2>&1 AT_JOB_FIFO_OUT_FD>&- | eval $at_tee_pipe
read at_status <"$at_status_file"
[#AT_STOP_]AT_ordinal
m4_divert_pop([TEST_GROUPS])dnl Back to KILL.
T10,48
AT_CLEANUPm4_fatal([AT_CLEANUP: missing AT_INIT detected])
T11,53
_m4_joinallm4_if([$#], [2], [], [[$1$3]$0([$1], m4_shift2($@))])
T16,2
_m4_divert(KILL)-1
T16,56
_AS_TR_CPP_INDIR`AS_ECHO(["_AS_ESCAPE([[$1]], [`], [\])"]) | $as_tr_cpp`
T9,373
AS_TMPDIR# Create a (secure) tmp directory for tmp files.
m4_if([$2], [], [: "${TMPDIR:=/tmp}"])
{
tmp=`(umask 077 && mktemp -d "m4_default([$2],
[$TMPDIR])/$1XXXXXX") 2>/dev/null` &&
test -d "$tmp"
} ||
{
tmp=m4_default([$2], [$TMPDIR])/$1$$-$RANDOM
(umask 077 && mkdir "$tmp")
} || AS_ERROR([cannot create a temporary directory in m4_default([$2],
[$TMPDIR])])
T9,793
_AT_CHECKm4_define([AT_ingroup]){ set +x
AS_ECHO(["$at_srcdir/AT_LINE: AS_ESCAPE([[$1]])"])
_AT_DECIDE_TRACEABLE([$1]) _AT_LINE_ESCAPED
( $at_check_trace; [$1]
) >>"$at_stdout" 2>>"$at_stderr" AS_MESSAGE_LOG_FD>&-
at_status=$? at_failed=false
$at_check_filter
m4_ifdef([AT_DIFF_STDERR($4)], [m4_indir([AT_DIFF_STDERR($4)])],
[echo >>"$at_stderr"; AS_ECHO([["$4"]]) | \
$at_diff - "$at_stderr" || at_failed=:])
m4_ifdef([AT_DIFF_STDOUT($3)], [m4_indir([AT_DIFF_STDOUT($3)])],
[echo >>"$at_stdout"; AS_ECHO([["$3"]]) | \
$at_diff - "$at_stdout" || at_failed=:])
m4_if([$2], [ignore], [at_fn_check_skip],
[at_fn_check_status m4_default([$2], [0])]) $at_status "$at_srcdir/AT_LINE"
m4_ifvaln([$5$6], [AS_IF($at_failed, [$5], [$6])])$at_failed && at_fn_log_failure AT_capture_files
$at_traceon; }
T10,728
AS_PREPARE_m4_defun_pro([$0])m4_divert_push([KILL])
m4_append_uniq([_AS_CLEANUP],
[m4_divert_text([M4SH-INIT-FN], [_AS_ERROR_PREPARE[]])])
AS_REQUIRE([_AS_EXPR_PREPARE])
AS_REQUIRE([_AS_BASENAME_PREPARE])
AS_REQUIRE([_AS_DIRNAME_PREPARE])
AS_REQUIRE([_AS_ME_PREPARE])
AS_REQUIRE([_AS_CR_PREPARE])
AS_REQUIRE([_AS_LINENO_PREPARE])
AS_REQUIRE([_AS_ECHO_N_PREPARE])
AS_REQUIRE([_AS_EXIT_PREPARE])
AS_REQUIRE([_AS_LN_S_PREPARE])
AS_REQUIRE([_AS_MKDIR_P_PREPARE])
AS_REQUIRE([_AS_TEST_PREPARE])
AS_REQUIRE([_AS_TR_CPP_PREPARE])
AS_REQUIRE([_AS_TR_SH_PREPARE])
AS_REQUIRE([_AS_UNSET_PREPARE])
AS_REQUIRE([_AS_VAR_APPEND_PREPARE], [], [M4SH-INIT-FN])
AS_REQUIRE([_AS_VAR_ARITH_PREPARE], [], [M4SH-INIT-FN])
m4_divert_pop[][]_m4_defun_epi([$0])
F8,5
m4_indirindir
T17,31
m4_default_quotedm4_if([$1], [], [[$2]], [[$1]])
T27,2052
_AS_VERSION_COMPARE_PREPARE_m4_defun_pro([$0])[as_awk_strverscmp='
# Use only awk features that work with 7th edition Unix awk (1978).
# My, what an old awk you have, Mr. Solaris!
END {
while (length(v1) && length(v2)) {
# Set d1 to be the next thing to compare from v1, and likewise for d2.
# Normally this is a single character, but if v1 and v2 contain digits,
# compare them as integers and fractions as strverscmp does.
if (v1 ~ /^[0-9]/ && v2 ~ /^[0-9]/) {
# Split v1 and v2 into their leading digit string components d1 and d2,
# and advance v1 and v2 past the leading digit strings.
for (len1 = 1; substr(v1, len1 + 1) ~ /^[0-9]/; len1++) continue
for (len2 = 1; substr(v2, len2 + 1) ~ /^[0-9]/; len2++) continue
d1 = substr(v1, 1, len1); v1 = substr(v1, len1 + 1)
d2 = substr(v2, 1, len2); v2 = substr(v2, len2 + 1)
if (d1 ~ /^0/) {
if (d2 ~ /^0/) {
# Compare two fractions.
while (d1 ~ /^0/ && d2 ~ /^0/) {
d1 = substr(d1, 2); len1--
d2 = substr(d2, 2); len2--
}
if (len1 != len2 && ! (len1 && len2 && substr(d1, 1, 1) == substr(d2, 1, 1))) {
# The two components differ in length, and the common prefix
# contains only leading zeros. Consider the longer to be less.
d1 = -len1
d2 = -len2
} else {
# Otherwise, compare as strings.
d1 = "x" d1
d2 = "x" d2
}
} else {
# A fraction is less than an integer.
exit 1
}
} else {
if (d2 ~ /^0/) {
# An integer is greater than a fraction.
exit 2
} else {
# Compare two integers.
d1 += 0
d2 += 0
}
}
} else {
# The normal case, without worrying about digits.
d1 = substr(v1, 1, 1); v1 = substr(v1, 2)
d2 = substr(v2, 1, 1); v2 = substr(v2, 2)
}
if (d1 < d2) exit 1
if (d1 > d2) exit 2
}
# Beware Solaris /usr/xgp4/bin/awk (at least through Solaris 10),
# which mishandles some comparisons of empty strings to integers.
if (length(v2)) exit 1
if (length(v1)) exit 2
}
'][]_m4_defun_epi([$0])
T10,302
AT_FAIL_IFm4_ifndef([AT_ingroup],
[m4_fatal([AT_FAIL_IF: missing AT_SETUP detected])])dnl
dnl Try to limit the amount of conditionals that we emit.
m4_case([$1],
[], [],
[false], [],
[:], [_AT_CHECK_EXIT([], [99])],
[true], [_AT_CHECK_EXIT([], [99])],
[_AT_CHECK_EXIT([$1], [99])])
T9,58
m4_ifvalnm4_if([$1],
[], [m4_n([$3])],
[m4_n([$2])])
F8,5
m4_indexindex
T8,85
_m4_joinm4_if([$#$2], [2], [],
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift2($@))])
T22,43
AT_DIFF_STDOUT(expout)$at_diff expout "$at_stdout" || at_failed=:
T17,63
m4_set_differencem4_if([$1], [$2], [], [m4_set_map_sep([$1], [_$0([$2],], [)])])
T17,0
m4_pattern_forbid
T22,527
_AS_VAR_APPEND_PREPARE_m4_defun_pro([$0])AS_FUNCTION_DESCRIBE([as_fn_append], [VAR VALUE],
[Append the text in VALUE to the end of the definition contained in
VAR. Take advantage of any shell optimizations that allow amortized
linear growth over repeated appends, instead of the typical quadratic
growth present in naive implementations.])
AS_IF([_AS_RUN(["AS_ESCAPE(m4_quote(_AS_VAR_APPEND_WORKS))"])],
[eval 'as_fn_append ()
{
eval $[]1+=\$[]2
}'],
[as_fn_append ()
{
eval $[]1=\$$[]1\$[]2
}]) # as_fn_append
[]_m4_defun_epi([$0])
F10,7
m4_traceontraceon
T39,30
m4_location(_AS_PATH_SEPARATOR_PREPARE)../../lib/m4sugar/m4sh.m4:1315
T10,84
_m4_minmaxm4_if([$#], [3], [$1([$2], [$3])],
[$0([$1], $1([$2], [$3]), m4_shift3($@))])
T22,133
_AS_LITERAL_HEREDOC_IFm4_if(m4_index([$1], [@S|@]), [-1],
[m4_if(m4_index(m4_translit([[$1]], [\`], [$]), [$]), [-1],
[$0_YES], [$0_NO])],
[$0_NO])
T31,30
m4_location(_AS_LINENO_PREPARE)../../lib/m4sugar/m4sh.m4:1167
T12,110
_m4_set_sizem4_define([_m4_set_size($1)],
m4_ifdef([_m4_set_size($1)], [$2(m4_indir([_m4_set_size($1)]))],
[1]))
T10,86
m4_tolowerm4_translit([[$1]], [ABCDEFGHIJKLMNOPQRSTUVWXYZ],
[abcdefghijklmnopqrstuvwxyz])
T10,121
m4_re_word[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*
T33,29
m4_location(_AS_BASENAME_PREPARE)../../lib/m4sugar/m4sh.m4:954
T25,1
_m4_divert(M4SH-SANITIZE)4
T13,82
m4_dquote_eltm4_if([$#], [0], [],
[$#], [1], [[[$1]]],
[[[$1]],$0(m4_shift($@))])
T27,29
m4_location(AS_LINENO_PUSH)../../lib/m4sugar/m4sh.m4:894
T10,36
_m4_expand$0_([$1], [(], -=<{($1)}>=-, [}>=-])
T12,66
m4_re_string[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*
T28,29
m4_location(_AS_DIRNAME_SED)../../lib/m4sugar/m4sh.m4:982
T28,30
m4_location(AS_EXECUTABLE_P)../../lib/m4sugar/m4sh.m4:1098
F11,8
m4_errprinterrprint
T6,122
m4_cdrm4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
[$#], 1, [],
[m4_dquote(m4_shift($@))])
T18,4
m4_PACKAGE_VERSION2.69
T18,207
_AS_TR_CPP_PREPARE_m4_defun_pro([$0])AS_REQUIRE([_AS_CR_PREPARE])# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[[^_$as_cr_alnum]]%_%g'"
[]_m4_defun_epi([$0])
T10,27
m4_joinall[$2]_$0([$1], m4_shift($@))
T17,64
_m4_divert_unsafem4_fatal([$0: cannot change diversion to `$1' inside m4_expand])
T17,3
_m4_divert(TESTS)403
T13,333
m4_divert_popm4_if([$1], [], [],
[$1], _m4_defn([_m4_divert_diversion]), [],
[m4_fatal([$0($1): diversion mismatch:
]m4_divert_stack)])_m4_popdef([_m4_divert_stack], [_m4_divert_diversion])m4_ifdef([_m4_divert_diversion], [],
[m4_fatal([too many m4_divert_pop])])_m4_divert_raw(_m4_divert(_m4_defn([_m4_divert_diversion]), [-]))
T30,30
m4_location(AS_LINENO_PREPARE)../../lib/m4sugar/m4sh.m4:1166
T14,103
_AS_TR_PREPARE_m4_defun_pro([$0])AS_REQUIRE([_AS_TR_SH_PREPARE])AS_REQUIRE([_AS_TR_CPP_PREPARE])[]_m4_defun_epi([$0])
T11,65
m4_set_sizem4_ifdef([_m4_set_size($1)], [m4_indir([_m4_set_size($1)])], [0])
T12,25
m4_set_listcm4_set_map_sep([$1], [,])
T13,15
AS_VAR_POPDEFm4_popdef([$1])
T10,54
m4_ifblankm4_if(m4_translit([[$1]], [ ][ ][
]), [], [$2], [$3])
T7,20
m4_wrap_m4_wrap([], [$1[]])
T25,30
m4_location(AS_VAR_ARITH)../../lib/m4sugar/m4sh.m4:1981
T29,29
m4_location(_AS_BASENAME_SED)../../lib/m4sugar/m4sh.m4:926
T15,165
_m4_set_add_allm4_if([$#], [2], [],
[m4_ifdef([_m4_set([$1],$3)], [],
[m4_define([_m4_set([$1],$3)], [1])m4_pushdef([_m4_set([$1])],
[$3])-])$0([$1], m4_shift2($@))])
T29,30
m4_location(_AS_TEST_PREPARE)../../lib/m4sugar/m4sh.m4:1384
T8,42
_AS_ECHO_AS_ECHO_UNQUOTED([_AS_QUOTE([$1])], [$2])
T7,48
m4_qlenm4_ifdef([$0-$1], [_m4_defn([$0-]], [_$0(])[$1])
T14,142
_AT_CHECK_EXITm4_define([AT_ingroup])AS_ECHO(_AT_LINE_ESCAPED) >"$at_check_line_file"
m4_ifval([$1], [($1) \
&& ])at_fn_check_skip $2 "$at_srcdir/AT_LINE"
T14,41
_m4_list_cmp_1_m4_list_cmp_2([$2], [m4_shift2($@)], $1)
T19,191
_AS_DIRNAME_PREPARE_m4_defun_pro([$0])AS_REQUIRE([_AS_EXPR_PREPARE])if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
as_dirname=dirname
else
as_dirname=false
fi
[]_m4_defun_epi([$0])
T14,95
_m4_list_cmp_2_m4_list_cmp([$1$3], m4_cmp([$3+0], [$1+0]))(
[_m4_list_cmp_1(m4_dquote(m4_shift3($@)), $2)])
T34,30
m4_location(_AS_VAR_ARITH_PREPARE)../../lib/m4sugar/m4sh.m4:1948
T12,18
m4_errprintnm4_errprint([$1
])
T18,1601
_AS_SHELL_SANITIZE_m4_defun_pro([$0])m4_pushdef([AS_EXIT], [exit m4_default(]m4_dquote([$][1])[, 1)])m4_text_box([M4sh Initialization.])
AS_BOURNE_COMPATIBLE
_AS_ECHO_PREPARE
_AS_PATH_SEPARATOR_PREPARE
# IFS
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent editors from complaining about space-tab.
# (If _AS_PATH_WALK were called with IFS unset, it would disable word
# splitting by setting IFS to empty value.)
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
as_myself=
case $[0] in @%:@((
*[[\\/]]* ) as_myself=$[0] ;;
*) _AS_PATH_WALK([],
[test -r "$as_dir/$[0]" && as_myself=$as_dir/$[0] && break])
;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$[0]
fi
if test ! -f "$as_myself"; then
AS_ECHO(["$as_myself: error: cannot find myself; rerun with an absolute file name"]) >&2
AS_EXIT
fi
# Unset variables that we do not need and which cause bugs (e.g. in
# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
# suppresses any "Segmentation fault" message there. '((' could
# trigger a bug in pdksh 5.2.14.
for as_var in BASH_ENV ENV MAIL MAILPATH
do eval test x\${$as_var+set} = xset \
&& ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
done
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
LC_ALL=C
export LC_ALL
LANGUAGE=C
export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
_m4_popdef([AS_EXIT])[]_m4_defun_epi([$0])
T13,383
_AS_PATH_WALKas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
m4_ifvaln([$3], [as_found=false])dnl
m4_bmatch([$1], [[:;]],
[as_dummy="$1"
for as_dir in $as_dummy],
[for as_dir in m4_default([$1], [$PATH])])
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
m4_ifvaln([$3], [as_found=:])dnl
$2
m4_ifvaln([$3], [as_found=false])dnl
done
m4_ifvaln([$3], [$as_found || { $3; }])dnl
IFS=$as_save_IFS
[]
T13,139
_AS_PATH_WALK_m4_defun_pro([$0])AS_REQUIRE([_AS_PATH_SEPARATOR_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T17,136
_AS_BASENAME_EXPR_m4_defun_pro([$0])$as_expr X/[]$1 : '.*/\([[^/][^/]*]\)/*$' \| \
X[]$1 : 'X\(//\)$' \| \
X[]$1 : 'X\(/\)' \| .[]_m4_defun_epi([$0])
T17,220
AT_CHECK_UNQUOTEDm4_ifndef([AT_ingroup],
[m4_fatal([AT_CHECK_UNQUOTED: missing AT_SETUP detected])])_AT_CHECK(m4_expand([$1]), [$2], AS_ESCAPE(m4_dquote(m4_expand([$3])), [""]),
AS_ESCAPE(m4_dquote(m4_expand([$4])), [""]), [$5], [$6])
T13,0
_AT_LINE_base
T10,86
m4_toupperm4_translit([[$1]], [abcdefghijklmnopqrstuvwxyz],
[ABCDEFGHIJKLMNOPQRSTUVWXYZ])
T18,2
_AS_LITERAL_IF_YES$3
T11,2
_AS_ESCAPE_$1
T9,0
m4_ignore
T19,288
_m4_set_contents_1cm4_ifdef([_m4_set([$1])],
[m4_set_contains([$1], _m4_defn([_m4_set([$1])]),
[m4_pushdef([_m4_set_($1)], _m4_defn([_m4_set([$1])]))],
[_m4_popdef([_m4_set([$1],]_m4_defn(
[_m4_set([$1])])[)])])_m4_popdef([_m4_set([$1])])$0([$1])],
[_m4_popdef([_m4_set_cleanup($1)])])
T17,0
AS_MESSAGE_LOG_FD
T16,3
_m4_divert(HELP)300
T14,44
m4_divert_oncem4_expand_once([m4_divert_text([$1], [$2])])
T17,129
_AS_DETECT_EXPAND$1="m4_bpatsubst(m4_dquote(AS_ESCAPE(_m4_expand(m4_set_contents([$2], [
])))), [\\\$LINENO\(.*\)$], [";$1=$$1$LINENO;$1=$$1"\1])"
T10,143
m4_map_sepm4_pushdef([m4_Sep], [m4_define([m4_Sep], _m4_defn([m4_unquote]))])_m4_foreach([_m4_apply([m4_Sep([$2])[]$1],], [)], [], $3)m4_popdef([m4_Sep])
T17,272
_AS_IDENTIFIER_IFm4_cond([[$1]], [], [],
[m4_eval(m4_len(m4_translit([[$1]], ][[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]][)) > 0)], [1], [],
[m4_len(m4_translit(m4_format([[%.1s]], [$1]), ][[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_]][))], [0], [-])
T18,303
_AS_ECHO_N_PREPARE_m4_defun_pro([$0])ECHO_C= ECHO_N= ECHO_T=
case `echo -n x` in @%:@(((((
-n*)
case `echo 'xy\c'` in
*c*) ECHO_T=' ';; # ECHO_T is single tab character.
xy) ECHO_C='\c';;
*) echo `echo ksh88 bug on AIX 6.1` > /dev/null
ECHO_T=' ';;
esac;;
*)
ECHO_N='-n';;
esac
[]_m4_defun_epi([$0])
T7,75
m4_warn_m4_warn([$1], [$2],
m4_ifdef([_m4_expansion_stack], [m4_expansion_stack]))
T33,29
m4_location(_AS_DETECT_SUGGESTED)../../lib/m4sugar/m4sh.m4:167
T9,36
m4_renamem4_copy([$1], [$2])m4_undefine([$1])
T18,540
_AS_TR_CPP_LITERALm4_translit([[$1]],
[*[]][abcdefghijklmnopqrstuvwxyz
!"#*%&'()$+,./:;<=>?@[\]^`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-],
[P[]][ABCDEFGHIJKLMNOPQRSTUVWXYZ_______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________])
F12,9
m4_changecomchangecom
T29,3
_m4_divert(HELP_TUNING_BEGIN)302
T31,29
m4_location(_AS_ECHO_N_PREPARE)../../lib/m4sugar/m4sh.m4:807
F3,3
dnldnl
T13,134
_m4_defun_epi_m4_popdef([_m4_expanding($1)], [_m4_expansion_stack])m4_ifdef([_m4_expansion_stack], [], [_m4_defun_epi_outer([$1])])m4_provide([$1])
T22,43
AT_DIFF_STDERR(experr)$at_diff experr "$at_stderr" || at_failed=:
F9,6
m4_formatformat
T10,68
_AS_TR_CPP_AS_LITERAL_IF([$1], [*][ ][
])([], [$0_INDIR], [$0_LITERAL])([$1])
T7,54
_m4_cdrm4_if([$#], 1, [],
[, m4_dquote(m4_shift($@))])
T8,189
m4_splitm4_if([$1], [], [],
[$2], [ ], [m4_if(m4_index([$1], [ ]), [-1], [[[$1]]],
[_$0([$1], [$2], [, ])])],
[$2], [], [_$0([$1], [[ ]+], [, ])],
[_$0([$1], [$2], [, ])])
T17,253
m4_divert_requirem4_ifdef([_m4_expanding($2)],
[m4_fatal([$0: circular dependency of $2])])m4_if(_m4_divert_dump, [],
[m4_fatal([$0($2): cannot be used outside of an m4_defun'd macro])])m4_provide_if([$2], [],
[_m4_require_call([$2], [$3], _m4_divert([$1], [-]))])
T15,0
_m4_divert_dump
T6,43
m4_map_m4_foreach([_m4_apply([$1],], [)], [], $2)
T18,50
_m4_set_contents_1_m4_stack_reverse([_m4_set([$1])], [_m4_set_($1)])
T18,94
_m4_set_contents_2_m4_stack_reverse([_m4_set_($1)], [_m4_set([$1])],
[$2[]_m4_defn([_m4_set_($1)])$3], [$4[]])
T10,294
_m4_escapem4_changequote([-=<{(],[)}>=-])m4_bpatsubst(m4_bpatsubst(m4_bpatsubst(m4_bpatsubst(
-=<{(-=<{(-=<{(-=<{(-=<{($1)}>=-)}>=-)}>=-)}>=-)}>=-,
-=<{(#)}>=-, -=<{(@%:@)}>=-),
-=<{(\[)}>=-, -=<{(@<:@)}>=-),
-=<{(\])}>=-, -=<{(@:>@)}>=-),
-=<{(\$)}>=-, -=<{(@S|@)}>=-)m4_changequote([,])
T8,28
_AS_CASE [@%:@(]
$1[)] :
$2 ;;
T16,5
_m4_divert(GROW)10000
T6,190
m4_minm4_if([$#], [0], [m4_fatal([too few arguments to $0])],
[$#], [1], [m4_eval([$1])],
[$#$1], [2$2], [m4_eval([$1])],
[$#], [2], [_$0($@)],
[_m4_minmax([_$0], $@)])
T6,21
_AS_IFelif $1; then :
$2
T12,78
m4_foreach_wm4_pushdef([$1])m4_map_args_w([$2],
[m4_define([$1],], [)$3])m4_popdef([$1])
T11,55
m4_sincludem4_include_unique([$1])dnl
m4_builtin([sinclude], [$1])
T7,156
m4_defnm4_if([$#], [0], [[$0]],
[$#], [1], [m4_ifdef([$1], [_m4_defn([$1])],
[m4_fatal([$0: undefined macro: $1])])],
[m4_map_args([$0], $@)])
T27,34
m4_location(_AT_ARG_OPTION)../../lib/autotest/general.m4:1674
T28,0
AT_DIFF_STDERR(ignore-nolog)
T6,190
m4_maxm4_if([$#], [0], [m4_fatal([too few arguments to $0])],
[$#], [1], [m4_eval([$1])],
[$#$1], [2$2], [m4_eval([$1])],
[$#], [2], [_$0($@)],
[_m4_minmax([_$0], $@)])
T30,30
m4_location(AS_INIT_GENERATED)../../lib/m4sugar/m4sh.m4:2121
T16,0
m4_pattern_allow
T14,276
_AS_CR_PREPARE_m4_defun_pro([$0])# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
[]_m4_defun_epi([$0])
T21,29
m4_location(AS_ERROR)../../lib/m4sugar/m4sh.m4:883
T25,3
_m4_divert(PREPARE_TESTS)402
T10,115
AS_VAR_GETAS_LITERAL_WORD_IF([$1],
[$$1],
[`eval 'as_val=${'_AS_ESCAPE([[$1]], [`], [\])'};AS_ECHO(["$as_val"])'`])
T14,58
_m4_map_args_wm4_substr([$1], [$2], m4_eval(m4_len([$1]) - [$2] - [$3]))
T30,0
m4_include(m4sugar/version.m4)
T11,498
_AS_MKDIR_Pcase $as_dir in #(
-*) as_dir=./$as_dir;;
esac
test -d "$as_dir" || eval $as_mkdir_p || {
as_dirs=
while :; do
case $as_dir in #(
*\'*) as_qdir=`AS_ECHO(["$as_dir"]) | sed "s/'/'\\\\\\\\''/g"`;; #'(
*) as_qdir=$as_dir;;
esac
as_dirs="'$as_qdir' $as_dirs"
as_dir=`AS_DIRNAME("$as_dir")`
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
} || test -d "$as_dir" || AS_ERROR([cannot create directory $as_dir])
T11,140
AT_KEYWORDSm4_ifndef([AT_ingroup],
[m4_fatal([AT_KEYWORDS: missing AT_SETUP detected])])m4_append_uniq_w([AT_keywords], m4_tolower(_m4_expand([$1
])))
T10,124
AS_MESSAGEm4_ifval(AS_MESSAGE_LOG_FD,
[{ _AS_ECHO_LOG([$1])
_AS_ECHO([$as_me: $1], [$2]);}],
[_AS_ECHO([$as_me: $1], [$2])])[][]
T10,127
AS_MESSAGE_m4_defun_pro([$0])AS_REQUIRE([_AS_ME_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T17,32
m4_define_defaultm4_ifndef([$1], [m4_define($@)])
T14,997
AT_CHECK_EUNITm4_ifndef([AT_ingroup],
[m4_fatal([AT_CHECK_EUNIT: missing AT_SETUP detected])])AT_SKIP_IF([test ! -f "$ERL" || test ! -f "$ERLC"])
## A wrapper to EUnit, to exit the Erlang VM with the right exit code:
AT_DATA([$1.erl],
[[-module($1).
-export([test/0, test/1]).
test() -> test([]).
test(Options) ->
TestSpec = $2,
ReturnValue = case code:load_file(eunit) of
{module, _} -> case eunit:test(TestSpec, Options) of
ok -> "0\n"; %% test passes
_ -> "1\n" %% test fails
end;
_ -> "77\n" %% EUnit not found, test skipped
end,
file:write_file("$1.result", ReturnValue),
init:stop().
]])
AT_CHECK(["$ERLC" $ERLCFLAGS -b beam $1.erl])
## Make EUnit verbose when testsuite is verbose:
if test -z "$at_verbose"; then
at_eunit_options="verbose"
else
at_eunit_options=""
fi
AT_CHECK(["$ERL" $3 -s $1 test $at_eunit_options -noshell], [0], [ignore], [],
[$4], [$5])
AT_CAPTURE_FILE([$1.result])
AT_CHECK([test -f "$1.result" && (exit `cat "$1.result"`)])
T16,101
m4_stack_foreach_m4_stack_reverse([$1], [m4_tmp-$1])_m4_stack_reverse([m4_tmp-$1], [$1], [$2(_m4_defn([m4_tmp-$1]))])
F10,7
m4_pushdefpushdef
T9,22
AS_TR_CPP_$0(m4_expand([$1]))[]
T9,124
AS_TR_CPP_m4_defun_pro([$0])AS_REQUIRE([_$0_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T13,26
m4_cr_lettersabcdefghijklmnopqrstuvwxyz
T18,8
m4_PACKAGE_TARNAMEautoconf
T26,292
_AS_PATH_SEPARATOR_PREPARE_m4_defun_pro([$0])# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
PATH_SEPARATOR=:
(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
(PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
PATH_SEPARATOR=';'
}
fi
[]_m4_defun_epi([$0])
F8,8
__line____line__
T20,40
_AS_VAR_APPEND_WORKSas_var=1; as_var+=2; test x$as_var = x12
T35,30
m4_location(_AS_VAR_APPEND_PREPARE)../../lib/m4sugar/m4sh.m4:1906
T9,255
m4_cr_all
!"#*%&'()$+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T13,84
_AS_QUOTE_OLDm4_warn([obsolete],
[back quotes and double quotes must not be escaped in: $1])$1
T7,160
AT_DATAm4_ifndef([AT_ingroup],
[m4_fatal([AT_DATA: missing AT_SETUP detected])])m4_if([$2], [], [: >$1],
[$2], [[]], [: >$1],
[cat >$1 <<'_ATEOF'
$2[]_ATEOF
])
T19,29
m4_location(AS_FOR)../../lib/m4sugar/m4sh.m4:607
T13,252
m4_set_removem4_set_contains([$1], [$2], [_m4_set_size([$1],
[m4_decr])m4_if(_m4_defn([_m4_set([$1])]), [$2],
[_m4_popdef([_m4_set([$1],$2)], [_m4_set([$1])])],
[m4_define([_m4_set_cleanup($1)])m4_define(
[_m4_set([$1],$2)], [0])])$3], [$4])
T17,229
m4_cr_not_letters
!"#*%&'()$+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ-
T22,30
AT_DIFF_STDOUT(ignore)echo stdout:; cat "$at_stdout"
T8,27
m4_ifvalm4_if([$1], [], [$3], [$2])
T26,30
m4_location(AS_ME_PREPARE)../../lib/m4sugar/m4sh.m4:1121
T9,309
AT_BANNERm4_ifdef([AT_ingroup], [m4_fatal([$0: nested AT_SETUP detected])])dnl
m4_define([AT_banner_ordinal], m4_incr(AT_banner_ordinal))
m4_divert_text([BANNERS],
[@%:@ Banner AT_banner_ordinal. AT_LINE
@%:@ Category starts at test group m4_incr(AT_ordinal).
at_banner_text_[]AT_banner_ordinal="AS_ESCAPE([$1])"])dnl
T9,47
AT_BANNERm4_fatal([AT_BANNER: missing AT_INIT detected])
T13,207
m4_map_args_w_$0(_m4_split([ ]m4_flatten([$1])[ ], [[ ]+],
m4_if(m4_index([$2$3$4], [\]), [-1], [[$3[]$4[]$2]],
[m4_bpatsubst([[$3[]$4[]$2]], [\\], [\\\\])])),
m4_len([[]$3[]$4]), m4_len([$4[]$2[]]))
T17,117
m4_include_uniquem4_ifdef([m4_include($1)],
[m4_warn([syntax], [file `$1' included several times])])dnl
m4_define([m4_include($1)])
T12,30
m4_esyscmd_sm4_chomp_all(m4_esyscmd([$1]))
F10,6
_m4_popdefpopdef
T10,26
AS_MKDIR_Pas_dir=$1; as_fn_mkdir_p[]
T10,124
AS_MKDIR_P_m4_defun_pro([$0])AS_REQUIRE([_$0_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T8,99
_m4_condm4_if(($1), [($2)], [$3],
[$#], [3], [],
[$#], [4], [$4],
[$0(m4_shift3($@))])
F9,6
m4_divnumdivnum
T15,99
_AS_LITERAL_IF_m4_if(m4_translit([$1], [+]), [], [$0YES],
m4_translit([$1], [$]), [], [m4_default], [$0NO])
T12,77
m4_chomp_allm4_format([[%.*s]], m4_bregexp(m4_translit([[$1]], [
/], [/ ]), [/*$]), [$1])
F7,4
m4_evaleval
T14,180
AS_HELP_STRINGm4_text_wrap([$2], m4_cond([[$3]], [], [ ],
[m4_eval([$3]+0)], [0], [[$3]],
[m4_format([[%*s]], [$3], [])]),
m4_expand([ $1 ]), [$4])
T8,19
m4_curry$1(m4_shift($@,)_$0
T9,222
m4_bmatchm4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])],
[$#], 1, [m4_fatal([$0: too few arguments: $#: $1])],
[$#], 2, [$2],
[m4_if(m4_bregexp([$1], [$2]), -1, [$0([$1], m4_shift3($@))],
[$3])])
T13,91
AS_SET_STATUS_m4_defun_pro([$0])AS_REQUIRE([_AS_EXIT_PREPARE])[]as_fn_set_status $1[]_m4_defun_epi([$0])
T16,54
m4_append_uniq_wm4_map_args_w([$2], [_m4_append_uniq([$1],], [, [ ])])
T20,36
_m4_set_intersectionm4_set_contains([$1], [$2], [,[$2]])
T29,30
m4_location(_AS_ECHO_PREPARE)../../lib/m4sugar/m4sh.m4:1044
T6,4
m4_car[$1]
T11,238
m4_text_boxm4_pushdef([m4_Border],
m4_translit(m4_format([[[%*s]]], m4_decr(m4_qlen(_m4_expand([$1
]))), []), [ ], m4_default_quoted([$2], [-])))[##] _m4_defn([m4_Border]) [##]
[##] $1 [##]
[##] _m4_defn([m4_Border]) [##]_m4_popdef([m4_Border])
T18,49
AS_LITERAL_WORD_IF_AS_LITERAL_IF(m4_expand([$1]))([$4], [$3], [$2])
T23,3
_m4_divert(TEST_SCRIPT)450
T8,1075
AS_UNAME{
cat <<_ASUNAME
m4_text_box([Platform.])
hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
_ASUNAME
_AS_PATH_WALK([$PATH], [AS_ECHO(["PATH: $as_dir"])])
}
T32,29
m4_location(_AS_DETECT_REQUIRED)../../lib/m4sugar/m4sh.m4:156
T7,65
_m4_minm4_eval((([$1]) < ([$2])) * ([$1]) + (([$1]) >= ([$2])) * ([$2]))
T20,170
_m4_version_unletterm4_bpatsubst(m4_bpatsubst(m4_translit([[[[0,$1]]]], [.-], [,,]),[[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]][+],
[+1,-1,[0r36:\&]]), [,0], [,[0r10:0]])
T12,1
_m4_divert()0
T11,149
m4_map_argsm4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
[$#], [1], [],
[$#], [2], [$1([$2])[]],
[_m4_foreach([$1(], [)], $@)])
T6,46
m4_cmpm4_eval((([$1]) > ([$2])) - (([$1]) < ([$2])))
T21,696
_AS_REEXEC_WITH_SHELL_m4_defun_pro([$0])dnl
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
# Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
case $- in @%:@ ((((
*v*x* | *x*v* ) as_opts=-vx ;;
*v* ) as_opts=-v ;;
*x* ) as_opts=-x ;;
* ) as_opts= ;;
esac
exec $1 $as_opts "$as_myself" ${1+"$[@]"}
# Admittedly, this is quite paranoid, since all the known shells bail
# out after a failed `exec'.
AS_ECHO(["$[]0: could not re-execute with $1"]) >&2
AS_EXIT([255])[]_m4_defun_epi([$0])
T7,65
_m4_maxm4_eval((([$1]) > ([$2])) * ([$1]) + (([$1]) <= ([$2])) * ([$2]))
T7,36
m4_signm4_eval((([$1]) > 0) - (([$1]) < 0))
T26,29
m4_location(AS_SET_STATUS)../../lib/m4sugar/m4sh.m4:649
T10,266
AS_REQUIRE_m4_defun_pro([$0])m4_define([_m4_divert_desired], [m4_default_quoted([$3], [M4SH-INIT])])m4_if(m4_eval(_m4_divert_dump - 0 <= _m4_divert(_m4_divert_desired, [-])),
1, [m4_require(],
[m4_divert_require(_m4_divert_desired,]) [$1], [$2])[]_m4_defun_epi([$0])
T19,166
m4_set_intersectionm4_if([$1], [$2], [m4_set_listc([$1])],
m4_eval(m4_set_size([$2]) < m4_set_size([$1])), [1], [$0([$2], [$1])],
[m4_set_map_sep([$1], [_$0([$2],], [)])])
T11,85
AS_BASENAME$as_basename -- $1 ||
_AS_BASENAME_EXPR([$1]) 2>/dev/null ||
_AS_BASENAME_SED([$1])[]
T11,124
AS_BASENAME_m4_defun_pro([$0])AS_REQUIRE([_$0_PREPARE])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T9,158
m4_popdefm4_if([$#], [0], [[$0]],
[$#], [1], [m4_ifdef([$1], [_m4_popdef([$1])],
[m4_fatal([$0: undefined macro: $1])])],
[m4_map_args([$0], $@)])
T10,280
m4_set_addm4_ifdef([_m4_set([$1],$2)],
[m4_if(m4_indir([_m4_set([$1],$2)]), [0],
[m4_define([_m4_set([$1],$2)],
[1])_m4_set_size([$1], [m4_incr])$3], [$4])],
[m4_define([_m4_set([$1],$2)],
[1])m4_pushdef([_m4_set([$1])],
[$2])_m4_set_size([$1], [m4_incr])$3])
T15,140
_AS_VAR_PUSHDEF_AS_LITERAL_IF([$2], [ ][
])([], [as_$1=_AS_TR_SH_INDIR([$2])
m4_pushdef([$1], [$as_[$1]])],
[m4_pushdef([$1], [_AS_TR_SH_LITERAL([$2])])])
T7,98
_AS_RUNm4_ifval([$2], [{ $as_echo "$as_bourne_compatible"$1 | as_run=a $2; }],
[(eval $1)]) 2>/dev/null
T26,2
_AS_LITERAL_HEREDOC_IF_YES$1
T14,131
m4_set_add_allm4_define([_m4_set_size($1)], m4_eval(m4_set_size([$1])
+ m4_len(m4_ifdef([_m4_set_cleanup($1)], [_$0_check], [_$0])([$1], $@))))
T19,62
m4_version_unletterm4_substr(m4_map_args([.m4_eval], m4_unquote(_$0([$1]))), [3])
T24,29
m4_location(AS_BASENAME)../../lib/m4sugar/m4sh.m4:942
T16,50
_m4_list_cmp_rawm4_if([$1], [$2], [0], [_m4_list_cmp_1([$1], $2)])
T11,33
m4_set_listm4_set_map_sep([$1], [], [], [,])
T36,29
m4_location(_AS_DETECT_BETTER_SHELL)../../lib/m4sugar/m4sh.m4:194
T10,72
m4_reversem4_if([$#], [0], [], [$#], [1], [[$1]],
[$0(m4_shift($@)), [$1]])
T17,196
AS_SHELL_SANITIZE_AS_SHELL_SANITIZE
m4_provide_if([AS_INIT], [],
[m4_provide([AS_INIT])
_AS_DETECT_REQUIRED([_AS_SHELL_FN_WORK])
_AS_DETECT_REQUIRED([_AS_TEST_X_WORKS])
_AS_DETECT_BETTER_SHELL
_AS_UNSET_PREPARE
])
T7,1688
m4_init# All the M4sugar macros start with `m4_', except `dnl' kept as is
# for sake of simplicity.
m4_pattern_forbid([^_?m4_])
m4_pattern_forbid([^dnl$])
# If __m4_version__ is defined, we assume that we are being run by M4
# 1.6 or newer, thus $@ recursion is linear, and debugmode(+do)
# is available for faster checks of dereferencing undefined macros
# and forcing dumpdef to print to stderr regardless of debugfile.
# But if it is missing, we assume we are being run by M4 1.4.x, that
# $@ recursion is quadratic, and that we need foreach-based
# replacement macros. Also, m4 prior to 1.4.8 loses track of location
# during m4wrap text; __line__ should never be 0.
#
# Use the raw builtin to avoid tripping up include tracing.
# Meanwhile, avoid m4_copy, since it temporarily undefines m4_defn.
m4_ifdef([__m4_version__],
[m4_debugmode([+do])
m4_define([m4_defn], _m4_defn([_m4_defn]))
m4_define([m4_dumpdef], _m4_defn([_m4_dumpdef]))
m4_define([m4_popdef], _m4_defn([_m4_popdef]))
m4_define([m4_undefine], _m4_defn([_m4_undefine]))],
[m4_builtin([include], [m4sugar/foreach.m4])
m4_wrap_lifo([m4_if(__line__, [0], [m4_pushdef([m4_location],
]]m4_dquote(m4_dquote(m4_dquote(__file__:__line__)))[[)])])])
# Rewrite the first entry of the diversion stack.
m4_divert([KILL])
# Check the divert push/pop perfect balance.
# Some users are prone to also use m4_wrap to register last-minute
# m4_divert_text; so after our diversion cleanups, we restore
# KILL as the bottom of the diversion stack.
m4_wrap([m4_popdef([_m4_divert_diversion])m4_ifdef(
[_m4_divert_diversion], [m4_fatal([$0: unbalanced m4_divert_push:
]m4_divert_stack)])_m4_popdef([_m4_divert_stack])m4_divert_push([KILL])])
T22,30
m4_location(AS_TEST_X)../../lib/m4sugar/m4sh.m4:1090
T11,70
_m4_foreachm4_if([$#], [3], [],
[$1[$4]$2[]$0([$1], [$2], m4_shift3($@))])
T12,93
m4_set_emptym4_ifdef([_m4_set_size($1)],
[m4_if(m4_indir([_m4_set_size($1)]), [0], [$2], [$3])], [$2])
T20,3
_m4_divert(DEFAULTS)100
F10,6
m4_bregexpregexp
T16,1346
_AS_ECHO_PREPARE_m4_defun_pro([$0])[as_nl='
'
export as_nl
# Printing a long string crashes Solaris 7 /usr/bin/printf.
as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
# Prefer a ksh shell builtin over an external printf program on Solaris,
# but without wasting forks for bash or zsh.
if test -z "$BASH_VERSION$ZSH_VERSION" \
&& (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='print -r --'
as_echo_n='print -rn --'
elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
as_echo='printf %s\n'
as_echo_n='printf %s'
else
if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
as_echo_body='eval /usr/ucb/echo -n "$][1$as_nl"'
as_echo_n='/usr/ucb/echo -n'
else
as_echo_body='eval expr "X$][1" : "X\\(.*\\)"'
as_echo_n_body='eval
arg=$][1;
case $arg in @%:@(
*"$as_nl"*)
expr "X$arg" : "X\\(.*\\)$as_nl";
arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
esac;
expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
'
export as_echo_n_body
as_echo_n='sh -c $as_echo_n_body as_echo'
fi
export as_echo_body
as_echo='sh -c $as_echo_body as_echo'
fi
][]_m4_defun_epi([$0])
T9,22
m4_shift2m4_shift(m4_shift($@))
T9,32
m4_shift3m4_shift(m4_shift(m4_shift($@)))
T34,29
m4_location(_AS_REEXEC_WITH_SHELL)../../lib/m4sugar/m4sh.m4:279
T6,598
m4_form4_pushdef([$1], m4_eval([$2]))m4_cond([m4_eval(([$3]) > ([$2]))], 1,
[m4_pushdef([_m4_step], m4_eval(m4_default_quoted([$4],
1)))m4_assert(_m4_step > 0)_$0(_m4_defn([$1]),
m4_eval((([$3]) - ([$2])) / _m4_step * _m4_step + ([$2])), _m4_step,],
[m4_eval(([$3]) < ([$2]))], 1,
[m4_pushdef([_m4_step], m4_eval(m4_default_quoted([$4],
-1)))m4_assert(_m4_step < 0)_$0(_m4_defn([$1]),
m4_eval((([$2]) - ([$3])) / -(_m4_step) * _m4_step + ([$2])), _m4_step,],
[m4_pushdef([_m4_step])_$0(_m4_defn([$1]), _m4_defn([$1]), 0,])[m4_define([$1],], [)$5])m4_popdef([_m4_step], [$1])
F10,7
m4_esyscmdesyscmd
F12,9
m4_debugfiledebugfile
T7,225
AT_LINEm4_if(m4_defn([_AT_LINE_file]), __file__, [],
[m4_do([m4_define([_AT_LINE_file], __file__)],
[m4_define([_AT_LINE_base],
m4_bregexp(/__file__, [/\([^/]*\)$], [[\1]]))])])dnl
m4_defn([_AT_LINE_base]):__line__
T13,20
AS_VAR_APPENDas_fn_append $1 $2[]
T13,155
AS_VAR_APPEND_m4_defun_pro([$0])AS_REQUIRE([_AS_VAR_APPEND_PREPARE], [], [M4SH-INIT-FN])[]_m4_popdef([$0])m4_indir([$0]m4_if([$#], [0], [], [,$@]))[]_m4_defun_epi([$0])
T26,104
_AS_DETECT_SUGGESTED_PRUNEm4_set_contains([_AS_DETECT_REQUIRED_BODY], [$1],
[m4_set_remove([_AS_DETECT_SUGGESTED_BODY], [$1])])
T11,146
_m4_expand_m4_if([$4], [}>=-],
[m4_changequote([-=<{$2], [)}>=-])$3m4_changequote([, ])],
[$0([$1], [($2], -=<{($2$1)}>=-, [}>=-])m4_ignore$2])
T16,9
_AS_TEST_X_WORKStest -x /
T19,156
_m4_defun_pro_outerm4_set_delete([_m4_provide])m4_pushdef([_m4_diverting([$1])])m4_pushdef([_m4_diverting], [$1])m4_pushdef([_m4_divert_dump], m4_divnum)m4_divert_push([GROW])
T15,272
_AS_DIRNAME_SED_m4_defun_pro([$0])AS_ECHO([X[]$1]) |
sed ['/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'][]_m4_defun_epi([$0])
T16,27
_AS_CASE_DEFAULT [@%:@(]
*[)] :
$1 ;;
T8,189
_m4_wrapm4_ifdef([$0_text],
[m4_define([$0_text], [$1]_m4_defn([$0_text])[$2])],
[m4_builtin([m4wrap], [m4_unquote(
_m4_defn([$0_text])_m4_popdef([$0_text]))])m4_define([$0_text], [$1$2])])
T31,98
_AT_NORMALIZE_TEST_GROUP_NUMBER
eval 'while :; do
case $$1 in #(
'"$at_format"'*) break;;
esac
$1=0$$1
done'
T19,336
_AS_MKDIR_P_PREPARE_m4_defun_pro([$0])AS_REQUIRE_SHELL_FN([as_fn_mkdir_p],
[AS_FUNCTION_DESCRIBE([as_fn_mkdir_p], [],
[Create "$as_dir" as a directory, including parents if necessary.])],
[
_AS_MKDIR_P
])if mkdir -p . 2>/dev/null; then
as_mkdir_p='mkdir -p "$as_dir"'
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
[]_m4_defun_epi([$0])
T16,169
_AS_EXPR_PREPARE_m4_defun_pro([$0])if expr a : '\(a\)' >/dev/null 2>&1 &&
test "X`expr 00001 : '.*\(...\)'`" = X001; then
as_expr=expr
else
as_expr=false
fi
[]_m4_defun_epi([$0])
T13,42
AS_VAR_SET_IFAS_IF([AS_VAR_TEST_SET([$1])], [$2], [$3])
T10,100
m4_foreachm4_if([$2], [], [],
[m4_pushdef([$1])_$0([m4_define([$1],], [)$3], [],
$2)m4_popdef([$1])])
T15,58
m4_divert_stackm4_stack_foreach_sep_lifo([_m4_divert_stack], [], [], [
])
T9,69
m4_assertm4_if(m4_eval([$1]), 0,
[m4_fatal([assert failed: $1], [$2])])
T15,123
_AT_DEFINE_INITm4_define($@)m4_pushdef([$1], [m4_fatal([$1: missing AT_INIT detected])])dnl
m4_append([_AT_DEFINE_INIT_LIST], [[$1]], [,])
T11,54
AS_VAR_COPYAS_LITERAL_WORD_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])
D-1,0
# End of frozen state file
070701000679ac000081a400000000000000000000000153b4ffc200000be2000000b500010002ffffffffffffffff0000003300000000root/usr/local/share/autoconf/autotest/specific.m4 # This file is part of Autoconf. -*- Autoconf -*-
# M4 macros used in running tests using third-party testing tools.
m4_define([_AT_COPYRIGHT_YEARS],
[Copyright (C) 2009-2012 Free Software Foundation, Inc.])
# This file is part of Autoconf. This program is free
# software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# Under Section 7 of GPL version 3, you are granted additional
# permissions described in the Autoconf Configure Script Exception,
# version 3.0, as published by the Free Software Foundation.
#
# You should have received a copy of the GNU General Public License
# and a copy of the Autoconf Configure Script Exception along with
# this program; see the files COPYINGv3 and COPYING.EXCEPTION
# respectively. If not, see .
## ------------------------ ##
## Erlang EUnit unit tests. ##
## ------------------------ ##
# AT_CHECK_EUNIT(MODULE, SPEC, [ERLFLAGS], [RUN-IF-FAIL], [RUN-IF-PASS])
# ----------------------------------------------------------------------
# Check that the EUnit test specification SPEC passes. The ERLFLAGS
# optional flags are passed to the Erlang interpreter command line to
# execute the test. The test is executed from an automatically
# generated Erlang module named MODULE. Each call to this macro should
# have a distinct MODULE name within each test group, to ease
# debugging.
# An Erlang/OTP version which contains the eunit library must be
# installed, in order to execute this macro in a test suite. The ERL,
# ERLC, and ERLCFLAGS variables must be defined in atconfig,
# typically by using the AC_ERLANG_PATH_ERL and AC_ERLANG_PATH_ERLC
# Autoconf macros.
_AT_DEFINE_SETUP([AT_CHECK_EUNIT],
[AT_SKIP_IF([test ! -f "$ERL" || test ! -f "$ERLC"])
## A wrapper to EUnit, to exit the Erlang VM with the right exit code:
AT_DATA([$1.erl],
[[-module($1).
-export([test/0, test/1]).
test() -> test([]).
test(Options) ->
TestSpec = $2,
ReturnValue = case code:load_file(eunit) of
{module, _} -> case eunit:test(TestSpec, Options) of
ok -> "0\n"; %% test passes
_ -> "1\n" %% test fails
end;
_ -> "77\n" %% EUnit not found, test skipped
end,
file:write_file("$1.result", ReturnValue),
init:stop().
]])
AT_CHECK(["$ERLC" $ERLCFLAGS -b beam $1.erl])
## Make EUnit verbose when testsuite is verbose:
if test -z "$at_verbose"; then
at_eunit_options="verbose"
else
at_eunit_options=""
fi
AT_CHECK(["$ERL" $3 -s $1 test $at_eunit_options -noshell], [0], [ignore], [],
[$4], [$5])
AT_CAPTURE_FILE([$1.result])
AT_CHECK([test -f "$1.result" && (exit `cat "$1.result"`)])
])
07070100067985000041ed00000000000000000000000253b5000600000000000000b500010002ffffffffffffffff0000002700000000root/usr/local/share/autoconf/Autom4te 07070100067987000081a400000000000000000000000153b4ffc2000023d6000000b500010002ffffffffffffffff0000003600000000root/usr/local/share/autoconf/Autom4te/ChannelDefs.pm # Copyright (C) 2002-2003, 2006, 2008-2012 Free Software Foundation,
# Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
package Autom4te::ChannelDefs;
use Autom4te::Channels;
=head1 NAME
Autom4te::ChannelDefs - channel definitions for Automake and helper functions
=head1 SYNOPSIS
use Autom4te::ChannelDefs;
print Autom4te::ChannelDefs::usage (), "\n";
prog_error ($MESSAGE, [%OPTIONS]);
error ($WHERE, $MESSAGE, [%OPTIONS]);
error ($MESSAGE);
fatal ($WHERE, $MESSAGE, [%OPTIONS]);
fatal ($MESSAGE);
verb ($MESSAGE, [%OPTIONS]);
switch_warning ($CATEGORY);
parse_WARNINGS ();
parse_warnings ($OPTION, @ARGUMENT);
Autom4te::ChannelDefs::set_strictness ($STRICTNESS_NAME);
=head1 DESCRIPTION
This package defines channels that can be used in Automake to
output diagnostics and other messages (via C). It also defines
some helper function to enable or disable these channels, and some
shorthand function to output on specific channels.
=cut
use 5.006;
use strict;
use Exporter;
use vars qw (@ISA @EXPORT);
@ISA = qw (Exporter);
@EXPORT = qw (&prog_error &error &fatal &verb
&switch_warning &parse_WARNINGS &parse_warnings);
=head2 CHANNELS
The following channels can be used as the first argument of
C. For some of them we list a shorthand
function that makes the code more readable.
=over 4
=item C
Fatal errors. Use C<&fatal> to send messages over this channel.
=item C
Common errors. Use C<&error> to send messages over this channel.
=item C
Errors related to GNU Standards.
=item C
Errors related to GNU Standards that should be warnings in "foreign" mode.
=item C
Errors related to GNITS Standards (silent by default).
=item C
Internal errors. Use C<&prog_error> to send messages over this channel.
=item C
Constructs compromising the cross-compilation of the package.
=item C
Warnings related to GNU Coding Standards.
=item C
Warnings about obsolete features (silent by default).
=item C
Warnings about user redefinitions of Automake rules or
variables (silent by default).
=item C
Warnings about non-portable constructs.
=item C
Warnings about weird syntax, unused variables, typos ...
=item C
Warnings about unsupported (or mis-supported) features.
=item C
Messages output in C<--verbose> mode. Use C<&verb> to send such messages.
=item C
Informative messages.
=back
=cut
# Initialize our list of error/warning channels.
# Do not forget to update &usage and the manual
# if you add or change a warning channel.
register_channel 'fatal', type => 'fatal', ordered => 0;
register_channel 'error', type => 'error';
register_channel 'error-gnu', type => 'error';
register_channel 'error-gnu/warn', type => 'error';
register_channel 'error-gnits', type => 'error', silent => 1;
register_channel 'automake', type => 'fatal', backtrace => 1,
header => ("####################\n" .
"## Internal Error ##\n" .
"####################\n"),
footer => "\nPlease contact .",
ordered => 0;
register_channel 'cross', type => 'warning', silent => 1;
register_channel 'gnu', type => 'warning';
register_channel 'obsolete', type => 'warning', silent => 1;
register_channel 'override', type => 'warning', silent => 1;
register_channel 'portability', type => 'warning', silent => 1;
register_channel 'syntax', type => 'warning';
register_channel 'unsupported', type => 'warning';
register_channel 'verb', type => 'debug', silent => 1, ordered => 0;
register_channel 'note', type => 'debug', silent => 0;
=head2 FUNCTIONS
=over 4
=item C
Return the warning category descriptions.
=cut
sub usage ()
{
return "Warning categories include:
`cross' cross compilation issues
`gnu' GNU coding standards (default in gnu and gnits modes)
`obsolete' obsolete features or constructions
`override' user redefinitions of Automake rules or variables
`portability' portability issues (default in gnu and gnits modes)
`syntax' dubious syntactic constructs (default)
`unsupported' unsupported or incomplete features (default)
`all' all the warnings
`no-CATEGORY' turn off warnings in CATEGORY
`none' turn off all the warnings
`error' treat warnings as errors";
}
=item C
Signal a programming error (on channel C),
display C<$MESSAGE>, and exit 1.
=cut
sub prog_error ($;%)
{
my ($msg, %opts) = @_;
msg 'automake', '', $msg, %opts;
}
=item C
=item C
Uncategorized errors.
=cut
sub error ($;$%)
{
my ($where, $msg, %opts) = @_;
msg ('error', $where, $msg, %opts);
}
=item C
=item C
Fatal errors.
=cut
sub fatal ($;$%)
{
my ($where, $msg, %opts) = @_;
msg ('fatal', $where, $msg, %opts);
}
=item C
C<--verbose> messages.
=cut
sub verb ($;%)
{
my ($msg, %opts) = @_;
msg 'verb', '', $msg, %opts;
}
=item C
If C<$CATEGORY> is C, turn on channel C.
If it is C, turn C off.
Else handle C and C for completeness.
=cut
sub switch_warning ($)
{
my ($cat) = @_;
my $has_no = 0;
if ($cat =~ /^no-(.*)$/)
{
$cat = $1;
$has_no = 1;
}
if ($cat eq 'all')
{
setup_channel_type 'warning', silent => $has_no;
}
elsif ($cat eq 'none')
{
setup_channel_type 'warning', silent => ! $has_no;
}
elsif ($cat eq 'error')
{
$warnings_are_errors = ! $has_no;
# Set exit code if Perl warns about something
# (like uninitialized variables).
$SIG{"__WARN__"} =
$has_no ? 'DEFAULT' : sub { print STDERR @_; $exit_code = 1; };
}
elsif (channel_type ($cat) eq 'warning')
{
setup_channel $cat, silent => $has_no;
}
else
{
return 1;
}
return 0;
}
=item C
Parse the WARNINGS environment variable.
=cut
sub parse_WARNINGS ()
{
if (exists $ENV{'WARNINGS'})
{
# Ignore unknown categories. This is required because WARNINGS
# should be honored by many tools.
switch_warning $_ foreach (split (',', $ENV{'WARNINGS'}));
}
}
=item C
Parse the argument of C<--warning=CATEGORY> or C<-WCATEGORY>.
C<$OPTIONS> is C<"--warning"> or C<"-W">, C<@ARGUMENT> is a list of
C.
This can be used as an argument to C.
=cut
sub parse_warnings ($@)
{
my ($opt, @categories) = @_;
foreach my $cat (map { split ',' } @categories)
{
msg 'unsupported', "unknown warning category `$cat'"
if switch_warning $cat;
}
}
=item C
Configure channels for strictness C<$STRICTNESS_NAME>.
=cut
sub set_strictness ($)
{
my ($name) = @_;
if ($name eq 'gnu')
{
setup_channel 'error-gnu', silent => 0;
setup_channel 'error-gnu/warn', silent => 0, type => 'error';
setup_channel 'error-gnits', silent => 1;
setup_channel 'portability', silent => 0;
setup_channel 'gnu', silent => 0;
}
elsif ($name eq 'gnits')
{
setup_channel 'error-gnu', silent => 0;
setup_channel 'error-gnu/warn', silent => 0, type => 'error';
setup_channel 'error-gnits', silent => 0;
setup_channel 'portability', silent => 0;
setup_channel 'gnu', silent => 0;
}
elsif ($name eq 'foreign')
{
setup_channel 'error-gnu', silent => 1;
setup_channel 'error-gnu/warn', silent => 0, type => 'warning';
setup_channel 'error-gnits', silent => 1;
setup_channel 'portability', silent => 1;
setup_channel 'gnu', silent => 1;
}
else
{
prog_error "level `$name' not recognized\n";
}
}
=back
=head1 SEE ALSO
L
=head1 HISTORY
Written by Alexandre Duret-Lutz EFE.
=cut
### Setup "GNU" style for perl-mode and cperl-mode.
## Local Variables:
## perl-indent-level: 2
## perl-continued-statement-offset: 2
## perl-continued-brace-offset: 0
## perl-brace-offset: 0
## perl-brace-imaginary-offset: 0
## perl-label-offset: -2
## cperl-indent-level: 2
## cperl-brace-offset: 0
## cperl-continued-brace-offset: 0
## cperl-label-offset: -2
## cperl-extra-newline-before-brace: t
## cperl-merge-trailing-else: nil
## cperl-continued-statement-offset: 2
## End:
07070100067986000081a400000000000000000000000153b4ffc200001331000000b500010002ffffffffffffffff0000003000000000root/usr/local/share/autoconf/Autom4te/C4che.pm # autoconf -- create `configure' using m4 macros
# Copyright (C) 2003, 2006, 2009-2012 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
package Autom4te::C4che;
=head1 NAME
Autom4te::C4che - a single m4 run request
=head1 SYNOPSIS
use Autom4te::C4che;
=head1 DESCRIPTION
This Perl module handles the cache of M4 runs used by autom4te.
=cut
use Data::Dumper;
use Autom4te::Request;
use Carp;
use strict;
=over 4
=item @request
List of requests.
We cannot declare it "my" as the loading, performed via "do", would
refer to another scope, and @request would not be updated. It used to
work with "my" vars, and I do not know whether the current behavior
(5.6) is wanted or not.
=cut
use vars qw(@request);
=item C<$req = Autom4te::C4che-Eretrieve (%attr)>
Find a request with the same path and input.
=cut
sub retrieve($%)
{
my ($self, %attr) = @_;
foreach (@request)
{
# Same path.
next
if join ("\n", @{$_->path}) ne join ("\n", @{$attr{path}});
# Same inputs.
next
if join ("\n", @{$_->input}) ne join ("\n", @{$attr{input}});
# Found it.
return $_;
}
return undef;
}
=item C<$req = Autom4te::C4che-Eregister (%attr)>
Create and register a request for these path and input.
=cut
# $REQUEST-OBJ
# register ($SELF, %ATTR)
# -----------------------
# NEW should not be called directly.
# Private.
sub register ($%)
{
my ($self, %attr) = @_;
# path and input are the only ID for a request object.
my $obj = new Autom4te::Request ('path' => $attr{path},
'input' => $attr{input});
push @request, $obj;
# Assign an id for cache file.
$obj->id ("$#request");
return $obj;
}
=item C<$req = Autom4te::C4che-Erequest (%request)>
Get (retrieve or create) a request for the path C<$request{path}> and
the input C<$request{input}>.
=cut
# $REQUEST-OBJ
# request($SELF, %REQUEST)
# ------------------------
sub request ($%)
{
my ($self, %request) = @_;
my $req =
Autom4te::C4che->retrieve (%request)
|| Autom4te::C4che->register (%request);
# If there are new traces to produce, then we are not valid.
foreach (@{$request{'macro'}})
{
if (! exists ${$req->macro}{$_})
{
${$req->macro}{$_} = 1;
$req->valid (0);
}
}
# It would be great to have $REQ check that it is up to date wrt
# its dependencies, but that requires getting traces (to fetch the
# included files), which is out of the scope of Request (currently?).
return $req;
}
=item C<$string = Autom4te::C4che-Emarshall ()>
Serialize all the current requests.
=cut
# marshall($SELF)
# ---------------
sub marshall ($)
{
my ($caller) = @_;
my $res = '';
my $marshall = Data::Dumper->new ([\@request], [qw (*request)]);
$marshall->Indent(2)->Terse(0);
$res = $marshall->Dump . "\n";
return $res;
}
=item Csave ($file)>
Save the cache in the C<$file> file object.
=cut
# SAVE ($FILE)
# ------------
sub save ($$)
{
my ($self, $file) = @_;
confess "cannot save a single request\n"
if ref ($self);
$file->seek (0, 0);
$file->truncate (0);
print $file
"# This file was generated.\n",
"# It contains the lists of macros which have been traced.\n",
"# It can be safely removed.\n",
"\n",
$self->marshall;
}
=item Cload ($file)>
Load the cache from the C<$file> file object.
=cut
# LOAD ($FILE)
# ------------
sub load ($$)
{
my ($self, $file) = @_;
my $fname = $file->name;
confess "cannot load a single request\n"
if ref ($self);
my $contents = join "", $file->getlines;
eval $contents;
confess "cannot eval $fname: $@\n" if $@;
}
=head1 SEE ALSO
L
=head1 HISTORY
Written by Akim Demaille EFE.
=cut
1; # for require
### Setup "GNU" style for perl-mode and cperl-mode.
## Local Variables:
## perl-indent-level: 2
## perl-continued-statement-offset: 2
## perl-continued-brace-offset: 0
## perl-brace-offset: 0
## perl-brace-imaginary-offset: 0
## perl-label-offset: -2
## cperl-indent-level: 2
## cperl-brace-offset: 0
## cperl-continued-brace-offset: 0
## cperl-label-offset: -2
## cperl-extra-newline-before-brace: t
## cperl-merge-trailing-else: nil
## cperl-continued-statement-offset: 2
## End:
0707010006798e000081a400000000000000000000000153b4ffc200001e5f000000b500010002ffffffffffffffff0000003000000000root/usr/local/share/autoconf/Autom4te/XFile.pm # Copyright (C) 2001-2012 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
# Written by Akim Demaille .
###############################################################
# The main copy of this file is in Automake's git repository. #
# Updates should be sent to automake-patches@gnu.org. #
###############################################################
package Autom4te::XFile;
=head1 NAME
Autom4te::XFile - supply object methods for filehandles with error handling
=head1 SYNOPSIS
use Autom4te::XFile;
$fh = new Autom4te::XFile;
$fh->open ("< file");
# No need to check $FH: we died if open failed.
print <$fh>;
$fh->close;
# No need to check the return value of close: we died if it failed.
$fh = new Autom4te::XFile "> file";
# No need to check $FH: we died if new failed.
print $fh "bar\n";
$fh->close;
$fh = new Autom4te::XFile "file", "r";
# No need to check $FH: we died if new failed.
defined $fh
print <$fh>;
undef $fh; # automatically closes the file and checks for errors.
$fh = new Autom4te::XFile "file", O_WRONLY | O_APPEND;
# No need to check $FH: we died if new failed.
print $fh "corge\n";
$pos = $fh->getpos;
$fh->setpos ($pos);
undef $fh; # automatically closes the file and checks for errors.
autoflush STDOUT 1;
=head1 DESCRIPTION
C inherits from C. It provides the method
C returning the file name. It provides dying versions of the
methods C, C (corresponding to C), C,
C, C, and C. It also overrides the C
and C methods to translate C<\r\n> to C<\n>.
=cut
use 5.006;
use strict;
use vars qw($VERSION @EXPORT @EXPORT_OK $AUTOLOAD @ISA);
use Carp;
use Errno;
use IO::File;
use File::Basename;
use Autom4te::ChannelDefs;
use Autom4te::Channels qw(msg);
use Autom4te::FileUtils;
require Exporter;
require DynaLoader;
@ISA = qw(IO::File Exporter DynaLoader);
$VERSION = "1.2";
@EXPORT = @IO::File::EXPORT;
eval {
# Make all Fcntl O_XXX and LOCK_XXX constants available for importing
require Fcntl;
my @O = grep /^(LOCK|O)_/, @Fcntl::EXPORT, @Fcntl::EXPORT_OK;
Fcntl->import (@O); # first we import what we want to export
push (@EXPORT, @O);
};
=head2 Methods
=over
=item C<$fh = new Autom4te::XFile ([$expr, ...]>
Constructor a new XFile object. Additional arguments
are passed to C, if any.
=cut
sub new
{
my $type = shift;
my $class = ref $type || $type || "Autom4te::XFile";
my $fh = $class->SUPER::new ();
if (@_)
{
$fh->open (@_);
}
$fh;
}
=item C<$fh-Eopen ([$file, ...])>
Open a file, passing C<$file> and further arguments to C.
Die if opening fails. Store the name of the file. Use binmode for writing.
=cut
sub open
{
my $fh = shift;
my ($file) = @_;
# WARNING: Gross hack: $FH is a typeglob: use its hash slot to store
# the 'name' of the file we are opening. See the example with
# io_socket_timeout in IO::Socket for more, and read Graham's
# comment in IO::Handle.
${*$fh}{'autom4te_xfile_file'} = "$file";
if (!$fh->SUPER::open (@_))
{
fatal "cannot open $file: $!";
}
# In case we're running under MSWindows, don't write with CRLF.
# (This circumvents a bug in at least Cygwin bash where the shell
# parsing fails on lines ending with the continuation character '\'
# and CRLF).
binmode $fh if $file =~ /^\s*>/;
}
=item C<$fh-Eclose>
Close the file, handling errors.
=cut
sub close
{
my $fh = shift;
if (!$fh->SUPER::close (@_))
{
my $file = $fh->name;
Autom4te::FileUtils::handle_exec_errors $file
unless $!;
fatal "cannot close $file: $!";
}
}
=item C<$line = $fh-Egetline>
Read and return a line from the file. Ensure C<\r\n> is translated to
C<\n> on input files.
=cut
# Some native Windows/perl installations fail to translate \r\n to \n on
# input so we do that here.
sub getline
{
local $_ = $_[0]->SUPER::getline;
# Perform a _global_ replacement: $_ may can contains many lines
# in slurp mode ($/ = undef).
s/\015\012/\n/gs if defined $_;
return $_;
}
=item C<@lines = $fh-Egetlines>
Slurp lines from the files.
=cut
sub getlines
{
my @res = ();
my $line;
push @res, $line while $line = $_[0]->getline;
return @res;
}
=item C<$name = $fh-Ename>
Return the name of the file.
=cut
sub name
{
my $fh = shift;
return ${*$fh}{'autom4te_xfile_file'};
}
=item C<$fh-Elock>
Lock the file using C. If locking fails for reasons other than
C being unsupported, then error out if C<$ENV{'MAKEFLAGS'}> indicates
that we are spawned from a parallel C.
=cut
sub lock
{
my ($fh, $mode) = @_;
# Cannot use @_ here.
# Unless explicitly configured otherwise, Perl implements its 'flock' with the
# first of flock(2), fcntl(2), or lockf(3) that works. These can fail on
# NFS-backed files, with ENOLCK (GNU/Linux) or EOPNOTSUPP (FreeBSD); we
# usually ignore these errors. If $ENV{MAKEFLAGS} suggests that a parallel
# invocation of 'make' has invoked the tool we serve, report all locking
# failures and abort.
#
# On Unicos, flock(2) and fcntl(2) over NFS hang indefinitely when 'lockd' is
# not running. NetBSD NFS clients silently grant all locks. We do not
# attempt to defend against these dangers.
#
# -j is for parallel BSD make, -P is for parallel HP-UX make.
if (!flock ($fh, $mode))
{
my $make_j = (exists $ENV{'MAKEFLAGS'}
&& " -$ENV{'MAKEFLAGS'}" =~ / (-[BdeikrRsSw]*[jP]|--[jP]|---?jobs)/);
my $note = "\nforgo \"make -j\" or use a file system that supports locks";
my $file = $fh->name;
msg ($make_j ? 'fatal' : 'unsupported',
"cannot lock $file with mode $mode: $!" . ($make_j ? $note : ""))
if $make_j || !($!{ENOLCK} || $!{EOPNOTSUPP});
}
}
=item C<$fh-Eseek ($position, [$whence])>
Seek file to C<$position>. Die if seeking fails.
=cut
sub seek
{
my $fh = shift;
# Cannot use @_ here.
if (!seek ($fh, $_[0], $_[1]))
{
my $file = $fh->name;
fatal "cannot rewind $file with @_: $!";
}
}
=item C<$fh-Etruncate ($len)>
Truncate the file to length C<$len>. Die on failure.
=cut
sub truncate
{
my ($fh, $len) = @_;
if (!truncate ($fh, $len))
{
my $file = $fh->name;
fatal "cannot truncate $file at $len: $!";
}
}
=back
=head1 SEE ALSO
L,
L,
L
L
L
=head1 HISTORY
Derived from IO::File.pm by Akim Demaille EFE.
=cut
1;
### Setup "GNU" style for perl-mode and cperl-mode.
## Local Variables:
## perl-indent-level: 2
## perl-continued-statement-offset: 2
## perl-continued-brace-offset: 0
## perl-brace-offset: 0
## perl-brace-imaginary-offset: 0
## perl-label-offset: -2
## cperl-indent-level: 2
## cperl-brace-offset: 0
## cperl-continued-brace-offset: 0
## cperl-label-offset: -2
## cperl-extra-newline-before-brace: t
## cperl-merge-trailing-else: nil
## cperl-continued-statement-offset: 2
## End:
07070100067988000081a400000000000000000000000153b4ffc2000051db000000b500010002ffffffffffffffff0000003300000000root/usr/local/share/autoconf/Autom4te/Channels.pm # Copyright (C) 2002-2012 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
###############################################################
# The main copy of this file is in Automake's git repository. #
# Updates should be sent to automake-patches@gnu.org. #
###############################################################
package Autom4te::Channels;
=head1 NAME
Autom4te::Channels - support functions for error and warning management
=head1 SYNOPSIS
use Autom4te::Channels;
# Register a channel to output warnings about unused variables.
register_channel 'unused', type => 'warning';
# Register a channel for system errors.
register_channel 'system', type => 'error', exit_code => 4;
# Output a message on channel 'unused'.
msg 'unused', "$file:$line", "unused variable '$var'";
# Make the 'unused' channel silent.
setup_channel 'unused', silent => 1;
# Turn on all channels of type 'warning'.
setup_channel_type 'warning', silent => 0;
# Redirect all channels to push messages on a Thread::Queue using
# the specified serialization key.
setup_channel_queue $queue, $key;
# Output a message pending in a Thread::Queue.
pop_channel_queue $queue;
# Treat all warnings as errors.
$warnings_are_errors = 1;
# Exit with the greatest exit code encountered so far.
exit $exit_code;
=head1 DESCRIPTION
This perl module provides support functions for handling diagnostic
channels in programs. Channels can be registered to convey fatal,
error, warning, or debug messages. Each channel has various options
(e.g. is the channel silent, should duplicate messages be removed,
etc.) that can also be overridden on a per-message basis.
=cut
use 5.006;
use strict;
use Exporter;
use Carp;
use File::Basename;
use vars qw (@ISA @EXPORT %channels $me);
@ISA = qw (Exporter);
@EXPORT = qw ($exit_code $warnings_are_errors
&reset_local_duplicates &reset_global_duplicates
®ister_channel &msg &exists_channel &channel_type
&setup_channel &setup_channel_type
&dup_channel_setup &drop_channel_setup
&buffer_messages &flush_messages
&setup_channel_queue &pop_channel_queue
US_GLOBAL US_LOCAL
UP_NONE UP_TEXT UP_LOC_TEXT);
$me = basename $0;
=head2 Global Variables
=over 4
=item C<$exit_code>
The greatest exit code seen so far. C<$exit_code> is updated from
the C options of C and C channels.
=cut
use vars qw ($exit_code);
$exit_code = 0;
=item C<$warnings_are_errors>
Set this variable to 1 if warning messages should be treated as
errors (i.e. if they should update C<$exit_code>).
=cut
use vars qw ($warnings_are_errors);
$warnings_are_errors = 0;
=back
=head2 Constants
=over 4
=item C, C, C
Possible values for the C options. This selects the part
of the message that should be considered when filtering out duplicates.
If C is used, the location and the explanation message
are used for filtering. If C is used, only the explanation
message is used (so the same message will be filtered out if it appears
at different locations). C means that duplicate messages
should be output.
=cut
use constant UP_NONE => 0;
use constant UP_TEXT => 1;
use constant UP_LOC_TEXT => 2;
=item C, C
Possible values for the C options.
Use C for error messages that should be printed only
once during the execution of the program, C for message that
should be printed only once per file. (Actually, C does not
do this now when files are changed, it relies on you calling
C when this happens.)
=cut
# possible values for uniq_scope
use constant US_LOCAL => 0;
use constant US_GLOBAL => 1;
=back
=head2 Options
Channels accept the options described below. These options can be
passed as a hash to the C, C, and C
functions. The possible keys, with their default value are:
=over
=item C 'warning'>
The type of the channel. One of C<'debug'>, C<'warning'>, C<'error'>, or
C<'fatal'>. Fatal messages abort the program when they are output.
Error messages update the exit status. Debug and warning messages are
harmless, except that warnings are treated as errors if
C<$warnings_are_errors> is set.
=item C 1>
The value to update C<$exit_code> with when a fatal or error message
is emitted. C<$exit_code> is also updated for warnings output
when C<$warnings_are_errors> is set.
=item C \*STDERR>
The file where the error should be output.
=item C 0>
Whether the channel should be silent. Use this do disable a
category of warning, for instance.
=item C 1>
Whether, with multi-threaded execution, the message should be queued
for ordered output.
=item C UP_LOC_TEXT>
The part of the message subject to duplicate filtering. See the
documentation for the C, C, and C
constants above.
C can also be set to an arbitrary string that will be used
instead of the message when considering duplicates.
=item C US_LOCAL>
The scope of duplicate filtering. See the documentation for the
C, and C constants above.
=item C ''>
A string to prepend to each message emitted through this channel.
With partial messages, only the first part will have C
prepended.
=item C