]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Prefer m4_fatal over AC_FATAL.
authorEric Blake <ebb9@byu.net>
Mon, 27 Oct 2008 23:22:40 +0000 (17:22 -0600)
committerEric Blake <ebb9@byu.net>
Mon, 27 Oct 2008 23:22:40 +0000 (17:22 -0600)
* lib/autoconf/types.m4 (AC_CHECK_SIZEOF, AC_CHECK_ALIGNOF)
(AC_CHECK_MEMBER): Use non-obsolete macro name.
* lib/autoconf/fortran.m4 (_AC_LIST_MEMBER_IF): Likewise.
* lib/autoconf/general.m4 (AC_REQUIRE_AUX_FILE, AC_SUBST):
Likewise.
* lib/autoconf/lang.m4 (_AC_LANG_DISPATCH): Likewise.
* lib/autoconf/status.m4 (_AC_CONFIG_DEPENDENCY_DEFAULT)
(_AC_CONFIG_UNIQUE, _AC_CONFIG_REGISTER_DEST): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/autoconf/fortran.m4
lib/autoconf/general.m4
lib/autoconf/lang.m4
lib/autoconf/status.m4
lib/autoconf/types.m4

index e7704b2c8cce0902ef8b901a2b4036fe4689cb9a..9a6a5f7562d60733ec351ac8d582554d64fd8d11 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2008-10-27  Eric Blake  <ebb9@byu.net>
+
+       Prefer m4_fatal over AC_FATAL.
+       * lib/autoconf/types.m4 (AC_CHECK_SIZEOF, AC_CHECK_ALIGNOF)
+       (AC_CHECK_MEMBER): Use non-obsolete macro name.
+       * lib/autoconf/fortran.m4 (_AC_LIST_MEMBER_IF): Likewise.
+       * lib/autoconf/general.m4 (AC_REQUIRE_AUX_FILE, AC_SUBST):
+       Likewise.
+       * lib/autoconf/lang.m4 (_AC_LANG_DISPATCH): Likewise.
+       * lib/autoconf/status.m4 (_AC_CONFIG_DEPENDENCY_DEFAULT)
+       (_AC_CONFIG_UNIQUE, _AC_CONFIG_REGISTER_DEST): Likewise.
+
 2008-10-27  Eric Blake  <ebb9@byu.net>
 
        Avoid raw carriage return in scripts.
index 34d930184ebc9261c80c73dfd9e1a3b99741f98d..519f3f075b33941062ea5db001b701a689ef6787 100644 (file)
 # if ELEMENT is a member of LIST, otherwise it executes
 # ACTION-IF-NOT-FOUND.
 AC_DEFUN([_AC_LIST_MEMBER_IF],
-[dnl Do some sanity checking of the arguments.
-m4_if([$1], , [AC_FATAL([$0: missing argument 1])])dnl
-m4_if([$2], , [AC_FATAL([$0: missing argument 2])])dnl
-  ac_exists=false
+dnl Do some sanity checking of the arguments.
+[m4_if([$1], , [m4_fatal([$0: missing argument 1])],
+      [$2], , [m4_fatal([$0: missing argument 2])])]dnl
+[  ac_exists=false
   for ac_i in $2; do
     if test x"$1" = x"$ac_i"; then
       ac_exists=true
index c8ab4afbce07c4dc49c7d54aff0f16eaffe181f3..922dda3a533224dec217f46f0773fdf31e8319cd 100644 (file)
@@ -1722,7 +1722,7 @@ AC_DEFUN([AC_CONFIG_MACRO_DIR], [])
 # It announces FILE is required in the auxdir.
 m4_define([AC_REQUIRE_AUX_FILE],
 [AS_LITERAL_IF([$1], [],
-              [AC_FATAL([$0: requires a literal argument])])])
+              [m4_fatal([$0: requires a literal argument])])])
 
 
 
@@ -2111,12 +2111,11 @@ m4_define([AC_SUBST_TRACE])
 #
 m4_define([AC_SUBST],
 [AS_IDENTIFIER_IF([$1], [],
-  [AC_FATAL([$0: `$1' is not a valid shell variable name])])dnl
-AC_SUBST_TRACE([$1])dnl
-m4_pattern_allow([^$1$])dnl
-m4_ifvaln([$2], [$1=$2])[]dnl
-m4_set_add([_AC_SUBST_VARS], [$1])dnl
-])# AC_SUBST
+  [m4_fatal([$0: `$1' is not a valid shell variable name])])]dnl
+[AC_SUBST_TRACE([$1])]dnl
+[m4_pattern_allow([^$1$])]dnl
+[m4_ifvaln([$2], [$1=$2])[]]dnl
+[m4_set_add([_AC_SUBST_VARS], [$1])])# AC_SUBST
 
 
 # AC_SUBST_FILE(VARIABLE)
index c48f1de78ff85006547505607437a25bda104925..9ebc7d688005f6732a857066aa8378aae913ed22 100644 (file)
@@ -86,7 +86,7 @@ m4_define([AC_LANG_CASE],
 m4_define([_AC_LANG_DISPATCH],
 [m4_ifdef([$1($2)],
        [m4_indir([$1($2)], m4_shift2($@))],
-       [AC_FATAL([$1: unknown language: $2])])])
+       [m4_fatal([$1: unknown language: $2])])])
 
 
 # _AC_LANG_SET(OLD, NEW)
@@ -495,7 +495,7 @@ do
        # certainly right.
        break;;
     *.* )
-        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+       if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
        then :; else
           ac_cv_exeext=`expr "$ac_file" : ['[^.]*\(\..*\)']`
        fi
index eb3ddbd4e02ada6c855a4a019c25b6ab2c7df491..54758b1115ddb986583e894bfd241adbbeb53bde 100644 (file)
@@ -207,7 +207,8 @@ m4_define([_AC_CONFIG_DEPENDENCY],
 m4_define([_AC_CONFIG_DEPENDENCY_DEFAULT],
 [m4_bmatch([$2], [:], [],
           [m4_if([$1], [LINKS],
-                 [AS_LITERAL_IF([$2], [AC_FATAL([Invalid AC_CONFIG_LINKS tag: `$2'])])],
+                 [AS_LITERAL_IF([$2],
+                   [m4_fatal([Invalid AC_CONFIG_LINKS tag: `$2'])])],
                  [:$2.in])])dnl
 ])
 
@@ -220,7 +221,8 @@ m4_define([_AC_CONFIG_DEPENDENCY_DEFAULT],
 #
 m4_define([_AC_CONFIG_UNIQUE],
 [m4_ifdef([_AC_SEEN_TAG($2)],
-   [AC_FATAL([`$2' is already registered with AC_CONFIG_]m4_defn([_AC_SEEN_TAG($2)]).)],
+   [m4_fatal([`$2' is already registered with AC_CONFIG_]m4_defn(
+     [_AC_SEEN_TAG($2)]).)],
    [m4_define([_AC_SEEN_TAG($2)], [$1])])dnl
 ])
 
@@ -270,15 +272,15 @@ _AC_CONFIG_REGISTER_DEST([$1], [$2], m4_bpatsubst([[$2]], [:.*\(.\)$], [\1]), [$
 # Save the name of the first config header to AH_HEADER.
 #
 m4_define([_AC_CONFIG_REGISTER_DEST],
-[_AC_CONFIG_UNIQUE([$1], [$3])dnl
-m4_if([$1 $3], [LINKS .],
-      [AC_FATAL([invalid destination of a config link: `.'])])dnl
-m4_if([$1], [HEADERS],
-      [m4_define_default([AH_HEADER], [$3])])dnl
+[_AC_CONFIG_UNIQUE([$1], [$3])]dnl
+[m4_if([$1 $3], [LINKS .],
+       [m4_fatal([invalid destination of a config link: `.'])],
+       [$1], [HEADERS],
+       [m4_define_default([AH_HEADER], [$3])])]dnl
 dnl
 dnl Recognize TAG as an argument to config.status:
 dnl
-m4_append([_AC_LIST_TAGS],
+[m4_append([_AC_LIST_TAGS],
 [    "$3") CONFIG_$1="$CONFIG_$1 $2" ;;
 ])dnl
 dnl
index f310cd12b0e451fb4a5ed0b2816209faf9dcf308..2b633319bc07e46dd6746564f4433ac2eb85e21b 100644 (file)
@@ -150,7 +150,7 @@ m4_define([_AC_CHECK_TYPE_NEW_BODY],
   AC_COMPILE_IFELSE(
     [AC_LANG_PROGRAM([$[]4],
        [if (sizeof ($[]2))
-         return 0;])],
+        return 0;])],
     [AC_COMPILE_IFELSE(
        [AC_LANG_PROGRAM([$[]4],
          [if (sizeof (($[]2)))
@@ -741,8 +741,8 @@ Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.])
 # ---------------------------------------------------------------
 AC_DEFUN([AC_CHECK_SIZEOF],
 [AS_LITERAL_IF([$1], [],
-              [AC_FATAL([$0: requires literal arguments])])dnl
-# The cast to long int works around a bug in the HP C Compiler
+              [m4_fatal([$0: requires literal arguments])])]dnl
+[# The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
 # This bug is HP SR number 8606223364.
@@ -764,8 +764,8 @@ AC_DEFINE_UNQUOTED(AS_TR_CPP(sizeof_$1), $AS_TR_SH([ac_cv_sizeof_$1]),
 # -----------------------------------------------------
 AC_DEFUN([AC_CHECK_ALIGNOF],
 [AS_LITERAL_IF([$1], [],
-              [AC_FATAL([$0: requires literal arguments])])dnl
-# The cast to long int works around a bug in the HP C Compiler,
+              [m4_fatal([$0: requires literal arguments])])]dnl
+[# The cast to long int works around a bug in the HP C Compiler,
 # see AC_CHECK_SIZEOF for more information.
 _AC_CACHE_CHECK_INT([alignment of $1], [AS_TR_SH([ac_cv_alignof_$1])],
   [(long int) offsetof (ac__type_alignof_, y)],
@@ -829,12 +829,12 @@ you adjust the code.])
 # variables are not a valid argument.
 AC_DEFUN([AC_CHECK_MEMBER],
 [AS_LITERAL_IF([$1], [],
-              [AC_FATAL([$0: requires literal arguments])])dnl
-m4_bmatch([$1], [\.], ,
-        [m4_fatal([$0: Did not see any dot in `$1'])])dnl
-AS_VAR_PUSHDEF([ac_Member], [ac_cv_member_$1])dnl
+              [AC_FATAL([$0: requires literal arguments])])]dnl
+[m4_if(m4_index([$1], [.]), [-1],
+       [m4_fatal([$0: Did not see any dot in `$1'])])]dnl
+[AS_VAR_PUSHDEF([ac_Member], [ac_cv_member_$1])]dnl
 dnl Extract the aggregate name, and the member name
-AC_CACHE_CHECK([for $1], [ac_Member],
+[AC_CACHE_CHECK([for $1], [ac_Member],
 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT([$4])],
 [dnl AGGREGATE ac_aggr;
 static m4_bpatsubst([$1], [\..*]) ac_aggr;