]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/lang.m4 (_AC_COMPILER_OBJEXT): Avoid subshells when this is safe.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 28 Jan 2005 21:21:32 +0000 (21:21 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 28 Jan 2005 21:21:32 +0000 (21:21 +0000)
* lib/autoconf/programs.m4 (AC_PROG_EGREP, AC_PROG_FGREP): Likewise.
* lib/autoconf/specific.m4 (AC_SYS_LONG_FILE_NAMES): Likewise.
* lib/autotest/general.m4 (AT_INIT): Likewise.
* lib/m4sugar/m4sh.m4 (_AS_LINENO_WORKS): Likewise.
* tests/mktests.sh: Likewise.

ChangeLog
lib/autoconf/lang.m4
lib/autoconf/programs.m4
lib/autoconf/specific.m4
lib/autotest/general.m4
lib/m4sugar/m4sh.m4
tests/mktests.sh

index 3fda888bc385dc315812e9d61086b4df62c90c87..24d4dfa77d8701dc331782bee4463797bd504c5b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * lib/autoconf/lang.m4 (_AC_COMPILER_OBJEXT): Avoid subshells when
+       this is safe.
+       * lib/autoconf/programs.m4 (AC_PROG_EGREP, AC_PROG_FGREP): Likewise.
+       * lib/autoconf/specific.m4 (AC_SYS_LONG_FILE_NAMES): Likewise.
+       * lib/autotest/general.m4 (AT_INIT): Likewise.
+       * lib/m4sugar/m4sh.m4 (_AS_LINENO_WORKS): Likewise.
+       * tests/mktests.sh: Likewise.
+
 2005-01-27  Akim Demaille  <akim@epita.fr>
 
        Have autoheader honor --force.
index 3d0234242d0302c4fcbdebad49b29cf264e918de..04b78a85a0fcd396b4c5f97d42e40813e802df8d 100644 (file)
@@ -1,6 +1,6 @@
 # This file is part of Autoconf.                       -*- Autoconf -*-
 # Programming languages support.
-# Copyright (C) 2000, 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2004, 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
@@ -622,7 +622,8 @@ m4_define([_AC_COMPILER_OBJEXT],
 [AC_LANG_CONFTEST([AC_LANG_PROGRAM()])
 rm -f conftest.o conftest.obj
 AS_IF([AC_TRY_EVAL(ac_compile)],
-[for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+[for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
   case $ac_file in
     _AC_COMPILER_OBJEXT_REJECT ) ;;
     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
index 325d85bc934dca71f43ad5df12a5c56b275985ad..05d3742e70712f5266d7e330970fa2ad3e86922a 100644 (file)
@@ -364,7 +364,7 @@ AC_DEFUN([AC_PROG_AWK],
 AC_DEFUN([AC_PROG_EGREP],
 [AC_REQUIRE([AC_PROG_GREP])dnl
 AC_CACHE_CHECK([for egrep], ac_cv_path_EGREP,
-   [if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1
+   [if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
    then ac_cv_path_EGREP="$GREP -E"
    else
      _AC_PROG_GREP(EGREP, egrep, ['EGREP$'])
@@ -379,7 +379,7 @@ AC_CACHE_CHECK([for egrep], ac_cv_path_EGREP,
 AC_DEFUN([AC_PROG_FGREP],
 [AC_REQUIRE([AC_PROG_GREP])dnl
 AC_CACHE_CHECK([for fgrep], ac_cv_path_FGREP,
-   [if echo 'ab*c' | ($GREP -F 'ab*c') >/dev/null 2>&1
+   [if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
    then ac_cv_path_FGREP="$GREP -F"
    else
      _AC_PROG_GREP(FGREP, fgrep, [FGREP])
index 6f553fd6b870cd60e54198b40d801bf43401e758..874ec21feb1631f92c7ae3dbd640cc8528fd9f2a 100644 (file)
@@ -2,7 +2,7 @@
 # Macros that test for specific, unclassified, features.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004 Free Software Foundation, Inc.
+# 2002, 2003, 2004, 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
@@ -227,15 +227,10 @@ for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
   ac_tf1=$ac_xdir/conftest9012345
   ac_tf2=$ac_xdir/conftest9012346
-  (echo 1 >$ac_tf1) 2>/dev/null
-  (echo 2 >$ac_tf2) 2>/dev/null
-  ac_val=`cat $ac_tf1 2>/dev/null`
-  if test ! -f $ac_tf1 || test "$ac_val" != 1; then
+  touch $ac_tf1 2>/dev/null && test -f $ac_tf1 && test ! -f $ac_tf2 ||
     ac_cv_sys_long_file_names=no
-    rm -f -r $ac_xdir 2>/dev/null
-    break
-  fi
   rm -f -r $ac_xdir 2>/dev/null
+  test $ac_cv_sys_long_file_names = no && break
 done])
 if test $ac_cv_sys_long_file_names = yes; then
   AC_DEFINE(HAVE_LONG_FILE_NAMES, 1,
index 5b4551722fef1ec6e5e0fc02f4ce4b01a85ecee6..c061b7840bd1b805b0e35837342481016b235065 100644 (file)
@@ -1,6 +1,8 @@
 # This file is part of Autoconf.                          -*- Autoconf -*-
 # M4 macros used in building test suites.
-# Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 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
@@ -547,7 +549,7 @@ done
 } >&AS_MESSAGE_LOG_FD
 
 at_start_date=`date`
-at_start_time=`(date +%s) 2>/dev/null`
+at_start_time=`date +%s 2>/dev/null || echo 0`
 echo "$as_me: starting at: $at_start_date" >&AS_MESSAGE_LOG_FD
 at_xpass_list=
 at_xfail_list=
@@ -726,13 +728,13 @@ cd "$at_dir"
 
 # Compute the duration of the suite.
 at_stop_date=`date`
-at_stop_time=`(date +%s) 2>/dev/null`
+at_stop_time=`date +%s 2>/dev/null || echo 0`
 echo "$as_me: ending at: $at_stop_date" >&AS_MESSAGE_LOG_FD
-at_duration_s=`(expr $at_stop_time - $at_start_time) 2>/dev/null`
-at_duration_m=`(expr $at_duration_s / 60) 2>/dev/null`
-at_duration_h=`(expr $at_duration_m / 60) 2>/dev/null`
-at_duration_s=`(expr $at_duration_s % 60) 2>/dev/null`
-at_duration_m=`(expr $at_duration_m % 60) 2>/dev/null`
+at_duration_s=`expr $at_stop_time - $at_start_time`
+at_duration_m=`expr $at_duration_s / 60`
+at_duration_h=`expr $at_duration_m / 60`
+at_duration_s=`expr $at_duration_s % 60`
+at_duration_m=`expr $at_duration_m % 60`
 at_duration="${at_duration_h}h ${at_duration_m}m ${at_duration_s}s"
 if test "$at_duration" != "h m s"; then
   echo "$as_me: test suite duration: $at_duration" >&AS_MESSAGE_LOG_FD
index bc63d826253273d1351cdaa6dd6300766afa3593..c2e5adaa19d74b72a1a2d4cfb2b56c0bf82b4ca3 100644 (file)
@@ -1,7 +1,9 @@
 # This file is part of Autoconf.                          -*- Autoconf -*-
 # M4 sugar for common shell constructs.
 # Requires GNU M4 and M4sugar.
-# Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+#
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 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
@@ -694,9 +696,8 @@ m4_define([_AS_LINENO_WORKS],
 [
   as_lineno_1=$LINENO
   as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
   test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2"])
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2"])
 
 # _AS_LINENO_PREPARE
 # ------------------
index 6631709b3e4958c39822b0c2012d90752e3ffc54..79106a81a97271132a015ec1e08a6c26e29e0315 100755 (executable)
@@ -1,7 +1,9 @@
 #! /bin/sh
 
 # Build some of the Autoconf test files.
-# Copyright (C) 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 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
@@ -190,7 +192,7 @@ au_exclude_egrep=$exclude_list$au_exclude_list
 
 # egrep
 # -----
-if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+if echo a | grep -E '(a|b)' >/dev/null 2>&1
 then egrep='grep -E'
 else egrep='egrep'
 fi