configure.in: Add support for avr target.
[gcc.git] / gcc / configure.in
index d37b5ec20f6b903c8f8165db57ed7e88806c77e3..566a322dfe6f1791f203f99518ffb1f661030c21 100644 (file)
@@ -1,7 +1,7 @@
 # configure.in for GNU CC
 # Process this file with autoconf to generate a configuration script.
 
-# Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
 
 #This file is part of GNU CC.
 
@@ -218,11 +218,11 @@ elif test x$withval != xno; then
 fi])
 
 # Use cpplib+cppmain for the preprocessor, but don't link it with the compiler.
-cpp_main=cccp
+cpp_main=cppmain
 AC_ARG_ENABLE(cpplib,
-[  --enable-cpplib         use cpplib for the C preprocessor.],
-if test x$enable_cpplib != xno; then
-  cpp_main=cppmain
+[  --disable-cpplib        use the old isolated C preprocessor.],
+if test x$enable_cpplib = xno; then
+  cpp_main=cccp
 fi)
 
 # Link cpplib into the compiler proper, for C/C++/ObjC.
@@ -236,15 +236,6 @@ if test x$enable_c_cpplib != xno; then
   cpp_main=cppmain
 fi)
 
-# Disable fast fixincludes
-AC_ARG_ENABLE(fast-fixincludes,
-[  --disable-fast-fixincludes
-                         Disable the new fast fixincludes.
-                         Run the old fixincludes script unconditionally],
-if test x$enable_fast_fixincludes = xno ; then
-  cp $srcdir/fixincludes ./fixinc.sh
-fi)
-
 # Enable Multibyte Characters for C/C++
 AC_ARG_ENABLE(c-mbchar,
 [  --enable-c-mbchar       Enable multibyte characters for C and C++.],
@@ -295,7 +286,7 @@ fi,
 objc_boehm_gc='')
 
 AC_ARG_WITH(dwarf2,
-[  --enable-dwarf2       enable DWARF2 debugging as default.],
+[  --with-dwarf2         force the default debug format to be DWARF2.],
 dwarf2="$with_dwarf2",
 dwarf2=no)
 
@@ -405,11 +396,11 @@ case "${host}" in
   ;;
 esac
 AC_FUNC_VFORK
-AC_FUNC_MMAP
+AC_FUNC_MMAP_ANYWHERE
 
 GCC_NEED_DECLARATIONS(bcopy bzero bcmp \
        index rindex getenv atol sbrk abort atof strerror getcwd getwd \
-       strsignal putc_unlocked fputs_unlocked strstr)
+       strsignal putc_unlocked fputs_unlocked strstr environ)
 
 GCC_NEED_DECLARATIONS(malloc realloc calloc free, [
 #ifdef HAVE_MALLOC_H
@@ -513,6 +504,9 @@ changequote([,])dnl
        mips*-*-*)
                cpu_type=mips
                ;;
+       pj*-*-*)
+               cpu_type=pj
+               ;;
        powerpc*-*-*)
                cpu_type=rs6000
                ;;
@@ -686,12 +680,12 @@ changequote([,])dnl
                    install_headers_dir=install-headers-cpio
                    ;;
                  *-*-osf5*)
-                   tm_file="${tm_file} alpha/osf.h"
+                   tm_file="${tm_file} alpha/osf.h alpha/osf5.h"
                    ;;
                esac
                case $machine in
 changequote(,)dnl
-                 *-*-osf4.0[b-z] | *-*-osf4.[1-9]*)
+                 *-*-osf4.0[b-z] | *-*-osf4.[1-9]* | *-*-osf5*)
 changequote([,])dnl
                    target_cpu_default=MASK_SUPPORT_ARCH
                    ;;
@@ -767,7 +761,7 @@ changequote([,])dnl
        arm*-*-netbsd*)
                tm_file=arm/netbsd.h
                tmake_file="t-netbsd arm/t-netbsd"
-       use_collect2=yes
+               use_collect2=yes
                ;;
        arm*-*-linux-gnuaout*)          # ARM GNU/Linux with a.out
                cpu_type=arm
@@ -827,6 +821,12 @@ changequote([,])dnl
        arm*-*-elf)
                tm_file=arm/unknown-elf.h
                tmake_file=arm/t-arm-elf
+#              tm_file=arm2/unknown-elf.h
+#              tmake_file=arm2/t-arm-elf
+#              out_file=arm2/arm.c
+#              xm_file=arm2/xm-arm.h
+#              md_file=arm2/arm.md
+#              tm_p_file=arm2/arm-protos.h
                ;;
         arm*-*-oabi)
                tm_file=arm/unknown-elf-oabi.h
@@ -837,6 +837,8 @@ changequote([,])dnl
                tmake_file=arm/t-pe
                extra_objs=pe.o
                ;;
+       avr-*-*)
+               ;;
        c1-convex-*)                    # Convex C1
                target_cpu_default=1
                use_collect2=yes
@@ -1129,7 +1131,6 @@ changequote([,])dnl
                xmake_file=pa/x-pa-mpeix 
                echo "You must use gas. Assuming it is already installed." 
                install_headers_dir=install-headers-tar
-               fixincludes=Makefile.in
                use_collect2=yes 
                ;; 
        i370-*-opened*)                  # IBM 360/370/390 Architecture
@@ -1137,20 +1138,17 @@ changequote([,])dnl
                tm_file=i370/oe.h
                xmake_file=i370/x-oe
                tmake_file=i370/t-oe
-               fixincludes=Makefile.in # Headers are wierd, don't mess with
                ;;
        i370-*-mvs*)
                xm_file=i370/xm-mvs.h
                tm_file=i370/mvs.h
                tmake_file=i370/t-mvs
-               fixincludes=Makefile.in # Headers are wierd, don't mess with
                ;;
        i370-*-linux*)
                xm_file="xm-linux.h i370/xm-linux.h"
                xmake_file=x-linux
                tm_file="i370/linux.h ${tm_file}"
                tmake_file="t-linux i370/t-linux"
-               fixincludes=Makefile.in # The headers are ok already.
                # broken_install=yes
                extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
                # extra_parts="crtbegin.o crtend.o"
@@ -1273,6 +1271,26 @@ changequote([,])dnl
                tm_file=i386/i386-aout.h
                tmake_file=i386/t-i386bare
                ;;
+changequote(,)dnl
+       i[34567]86-*-beospe*)
+changequote([,])dnl
+               xm_file=i386/xm-beos.h
+               xm_defines="USE_C_ALLOCA"
+               tmake_file=i386/t-beos
+               tm_file=i386/beos-pe.h
+               xmake_file=i386/x-beos
+               extra_objs=winnt.o
+               ;;
+changequote(,)dnl
+       i[34567]86-*-beoself* | i[34567]86-*-beos*)
+changequote([,])dnl
+               xm_file=i386/xm-beos.h
+               tmake_file='i386/t-beos i386/t-crtpic'
+               tm_file=i386/beos-elf.h
+               xmake_file=i386/x-beos
+               extra_objs=winnt.o
+               extra_parts='crtbegin.o crtend.o'
+               ;;
 changequote(,)dnl
        i[34567]86-*-bsdi* | i[34567]86-*-bsd386*)
 changequote([,])dnl
@@ -1314,7 +1332,7 @@ changequote(,)dnl
 changequote([,])dnl
                tm_file=i386/netbsd.h
                tmake_file=t-netbsd
-       use_collect2=yes
+               use_collect2=yes
                ;;
 changequote(,)dnl
        i[34567]86-*-openbsd*)
@@ -1481,19 +1499,19 @@ changequote([,])dnl
                tmake_file="i386/t-go32 t-rtems"
                ;;
 changequote(,)dnl
-       i[34567]86-*-rtems*|i[34567]86-*-rtemself*)
+       i[34567]86-*-rtemscoff*)
 changequote([,])dnl
                cpu_type=i386
-               tm_file=i386/rtemself.h
-               extra_parts="crtbegin.o crtend.o crti.o crtn.o"
-               tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems"
+               tm_file=i386/rtems.h
+               tmake_file="i386/t-i386bare t-rtems"
                ;;
 changequote(,)dnl
-       i[34567]86-*-rtemscoff*)
+       i[34567]86-*-rtems*|i[34567]86-*-rtemself*)
 changequote([,])dnl
                cpu_type=i386
-               tm_file=i386/rtems.h
-               tmake_file="i386/t-i386bare t-rtems"
+               tm_file=i386/rtemself.h
+               extra_parts="crtbegin.o crtend.o crti.o crtn.o"
+               tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems"
                ;;
 changequote(,)dnl
        i[34567]86-*-sco3.2v5*) # 80386 running SCO Open Server 5
@@ -2205,7 +2223,7 @@ changequote([,])dnl
                tm_file=m68k/netbsd.h
                tmake_file=t-netbsd
                float_format=m68k
-       use_collect2=yes
+               use_collect2=yes
                ;;
        m68k*-*-openbsd*)
                float_format=m68k
@@ -2269,13 +2287,13 @@ changequote([,])dnl
                extra_headers=math-68881.h
                float_format=m68k
                ;;
-       m68k-*-rtemscoff*|m68k-*-rtems*)
+       m68k-*-rtemscoff*)
                tmake_file="m68k/t-m68kbare t-rtems"
                tm_file=m68k/rtems.h
                extra_headers=math-68881.h
                float_format=m68k
                ;;
-       m68k-*-rtemself*)
+       m68k-*-rtemself*|m68k-*-rtems*)
                tmake_file="m68k/t-m68kbare t-rtems m68k/t-crtstuff"
                tm_file=m68k/rtemself.h
                extra_headers=math-68881.h
@@ -2355,6 +2373,14 @@ changequote([,])dnl
                xmake_file=m88k/x-sysv4
                tmake_file=m88k/t-sysv4
                ;;
+       mcore-*-elf)
+               tm_file=mcore/mcore-elf.h
+               tmake_file=mcore/t-mcore
+               ;;
+       mcore-*-pe*)
+               tm_file=mcore/mcore-pe.h
+               tmake_file=mcore/t-mcore-pe
+               ;;
        mips-sgi-irix6*)                # SGI System V.4., IRIX 6
                if test "x$gnu_ld" = xyes
                then
@@ -2808,7 +2834,6 @@ changequote([,])dnl
                ;;
        mips64orion-*-rtems*)
                tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
-                tm_file="mips/elforion.h mips/elf64.h mips/rtems64.h"
                tmake_file="mips/t-elf t-rtems"
                ;;
        mipstx39el-*-elf*)
@@ -2895,13 +2920,15 @@ changequote([,])dnl
                xm_file="ns32k/xm-netbsd.h ${xm_file}"
                # On NetBSD, the headers are already okay, except for math.h.
                tmake_file=t-netbsd
-       use_collect2=yes
+               use_collect2=yes
                ;;
         pdp11-*-bsd)
                tm_file="${tm_file} pdp11/2bsd.h"
                 ;;
         pdp11-*-*)
                ;;
+        avr-*-*)
+               ;;
        ns32k-*-openbsd*)
                # Nothing special
                ;;
@@ -2911,6 +2938,16 @@ changequote([,])dnl
 #              xmake_file=pyr/x-pyr
 #              use_collect2=yes
 #              ;;
+
+       pj*-linux*)
+               tm_file="svr4.h pj/linux.h ${tm_file}"
+               ;;
+       pj-*)
+               ;;
+       pjl-*)
+               tm_file="svr4.h pj/pjl.h ${tm_file}"
+               ;;
+
        romp-*-aos*)
                use_collect2=yes
                ;;
@@ -3204,7 +3241,7 @@ changequote([,])dnl
        sparc-*-netbsd*)
                tm_file=sparc/netbsd.h
                tmake_file=t-netbsd
-       use_collect2=yes
+               use_collect2=yes
                ;;
        sparc-*-openbsd*)
                # we need collect2 until our bug is fixed...
@@ -3258,6 +3295,10 @@ changequote([,])dnl
                tmake_file=sparc/t-sunos41
                xmake_file=x-lynx
                ;;
+       sparc-*-rtemsaout*)
+               tmake_file="sparc/t-sparcbare t-rtems"
+               tm_file=sparc/rtems.h
+               ;;
        sparc-*-rtems*|sparc-*-rtemself*)
                tm_file="sparc/rtemself.h"
                tmake_file="sparc/t-elf t-rtems"
@@ -3265,10 +3306,6 @@ changequote([,])dnl
                #float_format=i128
                float_format=i64
                ;;
-       sparc-*-rtemsaout*)
-               tmake_file="sparc/t-sparcbare t-rtems"
-               tm_file=sparc/rtems.h
-               ;;
        sparcv9-*-solaris2*)
                if test x$gnu_ld = xyes
                then
@@ -3454,6 +3491,7 @@ changequote([,])dnl
                xm_file=arm/xm-thumb.h
                md_file=arm/thumb.md
                tmake_file=arm/t-thumb
+               tm_p_file=arm/thumb-protos.h
                ;;
        thumb-*-elf* | thumbel-*-elf*)
                tm_file=arm/telf.h
@@ -3461,6 +3499,7 @@ changequote([,])dnl
                xm_file=arm/xm-thumb.h
                md_file=arm/thumb.md
                tmake_file=arm/t-thumb-elf
+               tm_p_file=arm/thumb-protos.h
                ;;
        thumb-*-linux-gnu*)
                tm_file=arm/linux-telf.h
@@ -3468,6 +3507,7 @@ changequote([,])dnl
                xm_file=arm/xm-thumb.h
                md_file=arm/thumb.md
                tmake_file=arm/t-thumb-linux
+               tm_p_file=arm/thumb-protos.h
                ;;
        thumb-*-uclinux*)
                tm_file=arm/uclinux-telf.h
@@ -3475,6 +3515,7 @@ changequote([,])dnl
                md_file=arm/thumb.md
                tmake_file=arm/t-thumb-linux
                xm_file=arm/xm-thumb.h
+               tm_p_file=arm/thumb-protos.h
                ;;
        thumb-wrs-vxworks)
                tm_file=arm/tcoff.h
@@ -3483,6 +3524,7 @@ changequote([,])dnl
                md_file=arm/thumb.md
                tmake_file=arm/t-thumb
                thread_file='vxworks'
+               tm_p_file=arm/thumb-protos.h
                ;;
        thumb-*-pe)
                tm_file=arm/tpe.h
@@ -3491,12 +3533,24 @@ changequote([,])dnl
                md_file=arm/thumb.md
                tmake_file=arm/t-pe-thumb
                extra_objs=pe.o
+               tm_p_file=arm/thumb-protos.h
                ;;
 # This hasn't been upgraded to GCC 2.
 #      tron-*-*)
 #              cpu_type=gmicro
 #              use_collect2=yes
 #              ;;
+       v850-*-rtems*)
+               cpu_type=v850
+               tm_file="v850/rtems.h"
+               xm_file="v850/xm-v850.h"
+               tmake_file="v850/t-v850 t-rtems"
+               if test x$stabs = xyes
+               then
+                       tm_file="${tm_file} dbx.h"
+               fi
+               use_collect2=no
+               ;;
        v850-*-*)
                target_cpu_default="TARGET_CPU_generic"
                cpu_type=v850
@@ -3522,7 +3576,7 @@ changequote([,])dnl
                tm_file="${tm_file} netbsd.h vax/netbsd.h"
                tmake_file=t-netbsd
                float_format=vax
-       use_collect2=yes
+               use_collect2=yes
                ;;
        vax-*-openbsd*)
                tmake_file="${tmake_file} vax/t-openbsd"
@@ -3800,7 +3854,7 @@ then tmake_file=$cpu_type/t-$cpu_type
 fi
 
 if test x"$dwarf2" = xyes
-then tm_file="tm-dwarf2.h $tm_file"
+then tm_file="$tm_file tm-dwarf2.h"
 fi
 
 if test x$float_format = x
@@ -3974,7 +4028,7 @@ else
        gcc_version_trigger=${srcdir}/version.c
 fi
 changequote(,)dnl
-gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${gcc_version_trigger}`
+gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
 changequote([,])dnl
 
 # Internationalization
@@ -4534,9 +4588,8 @@ AC_ARG_WITH(gc,
     AC_MSG_ERROR([$withval is an invalid option to --with-gc])
     ;;
 esac],
-[if test $ac_cv_func_mmap_fixed_mapped = yes; then
-  GGC=ggc-page
-elif test $ac_cv_func_valloc = yes; then
+[if test $ac_cv_func_mmap_anywhere = yes \
+    || test $ac_cv_func_valloc = yes; then
   GGC=ggc-page
 else
   GGC=ggc-simple
@@ -4544,6 +4597,18 @@ fi])
 AC_SUBST(GGC)
 echo "Using $GGC for garbage collection."
 
+# Build a new-abi (c++) system
+AC_ARG_ENABLE(new-gxx-abi,
+[  --enable-new-gxx-abi
+                         select the new abi for g++. You must select an ABI
+                         at configuration time, so that the correct runtime
+                         support is built. You cannot mix ABIs.],
+[AC_DEFINE(ENABLE_NEW_GXX_ABI)
+GXX_ABI_FLAG='-fnew-abi'
+echo "Building a new-abi g++ compiler."
+])
+AC_SUBST(GXX_ABI_FLAG)
+
 # Make empty files to contain the specs and options for each language.
 # Then add #include lines to for a compiler that has specs and/or options.
 
@@ -4766,7 +4831,6 @@ AC_SUBST(extra_objs)
 AC_SUBST(extra_parts)
 AC_SUBST(extra_passes)
 AC_SUBST(extra_programs)
-AC_SUBST(fixinc_defs)
 AC_SUBST(float_h_file)
 AC_SUBST(gcc_gxx_include_dir)
 AC_SUBST(gcc_version)