From 13e5db5ed90f005fd4f7a800bab1b206c45ddeb0 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 26 Mar 1998 18:05:30 +0000 Subject: [PATCH] exeext fix --- ChangeLog | 5 +++++ m4/exeext.m4 | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4ca14d5..880967c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Mar 26 11:00:04 1998 Tom Tromey + + * m4/exeext.m4: Correctly eliminate bad cases when computing + am_cv_exeext. Report from Markus F.X.J. Oberhumer. + Wed Mar 25 15:09:56 1998 Tom Tromey * automake.in (handle_options): Support alpha version numbers. diff --git a/m4/exeext.m4 b/m4/exeext.m4 index dcc609f..2bbb7b3 100644 --- a/m4/exeext.m4 +++ b/m4/exeext.m4 @@ -20,7 +20,14 @@ int main() { } EOF ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5 -am_cv_exeext=`echo am_c_test.* | grep -v 'am_c_test.[co]' | sed -e s/am_c_test//` +am_cv_exeext= +for file in am_c_test.*; do + case $file in + *.c) ;; + *.o) ;; + *) am_cv_exeext=`echo $file | sed -e s/am_c_test//` ;; + esac +done rm -f am_c_test*]) test x"${am_cv_exeext}" = x && am_cv_exeext=no fi -- 2.7.4