diff options
Diffstat (limited to 'contrib/libstdc++/acinclude.m4')
-rw-r--r-- | contrib/libstdc++/acinclude.m4 | 74 |
1 files changed, 41 insertions, 33 deletions
diff --git a/contrib/libstdc++/acinclude.m4 b/contrib/libstdc++/acinclude.m4 index 9950f93cf8be..894fbf8a5b5e 100644 --- a/contrib/libstdc++/acinclude.m4 +++ b/contrib/libstdc++/acinclude.m4 @@ -1,9 +1,10 @@ dnl dnl Initialize configure bits. dnl -dnl GLIBCPP_CONFIGURE -AC_DEFUN(GLIBCPP_CONFIGURE, [ - dnl Default to --enable-multilib +dnl GLIBCPP_TOPREL_CONFIGURE +AC_DEFUN(GLIBCPP_TOPREL_CONFIGURE, [ + dnl Default to --enable-multilib (this is also passed by default + dnl from the ubercommon-top-level configure) AC_ARG_ENABLE(multilib, [ --enable-multilib build hella library versions (default)], [case "${enableval}" in @@ -33,12 +34,21 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [ AC_CONFIG_AUX_DIR(${srcdir}/$toprel) toplevel_srcdir=\${top_srcdir}/$toprel AC_SUBST(toplevel_srcdir) +]) + +dnl +dnl Initialize configure bits. +dnl +dnl GLIBCPP_CONFIGURE +AC_DEFUN(GLIBCPP_CONFIGURE, [ + +#possibly test for the presence of the compiler sources here? # Export build and source directories. # These need to be absolute paths, yet at the same time need to # canonicalize only relative paths, because then amd will not unmount # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd. - glibcpp_builddir=`pwd` + glibcpp_builddir=`${PWDCMD-pwd}` case $srcdir in [\\/$]* | ?:[\\/]*) glibcpp_srcdir=${srcdir} ;; *) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;; @@ -51,7 +61,8 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [ AC_PROG_AWK # Will set LN_S to either 'ln -s' or 'ln'. With autoconf 2.5x, can also - # be 'cp -p' if linking isn't available. + # be 'cp -p' if linking isn't available. Uncomment the next line to + # force a particular method. #ac_cv_prog_LN_S='cp -p' AC_PROG_LN_S @@ -156,6 +167,11 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [ LIB_AC_PROG_CXX + # For directory versioning (e.g., headers) and other variables. + AC_MSG_CHECKING([for GCC version number]) + gcc_version=`$glibcpp_CXX -dumpversion` + AC_MSG_RESULT($gcc_version) + # For some reason, gettext needs this. AC_ISC_POSIX @@ -181,17 +197,14 @@ AC_DEFUN(GLIBCPP_CONFIGURE, [ AC_EXEEXT fi - . [$]{glibcpp_basedir}/configure.host - case [$]{glibcpp_basedir} in /* | [A-Za-z]:[\\/]*) libgcj_flagbasedir=[$]{glibcpp_basedir} ;; *) glibcpp_flagbasedir='[$](top_builddir)/'[$]{glibcpp_basedir} ;; esac - # This does for the target what configure.host does for the host. In + # Find platform-specific directories containing configuration info. In # addition to possibly modifying the same flags, it also sets up symlinks. GLIBCPP_CHECK_TARGET - ]) @@ -1172,15 +1185,14 @@ AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [ # Declare intention to use gettext, and add support for specific # languages. - # For some reason, ALL_LINGUAS has to be before AM_GNU_GETTEXT + # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT ALL_LINGUAS="de fr" - # Don't call AM_GNU_GETTEXT here. Instead, assume glibc. + # Don't call AM-GNU-GETTEXT here. Instead, assume glibc. AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no) if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then USE_NLS=yes fi - # Export the build objects. for ling in $ALL_LINGUAS; do \ glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \ @@ -1690,23 +1702,20 @@ changequote([, ]) dnl Option parsed, now set things appropriately case "$enable_cheaders" in c_shadow) - CSHADOW_FLAGS="-fno-builtin" C_INCLUDE_DIR='${glibcpp_srcdir}/include/c_shadow' ;; c_std) - CSHADOW_FLAGS="" C_INCLUDE_DIR='${glibcpp_srcdir}/include/c_std' ;; c) - CSHADOW_FLAGS="" C_INCLUDE_DIR='${glibcpp_srcdir}/include/c' ;; esac - AC_SUBST(CSHADOW_FLAGS) AC_SUBST(C_INCLUDE_DIR) AM_CONDITIONAL(GLIBCPP_C_HEADERS_C, test "$enable_cheaders" = c) AM_CONDITIONAL(GLIBCPP_C_HEADERS_C_STD, test "$enable_cheaders" = c_std) + AM_CONDITIONAL(GLIBCPP_C_HEADERS_COMPATIBILITY, test "$c_compatibility" = yes) ]) @@ -1804,10 +1813,6 @@ glibcpp_toolexecdir=no glibcpp_toolexeclibdir=no glibcpp_prefixdir=${prefix} -AC_MSG_CHECKING([for interface version number]) -libstdcxx_interface=$INTERFACE -AC_MSG_RESULT($libstdcxx_interface) - # Process the option --with-gxx-include-dir=<path to include-files directory> AC_MSG_CHECKING([for --with-gxx-include-dir]) AC_ARG_WITH(gxx-include-dir, @@ -1839,26 +1844,21 @@ version_specific_libs=no)dnl # Option set, now we can test it. AC_MSG_RESULT($version_specific_libs) +# Default case for install directory for include files. +if test $version_specific_libs = no && test $gxx_include_dir = no; then + gxx_include_dir='$(prefix)'/include/c++/${gcc_version} +fi + +# Version-specific runtime libs processing. if test $version_specific_libs = yes; then # Need the gcc compiler version to know where to install libraries # and header files if --enable-version-specific-runtime-libs option # is selected. - changequote(,)dnl - gcc_version_trigger=${srcdir}/../gcc/version.c - gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'` - gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` if test x"$gxx_include_dir" = x"no"; then - gxx_include_dir='$(libdir)/gcc-lib/$(target_alias)/'${gcc_version}/include/g++ + gxx_include_dir='$(libdir)/gcc-lib/$(target_alias)/'${gcc_version}/include/c++ fi glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)' glibcpp_toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)' - changequote([,])dnl -fi - -# Default case for install directory for include files. -if test $version_specific_libs = no && - test $gxx_include_dir = no; then - gxx_include_dir='$(prefix)'/include/g++-${libstdcxx_interface} fi # Calculate glibcpp_toolexecdir, glibcpp_toolexeclibdir @@ -2024,6 +2024,14 @@ AC_DEFUN(GLIBCPP_CONFIGURE_TESTSUITE, [ # Look for setenv, so that extended locale tests can be performed. GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv) + + # Export file names for ABI checking. + baseline_file="${glibcpp_srcdir}/config/abi/${abi_baseline_triplet}/baseline_symbols.txt" + AC_SUBST(baseline_file) + + # Don't do ABI checking unless native. + AM_CONDITIONAL(GLIBCPP_BUILD_ABI_CHECK, + test x"$build" = x"$host" && test -z "$with_cross_host") ]) @@ -2120,7 +2128,7 @@ enable_symvers=GLIBCPP_ENABLE_SYMVERS_DEFAULT)dnl # If we never went through the GLIBCPP_CHECK_LINKER_FEATURES macro, then we # don't know enough about $LD to do tricks... if test x$enable_shared = xno || - test x$LD = x || + test "x$LD" = x || test x$glibcpp_gnu_ld_version = x; then enable_symvers=no fi |