OSDN Git Service

* Make-lang.in (stmp-f2c.h): Don't configure the runtime
[pf3gnuchains/gcc-fork.git] / gcc / configure.in
index bcae838..4cc80d2 100644 (file)
@@ -24,7 +24,6 @@
 AC_INIT(tree.c)
 AC_CONFIG_HEADER(config.h:config.in)
 
-native_prefix=/usr
 remove=rm
 hard_link=ln
 symbolic_link='ln -s'
@@ -124,16 +123,17 @@ AC_CANONICAL_SYSTEM
 # Find some useful tools
 AC_PROG_AWK
 AC_PROG_LEX
-AC_PROG_LN_S
+GCC_PROG_LN
+GCC_PROG_LN_S
 AC_PROG_RANLIB
 AC_PROG_YACC
-AC_PROG_INSTALL
+EGCS_PROG_INSTALL
 
 # Find the native compiler
 AC_PROG_CC
 AC_PROG_MAKE_SET
 
-AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
+AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h varargs.h sys/varargs.h)
 
 GCC_NEED_DECLARATION(malloc)
 GCC_NEED_DECLARATION(realloc)
@@ -142,7 +142,7 @@ GCC_NEED_DECLARATION(free)
 
 AC_DECL_SYS_SIGLIST
 
-AC_CHECK_FUNCS(strerror)
+AC_CHECK_FUNCS(strerror strtoul bsearch)
 
 # File extensions
 manext='.1'
@@ -377,6 +377,9 @@ for machine in $build $host $target; do
                tmake_file=alpha/t-vms
                fixincludes=Makefile.in
                ;;
+       arc-*-elf*)
+               extra_parts="crtinit.o crtfini.o"
+               ;;
        arm-*-coff* | armel-*-coff*)
                tm_file=arm/coff.h
                tmake_file=arm/t-bare
@@ -410,8 +413,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
@@ -786,8 +789,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
@@ -796,15 +799,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*)
@@ -1461,8 +1464,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
@@ -1760,13 +1763,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
@@ -2084,8 +2083,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)
@@ -2314,32 +2313,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"
@@ -2384,6 +2383,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
@@ -2423,6 +2425,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
@@ -2456,8 +2466,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
                ;;
@@ -2765,15 +2775,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
@@ -2898,15 +2899,15 @@ fi
 
 # If we have gas in the build tree, make a link to it.
 if [[ -f ../gas/Makefile ]]; then
-       rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null
+       rm -f as; $symbolic_link ../gas/as-new as 2>/dev/null
 fi
 
 # If we have ld in the build tree, make a link to it.
 if [[ -f ../ld/Makefile ]]; then
 #      if [[ x$use_collect2 = x ]]; then
-#              rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null
+#              rm -f ld; $symbolic_link ../ld/ld-new ld 2>/dev/null
 #      else
-               rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null
+               rm -f collect-ld; $symbolic_link ../ld/ld-new collect-ld 2>/dev/null
 #      fi
 fi
 
@@ -3044,6 +3045,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
+AC_SUBST(inhibit_libc)
+
 # Override SCHED_OBJ and SCHED_CFLAGS to enable the Haifa scheduler.
 sched_prefix=
 sched_cflags=
@@ -3107,6 +3118,7 @@ AC_SUBST(will_use_collect2)
 AC_SUBST(maybe_use_collect2)
 AC_SUBST(cc_set_by_configure)
 AC_SUBST(stage_prefix_set_by_configure)
+AC_SUBST(install)
 
 AC_SUBST_FILE(target_overrides)
 AC_SUBST_FILE(host_overrides)
@@ -3154,6 +3166,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
 ],
 [
 host='${host}'
@@ -3175,6 +3207,7 @@ version='${version}'
 local_prefix='${local_prefix}'
 build_install_headers_dir='${build_install_headers_dir}'
 build_exeext='${build_exeext}'
+out_file='${out_file}'
 gdb_needs_out_file_path='${gdb_needs_out_file_path}'
 SET_MAKE='${SET_MAKE}'
 target_list='${target_list}'