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