aboutsummaryrefslogtreecommitdiff
path: root/binutils/configure
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-09-07 17:12:26 +0000
committerIan Lance Taylor <ian@airs.com>1995-09-07 17:12:26 +0000
commit320d4f291fe4b171a544dc5b48ed8c828344352e (patch)
tree24c76d3b95dbba6896d7f8ef1bf44a93795b496a /binutils/configure
parenta7873a6cbd0545c010f338ed1f3e26541dcc1e8d (diff)
downloadgdb-320d4f291fe4b171a544dc5b48ed8c828344352e.zip
gdb-320d4f291fe4b171a544dc5b48ed8c828344352e.tar.gz
gdb-320d4f291fe4b171a544dc5b48ed8c828344352e.tar.bz2
* config.in: Rename from config.h.in.
* configure.in: Call AC_CONFIG_HEADER with config.h:config.in. Check for config.h:config.in when creating stamp-h. * configure: Rebuild. * Makefile.in (stamp-h): Depend upon config.in rather than config.h.in. Set CONFIG_HEADERS to config.h:config.in when calling config.status.
Diffstat (limited to 'binutils/configure')
-rwxr-xr-xbinutils/configure58
1 files changed, 46 insertions, 12 deletions
diff --git a/binutils/configure b/binutils/configure
index e349442..c23c094 100755
--- a/binutils/configure
+++ b/binutils/configure
@@ -662,6 +662,39 @@ test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+# If we cannot run a trivial program, we must be cross compiling.
+echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
+if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_c_cross=yes
+else
+cat > conftest.$ac_ext <<EOF
+#line 675 "configure"
+#include "confdefs.h"
+main(){return(0);}
+EOF
+eval $ac_link
+if test -s conftest && (./conftest; exit) 2>/dev/null; then
+ ac_cv_c_cross=no
+else
+ ac_cv_c_cross=yes
+fi
+fi
+rm -fr conftest*
+fi
+cross_compiling=$ac_cv_c_cross
+echo "$ac_t""$ac_cv_c_cross" 1>&6
+
+# Put a plausible default for CC_FOR_BUILD in Makefile.
+if test "x$cross_compiling" = "xno"; then
+ CC_FOR_BUILD='$(CC)'
+else
+ CC_FOR_BUILD=gcc
+fi
+
+
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
@@ -677,7 +710,7 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 681 "configure"
+#line 714 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
@@ -691,7 +724,7 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 695 "configure"
+#line 728 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
@@ -724,7 +757,7 @@ if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 728 "configure"
+#line 761 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
@@ -759,7 +792,7 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 763 "configure"
+#line 796 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -809,7 +842,7 @@ if eval "test \"`echo '$''{'bu_cv_decl_time_t_time_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 813 "configure"
+#line 846 "configure"
#include "confdefs.h"
#include <time.h>
int main() { return 0; }
@@ -841,7 +874,7 @@ if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 845 "configure"
+#line 878 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() { return 0; }
@@ -875,7 +908,7 @@ if eval "test \"`echo '$''{'bu_cv_header_utime_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 879 "configure"
+#line 912 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_TIME_H
@@ -911,7 +944,7 @@ if eval "test \"`echo '$''{'bu_cv_decl_needed_fprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 915 "configure"
+#line 948 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() { return 0; }
@@ -939,7 +972,7 @@ EOF
fi
case "${host}" in
-i34586-*-msdos* | i34586-*-go32* | i34586-*-win32)
+i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-win32)
cat >> confdefs.h <<\EOF
#define USE_BINARY_FOPEN 1
EOF
@@ -1120,7 +1153,7 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
# Protect against being on the right side of a sed subst in config.status.
sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
@@ -1157,6 +1190,7 @@ s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
s%@CPP@%$CPP%g
/@target_makefile_fragment@/r $target_makefile_fragment
s%@target_makefile_fragment@%%g
@@ -1246,7 +1280,7 @@ ac_eB='$%\1#\2define\3'
ac_eC=' '
ac_eD='%g'
-CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
+CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"}
for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
# Support "outfile[:infile]", defaulting infile="outfile.in".
case "$ac_file" in
@@ -1324,7 +1358,7 @@ cat >> $CONFIG_STATUS <<\EOF
fi; done
-case x$CONFIG_HEADERS in xconfig.h) echo > stamp-h ;; esac
+case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac
exit 0
EOF
chmod +x $CONFIG_STATUS