]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/cppdefault.c
gcc_release (announce_snapshot): Use changedir instead of plain cd.
[thirdparty/gcc.git] / gcc / cppdefault.c
CommitLineData
60893f43
ZW
1/* CPP Library.
2 Copyright (C) 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
5793b276 3 1999, 2000, 2003 Free Software Foundation, Inc.
60893f43
ZW
4 Contributed by Per Bothner, 1994-95.
5 Based on CCCP program by Paul Rubin, June 1986
6 Adapted to ANSI C, Richard Stallman, Jan 1987
7
8This program is free software; you can redistribute it and/or modify it
9under the terms of the GNU General Public License as published by the
10Free Software Foundation; either version 2, or (at your option) any
11later version.
12
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with this program; if not, write to the Free Software
20Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21
60893f43
ZW
22#include "config.h"
23#include "system.h"
4977bab6
ZW
24#include "coretypes.h"
25#include "tm.h"
60893f43
ZW
26#include "cppdefault.h"
27
5793b276
NB
28#ifndef STANDARD_INCLUDE_DIR
29#define STANDARD_INCLUDE_DIR "/usr/include"
30#endif
31
32#ifndef STANDARD_INCLUDE_COMPONENT
33#define STANDARD_INCLUDE_COMPONENT 0
34#endif
35
36#if defined (CROSS_COMPILE) && !defined (TARGET_SYSTEM_ROOT)
37# undef LOCAL_INCLUDE_DIR
38# undef SYSTEM_INCLUDE_DIR
39# undef STANDARD_INCLUDE_DIR
40#else
41# undef CROSS_INCLUDE_DIR
42#endif
43
60893f43
ZW
44const struct default_include cpp_include_defaults[]
45#ifdef INCLUDE_DEFAULTS
46= INCLUDE_DEFAULTS;
47#else
48= {
49#ifdef GPLUSPLUS_INCLUDE_DIR
e2187d3b 50 /* Pick up GNU C++ generic include files. */
047d636f 51 { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 0 },
60893f43 52#endif
e2187d3b
BK
53#ifdef GPLUSPLUS_TOOL_INCLUDE_DIR
54 /* Pick up GNU C++ target-dependent include files. */
047d636f 55 { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, 0 },
e2187d3b 56#endif
98c2359b
BK
57#ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
58 /* Pick up GNU C++ backward and deprecated include files. */
047d636f 59 { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 0 },
98c2359b 60#endif
60893f43
ZW
61#ifdef LOCAL_INCLUDE_DIR
62 /* /usr/local/include comes before the fixincluded header files. */
047d636f 63 { LOCAL_INCLUDE_DIR, 0, 0, 1, 1 },
60893f43 64#endif
793e9558 65#ifdef PREFIX_INCLUDE_DIR
047d636f 66 { PREFIX_INCLUDE_DIR, 0, 0, 1, 0 },
793e9558 67#endif
60893f43
ZW
68#ifdef GCC_INCLUDE_DIR
69 /* This is the dir for fixincludes and for gcc's private headers. */
047d636f 70 { GCC_INCLUDE_DIR, "GCC", 0, 0, 0 },
60893f43
ZW
71#endif
72#ifdef CROSS_INCLUDE_DIR
73 /* One place the target system's headers might be. */
047d636f 74 { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0 },
60893f43
ZW
75#endif
76#ifdef TOOL_INCLUDE_DIR
77 /* Another place the target system's headers might be. */
047d636f 78 { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0 },
60893f43
ZW
79#endif
80#ifdef SYSTEM_INCLUDE_DIR
81 /* Some systems have an extra dir of include files. */
047d636f 82 { SYSTEM_INCLUDE_DIR, 0, 0, 0, 1 },
60893f43
ZW
83#endif
84#ifdef STANDARD_INCLUDE_DIR
85 /* /usr/include comes dead last. */
047d636f 86 { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1 },
60893f43 87#endif
047d636f 88 { 0, 0, 0, 0, 0 }
60893f43
ZW
89 };
90#endif /* no INCLUDE_DEFAULTS */
91
92#ifdef GCC_INCLUDE_DIR
93const char cpp_GCC_INCLUDE_DIR[] = GCC_INCLUDE_DIR;
94const size_t cpp_GCC_INCLUDE_DIR_len = sizeof GCC_INCLUDE_DIR - 8;
95#else
96const char cpp_GCC_INCLUDE_DIR[] = "";
97const size_t cpp_GCC_INCLUDE_DIR_len = 0;
98#endif
047d636f
DJ
99
100#ifdef TARGET_SYSTEM_ROOT
101const char *cpp_SYSROOT = TARGET_SYSTEM_ROOT;
102#else
103const char *cpp_SYSROOT = "";
104#endif