diff options
author | Simon Baldwin <simonb@google.com> | 2011-10-17 23:31:25 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-10-17 23:31:25 +0000 |
commit | 08b2bad275f4cb665ea7659f993735b39777c749 (patch) | |
tree | 2942945008e4ebb8a8f44fa3c239831820413a51 /gcc/configure | |
parent | d1947945f50156a3d7304fedba9b90c6edfb1ff0 (diff) | |
download | gcc-08b2bad275f4cb665ea7659f993735b39777c749.zip gcc-08b2bad275f4cb665ea7659f993735b39777c749.tar.gz gcc-08b2bad275f4cb665ea7659f993735b39777c749.tar.bz2 |
configure.ac: Add --with-native-system-header-dir.
* configure.ac: Add --with-native-system-header-dir. Set and
substitute NATIVE_SYSTEM_HEADER_DIR. Use native_system_header
when setting target_header_dir.
* config.gcc: Always set native_system_header_dir.
(*-*-gnu*): Set native_system_header_dir. Don't use t-gnu.
(i[34567]86-pc-msdosdjgpp*): Set native_system_header_dir. Don't
use i386/t-djgpp.
(i[34567]86-*-mingw* | x86_64-*-mingw*): Set
native_system_header_dir.
(spu-*-elf*): Set native_system_header_dir.
* Makefile.in (NATIVE_SYSTEM_HEADER_DIR): Set to
@NATIVE_SYSTEM_HEADER_DIR@.
(PREPROCESSOR_DEFINES): Define NATIVE_SYSTEM_HEADER_DIR.
* cppdefault.c (STANDARD_INCLUDE_DIR): Don't define.
(NATIVE_SYSTEM_HEADER_COMPONENT): Rename from
STANDARD_INCLUDE_COMPONENT.
(cpp_include_defaults): Don't use SYSTEM_INCLUDE_DIR. Rename
STANDARD_INCLUDE_DIR to NATIVE_SYSTEM_HEADER_DIR.
* system.h: Poison SYSTEM_INCLUDE_DIR, STANDARD_INCLUDE_DIR, and
STANDARD_INCLUDE_COMPONENT.
* config/i386/t-mingw32 (NATIVE_SYSTEM_HEADER_DIR): Remove.
* config/i386/t-mingw-w32: Likewise.
* config/i386/t-mingw-w64: Likewise.
* config/spu/t-spu-elf: Likewise.
* config/i386/t-djgpp: Remove.
* config/t-gnu: Remove.
* config/i386/mingw32.h (STANDARD_INCLUDE_DIR): Don't define.
(NATIVE_SYSTEM_HEADER_COMPONENT): Rename from
STANDARD_INCLUDE_COMPONENT.
* config/i386/djgpp.h (STANDARD_INCLUDE_DIR): Don't define.
* config/spu/spu-elf.h: Likewise.
* config/vms/xm-vms.h: Likewise.
* config/gnu.h: Likewise.
* config/openbsd.h (INCLUDE_DEFAULTS): Change STANDARD_INCLUDE_DIR
and STANDARD_INCLUDE_COMPONENT to NATIVE_SYSTEM_HEADER_DIR and
NATIVE_SYSTME_HEADER_COMPONENT.
* doc/install.texi (Configuration): Document
--with-native-system-header-dir. Mention it in the documentation
for --with-sysroot and --with-build-sysroot.
* doc/tm.texi.in (Driver): Don't document SYSTEM_INCLUDE_DIR or
STANDARD_INCLUDE_DIR. Rename STANDARD_INCLUDE_COMPONENT to
NATIVE_SYSTEM_HEADER_COMPONENT. Rename uses of
STANDARD_INCLUDE_DIR to NATIVE_SYSTEM_HEADER_DIR.
* doc/fragments.texi (Target Fragment): Don't document
NATIVE_SYSTEM_HEADER_DIR.
* configure, doc/tm.texi: Rebuild.
Co-Authored-By: Ian Lance Taylor <iant@google.com>
From-SVN: r180114
Diffstat (limited to 'gcc/configure')
-rwxr-xr-x | gcc/configure | 39 |
1 files changed, 33 insertions, 6 deletions
diff --git a/gcc/configure b/gcc/configure index 7bd1d5db..32542dd 100755 --- a/gcc/configure +++ b/gcc/configure @@ -729,6 +729,7 @@ USE_NLS extra_opt_files extra_modes_file gthread_flags +NATIVE_SYSTEM_HEADER_DIR objext manext LIBICONV_DEP @@ -886,6 +887,7 @@ enable_tls enable_objc_gc with_dwarf2 enable_shared +with_native_system_header_dir with_build_sysroot with_sysroot with_specs @@ -1651,6 +1653,9 @@ Optional Packages: --with-as arrange to use the specified as (full pathname) --with-stabs arrange to use stabs instead of host debug format --with-dwarf2 force the default debug format to be DWARF 2 + --with-native-system-header-dir=dir + use dir as the directory to look for standard + system header files in. Defaults to /usr/include. --with-build-sysroot=sysroot use sysroot as the system root during the build --with-sysroot[=DIR] search for usr/lib, usr/include, et al, within DIR @@ -7152,6 +7157,22 @@ fi +# Check whether --with-native-system-header-dir was given. +if test "${with_native_system_header_dir+set}" = set; then : + withval=$with_native_system_header_dir; + case ${with_native_system_header_dir} in + yes|no) as_fn_error "bad value ${withval} given for --with-native-system-header-dir" "$LINENO" 5 ;; + /* | [A-Za-z]:[\\/]*) ;; + *) as_fn_error "--with-native-system-header-dir argument ${withval} must be an absolute directory" "$LINENO" 5 ;; + esac + configured_native_system_header_dir="${withval}" + +else + configured_native_system_header_dir= +fi + + + # Check whether --with-build-sysroot was given. if test "${with_build_sysroot+set}" = set; then : withval=$with_build_sysroot; if test x"$withval" != x ; then @@ -11145,6 +11166,12 @@ if test "$host_xm_file" != "$build_xm_file"; then fi fi +if test -n "$configured_native_system_header_dir"; then + native_system_header_dir=$configured_native_system_header_dir +fi +NATIVE_SYSTEM_HEADER_DIR="$native_system_header_dir" + + case ${host} in powerpc*-*-darwin*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mcontext_t fields have underscores" >&5 @@ -17921,7 +17948,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 17924 "configure" +#line 17951 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18027,7 +18054,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18030 "configure" +#line 18057 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -26409,14 +26436,14 @@ if test x$host != x$target || test "x$TARGET_SYSTEM_ROOT" != x; then elif test "x$with_sysroot" = x; then target_header_dir="${exec_prefix}/${target_noncanonical}/sys-include" elif test "x$with_build_sysroot" != "x"; then - target_header_dir="${with_build_sysroot}/usr/include" + target_header_dir="${with_build_sysroot}${native_system_header_dir}" elif test "x$with_sysroot" = xyes; then - target_header_dir="${exec_prefix}/${target_noncanonical}/sys-root/usr/include" + target_header_dir="${exec_prefix}/${target_noncanonical}/sys-root${native_system_header_dir}" else - target_header_dir="${with_sysroot}/usr/include" + target_header_dir="${with_sysroot}${native_system_header_dir}" fi else - target_header_dir=/usr/include + target_header_dir=${native_system_header_dir} fi # Test for stack protector support in target C library. |