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