summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Makeconfig3
-rw-r--r--config.make.in1
-rwxr-xr-xconfigure11
-rw-r--r--configure.in8
5 files changed, 26 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a2d062ebe4..fe454f1d2b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2005-12-27  Roland McGrath  <roland@redhat.com>
 
+	* config.make.in (c++-sysincludes): New substituted variable.
+	* configure.in (CXX_SYSINCLUDES): New substituted variable.
+	* configure: Regenerated.
+	* Makeconfig (CXXFLAGS): Prepend $(c++-sysincludes) here.
+
 	* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
 	(PTR_MANGLE): Fix cast.
 
diff --git a/Makeconfig b/Makeconfig
index f32a19eab6..67f85c0905 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -651,7 +651,8 @@ override CFLAGS	= -std=gnu99 \
 		  $(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \
 		  $(sysdep-CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) \
 		  $(CFLAGS-$(@F))
-override CXXFLAGS = $(filter-out %frame-pointer,$(+cflags)) $(sysdep-CFLAGS) \
+override CXXFLAGS = $(c++-sysincludes) \
+		    $(filter-out %frame-pointer,$(+cflags)) $(sysdep-CFLAGS) \
 		    $(CFLAGS-$(suffix $@)) $(CFLAGS-$(<F)) $(CFLAGS-$(@F))
 
 # If everything is compiled with -fPIC (implicitly) we must tell this by
diff --git a/config.make.in b/config.make.in
index 3af1e396e9..871c5d60de 100644
--- a/config.make.in
+++ b/config.make.in
@@ -34,6 +34,7 @@ with-cpu = @submachine@
 
 defines = @DEFINES@
 sysincludes = @SYSINCLUDES@
+c++-sysincludes = @CXX_SYSINCLUDES@
 all-warnings = @all_warnings@
 
 elf = @elf@
diff --git a/configure b/configure
index e8e8b363f1..d46bb19fb0 100755
--- a/configure
+++ b/configure
@@ -313,7 +313,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons base_machine submachine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie fno_unit_at_a_time libc_cv_ssp libc_cv_have_initfini no_whole_archive exceptions LIBGD have_libaudit have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons base_machine submachine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES CXX_SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie fno_unit_at_a_time libc_cv_ssp libc_cv_have_initfini no_whole_archive exceptions LIBGD have_libaudit have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -4487,9 +4487,17 @@ if test -n "$sysheaders"; then
   ccheaders=`$CC -print-file-name=include`
   SYSINCLUDES="-nostdinc -isystem $ccheaders \
 -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
+  if test -n "$CXX"; then
+    cxxversion=`$CXX -dumpversion 2>&5` &&
+    cxxmachine=`$CXX -dumpmachine 2>&5` &&
+    cxxheaders=`$CXX -print-file-name=../../../../include/c++/`"$cxxversion" &&
+    CXX_SYSINCLUDES="-isystem $cxxheaders \
+-isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward"
+  fi
 fi
 
 
+
 # check if ranlib is necessary
 echo "$as_me:$LINENO: checking whether ranlib is necessary" >&5
 echo $ECHO_N "checking whether ranlib is necessary... $ECHO_C" >&6
@@ -8401,6 +8409,7 @@ s,@MAKEINFO@,$MAKEINFO,;t t
 s,@SED@,$SED,;t t
 s,@AUTOCONF@,$AUTOCONF,;t t
 s,@SYSINCLUDES@,$SYSINCLUDES,;t t
+s,@CXX_SYSINCLUDES@,$CXX_SYSINCLUDES,;t t
 s,@libc_cv_gcc_static_libgcc@,$libc_cv_gcc_static_libgcc,;t t
 s,@BASH@,$BASH,;t t
 s,@libc_cv_have_bash2@,$libc_cv_have_bash2,;t t
diff --git a/configure.in b/configure.in
index ba7ca30b2f..4ae30ae2c9 100644
--- a/configure.in
+++ b/configure.in
@@ -838,8 +838,16 @@ if test -n "$sysheaders"; then
   ccheaders=`$CC -print-file-name=include`
   SYSINCLUDES="-nostdinc -isystem $ccheaders \
 -isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
+  if test -n "$CXX"; then
+    cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` &&
+    cxxmachine=`$CXX -dumpmachine 2>&AS_MESSAGE_LOG_FD` &&
+    cxxheaders=`$CXX -print-file-name=../../../../include/c++/`"$cxxversion" &&
+    CXX_SYSINCLUDES="-isystem $cxxheaders \
+-isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward"
+  fi
 fi
 AC_SUBST(SYSINCLUDES)
+AC_SUBST(CXX_SYSINCLUDES)
 
 # check if ranlib is necessary
 AC_CACHE_CHECK(whether ranlib is necessary, libc_cv_ranlib_necessary, [dnl