From dfbc00d4cf85638a6fa640cb9bab7e815b605d62 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Thu, 27 Sep 2001 09:01:04 +0000 Subject: [PATCH] * m4/cond.m4, m4/init.m4, m4/header.m4: Remove Autoconf 2.13 code. --- ChangeLog | 4 ++++ m4/cond.m4 | 18 +++++----------- m4/header.m4 | 60 +++++++++++++++------------------------------------- m4/init.m4 | 39 ++++++++++------------------------ 4 files changed, 37 insertions(+), 84 deletions(-) diff --git a/ChangeLog b/ChangeLog index 62e7a1e1..869209cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-09-27 Akim Demaille + + * m4/cond.m4, m4/init.m4, m4/header.m4: Remove Autoconf 2.13 code. + 2001-09-27 Akim Demaille * lib/am/distdir.am (dist): Rename as... diff --git a/m4/cond.m4 b/m4/cond.m4 index f405f646..e4556c4f 100644 --- a/m4/cond.m4 +++ b/m4/cond.m4 @@ -1,4 +1,4 @@ -# AM_CONDITIONAL +# AM_CONDITIONAL -*- Autoconf -*- # Copyright 1997, 2000, 2001 Free Software Foundation, Inc. @@ -17,23 +17,15 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. -# serial 3 +# serial 4 + +AC_PREREQ(2.52) # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. -# -# FIXME: Once using 2.50, use this: -# m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl AC_DEFUN([AM_CONDITIONAL], -[ifelse([$1], [TRUE], - [errprint(__file__:__line__: [$0: invalid condition: $1 -])dnl -m4exit(1)])dnl -ifelse([$1], [FALSE], - [errprint(__file__:__line__: [$0: invalid condition: $1 -])dnl -m4exit(1)])dnl +[m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then diff --git a/m4/header.m4 b/m4/header.m4 index 9e218689..a29f0d95 100644 --- a/m4/header.m4 +++ b/m4/header.m4 @@ -1,4 +1,4 @@ -# Like AC_CONFIG_HEADER, but automatically create stamp file. +# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. @@ -17,57 +17,31 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. -# serial 3 +# serial 4 # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. We must strip everything past the first ":", # and everything past the last "/". -AC_PREREQ([2.12]) +AC_PREREQ([2.52]) AC_DEFUN([AM_CONFIG_HEADER], -[ifdef([AC_FOREACH],dnl - [dnl init our file count if it isn't already - m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0])) - dnl prepare to store our destination file list for use in config.status - AC_FOREACH([_AM_File], [$1], - [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*])) - m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index)) - dnl and add it to the list of files AC keeps track of, along - dnl with our hook - AC_CONFIG_HEADERS(_AM_File, -dnl COMMANDS, [, INIT-CMDS] -[# update the timestamp +[dnl init our file count if it isn't already +m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0])) +dnl prepare to store our destination file list for use in config.status +AC_FOREACH([_AM_File], [$1], + [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*])) + m4_define([_AM_Config_Header_Index], + m4_incr(_AM_Config_Header_Index)) + dnl and add it to the list of files AC keeps track of, along + dnl with our hook + AC_CONFIG_HEADERS(_AM_File, + [# update the timestamp echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index[" -][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS - m4_popdef([_AM_Dest])])],dnl -[AC_CONFIG_HEADER([$1]) - AC_OUTPUT_COMMANDS( - ifelse(patsubst([$1], [[^ ]], []), - [], - [test -z "$CONFIG_HEADERS" || echo timestamp >dnl - patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl -[am_indx=1 -for am_file in $1; do - case " \$CONFIG_HEADERS " in - *" \$am_file "*) - am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\` - if test -n "\$am_dir"; then - am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\` - for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do - am_tmpdir=\$am_tmpdir\$am_subdir/ - if test ! -d \$am_tmpdir; then - mkdir \$am_tmpdir - fi - done - fi - echo timestamp > "\$am_dir"stamp-h\$am_indx - ;; - esac - am_indx=\`expr \$am_indx + 1\` -done]) -])]) # AM_CONFIG_HEADER +][$2]m4_ifval([$3], [, [$3]])) + m4_popdef([_AM_Dest])]) +]) # AM_CONFIG_HEADER # _AM_DIRNAME(PATH) # ----------------- diff --git a/m4/init.m4 b/m4/init.m4 index 26b676d1..0e859bf5 100644 --- a/m4/init.m4 +++ b/m4/init.m4 @@ -1,6 +1,7 @@ -# Do all the work for Automake. This macro actually does too much -- -# some checks are only needed if your package does certain things. -# But this isn't really a big deal. +# Do all the work for Automake. -*- Autoconf -*- + +# This macro actually does too much some checks are only needed if +# your package does certain things. But this isn't really a big deal. # Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. @@ -19,7 +20,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. -# serial 5 +# serial 6 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -28,23 +29,11 @@ # CC etc. in the Makefile, will ask for an AC_PROG_CC use... -# We require 2.50 because we need the PATH_SEPARATOR output variable, and -# we rely on autoconf to neutralize CDPATH. -AC_PREREQ([2.50]) - -# AC_PROVIDE_IFELSE(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. -# If this macro is not defined by Autoconf, define it here. -ifdef([AC_PROVIDE_IFELSE], - [], - [define([AC_PROVIDE_IFELSE], - [ifdef([AC_PROVIDE_$1], - [$2], [$3])])]) +AC_PREREQ([2.52]) +# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow +# the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE]) # ---------------------------------------------- @@ -57,18 +46,12 @@ if test "`cd $srcdir && pwd`" != "`pwd`" && fi # Define the identity of the package. -PACKAGE=$1 -AC_SUBST(PACKAGE)dnl -VERSION=$2 -AC_SUBST(VERSION)dnl +AC_SUBST([PACKAGE], [$1])dnl +AC_SUBST([VERSION], [$2])dnl ifelse([$3],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])]) -# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow -# the ones we care about. -ifdef([m4_pattern_allow], - [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl -- 2.43.5