automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01-m4-2-52.patch


From: Akim Demaille
Subject: 01-m4-2-52.patch
Date: Sun, 23 Sep 2001 19:31:08 +0200

Code simplification.

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * m4/cond.m4, m4/init.m4, m4/header.m4: Remove Autoconf 2.13 code.

Index: m4/cond.m4
--- m4/cond.m4 Sun, 23 Sep 2001 08:36:36 +0200 akim
+++ m4/cond.m4 Sun, 23 Sep 2001 09:26:26 +0200 akim
@@ -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
Index: m4/header.m4
--- m4/header.m4 Sun, 23 Sep 2001 08:36:36 +0200 akim
+++ m4/header.m4 Sun, 23 Sep 2001 09:21:50 +0200 akim
@@ -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)
 # -----------------
Index: m4/init.m4
--- m4/init.m4 Sun, 23 Sep 2001 08:36:36 +0200 akim
+++ m4/init.m4 Sun, 23 Sep 2001 09:32:38 +0200 akim
@@ -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,46 +29,28 @@
 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...


-# We require 2.13 because we rely on SHELL being computed by configure.
-AC_PREREQ([2.13])
-
-# 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])
 # ----------------------------------------------
 AC_DEFUN([AM_INIT_AUTOMAKE],
 [AC_REQUIRE([AC_PROG_INSTALL])dnl
 # test to see if srcdir already configured
-if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
    test -f $srcdir/config.status; then
   AC_MSG_ERROR([source directory already configured; run \"make distclean\" 
there first])
 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

 # Autoconf 2.50 always computes EXEEXT.  However we need to be
 # compatible with 2.13, for now.  So we always define EXEEXT, but we



reply via email to

[Prev in Thread] Current Thread [Next in Thread]