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
# 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
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
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
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. */
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; }
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; }
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
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; }
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
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;
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
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
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
*) 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
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)
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:
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])