]>
Commit | Line | Data |
---|---|---|
03261851 | 1 | dnl Process this file with autoconf to produce a configure script. |
4e71dc1e JJ |
2 | AC_PREREQ(2.59) |
3 | AC_INIT([libgloss],[LIBGLOSS_VERSION]) | |
4 | AC_CONFIG_SRCDIR([libnosys]) | |
03261851 RK |
5 | |
6 | if test "${enable_shared}" = "yes" ; then | |
7 | echo "Shared libraries not supported for cross compiling, ignored" | |
8 | fi | |
9 | ||
10 | if test "${srcdir}" = "." ; then | |
11 | if test "${with_target_subdir}" != "." ; then | |
12 | libgloss_topdir="${srcdir}/${with_multisrctop}../.." | |
13 | else | |
14 | libgloss_topdir="${srcdir}/${with_multisrctop}.." | |
15 | fi | |
16 | else | |
17 | libgloss_topdir="${srcdir}/.." | |
18 | fi | |
19 | AC_CONFIG_AUX_DIR($libgloss_topdir) | |
20 | ||
21 | AC_PROG_INSTALL | |
22 | ||
23 | AC_CANONICAL_SYSTEM | |
4e71dc1e | 24 | AM_INIT_AUTOMAKE([cygnus no-define 1.9.5]) |
03261851 RK |
25 | |
26 | if test -z "${with_multisubdir}" ; then | |
9708e8cd | 27 | AC_CONFIG_SUBDIRS([doc]) |
03261851 RK |
28 | fi |
29 | ||
9708e8cd JJ |
30 | dnl indicates whether to run configure within the testsuite subdirectory |
31 | config_testsuite=true | |
32 | ||
33 | dnl indicates whether to run configure within the libnosys subdirectory | |
34 | config_libnosys=true | |
4e71dc1e | 35 | |
03261851 | 36 | case "${target}" in |
cdf81c0c JJ |
37 | aarch64*-*-*) |
38 | AC_CONFIG_SUBDIRS(aarch64) | |
39 | config_testsuite=true | |
40 | ;; | |
acdfcb0a AK |
41 | arc*-*-*) |
42 | AC_CONFIG_SUBDIRS(arc) | |
43 | ;; | |
b07cfbff JJ |
44 | epiphany-*-*) |
45 | AC_CONFIG_SUBDIRS(epiphany) | |
46 | config_testsuite=true | |
47 | ;; | |
4e71dc1e | 48 | i[[3456]]86-*-elf* | i[[3456]]86-*-coff*) |
9708e8cd | 49 | AC_CONFIG_SUBDIRS([i386]) |
03261851 RK |
50 | ;; |
51 | m32r-*-*) | |
9708e8cd | 52 | AC_CONFIG_SUBDIRS([m32r]) |
03261851 | 53 | ;; |
4e71dc1e | 54 | m68hc11-*-* | m6811-*-* | m68hc12-*-* | m6812-*-*) |
9708e8cd | 55 | AC_CONFIG_SUBDIRS([m68hc11]) |
63a93e9d | 56 | ;; |
bdf683b1 JJ |
57 | nds32*-*-*) |
58 | AC_CONFIG_SUBDIRS([nds32]) | |
59 | ;; | |
1b69cb3a | 60 | fido-*-* | m68*-*-*) |
9708e8cd | 61 | AC_CONFIG_SUBDIRS([m68k]) |
03261851 RK |
62 | ;; |
63 | hppa*-*-pro*) | |
9708e8cd | 64 | AC_CONFIG_SUBDIRS([pa]) |
03261851 RK |
65 | ;; |
66 | i960-*-coff) | |
9708e8cd | 67 | AC_CONFIG_SUBDIRS([i960]) |
03261851 | 68 | ;; |
8e0346d1 JJ |
69 | sparc-*leon*-elf* | sparc-*leon*-none*) |
70 | AC_CONFIG_SUBDIRS([sparc_leon]) | |
71 | ;; | |
4e71dc1e | 72 | sparclet-*-aout* | sparc-*-elf* | sparc64-*-elf* | sparc86x-*-* | sparclite-*-*) |
9708e8cd | 73 | AC_CONFIG_SUBDIRS([sparc]) |
03261851 | 74 | ;; |
2e398e84 | 75 | sh*-*-pe | mips*-*-pe | *arm*-wince-pe) |
9708e8cd | 76 | AC_CONFIG_SUBDIRS([wince]) |
03261851 RK |
77 | ;; |
78 | mips*-*-*) | |
9708e8cd | 79 | AC_CONFIG_SUBDIRS([mips]) |
03261851 RK |
80 | ;; |
81 | powerpc-*-*|powerpcle-*-*) | |
9708e8cd | 82 | AC_CONFIG_SUBDIRS([rs6000]) |
03261851 RK |
83 | ;; |
84 | mn10200-*-*) | |
9708e8cd | 85 | AC_CONFIG_SUBDIRS([mn10200]) |
03261851 RK |
86 | ;; |
87 | mn10300-*-*) | |
9708e8cd | 88 | AC_CONFIG_SUBDIRS([mn10300]) |
03261851 | 89 | ;; |
c0977673 | 90 | bfin-*-*) |
9708e8cd | 91 | AC_CONFIG_SUBDIRS([bfin]) |
c0977673 | 92 | ;; |
8ae0b989 JJ |
93 | cr16-*-*) |
94 | AC_CONFIG_SUBDIRS([cr16]) | |
95 | ;; | |
3a267038 | 96 | cris-*-* | crisv32-*-*) |
9708e8cd | 97 | AC_CONFIG_SUBDIRS([cris]) |
3a267038 | 98 | ;; |
49a8b8f0 | 99 | crx-*-*) |
9708e8cd | 100 | AC_CONFIG_SUBDIRS([crx]) |
49a8b8f0 | 101 | ;; |
03261851 | 102 | d30v-*-*) |
9708e8cd | 103 | AC_CONFIG_SUBDIRS([d30v]) |
03261851 RK |
104 | ;; |
105 | fr30-*-*) | |
9708e8cd | 106 | AC_CONFIG_SUBDIRS([fr30]) |
03261851 | 107 | ;; |
c2b0dec2 | 108 | frv*-*-*) |
9708e8cd | 109 | AC_CONFIG_SUBDIRS([frv]) |
fb921031 | 110 | ;; |
dc09f27a JJ |
111 | ft32*-*-*) |
112 | AC_CONFIG_SUBDIRS([ft32]) | |
113 | ;; | |
d78a82f9 | 114 | lm32*-*-*) |
9708e8cd | 115 | AC_CONFIG_SUBDIRS([lm32]) |
d78a82f9 | 116 | ;; |
03261851 | 117 | mcore-*-*) |
9708e8cd | 118 | AC_CONFIG_SUBDIRS([mcore]) |
03261851 | 119 | ;; |
1d94f731 | 120 | mep-*-*) |
9708e8cd | 121 | AC_CONFIG_SUBDIRS([mep]) |
1d94f731 | 122 | ;; |
bc6b90cc | 123 | moxie-*-*) |
9708e8cd | 124 | AC_CONFIG_SUBDIRS([moxie]) |
bc6b90cc | 125 | ;; |
6041792e | 126 | microblaze*-*-*) |
c38ed7c6 JJ |
127 | AC_CONFIG_SUBDIRS([microblaze]) |
128 | ;; | |
74ecef0d | 129 | mt-*-*) |
9708e8cd | 130 | AC_CONFIG_SUBDIRS([mt]) |
4e71dc1e | 131 | ;; |
c0c762e4 JJ |
132 | v850*-*-*) |
133 | AC_CONFIG_SUBDIRS([v850]) | |
134 | ;; | |
bf8f43ae EB |
135 | visium-*-*) |
136 | AC_CONFIG_SUBDIRS([visium]) | |
137 | config_testsuite=false | |
138 | ;; | |
e6291536 JJ |
139 | xc16x-*-*) |
140 | AC_CONFIG_SUBDIRS([xc16x]) | |
141 | ;; | |
f6eff1c0 | 142 | xstormy16-*-*) |
9708e8cd | 143 | AC_CONFIG_SUBDIRS([xstormy16]) |
f6eff1c0 | 144 | ;; |
a663cd89 | 145 | m32c-*-*) |
9708e8cd | 146 | AC_CONFIG_SUBDIRS([m32c]) |
a7364ade | 147 | ;; |
2f2a3042 DD |
148 | msp430*-*-elf) |
149 | AC_CONFIG_SUBDIRS([msp430]) | |
7d5b16ab | 150 | config_libnosys=false |
2f2a3042 | 151 | ;; |
d1fc7732 DD |
152 | rl78*-*-elf) |
153 | AC_CONFIG_SUBDIRS([rl78]) | |
154 | ;; | |
fd6942ab NC |
155 | rx*-*-elf) |
156 | AC_CONFIG_SUBDIRS([rx]) | |
157 | ;; | |
2e398e84 | 158 | arm*-*-elf | arm*-*-coff | arm*-*-*) |
9708e8cd | 159 | AC_CONFIG_SUBDIRS([arm]) |
62a25ce1 | 160 | ;; |
0486bb7f | 161 | spu-*-elf) |
9708e8cd | 162 | AC_CONFIG_SUBDIRS([spu]) |
c19f8a6a | 163 | config_testsuite=false |
9708e8cd | 164 | config_libnosys=false |
0486bb7f | 165 | ;; |
4606798e JJ |
166 | tic6x-*-*) |
167 | AC_CONFIG_SUBDIRS(tic6x) | |
168 | config_testsuite=false | |
169 | ;; | |
7be5e72f | 170 | iq2000-*-*) |
9708e8cd | 171 | AC_CONFIG_SUBDIRS([iq2000]) |
4e71dc1e | 172 | ;; |
d1219c0e JJ |
173 | or1k-*-* | or1knd-*-* ) |
174 | AC_CONFIG_SUBDIRS([or1k]) | |
175 | ;; | |
03261851 RK |
176 | esac |
177 | ||
9708e8cd JJ |
178 | dnl For now, don't bother configuring testsuite |
179 | dnl | |
180 | dnl if test "${config_testsuite}" = "true"; | |
181 | dnl then AC_CONFIG_SUBDIRS([testsuite]) | |
182 | dnl fi | |
183 | ||
184 | if test "${config_libnosys}" = "true"; then | |
185 | AC_CONFIG_SUBDIRS([libnosys]) | |
186 | fi | |
03261851 RK |
187 | |
188 | LIB_AC_PROG_CC | |
189 | AS=${AS-as} | |
190 | AC_SUBST(AS) | |
191 | AC_CHECK_PROG(AR, ar, ar, :) | |
192 | AR=${AR-ar} | |
193 | AC_SUBST(AR) | |
194 | LD=${LD-ld} | |
195 | AC_SUBST(LD) | |
196 | AC_PROG_RANLIB | |
4e71dc1e | 197 | LIB_AM_PROG_AS |
03261851 RK |
198 | |
199 | host_makefile_frag=${srcdir}/config/default.mh | |
200 | ||
201 | dnl We have to assign the same value to other variables because autoconf | |
202 | dnl doesn't provide a mechanism to substitute a replacement keyword with | |
203 | dnl arbitrary data or pathnames. | |
204 | dnl | |
205 | host_makefile_frag_path=$host_makefile_frag | |
206 | AC_SUBST(host_makefile_frag_path) | |
207 | AC_SUBST_FILE(host_makefile_frag) | |
208 | ||
00a4b31a JJ |
209 | if test "${multilib}" = "yes"; then |
210 | multilib_arg="--enable-multilib" | |
211 | else | |
212 | multilib_arg= | |
213 | fi | |
214 | ||
03261851 | 215 | # for now, only add multilibs for specific targets |
00a4b31a JJ |
216 | AC_CONFIG_FILES([Makefile], |
217 | [if test -n "$CONFIG_FILES"; then | |
218 | unset ac_file | |
219 | . ${libgloss_topdir}/config-ml.in | |
220 | fi], | |
03261851 RK |
221 | srcdir=${srcdir} |
222 | target=${target} | |
223 | with_multisubdir=${with_multisubdir} | |
224 | ac_configure_args="--enable-multilib ${ac_configure_args}" | |
225 | CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} | |
226 | libgloss_topdir=${libgloss_topdir} | |
00a4b31a JJ |
227 | CC="${CC}" |
228 | LDFLAGS=${LDFLAGS} | |
03261851 | 229 | ) |
4e71dc1e | 230 | AC_OUTPUT |
03261851 RK |
231 | |
232 |