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