OSDN Git Service

* Makefile.in (TARGET_TOOLPREFIX): No longer define.
[pf3gnuchains/gcc-fork.git] / gcc / configure.in
index a69b708..41917f4 100644 (file)
@@ -78,6 +78,12 @@ if [[ x$gxx_include_dir = x ]]; then
        gxx_include_dir='${prefix}/include/g++'
 fi
 
+# Enable expensive internal checks
+AC_ARG_ENABLE(checking,
+[  --enable-checking       enable expensive run-time checks.],
+AC_DEFINE(ENABLE_CHECKING)  
+)
+
 # Enable use of cpplib for C.
 AC_ARG_ENABLE(c-cpplib,
 [  --enable-c-cpplib       Use cpplib for C.],
@@ -110,8 +116,9 @@ if [[[ x$enable_threads = xno ]]]; then
 fi,
 enable_threads='')
 
+enable_threads_flag=$enable_threads
 # Check if a valid thread package
-case x${enable_threads} in
+case x${enable_threads_flag} in
        x | xno)
                # No threads
                target_thread_file='single'
@@ -122,7 +129,7 @@ case x${enable_threads} in
                ;;
        xdecosf1 | xirix | xmach | xos2 | xposix | xpthreads | xsingle | \
        xsolaris | xwin32 | xdce | xvxworks)
-               target_thread_file=$enable_threads
+               target_thread_file=$enable_threads_flag
                ;;
        *)
                echo "$enable_threads is an unknown thread package" 1>&2
@@ -142,13 +149,14 @@ AC_PROG_AWK
 AC_PROG_LEX
 GCC_PROG_LN
 GCC_PROG_LN_S
+GCC_C_VOLATILE
 AC_PROG_RANLIB
 AC_PROG_YACC
 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 stab.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)
+AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h fcntl.h unistd.h stab.h sys/file.h sys/time.h sys/resource.h sys/param.h sys/times.h wait.h sys/wait.h)
 
 # Check for thread headers.
 AC_CHECK_HEADER(thread.h, [have_thread_h=yes], [have_thread_h=])
@@ -180,10 +188,11 @@ AC_CACHE_VAL(gcc_cv_header_inttypes_h,
   gcc_cv_header_inttypes_h=no)])
 AC_MSG_RESULT($gcc_cv_header_inttypes_h)
 
-AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen vprintf bcopy bzero bcmp \
+AC_CHECK_FUNCS(strtoul bsearch strerror putenv popen bcopy bzero bcmp \
        index rindex strchr strrchr kill getrlimit setrlimit atoll atoq \
        sysconf isascii)
 
+GCC_FUNC_VFPRINTF_DOPRNT
 GCC_FUNC_PRINTF_PTR
 
 GCC_NEED_DECLARATIONS(malloc realloc calloc free bcopy bzero bcmp \
@@ -251,6 +260,7 @@ for machine in $build $host $target; do
        # configure entries modify them.
        gas="$gas_flag"
        gnu_ld="$gnu_ld_flag"
+       enable_threads=$enable_threads_flag
 
        # Set default cpu_type, tm_file and xm_file so it can be updated in
        # each machine entry.
@@ -337,18 +347,17 @@ for machine in $build $host $target; do
                ;;
        alpha*-*-linux-gnuecoff*)
                tm_file="${tm_file} alpha/linux-ecoff.h alpha/linux.h"
-               xm_defines=USE_BFD
                target_cpu_default="MASK_GAS"
                gas=no
                xmake_file=none
                gas=yes gnu_ld=yes
                ;;
        alpha*-*-linux-gnulibc1*)
-               tm_file="${tm_file} alpha/elf.h alpha/linux-elf.h alpha/linux.h"
-               xm_defines=USE_BFD
+               tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
                target_cpu_default="MASK_GAS"
                tmake_file="t-linux t-linux-gnulibc1 alpha/t-linux alpha/t-crtbe"
                extra_parts="crtbegin.o crtend.o"
+               fixincludes=fixinc.wrap
                xmake_file=none
                gas=yes gnu_ld=yes
                if [[ x$enable_threads = xyes ]]; then
@@ -356,8 +365,7 @@ for machine in $build $host $target; do
                fi
                ;;
        alpha*-*-linux-gnu*)
-               tm_file="${tm_file} alpha/linux.h alpha/elf.h"
-               xm_defines=USE_BFD
+               tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h"
                target_cpu_default="MASK_GAS"
                tmake_file="t-linux alpha/t-linux alpha/t-crtbe"
                extra_parts="crtbegin.o crtend.o"
@@ -368,6 +376,16 @@ for machine in $build $host $target; do
                        thread_file='posix'
                fi
                ;;
+       alpha*-*-netbsd*)
+               tm_file="${tm_file} alpha/elf.h alpha/netbsd.h alpha/netbsdl-elf.h"
+               target_cpu_default="MASK_GAS"
+               tmake_file="alpha/t-crtbe"
+               extra_parts="crtbegin.o crtend.o"
+               xmake_file=none
+               fixincludes=fixinc.wrap
+               gas=yes gnu_ld=yes
+               ;;
+               
        alpha*-dec-osf*)
                if [[ x$stabs = xyes ]]
                then
@@ -457,7 +475,7 @@ for machine in $build $host $target; do
                xm_file="xm-siglist.h ${xm_file}"
                tmake_file="t-netbsd arm/t-netbsd"
                # On NetBSD, the headers are already okay, except for math.h.
-               fixincludes=fixinc.math
+               fixincludes=fixinc.wrap
                ;;
        arm-*-linux-gnuaout*)           # ARM GNU/Linux
                cpu_type=arm
@@ -797,7 +815,7 @@ for machine in $build $host $target; do
        i[[34567]]86-*-freebsdelf*)
                tm_file="i386/i386.h i386/att.h linux.h i386/freebsd-elf.h i386/perform.h"
                # On FreeBSD, the headers are already ok, except for math.h.
-               fixincludes=fixinc.math
+               fixincludes=fixinc.wrap
                tmake_file=i386/t-freebsd
                gas=yes
                gnu_ld=yes
@@ -806,13 +824,13 @@ for machine in $build $host $target; do
        i[[34567]]86-*-freebsd*)
                tm_file=i386/freebsd.h
                # On FreeBSD, the headers are already ok, except for math.h.
-               fixincludes=fixinc.math
+               fixincludes=fixinc.wrap
                tmake_file=i386/t-freebsd
                ;;
        i[[34567]]86-*-netbsd*)
                tm_file=i386/netbsd.h
                # On NetBSD, the headers are already okay, except for math.h.
-               fixincludes=fixinc.math
+               fixincludes=fixinc.wrap
                tmake_file=t-netbsd
                ;;
        i[[34567]]86-*-coff*)
@@ -1012,7 +1030,7 @@ for machine in $build $host $target; do
                *-*-solaris2.[[0-4]])
                        fixincludes=fixinc.svr4;;
                *)
-                       fixincludes=fixinc.math;;
+                       fixincludes=fixinc.wrap;;
                esac
                if [[ x$enable_threads = xyes ]]; then
                        thread_file='solaris'
@@ -1546,7 +1564,7 @@ for machine in $build $host $target; do
        m68k-*-netbsd*)
                tm_file=m68k/netbsd.h
                # On NetBSD, the headers are already okay, except for math.h.
-               fixincludes=fixinc.math
+               fixincludes=fixinc.wrap
                tmake_file=t-netbsd
                ;;
        m68k-*-sysv3*)                  # Motorola m68k's running system V.3
@@ -1856,7 +1874,7 @@ for machine in $build $host $target; do
        mips-dec-netbsd*)                  # Decstation running NetBSD
                tm_file=mips/netbsd.h
                # On NetBSD, the headers are already okay, except for math.h.
-               fixincludes=fixinc.math
+               fixincludes=fixinc.wrap
                tmake_file=t-netbsd
                ;;
        mips-sony-bsd* | mips-sony-newsos*)     # Sony NEWS 3600 or risc/news.
@@ -2186,7 +2204,7 @@ for machine in $build $host $target; do
        ns32k-pc532-netbsd*)
                tm_file=ns32k/netbsd.h
                # On NetBSD, the headers are already okay, except for math.h.
-               fixincludes=fixinc.math
+               fixincludes=fixinc.wrap
                tmake_file=t-netbsd
                ;;
         pdp11-*-bsd)
@@ -2375,7 +2393,7 @@ for machine in $build $host $target; do
                *-*-solaris2.[[0-4]])
                        fixincludes=fixinc.svr4;;
                *)
-                       fixincludes=fixinc.math;;
+                       fixincludes=fixinc.wrap;;
                esac
                extra_headers=ppc-asm.h
                ;;
@@ -2454,7 +2472,7 @@ for machine in $build $host $target; do
        sparc-*-netbsd*)
                tm_file=sparc/netbsd.h
                # On NetBSD, the headers are already okay, except for math.h.
-               fixincludes=fixinc.math
+               fixincludes=fixinc.wrap
                tmake_file=t-netbsd
                ;;
        sparc-*-bsd*)
@@ -2526,7 +2544,7 @@ for machine in $build $host $target; do
                *-*-solaris2.[[0-4]])
                        fixincludes=fixinc.svr4;;
                *)
-                       fixincludes=fixinc.math;;
+                       fixincludes=fixinc.wrap;;
                esac
                float_format=i128
                if [[ x${enable_threads} = x ]]; then
@@ -2645,7 +2663,7 @@ for machine in $build $host $target; do
        vax-*-netbsd*)
                tm_file="${tm_file} netbsd.h vax/netbsd.h"
                # On NetBSD, the headers are already okay, except for math.h.
-               fixincludes=fixinc.math
+               fixincludes=fixinc.wrap
                tmake_file=t-netbsd
                float_format=vax
                ;;
@@ -3350,6 +3368,18 @@ if [[ ! -f Makefile.in ]]; then
        echo "source ${srcdir}/.gdbinit" >> .gdbinit
 fi
 
+# Define variables host_canonical and build_canonical
+# because some Cygnus local changes in the Makefile depend on them.
+build_canonical=${build}
+host_canonical=${host}
+target_subdir=
+if [[ "${host}" != "${target}" ]] ; then
+    target_subdir=${target}/
+fi
+AC_SUBST(build_canonical)
+AC_SUBST(host_canonical)
+AC_SUBST(target_subdir)
+       
 # 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
@@ -3380,6 +3410,10 @@ if [[ x$enable_haifa != x ]]; then
     done
 fi
 
+# Nothing to do for FLOAT_H, float_format already handled.
+objdir=`pwd`
+AC_SUBST(objdir)
+
 # Process the language and host/target makefile fragments.
 ${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"