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.

Signed-off-by: Eric Blake <ebb9@byu.net>
This commit is contained in:
Eric Blake 2008-10-27 17:22:40 -06:00
parent cb34ecf15c
commit d783e51764
6 changed files with 44 additions and 31 deletions

View File

@ -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.

View File

@ -100,10 +100,10 @@
# 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

View 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)

View 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

View 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

View 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;