X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=configure.in;h=a67a0a2bc905d6ca793b0b23a741fd10d555a98e;hb=52e76f501030691108f199c33511c941b7b94f35;hp=1fcb9ae69af27f4d663dbec1e43fd2e4e49619d2;hpb=75d597211db7e511a63ae32fdade0f4342d295e7;p=pf3gnuchains%2Fgcc-fork.git diff --git a/configure.in b/configure.in index 1fcb9ae69af..a67a0a2bc90 100644 --- a/configure.in +++ b/configure.in @@ -134,7 +134,6 @@ host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb # libgcj represents the runtime libraries only used by gcj. libgcj="target-libffi \ - target-boehm-gc \ target-zlib \ target-qthreads \ target-libjava" @@ -148,8 +147,8 @@ target_libraries="target-libiberty \ target-libstdc++-v3 \ target-libmudflap \ target-libssp \ - target-libgcc-math \ target-libgfortran \ + target-boehm-gc \ ${libgcj} \ target-libobjc \ target-libada \ @@ -227,7 +226,7 @@ esac # Some tools are only suitable for building in a "native" situation. # Remove these if host!=target. -native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff gprof target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf" +native_only="autoconf automake libtool fileutils find gawk gettext gzip hello indent m4 rcs recode sed shellutils tar textutils uudecode wdiff target-groff guile perl time ash bash bzip2 prms gnuserv target-gperf" # Similarly, some are only suitable for cross toolchains. # Remove these if host=target. @@ -313,18 +312,6 @@ AC_ARG_ENABLE(libssp, ENABLE_LIBSSP=$enableval, ENABLE_LIBSSP=yes) -# Set the default so we build libgcc-math for ix86 and x86_64 -AC_ARG_ENABLE(libgcc-math, -[ --enable-libgcc-math Builds libgcc-math directory],, -[ -case "${target}" in - i?86-* | x86_64-* ) - enable_libgcc_math=yes ;; - *) - enable_libgcc_math=no ;; -esac -]) - # Save it here so that, even in case of --enable-libgcj, if the Java # front-end isn't enabled, we still get libgcj disabled. libgcj_saved=$libgcj @@ -366,7 +353,7 @@ if test x$enable_libgomp = x ; then ;; *-*-netbsd* | *-*-freebsd* | *-*-openbsd*) ;; - *-*-solaris2* | *-*-sysv4* | *-*-irix* | *-*-osf* | *-*-hpux*) + *-*-solaris2* | *-*-sysv4* | *-*-irix6* | *-*-osf* | *-*-hpux11*) ;; *-*-darwin* | *-*-aix*) ;; @@ -1232,6 +1219,7 @@ if test -d ${srcdir}/gcc; then language= target_libs= lang_dirs= + subdir_requires= boot_language= build_by_default= need_gmp= @@ -1265,6 +1253,21 @@ if test -d ${srcdir}/gcc; then ;; esac + # Disable languages that need other directories if these aren't available. + for i in $subdir_requires; do + test -f "$srcdir/gcc/$i/config-lang.in" && continue + case ,${enable_languages}, in + *,${language},*) + # Specifically requested language; tell them. + AC_MSG_ERROR([The gcc/$i directory contains parts of $language but is missing]) + ;; + *) + # Silently disable. + add_this_lang=no + ;; + esac + done + # Disable languages that need GMP if it isn't available. case ,${enable_languages},:${have_gmp}:${need_gmp} in *,${language},*:no:yes) @@ -1326,6 +1329,29 @@ for dir in $configdirs $build_configdirs $target_configdirs ; do fi done +# Check for Boehm's garbage collector +AC_ARG_ENABLE(objc-gc, +[ --enable-objc-gc enable the use of Boehm's garbage collector with + the GNU Objective-C runtime.], +[case ,${enable_languages},:${enable_objc_gc}:${noconfigdirs} in + *,objc,*:*:yes:*target-boehm-gc*) + AC_MSG_ERROR([Boehm's garbage collector was requested yet not supported in this configuration]) + ;; +esac]) + +# Make sure we only build Boehm's garbage collector if required. +case ,${enable_languages},:${enable_objc_gc} in + *,objc,*:yes) + # Keep target-boehm-gc if requested for Objective-C. + ;; + *) + # Otherwise remove target-boehm-gc depending on target-libjava. + if echo " ${noconfigdirs} " | grep "target-libjava" >/dev/null 2>&1; then + noconfigdirs="$noconfigdirs target-boehm-gc" + fi + ;; +esac + # Remove the entries in $skipdirs and $noconfigdirs from $configdirs, # $build_configdirs and $target_configdirs. # If we have the source for $noconfigdirs entries, add them to $notsupp. @@ -2385,6 +2411,21 @@ case $build in stage1_cflags="-g -no-cpp-precomp -DHAVE_DESIGNATED_INITIALIZERS=0" ;; esac + +# This is aimed to mimic bootstrap with a non-GCC compiler to catch problems. +if test "$GCC" = yes; then + saved_CFLAGS="$CFLAGS" + + # Pass -fkeep-inline-functions for stage 1 if the GCC version supports it. + CFLAGS="$CFLAGS -fkeep-inline-functions" + AC_MSG_CHECKING([whether -fkeep-inline-functions is supported]) + AC_TRY_COMPILE(,, + [AC_MSG_RESULT([yes]); stage1_cflags="$stage1_cflags -fkeep-inline-functions"], + [AC_MSG_RESULT([no])]) + + CFLAGS="$saved_CFLAGS" +fi + AC_SUBST(stage1_cflags) # Enable -Werror in bootstrap stage2 and later. @@ -2398,4 +2439,24 @@ case ${enable_werror} in esac AC_SUBST(stage2_werror_flag) +# Flags needed to enable html installing and building +AC_ARG_WITH(datarootdir, +[ --with-datarootdir Use datarootdir as the data root directory.], +[datarootdir="\${prefix}/${withval}"], +[datarootdir="\${prefix}/share"]) + +AC_ARG_WITH(docdir, +[ --with-docdir Install documentation in this directory.], +[docdir="\${prefix}/${withval}"], +[docdir="\${datarootdir}/doc"]) + +AC_ARG_WITH(htmldir, +[ --with-htmldir Install html in this directory.], +[htmldir="\${prefix}/${withval}"], +[htmldir="\${docdir}"]) + +AC_SUBST(datarootdir) +AC_SUBST(docdir) +AC_SUBST(htmldir) + AC_OUTPUT(Makefile)