diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-09-07 17:12:26 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-09-07 17:12:26 +0000 |
commit | 320d4f291fe4b171a544dc5b48ed8c828344352e (patch) | |
tree | 24c76d3b95dbba6896d7f8ef1bf44a93795b496a /binutils | |
parent | a7873a6cbd0545c010f338ed1f3e26541dcc1e8d (diff) | |
download | gdb-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')
-rw-r--r-- | binutils/.Sanitize | 2 | ||||
-rw-r--r-- | binutils/ChangeLog | 8 | ||||
-rw-r--r-- | binutils/Makefile.in | 4 | ||||
-rw-r--r-- | binutils/config.in (renamed from binutils/config.h.in) | 2 | ||||
-rwxr-xr-x | binutils/configure | 58 | ||||
-rw-r--r-- | binutils/configure.in | 12 |
6 files changed, 63 insertions, 23 deletions
diff --git a/binutils/.Sanitize b/binutils/.Sanitize index 408ffaf..c5432f0 100644 --- a/binutils/.Sanitize +++ b/binutils/.Sanitize @@ -44,7 +44,7 @@ coffdump.c coffgrok.c coffgrok.h config -config.h.in +config.in configure configure.bat configure.in diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 680551d..e10af9f 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,5 +1,13 @@ Thu Sep 7 12:12:17 1995 Ian Lance Taylor <ian@cygnus.com> + * 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. + * Makefile.in (distclean): Remove config.h, stamp-h, and config.log. diff --git a/binutils/Makefile.in b/binutils/Makefile.in index 22ea934..4b9443e 100644 --- a/binutils/Makefile.in +++ b/binutils/Makefile.in @@ -662,8 +662,8 @@ Makefile: Makefile.in config.status CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status config.h: stamp-h ; @true -stamp-h: config.h.in config.status - CONFIG_FILES= CONFIG_HEADERS=config.h $(SHELL) ./config.status +stamp-h: config.in config.status + CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status config.status: configure $(SHELL) ./config.status --recheck diff --git a/binutils/config.h.in b/binutils/config.in index 7e4d7e9..1ff3760 100644 --- a/binutils/config.h.in +++ b/binutils/config.in @@ -1,4 +1,4 @@ -/* config.h.in. Generated automatically from configure.in by autoheader. */ +/* config.in. Generated automatically from configure.in by autoheader. */ /* Is the type time_t defined in <time.h>? */ #undef HAVE_TIME_T_IN_TIME_H 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 diff --git a/binutils/configure.in b/binutils/configure.in index 2113844..b432c1a 100644 --- a/binutils/configure.in +++ b/binutils/configure.in @@ -12,7 +12,7 @@ AC_ARG_ENABLE(targets, *) enable_targets=$enableval ;; esac])dnl -AC_CONFIG_HEADER(config.h) +AC_CONFIG_HEADER(config.h:config.in) AC_CONFIG_AUX_DIR(`cd $srcdir/..; pwd`) AC_CANONICAL_SYSTEM @@ -40,6 +40,8 @@ AC_SUBST(AR) AC_PROG_RANLIB AC_PROG_INSTALL +BFD_CC_FOR_BUILD + AC_CHECK_HEADERS(string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h) AC_CHECK_FUNCS(sbrk utimes) @@ -87,11 +89,7 @@ if test $bu_cv_decl_needed_fprintf = yes; then AC_DEFINE(NEED_DECLARATION_FPRINTF) fi -dnl FIXME: We should check this in some central place somehow -case "${host}" in -i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-win32) - AC_DEFINE(USE_BINARY_FOPEN) ;; -esac +BFD_BINARY_FOPEN # target-specific stuff: @@ -185,4 +183,4 @@ fi AC_SUBST(UNDERSCORE) AC_OUTPUT(Makefile, -[case x$CONFIG_HEADERS in xconfig.h) echo > stamp-h ;; esac]) +[case x$CONFIG_HEADERS in xconfig.h:config.in) echo > stamp-h ;; esac]) |