From: Paul Eggert Date: Fri, 11 Feb 2005 19:12:29 +0000 (+0000) Subject: * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Redirect stdin X-Git-Tag: AUTOCONF-2.59c~440 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c70aeca3fd8cce959f550e53caaabfb98fe9aff;p=thirdparty%2Fautoconf.git * 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"). Suggested by Alexandre Duret-Lutz. Also, do this redirection before invoking "hostname" or "uname". (_AC_PREPROC_IFELSE, _AC_COMPILE_IFELSE, _AC_LINK_IFELSE): Undo previous change, as it's no longer needed. * lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX): Don't bother with " + + * 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"). + Suggested by Alexandre Duret-Lutz. Also, do this redirection + before invoking "hostname" or "uname". + (_AC_PREPROC_IFELSE, _AC_COMPILE_IFELSE, + _AC_LINK_IFELSE): Undo previous change, as it's no longer needed. + * lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX): Don't bother with + " * lib/autoconf/general.m4 (_AC_PREPROC_IFELSE, _AC_COMPILE_IFELSE, diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index 47942ac71..52f31c36a 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -476,9 +476,9 @@ test -z "$CC" && AC_MSG_FAILURE([no acceptable C compiler found in \$PATH]) echo "$as_me:$LINENO:" \ "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD ac_compiler=`set X $ac_compile; echo $[2]` -_AC_EVAL([$ac_compiler --version &AS_MESSAGE_LOG_FD]) -_AC_EVAL([$ac_compiler -v &AS_MESSAGE_LOG_FD]) -_AC_EVAL([$ac_compiler -V &AS_MESSAGE_LOG_FD]) +_AC_EVAL([$ac_compiler --version >&AS_MESSAGE_LOG_FD]) +_AC_EVAL([$ac_compiler -v >&AS_MESSAGE_LOG_FD]) +_AC_EVAL([$ac_compiler -V >&AS_MESSAGE_LOG_FD]) m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl @@ -705,9 +705,9 @@ AC_CHECK_TOOLS(CXX, echo "$as_me:$LINENO:" \ "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD ac_compiler=`set X $ac_compile; echo $[2]` -_AC_EVAL([$ac_compiler --version &AS_MESSAGE_LOG_FD]) -_AC_EVAL([$ac_compiler -v &AS_MESSAGE_LOG_FD]) -_AC_EVAL([$ac_compiler -V &AS_MESSAGE_LOG_FD]) +_AC_EVAL([$ac_compiler --version >&AS_MESSAGE_LOG_FD]) +_AC_EVAL([$ac_compiler -v >&AS_MESSAGE_LOG_FD]) +_AC_EVAL([$ac_compiler -V >&AS_MESSAGE_LOG_FD]) m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl diff --git a/lib/autoconf/fortran.m4 b/lib/autoconf/fortran.m4 index b758d0183..d5149bbfe 100644 --- a/lib/autoconf/fortran.m4 +++ b/lib/autoconf/fortran.m4 @@ -364,9 +364,9 @@ AC_CHECK_TOOLS([]_AC_FC[], echo "$as_me:__oline__:" \ "checking for _AC_LANG compiler version" >&AS_MESSAGE_LOG_FD ac_compiler=`set X $ac_compile; echo $[2]` -_AC_EVAL([$ac_compiler --version &AS_MESSAGE_LOG_FD]) -_AC_EVAL([$ac_compiler -v &AS_MESSAGE_LOG_FD]) -_AC_EVAL([$ac_compiler -V &AS_MESSAGE_LOG_FD]) +_AC_EVAL([$ac_compiler --version >&AS_MESSAGE_LOG_FD]) +_AC_EVAL([$ac_compiler -v >&AS_MESSAGE_LOG_FD]) +_AC_EVAL([$ac_compiler -V >&AS_MESSAGE_LOG_FD]) rm -f a.out m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 7af2f2869..8fd337f4f 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -377,13 +377,13 @@ AU_ALIAS([AC_FD_MSG], [AS_MESSAGE_FD]) m4_define([_AC_INIT_DEFAULTS], [m4_divert_push([DEFAULTS])dnl +exec &1 + # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec AS_MESSAGE_FD>&1 - # # Initializations. # @@ -2133,7 +2133,7 @@ AC_DEFUN([AC_RUN_LOG], # to expand ac_cpp. AC_DEFUN([_AC_PREPROC_IFELSE], [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl -if _AC_EVAL_STDERR([$ac_cpp conftest.$ac_ext]) /dev/null; then +if _AC_EVAL_STDERR([$ac_cpp conftest.$ac_ext]) >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_[]_AC_LANG_ABBREV[]_werror_flag @@ -2218,7 +2218,7 @@ AC_DEFUN([AC_EGREP_HEADER], m4_define([_AC_COMPILE_IFELSE], [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl rm -f conftest.$ac_objext -AS_IF([_AC_EVAL_STDERR($ac_compile) &1 < /dev/null | grep 'GNU' >/dev/null; then - $2 +case `"$1" --version 2>&1` in +*GNU*) + $2;; m4_ifval([$3], -[else - $3 -])fi +[*) + $3;; +])esac ])# _AC_PATH_PROG_FLAVOR_GNU