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