*.h: Move here from config/os/bsd/bits.
[gcc.git] / libstdc++-v3 / configure.target
1 # configure.target
2
3 # This shell script handles all target based configuration for libstdc++.
4 # It sets various shell variables based on the the target and the
5 # configuration options. You can modify this shell script without
6 # needing to rerun autoconf.
7
8 # This shell script should be invoked as
9 # . configure.target
10 # If it encounters an error, it will exit with a message.
11
12 # It uses the following shell variables:
13 # target The configuration target
14 # target_cpu The configuration target CPU
15 # target_os The configuration target OS
16 # target_optspace --enable-target-optspace ("yes", "no", "")
17
18 # It possibly modifies the following shell variables:
19 # glibcpp_cflags Special CFLAGS to use when building
20 # glibcpp_cxxflags Special CXXFLAGS to use when building
21 # cpu_include_dir CPU-specific include directory, relative to srcdir
22 # os_include_dir OS-specific include directory, relative to srcdir
23 # The first two are set in configure.host and modified here.
24
25
26 # These are "local" and should be set in the switch statements below. They
27 # will be appended to their real conterparts once the dust settles.
28 l_glibcpp_cflags=
29 l_glibcpp_cxxflags=
30
31
32 # Set any CPU dependent compiler flags.
33 # THIS TABLE IS SORTED. KEEP IT THAT WAY.
34
35 case "${target_cpu}" in
36 alpha*)
37 cpu_include_dir="config/cpu/alpha"
38 ;;
39 arm*)
40 cpu_include_dir="config/cpu/arm"
41 ;;
42 ia64)
43 cpu_include_dir="config/cpu/ia64"
44 ;;
45 i386)
46 cpu_include_dir="config/cpu/i386"
47 ;;
48 i486 | i586 | i686 | i786)
49 cpu_include_dir="config/cpu/i486"
50 ;;
51 powerpc | rs6000)
52 cpu_include_dir="config/cpu/powerpc"
53 ;;
54 sparc64 | ultrasparc)
55 cpu_include_dir="config/cpu/sparc/sparc64"
56 ;;
57 sparc*)
58 cpu_include_dir="config/cpu/sparc/sparc32"
59 ;;
60 *)
61 cpu_include_dir="config/cpu/generic"
62 ;;
63 esac
64
65
66 # Set any OS dependent compiler flags.
67 # THIS TABLE IS SORTED. KEEP IT THAT WAY.
68
69 case "${target_os}" in
70 aix4.[[3456789]]* | aix[[56789]]*)
71 os_include_dir="config/os/aix"
72 case "$CXX" in
73 *pthread*)
74 enable_threads='posix'
75 ;;
76 *)
77 enable_threads='no'
78 ;;
79 esac
80 ;;
81 aix*)
82 os_include_dir="config/os/aix"
83 ;;
84 bsd* | freebsd* )
85 os_include_dir="config/os/freebsd"
86 ;;
87 cygwin*)
88 os_include_dir="config/os/newlib"
89 ;;
90 linux*)
91 os_include_dir="config/os/gnu-linux"
92 ;;
93 irix*)
94 os_include_dir="config/os/irix"
95 ;;
96 netbsd*)
97 os_include_dir="config/os/netbsd"
98 ;;
99 solaris2.5*)
100 os_include_dir="config/os/solaris/solaris2.5"
101 ;;
102 solaris2.6*)
103 os_include_dir="config/os/solaris/solaris2.6"
104 ;;
105 solaris2.7* | solaris2.8*)
106 os_include_dir="config/os/solaris/solaris2.7"
107 ;;
108 *)
109 os_include_dir="config/os/generic"
110 ;;
111 esac
112
113
114 # Set any flags dependant on the full target triplet.
115 # THIS TABLE IS SORTED. KEEP IT THAT WAY.
116
117 case "${target}" in
118 arm*-*-aout | arm*-*-elf)
119 # Assume newlib
120 os_include_dir=config/os/newlib
121 ATOMICITYH=$cpu_include_dir
122 ;;
123 *-*-aix*)
124 ATOMICITYH=$os_include_dir
125 ;;
126 *-*-freebsd*)
127 ATOMICITYH=$cpu_include_dir
128 ;;
129 *-*-irix*)
130 ATOMICITYH=$os_include_dir
131 ;;
132 *-*-linux*)
133 ATOMICITYH=$cpu_include_dir
134 ;;
135 *-*-netbsd*)
136 ATOMICITYH=$cpu_include_dir
137 ;;
138 sparc*-*-*)
139 ATOMICITYH=$cpu_include_dir
140 ;;
141 *)
142 ATOMICITYH="config/cpu/generic"
143 ;;
144 esac
145
146
147 # Okay, folks, show's over. Move along, move along.
148
149 glibcpp_cflags="${glibcpp_cflags} ${libgcj_flags} ${l_glibcpp_cflags}"
150 glibcpp_cxxflags="${glibcpp_cxxflags} ${libgcj_flags} ${l_glibcpp_cxxflags}"
151
152