]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* tests/atgeneral.m4 (AT_CHECK): Bad typo: assign `exit 1' to
authorAkim Demaille <akim@epita.fr>
Thu, 7 Dec 2000 15:21:54 +0000 (15:21 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 7 Dec 2000 15:21:54 +0000 (15:21 +0000)
at_continue if something failed, not `:'.
* tests/semantics.at (AC_PATH_XTRA): New.
* acspecific.m4 (_AC_PATH_X): New, extracted form AC_PATH_X.

ChangeLog
acspecific.m4
lib/autoconf/specific.m4
lib/autotest/general.m4
tests/atgeneral.m4
tests/atspecific.m4
tests/mktests.sh
tests/semantics.at
tests/syntax.at

index 94b9beade318d8a48b50573786417e39c94598d3..f2330b300aa98e8549ca30c0f63bf62b4e8db424 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index 74830b5f643ba258024011a0417d6b3c05a5f4fc..61b8fc4f3b4ace7d7fbdfe3fb3949c10b3cea3bb 100644 (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
index 74830b5f643ba258024011a0417d6b3c05a5f4fc..61b8fc4f3b4ace7d7fbdfe3fb3949c10b3cea3bb 100644 (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
index d11bd598625cda4f28c00524d7b8828bd14be5d6..80011704f67975b304ea4510b7aa51c67babc144 100644 (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;;
index d11bd598625cda4f28c00524d7b8828bd14be5d6..80011704f67975b304ea4510b7aa51c67babc144 100644 (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;;
index d9545faf21b4ae6da3e88ba893daff9761fbe9c3..b4b49c67d8a3b31e392b5b33404555661768495b 100644 (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
index a09d84462d4dd6bd456ac9536017fbdfd2201160..73f194087c83ce041ec47661baf1bdbff590361a 100755 (executable)
@@ -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 --
index 09ebef2af837cf4a4e46e333ec65751b19f676dd..f85263371c9a9f1096968417d24018b8b3d1469d 100644 (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
index 0824f75958643c82008c2a8365d46395f2c1c5c5..28b1e4db2ffe485e2d63fa75774d58866091b9d6 100644 (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])