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