summaryrefslogtreecommitdiff
path: root/gcc/configure.in
diff options
context:
space:
mode:
authordrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-13 17:23:56 +0000
committerdrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>2003-02-13 17:23:56 +0000
commit17acc97af91fbd116659301b0b7d4965ecc1631d (patch)
tree3d7379a3ec405d4e0f84ede65961991b09195727 /gcc/configure.in
parentcc7204981b1375f62c9afc89e983f0e59c41a28c (diff)
downloadgcc-17acc97af91fbd116659301b0b7d4965ecc1631d.tar.gz
* Makefile.in (PREPROCESSOR_DEFINES): Add
@TARGET_SYSTEM_ROOT_DEFINE@. * configure.in (PREFIX_INCLUDE_DIR): Don't define if $with_sysroot is specified or if building a cross compiler. (TARGET_SYSTEM_ROOT_DEFINE): Add TARGET_SYSTEM_ROOT_RELOCATABLE if the sysroot is under $exec_prefix. * configure: Regenerated. * cppdefault.h: Use native include paths if TARGET_SYSTEM_ROOT is defined. (struct default_include): Add add_sysroot field. (cpp_SYSROOT): Declare. * cppdefault.c (cpp_include_defaults): Fill in add_sysroot field. (cpp_SYSROOT): New variable. * cppinit.c (cpp_create_reader): Initialize CPP_OPTION (pfile, sysroot). (init_standard_includes): Handle add_sysroot. Do not add unrelocated copies of relocated directories. (COMMAND_LINE_OPTIONS): Add -isysroot. (cpp_handle_option): Handle -isysroot. * cpplib.h (struct cpp_options): Add sysroot member. * gcc.c (The Specs Language): Update description of %I. (target_system_root_changed): New variable. (process_command): Conditionalize make_relative_prefix call on !VMS and TARGET_SYSTEM_ROOT_RELOCATABLE. Set target_system_root_changed. (do_spec_1): Add -isysroot to %I. * doc/invoke.texi (Spec Files): Update description of %I. * doc/install.texi (--with-sysroot): Update comment about relocation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62853 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.in')
-rw-r--r--gcc/configure.in19
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/configure.in b/gcc/configure.in
index 7376eee3448..f888280a42a 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -496,6 +496,22 @@ AC_ARG_WITH(sysroot,
TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"'
CROSS_SYSTEM_HEADER_DIR='$(TARGET_SYSTEM_ROOT)$(NATIVE_SYSTEM_HEADER_DIR)'
+
+ if test "x$exec_prefix" = xNONE; then
+ if test "x$prefix" = xNONE; then
+ test_prefix=/usr/local
+ else
+ test_prefix=$prefix
+ fi
+ else
+ test_prefix=$exec_prefix
+ fi
+ case ${TARGET_SYSTEM_ROOT} in
+ ${test_prefix}*)
+ t="$TARGET_SYSTEM_ROOT_DEFINE -DTARGET_SYSTEM_ROOT_RELOCATABLE"
+ TARGET_SYSTEM_ROOT_DEFINE="$t"
+ ;;
+ esac
], [
TARGET_SYSTEM_ROOT=
TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=0'
@@ -2410,7 +2426,8 @@ case "$target" in
;;
esac
-if test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
+if test x$with_sysroot = x && x$host = x$target \
+ && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ; then
AC_DEFINE_UNQUOTED(PREFIX_INCLUDE_DIR, "$prefix/include")
fi