summaryrefslogtreecommitdiff
path: root/bfd/aclocal.m4
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-08-03 16:10:38 +0000
committerIan Lance Taylor <ian@airs.com>1999-08-03 16:10:38 +0000
commitc8e7e1a2742f042461517a1394aca48fc6a3bfb2 (patch)
treeda78c5fb01c2bf901c32b2ffc937e4562f76f354 /bfd/aclocal.m4
parent10ac227ea758a1a1e98420b4ca299323ce1fae9c (diff)
downloadgdb-c8e7e1a2742f042461517a1394aca48fc6a3bfb2.tar.gz
* 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/aclocal.m4')
-rw-r--r--bfd/aclocal.m421
1 files changed, 12 insertions, 9 deletions
diff --git a/bfd/aclocal.m4 b/bfd/aclocal.m4
index 39df10e5092..f0753c15635 100644
--- a/bfd/aclocal.m4
+++ b/bfd/aclocal.m4
@@ -36,15 +36,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