Commit 793e9558 by Per Bothner Committed by Per Bothner

cppdefault.c (cpp_include_defaults): Also search PREFIX_INCLUDE_DIR.


	* cppdefault.c (cpp_include_defaults):  Also search PREFIX_INCLUDE_DIR.
	* Makefile.in (includedir):  Rename to local_includedir.
	(includedir):  Define as $(prefix)/include.
	* config.in (PREFIX_INCLUDE_DIR):  New variable.
	* configure.in (PREFIX_INCLUDE_DIR):  Test for new variable.

From-SVN: r45884
parent d15a5c7c
2001-09-29 Per Bothner <per@bothner.com>
* cppdefault.c (cpp_include_defaults): Also search PREFIX_INCLUDE_DIR.
* Makefile.in (includedir): Rename to local_includedir.
(includedir): Define as $(prefix)/include.
* config.in (PREFIX_INCLUDE_DIR): New variable.
* configure.in (PREFIX_INCLUDE_DIR): Test for new variable.
2001-09-29 Bernd Schmidt <bernds@redhat.com> 2001-09-29 Bernd Schmidt <bernds@redhat.com>
* config/i386/i386.c (init_mmx_sse_builtins): Fix type of storelps and * config/i386/i386.c (init_mmx_sse_builtins): Fix type of storelps and
......
...@@ -306,7 +306,8 @@ build_tooldir = $(exec_prefix)/$(target_alias) ...@@ -306,7 +306,8 @@ build_tooldir = $(exec_prefix)/$(target_alias)
# Directory in which the compiler finds target-independent g++ includes. # Directory in which the compiler finds target-independent g++ includes.
gcc_gxx_include_dir = @gcc_gxx_include_dir@ gcc_gxx_include_dir = @gcc_gxx_include_dir@
# Directory to search for site-specific includes. # Directory to search for site-specific includes.
includedir = $(local_prefix)/include local_includedir = $(local_prefix)/include
includedir = $(prefix)/include
# where the info files go # where the info files go
infodir = @infodir@ infodir = @infodir@
# Where cpp should go besides $prefix/bin if necessary # Where cpp should go besides $prefix/bin if necessary
...@@ -1983,7 +1984,7 @@ PREPROCESSOR_DEFINES = \ ...@@ -1983,7 +1984,7 @@ PREPROCESSOR_DEFINES = \
-DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \ -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
-DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_alias)\" \ -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_alias)\" \
-DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \ -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
-DLOCAL_INCLUDE_DIR=\"$(includedir)\" \ -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
-DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \ -DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" -DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\"
......
...@@ -509,6 +509,8 @@ ...@@ -509,6 +509,8 @@
/* Define 0/1 to force the choice for exception handling model. */ /* Define 0/1 to force the choice for exception handling model. */
#undef CONFIG_SJLJ_EXCEPTIONS #undef CONFIG_SJLJ_EXCEPTIONS
/* Define if cpp should also search $prefix/include. */
#undef PREFIX_INCLUDE_DIR
/* Bison unconditionally undefines `const' if neither `__STDC__' nor /* Bison unconditionally undefines `const' if neither `__STDC__' nor
__cplusplus are defined. That's a problem since we use `const' in __cplusplus are defined. That's a problem since we use `const' in
......
...@@ -2057,7 +2057,7 @@ EOF ...@@ -2057,7 +2057,7 @@ EOF
fi fi
# Find some useful tools # Find some useful tools
for ac_prog in mawk gawk nawk awk for ac_prog in gawk mawk nawk awk
do do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2 set dummy $ac_prog; ac_word=$2
...@@ -7426,6 +7426,13 @@ EOF ...@@ -7426,6 +7426,13 @@ EOF
fi fi
echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6 echo "$ac_t""$gcc_cv_as_dwarf2_debug_line" 1>&6
if test "$prefix" != "/usr" && test "$prefix" != "/usr/local" ; then
cat >> confdefs.h <<EOF
#define PREFIX_INCLUDE_DIR "$prefix/include"
EOF
fi
# Figure out what language subdirectories are present. # Figure out what language subdirectories are present.
# Look if the user specified --enable-languages="..."; if not, use # Look if the user specified --enable-languages="..."; if not, use
# the environment variable $LANGUAGES if defined. $LANGUAGES might # the environment variable $LANGUAGES if defined. $LANGUAGES might
...@@ -7556,7 +7563,7 @@ fi ...@@ -7556,7 +7563,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
echo "configure:7560: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo "configure:7567: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode" enableval="$enable_maintainer_mode"
......
...@@ -1696,6 +1696,10 @@ if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then ...@@ -1696,6 +1696,10 @@ if test x"$gcc_cv_as_dwarf2_debug_line" = xyes; then
fi fi
AC_MSG_RESULT($gcc_cv_as_dwarf2_debug_line) AC_MSG_RESULT($gcc_cv_as_dwarf2_debug_line)
if test "$prefix" != "/usr" && test "$prefix" != "/usr/local" ; then
AC_DEFINE_UNQUOTED(PREFIX_INCLUDE_DIR, "$prefix/include")
fi
# Figure out what language subdirectories are present. # Figure out what language subdirectories are present.
# Look if the user specified --enable-languages="..."; if not, use # Look if the user specified --enable-languages="..."; if not, use
# the environment variable $LANGUAGES if defined. $LANGUAGES might # the environment variable $LANGUAGES if defined. $LANGUAGES might
......
...@@ -47,6 +47,9 @@ const struct default_include cpp_include_defaults[] ...@@ -47,6 +47,9 @@ const struct default_include cpp_include_defaults[]
/* /usr/local/include comes before the fixincluded header files. */ /* /usr/local/include comes before the fixincluded header files. */
{ LOCAL_INCLUDE_DIR, 0, 0, 1 }, { LOCAL_INCLUDE_DIR, 0, 0, 1 },
#endif #endif
#ifdef PREFIX_INCLUDE_DIR
{ PREFIX_INCLUDE_DIR, 0, 0, 1 },
#endif
#ifdef GCC_INCLUDE_DIR #ifdef GCC_INCLUDE_DIR
/* This is the dir for fixincludes and for gcc's private headers. */ /* This is the dir for fixincludes and for gcc's private headers. */
{ GCC_INCLUDE_DIR, "GCC", 0, 0 }, { GCC_INCLUDE_DIR, "GCC", 0, 0 },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment