Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | #! /bin/sh |
2 | ||
3 | # Guess values for system-dependent variables and create Makefiles. | |
a2d91340 | 4 | # Generated automatically using autoconf version 2.13 |
252b5132 RH |
5 | # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. |
6 | # | |
7 | # This configure script is free software; the Free Software Foundation | |
8 | # gives unlimited permission to copy, distribute and modify it. | |
9 | ||
10 | # Defaults: | |
11 | ac_help= | |
12 | ac_default_prefix=/usr/local | |
13 | # Any additions from configure.in: | |
14 | ac_help="$ac_help | |
15 | --enable-shared[=PKGS] build shared libraries [default=yes]" | |
16 | ac_help="$ac_help | |
17 | --enable-static[=PKGS] build static libraries [default=yes]" | |
bedf545c ILT |
18 | ac_help="$ac_help |
19 | --enable-fast-install[=PKGS] optimize for fast installation [default=yes]" | |
252b5132 RH |
20 | ac_help="$ac_help |
21 | --with-gnu-ld assume the C compiler uses GNU ld [default=no]" | |
bedf545c | 22 | ac_help="$ac_help |
a74801ba | 23 | --disable-libtool-lock avoid locking (might break parallel builds)" |
252b5132 RH |
24 | ac_help="$ac_help |
25 | --enable-bfd-assembler use BFD back end for writing object files" | |
26 | ac_help="$ac_help | |
27 | targets alternative target configurations besides the primary" | |
28 | ac_help="$ac_help | |
29 | --enable-commonbfdlib build shared BFD/opcodes/libiberty library" | |
a2d91340 AC |
30 | ac_help="$ac_help |
31 | --enable-build-warnings Enable build-time compiler warnings if gcc is used" | |
252b5132 RH |
32 | ac_help="$ac_help |
33 | --disable-nls do not use Native Language Support" | |
34 | ac_help="$ac_help | |
35 | --with-included-gettext use the GNU gettext library included here" | |
36 | ac_help="$ac_help | |
37 | --enable-maintainer-mode enable make rules and dependencies not useful | |
38 | (and sometimes confusing) to the casual installer" | |
39 | ||
40 | # Initialize some variables set by options. | |
41 | # The variables have the same names as the options, with | |
42 | # dashes changed to underlines. | |
43 | build=NONE | |
44 | cache_file=./config.cache | |
45 | exec_prefix=NONE | |
46 | host=NONE | |
47 | no_create= | |
48 | nonopt=NONE | |
49 | no_recursion= | |
50 | prefix=NONE | |
51 | program_prefix=NONE | |
52 | program_suffix=NONE | |
53 | program_transform_name=s,x,x, | |
54 | silent= | |
55 | site= | |
56 | srcdir= | |
57 | target=NONE | |
58 | verbose= | |
59 | x_includes=NONE | |
60 | x_libraries=NONE | |
61 | bindir='${exec_prefix}/bin' | |
62 | sbindir='${exec_prefix}/sbin' | |
63 | libexecdir='${exec_prefix}/libexec' | |
64 | datadir='${prefix}/share' | |
65 | sysconfdir='${prefix}/etc' | |
66 | sharedstatedir='${prefix}/com' | |
67 | localstatedir='${prefix}/var' | |
68 | libdir='${exec_prefix}/lib' | |
69 | includedir='${prefix}/include' | |
70 | oldincludedir='/usr/include' | |
71 | infodir='${prefix}/info' | |
72 | mandir='${prefix}/man' | |
73 | ||
74 | # Initialize some other variables. | |
75 | subdirs= | |
76 | MFLAGS= MAKEFLAGS= | |
77 | SHELL=${CONFIG_SHELL-/bin/sh} | |
78 | # Maximum number of lines to put in a shell here document. | |
79 | ac_max_here_lines=12 | |
80 | ||
81 | ac_prev= | |
82 | for ac_option | |
83 | do | |
84 | ||
85 | # If the previous option needs an argument, assign it. | |
86 | if test -n "$ac_prev"; then | |
87 | eval "$ac_prev=\$ac_option" | |
88 | ac_prev= | |
89 | continue | |
90 | fi | |
91 | ||
92 | case "$ac_option" in | |
93 | -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; | |
94 | *) ac_optarg= ;; | |
95 | esac | |
96 | ||
97 | # Accept the important Cygnus configure options, so we can diagnose typos. | |
98 | ||
99 | case "$ac_option" in | |
100 | ||
101 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
102 | ac_prev=bindir ;; | |
103 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
104 | bindir="$ac_optarg" ;; | |
105 | ||
106 | -build | --build | --buil | --bui | --bu) | |
107 | ac_prev=build ;; | |
108 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
109 | build="$ac_optarg" ;; | |
110 | ||
111 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
112 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
113 | ac_prev=cache_file ;; | |
114 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
115 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
116 | cache_file="$ac_optarg" ;; | |
117 | ||
118 | -datadir | --datadir | --datadi | --datad | --data | --dat | --da) | |
119 | ac_prev=datadir ;; | |
120 | -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | |
121 | | --da=*) | |
122 | datadir="$ac_optarg" ;; | |
123 | ||
124 | -disable-* | --disable-*) | |
125 | ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` | |
126 | # Reject names that are not valid shell variable names. | |
127 | if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
128 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
129 | fi | |
130 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
131 | eval "enable_${ac_feature}=no" ;; | |
132 | ||
133 | -enable-* | --enable-*) | |
134 | ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` | |
135 | # Reject names that are not valid shell variable names. | |
136 | if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
137 | { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } | |
138 | fi | |
139 | ac_feature=`echo $ac_feature| sed 's/-/_/g'` | |
140 | case "$ac_option" in | |
141 | *=*) ;; | |
142 | *) ac_optarg=yes ;; | |
143 | esac | |
144 | eval "enable_${ac_feature}='$ac_optarg'" ;; | |
145 | ||
146 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
147 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
148 | | --exec | --exe | --ex) | |
149 | ac_prev=exec_prefix ;; | |
150 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
151 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
152 | | --exec=* | --exe=* | --ex=*) | |
153 | exec_prefix="$ac_optarg" ;; | |
154 | ||
155 | -gas | --gas | --ga | --g) | |
156 | # Obsolete; use --with-gas. | |
157 | with_gas=yes ;; | |
158 | ||
159 | -help | --help | --hel | --he) | |
160 | # Omit some internal or obsolete options to make the list less imposing. | |
161 | # This message is too long to be a string in the A/UX 3.1 sh. | |
162 | cat << EOF | |
163 | Usage: configure [options] [host] | |
164 | Options: [defaults in brackets after descriptions] | |
165 | Configuration: | |
166 | --cache-file=FILE cache test results in FILE | |
167 | --help print this message | |
168 | --no-create do not create output files | |
169 | --quiet, --silent do not print \`checking...' messages | |
170 | --version print the version of autoconf that created configure | |
171 | Directory and file names: | |
172 | --prefix=PREFIX install architecture-independent files in PREFIX | |
173 | [$ac_default_prefix] | |
174 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
175 | [same as prefix] | |
176 | --bindir=DIR user executables in DIR [EPREFIX/bin] | |
177 | --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] | |
178 | --libexecdir=DIR program executables in DIR [EPREFIX/libexec] | |
179 | --datadir=DIR read-only architecture-independent data in DIR | |
180 | [PREFIX/share] | |
181 | --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] | |
182 | --sharedstatedir=DIR modifiable architecture-independent data in DIR | |
183 | [PREFIX/com] | |
184 | --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] | |
185 | --libdir=DIR object code libraries in DIR [EPREFIX/lib] | |
186 | --includedir=DIR C header files in DIR [PREFIX/include] | |
187 | --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] | |
188 | --infodir=DIR info documentation in DIR [PREFIX/info] | |
189 | --mandir=DIR man documentation in DIR [PREFIX/man] | |
190 | --srcdir=DIR find the sources in DIR [configure dir or ..] | |
191 | --program-prefix=PREFIX prepend PREFIX to installed program names | |
192 | --program-suffix=SUFFIX append SUFFIX to installed program names | |
193 | --program-transform-name=PROGRAM | |
194 | run sed PROGRAM on installed program names | |
195 | EOF | |
196 | cat << EOF | |
197 | Host type: | |
198 | --build=BUILD configure for building on BUILD [BUILD=HOST] | |
199 | --host=HOST configure for HOST [guessed] | |
200 | --target=TARGET configure for TARGET [TARGET=HOST] | |
201 | Features and packages: | |
202 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
203 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
204 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
205 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
206 | --x-includes=DIR X include files are in DIR | |
207 | --x-libraries=DIR X library files are in DIR | |
208 | EOF | |
209 | if test -n "$ac_help"; then | |
210 | echo "--enable and --with options recognized:$ac_help" | |
211 | fi | |
212 | exit 0 ;; | |
213 | ||
214 | -host | --host | --hos | --ho) | |
215 | ac_prev=host ;; | |
216 | -host=* | --host=* | --hos=* | --ho=*) | |
217 | host="$ac_optarg" ;; | |
218 | ||
219 | -includedir | --includedir | --includedi | --included | --include \ | |
220 | | --includ | --inclu | --incl | --inc) | |
221 | ac_prev=includedir ;; | |
222 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
223 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
224 | includedir="$ac_optarg" ;; | |
225 | ||
226 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
227 | ac_prev=infodir ;; | |
228 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
229 | infodir="$ac_optarg" ;; | |
230 | ||
231 | -libdir | --libdir | --libdi | --libd) | |
232 | ac_prev=libdir ;; | |
233 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
234 | libdir="$ac_optarg" ;; | |
235 | ||
236 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
237 | | --libexe | --libex | --libe) | |
238 | ac_prev=libexecdir ;; | |
239 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
240 | | --libexe=* | --libex=* | --libe=*) | |
241 | libexecdir="$ac_optarg" ;; | |
242 | ||
243 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
244 | | --localstate | --localstat | --localsta | --localst \ | |
245 | | --locals | --local | --loca | --loc | --lo) | |
246 | ac_prev=localstatedir ;; | |
247 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
248 | | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | |
249 | | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) | |
250 | localstatedir="$ac_optarg" ;; | |
251 | ||
252 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
253 | ac_prev=mandir ;; | |
254 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
255 | mandir="$ac_optarg" ;; | |
256 | ||
257 | -nfp | --nfp | --nf) | |
258 | # Obsolete; use --without-fp. | |
259 | with_fp=no ;; | |
260 | ||
261 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
262 | | --no-cr | --no-c) | |
263 | no_create=yes ;; | |
264 | ||
265 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
266 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
267 | no_recursion=yes ;; | |
268 | ||
269 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
270 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
271 | | --oldin | --oldi | --old | --ol | --o) | |
272 | ac_prev=oldincludedir ;; | |
273 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
274 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
275 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
276 | oldincludedir="$ac_optarg" ;; | |
277 | ||
278 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
279 | ac_prev=prefix ;; | |
280 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
281 | prefix="$ac_optarg" ;; | |
282 | ||
283 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
284 | | --program-pre | --program-pr | --program-p) | |
285 | ac_prev=program_prefix ;; | |
286 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
287 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
288 | program_prefix="$ac_optarg" ;; | |
289 | ||
290 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
291 | | --program-suf | --program-su | --program-s) | |
292 | ac_prev=program_suffix ;; | |
293 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
294 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
295 | program_suffix="$ac_optarg" ;; | |
296 | ||
297 | -program-transform-name | --program-transform-name \ | |
298 | | --program-transform-nam | --program-transform-na \ | |
299 | | --program-transform-n | --program-transform- \ | |
300 | | --program-transform | --program-transfor \ | |
301 | | --program-transfo | --program-transf \ | |
302 | | --program-trans | --program-tran \ | |
303 | | --progr-tra | --program-tr | --program-t) | |
304 | ac_prev=program_transform_name ;; | |
305 | -program-transform-name=* | --program-transform-name=* \ | |
306 | | --program-transform-nam=* | --program-transform-na=* \ | |
307 | | --program-transform-n=* | --program-transform-=* \ | |
308 | | --program-transform=* | --program-transfor=* \ | |
309 | | --program-transfo=* | --program-transf=* \ | |
310 | | --program-trans=* | --program-tran=* \ | |
311 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
312 | program_transform_name="$ac_optarg" ;; | |
313 | ||
314 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
315 | | -silent | --silent | --silen | --sile | --sil) | |
316 | silent=yes ;; | |
317 | ||
318 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
319 | ac_prev=sbindir ;; | |
320 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
321 | | --sbi=* | --sb=*) | |
322 | sbindir="$ac_optarg" ;; | |
323 | ||
324 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
325 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
326 | | --sharedst | --shareds | --shared | --share | --shar \ | |
327 | | --sha | --sh) | |
328 | ac_prev=sharedstatedir ;; | |
329 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
330 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
331 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
332 | | --sha=* | --sh=*) | |
333 | sharedstatedir="$ac_optarg" ;; | |
334 | ||
335 | -site | --site | --sit) | |
336 | ac_prev=site ;; | |
337 | -site=* | --site=* | --sit=*) | |
338 | site="$ac_optarg" ;; | |
339 | ||
340 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
341 | ac_prev=srcdir ;; | |
342 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
343 | srcdir="$ac_optarg" ;; | |
344 | ||
345 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
346 | | --syscon | --sysco | --sysc | --sys | --sy) | |
347 | ac_prev=sysconfdir ;; | |
348 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
349 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
350 | sysconfdir="$ac_optarg" ;; | |
351 | ||
352 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
353 | ac_prev=target ;; | |
354 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
355 | target="$ac_optarg" ;; | |
356 | ||
357 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
358 | verbose=yes ;; | |
359 | ||
360 | -version | --version | --versio | --versi | --vers) | |
a2d91340 | 361 | echo "configure generated by autoconf version 2.13" |
252b5132 RH |
362 | exit 0 ;; |
363 | ||
364 | -with-* | --with-*) | |
365 | ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` | |
366 | # Reject names that are not valid shell variable names. | |
367 | if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then | |
368 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
369 | fi | |
370 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
371 | case "$ac_option" in | |
372 | *=*) ;; | |
373 | *) ac_optarg=yes ;; | |
374 | esac | |
375 | eval "with_${ac_package}='$ac_optarg'" ;; | |
376 | ||
377 | -without-* | --without-*) | |
378 | ac_package=`echo $ac_option|sed -e 's/-*without-//'` | |
379 | # Reject names that are not valid shell variable names. | |
380 | if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then | |
381 | { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } | |
382 | fi | |
383 | ac_package=`echo $ac_package| sed 's/-/_/g'` | |
384 | eval "with_${ac_package}=no" ;; | |
385 | ||
386 | --x) | |
387 | # Obsolete; use --with-x. | |
388 | with_x=yes ;; | |
389 | ||
390 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
391 | | --x-incl | --x-inc | --x-in | --x-i) | |
392 | ac_prev=x_includes ;; | |
393 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
394 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
395 | x_includes="$ac_optarg" ;; | |
396 | ||
397 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
398 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
399 | ac_prev=x_libraries ;; | |
400 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
401 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
402 | x_libraries="$ac_optarg" ;; | |
403 | ||
404 | -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } | |
405 | ;; | |
406 | ||
407 | *) | |
408 | if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then | |
409 | echo "configure: warning: $ac_option: invalid host type" 1>&2 | |
410 | fi | |
411 | if test "x$nonopt" != xNONE; then | |
412 | { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } | |
413 | fi | |
414 | nonopt="$ac_option" | |
415 | ;; | |
416 | ||
417 | esac | |
418 | done | |
419 | ||
420 | if test -n "$ac_prev"; then | |
421 | { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } | |
422 | fi | |
423 | ||
424 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
425 | ||
426 | # File descriptor usage: | |
427 | # 0 standard input | |
428 | # 1 file creation | |
429 | # 2 errors and warnings | |
430 | # 3 some systems may open it to /dev/tty | |
431 | # 4 used on the Kubota Titan | |
432 | # 6 checking for... messages and results | |
433 | # 5 compiler messages saved in config.log | |
434 | if test "$silent" = yes; then | |
435 | exec 6>/dev/null | |
436 | else | |
437 | exec 6>&1 | |
438 | fi | |
439 | exec 5>./config.log | |
440 | ||
441 | echo "\ | |
442 | This file contains any messages produced by compilers while | |
443 | running configure, to aid debugging if configure makes a mistake. | |
444 | " 1>&5 | |
445 | ||
446 | # Strip out --no-create and --no-recursion so they do not pile up. | |
447 | # Also quote any args containing shell metacharacters. | |
448 | ac_configure_args= | |
449 | for ac_arg | |
450 | do | |
451 | case "$ac_arg" in | |
452 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
453 | | --no-cr | --no-c) ;; | |
454 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
455 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; | |
456 | *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) | |
457 | ac_configure_args="$ac_configure_args '$ac_arg'" ;; | |
458 | *) ac_configure_args="$ac_configure_args $ac_arg" ;; | |
459 | esac | |
460 | done | |
461 | ||
462 | # NLS nuisances. | |
463 | # Only set these to C if already set. These must not be set unconditionally | |
464 | # because not all systems understand e.g. LANG=C (notably SCO). | |
465 | # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! | |
466 | # Non-C LC_CTYPE values break the ctype check. | |
467 | if test "${LANG+set}" = set; then LANG=C; export LANG; fi | |
468 | if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi | |
469 | if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi | |
470 | if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi | |
471 | ||
472 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
473 | rm -rf conftest* confdefs.h | |
474 | # AIX cpp loses on an empty file, so make sure it contains at least a newline. | |
475 | echo > confdefs.h | |
476 | ||
477 | # A filename unique to this package, relative to the directory that | |
478 | # configure is in, which we can look for to find out if srcdir is correct. | |
479 | ac_unique_file=as.h | |
480 | ||
481 | # Find the source files, if location was not specified. | |
482 | if test -z "$srcdir"; then | |
483 | ac_srcdir_defaulted=yes | |
484 | # Try the directory containing this script, then its parent. | |
485 | ac_prog=$0 | |
486 | ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` | |
487 | test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. | |
488 | srcdir=$ac_confdir | |
489 | if test ! -r $srcdir/$ac_unique_file; then | |
490 | srcdir=.. | |
491 | fi | |
492 | else | |
493 | ac_srcdir_defaulted=no | |
494 | fi | |
495 | if test ! -r $srcdir/$ac_unique_file; then | |
496 | if test "$ac_srcdir_defaulted" = yes; then | |
497 | { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } | |
498 | else | |
499 | { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } | |
500 | fi | |
501 | fi | |
502 | srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` | |
503 | ||
504 | # Prefer explicitly selected file to automatically selected ones. | |
98e5953c JL |
505 | if test -z "$CONFIG_SITE"; then |
506 | if test "x$prefix" != xNONE; then | |
507 | CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" | |
508 | else | |
509 | CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
252b5132 RH |
510 | fi |
511 | fi | |
512 | for ac_site_file in $CONFIG_SITE; do | |
513 | if test -r "$ac_site_file"; then | |
514 | echo "loading site script $ac_site_file" | |
515 | . "$ac_site_file" | |
516 | fi | |
517 | done | |
518 | ||
519 | if test -r "$cache_file"; then | |
520 | echo "loading cache $cache_file" | |
a2d91340 | 521 | . $cache_file |
252b5132 RH |
522 | else |
523 | echo "creating cache $cache_file" | |
524 | > $cache_file | |
525 | fi | |
526 | ||
527 | ac_ext=c | |
528 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
529 | ac_cpp='$CPP $CPPFLAGS' | |
530 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
531 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
532 | cross_compiling=$ac_cv_prog_cc_cross | |
533 | ||
534 | ac_exeext= | |
535 | ac_objext=o | |
536 | if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then | |
537 | # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. | |
538 | if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then | |
539 | ac_n= ac_c=' | |
540 | ' ac_t=' ' | |
541 | else | |
542 | ac_n=-n ac_c= ac_t= | |
543 | fi | |
544 | else | |
545 | ac_n= ac_c='\c' ac_t= | |
546 | fi | |
547 | ||
548 | ||
549 | ||
550 | ac_aux_dir= | |
551 | for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do | |
552 | if test -f $ac_dir/install-sh; then | |
553 | ac_aux_dir=$ac_dir | |
554 | ac_install_sh="$ac_aux_dir/install-sh -c" | |
555 | break | |
556 | elif test -f $ac_dir/install.sh; then | |
557 | ac_aux_dir=$ac_dir | |
558 | ac_install_sh="$ac_aux_dir/install.sh -c" | |
559 | break | |
560 | fi | |
561 | done | |
562 | if test -z "$ac_aux_dir"; then | |
563 | { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } | |
564 | fi | |
a2d91340 AC |
565 | ac_config_guess=$ac_aux_dir/config.guess |
566 | ac_config_sub=$ac_aux_dir/config.sub | |
567 | ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. | |
252b5132 RH |
568 | |
569 | ||
570 | # Do some error checking and defaulting for the host and target type. | |
571 | # The inputs are: | |
572 | # configure --host=HOST --target=TARGET --build=BUILD NONOPT | |
573 | # | |
574 | # The rules are: | |
575 | # 1. You are not allowed to specify --host, --target, and nonopt at the | |
576 | # same time. | |
577 | # 2. Host defaults to nonopt. | |
578 | # 3. If nonopt is not specified, then host defaults to the current host, | |
579 | # as determined by config.guess. | |
580 | # 4. Target and build default to nonopt. | |
581 | # 5. If nonopt is not specified, then target and build default to host. | |
582 | ||
583 | # The aliases save the names the user supplied, while $host etc. | |
584 | # will get canonicalized. | |
585 | case $host---$target---$nonopt in | |
586 | NONE---*---* | *---NONE---* | *---*---NONE) ;; | |
587 | *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; | |
588 | esac | |
589 | ||
a2d91340 AC |
590 | |
591 | # Make sure we can run config.sub. | |
592 | if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : | |
593 | else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } | |
594 | fi | |
595 | ||
596 | echo $ac_n "checking host system type""... $ac_c" 1>&6 | |
98e5953c | 597 | echo "configure:598: checking host system type" >&5 |
a2d91340 AC |
598 | |
599 | host_alias=$host | |
600 | case "$host_alias" in | |
601 | NONE) | |
602 | case $nonopt in | |
603 | NONE) | |
604 | if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : | |
605 | else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } | |
606 | fi ;; | |
607 | *) host_alias=$nonopt ;; | |
608 | esac ;; | |
609 | esac | |
610 | ||
611 | host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` | |
612 | host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
613 | host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
614 | host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
615 | echo "$ac_t""$host" 1>&6 | |
616 | ||
617 | echo $ac_n "checking target system type""... $ac_c" 1>&6 | |
98e5953c | 618 | echo "configure:619: checking target system type" >&5 |
a2d91340 AC |
619 | |
620 | target_alias=$target | |
621 | case "$target_alias" in | |
622 | NONE) | |
623 | case $nonopt in | |
624 | NONE) target_alias=$host_alias ;; | |
625 | *) target_alias=$nonopt ;; | |
626 | esac ;; | |
627 | esac | |
628 | ||
629 | target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` | |
630 | target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
631 | target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
632 | target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
633 | echo "$ac_t""$target" 1>&6 | |
634 | ||
635 | echo $ac_n "checking build system type""... $ac_c" 1>&6 | |
98e5953c | 636 | echo "configure:637: checking build system type" >&5 |
a2d91340 AC |
637 | |
638 | build_alias=$build | |
639 | case "$build_alias" in | |
640 | NONE) | |
641 | case $nonopt in | |
642 | NONE) build_alias=$host_alias ;; | |
643 | *) build_alias=$nonopt ;; | |
644 | esac ;; | |
645 | esac | |
646 | ||
647 | build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` | |
648 | build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` | |
649 | build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` | |
650 | build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` | |
651 | echo "$ac_t""$build" 1>&6 | |
652 | ||
252b5132 RH |
653 | test "$host_alias" != "$target_alias" && |
654 | test "$program_prefix$program_suffix$program_transform_name" = \ | |
655 | NONENONEs,x,x, && | |
656 | program_prefix=${target_alias}- | |
657 | ||
658 | ||
659 | # Find a good install program. We prefer a C program (faster), | |
660 | # so one script is as good as another. But avoid the broken or | |
661 | # incompatible versions: | |
662 | # SysV /etc/install, /usr/sbin/install | |
663 | # SunOS /usr/etc/install | |
664 | # IRIX /sbin/install | |
665 | # AIX /bin/install | |
666 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
667 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
668 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
669 | # ./install, which can be erroneously created by make from ./install.sh. | |
670 | echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 | |
98e5953c | 671 | echo "configure:672: checking for a BSD compatible install" >&5 |
252b5132 | 672 | if test -z "$INSTALL"; then |
a2d91340 | 673 | if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then |
252b5132 RH |
674 | echo $ac_n "(cached) $ac_c" 1>&6 |
675 | else | |
676 | IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" | |
677 | for ac_dir in $PATH; do | |
678 | # Account for people who put trailing slashes in PATH elements. | |
679 | case "$ac_dir/" in | |
680 | /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; | |
681 | *) | |
682 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
683 | # Don't use installbsd from OSF since it installs stuff as root | |
684 | # by default. | |
685 | for ac_prog in ginstall scoinst install; do | |
686 | if test -f $ac_dir/$ac_prog; then | |
687 | if test $ac_prog = install && | |
688 | grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then | |
689 | # AIX install. It has an incompatible calling convention. | |
690 | : | |
691 | else | |
692 | ac_cv_path_install="$ac_dir/$ac_prog -c" | |
693 | break 2 | |
694 | fi | |
695 | fi | |
696 | done | |
697 | ;; | |
698 | esac | |
699 | done | |
700 | IFS="$ac_save_IFS" | |
701 | ||
702 | fi | |
703 | if test "${ac_cv_path_install+set}" = set; then | |
704 | INSTALL="$ac_cv_path_install" | |
705 | else | |
706 | # As a last resort, use the slow shell script. We don't cache a | |
707 | # path for INSTALL within a source directory, because that will | |
708 | # break other packages using the cache if that directory is | |
709 | # removed, or if the path is relative. | |
710 | INSTALL="$ac_install_sh" | |
711 | fi | |
712 | fi | |
713 | echo "$ac_t""$INSTALL" 1>&6 | |
714 | ||
715 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
716 | # It thinks the first close brace ends the variable substitution. | |
717 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
718 | ||
a2d91340 | 719 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' |
252b5132 RH |
720 | |
721 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
722 | ||
723 | echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 | |
98e5953c | 724 | echo "configure:725: checking whether build environment is sane" >&5 |
252b5132 RH |
725 | # Just in case |
726 | sleep 1 | |
727 | echo timestamp > conftestfile | |
728 | # Do `set' in a subshell so we don't clobber the current shell's | |
729 | # arguments. Must try -L first in case configure is actually a | |
730 | # symlink; some systems play weird games with the mod time of symlinks | |
731 | # (eg FreeBSD returns the mod time of the symlink's containing | |
732 | # directory). | |
733 | if ( | |
734 | set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` | |
735 | if test "$*" = "X"; then | |
736 | # -L didn't work. | |
737 | set X `ls -t $srcdir/configure conftestfile` | |
738 | fi | |
739 | if test "$*" != "X $srcdir/configure conftestfile" \ | |
740 | && test "$*" != "X conftestfile $srcdir/configure"; then | |
741 | ||
742 | # If neither matched, then we have a broken ls. This can happen | |
743 | # if, for instance, CONFIG_SHELL is bash and it inherits a | |
744 | # broken ls alias from the environment. This has actually | |
745 | # happened. Such a system could not be considered "sane". | |
746 | { echo "configure: error: ls -t appears to fail. Make sure there is not a broken | |
747 | alias in your environment" 1>&2; exit 1; } | |
748 | fi | |
749 | ||
750 | test "$2" = conftestfile | |
751 | ) | |
752 | then | |
753 | # Ok. | |
754 | : | |
755 | else | |
756 | { echo "configure: error: newly created file is older than distributed files! | |
757 | Check your system clock" 1>&2; exit 1; } | |
758 | fi | |
759 | rm -f conftest* | |
760 | echo "$ac_t""yes" 1>&6 | |
761 | if test "$program_transform_name" = s,x,x,; then | |
762 | program_transform_name= | |
763 | else | |
764 | # Double any \ or $. echo might interpret backslashes. | |
765 | cat <<\EOF_SED > conftestsed | |
766 | s,\\,\\\\,g; s,\$,$$,g | |
767 | EOF_SED | |
768 | program_transform_name="`echo $program_transform_name|sed -f conftestsed`" | |
769 | rm -f conftestsed | |
770 | fi | |
771 | test "$program_prefix" != NONE && | |
a2d91340 | 772 | program_transform_name="s,^,${program_prefix},; $program_transform_name" |
252b5132 RH |
773 | # Use a double $ so make ignores it. |
774 | test "$program_suffix" != NONE && | |
a2d91340 | 775 | program_transform_name="s,\$\$,${program_suffix},; $program_transform_name" |
252b5132 RH |
776 | |
777 | # sed with no file args requires a program. | |
778 | test "$program_transform_name" = "" && program_transform_name="s,x,x," | |
779 | ||
780 | echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 | |
98e5953c | 781 | echo "configure:782: checking whether ${MAKE-make} sets \${MAKE}" >&5 |
252b5132 | 782 | set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` |
a2d91340 | 783 | if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then |
252b5132 RH |
784 | echo $ac_n "(cached) $ac_c" 1>&6 |
785 | else | |
786 | cat > conftestmake <<\EOF | |
787 | all: | |
788 | @echo 'ac_maketemp="${MAKE}"' | |
789 | EOF | |
790 | # GNU make sometimes prints "make[1]: Entering...", which would confuse us. | |
791 | eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` | |
792 | if test -n "$ac_maketemp"; then | |
793 | eval ac_cv_prog_make_${ac_make}_set=yes | |
794 | else | |
795 | eval ac_cv_prog_make_${ac_make}_set=no | |
796 | fi | |
797 | rm -f conftestmake | |
798 | fi | |
799 | if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then | |
800 | echo "$ac_t""yes" 1>&6 | |
801 | SET_MAKE= | |
802 | else | |
803 | echo "$ac_t""no" 1>&6 | |
804 | SET_MAKE="MAKE=${MAKE-make}" | |
805 | fi | |
806 | ||
807 | ||
808 | PACKAGE=gas | |
809 | ||
0ed15843 | 810 | VERSION=2.9.5 |
252b5132 RH |
811 | |
812 | if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then | |
813 | { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } | |
814 | fi | |
815 | cat >> confdefs.h <<EOF | |
816 | #define PACKAGE "$PACKAGE" | |
817 | EOF | |
818 | ||
819 | cat >> confdefs.h <<EOF | |
820 | #define VERSION "$VERSION" | |
821 | EOF | |
822 | ||
823 | ||
824 | ||
825 | missing_dir=`cd $ac_aux_dir && pwd` | |
826 | echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 | |
98e5953c | 827 | echo "configure:828: checking for working aclocal" >&5 |
252b5132 RH |
828 | # Run test in a subshell; some versions of sh will print an error if |
829 | # an executable is not found, even if stderr is redirected. | |
830 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
831 | if (aclocal --version) < /dev/null > /dev/null 2>&1; then | |
832 | ACLOCAL=aclocal | |
833 | echo "$ac_t""found" 1>&6 | |
834 | else | |
835 | ACLOCAL="$missing_dir/missing aclocal" | |
836 | echo "$ac_t""missing" 1>&6 | |
837 | fi | |
838 | ||
839 | echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 | |
98e5953c | 840 | echo "configure:841: checking for working autoconf" >&5 |
252b5132 RH |
841 | # Run test in a subshell; some versions of sh will print an error if |
842 | # an executable is not found, even if stderr is redirected. | |
843 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
844 | if (autoconf --version) < /dev/null > /dev/null 2>&1; then | |
845 | AUTOCONF=autoconf | |
846 | echo "$ac_t""found" 1>&6 | |
847 | else | |
848 | AUTOCONF="$missing_dir/missing autoconf" | |
849 | echo "$ac_t""missing" 1>&6 | |
850 | fi | |
851 | ||
852 | echo $ac_n "checking for working automake""... $ac_c" 1>&6 | |
98e5953c | 853 | echo "configure:854: checking for working automake" >&5 |
252b5132 RH |
854 | # Run test in a subshell; some versions of sh will print an error if |
855 | # an executable is not found, even if stderr is redirected. | |
856 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
857 | if (automake --version) < /dev/null > /dev/null 2>&1; then | |
858 | AUTOMAKE=automake | |
859 | echo "$ac_t""found" 1>&6 | |
860 | else | |
861 | AUTOMAKE="$missing_dir/missing automake" | |
862 | echo "$ac_t""missing" 1>&6 | |
863 | fi | |
864 | ||
865 | echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 | |
98e5953c | 866 | echo "configure:867: checking for working autoheader" >&5 |
252b5132 RH |
867 | # Run test in a subshell; some versions of sh will print an error if |
868 | # an executable is not found, even if stderr is redirected. | |
869 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
870 | if (autoheader --version) < /dev/null > /dev/null 2>&1; then | |
871 | AUTOHEADER=autoheader | |
872 | echo "$ac_t""found" 1>&6 | |
873 | else | |
874 | AUTOHEADER="$missing_dir/missing autoheader" | |
875 | echo "$ac_t""missing" 1>&6 | |
876 | fi | |
877 | ||
878 | echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 | |
98e5953c | 879 | echo "configure:880: checking for working makeinfo" >&5 |
252b5132 RH |
880 | # Run test in a subshell; some versions of sh will print an error if |
881 | # an executable is not found, even if stderr is redirected. | |
882 | # Redirect stdin to placate older versions of autoconf. Sigh. | |
883 | if (makeinfo --version) < /dev/null > /dev/null 2>&1; then | |
884 | MAKEINFO=makeinfo | |
885 | echo "$ac_t""found" 1>&6 | |
886 | else | |
887 | MAKEINFO="$missing_dir/missing makeinfo" | |
888 | echo "$ac_t""missing" 1>&6 | |
889 | fi | |
890 | ||
891 | ||
892 | ||
893 | # Check whether --enable-shared or --disable-shared was given. | |
894 | if test "${enable_shared+set}" = set; then | |
895 | enableval="$enable_shared" | |
896 | p=${PACKAGE-default} | |
897 | case "$enableval" in | |
898 | yes) enable_shared=yes ;; | |
899 | no) enable_shared=no ;; | |
900 | *) | |
901 | enable_shared=no | |
902 | # Look at the argument we got. We use all the common list separators. | |
903 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
904 | for pkg in $enableval; do | |
905 | if test "X$pkg" = "X$p"; then | |
906 | enable_shared=yes | |
907 | fi | |
908 | done | |
909 | IFS="$ac_save_ifs" | |
910 | ;; | |
911 | esac | |
912 | else | |
913 | enable_shared=yes | |
914 | fi | |
915 | ||
916 | # Check whether --enable-static or --disable-static was given. | |
917 | if test "${enable_static+set}" = set; then | |
918 | enableval="$enable_static" | |
919 | p=${PACKAGE-default} | |
920 | case "$enableval" in | |
921 | yes) enable_static=yes ;; | |
922 | no) enable_static=no ;; | |
923 | *) | |
924 | enable_static=no | |
925 | # Look at the argument we got. We use all the common list separators. | |
926 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
927 | for pkg in $enableval; do | |
928 | if test "X$pkg" = "X$p"; then | |
929 | enable_static=yes | |
930 | fi | |
931 | done | |
932 | IFS="$ac_save_ifs" | |
933 | ;; | |
934 | esac | |
935 | else | |
936 | enable_static=yes | |
937 | fi | |
938 | ||
bedf545c ILT |
939 | # Check whether --enable-fast-install or --disable-fast-install was given. |
940 | if test "${enable_fast_install+set}" = set; then | |
941 | enableval="$enable_fast_install" | |
942 | p=${PACKAGE-default} | |
943 | case "$enableval" in | |
944 | yes) enable_fast_install=yes ;; | |
945 | no) enable_fast_install=no ;; | |
946 | *) | |
947 | enable_fast_install=no | |
948 | # Look at the argument we got. We use all the common list separators. | |
949 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," | |
950 | for pkg in $enableval; do | |
951 | if test "X$pkg" = "X$p"; then | |
952 | enable_fast_install=yes | |
953 | fi | |
954 | done | |
955 | IFS="$ac_save_ifs" | |
956 | ;; | |
957 | esac | |
958 | else | |
959 | enable_fast_install=yes | |
960 | fi | |
961 | ||
252b5132 RH |
962 | # Extract the first word of "ranlib", so it can be a program name with args. |
963 | set dummy ranlib; ac_word=$2 | |
964 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
98e5953c | 965 | echo "configure:966: checking for $ac_word" >&5 |
a2d91340 | 966 | if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then |
252b5132 RH |
967 | echo $ac_n "(cached) $ac_c" 1>&6 |
968 | else | |
969 | if test -n "$RANLIB"; then | |
970 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
971 | else | |
972 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
973 | ac_dummy="$PATH" | |
974 | for ac_dir in $ac_dummy; do | |
975 | test -z "$ac_dir" && ac_dir=. | |
976 | if test -f $ac_dir/$ac_word; then | |
977 | ac_cv_prog_RANLIB="ranlib" | |
978 | break | |
979 | fi | |
980 | done | |
981 | IFS="$ac_save_ifs" | |
982 | test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" | |
983 | fi | |
984 | fi | |
985 | RANLIB="$ac_cv_prog_RANLIB" | |
986 | if test -n "$RANLIB"; then | |
987 | echo "$ac_t""$RANLIB" 1>&6 | |
988 | else | |
989 | echo "$ac_t""no" 1>&6 | |
990 | fi | |
991 | ||
992 | # Extract the first word of "gcc", so it can be a program name with args. | |
993 | set dummy gcc; ac_word=$2 | |
994 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
98e5953c | 995 | echo "configure:996: checking for $ac_word" >&5 |
a2d91340 | 996 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
252b5132 RH |
997 | echo $ac_n "(cached) $ac_c" 1>&6 |
998 | else | |
999 | if test -n "$CC"; then | |
1000 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1001 | else | |
1002 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1003 | ac_dummy="$PATH" | |
1004 | for ac_dir in $ac_dummy; do | |
1005 | test -z "$ac_dir" && ac_dir=. | |
1006 | if test -f $ac_dir/$ac_word; then | |
1007 | ac_cv_prog_CC="gcc" | |
1008 | break | |
1009 | fi | |
1010 | done | |
1011 | IFS="$ac_save_ifs" | |
1012 | fi | |
1013 | fi | |
1014 | CC="$ac_cv_prog_CC" | |
1015 | if test -n "$CC"; then | |
1016 | echo "$ac_t""$CC" 1>&6 | |
1017 | else | |
1018 | echo "$ac_t""no" 1>&6 | |
1019 | fi | |
1020 | ||
1021 | if test -z "$CC"; then | |
1022 | # Extract the first word of "cc", so it can be a program name with args. | |
1023 | set dummy cc; ac_word=$2 | |
1024 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
98e5953c | 1025 | echo "configure:1026: checking for $ac_word" >&5 |
a2d91340 | 1026 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
252b5132 RH |
1027 | echo $ac_n "(cached) $ac_c" 1>&6 |
1028 | else | |
1029 | if test -n "$CC"; then | |
1030 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1031 | else | |
1032 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1033 | ac_prog_rejected=no | |
1034 | ac_dummy="$PATH" | |
1035 | for ac_dir in $ac_dummy; do | |
1036 | test -z "$ac_dir" && ac_dir=. | |
1037 | if test -f $ac_dir/$ac_word; then | |
1038 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
1039 | ac_prog_rejected=yes | |
1040 | continue | |
1041 | fi | |
1042 | ac_cv_prog_CC="cc" | |
1043 | break | |
1044 | fi | |
1045 | done | |
1046 | IFS="$ac_save_ifs" | |
1047 | if test $ac_prog_rejected = yes; then | |
1048 | # We found a bogon in the path, so make sure we never use it. | |
1049 | set dummy $ac_cv_prog_CC | |
1050 | shift | |
1051 | if test $# -gt 0; then | |
1052 | # We chose a different compiler from the bogus one. | |
1053 | # However, it has the same basename, so the bogon will be chosen | |
1054 | # first if we set CC to just the basename; use the full file name. | |
1055 | shift | |
1056 | set dummy "$ac_dir/$ac_word" "$@" | |
1057 | shift | |
1058 | ac_cv_prog_CC="$@" | |
1059 | fi | |
1060 | fi | |
1061 | fi | |
1062 | fi | |
1063 | CC="$ac_cv_prog_CC" | |
1064 | if test -n "$CC"; then | |
1065 | echo "$ac_t""$CC" 1>&6 | |
1066 | else | |
1067 | echo "$ac_t""no" 1>&6 | |
1068 | fi | |
1069 | ||
1070 | if test -z "$CC"; then | |
1071 | case "`uname -s`" in | |
a2d91340 | 1072 | *win32* | *WIN32*) |
252b5132 RH |
1073 | # Extract the first word of "cl", so it can be a program name with args. |
1074 | set dummy cl; ac_word=$2 | |
1075 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
98e5953c | 1076 | echo "configure:1077: checking for $ac_word" >&5 |
a2d91340 | 1077 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
252b5132 RH |
1078 | echo $ac_n "(cached) $ac_c" 1>&6 |
1079 | else | |
1080 | if test -n "$CC"; then | |
1081 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
1082 | else | |
1083 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
1084 | ac_dummy="$PATH" | |
1085 | for ac_dir in $ac_dummy; do | |
1086 | test -z "$ac_dir" && ac_dir=. | |
1087 | if test -f $ac_dir/$ac_word; then | |
1088 | ac_cv_prog_CC="cl" | |
1089 | break | |
1090 | fi | |
1091 | done | |
1092 | IFS="$ac_save_ifs" | |
1093 | fi | |
1094 | fi | |
1095 | CC="$ac_cv_prog_CC" | |
1096 | if test -n "$CC"; then | |
1097 | echo "$ac_t""$CC" 1>&6 | |
1098 | else | |
1099 | echo "$ac_t""no" 1>&6 | |
1100 | fi | |
1101 | ;; | |
1102 | esac | |
1103 | fi | |
1104 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
1105 | fi | |
1106 | ||
a2d91340 | 1107 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
98e5953c | 1108 | echo "configure:1109: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
252b5132 RH |
1109 | |
1110 | ac_ext=c | |
1111 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1112 | ac_cpp='$CPP $CPPFLAGS' | |
1113 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1114 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1115 | cross_compiling=$ac_cv_prog_cc_cross | |
1116 | ||
1117 | cat > conftest.$ac_ext << EOF | |
1118 | ||
98e5953c | 1119 | #line 1120 "configure" |
252b5132 RH |
1120 | #include "confdefs.h" |
1121 | ||
1122 | main(){return(0);} | |
1123 | EOF | |
98e5953c | 1124 | if { (eval echo configure:1125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
1125 | ac_cv_prog_cc_works=yes |
1126 | # If we can't run a trivial program, we are probably using a cross compiler. | |
1127 | if (./conftest; exit) 2>/dev/null; then | |
1128 | ac_cv_prog_cc_cross=no | |
1129 | else | |
1130 | ac_cv_prog_cc_cross=yes | |
1131 | fi | |
1132 | else | |
1133 | echo "configure: failed program was:" >&5 | |
1134 | cat conftest.$ac_ext >&5 | |
1135 | ac_cv_prog_cc_works=no | |
1136 | fi | |
1137 | rm -fr conftest* | |
1138 | ac_ext=c | |
1139 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
1140 | ac_cpp='$CPP $CPPFLAGS' | |
1141 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
1142 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
1143 | cross_compiling=$ac_cv_prog_cc_cross | |
1144 | ||
1145 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
1146 | if test $ac_cv_prog_cc_works = no; then | |
1147 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
1148 | fi | |
a2d91340 | 1149 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
98e5953c | 1150 | echo "configure:1151: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
252b5132 RH |
1151 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
1152 | cross_compiling=$ac_cv_prog_cc_cross | |
1153 | ||
1154 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
98e5953c | 1155 | echo "configure:1156: checking whether we are using GNU C" >&5 |
a2d91340 | 1156 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
252b5132 RH |
1157 | echo $ac_n "(cached) $ac_c" 1>&6 |
1158 | else | |
1159 | cat > conftest.c <<EOF | |
1160 | #ifdef __GNUC__ | |
1161 | yes; | |
1162 | #endif | |
1163 | EOF | |
98e5953c | 1164 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
252b5132 RH |
1165 | ac_cv_prog_gcc=yes |
1166 | else | |
1167 | ac_cv_prog_gcc=no | |
1168 | fi | |
1169 | fi | |
1170 | ||
1171 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
1172 | ||
1173 | if test $ac_cv_prog_gcc = yes; then | |
1174 | GCC=yes | |
1175 | else | |
1176 | GCC= | |
1177 | fi | |
1178 | ||
1179 | ac_test_CFLAGS="${CFLAGS+set}" | |
1180 | ac_save_CFLAGS="$CFLAGS" | |
1181 | CFLAGS= | |
1182 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
98e5953c | 1183 | echo "configure:1184: checking whether ${CC-cc} accepts -g" >&5 |
a2d91340 | 1184 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
252b5132 RH |
1185 | echo $ac_n "(cached) $ac_c" 1>&6 |
1186 | else | |
1187 | echo 'void f(){}' > conftest.c | |
1188 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
1189 | ac_cv_prog_cc_g=yes | |
1190 | else | |
1191 | ac_cv_prog_cc_g=no | |
1192 | fi | |
1193 | rm -f conftest* | |
1194 | ||
1195 | fi | |
1196 | ||
1197 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
1198 | if test "$ac_test_CFLAGS" = set; then | |
1199 | CFLAGS="$ac_save_CFLAGS" | |
1200 | elif test $ac_cv_prog_cc_g = yes; then | |
1201 | if test "$GCC" = yes; then | |
1202 | CFLAGS="-g -O2" | |
1203 | else | |
1204 | CFLAGS="-g" | |
1205 | fi | |
1206 | else | |
1207 | if test "$GCC" = yes; then | |
1208 | CFLAGS="-O2" | |
1209 | else | |
1210 | CFLAGS= | |
1211 | fi | |
1212 | fi | |
1213 | ||
1214 | # Check whether --with-gnu-ld or --without-gnu-ld was given. | |
1215 | if test "${with_gnu_ld+set}" = set; then | |
1216 | withval="$with_gnu_ld" | |
1217 | test "$withval" = no || with_gnu_ld=yes | |
1218 | else | |
1219 | with_gnu_ld=no | |
1220 | fi | |
1221 | ||
252b5132 RH |
1222 | ac_prog=ld |
1223 | if test "$ac_cv_prog_gcc" = yes; then | |
1224 | # Check if gcc -print-prog-name=ld gives a path. | |
1225 | echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 | |
98e5953c | 1226 | echo "configure:1227: checking for ld used by GCC" >&5 |
252b5132 RH |
1227 | ac_prog=`($CC -print-prog-name=ld) 2>&5` |
1228 | case "$ac_prog" in | |
bedf545c | 1229 | # Accept absolute paths. |
a74801ba | 1230 | [\\/]* | [A-Za-z]:[\\/]*) |
bedf545c ILT |
1231 | re_direlt='/[^/][^/]*/\.\./' |
1232 | # Canonicalize the path of ld | |
1233 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | |
1234 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | |
1235 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | |
1236 | done | |
1237 | test -z "$LD" && LD="$ac_prog" | |
1238 | ;; | |
252b5132 RH |
1239 | "") |
1240 | # If it fails, then pretend we aren't using GCC. | |
1241 | ac_prog=ld | |
1242 | ;; | |
1243 | *) | |
1244 | # If it is relative, then search for the first ld in PATH. | |
1245 | with_gnu_ld=unknown | |
1246 | ;; | |
1247 | esac | |
1248 | elif test "$with_gnu_ld" = yes; then | |
1249 | echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 | |
98e5953c | 1250 | echo "configure:1251: checking for GNU ld" >&5 |
252b5132 RH |
1251 | else |
1252 | echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 | |
98e5953c | 1253 | echo "configure:1254: checking for non-GNU ld" >&5 |
252b5132 | 1254 | fi |
a2d91340 | 1255 | if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then |
252b5132 RH |
1256 | echo $ac_n "(cached) $ac_c" 1>&6 |
1257 | else | |
1258 | if test -z "$LD"; then | |
a74801ba | 1259 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
252b5132 RH |
1260 | for ac_dir in $PATH; do |
1261 | test -z "$ac_dir" && ac_dir=. | |
a74801ba | 1262 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
252b5132 RH |
1263 | ac_cv_path_LD="$ac_dir/$ac_prog" |
1264 | # Check to see if the program is GNU ld. I'd rather use --version, | |
1265 | # but apparently some GNU ld's only accept -v. | |
1266 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
1267 | if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | |
1268 | test "$with_gnu_ld" != no && break | |
1269 | else | |
bedf545c | 1270 | test "$with_gnu_ld" != yes && break |
252b5132 RH |
1271 | fi |
1272 | fi | |
1273 | done | |
1274 | IFS="$ac_save_ifs" | |
1275 | else | |
1276 | ac_cv_path_LD="$LD" # Let the user override the test with a path. | |
1277 | fi | |
1278 | fi | |
1279 | ||
1280 | LD="$ac_cv_path_LD" | |
1281 | if test -n "$LD"; then | |
1282 | echo "$ac_t""$LD" 1>&6 | |
1283 | else | |
1284 | echo "$ac_t""no" 1>&6 | |
1285 | fi | |
1286 | test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } | |
252b5132 | 1287 | echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 |
98e5953c | 1288 | echo "configure:1289: checking if the linker ($LD) is GNU ld" >&5 |
a2d91340 | 1289 | if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then |
252b5132 RH |
1290 | echo $ac_n "(cached) $ac_c" 1>&6 |
1291 | else | |
1292 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. | |
1293 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | |
1294 | ac_cv_prog_gnu_ld=yes | |
1295 | else | |
1296 | ac_cv_prog_gnu_ld=no | |
1297 | fi | |
1298 | fi | |
1299 | ||
1300 | echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 | |
1301 | ||
1302 | ||
1303 | echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 | |
98e5953c | 1304 | echo "configure:1305: checking for BSD-compatible nm" >&5 |
a2d91340 | 1305 | if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then |
252b5132 RH |
1306 | echo $ac_n "(cached) $ac_c" 1>&6 |
1307 | else | |
1308 | if test -n "$NM"; then | |
1309 | # Let the user override the test. | |
1310 | ac_cv_path_NM="$NM" | |
1311 | else | |
a74801ba | 1312 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
bedf545c | 1313 | for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do |
252b5132 | 1314 | test -z "$ac_dir" && ac_dir=. |
a74801ba | 1315 | if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then |
252b5132 RH |
1316 | # Check to see if the nm accepts a BSD-compat flag. |
1317 | # Adding the `sed 1q' prevents false positives on HP-UX, which says: | |
1318 | # nm: unknown option "B" ignored | |
1319 | if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then | |
bedf545c ILT |
1320 | ac_cv_path_NM="$ac_dir/nm -B" |
1321 | break | |
252b5132 | 1322 | elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then |
bedf545c ILT |
1323 | ac_cv_path_NM="$ac_dir/nm -p" |
1324 | break | |
252b5132 | 1325 | else |
bedf545c ILT |
1326 | ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but |
1327 | continue # so that we can try to find one that supports BSD flags | |
252b5132 | 1328 | fi |
252b5132 RH |
1329 | fi |
1330 | done | |
1331 | IFS="$ac_save_ifs" | |
1332 | test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm | |
1333 | fi | |
1334 | fi | |
1335 | ||
1336 | NM="$ac_cv_path_NM" | |
1337 | echo "$ac_t""$NM" 1>&6 | |
1338 | ||
252b5132 | 1339 | echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 |
98e5953c | 1340 | echo "configure:1341: checking whether ln -s works" >&5 |
a2d91340 | 1341 | if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then |
252b5132 RH |
1342 | echo $ac_n "(cached) $ac_c" 1>&6 |
1343 | else | |
1344 | rm -f conftestdata | |
1345 | if ln -s X conftestdata 2>/dev/null | |
1346 | then | |
1347 | rm -f conftestdata | |
1348 | ac_cv_prog_LN_S="ln -s" | |
1349 | else | |
1350 | ac_cv_prog_LN_S=ln | |
1351 | fi | |
1352 | fi | |
1353 | LN_S="$ac_cv_prog_LN_S" | |
1354 | if test "$ac_cv_prog_LN_S" = "ln -s"; then | |
1355 | echo "$ac_t""yes" 1>&6 | |
1356 | else | |
1357 | echo "$ac_t""no" 1>&6 | |
1358 | fi | |
1359 | ||
252b5132 | 1360 | |
a74801ba ILT |
1361 | case "$target" in |
1362 | NONE) lt_target="$host" ;; | |
1363 | *) lt_target="$target" ;; | |
1364 | esac | |
252b5132 RH |
1365 | |
1366 | # Check for any special flags to pass to ltconfig. | |
bedf545c | 1367 | libtool_flags="--cache-file=$cache_file" |
252b5132 RH |
1368 | test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" |
1369 | test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" | |
bedf545c | 1370 | test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" |
252b5132 RH |
1371 | test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" |
1372 | test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" | |
1373 | ||
a74801ba ILT |
1374 | |
1375 | # Check whether --enable-libtool-lock or --disable-libtool-lock was given. | |
1376 | if test "${enable_libtool_lock+set}" = set; then | |
1377 | enableval="$enable_libtool_lock" | |
1378 | : | |
1379 | fi | |
1380 | ||
1381 | test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" | |
1382 | test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" | |
1383 | ||
252b5132 RH |
1384 | # Some flags need to be propagated to the compiler or linker for good |
1385 | # libtool support. | |
a74801ba | 1386 | case "$lt_target" in |
252b5132 RH |
1387 | *-*-irix6*) |
1388 | # Find out which ABI we are using. | |
98e5953c JL |
1389 | echo '#line 1390 "configure"' > conftest.$ac_ext |
1390 | if { (eval echo configure:1391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then | |
252b5132 RH |
1391 | case "`/usr/bin/file conftest.o`" in |
1392 | *32-bit*) | |
1393 | LD="${LD-ld} -32" | |
1394 | ;; | |
1395 | *N32*) | |
1396 | LD="${LD-ld} -n32" | |
1397 | ;; | |
1398 | *64-bit*) | |
1399 | LD="${LD-ld} -64" | |
1400 | ;; | |
1401 | esac | |
1402 | fi | |
1403 | rm -rf conftest* | |
1404 | ;; | |
1405 | ||
1406 | *-*-sco3.2v5*) | |
1407 | # On SCO OpenServer 5, we need -belf to get full-featured binaries. | |
bedf545c | 1408 | SAVE_CFLAGS="$CFLAGS" |
252b5132 | 1409 | CFLAGS="$CFLAGS -belf" |
bedf545c | 1410 | echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 |
98e5953c | 1411 | echo "configure:1412: checking whether the C compiler needs -belf" >&5 |
a2d91340 | 1412 | if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then |
bedf545c ILT |
1413 | echo $ac_n "(cached) $ac_c" 1>&6 |
1414 | else | |
1415 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 1416 | #line 1417 "configure" |
bedf545c ILT |
1417 | #include "confdefs.h" |
1418 | ||
1419 | int main() { | |
1420 | ||
1421 | ; return 0; } | |
1422 | EOF | |
98e5953c | 1423 | if { (eval echo configure:1424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
bedf545c ILT |
1424 | rm -rf conftest* |
1425 | lt_cv_cc_needs_belf=yes | |
1426 | else | |
1427 | echo "configure: failed program was:" >&5 | |
1428 | cat conftest.$ac_ext >&5 | |
1429 | rm -rf conftest* | |
1430 | lt_cv_cc_needs_belf=no | |
1431 | fi | |
1432 | rm -f conftest* | |
1433 | fi | |
1434 | ||
1435 | echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6 | |
1436 | if test x"$lt_cv_cc_needs_belf" != x"yes"; then | |
1437 | # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf | |
1438 | CFLAGS="$SAVE_CFLAGS" | |
1439 | fi | |
252b5132 RH |
1440 | ;; |
1441 | ||
252b5132 RH |
1442 | |
1443 | esac | |
1444 | ||
bedf545c ILT |
1445 | |
1446 | # Save cache, so that ltconfig can load it | |
1447 | cat > confcache <<\EOF | |
1448 | # This file is a shell script that caches the results of configure | |
1449 | # tests run on this system so they can be shared between configure | |
1450 | # scripts and configure runs. It is not useful on other systems. | |
1451 | # If it contains results you don't want to keep, you may remove or edit it. | |
1452 | # | |
1453 | # By default, configure uses ./config.cache as the cache file, | |
1454 | # creating it if it does not exist already. You can give configure | |
1455 | # the --cache-file=FILE option to use a different cache file; that is | |
1456 | # what configure does when it calls configure scripts in | |
1457 | # subdirectories, so they share the cache. | |
1458 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
1459 | # config.status only pays attention to the cache file if you give it the | |
1460 | # --recheck option to rerun configure. | |
1461 | # | |
1462 | EOF | |
1463 | # The following way of writing the cache mishandles newlines in values, | |
1464 | # but we know of no workaround that is simple, portable, and efficient. | |
1465 | # So, don't put newlines in cache variables' values. | |
1466 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
1467 | # and sets the high bit in the cache file unless we assign to the vars. | |
1468 | (set) 2>&1 | | |
1469 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
1470 | *ac_space=\ *) | |
1471 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
1472 | # turns \\\\ into \\, and sed turns \\ into \). | |
1473 | sed -n \ | |
1474 | -e "s/'/'\\\\''/g" \ | |
1475 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
1476 | ;; | |
1477 | *) | |
1478 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
1479 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
1480 | ;; | |
1481 | esac >> confcache | |
1482 | if cmp -s $cache_file confcache; then | |
1483 | : | |
1484 | else | |
1485 | if test -w $cache_file; then | |
1486 | echo "updating cache $cache_file" | |
1487 | cat confcache > $cache_file | |
1488 | else | |
1489 | echo "not updating unwritable cache $cache_file" | |
1490 | fi | |
1491 | fi | |
1492 | rm -f confcache | |
1493 | ||
1494 | ||
252b5132 RH |
1495 | # Actually configure libtool. ac_aux_dir is where install-sh is found. |
1496 | CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ | |
a74801ba ILT |
1497 | LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \ |
1498 | LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \ | |
1499 | DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \ | |
252b5132 | 1500 | ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \ |
a74801ba | 1501 | $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \ |
252b5132 RH |
1502 | || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } |
1503 | ||
bedf545c ILT |
1504 | # Reload cache, that may have been modified by ltconfig |
1505 | if test -r "$cache_file"; then | |
1506 | echo "loading cache $cache_file" | |
a2d91340 | 1507 | . $cache_file |
bedf545c ILT |
1508 | else |
1509 | echo "creating cache $cache_file" | |
1510 | > $cache_file | |
1511 | fi | |
1512 | ||
1513 | ||
1514 | # This can be used to rebuild libtool when needed | |
1515 | LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" | |
1516 | ||
1517 | # Always use our own libtool. | |
1518 | LIBTOOL='$(SHELL) $(top_builddir)/libtool' | |
1519 | ||
252b5132 RH |
1520 | # Redirect the config.log output again, so that the ltconfig log is not |
1521 | # clobbered by the next message. | |
1522 | exec 5>>./config.log | |
1523 | ||
1524 | ||
1525 | user_bfd_gas= | |
1526 | # Check whether --enable-bfd-assembler or --disable-bfd-assembler was given. | |
1527 | if test "${enable_bfd_assembler+set}" = set; then | |
1528 | enableval="$enable_bfd_assembler" | |
1529 | case "${enableval}" in | |
1530 | yes) need_bfd=yes user_bfd_gas=yes ;; | |
1531 | no) user_bfd_gas=no ;; | |
1532 | *) { echo "configure: error: bad value ${enableval} given for bfd-assembler option" 1>&2; exit 1; } ;; | |
1533 | esac | |
1534 | fi | |
1535 | # Check whether --enable-targets or --disable-targets was given. | |
1536 | if test "${enable_targets+set}" = set; then | |
1537 | enableval="$enable_targets" | |
1538 | case "${enableval}" in | |
1539 | yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; } | |
1540 | ;; | |
1541 | no) enable_targets= ;; | |
1542 | *) enable_targets=$enableval ;; | |
1543 | esac | |
1544 | fi | |
1545 | # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given. | |
1546 | if test "${enable_commonbfdlib+set}" = set; then | |
1547 | enableval="$enable_commonbfdlib" | |
1548 | case "${enableval}" in | |
1549 | yes) commonbfdlib=true ;; | |
1550 | no) commonbfdlib=false ;; | |
1551 | *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;; | |
1552 | esac | |
1553 | fi | |
1554 | ||
1555 | using_cgen=no | |
1556 | ||
a2d91340 AC |
1557 | build_warnings="-W -Wall" |
1558 | # Check whether --enable-build-warnings or --disable-build-warnings was given. | |
1559 | if test "${enable_build_warnings+set}" = set; then | |
1560 | enableval="$enable_build_warnings" | |
1561 | case "${enableval}" in | |
1562 | yes) ;; | |
1563 | no) build_warnings="-w";; | |
1564 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
1565 | build_warnings="${build_warnings} ${t}";; | |
1566 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
1567 | build_warnings="${t} ${build_warnings}";; | |
1568 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
1569 | esac | |
1570 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
1571 | echo "Setting warning flags = $build_warnings" 6>&1 | |
1572 | fi | |
1573 | fi | |
1574 | WARN_CFLAGS="" | |
1575 | if test "x${build_warnings}" != x -a "x$GCC" = xyes ; then | |
1576 | WARN_CFLAGS="${build_warnings}" | |
1577 | fi | |
1578 | ||
1579 | ||
252b5132 RH |
1580 | # Generate a header file |
1581 | ||
1582 | ||
1583 | ||
1584 | ||
76a27922 ILT |
1585 | # If we are on a DOS filesystem, we must use gdb.ini rather than |
1586 | # .gdbinit. | |
1587 | GDBINIT=".gdbinit" | |
1588 | case "${host}" in | |
1589 | *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*) | |
1590 | GDBINIT="gdb.ini" | |
1591 | ;; | |
1592 | esac | |
1593 | ||
1594 | ||
252b5132 RH |
1595 | te_file=generic |
1596 | ||
1597 | # Makefile target for installing gas in $(tooldir)/bin. | |
1598 | install_tooldir=install-exec-tooldir | |
1599 | ||
1600 | canon_targets="" | |
15886821 | 1601 | all_targets=no |
252b5132 RH |
1602 | if test -n "$enable_targets" ; then |
1603 | for t in `echo $enable_targets | sed 's/,/ /g'`; do | |
15886821 L |
1604 | if test $t = "all"; then |
1605 | all_targets=yes | |
1606 | continue | |
1607 | fi | |
6d83c84b | 1608 | result=`$ac_config_sub $t 2>/dev/null` |
252b5132 RH |
1609 | if test -n "$result" ; then |
1610 | canon_targets="$canon_targets $result" | |
1611 | # else | |
1612 | # # Permit "all", etc. We don't support it yet though. | |
1613 | # canon_targets="$canon_targets $t" | |
1614 | fi | |
1615 | done | |
1616 | _gas_uniq_list="$canon_targets" | |
1617 | _gas_uniq_newlist="" | |
1618 | for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do | |
1619 | case $_gas_uniq_i in | |
1620 | _gas_uniq_dummy) ;; | |
1621 | *) case " $_gas_uniq_newlist " in | |
1622 | *" $_gas_uniq_i "*) ;; | |
1623 | *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;; | |
1624 | esac ;; | |
1625 | esac | |
1626 | done | |
1627 | canon_targets=$_gas_uniq_newlist | |
1628 | ||
1629 | fi | |
1630 | ||
1631 | emulations="" | |
1632 | ||
1633 | for this_target in $target $canon_targets ; do | |
1634 | ||
1635 | eval `echo $this_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/cpu=\1 vendor=\2 os=\3/'` | |
1636 | ||
1637 | # check for architecture variants | |
1638 | arch= | |
1639 | endian= | |
1640 | case ${cpu} in | |
1641 | alpha*) cpu_type=alpha ;; | |
1642 | armeb) cpu_type=arm endian=big ;; | |
1643 | arm*) cpu_type=arm endian=little ;; | |
1644 | armb*) cpu_type=arm endian=little ;; | |
1645 | armv*l) cpu_type=arm endian=little ;; | |
1646 | armv*b) cpu_type=arm endian=big ;; | |
1647 | strongarm*) cpu_type=arm endian=little ;; | |
1648 | thumb*) cpu_type=arm endian=little ;; | |
1649 | hppa*) cpu_type=hppa ;; | |
1650 | i[456]86) cpu_type=i386 ;; | |
800eeca4 | 1651 | ia64) cpu_type=ia64 ;; |
252b5132 RH |
1652 | m680[012346]0) cpu_type=m68k ;; |
1653 | m68008) cpu_type=m68k ;; | |
1654 | m683??) cpu_type=m68k ;; | |
1655 | m5200) cpu_type=m68k ;; | |
1656 | m8*) cpu_type=m88k ;; | |
1657 | mips*el) cpu_type=mips endian=little ;; | |
1658 | mips*) cpu_type=mips endian=big ;; | |
041dd5a9 ILT |
1659 | pjl*) cpu_type=pj endian=little ;; |
1660 | pj*) cpu_type=pj endian=big ;; | |
252b5132 RH |
1661 | powerpcle*) cpu_type=ppc endian=little ;; |
1662 | powerpc*) cpu_type=ppc endian=big ;; | |
1663 | rs6000*) cpu_type=ppc ;; | |
1664 | sparclite*) cpu_type=sparc arch=sparclite ;; | |
1665 | sparclet*) cpu_type=sparc arch=sparclet ;; | |
1666 | sparc64*) cpu_type=sparc arch=v9-64 ;; | |
1667 | sparc86x*) cpu_type=sparc arch=sparc86x ;; | |
1668 | sparc*) cpu_type=sparc arch=sparclite ;; # ??? See tc-sparc.c. | |
1669 | v850*) cpu_type=v850 ;; | |
1670 | *) cpu_type=${cpu} ;; | |
1671 | esac | |
1672 | ||
1673 | if test ${this_target} = $target ; then | |
1674 | target_cpu_type=${cpu_type} | |
1675 | elif test ${target_cpu_type} != ${cpu_type} ; then | |
1676 | continue | |
1677 | fi | |
1678 | ||
1679 | generic_target=${cpu_type}-$vendor-$os | |
1680 | dev=no | |
1681 | bfd_gas=no | |
1682 | em=generic | |
1683 | ||
1684 | # assign object format | |
1685 | case ${generic_target} in | |
1686 | a29k-*-coff) fmt=coff ;; | |
1687 | a29k-amd-udi) fmt=coff ;; | |
1688 | a29k-amd-ebmon) fmt=coff ;; | |
1689 | a29k-nyu-sym1) fmt=coff ;; | |
1690 | a29k-*-vxworks*) fmt=coff ;; | |
1691 | ||
1692 | alpha*-*-*vms*) fmt=evax ;; | |
1693 | alpha*-*-netware*) fmt=ecoff ;; | |
1694 | alpha*-*-openbsd*) fmt=ecoff ;; | |
1695 | alpha*-*-osf*) fmt=ecoff ;; | |
1696 | alpha*-*-linuxecoff*) fmt=ecoff ;; | |
1697 | alpha*-*-linux-gnu*) fmt=elf em=linux ;; | |
1698 | alpha*-*-netbsd*) fmt=elf em=nbsd ;; | |
1699 | ||
1700 | arc-*-elf*) fmt=elf bfd_gas=yes ;; | |
1701 | ||
1702 | arm-*-aout) fmt=aout ;; | |
1703 | arm-*-coff | thumb-*-coff) fmt=coff ;; | |
1704 | arm-*-elf | thumb-*-elf) fmt=elf ;; | |
0decc840 | 1705 | arm*-*-conix*) fmt=elf ;; |
252b5132 | 1706 | arm-*-linux*aout*) fmt=aout em=linux ;; |
0decc840 | 1707 | arm*-*-linux-gnu*) fmt=elf em=linux ;; |
252b5132 RH |
1708 | arm-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; |
1709 | arm-*-oabi | thumb-*-oabi) fmt=elf ;; | |
1710 | arm-epoc-pe | thumb-epoc-pe) fmt=coff em=epoc-pe ;; | |
a74801ba | 1711 | arm-*-wince) fmt=coff em=wince-pe bfd_gas=yes;; |
252b5132 RH |
1712 | arm-*-pe | thumb-*-pe) fmt=coff em=pe ;; |
1713 | arm-*-riscix*) fmt=aout em=riscix ;; | |
1714 | ||
adde6300 AM |
1715 | avr-*-*) fmt=elf bfd_gas=yes ;; |
1716 | ||
252b5132 RH |
1717 | d10v-*-*) fmt=elf bfd_gas=yes ;; |
1718 | d30v-*-*) fmt=elf bfd_gas=yes ;; | |
1719 | ||
1720 | ||
1721 | fr30-*-*) fmt=elf bfd_gas=yes ;; | |
1722 | ||
1723 | hppa-*-*elf*) fmt=elf em=hppa ;; | |
7d4ce8a9 | 1724 | hppa-*-linux-gnu*) fmt=elf em=hppa ;; |
252b5132 RH |
1725 | hppa-*-lites*) fmt=elf em=hppa ;; |
1726 | hppa-*-osf*) fmt=som em=hppa ;; | |
1727 | hppa-*-rtems*) fmt=elf em=hppa ;; | |
1728 | hppa-*-hpux*) fmt=som em=hppa ;; | |
1729 | hppa-*-mpeix*) fmt=som em=hppa ;; | |
1730 | hppa-*-bsd*) fmt=som em=hppa ;; | |
1731 | hppa-*-hiux*) fmt=som em=hppa ;; | |
1732 | ||
1733 | h8300-*-coff) fmt=coff ;; | |
1734 | ||
5b93d8bb | 1735 | i370-*-elf* | i370-*-linux*) fmt=elf ;; |
252b5132 RH |
1736 | i386-ibm-aix*) fmt=coff em=i386aix ;; |
1737 | i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;; | |
1738 | i386-*-beospe*) fmt=coff em=pe bfd_gas=yes ;; | |
1739 | i386-*-beoself* | i386-*-beos*) fmt=elf bfd_gas=yes ;; | |
1740 | i386-*-bsd*) fmt=aout em=386bsd ;; | |
1741 | i386-*-netbsd0.8) fmt=aout em=386bsd ;; | |
1742 | i386-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes;; | |
1743 | i386-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes;; | |
1744 | i386-*-linux*aout* | i386-*-linuxoldld) fmt=aout em=linux ;; | |
1745 | i386-*-linux*coff*) fmt=coff em=linux ;; | |
1746 | i386-*-linux-gnu*) fmt=elf em=linux bfd_gas=yes ;; | |
1747 | i386-*-lynxos*) fmt=coff em=lynx ;; | |
1748 | i386-*-sysv4* | i386-*-solaris* | i386-*-elf) | |
1749 | fmt=elf bfd_gas=yes ;; | |
008960a5 ILT |
1750 | i386-*-freebsdaout* | i386-*-freebsd12.* | i386-*-freebsd12) |
1751 | fmt=aout em=386bsd ;; | |
1752 | i386-*-freebsd*) fmt=elf bfd_gas=yes ;; | |
252b5132 RH |
1753 | i386-*-coff | i386-*-sysv* | i386-*-sco3.2v5*coff | i386-*-isc*) |
1754 | fmt=coff ;; | |
1755 | i386-*-sco3.2v5*) fmt=elf | |
1756 | if test ${this_target} = $target; then | |
1757 | cat >> confdefs.h <<\EOF | |
1758 | #define SCO_ELF 1 | |
1759 | EOF | |
1760 | ||
1761 | fi | |
1762 | ;; | |
1763 | i386-*-sco3.2*) fmt=coff ;; | |
1764 | i386-*-vsta) fmt=aout ;; | |
1765 | i386-*-msdosdjgpp* | i386-*-go32* | i386-go32-rtems*) | |
1766 | fmt=coff em=go32;; | |
53f3de98 | 1767 | i386-*-rtemself*) fmt=elf ;; |
252b5132 RH |
1768 | i386-*-rtems*) fmt=coff ;; |
1769 | i386-*-gnu*) fmt=elf ;; | |
1770 | i386-*-mach*) | |
1771 | fmt=aout em=mach bfd_gas=yes ;; | |
1772 | i386-*-msdos*) fmt=aout ;; | |
1773 | i386-*-moss*) fmt=elf ;; | |
1774 | i386-*-pe) fmt=coff em=pe ;; | |
1775 | i386-*-cygwin*) fmt=coff em=pe bfd_gas=yes ;; | |
9750fcc5 | 1776 | i386-*-interix*) fmt=coff em=interix bfd_gas=yes ;; |
252b5132 RH |
1777 | i386-*-mingw32*) fmt=coff em=pe bfd_gas=yes ;; |
1778 | i386-*-*nt*) fmt=coff em=pe ;; | |
29fe79d3 | 1779 | i386-*-vxworks*) fmt=aout ;; |
252b5132 RH |
1780 | i960-*-bout) fmt=bout ;; |
1781 | i960-*-coff) fmt=coff em=ic960 ;; | |
1782 | i960-*-rtems*) fmt=coff em=ic960 ;; | |
1783 | i960-*-nindy*) fmt=bout ;; | |
1784 | i960-*-vxworks4*) fmt=bout ;; | |
1785 | i960-*-vxworks5.0) fmt=bout ;; | |
1786 | i960-*-vxworks5.*) fmt=coff em=ic960 ;; | |
1787 | i960-*-vxworks*) fmt=bout ;; | |
bedf545c | 1788 | i960-*-elf*) fmt=elf ;; |
252b5132 | 1789 | |
800eeca4 JW |
1790 | ia64-*-elf*) fmt=elf ;; |
1791 | ia64-*-linux-gnu*) fmt=elf em=linux ;; | |
1792 | ||
252b5132 RH |
1793 | m32r-*-*) fmt=elf bfd_gas=yes ;; |
1794 | ||
1795 | m68k-*-vxworks* | m68k-ericsson-ose | m68k-*-sunos*) | |
1796 | fmt=aout em=sun3 ;; | |
1797 | m68k-motorola-sysv*) fmt=coff em=delta ;; | |
1798 | m68k-bull-sysv3*) fmt=coff em=dpx2 ;; | |
1799 | m68k-apollo-*) fmt=coff em=apollo ;; | |
1800 | m68k-*-sysv4*) # must be before -sysv* | |
1801 | fmt=elf em=svr4 ;; | |
1802 | m68k-*-elf*) fmt=elf ;; | |
1803 | m68k-*-coff | m68k-*-sysv* | m68k-*-rtems*) | |
1804 | fmt=coff ;; | |
1805 | m68k-*-hpux*) fmt=hp300 em=hp300 ;; | |
1806 | m68k-*-linux*aout*) fmt=aout em=linux ;; | |
1807 | m68k-*-linux-gnu*) fmt=elf em=linux ;; | |
1808 | m68k-*-gnu*) fmt=elf ;; | |
1809 | m68k-*-lynxos*) fmt=coff em=lynx ;; | |
1810 | m68k-*-netbsd*) fmt=aout em=nbsd bfd_gas=yes ;; | |
1811 | m68k-*-openbsd*) fmt=aout em=nbsd bfd_gas=yes ;; | |
1812 | m68k-apple-aux*) fmt=coff em=aux ;; | |
1813 | m68k-*-psos*) fmt=elf em=psos;; | |
1814 | ||
1815 | m88k-motorola-sysv3*) fmt=coff em=delt88 ;; | |
1816 | m88k-*-coff*) fmt=coff ;; | |
1817 | ||
1818 | mcore-*-elf) fmt=elf bfd_gas=yes ;; | |
1819 | mcore-*-pe) fmt=coff em=pe bfd_gas=yes ;; | |
1820 | ||
1821 | # don't change em like *-*-bsd does | |
1822 | mips-dec-netbsd*) fmt=elf endian=little ;; | |
1823 | mips-dec-openbsd*) fmt=elf endian=little ;; | |
1824 | mips-dec-bsd*) fmt=aout endian=little ;; | |
1825 | mips-sony-bsd*) fmt=ecoff ;; | |
1826 | mips-*-bsd*) { echo "configure: error: Unknown vendor for mips-bsd configuration." 1>&2; exit 1; } ;; | |
1827 | mips-*-ultrix*) fmt=ecoff endian=little ;; | |
1828 | mips-*-osf*) fmt=ecoff endian=little ;; | |
1829 | mips-*-ecoff*) fmt=ecoff ;; | |
1830 | mips-*-ecoff*) fmt=ecoff ;; | |
056350c6 | 1831 | mips-*-pe*) fmt=coff endian=little em=pe ;; |
252b5132 RH |
1832 | mips-*-irix6*) fmt=elf ;; |
1833 | mips-*-irix5*) fmt=elf ;; | |
1834 | mips-*-irix*) fmt=ecoff ;; | |
1835 | mips-*-lnews*) fmt=ecoff em=lnews ;; | |
1836 | mips-*-riscos*) fmt=ecoff ;; | |
1837 | mips-*-sysv*) fmt=ecoff ;; | |
1838 | mips-*-elf* | mips-*-rtems* | mips-*-linux-gnu* | mips-*-gnu* | mips-*-openbsd*) | |
1839 | fmt=elf ;; | |
1840 | mips-*-vxworks*) fmt=elf | |
1841 | cat >> confdefs.h <<\EOF | |
1842 | #define MIPS_STABS_ELF 1 | |
1843 | EOF | |
1844 | ||
1845 | ;; | |
1846 | mn10200-*-*) fmt=elf bfd_gas=yes ;; | |
1847 | mn10300-*-*) fmt=elf bfd_gas=yes ;; | |
041dd5a9 | 1848 | pj*) fmt=elf ;; |
252b5132 RH |
1849 | ppc-*-pe | ppc-*-cygwin* | ppc-*-winnt*) |
1850 | fmt=coff em=pe ;; | |
1851 | ppc-*-aix*) fmt=coff ;; | |
1852 | ppc-*-beos*) fmt=coff ;; | |
1853 | ppc-*-*bsd* | ppc-*-elf* | ppc-*-eabi* | ppc-*-sysv4*) | |
1854 | fmt=elf ;; | |
1855 | ppc-*-linux-gnu*) fmt=elf | |
1856 | case "$endian" in | |
1857 | big) ;; | |
1858 | *) { echo "configure: error: GNU/Linux must be configured big endian" 1>&2; exit 1; } ;; | |
1859 | esac | |
1860 | ;; | |
1861 | ppc-*-solaris*) fmt=elf | |
1862 | if test ${this_target} = $target; then | |
1863 | cat >> confdefs.h <<\EOF | |
1864 | #define TARGET_SOLARIS_COMMENT 1 | |
1865 | EOF | |
1866 | ||
1867 | fi | |
1868 | if test x${endian} = xbig; then | |
1869 | { echo "configure: error: Solaris must be configured little endian" 1>&2; exit 1; } | |
1870 | fi | |
1871 | ;; | |
1872 | ppc-*-rtems*) fmt=elf ;; | |
1873 | ppc-*-macos* | ppc-*-mpw*) | |
1874 | fmt=coff em=macos ;; | |
1875 | ppc-*-netware*) fmt=elf em=ppcnw ;; | |
e4a86f6f | 1876 | ppc-*-vxworks*) fmt=elf ;; |
252b5132 RH |
1877 | |
1878 | sh-*-elf*) fmt=elf ;; | |
1879 | sh-*-coff*) fmt=coff ;; | |
056350c6 | 1880 | sh-*-pe*) fmt=coff em=pe bfd_gas=yes;; |
53f3de98 | 1881 | sh-*-rtemself*) fmt=elf ;; |
252b5132 RH |
1882 | sh-*-rtems*) fmt=coff ;; |
1883 | ||
1884 | ns32k-pc532-mach* | ns32k-pc532-ux*) fmt=aout em=pc532mach ;; | |
1885 | ns32k-pc532-netbsd* | ns32k-pc532-lites*) fmt=aout em=nbsd532 ;; | |
1886 | ns32k-pc532-openbsd*) fmt=aout em=nbsd532 ;; | |
1887 | ||
1888 | sparc-*-rtems*) fmt=aout ;; | |
1889 | sparc-*-sunos4*) fmt=aout em=sun3 ;; | |
1890 | sparc-*-aout | sparc*-*-vxworks*) | |
1891 | fmt=aout em=sparcaout ;; | |
1892 | sparc-*-coff) fmt=coff ;; | |
1893 | sparc-*-linux*aout*) fmt=aout em=linux ;; | |
1894 | sparc-*-linux-gnu*) fmt=elf em=linux ;; | |
1895 | sparc-*-lynxos*) fmt=coff em=lynx ;; | |
1896 | sparc-fujitsu-none) fmt=aout ;; | |
1897 | sparc-*-elf | sparc-*-sysv4* | sparc-*-solaris*) | |
1898 | fmt=elf ;; | |
98e5953c JL |
1899 | sparc-*-netbsd*) em=nbsd bfd_gas=yes |
1900 | case ${cpu} in | |
1901 | sparc) case ${os} in | |
1902 | *elf*) fmt=elf ;; | |
1903 | *) fmt=aout ;; | |
1904 | esac ;; | |
1905 | sparc64) fmt=elf ;; | |
1906 | esac | |
1907 | ;; | |
252b5132 RH |
1908 | sparc-*-openbsd*) fmt=aout em=nbsd ;; |
1909 | ||
1910 | strongarm-*-coff) fmt=coff ;; | |
1911 | strongarm-*-elf) fmt=elf ;; | |
1912 | ||
1913 | tic30-*-*aout*) fmt=aout bfd_gas=yes ;; | |
1914 | tic30-*-*coff*) fmt=coff bfd_gas=yes ;; | |
1915 | tic80-*-*) fmt=coff ;; | |
1916 | ||
1917 | v850-*-*) fmt=elf bfd_gas=yes ;; | |
1918 | v850e-*-*) fmt=elf bfd_gas=yes ;; | |
1919 | v850ea-*-*) fmt=elf bfd_gas=yes ;; | |
1920 | ||
1921 | vax-*-bsd* | vax-*-ultrix*) | |
1922 | fmt=aout ;; | |
1923 | vax-*-vms) fmt=vms ;; | |
1924 | ||
1925 | ||
1926 | z8k-*-coff | z8k-*-sim) | |
1927 | fmt=coff ;; | |
1928 | ||
1929 | w65-*-*) fmt=coff ;; | |
1930 | ||
1931 | *-*-aout | *-*-scout) | |
1932 | fmt=aout ;; | |
1933 | *-*-nindy*) | |
1934 | fmt=bout ;; | |
1935 | *-*-bsd*) | |
1936 | fmt=aout em=sun3 ;; | |
1937 | *-*-generic) fmt=generic ;; | |
1938 | *-*-xray | *-*-hms) fmt=coff ;; | |
1939 | *-*-sim) fmt=coff ;; | |
1940 | *-*-elf | *-*-sysv4* | *-*-solaris*) | |
1941 | echo "configure: warning: GAS support for ${generic_target} is incomplete." 1>&2 | |
1942 | fmt=elf dev=yes ;; | |
1943 | *-*-vxworks) fmt=aout ;; | |
1944 | *-*-netware) fmt=elf ;; | |
1945 | esac | |
1946 | ||
1947 | if test ${this_target} = $target ; then | |
1948 | endian_def= | |
1949 | if test x${endian} = xbig; then | |
1950 | endian_def=1 | |
1951 | elif test x${endian} = xlittle; then | |
1952 | endian_def=0 | |
1953 | fi | |
1954 | if test x${endian_def} != x; then | |
1955 | cat >> confdefs.h <<EOF | |
1956 | #define TARGET_BYTES_BIG_ENDIAN $endian_def | |
1957 | EOF | |
1958 | ||
1959 | fi | |
1960 | fi | |
1961 | ||
1962 | case ${cpu_type}-${fmt} in | |
1963 | alpha*-*) bfd_gas=yes ;; | |
1964 | arm-*) bfd_gas=yes ;; | |
1965 | # not yet | |
1966 | # i386-aout) bfd_gas=preferred ;; | |
800eeca4 | 1967 | ia64*-*) bfd_gas=yes ;; |
252b5132 RH |
1968 | mips-*) bfd_gas=yes ;; |
1969 | ns32k-*) bfd_gas=yes ;; | |
1970 | ppc-*) bfd_gas=yes ;; | |
1971 | sparc-*) bfd_gas=yes ;; | |
1972 | strongarm-*) bfd_gas=yes ;; | |
1973 | *-elf) bfd_gas=yes ;; | |
1974 | *-ecoff) bfd_gas=yes ;; | |
1975 | *-som) bfd_gas=yes ;; | |
4c63da97 AM |
1976 | #enable bfd for coff and aout to allow testing if a bfd target is |
1977 | #the primary target, but not for coff or aout as the primary target | |
4ca72d38 | 1978 | i386-coff) if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;; |
4c63da97 | 1979 | i386-aout) if test x${primary_bfd_gas} = xyes; then bfd_gas=yes; fi ;; |
252b5132 RH |
1980 | *) ;; |
1981 | esac | |
1982 | ||
1983 | # Other random stuff. | |
1984 | ||
1985 | # Do we need the opcodes library? | |
1986 | case ${cpu_type} in | |
1987 | vax | i386 | tic30) | |
1988 | ;; | |
1989 | ||
1990 | *) | |
1991 | need_opcodes=yes | |
1992 | ||
1993 | case "${enable_shared}" in | |
1994 | yes) shared_opcodes=true ;; | |
1995 | *opcodes*) shared_opcodes=true ;; | |
1996 | *) shared_opcodes=false ;; | |
1997 | esac | |
1998 | if test "${shared_opcodes}" = "true"; then | |
1999 | # A shared libopcodes must be linked against libbfd. | |
2000 | need_bfd=yes | |
2001 | fi | |
2002 | ;; | |
2003 | esac | |
2004 | ||
2005 | # Any other special object files needed ? | |
2006 | case ${cpu_type} in | |
2007 | fr30 | m32r) | |
2008 | using_cgen=yes | |
2009 | ;; | |
2010 | ||
2011 | m68k) | |
2012 | case ${extra_objects} in | |
2013 | *m68k-parse.o*) ;; | |
2014 | *) extra_objects="$extra_objects m68k-parse.o" ;; | |
2015 | esac | |
2016 | ;; | |
2017 | ||
2018 | mips) | |
2019 | echo ${extra_objects} | grep -s "itbl-parse.o" | |
2020 | if test $? -ne 0 ; then | |
2021 | extra_objects="$extra_objects itbl-parse.o" | |
2022 | fi | |
2023 | ||
2024 | echo ${extra_objects} | grep -s "itbl-lex.o" | |
2025 | if test $? -ne 0 ; then | |
2026 | extra_objects="$extra_objects itbl-lex.o" | |
2027 | fi | |
2028 | ||
2029 | echo ${extra_objects} | grep -s "itbl-ops.o" | |
2030 | if test $? -ne 0 ; then | |
2031 | extra_objects="$extra_objects itbl-ops.o" | |
2032 | fi | |
2033 | ;; | |
2034 | ||
2035 | sparc) | |
2036 | if test $this_target = $target ; then | |
2037 | cat >> confdefs.h <<EOF | |
2038 | #define DEFAULT_ARCH "${arch}" | |
2039 | EOF | |
2040 | ||
2041 | fi | |
2042 | ;; | |
2043 | *) | |
2044 | ;; | |
2045 | esac | |
2046 | ||
2047 | if test $using_cgen = yes ; then | |
2048 | case "x${extra_objects}" in | |
2049 | *cgen.o*) ;; | |
2050 | *) extra_objects="$extra_objects cgen.o" ;; | |
2051 | esac | |
2052 | fi | |
2053 | ||
2054 | # See if we really can support this configuration with the emulation code. | |
2055 | ||
2056 | if test $this_target = $target ; then | |
2057 | primary_bfd_gas=$bfd_gas | |
2058 | obj_format=$fmt | |
2059 | te_file=$em | |
2060 | ||
2061 | if test $bfd_gas = no ; then | |
2062 | # Can't support other configurations this way. | |
2063 | break | |
2064 | fi | |
2065 | elif test $bfd_gas = no ; then | |
2066 | # Can't support this configuration. | |
2067 | break | |
2068 | fi | |
2069 | ||
2070 | # From target name and format, produce a list of supported emulations. | |
2071 | ||
2072 | case ${generic_target}-${fmt} in | |
2073 | mips-*-irix5*-*) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; | |
2074 | mips-*-linux-gnu*-*) case "$endian" in | |
2075 | big) emulation="mipsbelf mipslelf mipself mipsbecoff mipslecoff mipsecoff" ;; | |
2076 | *) emulation="mipslelf mipsbelf mipself mipslecoff mipsbecoff mipsecoff" ;; | |
2077 | esac ;; | |
2078 | mips-*-lnews*-ecoff) ;; | |
2079 | mips-*-*-ecoff) case "$endian" in | |
2080 | big) emulation="mipsbecoff mipslecoff mipsecoff" ;; | |
2081 | *) emulation="mipslecoff mipsbecoff mipsecoff" ;; | |
2082 | esac ;; | |
2083 | mips-*-*-elf) case "$endian" in | |
2084 | big) emulation="mipsbelf mipslelf mipself" ;; | |
2085 | *) emulation="mipslelf mipsbelf mipself" ;; | |
252b5132 | 2086 | esac ;; |
4c63da97 AM |
2087 | # Uncommenting the next line will turn on support for i386 AOUT |
2088 | # for the default linux configuration | |
2089 | # i386-*-linux*-elf) emulation="i386elf i386aout" ;; | |
2090 | # | |
2091 | i386-*-aout) emulation="i386aout" ;; | |
4ca72d38 | 2092 | i386-*-coff) emulation="i386coff" ;; |
4c63da97 | 2093 | i386-*-elf) emulation="i386elf" ;; |
252b5132 RH |
2094 | esac |
2095 | ||
2096 | emulations="$emulations $emulation" | |
2097 | ||
2098 | done | |
2099 | ||
15886821 L |
2100 | # Turn on all targets if possible |
2101 | if test ${all_targets} = "yes"; then | |
2102 | case ${target_cpu_type} in | |
2103 | i386) | |
2104 | case ${obj_format} in | |
2105 | aout) | |
2106 | emulations="$emulations i386coff i386elf" | |
2107 | ;; | |
2108 | coff) | |
2109 | emulations="$emulations i386aout i386elf" | |
2110 | ;; | |
2111 | elf) | |
2112 | emulations="$emulations i386aout i386coff" | |
2113 | ;; | |
2114 | esac | |
2115 | ;; | |
2116 | esac | |
2117 | fi | |
2118 | ||
252b5132 RH |
2119 | # Assign floating point type. Most processors with FP support |
2120 | # IEEE FP. On those that don't support FP at all, usually IEEE | |
2121 | # is emulated. | |
2122 | case ${target_cpu} in | |
2123 | vax | tahoe ) atof=${target_cpu} ;; | |
2124 | *) atof=ieee ;; | |
2125 | esac | |
2126 | ||
2127 | case "${obj_format}" in | |
2128 | "") { echo "configure: error: GAS does not know what format to use for target ${target}" 1>&2; exit 1; } ;; | |
2129 | esac | |
2130 | ||
2131 | # Unfortunately the cpu in cpu-opc.h file isn't always $(TARGET_CPU). | |
2132 | cgen_cpu_prefix="" | |
2133 | if test $using_cgen = yes ; then | |
2134 | case ${target_cpu} in | |
2135 | *) cgen_cpu_prefix=${target_cpu} ;; | |
2136 | esac | |
2137 | ||
2138 | cat >> confdefs.h <<\EOF | |
2139 | #define USING_CGEN 1 | |
2140 | EOF | |
2141 | ||
2142 | fi | |
2143 | ||
2144 | ||
2145 | if test ! -r ${srcdir}/config/tc-${target_cpu_type}.c; then | |
2146 | { echo "configure: error: GAS does not support target CPU ${target_cpu_type}" 1>&2; exit 1; } | |
2147 | fi | |
2148 | ||
2149 | if test ! -r ${srcdir}/config/obj-${obj_format}.c; then | |
2150 | { echo "configure: error: GAS does not have support for object file format ${obj_format}" 1>&2; exit 1; } | |
2151 | fi | |
2152 | ||
2153 | case ${user_bfd_gas}-${primary_bfd_gas} in | |
2154 | yes-yes | no-no) | |
2155 | # We didn't override user's choice. | |
2156 | ;; | |
2157 | no-yes) | |
2158 | echo "configure: warning: Use of BFD is required for ${target}; overriding config options." 1>&2 | |
2159 | ;; | |
2160 | no-preferred) | |
2161 | primary_bfd_gas=no | |
2162 | ;; | |
2163 | *-preferred) | |
2164 | primary_bfd_gas=yes | |
2165 | ;; | |
2166 | yes-*) | |
2167 | primary_bfd_gas=yes | |
2168 | ;; | |
2169 | -*) | |
2170 | # User specified nothing. | |
2171 | ;; | |
2172 | esac | |
2173 | ||
2174 | # Some COFF configurations want these random other flags set. | |
2175 | case ${obj_format} in | |
2176 | coff) | |
2177 | case ${target_cpu_type} in | |
2178 | i386) cat >> confdefs.h <<\EOF | |
2179 | #define I386COFF 1 | |
2180 | EOF | |
2181 | ;; | |
2182 | m68k) cat >> confdefs.h <<\EOF | |
2183 | #define M68KCOFF 1 | |
2184 | EOF | |
2185 | ;; | |
2186 | m88k) cat >> confdefs.h <<\EOF | |
2187 | #define M88KCOFF 1 | |
2188 | EOF | |
2189 | ;; | |
2190 | esac | |
2191 | ;; | |
2192 | esac | |
2193 | ||
2194 | # Getting this done right is going to be a bitch. Each configuration specified | |
2195 | # with --enable-targets=... should be checked for environment, format, cpu, and | |
2196 | # bfd_gas setting. | |
2197 | # | |
2198 | # For each configuration, the necessary object file support code must be linked | |
2199 | # in. This might be only one, it might be up to four. The necessary emulation | |
2200 | # code needs to be provided, too. | |
2201 | # | |
2202 | # And then there's "--enable-targets=all".... | |
2203 | # | |
2204 | # For now, just always do it for MIPS ELF or ECOFF configurations. Sigh. | |
2205 | ||
2206 | formats="${obj_format}" | |
2207 | emfiles="" | |
2208 | EMULATIONS="" | |
2209 | _gas_uniq_list="$emulations" | |
2210 | _gas_uniq_newlist="" | |
2211 | for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do | |
2212 | case $_gas_uniq_i in | |
2213 | _gas_uniq_dummy) ;; | |
2214 | *) case " $_gas_uniq_newlist " in | |
2215 | *" $_gas_uniq_i "*) ;; | |
2216 | *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;; | |
2217 | esac ;; | |
2218 | esac | |
2219 | done | |
2220 | emulations=$_gas_uniq_newlist | |
2221 | ||
2222 | for em in . $emulations ; do | |
2223 | case $em in | |
2224 | .) continue ;; | |
2225 | mipsbelf | mipslelf) | |
2226 | fmt=elf file=mipself ;; | |
2227 | mipsbecoff | mipslecoff) | |
2228 | fmt=ecoff file=mipsecoff ;; | |
4c63da97 AM |
2229 | i386aout) |
2230 | fmt=aout file=i386aout ;; | |
252b5132 RH |
2231 | i386coff) |
2232 | fmt=coff file=i386coff ;; | |
2233 | i386elf) | |
2234 | fmt=elf file=i386elf ;; | |
2235 | esac | |
2236 | formats="$formats $fmt" | |
2237 | emfiles="$emfiles e-$file.o" | |
2238 | EMULATIONS="$EMULATIONS &$em," | |
2239 | done | |
2240 | _gas_uniq_list="$formats" | |
2241 | _gas_uniq_newlist="" | |
2242 | for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do | |
2243 | case $_gas_uniq_i in | |
2244 | _gas_uniq_dummy) ;; | |
2245 | *) case " $_gas_uniq_newlist " in | |
2246 | *" $_gas_uniq_i "*) ;; | |
2247 | *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;; | |
2248 | esac ;; | |
2249 | esac | |
2250 | done | |
2251 | formats=$_gas_uniq_newlist | |
2252 | ||
2253 | _gas_uniq_list="$emfiles" | |
2254 | _gas_uniq_newlist="" | |
2255 | for _gas_uniq_i in _gas_uniq_dummy $_gas_uniq_list ; do | |
2256 | case $_gas_uniq_i in | |
2257 | _gas_uniq_dummy) ;; | |
2258 | *) case " $_gas_uniq_newlist " in | |
2259 | *" $_gas_uniq_i "*) ;; | |
2260 | *) _gas_uniq_newlist="$_gas_uniq_newlist $_gas_uniq_i" ;; | |
2261 | esac ;; | |
2262 | esac | |
2263 | done | |
2264 | emfiles=$_gas_uniq_newlist | |
2265 | ||
2266 | if test `set . $formats ; shift ; echo $#` -gt 1 ; then | |
2267 | for fmt in $formats ; do | |
2268 | case $fmt in | |
2269 | aout) cat >> confdefs.h <<\EOF | |
2270 | #define OBJ_MAYBE_AOUT 1 | |
2271 | EOF | |
2272 | ;; | |
2273 | bout) cat >> confdefs.h <<\EOF | |
2274 | #define OBJ_MAYBE_BOUT 1 | |
2275 | EOF | |
2276 | ;; | |
2277 | coff) cat >> confdefs.h <<\EOF | |
2278 | #define OBJ_MAYBE_COFF 1 | |
2279 | EOF | |
2280 | ;; | |
2281 | ecoff) cat >> confdefs.h <<\EOF | |
2282 | #define OBJ_MAYBE_ECOFF 1 | |
2283 | EOF | |
2284 | ;; | |
2285 | elf) cat >> confdefs.h <<\EOF | |
2286 | #define OBJ_MAYBE_ELF 1 | |
2287 | EOF | |
2288 | ;; | |
2289 | generic) cat >> confdefs.h <<\EOF | |
2290 | #define OBJ_MAYBE_GENERIC 1 | |
2291 | EOF | |
2292 | ;; | |
2293 | hp300) cat >> confdefs.h <<\EOF | |
2294 | #define OBJ_MAYBE_HP300 1 | |
2295 | EOF | |
2296 | ;; | |
2297 | ieee) cat >> confdefs.h <<\EOF | |
2298 | #define OBJ_MAYBE_IEEE 1 | |
2299 | EOF | |
2300 | ;; | |
2301 | som) cat >> confdefs.h <<\EOF | |
2302 | #define OBJ_MAYBE_SOM 1 | |
2303 | EOF | |
2304 | ;; | |
2305 | vms) cat >> confdefs.h <<\EOF | |
2306 | #define OBJ_MAYBE_VMS 1 | |
2307 | EOF | |
2308 | ;; | |
2309 | esac | |
2310 | extra_objects="$extra_objects obj-$fmt.o" | |
2311 | done | |
2312 | obj_format=multi | |
2313 | fi | |
2314 | if test `set . $emfiles ; shift ; echo $#` -gt 0 ; then | |
252b5132 | 2315 | DEFAULT_EMULATION=`set . $emulations ; echo $2` |
4ca72d38 AM |
2316 | # e-mips* has more than one emulation per file, e-i386* has just one at the |
2317 | # moment. If only one emulation is specified, then don't define | |
2318 | # USE_EMULATIONS or include any of the e-files as they will only be bloat. | |
2319 | case "${obj_format}${emfiles}" in | |
2320 | multi* | *mips*) | |
4ca72d38 AM |
2321 | extra_objects="$extra_objects $emfiles" |
2322 | cat >> confdefs.h <<\EOF | |
252b5132 RH |
2323 | #define USE_EMULATIONS 1 |
2324 | EOF | |
4ca72d38 AM |
2325 | ;; |
2326 | esac | |
252b5132 RH |
2327 | fi |
2328 | ||
2329 | cat >> confdefs.h <<EOF | |
2330 | #define EMULATIONS $EMULATIONS | |
2331 | EOF | |
2332 | ||
2333 | cat >> confdefs.h <<EOF | |
2334 | #define DEFAULT_EMULATION "$DEFAULT_EMULATION" | |
2335 | EOF | |
2336 | ||
2337 | ||
2338 | case ${primary_bfd_gas}-${target_cpu_type}-${obj_format} in | |
2339 | yes-*-coff) need_bfd=yes ;; | |
2340 | no-*-coff) need_bfd=yes | |
2341 | cat >> confdefs.h <<\EOF | |
2342 | #define MANY_SEGMENTS 1 | |
2343 | EOF | |
2344 | ;; | |
2345 | esac | |
2346 | ||
2347 | reject_dev_configs=yes | |
2348 | ||
2349 | case ${reject_dev_configs}-${dev} in | |
2350 | yes-yes) # Oops. | |
2351 | { echo "configure: error: GAS does not support the ${generic_target} configuration." 1>&2; exit 1; } | |
2352 | ;; | |
2353 | esac | |
2354 | ||
2355 | ||
2356 | ||
2357 | ||
2358 | ||
2359 | ||
2360 | ||
2361 | case "${primary_bfd_gas}" in | |
2362 | yes) cat >> confdefs.h <<\EOF | |
2363 | #define BFD_ASSEMBLER 1 | |
2364 | EOF | |
2365 | ||
2366 | need_bfd=yes ;; | |
2367 | esac | |
2368 | ||
2369 | # do we need the opcodes library? | |
2370 | case "${need_opcodes}" in | |
2371 | yes) | |
2372 | OPCODES_LIB=../opcodes/libopcodes.la | |
2373 | ;; | |
2374 | esac | |
2375 | ||
2376 | case "${need_bfd}" in | |
2377 | yes) | |
2378 | BFDLIB=../bfd/libbfd.la | |
2379 | ALL_OBJ_DEPS="$ALL_OBJ_DEPS ../bfd/bfd.h" | |
2380 | ;; | |
2381 | esac | |
2382 | ||
2383 | ||
2384 | ||
2385 | ||
2386 | ||
2387 | ||
2388 | cat >> confdefs.h <<EOF | |
2389 | #define TARGET_ALIAS "${target_alias}" | |
2390 | EOF | |
2391 | ||
2392 | cat >> confdefs.h <<EOF | |
2393 | #define TARGET_CANONICAL "${target}" | |
2394 | EOF | |
2395 | ||
2396 | cat >> confdefs.h <<EOF | |
2397 | #define TARGET_CPU "${target_cpu}" | |
2398 | EOF | |
2399 | ||
2400 | cat >> confdefs.h <<EOF | |
2401 | #define TARGET_VENDOR "${target_vendor}" | |
2402 | EOF | |
2403 | ||
2404 | cat >> confdefs.h <<EOF | |
2405 | #define TARGET_OS "${target_os}" | |
2406 | EOF | |
2407 | ||
2408 | ||
2409 | # Extract the first word of "gcc", so it can be a program name with args. | |
2410 | set dummy gcc; ac_word=$2 | |
2411 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
98e5953c | 2412 | echo "configure:2413: checking for $ac_word" >&5 |
a2d91340 | 2413 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
252b5132 RH |
2414 | echo $ac_n "(cached) $ac_c" 1>&6 |
2415 | else | |
2416 | if test -n "$CC"; then | |
2417 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2418 | else | |
2419 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2420 | ac_dummy="$PATH" | |
2421 | for ac_dir in $ac_dummy; do | |
2422 | test -z "$ac_dir" && ac_dir=. | |
2423 | if test -f $ac_dir/$ac_word; then | |
2424 | ac_cv_prog_CC="gcc" | |
2425 | break | |
2426 | fi | |
2427 | done | |
2428 | IFS="$ac_save_ifs" | |
2429 | fi | |
2430 | fi | |
2431 | CC="$ac_cv_prog_CC" | |
2432 | if test -n "$CC"; then | |
2433 | echo "$ac_t""$CC" 1>&6 | |
2434 | else | |
2435 | echo "$ac_t""no" 1>&6 | |
2436 | fi | |
2437 | ||
2438 | if test -z "$CC"; then | |
2439 | # Extract the first word of "cc", so it can be a program name with args. | |
2440 | set dummy cc; ac_word=$2 | |
2441 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
98e5953c | 2442 | echo "configure:2443: checking for $ac_word" >&5 |
a2d91340 | 2443 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
252b5132 RH |
2444 | echo $ac_n "(cached) $ac_c" 1>&6 |
2445 | else | |
2446 | if test -n "$CC"; then | |
2447 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2448 | else | |
2449 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2450 | ac_prog_rejected=no | |
2451 | ac_dummy="$PATH" | |
2452 | for ac_dir in $ac_dummy; do | |
2453 | test -z "$ac_dir" && ac_dir=. | |
2454 | if test -f $ac_dir/$ac_word; then | |
2455 | if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then | |
2456 | ac_prog_rejected=yes | |
2457 | continue | |
2458 | fi | |
2459 | ac_cv_prog_CC="cc" | |
2460 | break | |
2461 | fi | |
2462 | done | |
2463 | IFS="$ac_save_ifs" | |
2464 | if test $ac_prog_rejected = yes; then | |
2465 | # We found a bogon in the path, so make sure we never use it. | |
2466 | set dummy $ac_cv_prog_CC | |
2467 | shift | |
2468 | if test $# -gt 0; then | |
2469 | # We chose a different compiler from the bogus one. | |
2470 | # However, it has the same basename, so the bogon will be chosen | |
2471 | # first if we set CC to just the basename; use the full file name. | |
2472 | shift | |
2473 | set dummy "$ac_dir/$ac_word" "$@" | |
2474 | shift | |
2475 | ac_cv_prog_CC="$@" | |
2476 | fi | |
2477 | fi | |
2478 | fi | |
2479 | fi | |
2480 | CC="$ac_cv_prog_CC" | |
2481 | if test -n "$CC"; then | |
2482 | echo "$ac_t""$CC" 1>&6 | |
2483 | else | |
2484 | echo "$ac_t""no" 1>&6 | |
2485 | fi | |
2486 | ||
2487 | if test -z "$CC"; then | |
2488 | case "`uname -s`" in | |
a2d91340 | 2489 | *win32* | *WIN32*) |
252b5132 RH |
2490 | # Extract the first word of "cl", so it can be a program name with args. |
2491 | set dummy cl; ac_word=$2 | |
2492 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
98e5953c | 2493 | echo "configure:2494: checking for $ac_word" >&5 |
a2d91340 | 2494 | if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then |
252b5132 RH |
2495 | echo $ac_n "(cached) $ac_c" 1>&6 |
2496 | else | |
2497 | if test -n "$CC"; then | |
2498 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
2499 | else | |
2500 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2501 | ac_dummy="$PATH" | |
2502 | for ac_dir in $ac_dummy; do | |
2503 | test -z "$ac_dir" && ac_dir=. | |
2504 | if test -f $ac_dir/$ac_word; then | |
2505 | ac_cv_prog_CC="cl" | |
2506 | break | |
2507 | fi | |
2508 | done | |
2509 | IFS="$ac_save_ifs" | |
2510 | fi | |
2511 | fi | |
2512 | CC="$ac_cv_prog_CC" | |
2513 | if test -n "$CC"; then | |
2514 | echo "$ac_t""$CC" 1>&6 | |
2515 | else | |
2516 | echo "$ac_t""no" 1>&6 | |
2517 | fi | |
2518 | ;; | |
2519 | esac | |
2520 | fi | |
2521 | test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } | |
2522 | fi | |
2523 | ||
a2d91340 | 2524 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 |
98e5953c | 2525 | echo "configure:2526: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 |
252b5132 RH |
2526 | |
2527 | ac_ext=c | |
2528 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2529 | ac_cpp='$CPP $CPPFLAGS' | |
2530 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2531 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2532 | cross_compiling=$ac_cv_prog_cc_cross | |
2533 | ||
2534 | cat > conftest.$ac_ext << EOF | |
2535 | ||
98e5953c | 2536 | #line 2537 "configure" |
252b5132 RH |
2537 | #include "confdefs.h" |
2538 | ||
2539 | main(){return(0);} | |
2540 | EOF | |
98e5953c | 2541 | if { (eval echo configure:2542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
2542 | ac_cv_prog_cc_works=yes |
2543 | # If we can't run a trivial program, we are probably using a cross compiler. | |
2544 | if (./conftest; exit) 2>/dev/null; then | |
2545 | ac_cv_prog_cc_cross=no | |
2546 | else | |
2547 | ac_cv_prog_cc_cross=yes | |
2548 | fi | |
2549 | else | |
2550 | echo "configure: failed program was:" >&5 | |
2551 | cat conftest.$ac_ext >&5 | |
2552 | ac_cv_prog_cc_works=no | |
2553 | fi | |
2554 | rm -fr conftest* | |
2555 | ac_ext=c | |
2556 | # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. | |
2557 | ac_cpp='$CPP $CPPFLAGS' | |
2558 | ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' | |
2559 | ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' | |
2560 | cross_compiling=$ac_cv_prog_cc_cross | |
2561 | ||
2562 | echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 | |
2563 | if test $ac_cv_prog_cc_works = no; then | |
2564 | { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } | |
2565 | fi | |
a2d91340 | 2566 | echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 |
98e5953c | 2567 | echo "configure:2568: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 |
252b5132 RH |
2568 | echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 |
2569 | cross_compiling=$ac_cv_prog_cc_cross | |
2570 | ||
2571 | echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 | |
98e5953c | 2572 | echo "configure:2573: checking whether we are using GNU C" >&5 |
a2d91340 | 2573 | if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then |
252b5132 RH |
2574 | echo $ac_n "(cached) $ac_c" 1>&6 |
2575 | else | |
2576 | cat > conftest.c <<EOF | |
2577 | #ifdef __GNUC__ | |
2578 | yes; | |
2579 | #endif | |
2580 | EOF | |
98e5953c | 2581 | if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then |
252b5132 RH |
2582 | ac_cv_prog_gcc=yes |
2583 | else | |
2584 | ac_cv_prog_gcc=no | |
2585 | fi | |
2586 | fi | |
2587 | ||
2588 | echo "$ac_t""$ac_cv_prog_gcc" 1>&6 | |
2589 | ||
2590 | if test $ac_cv_prog_gcc = yes; then | |
2591 | GCC=yes | |
2592 | else | |
2593 | GCC= | |
2594 | fi | |
2595 | ||
2596 | ac_test_CFLAGS="${CFLAGS+set}" | |
2597 | ac_save_CFLAGS="$CFLAGS" | |
2598 | CFLAGS= | |
2599 | echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 | |
98e5953c | 2600 | echo "configure:2601: checking whether ${CC-cc} accepts -g" >&5 |
a2d91340 | 2601 | if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then |
252b5132 RH |
2602 | echo $ac_n "(cached) $ac_c" 1>&6 |
2603 | else | |
2604 | echo 'void f(){}' > conftest.c | |
2605 | if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then | |
2606 | ac_cv_prog_cc_g=yes | |
2607 | else | |
2608 | ac_cv_prog_cc_g=no | |
2609 | fi | |
2610 | rm -f conftest* | |
2611 | ||
2612 | fi | |
2613 | ||
2614 | echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 | |
2615 | if test "$ac_test_CFLAGS" = set; then | |
2616 | CFLAGS="$ac_save_CFLAGS" | |
2617 | elif test $ac_cv_prog_cc_g = yes; then | |
2618 | if test "$GCC" = yes; then | |
2619 | CFLAGS="-g -O2" | |
2620 | else | |
2621 | CFLAGS="-g" | |
2622 | fi | |
2623 | else | |
2624 | if test "$GCC" = yes; then | |
2625 | CFLAGS="-O2" | |
2626 | else | |
2627 | CFLAGS= | |
2628 | fi | |
2629 | fi | |
2630 | ||
2631 | ||
2632 | for ac_prog in 'bison -y' byacc | |
2633 | do | |
2634 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2635 | set dummy $ac_prog; ac_word=$2 | |
2636 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
98e5953c | 2637 | echo "configure:2638: checking for $ac_word" >&5 |
a2d91340 | 2638 | if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then |
252b5132 RH |
2639 | echo $ac_n "(cached) $ac_c" 1>&6 |
2640 | else | |
2641 | if test -n "$YACC"; then | |
2642 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
2643 | else | |
2644 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2645 | ac_dummy="$PATH" | |
2646 | for ac_dir in $ac_dummy; do | |
2647 | test -z "$ac_dir" && ac_dir=. | |
2648 | if test -f $ac_dir/$ac_word; then | |
2649 | ac_cv_prog_YACC="$ac_prog" | |
2650 | break | |
2651 | fi | |
2652 | done | |
2653 | IFS="$ac_save_ifs" | |
2654 | fi | |
2655 | fi | |
2656 | YACC="$ac_cv_prog_YACC" | |
2657 | if test -n "$YACC"; then | |
2658 | echo "$ac_t""$YACC" 1>&6 | |
2659 | else | |
2660 | echo "$ac_t""no" 1>&6 | |
2661 | fi | |
2662 | ||
2663 | test -n "$YACC" && break | |
2664 | done | |
2665 | test -n "$YACC" || YACC="yacc" | |
2666 | ||
2667 | echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 | |
98e5953c | 2668 | echo "configure:2669: checking how to run the C preprocessor" >&5 |
252b5132 RH |
2669 | # On Suns, sometimes $CPP names a directory. |
2670 | if test -n "$CPP" && test -d "$CPP"; then | |
2671 | CPP= | |
2672 | fi | |
2673 | if test -z "$CPP"; then | |
a2d91340 | 2674 | if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then |
252b5132 RH |
2675 | echo $ac_n "(cached) $ac_c" 1>&6 |
2676 | else | |
2677 | # This must be in double quotes, not single quotes, because CPP may get | |
2678 | # substituted into the Makefile and "${CC-cc}" will confuse make. | |
2679 | CPP="${CC-cc} -E" | |
2680 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
2681 | # not just through cpp. | |
2682 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 2683 | #line 2684 "configure" |
252b5132 RH |
2684 | #include "confdefs.h" |
2685 | #include <assert.h> | |
2686 | Syntax Error | |
2687 | EOF | |
2688 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
98e5953c | 2689 | { (eval echo configure:2690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
2690 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2691 | if test -z "$ac_err"; then | |
2692 | : | |
2693 | else | |
2694 | echo "$ac_err" >&5 | |
2695 | echo "configure: failed program was:" >&5 | |
2696 | cat conftest.$ac_ext >&5 | |
2697 | rm -rf conftest* | |
2698 | CPP="${CC-cc} -E -traditional-cpp" | |
2699 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 2700 | #line 2701 "configure" |
252b5132 RH |
2701 | #include "confdefs.h" |
2702 | #include <assert.h> | |
2703 | Syntax Error | |
2704 | EOF | |
2705 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
98e5953c | 2706 | { (eval echo configure:2707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
2707 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2708 | if test -z "$ac_err"; then | |
2709 | : | |
2710 | else | |
2711 | echo "$ac_err" >&5 | |
2712 | echo "configure: failed program was:" >&5 | |
2713 | cat conftest.$ac_ext >&5 | |
2714 | rm -rf conftest* | |
2715 | CPP="${CC-cc} -nologo -E" | |
2716 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 2717 | #line 2718 "configure" |
252b5132 RH |
2718 | #include "confdefs.h" |
2719 | #include <assert.h> | |
2720 | Syntax Error | |
2721 | EOF | |
2722 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
98e5953c | 2723 | { (eval echo configure:2724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
2724 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2725 | if test -z "$ac_err"; then | |
2726 | : | |
2727 | else | |
2728 | echo "$ac_err" >&5 | |
2729 | echo "configure: failed program was:" >&5 | |
2730 | cat conftest.$ac_ext >&5 | |
2731 | rm -rf conftest* | |
2732 | CPP=/lib/cpp | |
2733 | fi | |
2734 | rm -f conftest* | |
2735 | fi | |
2736 | rm -f conftest* | |
2737 | fi | |
2738 | rm -f conftest* | |
2739 | ac_cv_prog_CPP="$CPP" | |
2740 | fi | |
2741 | CPP="$ac_cv_prog_CPP" | |
2742 | else | |
2743 | ac_cv_prog_CPP="$CPP" | |
2744 | fi | |
2745 | echo "$ac_t""$CPP" 1>&6 | |
2746 | ||
2747 | missing_dir=`cd $ac_aux_dir && pwd` | |
2748 | for ac_prog in flex lex | |
2749 | do | |
2750 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
2751 | set dummy $ac_prog; ac_word=$2 | |
2752 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
98e5953c | 2753 | echo "configure:2754: checking for $ac_word" >&5 |
a2d91340 | 2754 | if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then |
252b5132 RH |
2755 | echo $ac_n "(cached) $ac_c" 1>&6 |
2756 | else | |
2757 | if test -n "$LEX"; then | |
2758 | ac_cv_prog_LEX="$LEX" # Let the user override the test. | |
2759 | else | |
2760 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2761 | ac_dummy="$PATH" | |
2762 | for ac_dir in $ac_dummy; do | |
2763 | test -z "$ac_dir" && ac_dir=. | |
2764 | if test -f $ac_dir/$ac_word; then | |
2765 | ac_cv_prog_LEX="$ac_prog" | |
2766 | break | |
2767 | fi | |
2768 | done | |
2769 | IFS="$ac_save_ifs" | |
2770 | fi | |
2771 | fi | |
2772 | LEX="$ac_cv_prog_LEX" | |
2773 | if test -n "$LEX"; then | |
2774 | echo "$ac_t""$LEX" 1>&6 | |
2775 | else | |
2776 | echo "$ac_t""no" 1>&6 | |
2777 | fi | |
2778 | ||
2779 | test -n "$LEX" && break | |
2780 | done | |
2781 | test -n "$LEX" || LEX=""$missing_dir/missing flex"" | |
2782 | ||
2783 | # Extract the first word of "flex", so it can be a program name with args. | |
2784 | set dummy flex; ac_word=$2 | |
2785 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
98e5953c | 2786 | echo "configure:2787: checking for $ac_word" >&5 |
a2d91340 | 2787 | if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then |
252b5132 RH |
2788 | echo $ac_n "(cached) $ac_c" 1>&6 |
2789 | else | |
2790 | if test -n "$LEX"; then | |
2791 | ac_cv_prog_LEX="$LEX" # Let the user override the test. | |
2792 | else | |
2793 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
2794 | ac_dummy="$PATH" | |
2795 | for ac_dir in $ac_dummy; do | |
2796 | test -z "$ac_dir" && ac_dir=. | |
2797 | if test -f $ac_dir/$ac_word; then | |
2798 | ac_cv_prog_LEX="flex" | |
2799 | break | |
2800 | fi | |
2801 | done | |
2802 | IFS="$ac_save_ifs" | |
2803 | test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex" | |
2804 | fi | |
2805 | fi | |
2806 | LEX="$ac_cv_prog_LEX" | |
2807 | if test -n "$LEX"; then | |
2808 | echo "$ac_t""$LEX" 1>&6 | |
2809 | else | |
2810 | echo "$ac_t""no" 1>&6 | |
2811 | fi | |
2812 | ||
2813 | if test -z "$LEXLIB" | |
2814 | then | |
2815 | case "$LEX" in | |
2816 | flex*) ac_lib=fl ;; | |
2817 | *) ac_lib=l ;; | |
2818 | esac | |
2819 | echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 | |
98e5953c | 2820 | echo "configure:2821: checking for yywrap in -l$ac_lib" >&5 |
a2d91340 AC |
2821 | ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` |
2822 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
252b5132 RH |
2823 | echo $ac_n "(cached) $ac_c" 1>&6 |
2824 | else | |
2825 | ac_save_LIBS="$LIBS" | |
2826 | LIBS="-l$ac_lib $LIBS" | |
2827 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 2828 | #line 2829 "configure" |
252b5132 RH |
2829 | #include "confdefs.h" |
2830 | /* Override any gcc2 internal prototype to avoid an error. */ | |
2831 | /* We use char because int might match the return type of a gcc2 | |
2832 | builtin and then its argument prototype would still apply. */ | |
2833 | char yywrap(); | |
2834 | ||
2835 | int main() { | |
2836 | yywrap() | |
2837 | ; return 0; } | |
2838 | EOF | |
98e5953c | 2839 | if { (eval echo configure:2840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
2840 | rm -rf conftest* |
2841 | eval "ac_cv_lib_$ac_lib_var=yes" | |
2842 | else | |
2843 | echo "configure: failed program was:" >&5 | |
2844 | cat conftest.$ac_ext >&5 | |
2845 | rm -rf conftest* | |
2846 | eval "ac_cv_lib_$ac_lib_var=no" | |
2847 | fi | |
2848 | rm -f conftest* | |
2849 | LIBS="$ac_save_LIBS" | |
2850 | ||
2851 | fi | |
2852 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
2853 | echo "$ac_t""yes" 1>&6 | |
2854 | LEXLIB="-l$ac_lib" | |
2855 | else | |
2856 | echo "$ac_t""no" 1>&6 | |
2857 | fi | |
2858 | ||
2859 | fi | |
2860 | ||
2861 | echo $ac_n "checking lex output file root""... $ac_c" 1>&6 | |
98e5953c | 2862 | echo "configure:2863: checking lex output file root" >&5 |
a2d91340 | 2863 | if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then |
252b5132 RH |
2864 | echo $ac_n "(cached) $ac_c" 1>&6 |
2865 | else | |
2866 | # The minimal lex program is just a single line: %%. But some broken lexes | |
2867 | # (Solaris, I think it was) want two %% lines, so accommodate them. | |
2868 | echo '%% | |
2869 | %%' | $LEX | |
2870 | if test -f lex.yy.c; then | |
2871 | ac_cv_prog_lex_root=lex.yy | |
2872 | elif test -f lexyy.c; then | |
2873 | ac_cv_prog_lex_root=lexyy | |
2874 | else | |
2875 | { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; } | |
2876 | fi | |
2877 | fi | |
2878 | ||
2879 | echo "$ac_t""$ac_cv_prog_lex_root" 1>&6 | |
2880 | LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root | |
2881 | ||
2882 | echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6 | |
98e5953c | 2883 | echo "configure:2884: checking whether yytext is a pointer" >&5 |
a2d91340 | 2884 | if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then |
252b5132 RH |
2885 | echo $ac_n "(cached) $ac_c" 1>&6 |
2886 | else | |
2887 | # POSIX says lex can declare yytext either as a pointer or an array; the | |
2888 | # default is implementation-dependent. Figure out which it is, since | |
2889 | # not all implementations provide the %pointer and %array declarations. | |
2890 | ac_cv_prog_lex_yytext_pointer=no | |
2891 | echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c | |
2892 | ac_save_LIBS="$LIBS" | |
2893 | LIBS="$LIBS $LEXLIB" | |
2894 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 2895 | #line 2896 "configure" |
252b5132 RH |
2896 | #include "confdefs.h" |
2897 | `cat $LEX_OUTPUT_ROOT.c` | |
2898 | int main() { | |
2899 | ||
2900 | ; return 0; } | |
2901 | EOF | |
98e5953c | 2902 | if { (eval echo configure:2903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
2903 | rm -rf conftest* |
2904 | ac_cv_prog_lex_yytext_pointer=yes | |
2905 | else | |
2906 | echo "configure: failed program was:" >&5 | |
2907 | cat conftest.$ac_ext >&5 | |
2908 | fi | |
2909 | rm -f conftest* | |
2910 | LIBS="$ac_save_LIBS" | |
2911 | rm -f "${LEX_OUTPUT_ROOT}.c" | |
2912 | ||
2913 | fi | |
2914 | ||
2915 | echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6 | |
2916 | if test $ac_cv_prog_lex_yytext_pointer = yes; then | |
2917 | cat >> confdefs.h <<\EOF | |
2918 | #define YYTEXT_POINTER 1 | |
2919 | EOF | |
2920 | ||
2921 | fi | |
2922 | ||
2923 | ||
2924 | ALL_LINGUAS= | |
2925 | echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 | |
98e5953c | 2926 | echo "configure:2927: checking for POSIXized ISC" >&5 |
252b5132 RH |
2927 | if test -d /etc/conf/kconfig.d && |
2928 | grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 | |
2929 | then | |
2930 | echo "$ac_t""yes" 1>&6 | |
2931 | ISC=yes # If later tests want to check for ISC. | |
2932 | cat >> confdefs.h <<\EOF | |
2933 | #define _POSIX_SOURCE 1 | |
2934 | EOF | |
2935 | ||
2936 | if test "$GCC" = yes; then | |
2937 | CC="$CC -posix" | |
2938 | else | |
2939 | CC="$CC -Xp" | |
2940 | fi | |
2941 | else | |
2942 | echo "$ac_t""no" 1>&6 | |
2943 | ISC= | |
2944 | fi | |
2945 | ||
2946 | echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 | |
98e5953c | 2947 | echo "configure:2948: checking for ANSI C header files" >&5 |
a2d91340 | 2948 | if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then |
252b5132 RH |
2949 | echo $ac_n "(cached) $ac_c" 1>&6 |
2950 | else | |
2951 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 2952 | #line 2953 "configure" |
252b5132 RH |
2953 | #include "confdefs.h" |
2954 | #include <stdlib.h> | |
2955 | #include <stdarg.h> | |
2956 | #include <string.h> | |
2957 | #include <float.h> | |
2958 | EOF | |
2959 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
98e5953c | 2960 | { (eval echo configure:2961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
2961 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
2962 | if test -z "$ac_err"; then | |
2963 | rm -rf conftest* | |
2964 | ac_cv_header_stdc=yes | |
2965 | else | |
2966 | echo "$ac_err" >&5 | |
2967 | echo "configure: failed program was:" >&5 | |
2968 | cat conftest.$ac_ext >&5 | |
2969 | rm -rf conftest* | |
2970 | ac_cv_header_stdc=no | |
2971 | fi | |
2972 | rm -f conftest* | |
2973 | ||
2974 | if test $ac_cv_header_stdc = yes; then | |
2975 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. | |
2976 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 2977 | #line 2978 "configure" |
252b5132 RH |
2978 | #include "confdefs.h" |
2979 | #include <string.h> | |
2980 | EOF | |
2981 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
2982 | egrep "memchr" >/dev/null 2>&1; then | |
2983 | : | |
2984 | else | |
2985 | rm -rf conftest* | |
2986 | ac_cv_header_stdc=no | |
2987 | fi | |
2988 | rm -f conftest* | |
2989 | ||
2990 | fi | |
2991 | ||
2992 | if test $ac_cv_header_stdc = yes; then | |
2993 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. | |
2994 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 2995 | #line 2996 "configure" |
252b5132 RH |
2996 | #include "confdefs.h" |
2997 | #include <stdlib.h> | |
2998 | EOF | |
2999 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3000 | egrep "free" >/dev/null 2>&1; then | |
3001 | : | |
3002 | else | |
3003 | rm -rf conftest* | |
3004 | ac_cv_header_stdc=no | |
3005 | fi | |
3006 | rm -f conftest* | |
3007 | ||
3008 | fi | |
3009 | ||
3010 | if test $ac_cv_header_stdc = yes; then | |
3011 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. | |
3012 | if test "$cross_compiling" = yes; then | |
3013 | : | |
3014 | else | |
3015 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 3016 | #line 3017 "configure" |
252b5132 RH |
3017 | #include "confdefs.h" |
3018 | #include <ctype.h> | |
3019 | #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') | |
3020 | #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) | |
3021 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) | |
3022 | int main () { int i; for (i = 0; i < 256; i++) | |
3023 | if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); | |
3024 | exit (0); } | |
3025 | ||
3026 | EOF | |
98e5953c | 3027 | if { (eval echo configure:3028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
252b5132 RH |
3028 | then |
3029 | : | |
3030 | else | |
3031 | echo "configure: failed program was:" >&5 | |
3032 | cat conftest.$ac_ext >&5 | |
3033 | rm -fr conftest* | |
3034 | ac_cv_header_stdc=no | |
3035 | fi | |
3036 | rm -fr conftest* | |
3037 | fi | |
3038 | ||
3039 | fi | |
3040 | fi | |
3041 | ||
3042 | echo "$ac_t""$ac_cv_header_stdc" 1>&6 | |
3043 | if test $ac_cv_header_stdc = yes; then | |
3044 | cat >> confdefs.h <<\EOF | |
3045 | #define STDC_HEADERS 1 | |
3046 | EOF | |
3047 | ||
3048 | fi | |
3049 | ||
3050 | echo $ac_n "checking for working const""... $ac_c" 1>&6 | |
98e5953c | 3051 | echo "configure:3052: checking for working const" >&5 |
a2d91340 | 3052 | if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then |
252b5132 RH |
3053 | echo $ac_n "(cached) $ac_c" 1>&6 |
3054 | else | |
3055 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 3056 | #line 3057 "configure" |
252b5132 RH |
3057 | #include "confdefs.h" |
3058 | ||
3059 | int main() { | |
3060 | ||
3061 | /* Ultrix mips cc rejects this. */ | |
3062 | typedef int charset[2]; const charset x; | |
3063 | /* SunOS 4.1.1 cc rejects this. */ | |
3064 | char const *const *ccp; | |
3065 | char **p; | |
3066 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
3067 | struct point {int x, y;}; | |
3068 | static struct point const zero = {0,0}; | |
3069 | /* AIX XL C 1.02.0.0 rejects this. | |
3070 | It does not let you subtract one const X* pointer from another in an arm | |
3071 | of an if-expression whose if-part is not a constant expression */ | |
3072 | const char *g = "string"; | |
3073 | ccp = &g + (g ? g-g : 0); | |
3074 | /* HPUX 7.0 cc rejects these. */ | |
3075 | ++ccp; | |
3076 | p = (char**) ccp; | |
3077 | ccp = (char const *const *) p; | |
3078 | { /* SCO 3.2v4 cc rejects this. */ | |
3079 | char *t; | |
3080 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
3081 | ||
3082 | *t++ = 0; | |
3083 | } | |
3084 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
3085 | int x[] = {25, 17}; | |
3086 | const int *foo = &x[0]; | |
3087 | ++foo; | |
3088 | } | |
3089 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
3090 | typedef const int *iptr; | |
3091 | iptr p = 0; | |
3092 | ++p; | |
3093 | } | |
3094 | { /* AIX XL C 1.02.0.0 rejects this saying | |
3095 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
3096 | struct s { int j; const int *ap[3]; }; | |
3097 | struct s *b; b->j = 5; | |
3098 | } | |
3099 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
3100 | const int foo = 10; | |
3101 | } | |
3102 | ||
3103 | ; return 0; } | |
3104 | EOF | |
98e5953c | 3105 | if { (eval echo configure:3106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
3106 | rm -rf conftest* |
3107 | ac_cv_c_const=yes | |
3108 | else | |
3109 | echo "configure: failed program was:" >&5 | |
3110 | cat conftest.$ac_ext >&5 | |
3111 | rm -rf conftest* | |
3112 | ac_cv_c_const=no | |
3113 | fi | |
3114 | rm -f conftest* | |
3115 | fi | |
3116 | ||
3117 | echo "$ac_t""$ac_cv_c_const" 1>&6 | |
3118 | if test $ac_cv_c_const = no; then | |
3119 | cat >> confdefs.h <<\EOF | |
3120 | #define const | |
3121 | EOF | |
3122 | ||
3123 | fi | |
3124 | ||
3125 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
98e5953c | 3126 | echo "configure:3127: checking for inline" >&5 |
a2d91340 | 3127 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
252b5132 RH |
3128 | echo $ac_n "(cached) $ac_c" 1>&6 |
3129 | else | |
3130 | ac_cv_c_inline=no | |
3131 | for ac_kw in inline __inline__ __inline; do | |
3132 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 3133 | #line 3134 "configure" |
252b5132 RH |
3134 | #include "confdefs.h" |
3135 | ||
3136 | int main() { | |
a2d91340 | 3137 | } $ac_kw foo() { |
252b5132 RH |
3138 | ; return 0; } |
3139 | EOF | |
98e5953c | 3140 | if { (eval echo configure:3141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
3141 | rm -rf conftest* |
3142 | ac_cv_c_inline=$ac_kw; break | |
3143 | else | |
3144 | echo "configure: failed program was:" >&5 | |
3145 | cat conftest.$ac_ext >&5 | |
3146 | fi | |
3147 | rm -f conftest* | |
3148 | done | |
3149 | ||
3150 | fi | |
3151 | ||
3152 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
3153 | case "$ac_cv_c_inline" in | |
3154 | inline | yes) ;; | |
3155 | no) cat >> confdefs.h <<\EOF | |
3156 | #define inline | |
3157 | EOF | |
3158 | ;; | |
3159 | *) cat >> confdefs.h <<EOF | |
3160 | #define inline $ac_cv_c_inline | |
3161 | EOF | |
3162 | ;; | |
3163 | esac | |
3164 | ||
3165 | echo $ac_n "checking for off_t""... $ac_c" 1>&6 | |
98e5953c | 3166 | echo "configure:3167: checking for off_t" >&5 |
a2d91340 | 3167 | if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then |
252b5132 RH |
3168 | echo $ac_n "(cached) $ac_c" 1>&6 |
3169 | else | |
3170 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 3171 | #line 3172 "configure" |
252b5132 RH |
3172 | #include "confdefs.h" |
3173 | #include <sys/types.h> | |
3174 | #if STDC_HEADERS | |
3175 | #include <stdlib.h> | |
3176 | #include <stddef.h> | |
3177 | #endif | |
3178 | EOF | |
3179 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3180 | egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
3181 | rm -rf conftest* | |
a2d91340 | 3182 | ac_cv_type_off_t=yes |
252b5132 RH |
3183 | else |
3184 | rm -rf conftest* | |
a2d91340 | 3185 | ac_cv_type_off_t=no |
252b5132 RH |
3186 | fi |
3187 | rm -f conftest* | |
3188 | ||
3189 | fi | |
a2d91340 AC |
3190 | echo "$ac_t""$ac_cv_type_off_t" 1>&6 |
3191 | if test $ac_cv_type_off_t = no; then | |
3192 | cat >> confdefs.h <<\EOF | |
252b5132 RH |
3193 | #define off_t long |
3194 | EOF | |
3195 | ||
3196 | fi | |
3197 | ||
3198 | echo $ac_n "checking for size_t""... $ac_c" 1>&6 | |
98e5953c | 3199 | echo "configure:3200: checking for size_t" >&5 |
a2d91340 | 3200 | if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then |
252b5132 RH |
3201 | echo $ac_n "(cached) $ac_c" 1>&6 |
3202 | else | |
3203 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 3204 | #line 3205 "configure" |
252b5132 RH |
3205 | #include "confdefs.h" |
3206 | #include <sys/types.h> | |
3207 | #if STDC_HEADERS | |
3208 | #include <stdlib.h> | |
3209 | #include <stddef.h> | |
3210 | #endif | |
3211 | EOF | |
3212 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3213 | egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then | |
3214 | rm -rf conftest* | |
a2d91340 | 3215 | ac_cv_type_size_t=yes |
252b5132 RH |
3216 | else |
3217 | rm -rf conftest* | |
a2d91340 | 3218 | ac_cv_type_size_t=no |
252b5132 RH |
3219 | fi |
3220 | rm -f conftest* | |
3221 | ||
3222 | fi | |
a2d91340 AC |
3223 | echo "$ac_t""$ac_cv_type_size_t" 1>&6 |
3224 | if test $ac_cv_type_size_t = no; then | |
3225 | cat >> confdefs.h <<\EOF | |
252b5132 RH |
3226 | #define size_t unsigned |
3227 | EOF | |
3228 | ||
3229 | fi | |
3230 | ||
3231 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
3232 | # for constant arguments. Useless! | |
3233 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
98e5953c | 3234 | echo "configure:3235: checking for working alloca.h" >&5 |
a2d91340 | 3235 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
252b5132 RH |
3236 | echo $ac_n "(cached) $ac_c" 1>&6 |
3237 | else | |
3238 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 3239 | #line 3240 "configure" |
252b5132 RH |
3240 | #include "confdefs.h" |
3241 | #include <alloca.h> | |
3242 | int main() { | |
3243 | char *p = alloca(2 * sizeof(int)); | |
3244 | ; return 0; } | |
3245 | EOF | |
98e5953c | 3246 | if { (eval echo configure:3247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
3247 | rm -rf conftest* |
3248 | ac_cv_header_alloca_h=yes | |
3249 | else | |
3250 | echo "configure: failed program was:" >&5 | |
3251 | cat conftest.$ac_ext >&5 | |
3252 | rm -rf conftest* | |
3253 | ac_cv_header_alloca_h=no | |
3254 | fi | |
3255 | rm -f conftest* | |
3256 | fi | |
3257 | ||
3258 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
3259 | if test $ac_cv_header_alloca_h = yes; then | |
3260 | cat >> confdefs.h <<\EOF | |
3261 | #define HAVE_ALLOCA_H 1 | |
3262 | EOF | |
3263 | ||
3264 | fi | |
3265 | ||
3266 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
98e5953c | 3267 | echo "configure:3268: checking for alloca" >&5 |
a2d91340 | 3268 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
252b5132 RH |
3269 | echo $ac_n "(cached) $ac_c" 1>&6 |
3270 | else | |
3271 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 3272 | #line 3273 "configure" |
252b5132 RH |
3273 | #include "confdefs.h" |
3274 | ||
3275 | #ifdef __GNUC__ | |
3276 | # define alloca __builtin_alloca | |
3277 | #else | |
3278 | # ifdef _MSC_VER | |
3279 | # include <malloc.h> | |
3280 | # define alloca _alloca | |
3281 | # else | |
3282 | # if HAVE_ALLOCA_H | |
3283 | # include <alloca.h> | |
3284 | # else | |
3285 | # ifdef _AIX | |
3286 | #pragma alloca | |
3287 | # else | |
3288 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
3289 | char *alloca (); | |
3290 | # endif | |
3291 | # endif | |
3292 | # endif | |
3293 | # endif | |
3294 | #endif | |
3295 | ||
3296 | int main() { | |
3297 | char *p = (char *) alloca(1); | |
3298 | ; return 0; } | |
3299 | EOF | |
98e5953c | 3300 | if { (eval echo configure:3301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
3301 | rm -rf conftest* |
3302 | ac_cv_func_alloca_works=yes | |
3303 | else | |
3304 | echo "configure: failed program was:" >&5 | |
3305 | cat conftest.$ac_ext >&5 | |
3306 | rm -rf conftest* | |
3307 | ac_cv_func_alloca_works=no | |
3308 | fi | |
3309 | rm -f conftest* | |
3310 | fi | |
3311 | ||
3312 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
3313 | if test $ac_cv_func_alloca_works = yes; then | |
3314 | cat >> confdefs.h <<\EOF | |
3315 | #define HAVE_ALLOCA 1 | |
3316 | EOF | |
3317 | ||
3318 | fi | |
3319 | ||
3320 | if test $ac_cv_func_alloca_works = no; then | |
3321 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
3322 | # that cause trouble. Some versions do not even contain alloca or | |
3323 | # contain a buggy version. If you still want to use their alloca, | |
3324 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
3325 | ALLOCA=alloca.${ac_objext} | |
3326 | cat >> confdefs.h <<\EOF | |
3327 | #define C_ALLOCA 1 | |
3328 | EOF | |
3329 | ||
3330 | ||
3331 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
98e5953c | 3332 | echo "configure:3333: checking whether alloca needs Cray hooks" >&5 |
a2d91340 | 3333 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
252b5132 RH |
3334 | echo $ac_n "(cached) $ac_c" 1>&6 |
3335 | else | |
3336 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 3337 | #line 3338 "configure" |
252b5132 RH |
3338 | #include "confdefs.h" |
3339 | #if defined(CRAY) && ! defined(CRAY2) | |
3340 | webecray | |
3341 | #else | |
3342 | wenotbecray | |
3343 | #endif | |
3344 | ||
3345 | EOF | |
3346 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
3347 | egrep "webecray" >/dev/null 2>&1; then | |
3348 | rm -rf conftest* | |
3349 | ac_cv_os_cray=yes | |
3350 | else | |
3351 | rm -rf conftest* | |
3352 | ac_cv_os_cray=no | |
3353 | fi | |
3354 | rm -f conftest* | |
3355 | ||
3356 | fi | |
3357 | ||
3358 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
3359 | if test $ac_cv_os_cray = yes; then | |
3360 | for ac_func in _getb67 GETB67 getb67; do | |
3361 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
98e5953c | 3362 | echo "configure:3363: checking for $ac_func" >&5 |
a2d91340 | 3363 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
252b5132 RH |
3364 | echo $ac_n "(cached) $ac_c" 1>&6 |
3365 | else | |
3366 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 3367 | #line 3368 "configure" |
252b5132 RH |
3368 | #include "confdefs.h" |
3369 | /* System header to define __stub macros and hopefully few prototypes, | |
3370 | which can conflict with char $ac_func(); below. */ | |
3371 | #include <assert.h> | |
3372 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3373 | /* We use char because int might match the return type of a gcc2 | |
3374 | builtin and then its argument prototype would still apply. */ | |
3375 | char $ac_func(); | |
3376 | ||
3377 | int main() { | |
3378 | ||
3379 | /* The GNU C library defines this for functions which it implements | |
3380 | to always fail with ENOSYS. Some functions are actually named | |
3381 | something starting with __ and the normal name is an alias. */ | |
3382 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3383 | choke me | |
3384 | #else | |
a2d91340 | 3385 | $ac_func(); |
252b5132 RH |
3386 | #endif |
3387 | ||
3388 | ; return 0; } | |
3389 | EOF | |
98e5953c | 3390 | if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
3391 | rm -rf conftest* |
3392 | eval "ac_cv_func_$ac_func=yes" | |
3393 | else | |
3394 | echo "configure: failed program was:" >&5 | |
3395 | cat conftest.$ac_ext >&5 | |
3396 | rm -rf conftest* | |
3397 | eval "ac_cv_func_$ac_func=no" | |
3398 | fi | |
3399 | rm -f conftest* | |
3400 | fi | |
3401 | ||
3402 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3403 | echo "$ac_t""yes" 1>&6 | |
3404 | cat >> confdefs.h <<EOF | |
3405 | #define CRAY_STACKSEG_END $ac_func | |
3406 | EOF | |
3407 | ||
3408 | break | |
3409 | else | |
3410 | echo "$ac_t""no" 1>&6 | |
3411 | fi | |
3412 | ||
3413 | done | |
3414 | fi | |
3415 | ||
3416 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
98e5953c | 3417 | echo "configure:3418: checking stack direction for C alloca" >&5 |
a2d91340 | 3418 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
252b5132 RH |
3419 | echo $ac_n "(cached) $ac_c" 1>&6 |
3420 | else | |
3421 | if test "$cross_compiling" = yes; then | |
3422 | ac_cv_c_stack_direction=0 | |
3423 | else | |
3424 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 3425 | #line 3426 "configure" |
252b5132 RH |
3426 | #include "confdefs.h" |
3427 | find_stack_direction () | |
3428 | { | |
3429 | static char *addr = 0; | |
3430 | auto char dummy; | |
3431 | if (addr == 0) | |
3432 | { | |
3433 | addr = &dummy; | |
3434 | return find_stack_direction (); | |
3435 | } | |
3436 | else | |
3437 | return (&dummy > addr) ? 1 : -1; | |
3438 | } | |
3439 | main () | |
3440 | { | |
3441 | exit (find_stack_direction() < 0); | |
3442 | } | |
3443 | EOF | |
98e5953c | 3444 | if { (eval echo configure:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
252b5132 RH |
3445 | then |
3446 | ac_cv_c_stack_direction=1 | |
3447 | else | |
3448 | echo "configure: failed program was:" >&5 | |
3449 | cat conftest.$ac_ext >&5 | |
3450 | rm -fr conftest* | |
3451 | ac_cv_c_stack_direction=-1 | |
3452 | fi | |
3453 | rm -fr conftest* | |
3454 | fi | |
3455 | ||
3456 | fi | |
3457 | ||
3458 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
3459 | cat >> confdefs.h <<EOF | |
3460 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
3461 | EOF | |
3462 | ||
3463 | fi | |
3464 | ||
3465 | for ac_hdr in unistd.h | |
3466 | do | |
3467 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3468 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
98e5953c | 3469 | echo "configure:3470: checking for $ac_hdr" >&5 |
a2d91340 | 3470 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
252b5132 RH |
3471 | echo $ac_n "(cached) $ac_c" 1>&6 |
3472 | else | |
3473 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 3474 | #line 3475 "configure" |
252b5132 RH |
3475 | #include "confdefs.h" |
3476 | #include <$ac_hdr> | |
3477 | EOF | |
3478 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
98e5953c | 3479 | { (eval echo configure:3480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
3480 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3481 | if test -z "$ac_err"; then | |
3482 | rm -rf conftest* | |
3483 | eval "ac_cv_header_$ac_safe=yes" | |
3484 | else | |
3485 | echo "$ac_err" >&5 | |
3486 | echo "configure: failed program was:" >&5 | |
3487 | cat conftest.$ac_ext >&5 | |
3488 | rm -rf conftest* | |
3489 | eval "ac_cv_header_$ac_safe=no" | |
3490 | fi | |
3491 | rm -f conftest* | |
3492 | fi | |
3493 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3494 | echo "$ac_t""yes" 1>&6 | |
3495 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3496 | cat >> confdefs.h <<EOF | |
3497 | #define $ac_tr_hdr 1 | |
3498 | EOF | |
3499 | ||
3500 | else | |
3501 | echo "$ac_t""no" 1>&6 | |
3502 | fi | |
3503 | done | |
3504 | ||
3505 | for ac_func in getpagesize | |
3506 | do | |
3507 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
98e5953c | 3508 | echo "configure:3509: checking for $ac_func" >&5 |
a2d91340 | 3509 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
252b5132 RH |
3510 | echo $ac_n "(cached) $ac_c" 1>&6 |
3511 | else | |
3512 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 3513 | #line 3514 "configure" |
252b5132 RH |
3514 | #include "confdefs.h" |
3515 | /* System header to define __stub macros and hopefully few prototypes, | |
3516 | which can conflict with char $ac_func(); below. */ | |
3517 | #include <assert.h> | |
3518 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3519 | /* We use char because int might match the return type of a gcc2 | |
3520 | builtin and then its argument prototype would still apply. */ | |
3521 | char $ac_func(); | |
3522 | ||
3523 | int main() { | |
3524 | ||
3525 | /* The GNU C library defines this for functions which it implements | |
3526 | to always fail with ENOSYS. Some functions are actually named | |
3527 | something starting with __ and the normal name is an alias. */ | |
3528 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3529 | choke me | |
3530 | #else | |
a2d91340 | 3531 | $ac_func(); |
252b5132 RH |
3532 | #endif |
3533 | ||
3534 | ; return 0; } | |
3535 | EOF | |
98e5953c | 3536 | if { (eval echo configure:3537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
3537 | rm -rf conftest* |
3538 | eval "ac_cv_func_$ac_func=yes" | |
3539 | else | |
3540 | echo "configure: failed program was:" >&5 | |
3541 | cat conftest.$ac_ext >&5 | |
3542 | rm -rf conftest* | |
3543 | eval "ac_cv_func_$ac_func=no" | |
3544 | fi | |
3545 | rm -f conftest* | |
3546 | fi | |
3547 | ||
3548 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3549 | echo "$ac_t""yes" 1>&6 | |
3550 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3551 | cat >> confdefs.h <<EOF | |
3552 | #define $ac_tr_func 1 | |
3553 | EOF | |
3554 | ||
3555 | else | |
3556 | echo "$ac_t""no" 1>&6 | |
3557 | fi | |
3558 | done | |
3559 | ||
3560 | echo $ac_n "checking for working mmap""... $ac_c" 1>&6 | |
98e5953c | 3561 | echo "configure:3562: checking for working mmap" >&5 |
a2d91340 | 3562 | if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then |
252b5132 RH |
3563 | echo $ac_n "(cached) $ac_c" 1>&6 |
3564 | else | |
3565 | if test "$cross_compiling" = yes; then | |
3566 | ac_cv_func_mmap_fixed_mapped=no | |
3567 | else | |
3568 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 3569 | #line 3570 "configure" |
252b5132 RH |
3570 | #include "confdefs.h" |
3571 | ||
3572 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
3573 | Here is a matrix of mmap possibilities: | |
3574 | mmap private not fixed | |
3575 | mmap private fixed at somewhere currently unmapped | |
3576 | mmap private fixed at somewhere already mapped | |
3577 | mmap shared not fixed | |
3578 | mmap shared fixed at somewhere currently unmapped | |
3579 | mmap shared fixed at somewhere already mapped | |
3580 | For private mappings, we should verify that changes cannot be read() | |
3581 | back from the file, nor mmap's back from the file at a different | |
3582 | address. (There have been systems where private was not correctly | |
3583 | implemented like the infamous i386 svr4.0, and systems where the | |
3584 | VM page cache was not coherent with the filesystem buffer cache | |
3585 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
3586 | For shared mappings, we should conversely verify that changes get | |
3587 | propogated back to all the places they're supposed to be. | |
3588 | ||
3589 | Grep wants private fixed already mapped. | |
3590 | The main things grep needs to know about mmap are: | |
3591 | * does it exist and is it safe to write into the mmap'd area | |
3592 | * how to use it (BSD variants) */ | |
3593 | #include <sys/types.h> | |
3594 | #include <fcntl.h> | |
3595 | #include <sys/mman.h> | |
3596 | ||
3597 | /* This mess was copied from the GNU getpagesize.h. */ | |
3598 | #ifndef HAVE_GETPAGESIZE | |
3599 | # ifdef HAVE_UNISTD_H | |
3600 | # include <unistd.h> | |
3601 | # endif | |
3602 | ||
3603 | /* Assume that all systems that can run configure have sys/param.h. */ | |
3604 | # ifndef HAVE_SYS_PARAM_H | |
3605 | # define HAVE_SYS_PARAM_H 1 | |
3606 | # endif | |
3607 | ||
3608 | # ifdef _SC_PAGESIZE | |
3609 | # define getpagesize() sysconf(_SC_PAGESIZE) | |
3610 | # else /* no _SC_PAGESIZE */ | |
3611 | # ifdef HAVE_SYS_PARAM_H | |
3612 | # include <sys/param.h> | |
3613 | # ifdef EXEC_PAGESIZE | |
3614 | # define getpagesize() EXEC_PAGESIZE | |
3615 | # else /* no EXEC_PAGESIZE */ | |
3616 | # ifdef NBPG | |
3617 | # define getpagesize() NBPG * CLSIZE | |
3618 | # ifndef CLSIZE | |
3619 | # define CLSIZE 1 | |
3620 | # endif /* no CLSIZE */ | |
3621 | # else /* no NBPG */ | |
3622 | # ifdef NBPC | |
3623 | # define getpagesize() NBPC | |
3624 | # else /* no NBPC */ | |
3625 | # ifdef PAGESIZE | |
3626 | # define getpagesize() PAGESIZE | |
3627 | # endif /* PAGESIZE */ | |
3628 | # endif /* no NBPC */ | |
3629 | # endif /* no NBPG */ | |
3630 | # endif /* no EXEC_PAGESIZE */ | |
3631 | # else /* no HAVE_SYS_PARAM_H */ | |
3632 | # define getpagesize() 8192 /* punt totally */ | |
3633 | # endif /* no HAVE_SYS_PARAM_H */ | |
3634 | # endif /* no _SC_PAGESIZE */ | |
3635 | ||
3636 | #endif /* no HAVE_GETPAGESIZE */ | |
3637 | ||
3638 | #ifdef __cplusplus | |
3639 | extern "C" { void *malloc(unsigned); } | |
3640 | #else | |
3641 | char *malloc(); | |
3642 | #endif | |
3643 | ||
3644 | int | |
3645 | main() | |
3646 | { | |
3647 | char *data, *data2, *data3; | |
3648 | int i, pagesize; | |
3649 | int fd; | |
3650 | ||
3651 | pagesize = getpagesize(); | |
3652 | ||
3653 | /* | |
3654 | * First, make a file with some known garbage in it. | |
3655 | */ | |
3656 | data = malloc(pagesize); | |
3657 | if (!data) | |
3658 | exit(1); | |
3659 | for (i = 0; i < pagesize; ++i) | |
3660 | *(data + i) = rand(); | |
3661 | umask(0); | |
3662 | fd = creat("conftestmmap", 0600); | |
3663 | if (fd < 0) | |
3664 | exit(1); | |
3665 | if (write(fd, data, pagesize) != pagesize) | |
3666 | exit(1); | |
3667 | close(fd); | |
3668 | ||
3669 | /* | |
3670 | * Next, try to mmap the file at a fixed address which | |
3671 | * already has something else allocated at it. If we can, | |
3672 | * also make sure that we see the same garbage. | |
3673 | */ | |
3674 | fd = open("conftestmmap", O_RDWR); | |
3675 | if (fd < 0) | |
3676 | exit(1); | |
3677 | data2 = malloc(2 * pagesize); | |
3678 | if (!data2) | |
3679 | exit(1); | |
3680 | data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); | |
3681 | if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE, | |
3682 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
3683 | exit(1); | |
3684 | for (i = 0; i < pagesize; ++i) | |
3685 | if (*(data + i) != *(data2 + i)) | |
3686 | exit(1); | |
3687 | ||
3688 | /* | |
3689 | * Finally, make sure that changes to the mapped area | |
3690 | * do not percolate back to the file as seen by read(). | |
3691 | * (This is a bug on some variants of i386 svr4.0.) | |
3692 | */ | |
3693 | for (i = 0; i < pagesize; ++i) | |
3694 | *(data2 + i) = *(data2 + i) + 1; | |
3695 | data3 = malloc(pagesize); | |
3696 | if (!data3) | |
3697 | exit(1); | |
3698 | if (read(fd, data3, pagesize) != pagesize) | |
3699 | exit(1); | |
3700 | for (i = 0; i < pagesize; ++i) | |
3701 | if (*(data + i) != *(data3 + i)) | |
3702 | exit(1); | |
3703 | close(fd); | |
3704 | unlink("conftestmmap"); | |
3705 | exit(0); | |
3706 | } | |
3707 | ||
3708 | EOF | |
98e5953c | 3709 | if { (eval echo configure:3710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
252b5132 RH |
3710 | then |
3711 | ac_cv_func_mmap_fixed_mapped=yes | |
3712 | else | |
3713 | echo "configure: failed program was:" >&5 | |
3714 | cat conftest.$ac_ext >&5 | |
3715 | rm -fr conftest* | |
3716 | ac_cv_func_mmap_fixed_mapped=no | |
3717 | fi | |
3718 | rm -fr conftest* | |
3719 | fi | |
3720 | ||
3721 | fi | |
3722 | ||
3723 | echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6 | |
3724 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
3725 | cat >> confdefs.h <<\EOF | |
3726 | #define HAVE_MMAP 1 | |
3727 | EOF | |
3728 | ||
3729 | fi | |
3730 | ||
3731 | ||
3732 | for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \ | |
3733 | unistd.h values.h sys/param.h | |
3734 | do | |
3735 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
3736 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
98e5953c | 3737 | echo "configure:3738: checking for $ac_hdr" >&5 |
a2d91340 | 3738 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
252b5132 RH |
3739 | echo $ac_n "(cached) $ac_c" 1>&6 |
3740 | else | |
3741 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 3742 | #line 3743 "configure" |
252b5132 RH |
3743 | #include "confdefs.h" |
3744 | #include <$ac_hdr> | |
3745 | EOF | |
3746 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
98e5953c | 3747 | { (eval echo configure:3748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
3748 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3749 | if test -z "$ac_err"; then | |
3750 | rm -rf conftest* | |
3751 | eval "ac_cv_header_$ac_safe=yes" | |
3752 | else | |
3753 | echo "$ac_err" >&5 | |
3754 | echo "configure: failed program was:" >&5 | |
3755 | cat conftest.$ac_ext >&5 | |
3756 | rm -rf conftest* | |
3757 | eval "ac_cv_header_$ac_safe=no" | |
3758 | fi | |
3759 | rm -f conftest* | |
3760 | fi | |
3761 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3762 | echo "$ac_t""yes" 1>&6 | |
3763 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
3764 | cat >> confdefs.h <<EOF | |
3765 | #define $ac_tr_hdr 1 | |
3766 | EOF | |
3767 | ||
3768 | else | |
3769 | echo "$ac_t""no" 1>&6 | |
3770 | fi | |
3771 | done | |
3772 | ||
3773 | for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \ | |
3774 | __argz_count __argz_stringify __argz_next | |
3775 | do | |
3776 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
98e5953c | 3777 | echo "configure:3778: checking for $ac_func" >&5 |
a2d91340 | 3778 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
252b5132 RH |
3779 | echo $ac_n "(cached) $ac_c" 1>&6 |
3780 | else | |
3781 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 3782 | #line 3783 "configure" |
252b5132 RH |
3783 | #include "confdefs.h" |
3784 | /* System header to define __stub macros and hopefully few prototypes, | |
3785 | which can conflict with char $ac_func(); below. */ | |
3786 | #include <assert.h> | |
3787 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3788 | /* We use char because int might match the return type of a gcc2 | |
3789 | builtin and then its argument prototype would still apply. */ | |
3790 | char $ac_func(); | |
3791 | ||
3792 | int main() { | |
3793 | ||
3794 | /* The GNU C library defines this for functions which it implements | |
3795 | to always fail with ENOSYS. Some functions are actually named | |
3796 | something starting with __ and the normal name is an alias. */ | |
3797 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3798 | choke me | |
3799 | #else | |
a2d91340 | 3800 | $ac_func(); |
252b5132 RH |
3801 | #endif |
3802 | ||
3803 | ; return 0; } | |
3804 | EOF | |
98e5953c | 3805 | if { (eval echo configure:3806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
3806 | rm -rf conftest* |
3807 | eval "ac_cv_func_$ac_func=yes" | |
3808 | else | |
3809 | echo "configure: failed program was:" >&5 | |
3810 | cat conftest.$ac_ext >&5 | |
3811 | rm -rf conftest* | |
3812 | eval "ac_cv_func_$ac_func=no" | |
3813 | fi | |
3814 | rm -f conftest* | |
3815 | fi | |
3816 | ||
3817 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3818 | echo "$ac_t""yes" 1>&6 | |
3819 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3820 | cat >> confdefs.h <<EOF | |
3821 | #define $ac_tr_func 1 | |
3822 | EOF | |
3823 | ||
3824 | else | |
3825 | echo "$ac_t""no" 1>&6 | |
3826 | fi | |
3827 | done | |
3828 | ||
3829 | ||
3830 | if test "${ac_cv_func_stpcpy+set}" != "set"; then | |
3831 | for ac_func in stpcpy | |
3832 | do | |
3833 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
98e5953c | 3834 | echo "configure:3835: checking for $ac_func" >&5 |
a2d91340 | 3835 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
252b5132 RH |
3836 | echo $ac_n "(cached) $ac_c" 1>&6 |
3837 | else | |
3838 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 3839 | #line 3840 "configure" |
252b5132 RH |
3840 | #include "confdefs.h" |
3841 | /* System header to define __stub macros and hopefully few prototypes, | |
3842 | which can conflict with char $ac_func(); below. */ | |
3843 | #include <assert.h> | |
3844 | /* Override any gcc2 internal prototype to avoid an error. */ | |
3845 | /* We use char because int might match the return type of a gcc2 | |
3846 | builtin and then its argument prototype would still apply. */ | |
3847 | char $ac_func(); | |
3848 | ||
3849 | int main() { | |
3850 | ||
3851 | /* The GNU C library defines this for functions which it implements | |
3852 | to always fail with ENOSYS. Some functions are actually named | |
3853 | something starting with __ and the normal name is an alias. */ | |
3854 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
3855 | choke me | |
3856 | #else | |
a2d91340 | 3857 | $ac_func(); |
252b5132 RH |
3858 | #endif |
3859 | ||
3860 | ; return 0; } | |
3861 | EOF | |
98e5953c | 3862 | if { (eval echo configure:3863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
3863 | rm -rf conftest* |
3864 | eval "ac_cv_func_$ac_func=yes" | |
3865 | else | |
3866 | echo "configure: failed program was:" >&5 | |
3867 | cat conftest.$ac_ext >&5 | |
3868 | rm -rf conftest* | |
3869 | eval "ac_cv_func_$ac_func=no" | |
3870 | fi | |
3871 | rm -f conftest* | |
3872 | fi | |
3873 | ||
3874 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
3875 | echo "$ac_t""yes" 1>&6 | |
3876 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
3877 | cat >> confdefs.h <<EOF | |
3878 | #define $ac_tr_func 1 | |
3879 | EOF | |
3880 | ||
3881 | else | |
3882 | echo "$ac_t""no" 1>&6 | |
3883 | fi | |
3884 | done | |
3885 | ||
3886 | fi | |
3887 | if test "${ac_cv_func_stpcpy}" = "yes"; then | |
3888 | cat >> confdefs.h <<\EOF | |
3889 | #define HAVE_STPCPY 1 | |
3890 | EOF | |
3891 | ||
3892 | fi | |
3893 | ||
3894 | if test $ac_cv_header_locale_h = yes; then | |
3895 | echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6 | |
98e5953c | 3896 | echo "configure:3897: checking for LC_MESSAGES" >&5 |
a2d91340 | 3897 | if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then |
252b5132 RH |
3898 | echo $ac_n "(cached) $ac_c" 1>&6 |
3899 | else | |
3900 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 3901 | #line 3902 "configure" |
252b5132 RH |
3902 | #include "confdefs.h" |
3903 | #include <locale.h> | |
3904 | int main() { | |
3905 | return LC_MESSAGES | |
3906 | ; return 0; } | |
3907 | EOF | |
98e5953c | 3908 | if { (eval echo configure:3909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
3909 | rm -rf conftest* |
3910 | am_cv_val_LC_MESSAGES=yes | |
3911 | else | |
3912 | echo "configure: failed program was:" >&5 | |
3913 | cat conftest.$ac_ext >&5 | |
3914 | rm -rf conftest* | |
3915 | am_cv_val_LC_MESSAGES=no | |
3916 | fi | |
3917 | rm -f conftest* | |
3918 | fi | |
3919 | ||
3920 | echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6 | |
3921 | if test $am_cv_val_LC_MESSAGES = yes; then | |
3922 | cat >> confdefs.h <<\EOF | |
3923 | #define HAVE_LC_MESSAGES 1 | |
3924 | EOF | |
3925 | ||
3926 | fi | |
3927 | fi | |
3928 | echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6 | |
98e5953c | 3929 | echo "configure:3930: checking whether NLS is requested" >&5 |
252b5132 RH |
3930 | # Check whether --enable-nls or --disable-nls was given. |
3931 | if test "${enable_nls+set}" = set; then | |
3932 | enableval="$enable_nls" | |
3933 | USE_NLS=$enableval | |
3934 | else | |
3935 | USE_NLS=yes | |
3936 | fi | |
3937 | ||
3938 | echo "$ac_t""$USE_NLS" 1>&6 | |
3939 | ||
3940 | ||
3941 | USE_INCLUDED_LIBINTL=no | |
3942 | ||
3943 | if test "$USE_NLS" = "yes"; then | |
3944 | cat >> confdefs.h <<\EOF | |
3945 | #define ENABLE_NLS 1 | |
3946 | EOF | |
3947 | ||
3948 | echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6 | |
98e5953c | 3949 | echo "configure:3950: checking whether included gettext is requested" >&5 |
252b5132 RH |
3950 | # Check whether --with-included-gettext or --without-included-gettext was given. |
3951 | if test "${with_included_gettext+set}" = set; then | |
3952 | withval="$with_included_gettext" | |
3953 | nls_cv_force_use_gnu_gettext=$withval | |
3954 | else | |
3955 | nls_cv_force_use_gnu_gettext=no | |
3956 | fi | |
3957 | ||
3958 | echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6 | |
3959 | ||
3960 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
3961 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
3962 | nls_cv_header_intl= | |
3963 | nls_cv_header_libgt= | |
3964 | CATOBJEXT=NONE | |
3965 | ||
3966 | ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'` | |
3967 | echo $ac_n "checking for libintl.h""... $ac_c" 1>&6 | |
98e5953c | 3968 | echo "configure:3969: checking for libintl.h" >&5 |
a2d91340 | 3969 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
252b5132 RH |
3970 | echo $ac_n "(cached) $ac_c" 1>&6 |
3971 | else | |
3972 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 3973 | #line 3974 "configure" |
252b5132 RH |
3974 | #include "confdefs.h" |
3975 | #include <libintl.h> | |
3976 | EOF | |
3977 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
98e5953c | 3978 | { (eval echo configure:3979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
3979 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
3980 | if test -z "$ac_err"; then | |
3981 | rm -rf conftest* | |
3982 | eval "ac_cv_header_$ac_safe=yes" | |
3983 | else | |
3984 | echo "$ac_err" >&5 | |
3985 | echo "configure: failed program was:" >&5 | |
3986 | cat conftest.$ac_ext >&5 | |
3987 | rm -rf conftest* | |
3988 | eval "ac_cv_header_$ac_safe=no" | |
3989 | fi | |
3990 | rm -f conftest* | |
3991 | fi | |
3992 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
3993 | echo "$ac_t""yes" 1>&6 | |
3994 | echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6 | |
98e5953c | 3995 | echo "configure:3996: checking for gettext in libc" >&5 |
a2d91340 | 3996 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then |
252b5132 RH |
3997 | echo $ac_n "(cached) $ac_c" 1>&6 |
3998 | else | |
3999 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 4000 | #line 4001 "configure" |
252b5132 RH |
4001 | #include "confdefs.h" |
4002 | #include <libintl.h> | |
4003 | int main() { | |
4004 | return (int) gettext ("") | |
4005 | ; return 0; } | |
4006 | EOF | |
98e5953c | 4007 | if { (eval echo configure:4008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
4008 | rm -rf conftest* |
4009 | gt_cv_func_gettext_libc=yes | |
4010 | else | |
4011 | echo "configure: failed program was:" >&5 | |
4012 | cat conftest.$ac_ext >&5 | |
4013 | rm -rf conftest* | |
4014 | gt_cv_func_gettext_libc=no | |
4015 | fi | |
4016 | rm -f conftest* | |
4017 | fi | |
4018 | ||
4019 | echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6 | |
4020 | ||
4021 | if test "$gt_cv_func_gettext_libc" != "yes"; then | |
4022 | echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6 | |
98e5953c | 4023 | echo "configure:4024: checking for bindtextdomain in -lintl" >&5 |
a2d91340 AC |
4024 | ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'` |
4025 | if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then | |
252b5132 RH |
4026 | echo $ac_n "(cached) $ac_c" 1>&6 |
4027 | else | |
4028 | ac_save_LIBS="$LIBS" | |
4029 | LIBS="-lintl $LIBS" | |
4030 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 4031 | #line 4032 "configure" |
252b5132 RH |
4032 | #include "confdefs.h" |
4033 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4034 | /* We use char because int might match the return type of a gcc2 | |
4035 | builtin and then its argument prototype would still apply. */ | |
4036 | char bindtextdomain(); | |
4037 | ||
4038 | int main() { | |
4039 | bindtextdomain() | |
4040 | ; return 0; } | |
4041 | EOF | |
98e5953c | 4042 | if { (eval echo configure:4043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
4043 | rm -rf conftest* |
4044 | eval "ac_cv_lib_$ac_lib_var=yes" | |
4045 | else | |
4046 | echo "configure: failed program was:" >&5 | |
4047 | cat conftest.$ac_ext >&5 | |
4048 | rm -rf conftest* | |
4049 | eval "ac_cv_lib_$ac_lib_var=no" | |
4050 | fi | |
4051 | rm -f conftest* | |
4052 | LIBS="$ac_save_LIBS" | |
4053 | ||
4054 | fi | |
4055 | if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then | |
4056 | echo "$ac_t""yes" 1>&6 | |
4057 | echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6 | |
98e5953c | 4058 | echo "configure:4059: checking for gettext in libintl" >&5 |
a2d91340 | 4059 | if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then |
252b5132 RH |
4060 | echo $ac_n "(cached) $ac_c" 1>&6 |
4061 | else | |
4062 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 4063 | #line 4064 "configure" |
252b5132 RH |
4064 | #include "confdefs.h" |
4065 | ||
4066 | int main() { | |
4067 | return (int) gettext ("") | |
4068 | ; return 0; } | |
4069 | EOF | |
98e5953c | 4070 | if { (eval echo configure:4071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
4071 | rm -rf conftest* |
4072 | gt_cv_func_gettext_libintl=yes | |
4073 | else | |
4074 | echo "configure: failed program was:" >&5 | |
4075 | cat conftest.$ac_ext >&5 | |
4076 | rm -rf conftest* | |
4077 | gt_cv_func_gettext_libintl=no | |
4078 | fi | |
4079 | rm -f conftest* | |
4080 | fi | |
4081 | ||
4082 | echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6 | |
4083 | else | |
4084 | echo "$ac_t""no" 1>&6 | |
4085 | fi | |
4086 | ||
4087 | fi | |
4088 | ||
4089 | if test "$gt_cv_func_gettext_libc" = "yes" \ | |
4090 | || test "$gt_cv_func_gettext_libintl" = "yes"; then | |
4091 | cat >> confdefs.h <<\EOF | |
4092 | #define HAVE_GETTEXT 1 | |
4093 | EOF | |
4094 | ||
4095 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
4096 | set dummy msgfmt; ac_word=$2 | |
4097 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
98e5953c | 4098 | echo "configure:4099: checking for $ac_word" >&5 |
a2d91340 | 4099 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
252b5132 RH |
4100 | echo $ac_n "(cached) $ac_c" 1>&6 |
4101 | else | |
4102 | case "$MSGFMT" in | |
4103 | /*) | |
4104 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
4105 | ;; | |
4106 | *) | |
4107 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
4108 | for ac_dir in $PATH; do | |
4109 | test -z "$ac_dir" && ac_dir=. | |
4110 | if test -f $ac_dir/$ac_word; then | |
4111 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
4112 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
4113 | break | |
4114 | fi | |
4115 | fi | |
4116 | done | |
4117 | IFS="$ac_save_ifs" | |
4118 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" | |
4119 | ;; | |
4120 | esac | |
4121 | fi | |
4122 | MSGFMT="$ac_cv_path_MSGFMT" | |
4123 | if test -n "$MSGFMT"; then | |
4124 | echo "$ac_t""$MSGFMT" 1>&6 | |
4125 | else | |
4126 | echo "$ac_t""no" 1>&6 | |
4127 | fi | |
4128 | if test "$MSGFMT" != "no"; then | |
4129 | for ac_func in dcgettext | |
4130 | do | |
4131 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
98e5953c | 4132 | echo "configure:4133: checking for $ac_func" >&5 |
a2d91340 | 4133 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
252b5132 RH |
4134 | echo $ac_n "(cached) $ac_c" 1>&6 |
4135 | else | |
4136 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 4137 | #line 4138 "configure" |
252b5132 RH |
4138 | #include "confdefs.h" |
4139 | /* System header to define __stub macros and hopefully few prototypes, | |
4140 | which can conflict with char $ac_func(); below. */ | |
4141 | #include <assert.h> | |
4142 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4143 | /* We use char because int might match the return type of a gcc2 | |
4144 | builtin and then its argument prototype would still apply. */ | |
4145 | char $ac_func(); | |
4146 | ||
4147 | int main() { | |
4148 | ||
4149 | /* The GNU C library defines this for functions which it implements | |
4150 | to always fail with ENOSYS. Some functions are actually named | |
4151 | something starting with __ and the normal name is an alias. */ | |
4152 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4153 | choke me | |
4154 | #else | |
a2d91340 | 4155 | $ac_func(); |
252b5132 RH |
4156 | #endif |
4157 | ||
4158 | ; return 0; } | |
4159 | EOF | |
98e5953c | 4160 | if { (eval echo configure:4161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
4161 | rm -rf conftest* |
4162 | eval "ac_cv_func_$ac_func=yes" | |
4163 | else | |
4164 | echo "configure: failed program was:" >&5 | |
4165 | cat conftest.$ac_ext >&5 | |
4166 | rm -rf conftest* | |
4167 | eval "ac_cv_func_$ac_func=no" | |
4168 | fi | |
4169 | rm -f conftest* | |
4170 | fi | |
4171 | ||
4172 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
4173 | echo "$ac_t""yes" 1>&6 | |
4174 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
4175 | cat >> confdefs.h <<EOF | |
4176 | #define $ac_tr_func 1 | |
4177 | EOF | |
4178 | ||
4179 | else | |
4180 | echo "$ac_t""no" 1>&6 | |
4181 | fi | |
4182 | done | |
4183 | ||
4184 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
4185 | set dummy gmsgfmt; ac_word=$2 | |
4186 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
98e5953c | 4187 | echo "configure:4188: checking for $ac_word" >&5 |
a2d91340 | 4188 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
252b5132 RH |
4189 | echo $ac_n "(cached) $ac_c" 1>&6 |
4190 | else | |
4191 | case "$GMSGFMT" in | |
4192 | /*) | |
4193 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
4194 | ;; | |
4195 | ?:/*) | |
4196 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
4197 | ;; | |
4198 | *) | |
4199 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
4200 | ac_dummy="$PATH" | |
4201 | for ac_dir in $ac_dummy; do | |
4202 | test -z "$ac_dir" && ac_dir=. | |
4203 | if test -f $ac_dir/$ac_word; then | |
4204 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
4205 | break | |
4206 | fi | |
4207 | done | |
4208 | IFS="$ac_save_ifs" | |
4209 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
4210 | ;; | |
4211 | esac | |
4212 | fi | |
4213 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
4214 | if test -n "$GMSGFMT"; then | |
4215 | echo "$ac_t""$GMSGFMT" 1>&6 | |
4216 | else | |
4217 | echo "$ac_t""no" 1>&6 | |
4218 | fi | |
4219 | ||
4220 | # Extract the first word of "xgettext", so it can be a program name with args. | |
4221 | set dummy xgettext; ac_word=$2 | |
4222 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
98e5953c | 4223 | echo "configure:4224: checking for $ac_word" >&5 |
a2d91340 | 4224 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
252b5132 RH |
4225 | echo $ac_n "(cached) $ac_c" 1>&6 |
4226 | else | |
4227 | case "$XGETTEXT" in | |
4228 | /*) | |
4229 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
4230 | ;; | |
4231 | *) | |
4232 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
4233 | for ac_dir in $PATH; do | |
4234 | test -z "$ac_dir" && ac_dir=. | |
4235 | if test -f $ac_dir/$ac_word; then | |
4236 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
4237 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
4238 | break | |
4239 | fi | |
4240 | fi | |
4241 | done | |
4242 | IFS="$ac_save_ifs" | |
4243 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
4244 | ;; | |
4245 | esac | |
4246 | fi | |
4247 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
4248 | if test -n "$XGETTEXT"; then | |
4249 | echo "$ac_t""$XGETTEXT" 1>&6 | |
4250 | else | |
4251 | echo "$ac_t""no" 1>&6 | |
4252 | fi | |
4253 | ||
4254 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 4255 | #line 4256 "configure" |
252b5132 RH |
4256 | #include "confdefs.h" |
4257 | ||
4258 | int main() { | |
4259 | extern int _nl_msg_cat_cntr; | |
4260 | return _nl_msg_cat_cntr | |
4261 | ; return 0; } | |
4262 | EOF | |
98e5953c | 4263 | if { (eval echo configure:4264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
4264 | rm -rf conftest* |
4265 | CATOBJEXT=.gmo | |
4266 | DATADIRNAME=share | |
4267 | else | |
4268 | echo "configure: failed program was:" >&5 | |
4269 | cat conftest.$ac_ext >&5 | |
4270 | rm -rf conftest* | |
4271 | CATOBJEXT=.mo | |
4272 | DATADIRNAME=lib | |
4273 | fi | |
4274 | rm -f conftest* | |
4275 | INSTOBJEXT=.mo | |
4276 | fi | |
4277 | fi | |
4278 | ||
4279 | else | |
4280 | echo "$ac_t""no" 1>&6 | |
4281 | fi | |
4282 | ||
4283 | ||
4284 | ||
4285 | if test "$CATOBJEXT" = "NONE"; then | |
4286 | nls_cv_use_gnu_gettext=yes | |
4287 | fi | |
4288 | fi | |
4289 | ||
4290 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
4291 | INTLOBJS="\$(GETTOBJS)" | |
4292 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
4293 | set dummy msgfmt; ac_word=$2 | |
4294 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
98e5953c | 4295 | echo "configure:4296: checking for $ac_word" >&5 |
a2d91340 | 4296 | if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then |
252b5132 RH |
4297 | echo $ac_n "(cached) $ac_c" 1>&6 |
4298 | else | |
4299 | case "$MSGFMT" in | |
4300 | /*) | |
4301 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
4302 | ;; | |
4303 | *) | |
4304 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
4305 | for ac_dir in $PATH; do | |
4306 | test -z "$ac_dir" && ac_dir=. | |
4307 | if test -f $ac_dir/$ac_word; then | |
4308 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then | |
4309 | ac_cv_path_MSGFMT="$ac_dir/$ac_word" | |
4310 | break | |
4311 | fi | |
4312 | fi | |
4313 | done | |
4314 | IFS="$ac_save_ifs" | |
4315 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt" | |
4316 | ;; | |
4317 | esac | |
4318 | fi | |
4319 | MSGFMT="$ac_cv_path_MSGFMT" | |
4320 | if test -n "$MSGFMT"; then | |
4321 | echo "$ac_t""$MSGFMT" 1>&6 | |
4322 | else | |
4323 | echo "$ac_t""no" 1>&6 | |
4324 | fi | |
4325 | ||
4326 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
4327 | set dummy gmsgfmt; ac_word=$2 | |
4328 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
98e5953c | 4329 | echo "configure:4330: checking for $ac_word" >&5 |
a2d91340 | 4330 | if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then |
252b5132 RH |
4331 | echo $ac_n "(cached) $ac_c" 1>&6 |
4332 | else | |
4333 | case "$GMSGFMT" in | |
4334 | /*) | |
4335 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
4336 | ;; | |
4337 | ?:/*) | |
4338 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path. | |
4339 | ;; | |
4340 | *) | |
4341 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" | |
4342 | ac_dummy="$PATH" | |
4343 | for ac_dir in $ac_dummy; do | |
4344 | test -z "$ac_dir" && ac_dir=. | |
4345 | if test -f $ac_dir/$ac_word; then | |
4346 | ac_cv_path_GMSGFMT="$ac_dir/$ac_word" | |
4347 | break | |
4348 | fi | |
4349 | done | |
4350 | IFS="$ac_save_ifs" | |
4351 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
4352 | ;; | |
4353 | esac | |
4354 | fi | |
4355 | GMSGFMT="$ac_cv_path_GMSGFMT" | |
4356 | if test -n "$GMSGFMT"; then | |
4357 | echo "$ac_t""$GMSGFMT" 1>&6 | |
4358 | else | |
4359 | echo "$ac_t""no" 1>&6 | |
4360 | fi | |
4361 | ||
4362 | # Extract the first word of "xgettext", so it can be a program name with args. | |
4363 | set dummy xgettext; ac_word=$2 | |
4364 | echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 | |
98e5953c | 4365 | echo "configure:4366: checking for $ac_word" >&5 |
a2d91340 | 4366 | if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then |
252b5132 RH |
4367 | echo $ac_n "(cached) $ac_c" 1>&6 |
4368 | else | |
4369 | case "$XGETTEXT" in | |
4370 | /*) | |
4371 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
4372 | ;; | |
4373 | *) | |
4374 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | |
4375 | for ac_dir in $PATH; do | |
4376 | test -z "$ac_dir" && ac_dir=. | |
4377 | if test -f $ac_dir/$ac_word; then | |
4378 | if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then | |
4379 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word" | |
4380 | break | |
4381 | fi | |
4382 | fi | |
4383 | done | |
4384 | IFS="$ac_save_ifs" | |
4385 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
4386 | ;; | |
4387 | esac | |
4388 | fi | |
4389 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
4390 | if test -n "$XGETTEXT"; then | |
4391 | echo "$ac_t""$XGETTEXT" 1>&6 | |
4392 | else | |
4393 | echo "$ac_t""no" 1>&6 | |
4394 | fi | |
4395 | ||
4396 | ||
4397 | USE_INCLUDED_LIBINTL=yes | |
4398 | CATOBJEXT=.gmo | |
4399 | INSTOBJEXT=.mo | |
4400 | DATADIRNAME=share | |
4401 | INTLDEPS='$(top_builddir)/../intl/libintl.a' | |
4402 | INTLLIBS=$INTLDEPS | |
4403 | LIBS=`echo $LIBS | sed -e 's/-lintl//'` | |
4404 | nls_cv_header_intl=libintl.h | |
4405 | nls_cv_header_libgt=libgettext.h | |
4406 | fi | |
4407 | ||
4408 | if test "$XGETTEXT" != ":"; then | |
4409 | if $XGETTEXT --omit-header /dev/null 2> /dev/null; then | |
4410 | : ; | |
4411 | else | |
4412 | echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6 | |
4413 | XGETTEXT=":" | |
4414 | fi | |
4415 | fi | |
4416 | ||
4417 | # We need to process the po/ directory. | |
4418 | POSUB=po | |
4419 | else | |
4420 | DATADIRNAME=share | |
4421 | nls_cv_header_intl=libintl.h | |
4422 | nls_cv_header_libgt=libgettext.h | |
4423 | fi | |
4424 | ||
4425 | # If this is used in GNU gettext we have to set USE_NLS to `yes' | |
4426 | # because some of the sources are only built for this goal. | |
4427 | if test "$PACKAGE" = gettext; then | |
4428 | USE_NLS=yes | |
4429 | USE_INCLUDED_LIBINTL=yes | |
4430 | fi | |
4431 | ||
4432 | for lang in $ALL_LINGUAS; do | |
4433 | GMOFILES="$GMOFILES $lang.gmo" | |
4434 | POFILES="$POFILES $lang.po" | |
4435 | done | |
4436 | ||
4437 | ||
4438 | ||
4439 | ||
4440 | ||
4441 | ||
4442 | ||
4443 | ||
4444 | ||
4445 | ||
4446 | ||
4447 | ||
4448 | ||
4449 | ||
4450 | if test "x$CATOBJEXT" != "x"; then | |
4451 | if test "x$ALL_LINGUAS" = "x"; then | |
4452 | LINGUAS= | |
4453 | else | |
4454 | echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6 | |
98e5953c | 4455 | echo "configure:4456: checking for catalogs to be installed" >&5 |
252b5132 RH |
4456 | NEW_LINGUAS= |
4457 | for lang in ${LINGUAS=$ALL_LINGUAS}; do | |
4458 | case "$ALL_LINGUAS" in | |
4459 | *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;; | |
4460 | esac | |
4461 | done | |
4462 | LINGUAS=$NEW_LINGUAS | |
4463 | echo "$ac_t""$LINGUAS" 1>&6 | |
4464 | fi | |
4465 | ||
4466 | if test -n "$LINGUAS"; then | |
4467 | for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done | |
4468 | fi | |
4469 | fi | |
4470 | ||
4471 | if test $ac_cv_header_locale_h = yes; then | |
4472 | INCLUDE_LOCALE_H="#include <locale.h>" | |
4473 | else | |
4474 | INCLUDE_LOCALE_H="\ | |
4475 | /* The system does not provide the header <locale.h>. Take care yourself. */" | |
4476 | fi | |
4477 | ||
4478 | ||
4479 | if test -f $srcdir/po2tbl.sed.in; then | |
4480 | if test "$CATOBJEXT" = ".cat"; then | |
4481 | ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'` | |
4482 | echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6 | |
98e5953c | 4483 | echo "configure:4484: checking for linux/version.h" >&5 |
a2d91340 | 4484 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
252b5132 RH |
4485 | echo $ac_n "(cached) $ac_c" 1>&6 |
4486 | else | |
4487 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 4488 | #line 4489 "configure" |
252b5132 RH |
4489 | #include "confdefs.h" |
4490 | #include <linux/version.h> | |
4491 | EOF | |
4492 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
98e5953c | 4493 | { (eval echo configure:4494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
4494 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4495 | if test -z "$ac_err"; then | |
4496 | rm -rf conftest* | |
4497 | eval "ac_cv_header_$ac_safe=yes" | |
4498 | else | |
4499 | echo "$ac_err" >&5 | |
4500 | echo "configure: failed program was:" >&5 | |
4501 | cat conftest.$ac_ext >&5 | |
4502 | rm -rf conftest* | |
4503 | eval "ac_cv_header_$ac_safe=no" | |
4504 | fi | |
4505 | rm -f conftest* | |
4506 | fi | |
4507 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4508 | echo "$ac_t""yes" 1>&6 | |
4509 | msgformat=linux | |
4510 | else | |
4511 | echo "$ac_t""no" 1>&6 | |
4512 | msgformat=xopen | |
4513 | fi | |
4514 | ||
4515 | ||
4516 | sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed | |
4517 | fi | |
4518 | sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \ | |
4519 | $srcdir/po2tbl.sed.in > po2tbl.sed | |
4520 | fi | |
4521 | ||
4522 | if test "$PACKAGE" = "gettext"; then | |
4523 | GT_NO="#NO#" | |
4524 | GT_YES= | |
4525 | else | |
4526 | GT_NO= | |
4527 | GT_YES="#YES#" | |
4528 | fi | |
4529 | ||
4530 | ||
4531 | ||
4532 | MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs" | |
4533 | ||
4534 | ||
4535 | l= | |
4536 | ||
4537 | ||
4538 | if test -d $srcdir/po; then | |
4539 | test -d po || mkdir po | |
4540 | if test "x$srcdir" != "x."; then | |
4541 | if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then | |
4542 | posrcprefix="$srcdir/" | |
4543 | else | |
4544 | posrcprefix="../$srcdir/" | |
4545 | fi | |
4546 | else | |
4547 | posrcprefix="../" | |
4548 | fi | |
4549 | rm -f po/POTFILES | |
4550 | sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ | |
4551 | < $srcdir/po/POTFILES.in > po/POTFILES | |
4552 | fi | |
4553 | ||
4554 | ||
4555 | echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 | |
98e5953c | 4556 | echo "configure:4557: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
252b5132 RH |
4557 | # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. |
4558 | if test "${enable_maintainer_mode+set}" = set; then | |
4559 | enableval="$enable_maintainer_mode" | |
4560 | USE_MAINTAINER_MODE=$enableval | |
4561 | else | |
4562 | USE_MAINTAINER_MODE=no | |
4563 | fi | |
4564 | ||
4565 | echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 | |
4566 | ||
4567 | ||
4568 | if test $USE_MAINTAINER_MODE = yes; then | |
4569 | MAINTAINER_MODE_TRUE= | |
4570 | MAINTAINER_MODE_FALSE='#' | |
4571 | else | |
4572 | MAINTAINER_MODE_TRUE='#' | |
4573 | MAINTAINER_MODE_FALSE= | |
4574 | fi | |
4575 | MAINT=$MAINTAINER_MODE_TRUE | |
4576 | ||
4577 | ||
4578 | echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 | |
98e5953c | 4579 | echo "configure:4580: checking for Cygwin environment" >&5 |
a2d91340 | 4580 | if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then |
252b5132 RH |
4581 | echo $ac_n "(cached) $ac_c" 1>&6 |
4582 | else | |
4583 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 4584 | #line 4585 "configure" |
252b5132 RH |
4585 | #include "confdefs.h" |
4586 | ||
4587 | int main() { | |
4588 | ||
4589 | #ifndef __CYGWIN__ | |
4590 | #define __CYGWIN__ __CYGWIN32__ | |
4591 | #endif | |
4592 | return __CYGWIN__; | |
4593 | ; return 0; } | |
4594 | EOF | |
98e5953c | 4595 | if { (eval echo configure:4596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
4596 | rm -rf conftest* |
4597 | ac_cv_cygwin=yes | |
4598 | else | |
4599 | echo "configure: failed program was:" >&5 | |
4600 | cat conftest.$ac_ext >&5 | |
4601 | rm -rf conftest* | |
4602 | ac_cv_cygwin=no | |
4603 | fi | |
4604 | rm -f conftest* | |
a2d91340 | 4605 | rm -f conftest* |
252b5132 RH |
4606 | fi |
4607 | ||
4608 | echo "$ac_t""$ac_cv_cygwin" 1>&6 | |
4609 | CYGWIN= | |
4610 | test "$ac_cv_cygwin" = yes && CYGWIN=yes | |
4611 | echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 | |
98e5953c | 4612 | echo "configure:4613: checking for mingw32 environment" >&5 |
a2d91340 | 4613 | if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then |
252b5132 RH |
4614 | echo $ac_n "(cached) $ac_c" 1>&6 |
4615 | else | |
4616 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 4617 | #line 4618 "configure" |
252b5132 RH |
4618 | #include "confdefs.h" |
4619 | ||
4620 | int main() { | |
4621 | return __MINGW32__; | |
4622 | ; return 0; } | |
4623 | EOF | |
98e5953c | 4624 | if { (eval echo configure:4625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
4625 | rm -rf conftest* |
4626 | ac_cv_mingw32=yes | |
4627 | else | |
4628 | echo "configure: failed program was:" >&5 | |
4629 | cat conftest.$ac_ext >&5 | |
4630 | rm -rf conftest* | |
4631 | ac_cv_mingw32=no | |
4632 | fi | |
4633 | rm -f conftest* | |
a2d91340 | 4634 | rm -f conftest* |
252b5132 RH |
4635 | fi |
4636 | ||
4637 | echo "$ac_t""$ac_cv_mingw32" 1>&6 | |
4638 | MINGW32= | |
4639 | test "$ac_cv_mingw32" = yes && MINGW32=yes | |
4640 | ||
4641 | ||
4642 | echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 | |
98e5953c | 4643 | echo "configure:4644: checking for executable suffix" >&5 |
a2d91340 | 4644 | if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then |
252b5132 RH |
4645 | echo $ac_n "(cached) $ac_c" 1>&6 |
4646 | else | |
a2d91340 | 4647 | if test "$CYGWIN" = yes || test "$MINGW32" = yes; then |
252b5132 RH |
4648 | ac_cv_exeext=.exe |
4649 | else | |
4650 | rm -f conftest* | |
4651 | echo 'int main () { return 0; }' > conftest.$ac_ext | |
4652 | ac_cv_exeext= | |
98e5953c | 4653 | if { (eval echo configure:4654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then |
252b5132 RH |
4654 | for file in conftest.*; do |
4655 | case $file in | |
a2d91340 | 4656 | *.c | *.o | *.obj | *.ilk | *.pdb) ;; |
252b5132 RH |
4657 | *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; |
4658 | esac | |
4659 | done | |
4660 | else | |
4661 | { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } | |
4662 | fi | |
4663 | rm -f conftest* | |
4664 | test x"${ac_cv_exeext}" = x && ac_cv_exeext=no | |
4665 | fi | |
4666 | fi | |
4667 | ||
4668 | EXEEXT="" | |
4669 | test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} | |
4670 | echo "$ac_t""${ac_cv_exeext}" 1>&6 | |
4671 | ac_exeext=$EXEEXT | |
4672 | ||
4673 | ||
4674 | for ac_hdr in string.h stdlib.h memory.h strings.h unistd.h stdarg.h varargs.h errno.h sys/types.h | |
4675 | do | |
4676 | ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` | |
4677 | echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 | |
98e5953c | 4678 | echo "configure:4679: checking for $ac_hdr" >&5 |
a2d91340 | 4679 | if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then |
252b5132 RH |
4680 | echo $ac_n "(cached) $ac_c" 1>&6 |
4681 | else | |
4682 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 4683 | #line 4684 "configure" |
252b5132 RH |
4684 | #include "confdefs.h" |
4685 | #include <$ac_hdr> | |
4686 | EOF | |
4687 | ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" | |
98e5953c | 4688 | { (eval echo configure:4689: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } |
252b5132 RH |
4689 | ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` |
4690 | if test -z "$ac_err"; then | |
4691 | rm -rf conftest* | |
4692 | eval "ac_cv_header_$ac_safe=yes" | |
4693 | else | |
4694 | echo "$ac_err" >&5 | |
4695 | echo "configure: failed program was:" >&5 | |
4696 | cat conftest.$ac_ext >&5 | |
4697 | rm -rf conftest* | |
4698 | eval "ac_cv_header_$ac_safe=no" | |
4699 | fi | |
4700 | rm -f conftest* | |
4701 | fi | |
4702 | if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then | |
4703 | echo "$ac_t""yes" 1>&6 | |
4704 | ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` | |
4705 | cat >> confdefs.h <<EOF | |
4706 | #define $ac_tr_hdr 1 | |
4707 | EOF | |
4708 | ||
4709 | else | |
4710 | echo "$ac_t""no" 1>&6 | |
4711 | fi | |
4712 | done | |
4713 | ||
4714 | ||
4715 | # Put this here so that autoconf's "cross-compiling" message doesn't confuse | |
4716 | # people who are not cross-compiling but are compiling cross-assemblers. | |
4717 | echo $ac_n "checking whether compiling a cross-assembler""... $ac_c" 1>&6 | |
98e5953c | 4718 | echo "configure:4719: checking whether compiling a cross-assembler" >&5 |
252b5132 RH |
4719 | if test "${host}" = "${target}"; then |
4720 | cross_gas=no | |
4721 | else | |
4722 | cross_gas=yes | |
4723 | cat >> confdefs.h <<\EOF | |
4724 | #define CROSS_COMPILE 1 | |
4725 | EOF | |
4726 | ||
4727 | fi | |
4728 | echo "$ac_t""$cross_gas" 1>&6 | |
4729 | ||
4730 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
4731 | # for constant arguments. Useless! | |
4732 | echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 | |
98e5953c | 4733 | echo "configure:4734: checking for working alloca.h" >&5 |
a2d91340 | 4734 | if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then |
252b5132 RH |
4735 | echo $ac_n "(cached) $ac_c" 1>&6 |
4736 | else | |
4737 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 4738 | #line 4739 "configure" |
252b5132 RH |
4739 | #include "confdefs.h" |
4740 | #include <alloca.h> | |
4741 | int main() { | |
4742 | char *p = alloca(2 * sizeof(int)); | |
4743 | ; return 0; } | |
4744 | EOF | |
98e5953c | 4745 | if { (eval echo configure:4746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
4746 | rm -rf conftest* |
4747 | ac_cv_header_alloca_h=yes | |
4748 | else | |
4749 | echo "configure: failed program was:" >&5 | |
4750 | cat conftest.$ac_ext >&5 | |
4751 | rm -rf conftest* | |
4752 | ac_cv_header_alloca_h=no | |
4753 | fi | |
4754 | rm -f conftest* | |
4755 | fi | |
4756 | ||
4757 | echo "$ac_t""$ac_cv_header_alloca_h" 1>&6 | |
4758 | if test $ac_cv_header_alloca_h = yes; then | |
4759 | cat >> confdefs.h <<\EOF | |
4760 | #define HAVE_ALLOCA_H 1 | |
4761 | EOF | |
4762 | ||
4763 | fi | |
4764 | ||
4765 | echo $ac_n "checking for alloca""... $ac_c" 1>&6 | |
98e5953c | 4766 | echo "configure:4767: checking for alloca" >&5 |
a2d91340 | 4767 | if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then |
252b5132 RH |
4768 | echo $ac_n "(cached) $ac_c" 1>&6 |
4769 | else | |
4770 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 4771 | #line 4772 "configure" |
252b5132 RH |
4772 | #include "confdefs.h" |
4773 | ||
4774 | #ifdef __GNUC__ | |
4775 | # define alloca __builtin_alloca | |
4776 | #else | |
4777 | # ifdef _MSC_VER | |
4778 | # include <malloc.h> | |
4779 | # define alloca _alloca | |
4780 | # else | |
4781 | # if HAVE_ALLOCA_H | |
4782 | # include <alloca.h> | |
4783 | # else | |
4784 | # ifdef _AIX | |
4785 | #pragma alloca | |
4786 | # else | |
4787 | # ifndef alloca /* predefined by HP cc +Olibcalls */ | |
4788 | char *alloca (); | |
4789 | # endif | |
4790 | # endif | |
4791 | # endif | |
4792 | # endif | |
4793 | #endif | |
4794 | ||
4795 | int main() { | |
4796 | char *p = (char *) alloca(1); | |
4797 | ; return 0; } | |
4798 | EOF | |
98e5953c | 4799 | if { (eval echo configure:4800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
4800 | rm -rf conftest* |
4801 | ac_cv_func_alloca_works=yes | |
4802 | else | |
4803 | echo "configure: failed program was:" >&5 | |
4804 | cat conftest.$ac_ext >&5 | |
4805 | rm -rf conftest* | |
4806 | ac_cv_func_alloca_works=no | |
4807 | fi | |
4808 | rm -f conftest* | |
4809 | fi | |
4810 | ||
4811 | echo "$ac_t""$ac_cv_func_alloca_works" 1>&6 | |
4812 | if test $ac_cv_func_alloca_works = yes; then | |
4813 | cat >> confdefs.h <<\EOF | |
4814 | #define HAVE_ALLOCA 1 | |
4815 | EOF | |
4816 | ||
4817 | fi | |
4818 | ||
4819 | if test $ac_cv_func_alloca_works = no; then | |
4820 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
4821 | # that cause trouble. Some versions do not even contain alloca or | |
4822 | # contain a buggy version. If you still want to use their alloca, | |
4823 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
4824 | ALLOCA=alloca.${ac_objext} | |
4825 | cat >> confdefs.h <<\EOF | |
4826 | #define C_ALLOCA 1 | |
4827 | EOF | |
4828 | ||
4829 | ||
4830 | echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 | |
98e5953c | 4831 | echo "configure:4832: checking whether alloca needs Cray hooks" >&5 |
a2d91340 | 4832 | if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then |
252b5132 RH |
4833 | echo $ac_n "(cached) $ac_c" 1>&6 |
4834 | else | |
4835 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 4836 | #line 4837 "configure" |
252b5132 RH |
4837 | #include "confdefs.h" |
4838 | #if defined(CRAY) && ! defined(CRAY2) | |
4839 | webecray | |
4840 | #else | |
4841 | wenotbecray | |
4842 | #endif | |
4843 | ||
4844 | EOF | |
4845 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
4846 | egrep "webecray" >/dev/null 2>&1; then | |
4847 | rm -rf conftest* | |
4848 | ac_cv_os_cray=yes | |
4849 | else | |
4850 | rm -rf conftest* | |
4851 | ac_cv_os_cray=no | |
4852 | fi | |
4853 | rm -f conftest* | |
4854 | ||
4855 | fi | |
4856 | ||
4857 | echo "$ac_t""$ac_cv_os_cray" 1>&6 | |
4858 | if test $ac_cv_os_cray = yes; then | |
4859 | for ac_func in _getb67 GETB67 getb67; do | |
4860 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
98e5953c | 4861 | echo "configure:4862: checking for $ac_func" >&5 |
a2d91340 | 4862 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
252b5132 RH |
4863 | echo $ac_n "(cached) $ac_c" 1>&6 |
4864 | else | |
4865 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 4866 | #line 4867 "configure" |
252b5132 RH |
4867 | #include "confdefs.h" |
4868 | /* System header to define __stub macros and hopefully few prototypes, | |
4869 | which can conflict with char $ac_func(); below. */ | |
4870 | #include <assert.h> | |
4871 | /* Override any gcc2 internal prototype to avoid an error. */ | |
4872 | /* We use char because int might match the return type of a gcc2 | |
4873 | builtin and then its argument prototype would still apply. */ | |
4874 | char $ac_func(); | |
4875 | ||
4876 | int main() { | |
4877 | ||
4878 | /* The GNU C library defines this for functions which it implements | |
4879 | to always fail with ENOSYS. Some functions are actually named | |
4880 | something starting with __ and the normal name is an alias. */ | |
4881 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
4882 | choke me | |
4883 | #else | |
a2d91340 | 4884 | $ac_func(); |
252b5132 RH |
4885 | #endif |
4886 | ||
4887 | ; return 0; } | |
4888 | EOF | |
98e5953c | 4889 | if { (eval echo configure:4890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
4890 | rm -rf conftest* |
4891 | eval "ac_cv_func_$ac_func=yes" | |
4892 | else | |
4893 | echo "configure: failed program was:" >&5 | |
4894 | cat conftest.$ac_ext >&5 | |
4895 | rm -rf conftest* | |
4896 | eval "ac_cv_func_$ac_func=no" | |
4897 | fi | |
4898 | rm -f conftest* | |
4899 | fi | |
4900 | ||
4901 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
4902 | echo "$ac_t""yes" 1>&6 | |
4903 | cat >> confdefs.h <<EOF | |
4904 | #define CRAY_STACKSEG_END $ac_func | |
4905 | EOF | |
4906 | ||
4907 | break | |
4908 | else | |
4909 | echo "$ac_t""no" 1>&6 | |
4910 | fi | |
4911 | ||
4912 | done | |
4913 | fi | |
4914 | ||
4915 | echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 | |
98e5953c | 4916 | echo "configure:4917: checking stack direction for C alloca" >&5 |
a2d91340 | 4917 | if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then |
252b5132 RH |
4918 | echo $ac_n "(cached) $ac_c" 1>&6 |
4919 | else | |
4920 | if test "$cross_compiling" = yes; then | |
4921 | ac_cv_c_stack_direction=0 | |
4922 | else | |
4923 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 4924 | #line 4925 "configure" |
252b5132 RH |
4925 | #include "confdefs.h" |
4926 | find_stack_direction () | |
4927 | { | |
4928 | static char *addr = 0; | |
4929 | auto char dummy; | |
4930 | if (addr == 0) | |
4931 | { | |
4932 | addr = &dummy; | |
4933 | return find_stack_direction (); | |
4934 | } | |
4935 | else | |
4936 | return (&dummy > addr) ? 1 : -1; | |
4937 | } | |
4938 | main () | |
4939 | { | |
4940 | exit (find_stack_direction() < 0); | |
4941 | } | |
4942 | EOF | |
98e5953c | 4943 | if { (eval echo configure:4944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null |
252b5132 RH |
4944 | then |
4945 | ac_cv_c_stack_direction=1 | |
4946 | else | |
4947 | echo "configure: failed program was:" >&5 | |
4948 | cat conftest.$ac_ext >&5 | |
4949 | rm -fr conftest* | |
4950 | ac_cv_c_stack_direction=-1 | |
4951 | fi | |
4952 | rm -fr conftest* | |
4953 | fi | |
4954 | ||
4955 | fi | |
4956 | ||
4957 | echo "$ac_t""$ac_cv_c_stack_direction" 1>&6 | |
4958 | cat >> confdefs.h <<EOF | |
4959 | #define STACK_DIRECTION $ac_cv_c_stack_direction | |
4960 | EOF | |
4961 | ||
4962 | fi | |
4963 | ||
4964 | echo $ac_n "checking for inline""... $ac_c" 1>&6 | |
98e5953c | 4965 | echo "configure:4966: checking for inline" >&5 |
a2d91340 | 4966 | if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then |
252b5132 RH |
4967 | echo $ac_n "(cached) $ac_c" 1>&6 |
4968 | else | |
4969 | ac_cv_c_inline=no | |
4970 | for ac_kw in inline __inline__ __inline; do | |
4971 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 4972 | #line 4973 "configure" |
252b5132 RH |
4973 | #include "confdefs.h" |
4974 | ||
4975 | int main() { | |
a2d91340 | 4976 | } $ac_kw foo() { |
252b5132 RH |
4977 | ; return 0; } |
4978 | EOF | |
98e5953c | 4979 | if { (eval echo configure:4980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then |
252b5132 RH |
4980 | rm -rf conftest* |
4981 | ac_cv_c_inline=$ac_kw; break | |
4982 | else | |
4983 | echo "configure: failed program was:" >&5 | |
4984 | cat conftest.$ac_ext >&5 | |
4985 | fi | |
4986 | rm -f conftest* | |
4987 | done | |
4988 | ||
4989 | fi | |
4990 | ||
4991 | echo "$ac_t""$ac_cv_c_inline" 1>&6 | |
4992 | case "$ac_cv_c_inline" in | |
4993 | inline | yes) ;; | |
4994 | no) cat >> confdefs.h <<\EOF | |
4995 | #define inline | |
4996 | EOF | |
4997 | ;; | |
4998 | *) cat >> confdefs.h <<EOF | |
4999 | #define inline $ac_cv_c_inline | |
5000 | EOF | |
5001 | ;; | |
5002 | esac | |
5003 | ||
5004 | ||
5005 | # VMS doesn't have unlink. | |
5006 | for ac_func in unlink remove | |
5007 | do | |
5008 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
98e5953c | 5009 | echo "configure:5010: checking for $ac_func" >&5 |
a2d91340 | 5010 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
252b5132 RH |
5011 | echo $ac_n "(cached) $ac_c" 1>&6 |
5012 | else | |
5013 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 5014 | #line 5015 "configure" |
252b5132 RH |
5015 | #include "confdefs.h" |
5016 | /* System header to define __stub macros and hopefully few prototypes, | |
5017 | which can conflict with char $ac_func(); below. */ | |
5018 | #include <assert.h> | |
5019 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5020 | /* We use char because int might match the return type of a gcc2 | |
5021 | builtin and then its argument prototype would still apply. */ | |
5022 | char $ac_func(); | |
5023 | ||
5024 | int main() { | |
5025 | ||
5026 | /* The GNU C library defines this for functions which it implements | |
5027 | to always fail with ENOSYS. Some functions are actually named | |
5028 | something starting with __ and the normal name is an alias. */ | |
5029 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5030 | choke me | |
5031 | #else | |
a2d91340 | 5032 | $ac_func(); |
252b5132 RH |
5033 | #endif |
5034 | ||
5035 | ; return 0; } | |
5036 | EOF | |
98e5953c | 5037 | if { (eval echo configure:5038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
5038 | rm -rf conftest* |
5039 | eval "ac_cv_func_$ac_func=yes" | |
5040 | else | |
5041 | echo "configure: failed program was:" >&5 | |
5042 | cat conftest.$ac_ext >&5 | |
5043 | rm -rf conftest* | |
5044 | eval "ac_cv_func_$ac_func=no" | |
5045 | fi | |
5046 | rm -f conftest* | |
5047 | fi | |
5048 | ||
5049 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5050 | echo "$ac_t""yes" 1>&6 | |
5051 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5052 | cat >> confdefs.h <<EOF | |
5053 | #define $ac_tr_func 1 | |
5054 | EOF | |
5055 | break | |
5056 | else | |
5057 | echo "$ac_t""no" 1>&6 | |
5058 | fi | |
5059 | done | |
5060 | ||
5061 | ||
5062 | # Some systems don't have sbrk(). | |
5063 | for ac_func in sbrk | |
5064 | do | |
5065 | echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 | |
98e5953c | 5066 | echo "configure:5067: checking for $ac_func" >&5 |
a2d91340 | 5067 | if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then |
252b5132 RH |
5068 | echo $ac_n "(cached) $ac_c" 1>&6 |
5069 | else | |
5070 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 5071 | #line 5072 "configure" |
252b5132 RH |
5072 | #include "confdefs.h" |
5073 | /* System header to define __stub macros and hopefully few prototypes, | |
5074 | which can conflict with char $ac_func(); below. */ | |
5075 | #include <assert.h> | |
5076 | /* Override any gcc2 internal prototype to avoid an error. */ | |
5077 | /* We use char because int might match the return type of a gcc2 | |
5078 | builtin and then its argument prototype would still apply. */ | |
5079 | char $ac_func(); | |
5080 | ||
5081 | int main() { | |
5082 | ||
5083 | /* The GNU C library defines this for functions which it implements | |
5084 | to always fail with ENOSYS. Some functions are actually named | |
5085 | something starting with __ and the normal name is an alias. */ | |
5086 | #if defined (__stub_$ac_func) || defined (__stub___$ac_func) | |
5087 | choke me | |
5088 | #else | |
a2d91340 | 5089 | $ac_func(); |
252b5132 RH |
5090 | #endif |
5091 | ||
5092 | ; return 0; } | |
5093 | EOF | |
98e5953c | 5094 | if { (eval echo configure:5095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
5095 | rm -rf conftest* |
5096 | eval "ac_cv_func_$ac_func=yes" | |
5097 | else | |
5098 | echo "configure: failed program was:" >&5 | |
5099 | cat conftest.$ac_ext >&5 | |
5100 | rm -rf conftest* | |
5101 | eval "ac_cv_func_$ac_func=no" | |
5102 | fi | |
5103 | rm -f conftest* | |
5104 | fi | |
5105 | ||
5106 | if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then | |
5107 | echo "$ac_t""yes" 1>&6 | |
5108 | ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` | |
5109 | cat >> confdefs.h <<EOF | |
5110 | #define $ac_tr_func 1 | |
5111 | EOF | |
5112 | ||
5113 | else | |
5114 | echo "$ac_t""no" 1>&6 | |
5115 | fi | |
5116 | done | |
5117 | ||
5118 | ||
5119 | # Some non-ANSI preprocessors botch requoting inside strings. That's bad | |
5120 | # enough, but on some of those systems, the assert macro relies on requoting | |
5121 | # working properly! | |
5122 | echo $ac_n "checking for working assert macro""... $ac_c" 1>&6 | |
98e5953c | 5123 | echo "configure:5124: checking for working assert macro" >&5 |
a2d91340 | 5124 | if eval "test \"`echo '$''{'gas_cv_assert_ok'+set}'`\" = set"; then |
252b5132 RH |
5125 | echo $ac_n "(cached) $ac_c" 1>&6 |
5126 | else | |
5127 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 5128 | #line 5129 "configure" |
252b5132 RH |
5129 | #include "confdefs.h" |
5130 | #include <assert.h> | |
5131 | #include <stdio.h> | |
5132 | int main() { | |
5133 | ||
5134 | /* check for requoting problems */ | |
5135 | static int a, b, c, d; | |
5136 | static char *s; | |
5137 | assert (!strcmp(s, "foo bar baz quux")); | |
5138 | /* check for newline handling */ | |
5139 | assert (a == b | |
5140 | || c == d); | |
5141 | ||
5142 | ; return 0; } | |
5143 | EOF | |
98e5953c | 5144 | if { (eval echo configure:5145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
5145 | rm -rf conftest* |
5146 | gas_cv_assert_ok=yes | |
5147 | else | |
5148 | echo "configure: failed program was:" >&5 | |
5149 | cat conftest.$ac_ext >&5 | |
5150 | rm -rf conftest* | |
5151 | gas_cv_assert_ok=no | |
5152 | fi | |
5153 | rm -f conftest* | |
5154 | fi | |
5155 | echo "$ac_t""$gas_cv_assert_ok" 1>&6 | |
5156 | test $gas_cv_assert_ok = yes || cat >> confdefs.h <<\EOF | |
5157 | #define BROKEN_ASSERT 1 | |
5158 | EOF | |
5159 | ||
5160 | ||
5161 | ||
5162 | # On some systems, the system header files may not declare malloc, realloc, | |
5163 | # and free. There are places where gas needs these functions to have been | |
5164 | # declared -- such as when taking their addresses. | |
5165 | gas_test_headers=" | |
5166 | #ifdef HAVE_MEMORY_H | |
5167 | #include <memory.h> | |
5168 | #endif | |
5169 | #ifdef HAVE_STRING_H | |
5170 | #include <string.h> | |
5171 | #else | |
5172 | #ifdef HAVE_STRINGS_H | |
5173 | #include <strings.h> | |
5174 | #endif | |
5175 | #endif | |
5176 | #ifdef HAVE_STDLIB_H | |
5177 | #include <stdlib.h> | |
5178 | #endif | |
5179 | #ifdef HAVE_UNISTD_H | |
5180 | #include <unistd.h> | |
5181 | #endif | |
5182 | " | |
5183 | ||
5184 | echo $ac_n "checking whether declaration is required for strstr""... $ac_c" 1>&6 | |
98e5953c | 5185 | echo "configure:5186: checking whether declaration is required for strstr" >&5 |
a2d91340 | 5186 | if eval "test \"`echo '$''{'gas_cv_decl_needed_strstr'+set}'`\" = set"; then |
252b5132 RH |
5187 | echo $ac_n "(cached) $ac_c" 1>&6 |
5188 | else | |
5189 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 5190 | #line 5191 "configure" |
252b5132 RH |
5191 | #include "confdefs.h" |
5192 | $gas_test_headers | |
5193 | int main() { | |
5194 | ||
5195 | typedef char *(*f)(); | |
5196 | f x; | |
5197 | x = (f) strstr; | |
5198 | ||
5199 | ; return 0; } | |
5200 | EOF | |
98e5953c | 5201 | if { (eval echo configure:5202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
5202 | rm -rf conftest* |
5203 | gas_cv_decl_needed_strstr=no | |
5204 | else | |
5205 | echo "configure: failed program was:" >&5 | |
5206 | cat conftest.$ac_ext >&5 | |
5207 | rm -rf conftest* | |
5208 | gas_cv_decl_needed_strstr=yes | |
5209 | fi | |
5210 | rm -f conftest* | |
5211 | fi | |
5212 | echo "$ac_t""$gas_cv_decl_needed_strstr" 1>&6 | |
5213 | if test $gas_cv_decl_needed_strstr = yes; then | |
5214 | cat >> confdefs.h <<\EOF | |
5215 | #define NEED_DECLARATION_STRSTR 1 | |
5216 | EOF | |
5217 | ||
5218 | fi | |
5219 | ||
5220 | ||
5221 | echo $ac_n "checking whether declaration is required for malloc""... $ac_c" 1>&6 | |
98e5953c | 5222 | echo "configure:5223: checking whether declaration is required for malloc" >&5 |
a2d91340 | 5223 | if eval "test \"`echo '$''{'gas_cv_decl_needed_malloc'+set}'`\" = set"; then |
252b5132 RH |
5224 | echo $ac_n "(cached) $ac_c" 1>&6 |
5225 | else | |
5226 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 5227 | #line 5228 "configure" |
252b5132 RH |
5228 | #include "confdefs.h" |
5229 | $gas_test_headers | |
5230 | int main() { | |
5231 | ||
5232 | typedef char *(*f)(); | |
5233 | f x; | |
5234 | x = (f) malloc; | |
5235 | ||
5236 | ; return 0; } | |
5237 | EOF | |
98e5953c | 5238 | if { (eval echo configure:5239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
5239 | rm -rf conftest* |
5240 | gas_cv_decl_needed_malloc=no | |
5241 | else | |
5242 | echo "configure: failed program was:" >&5 | |
5243 | cat conftest.$ac_ext >&5 | |
5244 | rm -rf conftest* | |
5245 | gas_cv_decl_needed_malloc=yes | |
5246 | fi | |
5247 | rm -f conftest* | |
5248 | fi | |
5249 | echo "$ac_t""$gas_cv_decl_needed_malloc" 1>&6 | |
5250 | if test $gas_cv_decl_needed_malloc = yes; then | |
5251 | cat >> confdefs.h <<\EOF | |
5252 | #define NEED_DECLARATION_MALLOC 1 | |
5253 | EOF | |
5254 | ||
5255 | fi | |
5256 | ||
5257 | ||
5258 | echo $ac_n "checking whether declaration is required for free""... $ac_c" 1>&6 | |
98e5953c | 5259 | echo "configure:5260: checking whether declaration is required for free" >&5 |
a2d91340 | 5260 | if eval "test \"`echo '$''{'gas_cv_decl_needed_free'+set}'`\" = set"; then |
252b5132 RH |
5261 | echo $ac_n "(cached) $ac_c" 1>&6 |
5262 | else | |
5263 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 5264 | #line 5265 "configure" |
252b5132 RH |
5265 | #include "confdefs.h" |
5266 | $gas_test_headers | |
5267 | int main() { | |
5268 | ||
5269 | typedef void (*f)(); | |
5270 | f x; | |
5271 | x = (f) free; | |
5272 | ||
5273 | ; return 0; } | |
5274 | EOF | |
98e5953c | 5275 | if { (eval echo configure:5276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
5276 | rm -rf conftest* |
5277 | gas_cv_decl_needed_free=no | |
5278 | else | |
5279 | echo "configure: failed program was:" >&5 | |
5280 | cat conftest.$ac_ext >&5 | |
5281 | rm -rf conftest* | |
5282 | gas_cv_decl_needed_free=yes | |
5283 | fi | |
5284 | rm -f conftest* | |
5285 | fi | |
5286 | echo "$ac_t""$gas_cv_decl_needed_free" 1>&6 | |
5287 | if test $gas_cv_decl_needed_free = yes; then | |
5288 | cat >> confdefs.h <<\EOF | |
5289 | #define NEED_DECLARATION_FREE 1 | |
5290 | EOF | |
5291 | ||
5292 | fi | |
5293 | ||
5294 | ||
5295 | echo $ac_n "checking whether declaration is required for sbrk""... $ac_c" 1>&6 | |
98e5953c | 5296 | echo "configure:5297: checking whether declaration is required for sbrk" >&5 |
a2d91340 | 5297 | if eval "test \"`echo '$''{'gas_cv_decl_needed_sbrk'+set}'`\" = set"; then |
252b5132 RH |
5298 | echo $ac_n "(cached) $ac_c" 1>&6 |
5299 | else | |
5300 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 5301 | #line 5302 "configure" |
252b5132 RH |
5302 | #include "confdefs.h" |
5303 | $gas_test_headers | |
5304 | int main() { | |
5305 | ||
5306 | typedef char *(*f)(); | |
5307 | f x; | |
5308 | x = (f) sbrk; | |
5309 | ||
5310 | ; return 0; } | |
5311 | EOF | |
98e5953c | 5312 | if { (eval echo configure:5313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
5313 | rm -rf conftest* |
5314 | gas_cv_decl_needed_sbrk=no | |
5315 | else | |
5316 | echo "configure: failed program was:" >&5 | |
5317 | cat conftest.$ac_ext >&5 | |
5318 | rm -rf conftest* | |
5319 | gas_cv_decl_needed_sbrk=yes | |
5320 | fi | |
5321 | rm -f conftest* | |
5322 | fi | |
5323 | echo "$ac_t""$gas_cv_decl_needed_sbrk" 1>&6 | |
5324 | if test $gas_cv_decl_needed_sbrk = yes; then | |
5325 | cat >> confdefs.h <<\EOF | |
5326 | #define NEED_DECLARATION_SBRK 1 | |
5327 | EOF | |
5328 | ||
5329 | fi | |
5330 | ||
5331 | ||
5332 | echo $ac_n "checking whether declaration is required for environ""... $ac_c" 1>&6 | |
98e5953c | 5333 | echo "configure:5334: checking whether declaration is required for environ" >&5 |
a2d91340 | 5334 | if eval "test \"`echo '$''{'gas_cv_decl_needed_environ'+set}'`\" = set"; then |
252b5132 RH |
5335 | echo $ac_n "(cached) $ac_c" 1>&6 |
5336 | else | |
5337 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 5338 | #line 5339 "configure" |
252b5132 RH |
5339 | #include "confdefs.h" |
5340 | $gas_test_headers | |
5341 | int main() { | |
5342 | ||
5343 | typedef char **f; | |
5344 | f x; | |
5345 | x = (f) environ; | |
5346 | ||
5347 | ; return 0; } | |
5348 | EOF | |
98e5953c | 5349 | if { (eval echo configure:5350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
5350 | rm -rf conftest* |
5351 | gas_cv_decl_needed_environ=no | |
5352 | else | |
5353 | echo "configure: failed program was:" >&5 | |
5354 | cat conftest.$ac_ext >&5 | |
5355 | rm -rf conftest* | |
5356 | gas_cv_decl_needed_environ=yes | |
5357 | fi | |
5358 | rm -f conftest* | |
5359 | fi | |
5360 | echo "$ac_t""$gas_cv_decl_needed_environ" 1>&6 | |
5361 | if test $gas_cv_decl_needed_environ = yes; then | |
5362 | cat >> confdefs.h <<\EOF | |
5363 | #define NEED_DECLARATION_ENVIRON 1 | |
5364 | EOF | |
5365 | ||
5366 | fi | |
5367 | ||
5368 | ||
5369 | # Does errno.h declare errno, or do we have to add a separate declaration | |
5370 | # for it? | |
5371 | ||
5372 | echo $ac_n "checking whether declaration is required for errno""... $ac_c" 1>&6 | |
98e5953c | 5373 | echo "configure:5374: checking whether declaration is required for errno" >&5 |
a2d91340 | 5374 | if eval "test \"`echo '$''{'gas_cv_decl_needed_errno'+set}'`\" = set"; then |
252b5132 RH |
5375 | echo $ac_n "(cached) $ac_c" 1>&6 |
5376 | else | |
5377 | cat > conftest.$ac_ext <<EOF | |
98e5953c | 5378 | #line 5379 "configure" |
252b5132 RH |
5379 | #include "confdefs.h" |
5380 | ||
5381 | #ifdef HAVE_ERRNO_H | |
5382 | #include <errno.h> | |
5383 | #endif | |
5384 | ||
5385 | int main() { | |
5386 | ||
5387 | typedef int f; | |
5388 | f x; | |
5389 | x = (f) errno; | |
5390 | ||
5391 | ; return 0; } | |
5392 | EOF | |
98e5953c | 5393 | if { (eval echo configure:5394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then |
252b5132 RH |
5394 | rm -rf conftest* |
5395 | gas_cv_decl_needed_errno=no | |
5396 | else | |
5397 | echo "configure: failed program was:" >&5 | |
5398 | cat conftest.$ac_ext >&5 | |
5399 | rm -rf conftest* | |
5400 | gas_cv_decl_needed_errno=yes | |
5401 | fi | |
5402 | rm -f conftest* | |
5403 | fi | |
5404 | echo "$ac_t""$gas_cv_decl_needed_errno" 1>&6 | |
5405 | if test $gas_cv_decl_needed_errno = yes; then | |
5406 | cat >> confdefs.h <<\EOF | |
5407 | #define NEED_DECLARATION_ERRNO 1 | |
5408 | EOF | |
5409 | ||
5410 | fi | |
5411 | ||
5412 | ||
5413 | ||
5414 | ||
5415 | trap '' 1 2 15 | |
5416 | cat > confcache <<\EOF | |
5417 | # This file is a shell script that caches the results of configure | |
5418 | # tests run on this system so they can be shared between configure | |
5419 | # scripts and configure runs. It is not useful on other systems. | |
5420 | # If it contains results you don't want to keep, you may remove or edit it. | |
5421 | # | |
5422 | # By default, configure uses ./config.cache as the cache file, | |
5423 | # creating it if it does not exist already. You can give configure | |
5424 | # the --cache-file=FILE option to use a different cache file; that is | |
5425 | # what configure does when it calls configure scripts in | |
5426 | # subdirectories, so they share the cache. | |
5427 | # Giving --cache-file=/dev/null disables caching, for debugging configure. | |
5428 | # config.status only pays attention to the cache file if you give it the | |
5429 | # --recheck option to rerun configure. | |
5430 | # | |
5431 | EOF | |
5432 | # The following way of writing the cache mishandles newlines in values, | |
5433 | # but we know of no workaround that is simple, portable, and efficient. | |
5434 | # So, don't put newlines in cache variables' values. | |
5435 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
5436 | # and sets the high bit in the cache file unless we assign to the vars. | |
5437 | (set) 2>&1 | | |
5438 | case `(ac_space=' '; set | grep ac_space) 2>&1` in | |
5439 | *ac_space=\ *) | |
5440 | # `set' does not quote correctly, so add quotes (double-quote substitution | |
5441 | # turns \\\\ into \\, and sed turns \\ into \). | |
5442 | sed -n \ | |
5443 | -e "s/'/'\\\\''/g" \ | |
5444 | -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" | |
5445 | ;; | |
5446 | *) | |
5447 | # `set' quotes correctly as required by POSIX, so do not add quotes. | |
5448 | sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' | |
5449 | ;; | |
5450 | esac >> confcache | |
5451 | if cmp -s $cache_file confcache; then | |
5452 | : | |
5453 | else | |
5454 | if test -w $cache_file; then | |
5455 | echo "updating cache $cache_file" | |
5456 | cat confcache > $cache_file | |
5457 | else | |
5458 | echo "not updating unwritable cache $cache_file" | |
5459 | fi | |
5460 | fi | |
5461 | rm -f confcache | |
5462 | ||
5463 | trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 | |
5464 | ||
5465 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
5466 | # Let make expand exec_prefix. | |
5467 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
5468 | ||
5469 | # Any assignment to VPATH causes Sun make to only execute | |
5470 | # the first set of double-colon rules, so remove it if not needed. | |
5471 | # If there is a colon in the path, we need to keep it. | |
5472 | if test "x$srcdir" = x.; then | |
5473 | ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' | |
5474 | fi | |
5475 | ||
5476 | trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 | |
5477 | ||
5478 | DEFS=-DHAVE_CONFIG_H | |
5479 | ||
5480 | # Without the "./", some shells look in PATH for config.status. | |
5481 | : ${CONFIG_STATUS=./config.status} | |
5482 | ||
5483 | echo creating $CONFIG_STATUS | |
5484 | rm -f $CONFIG_STATUS | |
5485 | cat > $CONFIG_STATUS <<EOF | |
5486 | #! /bin/sh | |
5487 | # Generated automatically by configure. | |
5488 | # Run this file to recreate the current configuration. | |
5489 | # This directory was configured as follows, | |
5490 | # on host `(hostname || uname -n) 2>/dev/null | sed 1q`: | |
5491 | # | |
5492 | # $0 $ac_configure_args | |
5493 | # | |
5494 | # Compiler output produced by configure, useful for debugging | |
5495 | # configure, is in ./config.log if it exists. | |
5496 | ||
5497 | ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" | |
5498 | for ac_option | |
5499 | do | |
5500 | case "\$ac_option" in | |
5501 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
5502 | echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" | |
5503 | exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; | |
5504 | -version | --version | --versio | --versi | --vers | --ver | --ve | --v) | |
a2d91340 | 5505 | echo "$CONFIG_STATUS generated by autoconf version 2.13" |
252b5132 RH |
5506 | exit 0 ;; |
5507 | -help | --help | --hel | --he | --h) | |
5508 | echo "\$ac_cs_usage"; exit 0 ;; | |
5509 | *) echo "\$ac_cs_usage"; exit 1 ;; | |
5510 | esac | |
5511 | done | |
5512 | ||
5513 | ac_given_srcdir=$srcdir | |
5514 | ac_given_INSTALL="$INSTALL" | |
5515 | ||
76a27922 | 5516 | trap 'rm -fr `echo "Makefile doc/Makefile ${GDBINIT}:gdbinit.in po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 |
252b5132 RH |
5517 | EOF |
5518 | cat >> $CONFIG_STATUS <<EOF | |
5519 | ||
5520 | # Protect against being on the right side of a sed subst in config.status. | |
5521 | sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; | |
5522 | s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF | |
5523 | $ac_vpsub | |
5524 | $extrasub | |
5525 | s%@SHELL@%$SHELL%g | |
5526 | s%@CFLAGS@%$CFLAGS%g | |
5527 | s%@CPPFLAGS@%$CPPFLAGS%g | |
5528 | s%@CXXFLAGS@%$CXXFLAGS%g | |
5529 | s%@FFLAGS@%$FFLAGS%g | |
5530 | s%@DEFS@%$DEFS%g | |
5531 | s%@LDFLAGS@%$LDFLAGS%g | |
5532 | s%@LIBS@%$LIBS%g | |
5533 | s%@exec_prefix@%$exec_prefix%g | |
5534 | s%@prefix@%$prefix%g | |
5535 | s%@program_transform_name@%$program_transform_name%g | |
5536 | s%@bindir@%$bindir%g | |
5537 | s%@sbindir@%$sbindir%g | |
5538 | s%@libexecdir@%$libexecdir%g | |
5539 | s%@datadir@%$datadir%g | |
5540 | s%@sysconfdir@%$sysconfdir%g | |
5541 | s%@sharedstatedir@%$sharedstatedir%g | |
5542 | s%@localstatedir@%$localstatedir%g | |
5543 | s%@libdir@%$libdir%g | |
5544 | s%@includedir@%$includedir%g | |
5545 | s%@oldincludedir@%$oldincludedir%g | |
5546 | s%@infodir@%$infodir%g | |
5547 | s%@mandir@%$mandir%g | |
5548 | s%@host@%$host%g | |
5549 | s%@host_alias@%$host_alias%g | |
5550 | s%@host_cpu@%$host_cpu%g | |
5551 | s%@host_vendor@%$host_vendor%g | |
5552 | s%@host_os@%$host_os%g | |
5553 | s%@target@%$target%g | |
5554 | s%@target_alias@%$target_alias%g | |
5555 | s%@target_cpu@%$target_cpu%g | |
5556 | s%@target_vendor@%$target_vendor%g | |
5557 | s%@target_os@%$target_os%g | |
5558 | s%@build@%$build%g | |
5559 | s%@build_alias@%$build_alias%g | |
5560 | s%@build_cpu@%$build_cpu%g | |
5561 | s%@build_vendor@%$build_vendor%g | |
5562 | s%@build_os@%$build_os%g | |
5563 | s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g | |
5564 | s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g | |
5565 | s%@INSTALL_DATA@%$INSTALL_DATA%g | |
5566 | s%@PACKAGE@%$PACKAGE%g | |
5567 | s%@VERSION@%$VERSION%g | |
5568 | s%@ACLOCAL@%$ACLOCAL%g | |
5569 | s%@AUTOCONF@%$AUTOCONF%g | |
5570 | s%@AUTOMAKE@%$AUTOMAKE%g | |
5571 | s%@AUTOHEADER@%$AUTOHEADER%g | |
5572 | s%@MAKEINFO@%$MAKEINFO%g | |
5573 | s%@SET_MAKE@%$SET_MAKE%g | |
5574 | s%@RANLIB@%$RANLIB%g | |
5575 | s%@CC@%$CC%g | |
252b5132 | 5576 | s%@LN_S@%$LN_S%g |
bedf545c | 5577 | s%@LIBTOOL@%$LIBTOOL%g |
a2d91340 | 5578 | s%@WARN_CFLAGS@%$WARN_CFLAGS%g |
76a27922 | 5579 | s%@GDBINIT@%$GDBINIT%g |
252b5132 RH |
5580 | s%@cgen_cpu_prefix@%$cgen_cpu_prefix%g |
5581 | s%@extra_objects@%$extra_objects%g | |
5582 | s%@target_cpu_type@%$target_cpu_type%g | |
5583 | s%@obj_format@%$obj_format%g | |
5584 | s%@te_file@%$te_file%g | |
5585 | s%@install_tooldir@%$install_tooldir%g | |
5586 | s%@atof@%$atof%g | |
5587 | s%@BFDLIB@%$BFDLIB%g | |
5588 | s%@OPCODES_LIB@%$OPCODES_LIB%g | |
5589 | s%@ALL_OBJ_DEPS@%$ALL_OBJ_DEPS%g | |
5590 | s%@YACC@%$YACC%g | |
5591 | s%@LEX@%$LEX%g | |
5592 | s%@LEXLIB@%$LEXLIB%g | |
5593 | s%@CPP@%$CPP%g | |
5594 | s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g | |
5595 | s%@ALLOCA@%$ALLOCA%g | |
5596 | s%@USE_NLS@%$USE_NLS%g | |
5597 | s%@MSGFMT@%$MSGFMT%g | |
5598 | s%@GMSGFMT@%$GMSGFMT%g | |
5599 | s%@XGETTEXT@%$XGETTEXT%g | |
5600 | s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g | |
5601 | s%@CATALOGS@%$CATALOGS%g | |
5602 | s%@CATOBJEXT@%$CATOBJEXT%g | |
5603 | s%@DATADIRNAME@%$DATADIRNAME%g | |
5604 | s%@GMOFILES@%$GMOFILES%g | |
5605 | s%@INSTOBJEXT@%$INSTOBJEXT%g | |
5606 | s%@INTLDEPS@%$INTLDEPS%g | |
5607 | s%@INTLLIBS@%$INTLLIBS%g | |
5608 | s%@INTLOBJS@%$INTLOBJS%g | |
5609 | s%@POFILES@%$POFILES%g | |
5610 | s%@POSUB@%$POSUB%g | |
5611 | s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g | |
5612 | s%@GT_NO@%$GT_NO%g | |
5613 | s%@GT_YES@%$GT_YES%g | |
5614 | s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g | |
5615 | s%@l@%$l%g | |
5616 | s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g | |
5617 | s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g | |
5618 | s%@MAINT@%$MAINT%g | |
5619 | s%@EXEEXT@%$EXEEXT%g | |
5620 | ||
5621 | CEOF | |
5622 | EOF | |
5623 | ||
5624 | cat >> $CONFIG_STATUS <<\EOF | |
5625 | ||
5626 | # Split the substitutions into bite-sized pieces for seds with | |
5627 | # small command number limits, like on Digital OSF/1 and HP-UX. | |
5628 | ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. | |
5629 | ac_file=1 # Number of current file. | |
5630 | ac_beg=1 # First line for current file. | |
5631 | ac_end=$ac_max_sed_cmds # Line after last line for current file. | |
5632 | ac_more_lines=: | |
5633 | ac_sed_cmds="" | |
5634 | while $ac_more_lines; do | |
5635 | if test $ac_beg -gt 1; then | |
5636 | sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file | |
5637 | else | |
5638 | sed "${ac_end}q" conftest.subs > conftest.s$ac_file | |
5639 | fi | |
5640 | if test ! -s conftest.s$ac_file; then | |
5641 | ac_more_lines=false | |
5642 | rm -f conftest.s$ac_file | |
5643 | else | |
5644 | if test -z "$ac_sed_cmds"; then | |
5645 | ac_sed_cmds="sed -f conftest.s$ac_file" | |
5646 | else | |
5647 | ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" | |
5648 | fi | |
5649 | ac_file=`expr $ac_file + 1` | |
5650 | ac_beg=$ac_end | |
5651 | ac_end=`expr $ac_end + $ac_max_sed_cmds` | |
5652 | fi | |
5653 | done | |
5654 | if test -z "$ac_sed_cmds"; then | |
5655 | ac_sed_cmds=cat | |
5656 | fi | |
5657 | EOF | |
5658 | ||
5659 | cat >> $CONFIG_STATUS <<EOF | |
5660 | ||
76a27922 | 5661 | CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile ${GDBINIT}:gdbinit.in po/Makefile.in:po/Make-in"} |
252b5132 RH |
5662 | EOF |
5663 | cat >> $CONFIG_STATUS <<\EOF | |
5664 | for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then | |
5665 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
5666 | case "$ac_file" in | |
5667 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
5668 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
5669 | *) ac_file_in="${ac_file}.in" ;; | |
5670 | esac | |
5671 | ||
5672 | # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. | |
5673 | ||
5674 | # Remove last slash and all that follows it. Not all systems have dirname. | |
5675 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
5676 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
5677 | # The file is in a subdirectory. | |
5678 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
5679 | ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" | |
5680 | # A "../" for each directory in $ac_dir_suffix. | |
5681 | ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` | |
5682 | else | |
5683 | ac_dir_suffix= ac_dots= | |
5684 | fi | |
5685 | ||
5686 | case "$ac_given_srcdir" in | |
5687 | .) srcdir=. | |
5688 | if test -z "$ac_dots"; then top_srcdir=. | |
5689 | else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; | |
5690 | /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; | |
5691 | *) # Relative path. | |
5692 | srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" | |
5693 | top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
5694 | esac | |
5695 | ||
5696 | case "$ac_given_INSTALL" in | |
5697 | [/$]*) INSTALL="$ac_given_INSTALL" ;; | |
5698 | *) INSTALL="$ac_dots$ac_given_INSTALL" ;; | |
5699 | esac | |
5700 | ||
5701 | echo creating "$ac_file" | |
5702 | rm -f "$ac_file" | |
5703 | configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." | |
5704 | case "$ac_file" in | |
5705 | *Makefile*) ac_comsub="1i\\ | |
5706 | # $configure_input" ;; | |
5707 | *) ac_comsub= ;; | |
5708 | esac | |
5709 | ||
5710 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
5711 | sed -e "$ac_comsub | |
5712 | s%@configure_input@%$configure_input%g | |
5713 | s%@srcdir@%$srcdir%g | |
5714 | s%@top_srcdir@%$top_srcdir%g | |
5715 | s%@INSTALL@%$INSTALL%g | |
5716 | " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file | |
5717 | fi; done | |
5718 | rm -f conftest.s* | |
5719 | ||
5720 | # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where | |
5721 | # NAME is the cpp macro being defined and VALUE is the value it is being given. | |
5722 | # | |
5723 | # ac_d sets the value in "#define NAME VALUE" lines. | |
5724 | ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' | |
5725 | ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' | |
5726 | ac_dC='\3' | |
5727 | ac_dD='%g' | |
5728 | # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". | |
5729 | ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
5730 | ac_uB='\([ ]\)%\1#\2define\3' | |
5731 | ac_uC=' ' | |
5732 | ac_uD='\4%g' | |
5733 | # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". | |
5734 | ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' | |
5735 | ac_eB='$%\1#\2define\3' | |
5736 | ac_eC=' ' | |
5737 | ac_eD='%g' | |
5738 | ||
5739 | if test "${CONFIG_HEADERS+set}" != set; then | |
5740 | EOF | |
5741 | cat >> $CONFIG_STATUS <<EOF | |
5742 | CONFIG_HEADERS="config.h:config.in" | |
5743 | EOF | |
5744 | cat >> $CONFIG_STATUS <<\EOF | |
5745 | fi | |
5746 | for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then | |
5747 | # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". | |
5748 | case "$ac_file" in | |
5749 | *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` | |
5750 | ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
5751 | *) ac_file_in="${ac_file}.in" ;; | |
5752 | esac | |
5753 | ||
5754 | echo creating $ac_file | |
5755 | ||
5756 | rm -f conftest.frag conftest.in conftest.out | |
5757 | ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` | |
5758 | cat $ac_file_inputs > conftest.in | |
5759 | ||
5760 | EOF | |
5761 | ||
5762 | # Transform confdefs.h into a sed script conftest.vals that substitutes | |
5763 | # the proper values into config.h.in to produce config.h. And first: | |
5764 | # Protect against being on the right side of a sed subst in config.status. | |
5765 | # Protect against being in an unquoted here document in config.status. | |
5766 | rm -f conftest.vals | |
5767 | cat > conftest.hdr <<\EOF | |
5768 | s/[\\&%]/\\&/g | |
5769 | s%[\\$`]%\\&%g | |
5770 | s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp | |
5771 | s%ac_d%ac_u%gp | |
5772 | s%ac_u%ac_e%gp | |
5773 | EOF | |
5774 | sed -n -f conftest.hdr confdefs.h > conftest.vals | |
5775 | rm -f conftest.hdr | |
5776 | ||
5777 | # This sed command replaces #undef with comments. This is necessary, for | |
5778 | # example, in the case of _POSIX_SOURCE, which is predefined and required | |
5779 | # on some systems where configure will not decide to define it. | |
5780 | cat >> conftest.vals <<\EOF | |
5781 | s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% | |
5782 | EOF | |
5783 | ||
5784 | # Break up conftest.vals because some shells have a limit on | |
5785 | # the size of here documents, and old seds have small limits too. | |
5786 | ||
5787 | rm -f conftest.tail | |
5788 | while : | |
5789 | do | |
5790 | ac_lines=`grep -c . conftest.vals` | |
5791 | # grep -c gives empty output for an empty file on some AIX systems. | |
5792 | if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi | |
5793 | # Write a limited-size here document to conftest.frag. | |
5794 | echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS | |
5795 | sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS | |
5796 | echo 'CEOF | |
5797 | sed -f conftest.frag conftest.in > conftest.out | |
5798 | rm -f conftest.in | |
5799 | mv conftest.out conftest.in | |
5800 | ' >> $CONFIG_STATUS | |
5801 | sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail | |
5802 | rm -f conftest.vals | |
5803 | mv conftest.tail conftest.vals | |
5804 | done | |
5805 | rm -f conftest.vals | |
5806 | ||
5807 | cat >> $CONFIG_STATUS <<\EOF | |
5808 | rm -f conftest.frag conftest.h | |
5809 | echo "/* $ac_file. Generated automatically by configure. */" > conftest.h | |
5810 | cat conftest.in >> conftest.h | |
5811 | rm -f conftest.in | |
5812 | if cmp -s $ac_file conftest.h 2>/dev/null; then | |
5813 | echo "$ac_file is unchanged" | |
5814 | rm -f conftest.h | |
5815 | else | |
5816 | # Remove last slash and all that follows it. Not all systems have dirname. | |
5817 | ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` | |
5818 | if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then | |
5819 | # The file is in a subdirectory. | |
5820 | test ! -d "$ac_dir" && mkdir "$ac_dir" | |
5821 | fi | |
5822 | rm -f $ac_file | |
5823 | mv conftest.h $ac_file | |
5824 | fi | |
5825 | fi; done | |
5826 | ||
5827 | EOF | |
5828 | cat >> $CONFIG_STATUS <<EOF | |
5829 | ||
5830 | target_cpu_type=${target_cpu_type} | |
5831 | cgen_cpu_prefix=${cgen_cpu_prefix} | |
5832 | obj_format=${obj_format} | |
5833 | te_file=${te_file} | |
5834 | EOF | |
5835 | cat >> $CONFIG_STATUS <<\EOF | |
5836 | test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h | |
5837 | rm -f targ-cpu.c targ-cpu.h obj-format.h obj-format.c targ-env.h atof-targ.c itbl-cpu.h | |
5838 | echo '#include "tc-'"${target_cpu_type}"'.h"' > targ-cpu.h | |
5839 | echo '#include "obj-'"${obj_format}"'.h"' > obj-format.h | |
5840 | echo '#include "te-'"${te_file}"'.h"' > targ-env.h | |
5841 | echo '#include "itbl-'"${target_cpu_type}"'.h"' > itbl-cpu.h | |
5842 | if test "x$cgen_cpu_prefix" != x ; then | |
5843 | echo '#include "opcodes/'"${cgen_cpu_prefix}"'-desc.h"' > cgen-desc.h | |
5844 | fi | |
5845 | ||
5846 | sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile | |
5847 | exit 0 | |
5848 | EOF | |
5849 | chmod +x $CONFIG_STATUS | |
5850 | rm -fr confdefs* $ac_clean_files | |
a2d91340 | 5851 | test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 |
252b5132 | 5852 |