OSDN Git Service

Fix for aliasing problem reported by Michael Matz.
[pf3gnuchains/gcc-fork.git] / gcc / configure.in
index 89f68b6..ffa7e5d 100644 (file)
@@ -148,6 +148,20 @@ elif test x$withval != xno; then
   cpp_install_dir=$withval
 fi])
 
+# We would like to our source tree to be readonly.  However when releases or
+# pre-releases are generated, the flex/bison generated files as well as the 
+# various formats of manuals need to be included along with the rest of the
+# sources.  Therefore we have --enable-generated-files-in-srcdir to do 
+# just that.
+
+AC_ARG_ENABLE(generated-files-in-srcdir, 
+[  --enable-generated-files-in-srcdir  Put generated files in source dir],
+[case ${enableval} in
+  no)    parsedir='$(objdir)'; docobjdir='$(objdir)/doc';;
+  *)     parsedir='$(srcdir)'; docobjdir='$(srcdir)/doc';;
+esac],
+[parsedir='$(objdir)'; docobjdir='$(objdir)/doc';])
+
 # -------------------
 # Find default linker
 # -------------------
@@ -270,29 +284,12 @@ fi
 # See if GNAT has been installed
 gcc_AC_PROG_GNAT
 
-if test x$have_gnat != xno ; then 
-AC_CACHE_CHECK(whether ${ADAC} accepts -Wno-long-long,
-ac_cv_prog_adac_no_long_long,
-[cat >conftest.adb <<EOF
-procedure conftest is begin null; end conftest;
-EOF
-if $ADAC -Wno-long-long -c conftest.adb 1>&5 2>&5 ; then
-  ac_cv_prog_adac_no_long_long=yes
-else
-  ac_cv_prog_adac_no_long_long=no
-fi
-rm -f conftest*])
-else
-  ac_cv_prog_adac_no_long_long=yes
-fi
-
 # ---------------------
 # Warnings and checking
 # ---------------------
 
 strict1_warn=
-if test $ac_cv_prog_cc_no_long_long = yes && \
-    test $ac_cv_prog_adac_no_long_long = yes ; then
+if test $ac_cv_prog_cc_no_long_long = yes ; then
   strict1_warn="-pedantic -Wno-long-long"
 fi
 AC_SUBST(strict1_warn)
@@ -403,6 +400,15 @@ valgrind_command=
 if test x$ac_checking_valgrind != x ; then
   # It is certainly possible that there's valgrind but no valgrind.h.
   # GCC relies on making annotations so we must have both.
+  AC_MSG_CHECKING(for VALGRIND_DISCARD in <valgrind/memcheck.h>)
+  AC_TRY_CPP(
+    [#include <valgrind/memcheck.h>
+#ifndef VALGRIND_DISCARD
+#error VALGRIND_DISCARD not defined
+#endif],
+  [gcc_cv_header_valgrind_memcheck_h=yes],
+  [gcc_cv_header_valgrind_memcheck_h=no])
+  AC_MSG_RESULT($gcc_cv_header_valgrind_memcheck_h)
   AC_MSG_CHECKING(for VALGRIND_DISCARD in <memcheck.h>)
   AC_TRY_CPP(
     [#include <memcheck.h>
@@ -415,14 +421,21 @@ if test x$ac_checking_valgrind != x ; then
   AC_CHECK_HEADER(valgrind.h, have_valgrind_h=yes, have_valgrind_h=no)
   AM_PATH_PROG_WITH_TEST(valgrind_path, valgrind,
        [$ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1])
-  if test "x$valgrind_path" = "x" || (test $have_valgrind_h = no && test $gcc_cv_header_memcheck_h = no); then
-       AC_MSG_ERROR([*** Can't find both valgrind and valgrind.h/memcheck.h])
+  if test "x$valgrind_path" = "x" \
+    || (test $have_valgrind_h = no \
+       && test $gcc_cv_header_memcheck_h = no \
+       && test $gcc_cv_header_valgrind_memcheck_h = no); then
+       AC_MSG_ERROR([*** Can't find both valgrind and valgrind/memcheck.h, memcheck.h or valgrind.h])
   fi
   valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
   valgrind_command="$valgrind_path -q"
   AC_DEFINE(ENABLE_VALGRIND_CHECKING, 1,
 [Define if you want to run subprograms and generated programs
    through valgrind (a memory checker).  This is extremely expensive.])
+  if test $gcc_cv_header_valgrind_memcheck_h = yes; then
+    AC_DEFINE(HAVE_VALGRIND_MEMCHECK_H, 1,
+       [Define if valgrind's valgrind/memcheck.h header is installed.])
+  fi
   if test $gcc_cv_header_memcheck_h = yes; then
     AC_DEFINE(HAVE_MEMCHECK_H, 1,
        [Define if valgrind's memcheck.h header is installed.])
@@ -572,6 +585,12 @@ AC_PROG_MAKE_SET
 
 # Find some useful tools
 AC_PROG_AWK
+# We need awk to run opts.sh (to create options.c and options.h).
+# Bail out if it's missing.
+case ${AWK} in
+  "") AC_MSG_ERROR([can't build without awk, bailing out]) ;;
+esac
+
 gcc_AC_PROG_LN
 gcc_AC_PROG_LN_S
 AC_PROG_RANLIB
@@ -2373,7 +2392,7 @@ esac
 case "$target" in
   i?86*-*-* | mips*-*-* | alpha*-*-* | powerpc*-*-* | sparc*-*-* | m68*-*-* \
   | x86_64*-*-* | hppa*-*-* | arm*-*-* | strongarm*-*-* | xscale*-*-* \
-  | xstormy16*-*-* | cris-*-*)
+  | xstormy16*-*-* | cris-*-* | xtensa-*-*)
     insn="nop"
     ;;
   ia64*-*-*)
@@ -2681,10 +2700,10 @@ AC_SUBST(gthread_flags)
 
 # Find out what GC implementation we want, or may, use.
 AC_ARG_WITH(gc,
-[  --with-gc={simple,page} choose the garbage collection mechanism to use
+[  --with-gc={simple,page,zone} choose the garbage collection mechanism to use
                           with the compiler],
 [case "$withval" in
-  simple | page)
+  simple | page | zone)
     GGC=ggc-$withval
     ;;
   *)
@@ -2828,9 +2847,9 @@ done
 rm -f Make-hooks
 touch Make-hooks
 target_list="all.build all.cross start.encap rest.encap tags \
-       install-normal install-common install-info install-man \
+       install-normal install-common install-man \
        uninstall \
-       mostlyclean clean distclean extraclean maintainer-clean \
+       mostlyclean clean distclean maintainer-clean \
        stage1 stage2 stage3 stage4 stageprofile stagefeedback"
 for t in $target_list
 do
@@ -2922,6 +2941,8 @@ AC_SUBST(objdir)
 # Substitute configuration variables
 AC_SUBST(subdirs)
 AC_SUBST(srcdir)
+AC_SUBST(docobjdir)
+AC_SUBST(parsedir)
 AC_SUBST(all_boot_languages)
 AC_SUBST(all_compilers)
 AC_SUBST(all_gtfiles)