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