diff options
author | Ian Lance Taylor <ian@airs.com> | 1999-08-03 16:10:38 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1999-08-03 16:10:38 +0000 |
commit | aab084313464de2f91dee130584bc5b62b8a15b5 (patch) | |
tree | 581aee1f3e0fd730d8dd35b37fd0aaca3fe18323 /bfd/acinclude.m4 | |
parent | 08372f14279208e1682dfc35325ade9c648e787e (diff) | |
download | gdb-aab084313464de2f91dee130584bc5b62b8a15b5.zip gdb-aab084313464de2f91dee130584bc5b62b8a15b5.tar.gz gdb-aab084313464de2f91dee130584bc5b62b8a15b5.tar.bz2 |
* acinclude.m4 (BFD_CC_FOR_BUILD): Change to use conftest, and to
look for generated file correctly.
* aclocal.m4, configure: Rebuild.
Diffstat (limited to 'bfd/acinclude.m4')
-rw-r--r-- | bfd/acinclude.m4 | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/bfd/acinclude.m4 b/bfd/acinclude.m4 index dbe1c30..dea8b69 100644 --- a/bfd/acinclude.m4 +++ b/bfd/acinclude.m4 @@ -24,15 +24,18 @@ if test "x$cross_compiling" = "xno"; then EXEEXT_FOR_BUILD='$(EXEEXT)' else AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext, - [cat > ac_c_test.c << 'EOF' -int main() { -/* Nothing needed here */ -} -EOF - ${CC_FOR_BUILD} -o ac_c_test am_c_test.c 1>&5 2>&5 - bfd_cv_build_exeext=`echo ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//` - rm -f ac_c_test* - test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no]) + [rm -f conftest* + echo 'int main () { return 0; }' > conftest.c + bfd_cv_build_exeext= + ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5 + for file in conftest.*; do + case $file in + *.c | *.o | *.obj | *.ilk | *.pdb) ;; + *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + rm -f conftest* + test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no]) EXEEXT_FOR_BUILD="" test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext} fi |