* tests/atgeneral.m4 (AT_CHECK): Bad typo: assign `exit 1' to

at_continue if something failed, not `:'.
* tests/semantics.at (AC_PATH_XTRA): New.
* acspecific.m4 (_AC_PATH_X): New, extracted form AC_PATH_X.
This commit is contained in:
Akim Demaille 2000-12-07 15:21:54 +00:00
parent 302c614d05
commit 5561d67cf9
9 changed files with 176 additions and 130 deletions

View File

@ -1,3 +1,10 @@
2000-12-07 Akim Demaille <akim@epita.fr>
* tests/atgeneral.m4 (AT_CHECK): Bad typo: assign `exit 1' to
at_continue if something failed, not `:'.
* tests/semantics.at (AC_PATH_XTRA): New.
* acspecific.m4 (_AC_PATH_X): New, extracted form AC_PATH_X.
2000-12-06 Akim Demaille <akim@epita.fr>
* configure.in: Bump version to 2.49c.

View File

@ -823,65 +823,9 @@ AC_DEFUN([AC_SYS_POSIX_TERMIOS],
## --------------------- ##
# AC_PATH_X
# ---------
# If we find X, set shell vars x_includes and x_libraries to the
# paths, otherwise set no_x=yes.
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
AC_DEFUN([AC_PATH_X],
[dnl Document the X abnormal options inherited from history.
AC_DIVERT_ONCE([HELP_BEGIN], [
X features:
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR])dnl
AC_MSG_CHECKING([for X])
AC_ARG_WITH(x, [ --with-x use the X Window System])
# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
if test "x$with_x" = xno; then
# The user explicitly disabled X.
have_x=disabled
else
if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
# Both variables are already set.
have_x=yes
else
AC_CACHE_VAL(ac_cv_have_x,
[# One or both of the vars are not set, and there is no cached value.
ac_x_includes=no ac_x_libraries=no
_AC_PATH_X_XMKMF
_AC_PATH_X_DIRECT
if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
# Didn't find X anywhere. Cache the known absence of X.
ac_cv_have_x="have_x=no"
else
# Record where we found X for the cache.
ac_cv_have_x="have_x=yes \
ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
fi])dnl
fi
eval "$ac_cv_have_x"
fi # $with_x != no
if test "$have_x" != yes; then
AC_MSG_RESULT([$have_x])
no_x=yes
else
# If each of the values was on the command line, it overrides each guess.
test "x$x_includes" = xNONE && x_includes=$ac_x_includes
test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
# Update the cache value to reflect the command line values.
ac_cv_have_x="have_x=yes \
ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
AC_MSG_RESULT([libraries $x_libraries, headers $x_includes])
fi
])# AC_PATH_X
# _AC_PATH_X_XMKMF
# ----------------
# Internal subroutine of AC_PATH_X.
# Internal subroutine of _AC_PATH_X.
# Set ac_x_includes and/or ac_x_libraries.
m4_define([_AC_PATH_X_XMKMF],
[rm -fr conftestdir
@ -922,7 +866,7 @@ fi
# _AC_PATH_X_DIRECT
# -----------------
# Internal subroutine of AC_PATH_X.
# Internal subroutine of _AC_PATH_X.
# Set ac_x_includes and/or ac_x_libraries.
m4_define([_AC_PATH_X_DIRECT],
[# Standard set of common directories for X headers.
@ -1001,6 +945,71 @@ fi # $ac_x_libraries = no
])# _AC_PATH_X_DIRECT
# _AC_PATH_X
# ----------
# Compute ac_cv_have_x.
AC_DEFUN([_AC_PATH_X],
[AC_CACHE_VAL(ac_cv_have_x,
[# One or both of the vars are not set, and there is no cached value.
ac_x_includes=no ac_x_libraries=no
_AC_PATH_X_XMKMF
_AC_PATH_X_DIRECT
if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
# Didn't find X anywhere. Cache the known absence of X.
ac_cv_have_x="have_x=no"
else
# Record where we found X for the cache.
ac_cv_have_x="have_x=yes \
ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
fi])dnl
])
# AC_PATH_X
# ---------
# If we find X, set shell vars x_includes and x_libraries to the
# paths, otherwise set no_x=yes.
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
AC_DEFUN([AC_PATH_X],
[dnl Document the X abnormal options inherited from history.
AC_DIVERT_ONCE([HELP_BEGIN], [
X features:
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR])dnl
AC_MSG_CHECKING([for X])
AC_ARG_WITH(x, [ --with-x use the X Window System])
# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
if test "x$with_x" = xno; then
# The user explicitly disabled X.
have_x=disabled
else
if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
# Both variables are already set.
have_x=yes
else
_AC_PATH_X
fi
eval "$ac_cv_have_x"
fi # $with_x != no
if test "$have_x" != yes; then
AC_MSG_RESULT([$have_x])
no_x=yes
else
# If each of the values was on the command line, it overrides each guess.
test "x$x_includes" = xNONE && x_includes=$ac_x_includes
test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
# Update the cache value to reflect the command line values.
ac_cv_have_x="have_x=yes \
ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
AC_MSG_RESULT([libraries $x_libraries, headers $x_includes])
fi
])# AC_PATH_X
# AC_PATH_XTRA
# ------------
# Find additional X libraries, magic flags, etc.
@ -1008,7 +1017,7 @@ AC_DEFUN([AC_PATH_XTRA],
[AC_REQUIRE([AC_PATH_X])dnl
if test "$no_x" = yes; then
# Not all programs may use this symbol, but it does not hurt to define it.
AC_DEFINE(X_DISPLAY_MISSING, 1,
AC_DEFINE([X_DISPLAY_MISSING], 1,
[Define if the X Window System is missing or not being used.])
X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
else

View File

@ -823,65 +823,9 @@ AC_DEFUN([AC_SYS_POSIX_TERMIOS],
## --------------------- ##
# AC_PATH_X
# ---------
# If we find X, set shell vars x_includes and x_libraries to the
# paths, otherwise set no_x=yes.
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
AC_DEFUN([AC_PATH_X],
[dnl Document the X abnormal options inherited from history.
AC_DIVERT_ONCE([HELP_BEGIN], [
X features:
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR])dnl
AC_MSG_CHECKING([for X])
AC_ARG_WITH(x, [ --with-x use the X Window System])
# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
if test "x$with_x" = xno; then
# The user explicitly disabled X.
have_x=disabled
else
if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
# Both variables are already set.
have_x=yes
else
AC_CACHE_VAL(ac_cv_have_x,
[# One or both of the vars are not set, and there is no cached value.
ac_x_includes=no ac_x_libraries=no
_AC_PATH_X_XMKMF
_AC_PATH_X_DIRECT
if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
# Didn't find X anywhere. Cache the known absence of X.
ac_cv_have_x="have_x=no"
else
# Record where we found X for the cache.
ac_cv_have_x="have_x=yes \
ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
fi])dnl
fi
eval "$ac_cv_have_x"
fi # $with_x != no
if test "$have_x" != yes; then
AC_MSG_RESULT([$have_x])
no_x=yes
else
# If each of the values was on the command line, it overrides each guess.
test "x$x_includes" = xNONE && x_includes=$ac_x_includes
test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
# Update the cache value to reflect the command line values.
ac_cv_have_x="have_x=yes \
ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
AC_MSG_RESULT([libraries $x_libraries, headers $x_includes])
fi
])# AC_PATH_X
# _AC_PATH_X_XMKMF
# ----------------
# Internal subroutine of AC_PATH_X.
# Internal subroutine of _AC_PATH_X.
# Set ac_x_includes and/or ac_x_libraries.
m4_define([_AC_PATH_X_XMKMF],
[rm -fr conftestdir
@ -922,7 +866,7 @@ fi
# _AC_PATH_X_DIRECT
# -----------------
# Internal subroutine of AC_PATH_X.
# Internal subroutine of _AC_PATH_X.
# Set ac_x_includes and/or ac_x_libraries.
m4_define([_AC_PATH_X_DIRECT],
[# Standard set of common directories for X headers.
@ -1001,6 +945,71 @@ fi # $ac_x_libraries = no
])# _AC_PATH_X_DIRECT
# _AC_PATH_X
# ----------
# Compute ac_cv_have_x.
AC_DEFUN([_AC_PATH_X],
[AC_CACHE_VAL(ac_cv_have_x,
[# One or both of the vars are not set, and there is no cached value.
ac_x_includes=no ac_x_libraries=no
_AC_PATH_X_XMKMF
_AC_PATH_X_DIRECT
if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
# Didn't find X anywhere. Cache the known absence of X.
ac_cv_have_x="have_x=no"
else
# Record where we found X for the cache.
ac_cv_have_x="have_x=yes \
ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
fi])dnl
])
# AC_PATH_X
# ---------
# If we find X, set shell vars x_includes and x_libraries to the
# paths, otherwise set no_x=yes.
# Uses ac_ vars as temps to allow command line to override cache and checks.
# --without-x overrides everything else, but does not touch the cache.
AC_DEFUN([AC_PATH_X],
[dnl Document the X abnormal options inherited from history.
AC_DIVERT_ONCE([HELP_BEGIN], [
X features:
--x-includes=DIR X include files are in DIR
--x-libraries=DIR X library files are in DIR])dnl
AC_MSG_CHECKING([for X])
AC_ARG_WITH(x, [ --with-x use the X Window System])
# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
if test "x$with_x" = xno; then
# The user explicitly disabled X.
have_x=disabled
else
if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
# Both variables are already set.
have_x=yes
else
_AC_PATH_X
fi
eval "$ac_cv_have_x"
fi # $with_x != no
if test "$have_x" != yes; then
AC_MSG_RESULT([$have_x])
no_x=yes
else
# If each of the values was on the command line, it overrides each guess.
test "x$x_includes" = xNONE && x_includes=$ac_x_includes
test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
# Update the cache value to reflect the command line values.
ac_cv_have_x="have_x=yes \
ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
AC_MSG_RESULT([libraries $x_libraries, headers $x_includes])
fi
])# AC_PATH_X
# AC_PATH_XTRA
# ------------
# Find additional X libraries, magic flags, etc.
@ -1008,7 +1017,7 @@ AC_DEFUN([AC_PATH_XTRA],
[AC_REQUIRE([AC_PATH_X])dnl
if test "$no_x" = yes; then
# Not all programs may use this symbol, but it does not hurt to define it.
AC_DEFINE(X_DISPLAY_MISSING, 1,
AC_DEFINE([X_DISPLAY_MISSING], 1,
[Define if the X Window System is missing or not being used.])
X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
else

View File

@ -450,7 +450,7 @@ m4_case([$3],
expout, [AT_CLEANUP_FILES([expout])dnl
$at_diff expout stdout >&5 || at_continue='exit 1'],
[], [$at_diff empty stdout >&5 || at_continue='exit 1'],
[echo $at_n "m4_patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout >&5 || at_continue=:])
[echo $at_n "m4_patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout >&5 || at_continue='exit 1'])
dnl Check exit val.
case $at_status in
77) exit 77;;

View File

@ -450,7 +450,7 @@ m4_case([$3],
expout, [AT_CLEANUP_FILES([expout])dnl
$at_diff expout stdout >&5 || at_continue='exit 1'],
[], [$at_diff empty stdout >&5 || at_continue='exit 1'],
[echo $at_n "m4_patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout >&5 || at_continue=:])
[echo $at_n "m4_patsubst([$3], [\([\"`$]\)], \\\1)$at_c" | $at_diff - stdout >&5 || at_continue='exit 1'])
dnl Check exit val.
case $at_status in
77) exit 77;;

View File

@ -37,7 +37,9 @@ AT_CHECK([autoheader --autoconf-dir .. -l $at_srcdir], 0, [], [])])
# AT_CHECK_CONFIGURE
# -------------------
# ------------------
# `top_srcdir' is needed so that `./configure' finds install-sh.
# Using --srcdir is more expensive.
m4_define([AT_CHECK_CONFIGURE],
[AT_CLEANUP_FILE_IFELSE([config.hin],
[AT_CLEANUP_FILE(config.h)])dnl

View File

@ -89,10 +89,13 @@ exclude_list='^ac_cv_prog_(gcc|gxx|g77)$
# Already tested by `AT_CHECK_MACRO'.
# - AC_FD_CC
# Is a number.
# - AC_PROG_CC, AC_C_(CONST|INLINE|VOLATILE)
# - AC_PROG_CC, AC_C_(CONST|INLINE|VOLATILE), AC_PATH_XTRA
# Checked in semantics.
# - AC_CYGWIN, AC_CYGWIN32, AC_EMXOS2, AC_MING32, AC_EXEEXT, AC_OBJEXT
# AU defined to nothing.
# - AC_PATH_XTRA
# Checked in semantics.
#
syntax_exclude_list='^AC_ARG_VAR$
^AC_CANONICALIZE|AC_PREFIX_PROGRAM|AC_PREREQ$
^AC_CHECK_(DECL|FILE|FUNC|HEADER|LIB|MEMBER|PROG|SIZEOF|TOOL|TYPE)S?$
@ -112,6 +115,7 @@ syntax_exclude_list='^AC_ARG_VAR$
^AC_FD_CC$
^(AC_(PROG_CC|C_CONST|C_INLINE|C_VOLATILE))$
^AC_(CYGWIN|CYGWIN32|EMXOS2|MING32|EXEEXT|OBJEXT)$
^AC_PATH_XTRA$
_AC_'
# syntax_exclude_egrep --

View File

@ -1,10 +1,6 @@
# -*- autoconf -*-
cat <<EOF
Semantics.
EOF
AT_BANNER([Semantics.])
# AC_TRY_LINK_FUNC
@ -361,7 +357,7 @@ AT_CHECK_DEFINES(
#define HAVE_STDIO_H 1
])
AT_CLEANUP()dnl
AT_CLEANUP
# Non-strict preprocessors work if they produce no warnings.
@ -391,4 +387,24 @@ AT_CHECK_DEFINES(
#define HAVE_STDIO_H 1
])
AT_CLEANUP()dnl
AT_CLEANUP
## -------------- ##
## AC_PATH_XTRA. ##
## -------------- ##
AT_SETUP([AC_PATH_XTRA])
_AT_CHECK_AC_MACRO([AC_PATH_XTRA])
# Check X_DISPLAY_MISSING.
AT_CHECK([top_srcdir=$top_srcdir ./configure --without-x], 0, ignore)
AT_CHECK_DEFINES(
[#define X_DISPLAY_MISSING 1
])
AT_CLEANUP

View File

@ -66,7 +66,6 @@ AT_CHECK_MACRO([AC_MINGW32])
AT_CHECK_MACRO([AC_MINIX])
AT_CHECK_MACRO([AC_NO_EXECUTABLES])
AT_CHECK_MACRO([AC_OUTPUT_COMMANDS])
AT_CHECK_MACRO([AC_PATH_XTRA])
AT_CHECK_MACRO([AC_PREFIX_DEFAULT])
AT_CHECK_MACRO([AC_PROG_AWK])
AT_CHECK_MACRO([AC_PROG_CC_C_O])