summaryrefslogtreecommitdiffstats
path: root/gcc/configure.in
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-04-14 08:32:34 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-04-14 08:32:34 +0000
commit764fc59282a4388829338fdc476b3d50725a4b41 (patch)
tree1bd91d169d6d61a61b60647e064b8ca2cb33d3a6 /gcc/configure.in
parentb7ac1bf51289dd6946aa07690b684eb210041610 (diff)
downloadppe42-gcc-764fc59282a4388829338fdc476b3d50725a4b41.tar.gz
ppe42-gcc-764fc59282a4388829338fdc476b3d50725a4b41.zip
* Idea and part of the patch from HJ.
* Makefile.in: auto-host.h renamed from auto-config.h. All references changed. (distclean): Remove auto-build.h too. * configure.in: Rename host autoconf generated file to auto-host.h. If host != build, then run autoconf to generate auto-build.h for the build machine and include it in build_xm_files. Check for wait.h and sys/wait.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19205 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.in')
-rw-r--r--gcc/configure.in50
1 files changed, 38 insertions, 12 deletions
diff --git a/gcc/configure.in b/gcc/configure.in
index 9d334632b1f..3930a1e9b33 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -22,7 +22,7 @@
# Initialization and defaults
AC_INIT(tree.c)
-AC_CONFIG_HEADER(auto-config.h:config.in)
+AC_CONFIG_HEADER(auto-host.h:config.in)
remove=rm
hard_link=ln
@@ -148,7 +148,7 @@ EGCS_PROG_INSTALL
AC_HEADER_STDC
AC_HEADER_TIME
-AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h varargs.h sys/varargs.h)
+AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h varargs.h sys/varargs.h wait.h sys/wait.h)
# Check for thread headers.
AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
@@ -2948,17 +2948,39 @@ fi
# Set up the header files.
# $links is the list of header files to create.
# $vars is the list of shell variables with file names to include.
-# auto-conf.h is the file containing items generated by autoconf and is
+# auto-host.h is the file containing items generated by autoconf and is
# the first file included by config.h.
null_defines=
-host_xm_file="auto-config.h ${host_xm_file}"
+host_xm_file="auto-host.h ${host_xm_file}"
-# If host=build, it is correct to have hconfig include auto-conf.h
+# If host=build, it is correct to have hconfig include auto-host.h
# as well. If host!=build, we are in error and need to do more
# work to find out the build config parameters.
if [[ x$host = x$build ]]
then
- build_xm_file="auto-config.h ${build_xm_file}"
+ build_xm_file="auto-host.h ${build_xm_file}"
+else
+ # We create a subdir, then run autoconf in the subdir.
+ # To prevent recursion we set host and build for the new
+ # invocation of configure to the build for this invocation
+ # of configure.
+ tempdir=build.$$
+ rm -rf $tempdir
+ mkdir $tempdir
+ cd $tempdir
+ case ${srcdir} in
+ /*) realsrcdir=${srcdir};;
+ *) realsrcdir=../${srcdir};;
+ esac
+ CC=${BUILD_CC-cc} ${realsrcdir}/configure \
+ --target=$target --host=$build --build=$build
+
+ # We just finished tests for the build machine, so rename
+ # the file auto-build.h in the gcc directory.
+ mv auto-host.h ../auto-build.h
+ cd ..
+ rm -rf $tempdir
+ build_xm_file="auto-build.h ${build_xm_file}"
fi
vars="host_xm_file tm_file xm_file build_xm_file"
@@ -3065,19 +3087,23 @@ done
host_xm_file_list=
for f in $host_xm_file; do
- if test $f != "auto-config.h"; then
+ if test $f != "auto-host.h"; then
host_xm_file_list="${host_xm_file_list} \$(srcdir)/config/$f"
else
- host_xm_file_list="${host_xm_file_list} auto-config.h"
+ host_xm_file_list="${host_xm_file_list} auto-host.h"
fi
done
build_xm_file_list=
for f in $build_xm_file; do
- if test $f != "auto-config.h"; then
- build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
+ if test $f != "auto-build.h"; then
+ if test $f != "auto-host.h"; then
+ build_xm_file_list="${build_xm_file_list} \$(srcdir)/config/$f"
+ else
+ build_xm_file_list="${build_xm_file_list} auto-host.h"
+ fi
else
- build_xm_file_list="${build_xm_file_list} auto-config.h"
+ build_xm_file_list="${build_xm_file_list} auto-build.h"
fi
done
@@ -3422,7 +3448,7 @@ AC_OUTPUT($all_outputs,
[
. $srcdir/configure.lang
case x$CONFIG_HEADERS in
-xauto-config.h:config.in)
+xauto-host.h:config.in)
echo > cstamp-h ;;
esac
# If the host supports symlinks, point stage[1234] at ../stage[1234] so
OpenPOWER on IntegriCloud