summaryrefslogtreecommitdiff
path: root/tests/base.at
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-02-23 23:24:49 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-02-23 23:24:49 +0000
commit29373c6512463cdf9fc7696de43d30b101dd7d20 (patch)
tree20af38e0eb327ded9b8d10695e4db8e77fc25e01 /tests/base.at
parentf79094658c1f925e4cf59fdb8c1ac29a13a1160d (diff)
downloadautoconf-29373c6512463cdf9fc7696de43d30b101dd7d20.tar.gz
* lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Redirect stdin from
/dev/null, as "configure" shouldn't read stdin, and this insulates us from problems (e.g., when testing for "cl"). Also, do this redirection before invoking "hostname" or "uname", and keep the original input stream available via... (AS_ORIGINAL_STDIN_FD): ... this new macro. (_AC_PREPROC_IFELSE, _AC_COMPILE_IFELSE, _AC_LINK_IFELSE): Don't bother with "</dev/null" since it's now done at the top of 'configure'. * lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX): Likewise. * lib/autoconf/fortran.m4 (_AC_PROG_FC): Likewise. * lib/autoconf/programs.m4 (_AC_PATH_PROG_FLAVOR_GNU): Likewise. * doc/autoconf.texi (File Descriptor Macros): New section. (Printing Messages): Mention it. * tests/base.at (Input/Output): New test.
Diffstat (limited to 'tests/base.at')
-rw-r--r--tests/base.at21
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/base.at b/tests/base.at
index 2c8ea5ff..6f43b73a 100644
--- a/tests/base.at
+++ b/tests/base.at
@@ -2,7 +2,7 @@
AT_BANNER([Autoconf base layer.])
-# Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -230,3 +230,22 @@ AT_CHECK_AUTOCONF
AT_CHECK_CONFIGURE([-q])
AT_CLEANUP
+
+
+## ------------ ##
+## Input/Output ##
+## ------------ ##
+
+AT_SETUP([Input/Output])
+
+m4_pattern_allow([^AS_(MESSAGE|ORIGINAL_STDIN)_FD$])
+AT_DATA([configure.ac],
+[[AC_INIT
+cat <&AS_ORIGINAL_STDIN_FD >&AS_MESSAGE_FD
+]])
+AT_CHECK_AUTOCONF
+AT_CHECK([echo Hello | top_srcdir=$abs_top_srcdir ./configure],, [Hello
+])
+AT_CHECK([echo Hello | top_srcdir=$abs_top_srcdir ./configure --silent])
+
+AT_CLEANUP