X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fconfigure.ac;h=f613871f6b4aa29de234773aca0c4caa4fa4f080;hb=81540bae22fbff1c51ccdb4952b0c7d1ab144c2c;hp=849b856f9c946e8edb71028155a1973944448ec1;hpb=6cc62ffae9ccd068658004d535439e06c20d590b;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/configure.ac b/gcc/configure.ac index 849b856f9c9..f613871f6b4 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -24,7 +24,7 @@ # Initialization and sanity checks # -------------------------------- -AC_PREREQ(2.59) +AC_PREREQ(2.64) AC_INIT AC_CONFIG_SRCDIR(tree.c) AC_CONFIG_HEADER(auto-host.h:config.in) @@ -276,6 +276,7 @@ rm -f a.out a.exe b.out # Find the native compiler AC_PROG_CC AM_PROG_CC_C_O +AC_PROG_CXX ACX_PROG_GNAT([-I"$srcdir"/ada]) # autoconf is lame and doesn't give us any substitution variable for this. @@ -310,6 +311,7 @@ AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_CHECK_TYPES([long long], [AC_CHECK_SIZEOF(long long)]) AC_CHECK_TYPES([__int64], [AC_CHECK_SIZEOF(__int64)]) +GCC_STDINT_TYPES # --------------------- # Warnings and checking @@ -323,24 +325,30 @@ AC_CHECK_TYPES([__int64], [AC_CHECK_SIZEOF(__int64)]) # So, we only use -pedantic if we can disable those warnings. ACX_PROG_CC_WARNING_OPTS( - m4_quote(m4_do([-W -Wall -Wwrite-strings -Wstrict-prototypes ], - [-Wmissing-prototypes -Wcast-qual])), [loose_warn]) + m4_quote(m4_do([-W -Wall -Wwrite-strings -Wcast-qual])), [loose_warn]) ACX_PROG_CC_WARNING_OPTS( - m4_quote(m4_do([-Wold-style-definition -Wc++-compat ], - [-Wmissing-format-attribute])), [strict_warn]) + m4_quote(m4_do([-Wstrict-prototypes -Wmissing-prototypes])), + [c_loose_warn]) +ACX_PROG_CC_WARNING_OPTS( + m4_quote(m4_do([-Wmissing-format-attribute])), [strict_warn]) +ACX_PROG_CC_WARNING_OPTS( + m4_quote(m4_do([-Wold-style-definition -Wc++-compat])), [c_strict_warn]) ACX_PROG_CC_WARNING_ALMOST_PEDANTIC( m4_quote(m4_do([-Wno-long-long -Wno-variadic-macros ], [-Wno-overlength-strings])), [strict_warn]) ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual], [strict_warn]) # The above macros do nothing if the compiler is not GCC. However, the -# Makefile has more goo to add other flags, so this variabl is used to -# enables warnings only for GCC. +# Makefile has more goo to add other flags, so these variables are used +# to enable warnings only for GCC. warn_cflags= +warn_cxxflags= if test "x$GCC" = "xyes"; then warn_cflags='$(GCC_WARN_CFLAGS)' + warn_cxxflags='$(GCC_WARN_CXXFLAGS)' fi AC_SUBST(warn_cflags) +AC_SUBST(warn_cxxflags) # Enable expensive internal checks is_release= @@ -573,6 +581,13 @@ fi # Miscenalleous configure options # ------------------------------- +# See if we are building gcc with C++. +AC_ARG_ENABLE(build-with-cxx, +[ --enable-build-with-cxx build with C++ compiler instead of C compiler], +ENABLE_BUILD_WITH_CXX=$enableval, +ENABLE_BUILD_WITH_CXX=no) +AC_SUBST(ENABLE_BUILD_WITH_CXX) + # With stabs AC_ARG_WITH(stabs, [ --with-stabs arrange to use stabs instead of host debug format], @@ -805,11 +820,6 @@ AC_ARG_ENABLE(languages, esac], [enable_languages=c]) -# Used by documentation targets -AC_SUBST(datarootdir) -AC_SUBST(docdir) -AC_SUBST(htmldir) - AC_ARG_WITH(multilib-list, [ --with-multilib-list Select multilibs (SH only)], :, @@ -1495,6 +1505,32 @@ static const struct { EOF changequote([,])dnl +changequote(,)dnl +gcc_BASEVER=`cat $srcdir/BASE-VER` +gcc_DEVPHASE=`cat $srcdir/DEV-PHASE` +gcc_DATESTAMP=`cat $srcdir/DATESTAMP` +if test -f $srcdir/REVISION ; then + gcc_REVISION=`cat $srcdir/REVISION` +else + gcc_REVISION="" +fi +cat > plugin-version.h </dev/null`; then + glibcmajor=`expr "$glibcver" : "ldd (GNU libc) \([[0-9]]*\)"` + glibcminor=`expr "$glibcver" : "ldd (GNU libc) [[0-9]]*\.\([[0-9]]*\)"` + glibcnum=`expr $glibcmajor \* 1000 + $glibcminor` + if test "$glibcnum" -ge 2011 ; then + gcc_cv_as_gnu_unique_object=yes + fi + fi], + [enable_gnu_unique_object=yes])]) +if test x$enable_gnu_unique_object = xyes; then + AC_DEFINE(HAVE_GAS_GNU_UNIQUE_OBJECT, 1, + [Define if your assembler supports @gnu_unique_object.]) +fi + AC_CACHE_CHECK([assembler for tolerance to line number 0], [gcc_cv_as_line_zero], [gcc_cv_as_line_zero=no @@ -3484,6 +3615,41 @@ EOF ;; esac +AC_CACHE_CHECK(linker --build-id support, + gcc_cv_ld_buildid, + [gcc_cv_ld_buildid=no + if test $in_tree_ld = yes ; then + if test "$gcc_cv_gld_major_version" -eq 2 -a \ + "$gcc_cv_gld_minor_version" -ge 18 -o \ + "$gcc_cv_gld_major_version" -gt 2 \ + && test $in_tree_ld_is_elf = yes; then + gcc_cv_ld_buildid=yes + fi + elif test x$gcc_cv_ld != x; then + if $gcc_cv_ld --help 2>/dev/null | grep build-id > /dev/null; then + gcc_cv_ld_buildid=yes + fi + fi]) +if test x"$gcc_cv_ld_buildid" = xyes; then + AC_DEFINE(HAVE_LD_BUILDID, 1, + [Define if your linker supports --build-id.]) +fi + +AC_ARG_ENABLE(linker-build-id, +[ --enable-linker-build-id + compiler will always pass --build-id to linker], +[], +enable_linker_build_id=no) + +if test x"$enable_linker_build_id" = xyes; then + if test x"$gcc_cv_ld_buildid" = xyes; then + AC_DEFINE(ENABLE_LD_BUILDID, 1, + [Define if gcc should always pass --build-id to linker.]) + else + AC_MSG_WARN(--build-id is not supported by your linker; --enable-linker-build-id ignored) + fi +fi + AC_CACHE_CHECK(linker --sysroot support, gcc_cv_ld_sysroot, [gcc_cv_ld_sysroot=no @@ -3626,6 +3792,13 @@ esac], AC_SUBST(GGC) echo "Using $GGC for garbage collection." +# Libraries to use on the host. This will normally be set by the top +# level Makefile. Here we simply capture the value for our Makefile. +if test -z "${HOST_LIBS+set}"; then + HOST_LIBS= +fi +AC_SUBST(HOST_LIBS) + # Use the system's zlib library. zlibdir=-L../zlib zlibinc="-I\$(srcdir)/../zlib" @@ -3798,7 +3971,7 @@ touch Make-hooks target_list="all.cross start.encap rest.encap tags \ install-common install-man install-info install-pdf dvi pdf \ html uninstall info man srcextra srcman srcinfo \ - mostlyclean clean distclean maintainer-clean" + mostlyclean clean distclean maintainer-clean install-plugin" for t in $target_list do @@ -3853,24 +4026,6 @@ else fi) AC_SUBST(slibdir) -AC_ARG_WITH(datarootdir, -[ --with-datarootdir=DIR Use DIR as the data root [[PREFIX/share]]], -datarootdir="\${prefix}/$with_datarootdir", -datarootdir='$(prefix)/share') -AC_SUBST(datarootdir) - -AC_ARG_WITH(docdir, -[ --with-docdir=DIR Install documentation in DIR [[DATAROOTDIR]]], -docdir="\${prefix}/$with_docdir", -docdir='$(datarootdir)') -AC_SUBST(docdir) - -AC_ARG_WITH(htmldir, -[ --with-htmldir=DIR html documentation in in DIR [[DOCDIR]]], -htmldir="\${prefix}/$with_htmldir", -htmldir='$(docdir)') -AC_SUBST(htmldir) - # Substitute configuration variables AC_SUBST(subdirs) AC_SUBST(srcdir) @@ -3954,6 +4109,10 @@ fi AC_ARG_VAR(GMPLIBS,[How to link GMP]) AC_ARG_VAR(GMPINC,[How to find GMP include files]) +case "${GMPLIBS}" in + *-lmpc*) AC_DEFINE(HAVE_mpc, 1, [Define if mpc is in use.]) ;; +esac + AC_ARG_VAR(PPLLIBS,[How to link PPL]) AC_ARG_VAR(PPLINC,[How to find PPL include files])