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-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.
## --------------------- ##
-# 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
# _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.
])# _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.
[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
## --------------------- ##
-# 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
# _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.
])# _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.
[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
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;;
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;;
# 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
# 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?$
^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 --
# -*- autoconf -*-
-cat <<EOF
-
-Semantics.
-
-EOF
+AT_BANNER([Semantics.])
# AC_TRY_LINK_FUNC
#define HAVE_STDIO_H 1
])
-AT_CLEANUP()dnl
+AT_CLEANUP
# Non-strict preprocessors work if they produce no warnings.
#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
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])