From: Paul Eggert Date: Sun, 1 Sep 2002 10:11:05 +0000 (+0000) Subject: (_AC_COMPILER_EXEEXT_DEFAULT, _AC_COMPILER_EXEEXT_O): Work even if X-Git-Tag: AUTOCONF-2.53c~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c8c8f2a58468a0b7e68a9eef0fa16ce377638b49;p=thirdparty%2Fautoconf.git (_AC_COMPILER_EXEEXT_DEFAULT, _AC_COMPILER_EXEEXT_O): Work even if "ls" outputs "FOO not found" to stdout, as traditional "ls" does. --- diff --git a/lib/autoconf/lang.m4 b/lib/autoconf/lang.m4 index 7f3c763d2..84fb4888c 100644 --- a/lib/autoconf/lang.m4 +++ b/lib/autoconf/lang.m4 @@ -447,9 +447,8 @@ AS_IF([AC_TRY_EVAL(ac_link_default)], # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= -for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null; - ls a.out conftest 2>/dev/null; - ls a.* conftest.* 2>/dev/null`; do +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.*; do + test -f "$ac_file" || continue case $ac_file in _AC_COMPILER_EXEEXT_REJECT ) ;; a.out ) # We found the default executable, but exeext='' is most @@ -515,7 +514,8 @@ AS_IF([AC_TRY_EVAL(ac_link)], # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. -for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue case $ac_file in _AC_COMPILER_EXEEXT_REJECT ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : ['[^.]*\(\..*\)']`