diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-17 23:31:25 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-10-17 23:31:25 +0000 |
commit | 638454a19c1c08f01c10517bc72a114250fc4f33 (patch) | |
tree | 2942945008e4ebb8a8f44fa3c239831820413a51 /gcc/configure.ac | |
parent | d510308a778ea52e51e11faa41d40b58768b115f (diff) | |
download | gcc-638454a19c1c08f01c10517bc72a114250fc4f33.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180114 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r-- | gcc/configure.ac | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac index 353746f4a81..d19ca077b2e 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -725,6 +725,19 @@ AC_ARG_ENABLE(shared, ], [enable_shared=yes]) AC_SUBST(enable_shared) +AC_ARG_WITH([native-system-header-dir], + [ --with-native-system-header-dir=dir + use dir as the directory to look for standard + system header files in. Defaults to /usr/include.], +[ + case ${with_native_system_header_dir} in + yes|no) AC_MSG_ERROR([bad value ${withval} given for --with-native-system-header-dir]) ;; + /* | [[A-Za-z]]:[[\\/]]*) ;; + *) AC_MSG_ERROR([--with-native-system-header-dir argument ${withval} must be an absolute directory]) ;; + esac + configured_native_system_header_dir="${withval}" +], [configured_native_system_header_dir=]) + AC_ARG_WITH(build-sysroot, [AS_HELP_STRING([--with-build-sysroot=sysroot], [use sysroot as the system root during the build])], @@ -1331,6 +1344,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" +AC_SUBST(NATIVE_SYSTEM_HEADER_DIR) + case ${host} in powerpc*-*-darwin*) AC_CACHE_CHECK([whether mcontext_t fields have underscores], @@ -4517,14 +4536,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. |