OSDN Git Service

* Make-lang.in (stmp-f2c.h): Don't configure the runtime
[pf3gnuchains/gcc-fork.git] / gcc / configure
index 5270ece..4d25600 100755 (executable)
@@ -67,6 +67,7 @@ mandir='${prefix}/man'
 # 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
 
@@ -538,7 +539,6 @@ fi
 
 
 
-native_prefix=/usr
 remove=rm
 hard_link=ln
 symbolic_link='ln -s'
@@ -1032,7 +1032,7 @@ else
     /|./|.//|/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
@@ -1330,7 +1330,7 @@ else
 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
@@ -1603,7 +1603,7 @@ EOF
 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
@@ -1928,8 +1928,8 @@ for machine in $build $host $target; do
                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
@@ -2304,8 +2304,8 @@ for machine in $build $host $target; do
        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
@@ -2314,15 +2314,15 @@ for machine in $build $host $target; do
        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*)
@@ -2979,8 +2979,8 @@ for machine in $build $host $target; do
        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
@@ -3278,13 +3278,9 @@ for machine in $build $host $target; do
        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
@@ -3602,8 +3598,8 @@ for machine in $build $host $target; do
        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)
@@ -3832,32 +3828,32 @@ for machine in $build $host $target; do
        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"
@@ -3902,6 +3898,9 @@ for machine in $build $host $target; do
                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
@@ -3941,6 +3940,14 @@ for machine in $build $host $target; do
                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
@@ -3974,8 +3981,8 @@ for machine in $build $host $target; do
        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
                ;;
@@ -4283,15 +4290,6 @@ fi
 # 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
@@ -4562,6 +4560,16 @@ if [ ! -f Makefile.in ]; then
        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=
@@ -4634,6 +4642,7 @@ ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xma
 
 
 
+
 # Echo that links are built
 if [ x$host = x$target ]
 then
@@ -4764,7 +4773,6 @@ do
 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
@@ -4775,6 +4783,7 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  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
@@ -4818,6 +4827,7 @@ s%@LN@%$LN%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
@@ -4825,6 +4835,7 @@ s%@SET_MAKE@%$SET_MAKE%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
@@ -4866,6 +4877,7 @@ s%@will_use_collect2@%$will_use_collect2%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
@@ -4955,10 +4967,6 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
     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"
@@ -4974,7 +4982,6 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
 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*
@@ -5126,6 +5133,26 @@ case x$CONFIG_HEADERS in
 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