# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
-native_prefix=/usr
remove=rm
hard_link=ln
symbolic_link='ln -s'
/|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
- for ac_prog in ginstall installbsd scoinst install; do
+ for ac_prog in ginstall scoinst install; do
if test -f $ac_dir/$ac_prog; then
if test $ac_prog = install &&
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
fi
echo "$ac_t""$CPP" 1>&6
-for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
+for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h varargs.h sys/varargs.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
fi
-for ac_func in strerror
+for ac_func in strerror strtoul bsearch
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1610: checking for $ac_func" >&5
tm_file=arm/netbsd.h
xm_file=arm/xm-netbsd.h
tmake_file=arm/t-netbsd
- # On NetBSD, the headers are already okay.
- fixincludes=Makefile.in
+ # On NetBSD, the headers are already okay, except for math.h.
+ fixincludes=fixinc.math
use_collect2=yes
;;
arm-*-linux-gnuaout*) # ARM Linux
i[3456]86-*-freebsdelf*)
tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
xm_file=i386/xm-freebsd.h
- # On FreeBSD, the headers are already ok.
- fixincludes=Makefile.in
+ # On FreeBSD, the headers are already ok, except for math.h.
+ fixincludes=fixinc.math
tmake_file=i386/t-freebsd
gas=yes
gnu_ld=yes
i[3456]86-*-freebsd*)
tm_file=i386/freebsd.h
xm_file=i386/xm-freebsd.h
- # On FreeBSD, the headers are already ok.
- fixincludes=Makefile.in
+ # On FreeBSD, the headers are already ok, except for math.h.
+ fixincludes=fixinc.math
tmake_file=i386/t-freebsd
;;
i[3456]86-*-netbsd*)
tm_file=i386/netbsd.h
xm_file=i386/xm-netbsd.h
- # On NetBSD, the headers are already okay.
- fixincludes=Makefile.in
+ # On NetBSD, the headers are already okay, except for math.h.
+ fixincludes=fixinc.math
tmake_file=t-netbsd
;;
i[3456]86-*-coff*)
m68k-*-netbsd*)
tm_file=m68k/netbsd.h
xm_file=m68k/xm-netbsd.h
- # On NetBSD, the headers are already okay.
- fixincludes=Makefile.in
+ # On NetBSD, the headers are already okay, except for math.h.
+ fixincludes=fixinc.math
tmake_file=t-netbsd
;;
m68k-*-sysv3*) # Motorola m68k's running system V.3
mips-dec-netbsd*) # Decstation running NetBSD
tm_file=mips/netbsd.h
xm_file=mips/xm-netbsd.h
- # On NetBSD, the headers are already okay.
- fixincludes=Makefile.in
+ # On NetBSD, the headers are already okay, except for math.h.
+ fixincludes=fixinc.math
tmake_file=t-netbsd
- if [ x$prefix = xNONE ]; then
- prefix=$native_prefix
- fi
- prefix=$native_prefix
;;
mips-sony-bsd* | mips-sony-newsos*) # Sony NEWS 3600 or risc/news.
tm_file=mips/news4.h
ns32k-pc532-netbsd*)
tm_file=ns32k/netbsd.h
xm_file=ns32k/xm-netbsd.h
- # On NetBSD, the headers are already okay.
- fixincludes=Makefile.in
+ # On NetBSD, the headers are already okay, except for math.h.
+ fixincludes=fixinc.math
tmake_file=t-netbsd
;;
pdp11-*-bsd)
sparc-*-netbsd*)
tm_file=sparc/netbsd.h
xm_file=sparc/xm-netbsd.h
- # On NetBSD, the headers are already okay.
- fixincludes=Makefile.in
+ # On NetBSD, the headers are already okay, except for math.h.
+ fixincludes=fixinc.math
tmake_file=t-netbsd
;;
sparc-*-bsd*)
tm_file=sparc/bsd.h
;;
sparc-*-linux-gnuaout*) # Sparc's running Linux, a.out
- xm_file=sparc/xm-linux.h
+ xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
tm_file=sparc/linux-aout.h
xmake_file=x-linux
fixincludes=Makefile.in #On Linux, the headers are ok already.
gnu_ld=yes
;;
- sparc-*-linux-gnulibc1*) # Sparc's running Linux
- xm_file=sparc/xm-linux.h # with ELF format using the
- xmake_file=x-linux # Linux C library 5.
+ sparc-*-linux-gnulibc1*) # Sparc's running Linux, libc5
+ xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
+ xmake_file=x-linux
tm_file=sparc/linux.h
tmake_file="t-linux t-linux-gnulibc1 sparc/t-linux"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
fixincludes=Makefile.in #On Linux, the headers are ok already.
gnu_ld=yes
;;
- sparc-*-linux-gnu*) # Sparc's running Linux
- xm_file=sparc/xm-linux.h # with ELF format using glibc 2
- xmake_file=x-linux # aka the Linux C library 6.
+ sparc-*-linux-gnu*) # Sparc's running Linux, libc6
+ xm_file="sparc/xm-sparc.h sparc/xm-linux.h"
+ xmake_file=x-linux
tm_file=sparc/linux.h
tmake_file="t-linux sparc/t-linux"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
tm_file=sparc/sunos4.h
tmake_file=sparc/t-sunos41
use_collect2=yes
+ if [ x$gas = xyes ]; then
+ tm_file="${tm_file} sparc/sun4gas.h"
+ fi
;;
sparc-*-sunos3*)
tm_file=sparc/sun4o3.h
tm_file=sparc/sp64-elf.h
extra_parts="crtbegin.o crtend.o"
;;
+ sparc64-*-linux*) # 64-bit Sparc's running Linux
+ tmake_file=sparc/t-sp64
+ xm_file="sparc/xm-sp64.h sparc/xm-linux.h"
+ tm_file=sparc/linux64.h
+ xmake_file=x-linux
+ fixincludes=Makefile.in # On Linux, the headers are ok already.
+ gnu_ld=yes
+ ;;
# This hasn't been upgraded to GCC 2.
# tahoe-harris-*) # Harris tahoe, using COFF.
# tm_file=tahoe/harris.h
vax-*-netbsd*)
tm_file="${tm_file} netbsd.h vax/netbsd.h"
xm_file="${xm_file} xm-netbsd.h"
- # On NetBSD, the headers are already okay.
- fixincludes=Makefile.in
+ # On NetBSD, the headers are already okay, except for math.h.
+ fixincludes=fixinc.math
tmake_file=t-netbsd
float_format=vax
;;
# Get the version number from the toplevel
version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${srcdir}/version.c`
-# Are we using gcc as the native compiler?
-case $host in
-*linux*) # All Linux's use gcc as the native compiler.
- if [ x$prefix = xNONE ]; then
- prefix=$native_prefix
- fi
- ;;
-esac
-
# Get an absolute path to the GCC top-level source directory
holddir=`pwd`
cd $srcdir
echo "source ${srcdir}/.gdbinit" >> .gdbinit
fi
+# If this is using newlib, then define inhibit_libc in
+# LIBGCC2_CFLAGS. This will cause __eprintf to be left out of
+# libgcc.a, but that's OK because newib should have its own version of
+# assert.h.
+inhibit_libc=
+if [ x$with_newlib = xyes ]; then
+ inhibit_libc=-Dinhibit_libc
+fi
+
+
# Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
sched_prefix=
sched_cflags=
+
# Echo that links are built
if [ x$host = x$target ]
then
done
ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
trap 'rm -fr `echo "$all_outputs config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
$ac_vpsub
$extrasub
+s%@SHELL@%$SHELL%g
s%@CFLAGS@%$CFLAGS%g
s%@CPPFLAGS@%$CPPFLAGS%g
s%@CXXFLAGS@%$CXXFLAGS%g
s%@LN_S@%$LN_S%g
s%@RANLIB@%$RANLIB%g
s%@YACC@%$YACC%g
+s%@INSTALL@%$INSTALL%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
s%@CC@%$CC%g
s%@CPP@%$CPP%g
s%@manext@%$manext%g
s%@objext@%$objext%g
+s%@inhibit_libc@%$inhibit_libc%g
s%@sched_prefix@%$sched_prefix%g
s%@sched_cflags@%$sched_cflags%g
s%@subdirs@%$subdirs%g
s%@maybe_use_collect2@%$maybe_use_collect2%g
s%@cc_set_by_configure@%$cc_set_by_configure%g
s%@stage_prefix_set_by_configure@%$stage_prefix_set_by_configure%g
+s%@install@%$install%g
/@target_overrides@/r $target_overrides
s%@target_overrides@%%g
/@host_overrides@/r $host_overrides
top_srcdir="$ac_dots$ac_given_srcdir" ;;
esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
echo creating "$ac_file"
rm -f "$ac_file"
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.s*
xconfig.h:config.in)
echo > cstamp-h ;;
esac
+# If the host supports symlinks, point stage[1234] at ../stage[1234] so
+# bootstrapping and the installation procedure can still use
+# CC="stage1/xgcc -Bstage1/". If the host doesn't support symlinks,
+# FLAGS_TO_PASS has been modified to solve the problem there.
+# This is virtually a duplicate of what happens in configure.lang; we do
+# an extra check to make sure this only happens if ln -s can be used.
+if [ "$symbolic_link" = "ln -s" ]; then
+ for d in .. ${subdirs} ; do
+ if [ $d != .. ]; then
+ STARTDIR=`pwd`
+ cd $d
+ for t in stage1 stage2 stage3 stage4 include
+ do
+ rm -f $t
+ $symbolic_link ../$t $t 2>/dev/null
+ done
+ cd $STARTDIR
+ fi
+ done
+else true ; fi
exit 0
EOF