Initial revision
[binutils.git] / binutils / configure
blob594e154f303bebf82861ea7bd98a166b790daa89
1 #! /bin/sh
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.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15 --enable-shared[=PKGS] build shared libraries [default=yes]"
16 ac_help="$ac_help
17 --enable-static[=PKGS] build static libraries [default=yes]"
18 ac_help="$ac_help
19 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
20 ac_help="$ac_help
21 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
22 ac_help="$ac_help
23 --disable-libtool-lock force libtool not to do file locking"
24 ac_help="$ac_help
25 --enable-targets alternative target configurations"
26 ac_help="$ac_help
27 --enable-commonbfdlib build shared BFD/opcodes/libiberty library"
28 ac_help="$ac_help
29 --disable-nls do not use Native Language Support"
30 ac_help="$ac_help
31 --with-included-gettext use the GNU gettext library included here"
32 ac_help="$ac_help
33 --enable-maintainer-mode enable make rules and dependencies not useful
34 (and sometimes confusing) to the casual installer"
36 # Initialize some variables set by options.
37 # The variables have the same names as the options, with
38 # dashes changed to underlines.
39 build=NONE
40 cache_file=./config.cache
41 exec_prefix=NONE
42 host=NONE
43 no_create=
44 nonopt=NONE
45 no_recursion=
46 prefix=NONE
47 program_prefix=NONE
48 program_suffix=NONE
49 program_transform_name=s,x,x,
50 silent=
51 site=
52 srcdir=
53 target=NONE
54 verbose=
55 x_includes=NONE
56 x_libraries=NONE
57 bindir='${exec_prefix}/bin'
58 sbindir='${exec_prefix}/sbin'
59 libexecdir='${exec_prefix}/libexec'
60 datadir='${prefix}/share'
61 sysconfdir='${prefix}/etc'
62 sharedstatedir='${prefix}/com'
63 localstatedir='${prefix}/var'
64 libdir='${exec_prefix}/lib'
65 includedir='${prefix}/include'
66 oldincludedir='/usr/include'
67 infodir='${prefix}/info'
68 mandir='${prefix}/man'
70 # Initialize some other variables.
71 subdirs=
72 MFLAGS= MAKEFLAGS=
73 SHELL=${CONFIG_SHELL-/bin/sh}
74 # Maximum number of lines to put in a shell here document.
75 ac_max_here_lines=12
77 ac_prev=
78 for ac_option
81 # If the previous option needs an argument, assign it.
82 if test -n "$ac_prev"; then
83 eval "$ac_prev=\$ac_option"
84 ac_prev=
85 continue
88 case "$ac_option" in
89 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
90 *) ac_optarg= ;;
91 esac
93 # Accept the important Cygnus configure options, so we can diagnose typos.
95 case "$ac_option" in
97 -bindir | --bindir | --bindi | --bind | --bin | --bi)
98 ac_prev=bindir ;;
99 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
100 bindir="$ac_optarg" ;;
102 -build | --build | --buil | --bui | --bu)
103 ac_prev=build ;;
104 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
105 build="$ac_optarg" ;;
107 -cache-file | --cache-file | --cache-fil | --cache-fi \
108 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
109 ac_prev=cache_file ;;
110 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
111 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
112 cache_file="$ac_optarg" ;;
114 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
115 ac_prev=datadir ;;
116 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
117 | --da=*)
118 datadir="$ac_optarg" ;;
120 -disable-* | --disable-*)
121 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
122 # Reject names that are not valid shell variable names.
123 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
124 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
126 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
127 eval "enable_${ac_feature}=no" ;;
129 -enable-* | --enable-*)
130 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
131 # Reject names that are not valid shell variable names.
132 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
133 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
135 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
136 case "$ac_option" in
137 *=*) ;;
138 *) ac_optarg=yes ;;
139 esac
140 eval "enable_${ac_feature}='$ac_optarg'" ;;
142 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
143 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
144 | --exec | --exe | --ex)
145 ac_prev=exec_prefix ;;
146 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
147 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
148 | --exec=* | --exe=* | --ex=*)
149 exec_prefix="$ac_optarg" ;;
151 -gas | --gas | --ga | --g)
152 # Obsolete; use --with-gas.
153 with_gas=yes ;;
155 -help | --help | --hel | --he)
156 # Omit some internal or obsolete options to make the list less imposing.
157 # This message is too long to be a string in the A/UX 3.1 sh.
158 cat << EOF
159 Usage: configure [options] [host]
160 Options: [defaults in brackets after descriptions]
161 Configuration:
162 --cache-file=FILE cache test results in FILE
163 --help print this message
164 --no-create do not create output files
165 --quiet, --silent do not print \`checking...' messages
166 --version print the version of autoconf that created configure
167 Directory and file names:
168 --prefix=PREFIX install architecture-independent files in PREFIX
169 [$ac_default_prefix]
170 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
171 [same as prefix]
172 --bindir=DIR user executables in DIR [EPREFIX/bin]
173 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
174 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
175 --datadir=DIR read-only architecture-independent data in DIR
176 [PREFIX/share]
177 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
178 --sharedstatedir=DIR modifiable architecture-independent data in DIR
179 [PREFIX/com]
180 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
181 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
182 --includedir=DIR C header files in DIR [PREFIX/include]
183 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
184 --infodir=DIR info documentation in DIR [PREFIX/info]
185 --mandir=DIR man documentation in DIR [PREFIX/man]
186 --srcdir=DIR find the sources in DIR [configure dir or ..]
187 --program-prefix=PREFIX prepend PREFIX to installed program names
188 --program-suffix=SUFFIX append SUFFIX to installed program names
189 --program-transform-name=PROGRAM
190 run sed PROGRAM on installed program names
192 cat << EOF
193 Host type:
194 --build=BUILD configure for building on BUILD [BUILD=HOST]
195 --host=HOST configure for HOST [guessed]
196 --target=TARGET configure for TARGET [TARGET=HOST]
197 Features and packages:
198 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
199 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
200 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
201 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
202 --x-includes=DIR X include files are in DIR
203 --x-libraries=DIR X library files are in DIR
205 if test -n "$ac_help"; then
206 echo "--enable and --with options recognized:$ac_help"
208 exit 0 ;;
210 -host | --host | --hos | --ho)
211 ac_prev=host ;;
212 -host=* | --host=* | --hos=* | --ho=*)
213 host="$ac_optarg" ;;
215 -includedir | --includedir | --includedi | --included | --include \
216 | --includ | --inclu | --incl | --inc)
217 ac_prev=includedir ;;
218 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
219 | --includ=* | --inclu=* | --incl=* | --inc=*)
220 includedir="$ac_optarg" ;;
222 -infodir | --infodir | --infodi | --infod | --info | --inf)
223 ac_prev=infodir ;;
224 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
225 infodir="$ac_optarg" ;;
227 -libdir | --libdir | --libdi | --libd)
228 ac_prev=libdir ;;
229 -libdir=* | --libdir=* | --libdi=* | --libd=*)
230 libdir="$ac_optarg" ;;
232 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
233 | --libexe | --libex | --libe)
234 ac_prev=libexecdir ;;
235 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
236 | --libexe=* | --libex=* | --libe=*)
237 libexecdir="$ac_optarg" ;;
239 -localstatedir | --localstatedir | --localstatedi | --localstated \
240 | --localstate | --localstat | --localsta | --localst \
241 | --locals | --local | --loca | --loc | --lo)
242 ac_prev=localstatedir ;;
243 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
244 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
245 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
246 localstatedir="$ac_optarg" ;;
248 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
249 ac_prev=mandir ;;
250 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
251 mandir="$ac_optarg" ;;
253 -nfp | --nfp | --nf)
254 # Obsolete; use --without-fp.
255 with_fp=no ;;
257 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
258 | --no-cr | --no-c)
259 no_create=yes ;;
261 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
262 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
263 no_recursion=yes ;;
265 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
266 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
267 | --oldin | --oldi | --old | --ol | --o)
268 ac_prev=oldincludedir ;;
269 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
270 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
271 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
272 oldincludedir="$ac_optarg" ;;
274 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
275 ac_prev=prefix ;;
276 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
277 prefix="$ac_optarg" ;;
279 -program-prefix | --program-prefix | --program-prefi | --program-pref \
280 | --program-pre | --program-pr | --program-p)
281 ac_prev=program_prefix ;;
282 -program-prefix=* | --program-prefix=* | --program-prefi=* \
283 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
284 program_prefix="$ac_optarg" ;;
286 -program-suffix | --program-suffix | --program-suffi | --program-suff \
287 | --program-suf | --program-su | --program-s)
288 ac_prev=program_suffix ;;
289 -program-suffix=* | --program-suffix=* | --program-suffi=* \
290 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
291 program_suffix="$ac_optarg" ;;
293 -program-transform-name | --program-transform-name \
294 | --program-transform-nam | --program-transform-na \
295 | --program-transform-n | --program-transform- \
296 | --program-transform | --program-transfor \
297 | --program-transfo | --program-transf \
298 | --program-trans | --program-tran \
299 | --progr-tra | --program-tr | --program-t)
300 ac_prev=program_transform_name ;;
301 -program-transform-name=* | --program-transform-name=* \
302 | --program-transform-nam=* | --program-transform-na=* \
303 | --program-transform-n=* | --program-transform-=* \
304 | --program-transform=* | --program-transfor=* \
305 | --program-transfo=* | --program-transf=* \
306 | --program-trans=* | --program-tran=* \
307 | --progr-tra=* | --program-tr=* | --program-t=*)
308 program_transform_name="$ac_optarg" ;;
310 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
311 | -silent | --silent | --silen | --sile | --sil)
312 silent=yes ;;
314 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
315 ac_prev=sbindir ;;
316 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
317 | --sbi=* | --sb=*)
318 sbindir="$ac_optarg" ;;
320 -sharedstatedir | --sharedstatedir | --sharedstatedi \
321 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
322 | --sharedst | --shareds | --shared | --share | --shar \
323 | --sha | --sh)
324 ac_prev=sharedstatedir ;;
325 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
326 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
327 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
328 | --sha=* | --sh=*)
329 sharedstatedir="$ac_optarg" ;;
331 -site | --site | --sit)
332 ac_prev=site ;;
333 -site=* | --site=* | --sit=*)
334 site="$ac_optarg" ;;
336 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
337 ac_prev=srcdir ;;
338 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
339 srcdir="$ac_optarg" ;;
341 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
342 | --syscon | --sysco | --sysc | --sys | --sy)
343 ac_prev=sysconfdir ;;
344 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
345 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
346 sysconfdir="$ac_optarg" ;;
348 -target | --target | --targe | --targ | --tar | --ta | --t)
349 ac_prev=target ;;
350 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
351 target="$ac_optarg" ;;
353 -v | -verbose | --verbose | --verbos | --verbo | --verb)
354 verbose=yes ;;
356 -version | --version | --versio | --versi | --vers)
357 echo "configure generated by autoconf version 2.13"
358 exit 0 ;;
360 -with-* | --with-*)
361 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
362 # Reject names that are not valid shell variable names.
363 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
364 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
366 ac_package=`echo $ac_package| sed 's/-/_/g'`
367 case "$ac_option" in
368 *=*) ;;
369 *) ac_optarg=yes ;;
370 esac
371 eval "with_${ac_package}='$ac_optarg'" ;;
373 -without-* | --without-*)
374 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
375 # Reject names that are not valid shell variable names.
376 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
377 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
379 ac_package=`echo $ac_package| sed 's/-/_/g'`
380 eval "with_${ac_package}=no" ;;
382 --x)
383 # Obsolete; use --with-x.
384 with_x=yes ;;
386 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
387 | --x-incl | --x-inc | --x-in | --x-i)
388 ac_prev=x_includes ;;
389 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
390 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
391 x_includes="$ac_optarg" ;;
393 -x-libraries | --x-libraries | --x-librarie | --x-librari \
394 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
395 ac_prev=x_libraries ;;
396 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
397 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
398 x_libraries="$ac_optarg" ;;
400 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
404 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
405 echo "configure: warning: $ac_option: invalid host type" 1>&2
407 if test "x$nonopt" != xNONE; then
408 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
410 nonopt="$ac_option"
413 esac
414 done
416 if test -n "$ac_prev"; then
417 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
420 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
422 # File descriptor usage:
423 # 0 standard input
424 # 1 file creation
425 # 2 errors and warnings
426 # 3 some systems may open it to /dev/tty
427 # 4 used on the Kubota Titan
428 # 6 checking for... messages and results
429 # 5 compiler messages saved in config.log
430 if test "$silent" = yes; then
431 exec 6>/dev/null
432 else
433 exec 6>&1
435 exec 5>./config.log
437 echo "\
438 This file contains any messages produced by compilers while
439 running configure, to aid debugging if configure makes a mistake.
440 " 1>&5
442 # Strip out --no-create and --no-recursion so they do not pile up.
443 # Also quote any args containing shell metacharacters.
444 ac_configure_args=
445 for ac_arg
447 case "$ac_arg" in
448 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
449 | --no-cr | --no-c) ;;
450 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
451 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
452 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
453 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
454 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
455 esac
456 done
458 # NLS nuisances.
459 # Only set these to C if already set. These must not be set unconditionally
460 # because not all systems understand e.g. LANG=C (notably SCO).
461 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
462 # Non-C LC_CTYPE values break the ctype check.
463 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
464 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
465 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
466 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
468 # confdefs.h avoids OS command line length limits that DEFS can exceed.
469 rm -rf conftest* confdefs.h
470 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
471 echo > confdefs.h
473 # A filename unique to this package, relative to the directory that
474 # configure is in, which we can look for to find out if srcdir is correct.
475 ac_unique_file=ar.c
477 # Find the source files, if location was not specified.
478 if test -z "$srcdir"; then
479 ac_srcdir_defaulted=yes
480 # Try the directory containing this script, then its parent.
481 ac_prog=$0
482 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
483 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
484 srcdir=$ac_confdir
485 if test ! -r $srcdir/$ac_unique_file; then
486 srcdir=..
488 else
489 ac_srcdir_defaulted=no
491 if test ! -r $srcdir/$ac_unique_file; then
492 if test "$ac_srcdir_defaulted" = yes; then
493 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
494 else
495 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
498 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
500 # Prefer explicitly selected file to automatically selected ones.
501 if test -z "$CONFIG_SITE"; then
502 if test "x$prefix" != xNONE; then
503 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
504 else
505 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
508 for ac_site_file in $CONFIG_SITE; do
509 if test -r "$ac_site_file"; then
510 echo "loading site script $ac_site_file"
511 . "$ac_site_file"
513 done
515 if test -r "$cache_file"; then
516 echo "loading cache $cache_file"
517 . $cache_file
518 else
519 echo "creating cache $cache_file"
520 > $cache_file
523 ac_ext=c
524 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
525 ac_cpp='$CPP $CPPFLAGS'
526 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
527 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
528 cross_compiling=$ac_cv_prog_cc_cross
530 ac_exeext=
531 ac_objext=o
532 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
533 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
534 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
535 ac_n= ac_c='
536 ' ac_t=' '
537 else
538 ac_n=-n ac_c= ac_t=
540 else
541 ac_n= ac_c='\c' ac_t=
546 ac_aux_dir=
547 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
548 if test -f $ac_dir/install-sh; then
549 ac_aux_dir=$ac_dir
550 ac_install_sh="$ac_aux_dir/install-sh -c"
551 break
552 elif test -f $ac_dir/install.sh; then
553 ac_aux_dir=$ac_dir
554 ac_install_sh="$ac_aux_dir/install.sh -c"
555 break
557 done
558 if test -z "$ac_aux_dir"; then
559 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
561 ac_config_guess=$ac_aux_dir/config.guess
562 ac_config_sub=$ac_aux_dir/config.sub
563 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
566 # Do some error checking and defaulting for the host and target type.
567 # The inputs are:
568 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
570 # The rules are:
571 # 1. You are not allowed to specify --host, --target, and nonopt at the
572 # same time.
573 # 2. Host defaults to nonopt.
574 # 3. If nonopt is not specified, then host defaults to the current host,
575 # as determined by config.guess.
576 # 4. Target and build default to nonopt.
577 # 5. If nonopt is not specified, then target and build default to host.
579 # The aliases save the names the user supplied, while $host etc.
580 # will get canonicalized.
581 case $host---$target---$nonopt in
582 NONE---*---* | *---NONE---* | *---*---NONE) ;;
583 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
584 esac
587 # Make sure we can run config.sub.
588 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
589 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
592 echo $ac_n "checking host system type""... $ac_c" 1>&6
593 echo "configure:594: checking host system type" >&5
595 host_alias=$host
596 case "$host_alias" in
597 NONE)
598 case $nonopt in
599 NONE)
600 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
601 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
602 fi ;;
603 *) host_alias=$nonopt ;;
604 esac ;;
605 esac
607 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
608 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
609 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
610 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
611 echo "$ac_t""$host" 1>&6
613 echo $ac_n "checking target system type""... $ac_c" 1>&6
614 echo "configure:615: checking target system type" >&5
616 target_alias=$target
617 case "$target_alias" in
618 NONE)
619 case $nonopt in
620 NONE) target_alias=$host_alias ;;
621 *) target_alias=$nonopt ;;
622 esac ;;
623 esac
625 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
626 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
627 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
628 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
629 echo "$ac_t""$target" 1>&6
631 echo $ac_n "checking build system type""... $ac_c" 1>&6
632 echo "configure:633: checking build system type" >&5
634 build_alias=$build
635 case "$build_alias" in
636 NONE)
637 case $nonopt in
638 NONE) build_alias=$host_alias ;;
639 *) build_alias=$nonopt ;;
640 esac ;;
641 esac
643 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
644 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
645 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
646 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
647 echo "$ac_t""$build" 1>&6
649 test "$host_alias" != "$target_alias" &&
650 test "$program_prefix$program_suffix$program_transform_name" = \
651 NONENONEs,x,x, &&
652 program_prefix=${target_alias}-
655 # Find a good install program. We prefer a C program (faster),
656 # so one script is as good as another. But avoid the broken or
657 # incompatible versions:
658 # SysV /etc/install, /usr/sbin/install
659 # SunOS /usr/etc/install
660 # IRIX /sbin/install
661 # AIX /bin/install
662 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
663 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
664 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
665 # ./install, which can be erroneously created by make from ./install.sh.
666 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
667 echo "configure:668: checking for a BSD compatible install" >&5
668 if test -z "$INSTALL"; then
669 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
670 echo $ac_n "(cached) $ac_c" 1>&6
671 else
672 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
673 for ac_dir in $PATH; do
674 # Account for people who put trailing slashes in PATH elements.
675 case "$ac_dir/" in
676 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
678 # OSF1 and SCO ODT 3.0 have their own names for install.
679 # Don't use installbsd from OSF since it installs stuff as root
680 # by default.
681 for ac_prog in ginstall scoinst install; do
682 if test -f $ac_dir/$ac_prog; then
683 if test $ac_prog = install &&
684 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
685 # AIX install. It has an incompatible calling convention.
687 else
688 ac_cv_path_install="$ac_dir/$ac_prog -c"
689 break 2
692 done
694 esac
695 done
696 IFS="$ac_save_IFS"
699 if test "${ac_cv_path_install+set}" = set; then
700 INSTALL="$ac_cv_path_install"
701 else
702 # As a last resort, use the slow shell script. We don't cache a
703 # path for INSTALL within a source directory, because that will
704 # break other packages using the cache if that directory is
705 # removed, or if the path is relative.
706 INSTALL="$ac_install_sh"
709 echo "$ac_t""$INSTALL" 1>&6
711 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
712 # It thinks the first close brace ends the variable substitution.
713 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
715 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
717 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
719 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
720 echo "configure:721: checking whether build environment is sane" >&5
721 # Just in case
722 sleep 1
723 echo timestamp > conftestfile
724 # Do `set' in a subshell so we don't clobber the current shell's
725 # arguments. Must try -L first in case configure is actually a
726 # symlink; some systems play weird games with the mod time of symlinks
727 # (eg FreeBSD returns the mod time of the symlink's containing
728 # directory).
729 if (
730 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
731 if test "$*" = "X"; then
732 # -L didn't work.
733 set X `ls -t $srcdir/configure conftestfile`
735 if test "$*" != "X $srcdir/configure conftestfile" \
736 && test "$*" != "X conftestfile $srcdir/configure"; then
738 # If neither matched, then we have a broken ls. This can happen
739 # if, for instance, CONFIG_SHELL is bash and it inherits a
740 # broken ls alias from the environment. This has actually
741 # happened. Such a system could not be considered "sane".
742 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
743 alias in your environment" 1>&2; exit 1; }
746 test "$2" = conftestfile
748 then
749 # Ok.
751 else
752 { echo "configure: error: newly created file is older than distributed files!
753 Check your system clock" 1>&2; exit 1; }
755 rm -f conftest*
756 echo "$ac_t""yes" 1>&6
757 if test "$program_transform_name" = s,x,x,; then
758 program_transform_name=
759 else
760 # Double any \ or $. echo might interpret backslashes.
761 cat <<\EOF_SED > conftestsed
762 s,\\,\\\\,g; s,\$,$$,g
763 EOF_SED
764 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
765 rm -f conftestsed
767 test "$program_prefix" != NONE &&
768 program_transform_name="s,^,${program_prefix},; $program_transform_name"
769 # Use a double $ so make ignores it.
770 test "$program_suffix" != NONE &&
771 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
773 # sed with no file args requires a program.
774 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
776 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
777 echo "configure:778: checking whether ${MAKE-make} sets \${MAKE}" >&5
778 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
779 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
780 echo $ac_n "(cached) $ac_c" 1>&6
781 else
782 cat > conftestmake <<\EOF
783 all:
784 @echo 'ac_maketemp="${MAKE}"'
786 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
787 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
788 if test -n "$ac_maketemp"; then
789 eval ac_cv_prog_make_${ac_make}_set=yes
790 else
791 eval ac_cv_prog_make_${ac_make}_set=no
793 rm -f conftestmake
795 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
796 echo "$ac_t""yes" 1>&6
797 SET_MAKE=
798 else
799 echo "$ac_t""no" 1>&6
800 SET_MAKE="MAKE=${MAKE-make}"
804 PACKAGE=binutils
806 VERSION=2.9.4
808 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
809 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
811 cat >> confdefs.h <<EOF
812 #define PACKAGE "$PACKAGE"
815 cat >> confdefs.h <<EOF
816 #define VERSION "$VERSION"
821 missing_dir=`cd $ac_aux_dir && pwd`
822 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
823 echo "configure:824: checking for working aclocal" >&5
824 # Run test in a subshell; some versions of sh will print an error if
825 # an executable is not found, even if stderr is redirected.
826 # Redirect stdin to placate older versions of autoconf. Sigh.
827 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
828 ACLOCAL=aclocal
829 echo "$ac_t""found" 1>&6
830 else
831 ACLOCAL="$missing_dir/missing aclocal"
832 echo "$ac_t""missing" 1>&6
835 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
836 echo "configure:837: checking for working autoconf" >&5
837 # Run test in a subshell; some versions of sh will print an error if
838 # an executable is not found, even if stderr is redirected.
839 # Redirect stdin to placate older versions of autoconf. Sigh.
840 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
841 AUTOCONF=autoconf
842 echo "$ac_t""found" 1>&6
843 else
844 AUTOCONF="$missing_dir/missing autoconf"
845 echo "$ac_t""missing" 1>&6
848 echo $ac_n "checking for working automake""... $ac_c" 1>&6
849 echo "configure:850: checking for working automake" >&5
850 # Run test in a subshell; some versions of sh will print an error if
851 # an executable is not found, even if stderr is redirected.
852 # Redirect stdin to placate older versions of autoconf. Sigh.
853 if (automake --version) < /dev/null > /dev/null 2>&1; then
854 AUTOMAKE=automake
855 echo "$ac_t""found" 1>&6
856 else
857 AUTOMAKE="$missing_dir/missing automake"
858 echo "$ac_t""missing" 1>&6
861 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
862 echo "configure:863: checking for working autoheader" >&5
863 # Run test in a subshell; some versions of sh will print an error if
864 # an executable is not found, even if stderr is redirected.
865 # Redirect stdin to placate older versions of autoconf. Sigh.
866 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
867 AUTOHEADER=autoheader
868 echo "$ac_t""found" 1>&6
869 else
870 AUTOHEADER="$missing_dir/missing autoheader"
871 echo "$ac_t""missing" 1>&6
874 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
875 echo "configure:876: checking for working makeinfo" >&5
876 # Run test in a subshell; some versions of sh will print an error if
877 # an executable is not found, even if stderr is redirected.
878 # Redirect stdin to placate older versions of autoconf. Sigh.
879 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
880 MAKEINFO=makeinfo
881 echo "$ac_t""found" 1>&6
882 else
883 MAKEINFO="$missing_dir/missing makeinfo"
884 echo "$ac_t""missing" 1>&6
889 # Check whether --enable-shared or --disable-shared was given.
890 if test "${enable_shared+set}" = set; then
891 enableval="$enable_shared"
892 p=${PACKAGE-default}
893 case "$enableval" in
894 yes) enable_shared=yes ;;
895 no) enable_shared=no ;;
897 enable_shared=no
898 # Look at the argument we got. We use all the common list separators.
899 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
900 for pkg in $enableval; do
901 if test "X$pkg" = "X$p"; then
902 enable_shared=yes
904 done
905 IFS="$ac_save_ifs"
907 esac
908 else
909 enable_shared=yes
912 # Check whether --enable-static or --disable-static was given.
913 if test "${enable_static+set}" = set; then
914 enableval="$enable_static"
915 p=${PACKAGE-default}
916 case "$enableval" in
917 yes) enable_static=yes ;;
918 no) enable_static=no ;;
920 enable_static=no
921 # Look at the argument we got. We use all the common list separators.
922 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
923 for pkg in $enableval; do
924 if test "X$pkg" = "X$p"; then
925 enable_static=yes
927 done
928 IFS="$ac_save_ifs"
930 esac
931 else
932 enable_static=yes
935 # Check whether --enable-fast-install or --disable-fast-install was given.
936 if test "${enable_fast_install+set}" = set; then
937 enableval="$enable_fast_install"
938 p=${PACKAGE-default}
939 case "$enableval" in
940 yes) enable_fast_install=yes ;;
941 no) enable_fast_install=no ;;
943 enable_fast_install=no
944 # Look at the argument we got. We use all the common list separators.
945 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
946 for pkg in $enableval; do
947 if test "X$pkg" = "X$p"; then
948 enable_fast_install=yes
950 done
951 IFS="$ac_save_ifs"
953 esac
954 else
955 enable_fast_install=yes
958 # Extract the first word of "ranlib", so it can be a program name with args.
959 set dummy ranlib; ac_word=$2
960 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
961 echo "configure:962: checking for $ac_word" >&5
962 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
963 echo $ac_n "(cached) $ac_c" 1>&6
964 else
965 if test -n "$RANLIB"; then
966 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
967 else
968 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
969 ac_dummy="$PATH"
970 for ac_dir in $ac_dummy; do
971 test -z "$ac_dir" && ac_dir=.
972 if test -f $ac_dir/$ac_word; then
973 ac_cv_prog_RANLIB="ranlib"
974 break
976 done
977 IFS="$ac_save_ifs"
978 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
981 RANLIB="$ac_cv_prog_RANLIB"
982 if test -n "$RANLIB"; then
983 echo "$ac_t""$RANLIB" 1>&6
984 else
985 echo "$ac_t""no" 1>&6
988 # Extract the first word of "gcc", so it can be a program name with args.
989 set dummy gcc; ac_word=$2
990 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
991 echo "configure:992: checking for $ac_word" >&5
992 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
993 echo $ac_n "(cached) $ac_c" 1>&6
994 else
995 if test -n "$CC"; then
996 ac_cv_prog_CC="$CC" # Let the user override the test.
997 else
998 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
999 ac_dummy="$PATH"
1000 for ac_dir in $ac_dummy; do
1001 test -z "$ac_dir" && ac_dir=.
1002 if test -f $ac_dir/$ac_word; then
1003 ac_cv_prog_CC="gcc"
1004 break
1006 done
1007 IFS="$ac_save_ifs"
1010 CC="$ac_cv_prog_CC"
1011 if test -n "$CC"; then
1012 echo "$ac_t""$CC" 1>&6
1013 else
1014 echo "$ac_t""no" 1>&6
1017 if test -z "$CC"; then
1018 # Extract the first word of "cc", so it can be a program name with args.
1019 set dummy cc; ac_word=$2
1020 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1021 echo "configure:1022: checking for $ac_word" >&5
1022 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1023 echo $ac_n "(cached) $ac_c" 1>&6
1024 else
1025 if test -n "$CC"; then
1026 ac_cv_prog_CC="$CC" # Let the user override the test.
1027 else
1028 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1029 ac_prog_rejected=no
1030 ac_dummy="$PATH"
1031 for ac_dir in $ac_dummy; do
1032 test -z "$ac_dir" && ac_dir=.
1033 if test -f $ac_dir/$ac_word; then
1034 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1035 ac_prog_rejected=yes
1036 continue
1038 ac_cv_prog_CC="cc"
1039 break
1041 done
1042 IFS="$ac_save_ifs"
1043 if test $ac_prog_rejected = yes; then
1044 # We found a bogon in the path, so make sure we never use it.
1045 set dummy $ac_cv_prog_CC
1046 shift
1047 if test $# -gt 0; then
1048 # We chose a different compiler from the bogus one.
1049 # However, it has the same basename, so the bogon will be chosen
1050 # first if we set CC to just the basename; use the full file name.
1051 shift
1052 set dummy "$ac_dir/$ac_word" "$@"
1053 shift
1054 ac_cv_prog_CC="$@"
1059 CC="$ac_cv_prog_CC"
1060 if test -n "$CC"; then
1061 echo "$ac_t""$CC" 1>&6
1062 else
1063 echo "$ac_t""no" 1>&6
1066 if test -z "$CC"; then
1067 case "`uname -s`" in
1068 *win32* | *WIN32*)
1069 # Extract the first word of "cl", so it can be a program name with args.
1070 set dummy cl; ac_word=$2
1071 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1072 echo "configure:1073: checking for $ac_word" >&5
1073 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1074 echo $ac_n "(cached) $ac_c" 1>&6
1075 else
1076 if test -n "$CC"; then
1077 ac_cv_prog_CC="$CC" # Let the user override the test.
1078 else
1079 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1080 ac_dummy="$PATH"
1081 for ac_dir in $ac_dummy; do
1082 test -z "$ac_dir" && ac_dir=.
1083 if test -f $ac_dir/$ac_word; then
1084 ac_cv_prog_CC="cl"
1085 break
1087 done
1088 IFS="$ac_save_ifs"
1091 CC="$ac_cv_prog_CC"
1092 if test -n "$CC"; then
1093 echo "$ac_t""$CC" 1>&6
1094 else
1095 echo "$ac_t""no" 1>&6
1098 esac
1100 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1103 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1104 echo "configure:1105: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1106 ac_ext=c
1107 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1108 ac_cpp='$CPP $CPPFLAGS'
1109 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1110 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1111 cross_compiling=$ac_cv_prog_cc_cross
1113 cat > conftest.$ac_ext << EOF
1115 #line 1116 "configure"
1116 #include "confdefs.h"
1118 main(){return(0);}
1120 if { (eval echo configure:1121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1121 ac_cv_prog_cc_works=yes
1122 # If we can't run a trivial program, we are probably using a cross compiler.
1123 if (./conftest; exit) 2>/dev/null; then
1124 ac_cv_prog_cc_cross=no
1125 else
1126 ac_cv_prog_cc_cross=yes
1128 else
1129 echo "configure: failed program was:" >&5
1130 cat conftest.$ac_ext >&5
1131 ac_cv_prog_cc_works=no
1133 rm -fr conftest*
1134 ac_ext=c
1135 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1136 ac_cpp='$CPP $CPPFLAGS'
1137 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1138 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1139 cross_compiling=$ac_cv_prog_cc_cross
1141 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1142 if test $ac_cv_prog_cc_works = no; then
1143 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1145 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1146 echo "configure:1147: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1147 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1148 cross_compiling=$ac_cv_prog_cc_cross
1150 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1151 echo "configure:1152: checking whether we are using GNU C" >&5
1152 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1153 echo $ac_n "(cached) $ac_c" 1>&6
1154 else
1155 cat > conftest.c <<EOF
1156 #ifdef __GNUC__
1157 yes;
1158 #endif
1160 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1161 ac_cv_prog_gcc=yes
1162 else
1163 ac_cv_prog_gcc=no
1167 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1169 if test $ac_cv_prog_gcc = yes; then
1170 GCC=yes
1171 else
1172 GCC=
1175 ac_test_CFLAGS="${CFLAGS+set}"
1176 ac_save_CFLAGS="$CFLAGS"
1177 CFLAGS=
1178 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1179 echo "configure:1180: checking whether ${CC-cc} accepts -g" >&5
1180 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1181 echo $ac_n "(cached) $ac_c" 1>&6
1182 else
1183 echo 'void f(){}' > conftest.c
1184 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1185 ac_cv_prog_cc_g=yes
1186 else
1187 ac_cv_prog_cc_g=no
1189 rm -f conftest*
1193 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1194 if test "$ac_test_CFLAGS" = set; then
1195 CFLAGS="$ac_save_CFLAGS"
1196 elif test $ac_cv_prog_cc_g = yes; then
1197 if test "$GCC" = yes; then
1198 CFLAGS="-g -O2"
1199 else
1200 CFLAGS="-g"
1202 else
1203 if test "$GCC" = yes; then
1204 CFLAGS="-O2"
1205 else
1206 CFLAGS=
1210 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1211 if test "${with_gnu_ld+set}" = set; then
1212 withval="$with_gnu_ld"
1213 test "$withval" = no || with_gnu_ld=yes
1214 else
1215 with_gnu_ld=no
1218 ac_prog=ld
1219 if test "$ac_cv_prog_gcc" = yes; then
1220 # Check if gcc -print-prog-name=ld gives a path.
1221 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1222 echo "configure:1223: checking for ld used by GCC" >&5
1223 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1224 case "$ac_prog" in
1225 # Accept absolute paths.
1226 /* | [A-Za-z]:[\\/]*)
1227 re_direlt='/[^/][^/]*/\.\./'
1228 # Canonicalize the path of ld
1229 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1230 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1231 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1232 done
1233 test -z "$LD" && LD="$ac_prog"
1236 # If it fails, then pretend we aren't using GCC.
1237 ac_prog=ld
1240 # If it is relative, then search for the first ld in PATH.
1241 with_gnu_ld=unknown
1243 esac
1244 elif test "$with_gnu_ld" = yes; then
1245 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1246 echo "configure:1247: checking for GNU ld" >&5
1247 else
1248 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1249 echo "configure:1250: checking for non-GNU ld" >&5
1251 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1252 echo $ac_n "(cached) $ac_c" 1>&6
1253 else
1254 if test -z "$LD"; then
1255 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1256 for ac_dir in $PATH; do
1257 test -z "$ac_dir" && ac_dir=.
1258 if test -f "$ac_dir/$ac_prog"; then
1259 ac_cv_path_LD="$ac_dir/$ac_prog"
1260 # Check to see if the program is GNU ld. I'd rather use --version,
1261 # but apparently some GNU ld's only accept -v.
1262 # Break only if it was the GNU/non-GNU ld that we prefer.
1263 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1264 test "$with_gnu_ld" != no && break
1265 else
1266 test "$with_gnu_ld" != yes && break
1269 done
1270 IFS="$ac_save_ifs"
1271 else
1272 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1276 LD="$ac_cv_path_LD"
1277 if test -n "$LD"; then
1278 echo "$ac_t""$LD" 1>&6
1279 else
1280 echo "$ac_t""no" 1>&6
1282 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1284 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1285 echo "configure:1286: checking if the linker ($LD) is GNU ld" >&5
1286 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1287 echo $ac_n "(cached) $ac_c" 1>&6
1288 else
1289 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1290 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1291 ac_cv_prog_gnu_ld=yes
1292 else
1293 ac_cv_prog_gnu_ld=no
1297 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1300 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1301 echo "configure:1302: checking for BSD-compatible nm" >&5
1302 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1303 echo $ac_n "(cached) $ac_c" 1>&6
1304 else
1305 if test -n "$NM"; then
1306 # Let the user override the test.
1307 ac_cv_path_NM="$NM"
1308 else
1309 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1310 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1311 test -z "$ac_dir" && ac_dir=.
1312 if test -f $ac_dir/nm; then
1313 # Check to see if the nm accepts a BSD-compat flag.
1314 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1315 # nm: unknown option "B" ignored
1316 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1317 ac_cv_path_NM="$ac_dir/nm -B"
1318 break
1319 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1320 ac_cv_path_NM="$ac_dir/nm -p"
1321 break
1322 else
1323 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1324 continue # so that we can try to find one that supports BSD flags
1327 done
1328 IFS="$ac_save_ifs"
1329 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1333 NM="$ac_cv_path_NM"
1334 echo "$ac_t""$NM" 1>&6
1337 # Check for command to grab the raw symbol name followed by C symbol from nm.
1338 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
1339 echo "configure:1340: checking command to parse $NM output" >&5
1340 if eval "test \"`echo '$''{'ac_cv_sys_global_symbol_pipe'+set}'`\" = set"; then
1341 echo $ac_n "(cached) $ac_c" 1>&6
1342 else
1343 # These are sane defaults that work on at least a few old systems.
1344 # {They come from Ultrix. What could be older than Ultrix?!! ;)}
1346 # Character class describing NM global symbol codes.
1347 ac_symcode='[BCDEGRST]'
1349 # Regexp to match symbols that can be accessed directly from C.
1350 ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1352 # Transform the above into a raw symbol and a C symbol.
1353 ac_symxfrm='\1 \2\3 \3'
1355 # Transform an extracted symbol line into a proper C declaration
1356 ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1358 # Define system-specific variables.
1359 case "$host_os" in
1360 aix*)
1361 ac_symcode='[BCDT]'
1363 cygwin* | mingw*)
1364 ac_symcode='[ABCDGISTW]'
1366 hpux*)
1367 ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
1369 irix*)
1370 ac_symcode='[BCDEGRST]'
1372 solaris*)
1373 ac_symcode='[BDT]'
1375 esac
1377 # If we're using GNU nm, then use its standard symbol codes.
1378 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1379 ac_symcode='[ABCDGISTW]'
1382 # Try without a prefix undercore, then with it.
1383 for ac_symprfx in "" "_"; do
1385 ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.* \($ac_symcode\) *\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'"
1387 # Check to see that the pipe works correctly.
1388 ac_pipe_works=no
1389 rm -f conftest.$ac_ext
1390 cat > conftest.$ac_ext <<EOF
1391 #ifdef __cplusplus
1392 extern "C" {
1393 #endif
1394 char nm_test_var;
1395 void nm_test_func(){}
1396 #ifdef __cplusplus
1398 #endif
1399 int main(){nm_test_var='a';nm_test_func;return 0;}
1402 if { (eval echo configure:1403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1403 # Now try to grab the symbols.
1404 ac_nlist=conftest.nm
1406 if { (eval echo configure:1407: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then
1408 # Try sorting and uniquifying the output.
1409 if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
1410 mv -f "$ac_nlist"T "$ac_nlist"
1411 else
1412 rm -f "$ac_nlist"T
1415 # Make sure that we snagged all the symbols we need.
1416 if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
1417 if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
1418 cat <<EOF > conftest.c
1419 #ifdef __cplusplus
1420 extern "C" {
1421 #endif
1424 # Now generate the symbol file.
1425 eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c'
1427 cat <<EOF >> conftest.c
1428 #if defined (__STDC__) && __STDC__
1429 # define lt_ptr_t void *
1430 #else
1431 # define lt_ptr_t char *
1432 # define const
1433 #endif
1435 /* The mapping between symbol names and symbols. */
1436 const struct {
1437 const char *name;
1438 lt_ptr_t address;
1440 lt_preloaded_symbols[] =
1443 sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
1444 cat <<\EOF >> conftest.c
1445 {0, (lt_ptr_t) 0}
1448 #ifdef __cplusplus
1450 #endif
1452 # Now try linking the two files.
1453 mv conftest.$ac_objext conftestm.$ac_objext
1454 ac_save_LIBS="$LIBS"
1455 ac_save_CFLAGS="$CFLAGS"
1456 LIBS="conftestm.$ac_objext"
1457 CFLAGS="$CFLAGS$no_builtin_flag"
1458 if { (eval echo configure:1459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1459 ac_pipe_works=yes
1460 else
1461 echo "configure: failed program was:" >&5
1462 cat conftest.c >&5
1464 LIBS="$ac_save_LIBS"
1465 CFLAGS="$ac_save_CFLAGS"
1466 else
1467 echo "cannot find nm_test_func in $ac_nlist" >&5
1469 else
1470 echo "cannot find nm_test_var in $ac_nlist" >&5
1472 else
1473 echo "cannot run $ac_cv_sys_global_symbol_pipe" >&5
1475 else
1476 echo "$progname: failed program was:" >&5
1477 cat conftest.c >&5
1479 rm -rf conftest*
1481 # Do not use the global_symbol_pipe unless it works.
1482 if test "$ac_pipe_works" = yes; then
1483 if test x"$ac_symprfx" = x"_"; then
1484 ac_cv_sys_symbol_underscore=yes
1485 else
1486 ac_cv_sys_symbol_underscore=no
1488 break
1489 else
1490 ac_cv_sys_global_symbol_pipe=
1492 done
1497 ac_result=yes
1498 if test -z "$ac_cv_sys_global_symbol_pipe"; then
1499 ac_result=no
1501 echo "$ac_t""$ac_result" 1>&6
1503 echo $ac_n "checking for _ prefix in compiled symbols""... $ac_c" 1>&6
1504 echo "configure:1505: checking for _ prefix in compiled symbols" >&5
1505 if eval "test \"`echo '$''{'ac_cv_sys_symbol_underscore'+set}'`\" = set"; then
1506 echo $ac_n "(cached) $ac_c" 1>&6
1507 else
1508 ac_cv_sys_symbol_underscore=no
1509 cat > conftest.$ac_ext <<EOF
1510 void nm_test_func(){}
1511 int main(){nm_test_func;return 0;}
1513 if { (eval echo configure:1514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1514 # Now try to grab the symbols.
1515 ac_nlist=conftest.nm
1516 if { (eval echo configure:1517: \"$NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist\") 1>&5; (eval $NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5; } && test -s "$ac_nlist"; then
1517 # See whether the symbols have a leading underscore.
1518 if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
1519 ac_cv_sys_symbol_underscore=yes
1520 else
1521 if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
1523 else
1524 echo "configure: cannot find nm_test_func in $ac_nlist" >&5
1527 else
1528 echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&5
1530 else
1531 echo "configure: failed program was:" >&5
1532 cat conftest.c >&5
1534 rm -rf conftest*
1538 echo "$ac_t""$ac_cv_sys_symbol_underscore" 1>&6
1539 USE_SYMBOL_UNDERSCORE=${ac_cv_sys_symbol_underscore=no}
1541 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1542 echo "configure:1543: checking whether ln -s works" >&5
1543 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1544 echo $ac_n "(cached) $ac_c" 1>&6
1545 else
1546 rm -f conftestdata
1547 if ln -s X conftestdata 2>/dev/null
1548 then
1549 rm -f conftestdata
1550 ac_cv_prog_LN_S="ln -s"
1551 else
1552 ac_cv_prog_LN_S=ln
1555 LN_S="$ac_cv_prog_LN_S"
1556 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1557 echo "$ac_t""yes" 1>&6
1558 else
1559 echo "$ac_t""no" 1>&6
1562 if test $host != $build; then
1563 ac_tool_prefix=${host_alias}-
1564 else
1565 ac_tool_prefix=
1569 # Check for any special flags to pass to ltconfig.
1570 libtool_flags="--cache-file=$cache_file"
1571 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1572 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1573 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1574 test "$lt_dlopen" = yes && libtool_flags="$libtool_flags --enable-dlopen"
1575 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
1576 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1577 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1579 # Some flags need to be propagated to the compiler or linker for good
1580 # libtool support.
1581 case "$host" in
1582 *-*-irix6*)
1583 # Find out which ABI we are using.
1584 echo '#line 1585 "configure"' > conftest.$ac_ext
1585 if { (eval echo configure:1586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1586 case "`/usr/bin/file conftest.o`" in
1587 *32-bit*)
1588 LD="${LD-ld} -32"
1590 *N32*)
1591 LD="${LD-ld} -n32"
1593 *64-bit*)
1594 LD="${LD-ld} -64"
1596 esac
1598 rm -rf conftest*
1601 *-*-sco3.2v5*)
1602 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1603 SAVE_CFLAGS="$CFLAGS"
1604 CFLAGS="$CFLAGS -belf"
1605 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1606 echo "configure:1607: checking whether the C compiler needs -belf" >&5
1607 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1608 echo $ac_n "(cached) $ac_c" 1>&6
1609 else
1610 cat > conftest.$ac_ext <<EOF
1611 #line 1612 "configure"
1612 #include "confdefs.h"
1614 int main() {
1616 ; return 0; }
1618 if { (eval echo configure:1619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1619 rm -rf conftest*
1620 lt_cv_cc_needs_belf=yes
1621 else
1622 echo "configure: failed program was:" >&5
1623 cat conftest.$ac_ext >&5
1624 rm -rf conftest*
1625 lt_cv_cc_needs_belf=no
1627 rm -f conftest*
1630 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1631 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1632 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1633 CFLAGS="$SAVE_CFLAGS"
1637 *-*-cygwin*)
1638 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
1639 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
1640 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1641 echo "configure:1642: checking for $ac_word" >&5
1642 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
1643 echo $ac_n "(cached) $ac_c" 1>&6
1644 else
1645 if test -n "$DLLTOOL"; then
1646 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1647 else
1648 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1649 ac_dummy="$PATH"
1650 for ac_dir in $ac_dummy; do
1651 test -z "$ac_dir" && ac_dir=.
1652 if test -f $ac_dir/$ac_word; then
1653 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
1654 break
1656 done
1657 IFS="$ac_save_ifs"
1660 DLLTOOL="$ac_cv_prog_DLLTOOL"
1661 if test -n "$DLLTOOL"; then
1662 echo "$ac_t""$DLLTOOL" 1>&6
1663 else
1664 echo "$ac_t""no" 1>&6
1668 if test -z "$ac_cv_prog_DLLTOOL"; then
1669 if test -n "$ac_tool_prefix"; then
1670 # Extract the first word of "dlltool", so it can be a program name with args.
1671 set dummy dlltool; ac_word=$2
1672 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1673 echo "configure:1674: checking for $ac_word" >&5
1674 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
1675 echo $ac_n "(cached) $ac_c" 1>&6
1676 else
1677 if test -n "$DLLTOOL"; then
1678 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1679 else
1680 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1681 ac_dummy="$PATH"
1682 for ac_dir in $ac_dummy; do
1683 test -z "$ac_dir" && ac_dir=.
1684 if test -f $ac_dir/$ac_word; then
1685 ac_cv_prog_DLLTOOL="dlltool"
1686 break
1688 done
1689 IFS="$ac_save_ifs"
1690 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
1693 DLLTOOL="$ac_cv_prog_DLLTOOL"
1694 if test -n "$DLLTOOL"; then
1695 echo "$ac_t""$DLLTOOL" 1>&6
1696 else
1697 echo "$ac_t""no" 1>&6
1700 else
1701 DLLTOOL="false"
1705 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1706 set dummy ${ac_tool_prefix}as; ac_word=$2
1707 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1708 echo "configure:1709: checking for $ac_word" >&5
1709 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1710 echo $ac_n "(cached) $ac_c" 1>&6
1711 else
1712 if test -n "$AS"; then
1713 ac_cv_prog_AS="$AS" # Let the user override the test.
1714 else
1715 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1716 ac_dummy="$PATH"
1717 for ac_dir in $ac_dummy; do
1718 test -z "$ac_dir" && ac_dir=.
1719 if test -f $ac_dir/$ac_word; then
1720 ac_cv_prog_AS="${ac_tool_prefix}as"
1721 break
1723 done
1724 IFS="$ac_save_ifs"
1727 AS="$ac_cv_prog_AS"
1728 if test -n "$AS"; then
1729 echo "$ac_t""$AS" 1>&6
1730 else
1731 echo "$ac_t""no" 1>&6
1735 if test -z "$ac_cv_prog_AS"; then
1736 if test -n "$ac_tool_prefix"; then
1737 # Extract the first word of "as", so it can be a program name with args.
1738 set dummy as; ac_word=$2
1739 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1740 echo "configure:1741: checking for $ac_word" >&5
1741 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1742 echo $ac_n "(cached) $ac_c" 1>&6
1743 else
1744 if test -n "$AS"; then
1745 ac_cv_prog_AS="$AS" # Let the user override the test.
1746 else
1747 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1748 ac_dummy="$PATH"
1749 for ac_dir in $ac_dummy; do
1750 test -z "$ac_dir" && ac_dir=.
1751 if test -f $ac_dir/$ac_word; then
1752 ac_cv_prog_AS="as"
1753 break
1755 done
1756 IFS="$ac_save_ifs"
1757 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
1760 AS="$ac_cv_prog_AS"
1761 if test -n "$AS"; then
1762 echo "$ac_t""$AS" 1>&6
1763 else
1764 echo "$ac_t""no" 1>&6
1767 else
1768 AS="false"
1775 esac
1777 # enable the --disable-libtool-lock switch
1779 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1780 if test "${enable_libtool_lock+set}" = set; then
1781 enableval="$enable_libtool_lock"
1782 need_locks=$enableval
1783 else
1784 need_locks=yes
1788 if test x"$need_locks" = xno; then
1789 libtool_flags="$libtool_flags --disable-lock"
1793 # Save cache, so that ltconfig can load it
1794 cat > confcache <<\EOF
1795 # This file is a shell script that caches the results of configure
1796 # tests run on this system so they can be shared between configure
1797 # scripts and configure runs. It is not useful on other systems.
1798 # If it contains results you don't want to keep, you may remove or edit it.
1800 # By default, configure uses ./config.cache as the cache file,
1801 # creating it if it does not exist already. You can give configure
1802 # the --cache-file=FILE option to use a different cache file; that is
1803 # what configure does when it calls configure scripts in
1804 # subdirectories, so they share the cache.
1805 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1806 # config.status only pays attention to the cache file if you give it the
1807 # --recheck option to rerun configure.
1810 # The following way of writing the cache mishandles newlines in values,
1811 # but we know of no workaround that is simple, portable, and efficient.
1812 # So, don't put newlines in cache variables' values.
1813 # Ultrix sh set writes to stderr and can't be redirected directly,
1814 # and sets the high bit in the cache file unless we assign to the vars.
1815 (set) 2>&1 |
1816 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1817 *ac_space=\ *)
1818 # `set' does not quote correctly, so add quotes (double-quote substitution
1819 # turns \\\\ into \\, and sed turns \\ into \).
1820 sed -n \
1821 -e "s/'/'\\\\''/g" \
1822 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1825 # `set' quotes correctly as required by POSIX, so do not add quotes.
1826 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1828 esac >> confcache
1829 if cmp -s $cache_file confcache; then
1831 else
1832 if test -w $cache_file; then
1833 echo "updating cache $cache_file"
1834 cat confcache > $cache_file
1835 else
1836 echo "not updating unwritable cache $cache_file"
1839 rm -f confcache
1842 # Actually configure libtool. ac_aux_dir is where install-sh is found.
1843 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1844 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
1845 DLLTOOL="$DLLTOOL" AS="$AS" \
1846 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1847 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1848 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1850 # Reload cache, that may have been modified by ltconfig
1851 if test -r "$cache_file"; then
1852 echo "loading cache $cache_file"
1853 . $cache_file
1854 else
1855 echo "creating cache $cache_file"
1856 > $cache_file
1860 # This can be used to rebuild libtool when needed
1861 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1863 # Always use our own libtool.
1864 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1866 # Redirect the config.log output again, so that the ltconfig log is not
1867 # clobbered by the next message.
1868 exec 5>>./config.log
1871 # Check whether --enable-targets or --disable-targets was given.
1872 if test "${enable_targets+set}" = set; then
1873 enableval="$enable_targets"
1874 case "${enableval}" in
1875 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
1877 no) enable_targets= ;;
1878 *) enable_targets=$enableval ;;
1879 esac
1881 # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
1882 if test "${enable_commonbfdlib+set}" = set; then
1883 enableval="$enable_commonbfdlib"
1884 case "${enableval}" in
1885 yes) commonbfdlib=true ;;
1886 no) commonbfdlib=false ;;
1887 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
1888 esac
1895 if test -z "$target" ; then
1896 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
1898 if test -z "$host" ; then
1899 { echo "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
1902 # Extract the first word of "gcc", so it can be a program name with args.
1903 set dummy gcc; ac_word=$2
1904 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1905 echo "configure:1906: checking for $ac_word" >&5
1906 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1907 echo $ac_n "(cached) $ac_c" 1>&6
1908 else
1909 if test -n "$CC"; then
1910 ac_cv_prog_CC="$CC" # Let the user override the test.
1911 else
1912 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1913 ac_dummy="$PATH"
1914 for ac_dir in $ac_dummy; do
1915 test -z "$ac_dir" && ac_dir=.
1916 if test -f $ac_dir/$ac_word; then
1917 ac_cv_prog_CC="gcc"
1918 break
1920 done
1921 IFS="$ac_save_ifs"
1924 CC="$ac_cv_prog_CC"
1925 if test -n "$CC"; then
1926 echo "$ac_t""$CC" 1>&6
1927 else
1928 echo "$ac_t""no" 1>&6
1931 if test -z "$CC"; then
1932 # Extract the first word of "cc", so it can be a program name with args.
1933 set dummy cc; ac_word=$2
1934 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1935 echo "configure:1936: checking for $ac_word" >&5
1936 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1937 echo $ac_n "(cached) $ac_c" 1>&6
1938 else
1939 if test -n "$CC"; then
1940 ac_cv_prog_CC="$CC" # Let the user override the test.
1941 else
1942 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1943 ac_prog_rejected=no
1944 ac_dummy="$PATH"
1945 for ac_dir in $ac_dummy; do
1946 test -z "$ac_dir" && ac_dir=.
1947 if test -f $ac_dir/$ac_word; then
1948 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1949 ac_prog_rejected=yes
1950 continue
1952 ac_cv_prog_CC="cc"
1953 break
1955 done
1956 IFS="$ac_save_ifs"
1957 if test $ac_prog_rejected = yes; then
1958 # We found a bogon in the path, so make sure we never use it.
1959 set dummy $ac_cv_prog_CC
1960 shift
1961 if test $# -gt 0; then
1962 # We chose a different compiler from the bogus one.
1963 # However, it has the same basename, so the bogon will be chosen
1964 # first if we set CC to just the basename; use the full file name.
1965 shift
1966 set dummy "$ac_dir/$ac_word" "$@"
1967 shift
1968 ac_cv_prog_CC="$@"
1973 CC="$ac_cv_prog_CC"
1974 if test -n "$CC"; then
1975 echo "$ac_t""$CC" 1>&6
1976 else
1977 echo "$ac_t""no" 1>&6
1980 if test -z "$CC"; then
1981 case "`uname -s`" in
1982 *win32* | *WIN32*)
1983 # Extract the first word of "cl", so it can be a program name with args.
1984 set dummy cl; ac_word=$2
1985 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1986 echo "configure:1987: checking for $ac_word" >&5
1987 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1988 echo $ac_n "(cached) $ac_c" 1>&6
1989 else
1990 if test -n "$CC"; then
1991 ac_cv_prog_CC="$CC" # Let the user override the test.
1992 else
1993 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1994 ac_dummy="$PATH"
1995 for ac_dir in $ac_dummy; do
1996 test -z "$ac_dir" && ac_dir=.
1997 if test -f $ac_dir/$ac_word; then
1998 ac_cv_prog_CC="cl"
1999 break
2001 done
2002 IFS="$ac_save_ifs"
2005 CC="$ac_cv_prog_CC"
2006 if test -n "$CC"; then
2007 echo "$ac_t""$CC" 1>&6
2008 else
2009 echo "$ac_t""no" 1>&6
2012 esac
2014 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2017 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2018 echo "configure:2019: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2020 ac_ext=c
2021 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2022 ac_cpp='$CPP $CPPFLAGS'
2023 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2024 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2025 cross_compiling=$ac_cv_prog_cc_cross
2027 cat > conftest.$ac_ext << EOF
2029 #line 2030 "configure"
2030 #include "confdefs.h"
2032 main(){return(0);}
2034 if { (eval echo configure:2035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2035 ac_cv_prog_cc_works=yes
2036 # If we can't run a trivial program, we are probably using a cross compiler.
2037 if (./conftest; exit) 2>/dev/null; then
2038 ac_cv_prog_cc_cross=no
2039 else
2040 ac_cv_prog_cc_cross=yes
2042 else
2043 echo "configure: failed program was:" >&5
2044 cat conftest.$ac_ext >&5
2045 ac_cv_prog_cc_works=no
2047 rm -fr conftest*
2048 ac_ext=c
2049 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2050 ac_cpp='$CPP $CPPFLAGS'
2051 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2052 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2053 cross_compiling=$ac_cv_prog_cc_cross
2055 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2056 if test $ac_cv_prog_cc_works = no; then
2057 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2059 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2060 echo "configure:2061: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2061 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2062 cross_compiling=$ac_cv_prog_cc_cross
2064 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2065 echo "configure:2066: checking whether we are using GNU C" >&5
2066 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2067 echo $ac_n "(cached) $ac_c" 1>&6
2068 else
2069 cat > conftest.c <<EOF
2070 #ifdef __GNUC__
2071 yes;
2072 #endif
2074 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2075 ac_cv_prog_gcc=yes
2076 else
2077 ac_cv_prog_gcc=no
2081 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2083 if test $ac_cv_prog_gcc = yes; then
2084 GCC=yes
2085 else
2086 GCC=
2089 ac_test_CFLAGS="${CFLAGS+set}"
2090 ac_save_CFLAGS="$CFLAGS"
2091 CFLAGS=
2092 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2093 echo "configure:2094: checking whether ${CC-cc} accepts -g" >&5
2094 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2095 echo $ac_n "(cached) $ac_c" 1>&6
2096 else
2097 echo 'void f(){}' > conftest.c
2098 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2099 ac_cv_prog_cc_g=yes
2100 else
2101 ac_cv_prog_cc_g=no
2103 rm -f conftest*
2107 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2108 if test "$ac_test_CFLAGS" = set; then
2109 CFLAGS="$ac_save_CFLAGS"
2110 elif test $ac_cv_prog_cc_g = yes; then
2111 if test "$GCC" = yes; then
2112 CFLAGS="-g -O2"
2113 else
2114 CFLAGS="-g"
2116 else
2117 if test "$GCC" = yes; then
2118 CFLAGS="-O2"
2119 else
2120 CFLAGS=
2125 for ac_prog in 'bison -y' byacc
2127 # Extract the first word of "$ac_prog", so it can be a program name with args.
2128 set dummy $ac_prog; ac_word=$2
2129 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2130 echo "configure:2131: checking for $ac_word" >&5
2131 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2132 echo $ac_n "(cached) $ac_c" 1>&6
2133 else
2134 if test -n "$YACC"; then
2135 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2136 else
2137 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2138 ac_dummy="$PATH"
2139 for ac_dir in $ac_dummy; do
2140 test -z "$ac_dir" && ac_dir=.
2141 if test -f $ac_dir/$ac_word; then
2142 ac_cv_prog_YACC="$ac_prog"
2143 break
2145 done
2146 IFS="$ac_save_ifs"
2149 YACC="$ac_cv_prog_YACC"
2150 if test -n "$YACC"; then
2151 echo "$ac_t""$YACC" 1>&6
2152 else
2153 echo "$ac_t""no" 1>&6
2156 test -n "$YACC" && break
2157 done
2158 test -n "$YACC" || YACC="yacc"
2160 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2161 echo "configure:2162: checking how to run the C preprocessor" >&5
2162 # On Suns, sometimes $CPP names a directory.
2163 if test -n "$CPP" && test -d "$CPP"; then
2164 CPP=
2166 if test -z "$CPP"; then
2167 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2168 echo $ac_n "(cached) $ac_c" 1>&6
2169 else
2170 # This must be in double quotes, not single quotes, because CPP may get
2171 # substituted into the Makefile and "${CC-cc}" will confuse make.
2172 CPP="${CC-cc} -E"
2173 # On the NeXT, cc -E runs the code through the compiler's parser,
2174 # not just through cpp.
2175 cat > conftest.$ac_ext <<EOF
2176 #line 2177 "configure"
2177 #include "confdefs.h"
2178 #include <assert.h>
2179 Syntax Error
2181 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2182 { (eval echo configure:2183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2183 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2184 if test -z "$ac_err"; then
2186 else
2187 echo "$ac_err" >&5
2188 echo "configure: failed program was:" >&5
2189 cat conftest.$ac_ext >&5
2190 rm -rf conftest*
2191 CPP="${CC-cc} -E -traditional-cpp"
2192 cat > conftest.$ac_ext <<EOF
2193 #line 2194 "configure"
2194 #include "confdefs.h"
2195 #include <assert.h>
2196 Syntax Error
2198 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2199 { (eval echo configure:2200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2200 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2201 if test -z "$ac_err"; then
2203 else
2204 echo "$ac_err" >&5
2205 echo "configure: failed program was:" >&5
2206 cat conftest.$ac_ext >&5
2207 rm -rf conftest*
2208 CPP="${CC-cc} -nologo -E"
2209 cat > conftest.$ac_ext <<EOF
2210 #line 2211 "configure"
2211 #include "confdefs.h"
2212 #include <assert.h>
2213 Syntax Error
2215 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2216 { (eval echo configure:2217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2217 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2218 if test -z "$ac_err"; then
2220 else
2221 echo "$ac_err" >&5
2222 echo "configure: failed program was:" >&5
2223 cat conftest.$ac_ext >&5
2224 rm -rf conftest*
2225 CPP=/lib/cpp
2227 rm -f conftest*
2229 rm -f conftest*
2231 rm -f conftest*
2232 ac_cv_prog_CPP="$CPP"
2234 CPP="$ac_cv_prog_CPP"
2235 else
2236 ac_cv_prog_CPP="$CPP"
2238 echo "$ac_t""$CPP" 1>&6
2240 missing_dir=`cd $ac_aux_dir && pwd`
2241 for ac_prog in flex lex
2243 # Extract the first word of "$ac_prog", so it can be a program name with args.
2244 set dummy $ac_prog; ac_word=$2
2245 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2246 echo "configure:2247: checking for $ac_word" >&5
2247 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
2248 echo $ac_n "(cached) $ac_c" 1>&6
2249 else
2250 if test -n "$LEX"; then
2251 ac_cv_prog_LEX="$LEX" # Let the user override the test.
2252 else
2253 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2254 ac_dummy="$PATH"
2255 for ac_dir in $ac_dummy; do
2256 test -z "$ac_dir" && ac_dir=.
2257 if test -f $ac_dir/$ac_word; then
2258 ac_cv_prog_LEX="$ac_prog"
2259 break
2261 done
2262 IFS="$ac_save_ifs"
2265 LEX="$ac_cv_prog_LEX"
2266 if test -n "$LEX"; then
2267 echo "$ac_t""$LEX" 1>&6
2268 else
2269 echo "$ac_t""no" 1>&6
2272 test -n "$LEX" && break
2273 done
2274 test -n "$LEX" || LEX=""$missing_dir/missing flex""
2276 # Extract the first word of "flex", so it can be a program name with args.
2277 set dummy flex; ac_word=$2
2278 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2279 echo "configure:2280: checking for $ac_word" >&5
2280 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
2281 echo $ac_n "(cached) $ac_c" 1>&6
2282 else
2283 if test -n "$LEX"; then
2284 ac_cv_prog_LEX="$LEX" # Let the user override the test.
2285 else
2286 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2287 ac_dummy="$PATH"
2288 for ac_dir in $ac_dummy; do
2289 test -z "$ac_dir" && ac_dir=.
2290 if test -f $ac_dir/$ac_word; then
2291 ac_cv_prog_LEX="flex"
2292 break
2294 done
2295 IFS="$ac_save_ifs"
2296 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
2299 LEX="$ac_cv_prog_LEX"
2300 if test -n "$LEX"; then
2301 echo "$ac_t""$LEX" 1>&6
2302 else
2303 echo "$ac_t""no" 1>&6
2306 if test -z "$LEXLIB"
2307 then
2308 case "$LEX" in
2309 flex*) ac_lib=fl ;;
2310 *) ac_lib=l ;;
2311 esac
2312 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
2313 echo "configure:2314: checking for yywrap in -l$ac_lib" >&5
2314 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
2315 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2316 echo $ac_n "(cached) $ac_c" 1>&6
2317 else
2318 ac_save_LIBS="$LIBS"
2319 LIBS="-l$ac_lib $LIBS"
2320 cat > conftest.$ac_ext <<EOF
2321 #line 2322 "configure"
2322 #include "confdefs.h"
2323 /* Override any gcc2 internal prototype to avoid an error. */
2324 /* We use char because int might match the return type of a gcc2
2325 builtin and then its argument prototype would still apply. */
2326 char yywrap();
2328 int main() {
2329 yywrap()
2330 ; return 0; }
2332 if { (eval echo configure:2333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2333 rm -rf conftest*
2334 eval "ac_cv_lib_$ac_lib_var=yes"
2335 else
2336 echo "configure: failed program was:" >&5
2337 cat conftest.$ac_ext >&5
2338 rm -rf conftest*
2339 eval "ac_cv_lib_$ac_lib_var=no"
2341 rm -f conftest*
2342 LIBS="$ac_save_LIBS"
2345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2346 echo "$ac_t""yes" 1>&6
2347 LEXLIB="-l$ac_lib"
2348 else
2349 echo "$ac_t""no" 1>&6
2354 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
2355 echo "configure:2356: checking lex output file root" >&5
2356 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
2357 echo $ac_n "(cached) $ac_c" 1>&6
2358 else
2359 # The minimal lex program is just a single line: %%. But some broken lexes
2360 # (Solaris, I think it was) want two %% lines, so accommodate them.
2361 echo '%%
2362 %%' | $LEX
2363 if test -f lex.yy.c; then
2364 ac_cv_prog_lex_root=lex.yy
2365 elif test -f lexyy.c; then
2366 ac_cv_prog_lex_root=lexyy
2367 else
2368 { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
2372 echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
2373 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
2375 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
2376 echo "configure:2377: checking whether yytext is a pointer" >&5
2377 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
2378 echo $ac_n "(cached) $ac_c" 1>&6
2379 else
2380 # POSIX says lex can declare yytext either as a pointer or an array; the
2381 # default is implementation-dependent. Figure out which it is, since
2382 # not all implementations provide the %pointer and %array declarations.
2383 ac_cv_prog_lex_yytext_pointer=no
2384 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
2385 ac_save_LIBS="$LIBS"
2386 LIBS="$LIBS $LEXLIB"
2387 cat > conftest.$ac_ext <<EOF
2388 #line 2389 "configure"
2389 #include "confdefs.h"
2390 `cat $LEX_OUTPUT_ROOT.c`
2391 int main() {
2393 ; return 0; }
2395 if { (eval echo configure:2396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2396 rm -rf conftest*
2397 ac_cv_prog_lex_yytext_pointer=yes
2398 else
2399 echo "configure: failed program was:" >&5
2400 cat conftest.$ac_ext >&5
2402 rm -f conftest*
2403 LIBS="$ac_save_LIBS"
2404 rm -f "${LEX_OUTPUT_ROOT}.c"
2408 echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
2409 if test $ac_cv_prog_lex_yytext_pointer = yes; then
2410 cat >> confdefs.h <<\EOF
2411 #define YYTEXT_POINTER 1
2417 ALL_LINGUAS=
2418 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2419 echo "configure:2420: checking for POSIXized ISC" >&5
2420 if test -d /etc/conf/kconfig.d &&
2421 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2422 then
2423 echo "$ac_t""yes" 1>&6
2424 ISC=yes # If later tests want to check for ISC.
2425 cat >> confdefs.h <<\EOF
2426 #define _POSIX_SOURCE 1
2429 if test "$GCC" = yes; then
2430 CC="$CC -posix"
2431 else
2432 CC="$CC -Xp"
2434 else
2435 echo "$ac_t""no" 1>&6
2436 ISC=
2439 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2440 echo "configure:2441: checking for ANSI C header files" >&5
2441 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2442 echo $ac_n "(cached) $ac_c" 1>&6
2443 else
2444 cat > conftest.$ac_ext <<EOF
2445 #line 2446 "configure"
2446 #include "confdefs.h"
2447 #include <stdlib.h>
2448 #include <stdarg.h>
2449 #include <string.h>
2450 #include <float.h>
2452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2453 { (eval echo configure:2454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2455 if test -z "$ac_err"; then
2456 rm -rf conftest*
2457 ac_cv_header_stdc=yes
2458 else
2459 echo "$ac_err" >&5
2460 echo "configure: failed program was:" >&5
2461 cat conftest.$ac_ext >&5
2462 rm -rf conftest*
2463 ac_cv_header_stdc=no
2465 rm -f conftest*
2467 if test $ac_cv_header_stdc = yes; then
2468 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2469 cat > conftest.$ac_ext <<EOF
2470 #line 2471 "configure"
2471 #include "confdefs.h"
2472 #include <string.h>
2474 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2475 egrep "memchr" >/dev/null 2>&1; then
2477 else
2478 rm -rf conftest*
2479 ac_cv_header_stdc=no
2481 rm -f conftest*
2485 if test $ac_cv_header_stdc = yes; then
2486 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2487 cat > conftest.$ac_ext <<EOF
2488 #line 2489 "configure"
2489 #include "confdefs.h"
2490 #include <stdlib.h>
2492 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2493 egrep "free" >/dev/null 2>&1; then
2495 else
2496 rm -rf conftest*
2497 ac_cv_header_stdc=no
2499 rm -f conftest*
2503 if test $ac_cv_header_stdc = yes; then
2504 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2505 if test "$cross_compiling" = yes; then
2507 else
2508 cat > conftest.$ac_ext <<EOF
2509 #line 2510 "configure"
2510 #include "confdefs.h"
2511 #include <ctype.h>
2512 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2513 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2514 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2515 int main () { int i; for (i = 0; i < 256; i++)
2516 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2517 exit (0); }
2520 if { (eval echo configure:2521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2521 then
2523 else
2524 echo "configure: failed program was:" >&5
2525 cat conftest.$ac_ext >&5
2526 rm -fr conftest*
2527 ac_cv_header_stdc=no
2529 rm -fr conftest*
2535 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2536 if test $ac_cv_header_stdc = yes; then
2537 cat >> confdefs.h <<\EOF
2538 #define STDC_HEADERS 1
2543 echo $ac_n "checking for working const""... $ac_c" 1>&6
2544 echo "configure:2545: checking for working const" >&5
2545 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2546 echo $ac_n "(cached) $ac_c" 1>&6
2547 else
2548 cat > conftest.$ac_ext <<EOF
2549 #line 2550 "configure"
2550 #include "confdefs.h"
2552 int main() {
2554 /* Ultrix mips cc rejects this. */
2555 typedef int charset[2]; const charset x;
2556 /* SunOS 4.1.1 cc rejects this. */
2557 char const *const *ccp;
2558 char **p;
2559 /* NEC SVR4.0.2 mips cc rejects this. */
2560 struct point {int x, y;};
2561 static struct point const zero = {0,0};
2562 /* AIX XL C 1.02.0.0 rejects this.
2563 It does not let you subtract one const X* pointer from another in an arm
2564 of an if-expression whose if-part is not a constant expression */
2565 const char *g = "string";
2566 ccp = &g + (g ? g-g : 0);
2567 /* HPUX 7.0 cc rejects these. */
2568 ++ccp;
2569 p = (char**) ccp;
2570 ccp = (char const *const *) p;
2571 { /* SCO 3.2v4 cc rejects this. */
2572 char *t;
2573 char const *s = 0 ? (char *) 0 : (char const *) 0;
2575 *t++ = 0;
2577 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2578 int x[] = {25, 17};
2579 const int *foo = &x[0];
2580 ++foo;
2582 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2583 typedef const int *iptr;
2584 iptr p = 0;
2585 ++p;
2587 { /* AIX XL C 1.02.0.0 rejects this saying
2588 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2589 struct s { int j; const int *ap[3]; };
2590 struct s *b; b->j = 5;
2592 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2593 const int foo = 10;
2596 ; return 0; }
2598 if { (eval echo configure:2599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2599 rm -rf conftest*
2600 ac_cv_c_const=yes
2601 else
2602 echo "configure: failed program was:" >&5
2603 cat conftest.$ac_ext >&5
2604 rm -rf conftest*
2605 ac_cv_c_const=no
2607 rm -f conftest*
2610 echo "$ac_t""$ac_cv_c_const" 1>&6
2611 if test $ac_cv_c_const = no; then
2612 cat >> confdefs.h <<\EOF
2613 #define const
2618 echo $ac_n "checking for inline""... $ac_c" 1>&6
2619 echo "configure:2620: checking for inline" >&5
2620 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2621 echo $ac_n "(cached) $ac_c" 1>&6
2622 else
2623 ac_cv_c_inline=no
2624 for ac_kw in inline __inline__ __inline; do
2625 cat > conftest.$ac_ext <<EOF
2626 #line 2627 "configure"
2627 #include "confdefs.h"
2629 int main() {
2630 } $ac_kw foo() {
2631 ; return 0; }
2633 if { (eval echo configure:2634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2634 rm -rf conftest*
2635 ac_cv_c_inline=$ac_kw; break
2636 else
2637 echo "configure: failed program was:" >&5
2638 cat conftest.$ac_ext >&5
2640 rm -f conftest*
2641 done
2645 echo "$ac_t""$ac_cv_c_inline" 1>&6
2646 case "$ac_cv_c_inline" in
2647 inline | yes) ;;
2648 no) cat >> confdefs.h <<\EOF
2649 #define inline
2652 *) cat >> confdefs.h <<EOF
2653 #define inline $ac_cv_c_inline
2656 esac
2658 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2659 echo "configure:2660: checking for off_t" >&5
2660 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2661 echo $ac_n "(cached) $ac_c" 1>&6
2662 else
2663 cat > conftest.$ac_ext <<EOF
2664 #line 2665 "configure"
2665 #include "confdefs.h"
2666 #include <sys/types.h>
2667 #if STDC_HEADERS
2668 #include <stdlib.h>
2669 #include <stddef.h>
2670 #endif
2672 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2673 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2674 rm -rf conftest*
2675 ac_cv_type_off_t=yes
2676 else
2677 rm -rf conftest*
2678 ac_cv_type_off_t=no
2680 rm -f conftest*
2683 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2684 if test $ac_cv_type_off_t = no; then
2685 cat >> confdefs.h <<\EOF
2686 #define off_t long
2691 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2692 echo "configure:2693: checking for size_t" >&5
2693 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2694 echo $ac_n "(cached) $ac_c" 1>&6
2695 else
2696 cat > conftest.$ac_ext <<EOF
2697 #line 2698 "configure"
2698 #include "confdefs.h"
2699 #include <sys/types.h>
2700 #if STDC_HEADERS
2701 #include <stdlib.h>
2702 #include <stddef.h>
2703 #endif
2705 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2706 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2707 rm -rf conftest*
2708 ac_cv_type_size_t=yes
2709 else
2710 rm -rf conftest*
2711 ac_cv_type_size_t=no
2713 rm -f conftest*
2716 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2717 if test $ac_cv_type_size_t = no; then
2718 cat >> confdefs.h <<\EOF
2719 #define size_t unsigned
2724 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2725 # for constant arguments. Useless!
2726 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2727 echo "configure:2728: checking for working alloca.h" >&5
2728 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2729 echo $ac_n "(cached) $ac_c" 1>&6
2730 else
2731 cat > conftest.$ac_ext <<EOF
2732 #line 2733 "configure"
2733 #include "confdefs.h"
2734 #include <alloca.h>
2735 int main() {
2736 char *p = alloca(2 * sizeof(int));
2737 ; return 0; }
2739 if { (eval echo configure:2740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2740 rm -rf conftest*
2741 ac_cv_header_alloca_h=yes
2742 else
2743 echo "configure: failed program was:" >&5
2744 cat conftest.$ac_ext >&5
2745 rm -rf conftest*
2746 ac_cv_header_alloca_h=no
2748 rm -f conftest*
2751 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2752 if test $ac_cv_header_alloca_h = yes; then
2753 cat >> confdefs.h <<\EOF
2754 #define HAVE_ALLOCA_H 1
2759 echo $ac_n "checking for alloca""... $ac_c" 1>&6
2760 echo "configure:2761: checking for alloca" >&5
2761 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2762 echo $ac_n "(cached) $ac_c" 1>&6
2763 else
2764 cat > conftest.$ac_ext <<EOF
2765 #line 2766 "configure"
2766 #include "confdefs.h"
2768 #ifdef __GNUC__
2769 # define alloca __builtin_alloca
2770 #else
2771 # ifdef _MSC_VER
2772 # include <malloc.h>
2773 # define alloca _alloca
2774 # else
2775 # if HAVE_ALLOCA_H
2776 # include <alloca.h>
2777 # else
2778 # ifdef _AIX
2779 #pragma alloca
2780 # else
2781 # ifndef alloca /* predefined by HP cc +Olibcalls */
2782 char *alloca ();
2783 # endif
2784 # endif
2785 # endif
2786 # endif
2787 #endif
2789 int main() {
2790 char *p = (char *) alloca(1);
2791 ; return 0; }
2793 if { (eval echo configure:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2794 rm -rf conftest*
2795 ac_cv_func_alloca_works=yes
2796 else
2797 echo "configure: failed program was:" >&5
2798 cat conftest.$ac_ext >&5
2799 rm -rf conftest*
2800 ac_cv_func_alloca_works=no
2802 rm -f conftest*
2805 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2806 if test $ac_cv_func_alloca_works = yes; then
2807 cat >> confdefs.h <<\EOF
2808 #define HAVE_ALLOCA 1
2813 if test $ac_cv_func_alloca_works = no; then
2814 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2815 # that cause trouble. Some versions do not even contain alloca or
2816 # contain a buggy version. If you still want to use their alloca,
2817 # use ar to extract alloca.o from them instead of compiling alloca.c.
2818 ALLOCA=alloca.${ac_objext}
2819 cat >> confdefs.h <<\EOF
2820 #define C_ALLOCA 1
2824 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2825 echo "configure:2826: checking whether alloca needs Cray hooks" >&5
2826 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2827 echo $ac_n "(cached) $ac_c" 1>&6
2828 else
2829 cat > conftest.$ac_ext <<EOF
2830 #line 2831 "configure"
2831 #include "confdefs.h"
2832 #if defined(CRAY) && ! defined(CRAY2)
2833 webecray
2834 #else
2835 wenotbecray
2836 #endif
2839 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2840 egrep "webecray" >/dev/null 2>&1; then
2841 rm -rf conftest*
2842 ac_cv_os_cray=yes
2843 else
2844 rm -rf conftest*
2845 ac_cv_os_cray=no
2847 rm -f conftest*
2851 echo "$ac_t""$ac_cv_os_cray" 1>&6
2852 if test $ac_cv_os_cray = yes; then
2853 for ac_func in _getb67 GETB67 getb67; do
2854 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2855 echo "configure:2856: checking for $ac_func" >&5
2856 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2857 echo $ac_n "(cached) $ac_c" 1>&6
2858 else
2859 cat > conftest.$ac_ext <<EOF
2860 #line 2861 "configure"
2861 #include "confdefs.h"
2862 /* System header to define __stub macros and hopefully few prototypes,
2863 which can conflict with char $ac_func(); below. */
2864 #include <assert.h>
2865 /* Override any gcc2 internal prototype to avoid an error. */
2866 /* We use char because int might match the return type of a gcc2
2867 builtin and then its argument prototype would still apply. */
2868 char $ac_func();
2870 int main() {
2872 /* The GNU C library defines this for functions which it implements
2873 to always fail with ENOSYS. Some functions are actually named
2874 something starting with __ and the normal name is an alias. */
2875 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2876 choke me
2877 #else
2878 $ac_func();
2879 #endif
2881 ; return 0; }
2883 if { (eval echo configure:2884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2884 rm -rf conftest*
2885 eval "ac_cv_func_$ac_func=yes"
2886 else
2887 echo "configure: failed program was:" >&5
2888 cat conftest.$ac_ext >&5
2889 rm -rf conftest*
2890 eval "ac_cv_func_$ac_func=no"
2892 rm -f conftest*
2895 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2896 echo "$ac_t""yes" 1>&6
2897 cat >> confdefs.h <<EOF
2898 #define CRAY_STACKSEG_END $ac_func
2901 break
2902 else
2903 echo "$ac_t""no" 1>&6
2906 done
2909 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2910 echo "configure:2911: checking stack direction for C alloca" >&5
2911 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2912 echo $ac_n "(cached) $ac_c" 1>&6
2913 else
2914 if test "$cross_compiling" = yes; then
2915 ac_cv_c_stack_direction=0
2916 else
2917 cat > conftest.$ac_ext <<EOF
2918 #line 2919 "configure"
2919 #include "confdefs.h"
2920 find_stack_direction ()
2922 static char *addr = 0;
2923 auto char dummy;
2924 if (addr == 0)
2926 addr = &dummy;
2927 return find_stack_direction ();
2929 else
2930 return (&dummy > addr) ? 1 : -1;
2932 main ()
2934 exit (find_stack_direction() < 0);
2937 if { (eval echo configure:2938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2938 then
2939 ac_cv_c_stack_direction=1
2940 else
2941 echo "configure: failed program was:" >&5
2942 cat conftest.$ac_ext >&5
2943 rm -fr conftest*
2944 ac_cv_c_stack_direction=-1
2946 rm -fr conftest*
2951 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2952 cat >> confdefs.h <<EOF
2953 #define STACK_DIRECTION $ac_cv_c_stack_direction
2958 for ac_hdr in unistd.h
2960 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2961 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2962 echo "configure:2963: checking for $ac_hdr" >&5
2963 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2964 echo $ac_n "(cached) $ac_c" 1>&6
2965 else
2966 cat > conftest.$ac_ext <<EOF
2967 #line 2968 "configure"
2968 #include "confdefs.h"
2969 #include <$ac_hdr>
2971 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2972 { (eval echo configure:2973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2973 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2974 if test -z "$ac_err"; then
2975 rm -rf conftest*
2976 eval "ac_cv_header_$ac_safe=yes"
2977 else
2978 echo "$ac_err" >&5
2979 echo "configure: failed program was:" >&5
2980 cat conftest.$ac_ext >&5
2981 rm -rf conftest*
2982 eval "ac_cv_header_$ac_safe=no"
2984 rm -f conftest*
2986 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2987 echo "$ac_t""yes" 1>&6
2988 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2989 cat >> confdefs.h <<EOF
2990 #define $ac_tr_hdr 1
2993 else
2994 echo "$ac_t""no" 1>&6
2996 done
2998 for ac_func in getpagesize
3000 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3001 echo "configure:3002: checking for $ac_func" >&5
3002 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3003 echo $ac_n "(cached) $ac_c" 1>&6
3004 else
3005 cat > conftest.$ac_ext <<EOF
3006 #line 3007 "configure"
3007 #include "confdefs.h"
3008 /* System header to define __stub macros and hopefully few prototypes,
3009 which can conflict with char $ac_func(); below. */
3010 #include <assert.h>
3011 /* Override any gcc2 internal prototype to avoid an error. */
3012 /* We use char because int might match the return type of a gcc2
3013 builtin and then its argument prototype would still apply. */
3014 char $ac_func();
3016 int main() {
3018 /* The GNU C library defines this for functions which it implements
3019 to always fail with ENOSYS. Some functions are actually named
3020 something starting with __ and the normal name is an alias. */
3021 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3022 choke me
3023 #else
3024 $ac_func();
3025 #endif
3027 ; return 0; }
3029 if { (eval echo configure:3030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3030 rm -rf conftest*
3031 eval "ac_cv_func_$ac_func=yes"
3032 else
3033 echo "configure: failed program was:" >&5
3034 cat conftest.$ac_ext >&5
3035 rm -rf conftest*
3036 eval "ac_cv_func_$ac_func=no"
3038 rm -f conftest*
3041 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3042 echo "$ac_t""yes" 1>&6
3043 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3044 cat >> confdefs.h <<EOF
3045 #define $ac_tr_func 1
3048 else
3049 echo "$ac_t""no" 1>&6
3051 done
3053 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
3054 echo "configure:3055: checking for working mmap" >&5
3055 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3056 echo $ac_n "(cached) $ac_c" 1>&6
3057 else
3058 if test "$cross_compiling" = yes; then
3059 ac_cv_func_mmap_fixed_mapped=no
3060 else
3061 cat > conftest.$ac_ext <<EOF
3062 #line 3063 "configure"
3063 #include "confdefs.h"
3065 /* Thanks to Mike Haertel and Jim Avera for this test.
3066 Here is a matrix of mmap possibilities:
3067 mmap private not fixed
3068 mmap private fixed at somewhere currently unmapped
3069 mmap private fixed at somewhere already mapped
3070 mmap shared not fixed
3071 mmap shared fixed at somewhere currently unmapped
3072 mmap shared fixed at somewhere already mapped
3073 For private mappings, we should verify that changes cannot be read()
3074 back from the file, nor mmap's back from the file at a different
3075 address. (There have been systems where private was not correctly
3076 implemented like the infamous i386 svr4.0, and systems where the
3077 VM page cache was not coherent with the filesystem buffer cache
3078 like early versions of FreeBSD and possibly contemporary NetBSD.)
3079 For shared mappings, we should conversely verify that changes get
3080 propogated back to all the places they're supposed to be.
3082 Grep wants private fixed already mapped.
3083 The main things grep needs to know about mmap are:
3084 * does it exist and is it safe to write into the mmap'd area
3085 * how to use it (BSD variants) */
3086 #include <sys/types.h>
3087 #include <fcntl.h>
3088 #include <sys/mman.h>
3090 /* This mess was copied from the GNU getpagesize.h. */
3091 #ifndef HAVE_GETPAGESIZE
3092 # ifdef HAVE_UNISTD_H
3093 # include <unistd.h>
3094 # endif
3096 /* Assume that all systems that can run configure have sys/param.h. */
3097 # ifndef HAVE_SYS_PARAM_H
3098 # define HAVE_SYS_PARAM_H 1
3099 # endif
3101 # ifdef _SC_PAGESIZE
3102 # define getpagesize() sysconf(_SC_PAGESIZE)
3103 # else /* no _SC_PAGESIZE */
3104 # ifdef HAVE_SYS_PARAM_H
3105 # include <sys/param.h>
3106 # ifdef EXEC_PAGESIZE
3107 # define getpagesize() EXEC_PAGESIZE
3108 # else /* no EXEC_PAGESIZE */
3109 # ifdef NBPG
3110 # define getpagesize() NBPG * CLSIZE
3111 # ifndef CLSIZE
3112 # define CLSIZE 1
3113 # endif /* no CLSIZE */
3114 # else /* no NBPG */
3115 # ifdef NBPC
3116 # define getpagesize() NBPC
3117 # else /* no NBPC */
3118 # ifdef PAGESIZE
3119 # define getpagesize() PAGESIZE
3120 # endif /* PAGESIZE */
3121 # endif /* no NBPC */
3122 # endif /* no NBPG */
3123 # endif /* no EXEC_PAGESIZE */
3124 # else /* no HAVE_SYS_PARAM_H */
3125 # define getpagesize() 8192 /* punt totally */
3126 # endif /* no HAVE_SYS_PARAM_H */
3127 # endif /* no _SC_PAGESIZE */
3129 #endif /* no HAVE_GETPAGESIZE */
3131 #ifdef __cplusplus
3132 extern "C" { void *malloc(unsigned); }
3133 #else
3134 char *malloc();
3135 #endif
3138 main()
3140 char *data, *data2, *data3;
3141 int i, pagesize;
3142 int fd;
3144 pagesize = getpagesize();
3147 * First, make a file with some known garbage in it.
3149 data = malloc(pagesize);
3150 if (!data)
3151 exit(1);
3152 for (i = 0; i < pagesize; ++i)
3153 *(data + i) = rand();
3154 umask(0);
3155 fd = creat("conftestmmap", 0600);
3156 if (fd < 0)
3157 exit(1);
3158 if (write(fd, data, pagesize) != pagesize)
3159 exit(1);
3160 close(fd);
3163 * Next, try to mmap the file at a fixed address which
3164 * already has something else allocated at it. If we can,
3165 * also make sure that we see the same garbage.
3167 fd = open("conftestmmap", O_RDWR);
3168 if (fd < 0)
3169 exit(1);
3170 data2 = malloc(2 * pagesize);
3171 if (!data2)
3172 exit(1);
3173 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3174 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3175 MAP_PRIVATE | MAP_FIXED, fd, 0L))
3176 exit(1);
3177 for (i = 0; i < pagesize; ++i)
3178 if (*(data + i) != *(data2 + i))
3179 exit(1);
3182 * Finally, make sure that changes to the mapped area
3183 * do not percolate back to the file as seen by read().
3184 * (This is a bug on some variants of i386 svr4.0.)
3186 for (i = 0; i < pagesize; ++i)
3187 *(data2 + i) = *(data2 + i) + 1;
3188 data3 = malloc(pagesize);
3189 if (!data3)
3190 exit(1);
3191 if (read(fd, data3, pagesize) != pagesize)
3192 exit(1);
3193 for (i = 0; i < pagesize; ++i)
3194 if (*(data + i) != *(data3 + i))
3195 exit(1);
3196 close(fd);
3197 unlink("conftestmmap");
3198 exit(0);
3202 if { (eval echo configure:3203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3203 then
3204 ac_cv_func_mmap_fixed_mapped=yes
3205 else
3206 echo "configure: failed program was:" >&5
3207 cat conftest.$ac_ext >&5
3208 rm -fr conftest*
3209 ac_cv_func_mmap_fixed_mapped=no
3211 rm -fr conftest*
3216 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3217 if test $ac_cv_func_mmap_fixed_mapped = yes; then
3218 cat >> confdefs.h <<\EOF
3219 #define HAVE_MMAP 1
3225 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
3226 unistd.h values.h sys/param.h
3228 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3229 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3230 echo "configure:3231: checking for $ac_hdr" >&5
3231 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3232 echo $ac_n "(cached) $ac_c" 1>&6
3233 else
3234 cat > conftest.$ac_ext <<EOF
3235 #line 3236 "configure"
3236 #include "confdefs.h"
3237 #include <$ac_hdr>
3239 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3240 { (eval echo configure:3241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3241 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3242 if test -z "$ac_err"; then
3243 rm -rf conftest*
3244 eval "ac_cv_header_$ac_safe=yes"
3245 else
3246 echo "$ac_err" >&5
3247 echo "configure: failed program was:" >&5
3248 cat conftest.$ac_ext >&5
3249 rm -rf conftest*
3250 eval "ac_cv_header_$ac_safe=no"
3252 rm -f conftest*
3254 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3255 echo "$ac_t""yes" 1>&6
3256 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3257 cat >> confdefs.h <<EOF
3258 #define $ac_tr_hdr 1
3261 else
3262 echo "$ac_t""no" 1>&6
3264 done
3266 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
3267 __argz_count __argz_stringify __argz_next
3269 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3270 echo "configure:3271: checking for $ac_func" >&5
3271 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3272 echo $ac_n "(cached) $ac_c" 1>&6
3273 else
3274 cat > conftest.$ac_ext <<EOF
3275 #line 3276 "configure"
3276 #include "confdefs.h"
3277 /* System header to define __stub macros and hopefully few prototypes,
3278 which can conflict with char $ac_func(); below. */
3279 #include <assert.h>
3280 /* Override any gcc2 internal prototype to avoid an error. */
3281 /* We use char because int might match the return type of a gcc2
3282 builtin and then its argument prototype would still apply. */
3283 char $ac_func();
3285 int main() {
3287 /* The GNU C library defines this for functions which it implements
3288 to always fail with ENOSYS. Some functions are actually named
3289 something starting with __ and the normal name is an alias. */
3290 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3291 choke me
3292 #else
3293 $ac_func();
3294 #endif
3296 ; return 0; }
3298 if { (eval echo configure:3299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3299 rm -rf conftest*
3300 eval "ac_cv_func_$ac_func=yes"
3301 else
3302 echo "configure: failed program was:" >&5
3303 cat conftest.$ac_ext >&5
3304 rm -rf conftest*
3305 eval "ac_cv_func_$ac_func=no"
3307 rm -f conftest*
3310 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3311 echo "$ac_t""yes" 1>&6
3312 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3313 cat >> confdefs.h <<EOF
3314 #define $ac_tr_func 1
3317 else
3318 echo "$ac_t""no" 1>&6
3320 done
3323 if test "${ac_cv_func_stpcpy+set}" != "set"; then
3324 for ac_func in stpcpy
3326 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3327 echo "configure:3328: checking for $ac_func" >&5
3328 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3329 echo $ac_n "(cached) $ac_c" 1>&6
3330 else
3331 cat > conftest.$ac_ext <<EOF
3332 #line 3333 "configure"
3333 #include "confdefs.h"
3334 /* System header to define __stub macros and hopefully few prototypes,
3335 which can conflict with char $ac_func(); below. */
3336 #include <assert.h>
3337 /* Override any gcc2 internal prototype to avoid an error. */
3338 /* We use char because int might match the return type of a gcc2
3339 builtin and then its argument prototype would still apply. */
3340 char $ac_func();
3342 int main() {
3344 /* The GNU C library defines this for functions which it implements
3345 to always fail with ENOSYS. Some functions are actually named
3346 something starting with __ and the normal name is an alias. */
3347 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3348 choke me
3349 #else
3350 $ac_func();
3351 #endif
3353 ; return 0; }
3355 if { (eval echo configure:3356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3356 rm -rf conftest*
3357 eval "ac_cv_func_$ac_func=yes"
3358 else
3359 echo "configure: failed program was:" >&5
3360 cat conftest.$ac_ext >&5
3361 rm -rf conftest*
3362 eval "ac_cv_func_$ac_func=no"
3364 rm -f conftest*
3367 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3368 echo "$ac_t""yes" 1>&6
3369 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3370 cat >> confdefs.h <<EOF
3371 #define $ac_tr_func 1
3374 else
3375 echo "$ac_t""no" 1>&6
3377 done
3380 if test "${ac_cv_func_stpcpy}" = "yes"; then
3381 cat >> confdefs.h <<\EOF
3382 #define HAVE_STPCPY 1
3387 if test $ac_cv_header_locale_h = yes; then
3388 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
3389 echo "configure:3390: checking for LC_MESSAGES" >&5
3390 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3391 echo $ac_n "(cached) $ac_c" 1>&6
3392 else
3393 cat > conftest.$ac_ext <<EOF
3394 #line 3395 "configure"
3395 #include "confdefs.h"
3396 #include <locale.h>
3397 int main() {
3398 return LC_MESSAGES
3399 ; return 0; }
3401 if { (eval echo configure:3402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3402 rm -rf conftest*
3403 am_cv_val_LC_MESSAGES=yes
3404 else
3405 echo "configure: failed program was:" >&5
3406 cat conftest.$ac_ext >&5
3407 rm -rf conftest*
3408 am_cv_val_LC_MESSAGES=no
3410 rm -f conftest*
3413 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3414 if test $am_cv_val_LC_MESSAGES = yes; then
3415 cat >> confdefs.h <<\EOF
3416 #define HAVE_LC_MESSAGES 1
3421 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
3422 echo "configure:3423: checking whether NLS is requested" >&5
3423 # Check whether --enable-nls or --disable-nls was given.
3424 if test "${enable_nls+set}" = set; then
3425 enableval="$enable_nls"
3426 USE_NLS=$enableval
3427 else
3428 USE_NLS=yes
3431 echo "$ac_t""$USE_NLS" 1>&6
3434 USE_INCLUDED_LIBINTL=no
3436 if test "$USE_NLS" = "yes"; then
3437 cat >> confdefs.h <<\EOF
3438 #define ENABLE_NLS 1
3441 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
3442 echo "configure:3443: checking whether included gettext is requested" >&5
3443 # Check whether --with-included-gettext or --without-included-gettext was given.
3444 if test "${with_included_gettext+set}" = set; then
3445 withval="$with_included_gettext"
3446 nls_cv_force_use_gnu_gettext=$withval
3447 else
3448 nls_cv_force_use_gnu_gettext=no
3451 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3453 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3454 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3455 nls_cv_header_intl=
3456 nls_cv_header_libgt=
3457 CATOBJEXT=NONE
3459 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3460 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
3461 echo "configure:3462: checking for libintl.h" >&5
3462 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3463 echo $ac_n "(cached) $ac_c" 1>&6
3464 else
3465 cat > conftest.$ac_ext <<EOF
3466 #line 3467 "configure"
3467 #include "confdefs.h"
3468 #include <libintl.h>
3470 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3471 { (eval echo configure:3472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3472 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3473 if test -z "$ac_err"; then
3474 rm -rf conftest*
3475 eval "ac_cv_header_$ac_safe=yes"
3476 else
3477 echo "$ac_err" >&5
3478 echo "configure: failed program was:" >&5
3479 cat conftest.$ac_ext >&5
3480 rm -rf conftest*
3481 eval "ac_cv_header_$ac_safe=no"
3483 rm -f conftest*
3485 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3486 echo "$ac_t""yes" 1>&6
3487 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
3488 echo "configure:3489: checking for gettext in libc" >&5
3489 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
3490 echo $ac_n "(cached) $ac_c" 1>&6
3491 else
3492 cat > conftest.$ac_ext <<EOF
3493 #line 3494 "configure"
3494 #include "confdefs.h"
3495 #include <libintl.h>
3496 int main() {
3497 return (int) gettext ("")
3498 ; return 0; }
3500 if { (eval echo configure:3501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3501 rm -rf conftest*
3502 gt_cv_func_gettext_libc=yes
3503 else
3504 echo "configure: failed program was:" >&5
3505 cat conftest.$ac_ext >&5
3506 rm -rf conftest*
3507 gt_cv_func_gettext_libc=no
3509 rm -f conftest*
3512 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
3514 if test "$gt_cv_func_gettext_libc" != "yes"; then
3515 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
3516 echo "configure:3517: checking for bindtextdomain in -lintl" >&5
3517 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3518 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3519 echo $ac_n "(cached) $ac_c" 1>&6
3520 else
3521 ac_save_LIBS="$LIBS"
3522 LIBS="-lintl $LIBS"
3523 cat > conftest.$ac_ext <<EOF
3524 #line 3525 "configure"
3525 #include "confdefs.h"
3526 /* Override any gcc2 internal prototype to avoid an error. */
3527 /* We use char because int might match the return type of a gcc2
3528 builtin and then its argument prototype would still apply. */
3529 char bindtextdomain();
3531 int main() {
3532 bindtextdomain()
3533 ; return 0; }
3535 if { (eval echo configure:3536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3536 rm -rf conftest*
3537 eval "ac_cv_lib_$ac_lib_var=yes"
3538 else
3539 echo "configure: failed program was:" >&5
3540 cat conftest.$ac_ext >&5
3541 rm -rf conftest*
3542 eval "ac_cv_lib_$ac_lib_var=no"
3544 rm -f conftest*
3545 LIBS="$ac_save_LIBS"
3548 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3549 echo "$ac_t""yes" 1>&6
3550 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
3551 echo "configure:3552: checking for gettext in libintl" >&5
3552 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
3553 echo $ac_n "(cached) $ac_c" 1>&6
3554 else
3555 cat > conftest.$ac_ext <<EOF
3556 #line 3557 "configure"
3557 #include "confdefs.h"
3559 int main() {
3560 return (int) gettext ("")
3561 ; return 0; }
3563 if { (eval echo configure:3564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3564 rm -rf conftest*
3565 gt_cv_func_gettext_libintl=yes
3566 else
3567 echo "configure: failed program was:" >&5
3568 cat conftest.$ac_ext >&5
3569 rm -rf conftest*
3570 gt_cv_func_gettext_libintl=no
3572 rm -f conftest*
3575 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
3576 else
3577 echo "$ac_t""no" 1>&6
3582 if test "$gt_cv_func_gettext_libc" = "yes" \
3583 || test "$gt_cv_func_gettext_libintl" = "yes"; then
3584 cat >> confdefs.h <<\EOF
3585 #define HAVE_GETTEXT 1
3588 # Extract the first word of "msgfmt", so it can be a program name with args.
3589 set dummy msgfmt; ac_word=$2
3590 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3591 echo "configure:3592: checking for $ac_word" >&5
3592 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3593 echo $ac_n "(cached) $ac_c" 1>&6
3594 else
3595 case "$MSGFMT" in
3597 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3600 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3601 for ac_dir in $PATH; do
3602 test -z "$ac_dir" && ac_dir=.
3603 if test -f $ac_dir/$ac_word; then
3604 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3605 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3606 break
3609 done
3610 IFS="$ac_save_ifs"
3611 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
3613 esac
3615 MSGFMT="$ac_cv_path_MSGFMT"
3616 if test -n "$MSGFMT"; then
3617 echo "$ac_t""$MSGFMT" 1>&6
3618 else
3619 echo "$ac_t""no" 1>&6
3621 if test "$MSGFMT" != "no"; then
3622 for ac_func in dcgettext
3624 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3625 echo "configure:3626: checking for $ac_func" >&5
3626 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3627 echo $ac_n "(cached) $ac_c" 1>&6
3628 else
3629 cat > conftest.$ac_ext <<EOF
3630 #line 3631 "configure"
3631 #include "confdefs.h"
3632 /* System header to define __stub macros and hopefully few prototypes,
3633 which can conflict with char $ac_func(); below. */
3634 #include <assert.h>
3635 /* Override any gcc2 internal prototype to avoid an error. */
3636 /* We use char because int might match the return type of a gcc2
3637 builtin and then its argument prototype would still apply. */
3638 char $ac_func();
3640 int main() {
3642 /* The GNU C library defines this for functions which it implements
3643 to always fail with ENOSYS. Some functions are actually named
3644 something starting with __ and the normal name is an alias. */
3645 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3646 choke me
3647 #else
3648 $ac_func();
3649 #endif
3651 ; return 0; }
3653 if { (eval echo configure:3654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3654 rm -rf conftest*
3655 eval "ac_cv_func_$ac_func=yes"
3656 else
3657 echo "configure: failed program was:" >&5
3658 cat conftest.$ac_ext >&5
3659 rm -rf conftest*
3660 eval "ac_cv_func_$ac_func=no"
3662 rm -f conftest*
3665 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3666 echo "$ac_t""yes" 1>&6
3667 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3668 cat >> confdefs.h <<EOF
3669 #define $ac_tr_func 1
3672 else
3673 echo "$ac_t""no" 1>&6
3675 done
3677 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3678 set dummy gmsgfmt; ac_word=$2
3679 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3680 echo "configure:3681: checking for $ac_word" >&5
3681 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3682 echo $ac_n "(cached) $ac_c" 1>&6
3683 else
3684 case "$GMSGFMT" in
3686 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3688 ?:/*)
3689 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3692 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3693 ac_dummy="$PATH"
3694 for ac_dir in $ac_dummy; do
3695 test -z "$ac_dir" && ac_dir=.
3696 if test -f $ac_dir/$ac_word; then
3697 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3698 break
3700 done
3701 IFS="$ac_save_ifs"
3702 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3704 esac
3706 GMSGFMT="$ac_cv_path_GMSGFMT"
3707 if test -n "$GMSGFMT"; then
3708 echo "$ac_t""$GMSGFMT" 1>&6
3709 else
3710 echo "$ac_t""no" 1>&6
3713 # Extract the first word of "xgettext", so it can be a program name with args.
3714 set dummy xgettext; ac_word=$2
3715 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3716 echo "configure:3717: checking for $ac_word" >&5
3717 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3718 echo $ac_n "(cached) $ac_c" 1>&6
3719 else
3720 case "$XGETTEXT" in
3722 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3725 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3726 for ac_dir in $PATH; do
3727 test -z "$ac_dir" && ac_dir=.
3728 if test -f $ac_dir/$ac_word; then
3729 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3730 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3731 break
3734 done
3735 IFS="$ac_save_ifs"
3736 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3738 esac
3740 XGETTEXT="$ac_cv_path_XGETTEXT"
3741 if test -n "$XGETTEXT"; then
3742 echo "$ac_t""$XGETTEXT" 1>&6
3743 else
3744 echo "$ac_t""no" 1>&6
3747 cat > conftest.$ac_ext <<EOF
3748 #line 3749 "configure"
3749 #include "confdefs.h"
3751 int main() {
3752 extern int _nl_msg_cat_cntr;
3753 return _nl_msg_cat_cntr
3754 ; return 0; }
3756 if { (eval echo configure:3757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3757 rm -rf conftest*
3758 CATOBJEXT=.gmo
3759 DATADIRNAME=share
3760 else
3761 echo "configure: failed program was:" >&5
3762 cat conftest.$ac_ext >&5
3763 rm -rf conftest*
3764 CATOBJEXT=.mo
3765 DATADIRNAME=lib
3767 rm -f conftest*
3768 INSTOBJEXT=.mo
3772 else
3773 echo "$ac_t""no" 1>&6
3778 if test "$CATOBJEXT" = "NONE"; then
3779 nls_cv_use_gnu_gettext=yes
3783 if test "$nls_cv_use_gnu_gettext" = "yes"; then
3784 INTLOBJS="\$(GETTOBJS)"
3785 # Extract the first word of "msgfmt", so it can be a program name with args.
3786 set dummy msgfmt; ac_word=$2
3787 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3788 echo "configure:3789: checking for $ac_word" >&5
3789 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3790 echo $ac_n "(cached) $ac_c" 1>&6
3791 else
3792 case "$MSGFMT" in
3794 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3797 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3798 for ac_dir in $PATH; do
3799 test -z "$ac_dir" && ac_dir=.
3800 if test -f $ac_dir/$ac_word; then
3801 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3802 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3803 break
3806 done
3807 IFS="$ac_save_ifs"
3808 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
3810 esac
3812 MSGFMT="$ac_cv_path_MSGFMT"
3813 if test -n "$MSGFMT"; then
3814 echo "$ac_t""$MSGFMT" 1>&6
3815 else
3816 echo "$ac_t""no" 1>&6
3819 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3820 set dummy gmsgfmt; ac_word=$2
3821 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3822 echo "configure:3823: checking for $ac_word" >&5
3823 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3824 echo $ac_n "(cached) $ac_c" 1>&6
3825 else
3826 case "$GMSGFMT" in
3828 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3830 ?:/*)
3831 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3834 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3835 ac_dummy="$PATH"
3836 for ac_dir in $ac_dummy; do
3837 test -z "$ac_dir" && ac_dir=.
3838 if test -f $ac_dir/$ac_word; then
3839 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3840 break
3842 done
3843 IFS="$ac_save_ifs"
3844 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3846 esac
3848 GMSGFMT="$ac_cv_path_GMSGFMT"
3849 if test -n "$GMSGFMT"; then
3850 echo "$ac_t""$GMSGFMT" 1>&6
3851 else
3852 echo "$ac_t""no" 1>&6
3855 # Extract the first word of "xgettext", so it can be a program name with args.
3856 set dummy xgettext; ac_word=$2
3857 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3858 echo "configure:3859: checking for $ac_word" >&5
3859 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3860 echo $ac_n "(cached) $ac_c" 1>&6
3861 else
3862 case "$XGETTEXT" in
3864 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3867 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3868 for ac_dir in $PATH; do
3869 test -z "$ac_dir" && ac_dir=.
3870 if test -f $ac_dir/$ac_word; then
3871 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3872 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3873 break
3876 done
3877 IFS="$ac_save_ifs"
3878 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3880 esac
3882 XGETTEXT="$ac_cv_path_XGETTEXT"
3883 if test -n "$XGETTEXT"; then
3884 echo "$ac_t""$XGETTEXT" 1>&6
3885 else
3886 echo "$ac_t""no" 1>&6
3890 USE_INCLUDED_LIBINTL=yes
3891 CATOBJEXT=.gmo
3892 INSTOBJEXT=.mo
3893 DATADIRNAME=share
3894 INTLDEPS='$(top_builddir)/../intl/libintl.a'
3895 INTLLIBS=$INTLDEPS
3896 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
3897 nls_cv_header_intl=libintl.h
3898 nls_cv_header_libgt=libgettext.h
3901 if test "$XGETTEXT" != ":"; then
3902 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3904 else
3905 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
3906 XGETTEXT=":"
3910 # We need to process the po/ directory.
3911 POSUB=po
3912 else
3913 DATADIRNAME=share
3914 nls_cv_header_intl=libintl.h
3915 nls_cv_header_libgt=libgettext.h
3918 # If this is used in GNU gettext we have to set USE_NLS to `yes'
3919 # because some of the sources are only built for this goal.
3920 if test "$PACKAGE" = gettext; then
3921 USE_NLS=yes
3922 USE_INCLUDED_LIBINTL=yes
3925 for lang in $ALL_LINGUAS; do
3926 GMOFILES="$GMOFILES $lang.gmo"
3927 POFILES="$POFILES $lang.po"
3928 done
3943 if test "x$CATOBJEXT" != "x"; then
3944 if test "x$ALL_LINGUAS" = "x"; then
3945 LINGUAS=
3946 else
3947 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
3948 echo "configure:3949: checking for catalogs to be installed" >&5
3949 NEW_LINGUAS=
3950 for lang in ${LINGUAS=$ALL_LINGUAS}; do
3951 case "$ALL_LINGUAS" in
3952 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3953 esac
3954 done
3955 LINGUAS=$NEW_LINGUAS
3956 echo "$ac_t""$LINGUAS" 1>&6
3959 if test -n "$LINGUAS"; then
3960 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3964 if test $ac_cv_header_locale_h = yes; then
3965 INCLUDE_LOCALE_H="#include <locale.h>"
3966 else
3967 INCLUDE_LOCALE_H="\
3968 /* The system does not provide the header <locale.h>. Take care yourself. */"
3972 if test -f $srcdir/po2tbl.sed.in; then
3973 if test "$CATOBJEXT" = ".cat"; then
3974 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
3975 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
3976 echo "configure:3977: checking for linux/version.h" >&5
3977 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3978 echo $ac_n "(cached) $ac_c" 1>&6
3979 else
3980 cat > conftest.$ac_ext <<EOF
3981 #line 3982 "configure"
3982 #include "confdefs.h"
3983 #include <linux/version.h>
3985 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3986 { (eval echo configure:3987: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3987 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3988 if test -z "$ac_err"; then
3989 rm -rf conftest*
3990 eval "ac_cv_header_$ac_safe=yes"
3991 else
3992 echo "$ac_err" >&5
3993 echo "configure: failed program was:" >&5
3994 cat conftest.$ac_ext >&5
3995 rm -rf conftest*
3996 eval "ac_cv_header_$ac_safe=no"
3998 rm -f conftest*
4000 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4001 echo "$ac_t""yes" 1>&6
4002 msgformat=linux
4003 else
4004 echo "$ac_t""no" 1>&6
4005 msgformat=xopen
4009 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
4011 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
4012 $srcdir/po2tbl.sed.in > po2tbl.sed
4015 if test "$PACKAGE" = "gettext"; then
4016 GT_NO="#NO#"
4017 GT_YES=
4018 else
4019 GT_NO=
4020 GT_YES="#YES#"
4025 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
4031 if test -d $srcdir/po; then
4032 test -d po || mkdir po
4033 if test "x$srcdir" != "x."; then
4034 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
4035 posrcprefix="$srcdir/"
4036 else
4037 posrcprefix="../$srcdir/"
4039 else
4040 posrcprefix="../"
4042 rm -f po/POTFILES
4043 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4044 < $srcdir/po/POTFILES.in > po/POTFILES
4048 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
4049 echo "configure:4050: checking whether to enable maintainer-specific portions of Makefiles" >&5
4050 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
4051 if test "${enable_maintainer_mode+set}" = set; then
4052 enableval="$enable_maintainer_mode"
4053 USE_MAINTAINER_MODE=$enableval
4054 else
4055 USE_MAINTAINER_MODE=no
4058 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
4061 if test $USE_MAINTAINER_MODE = yes; then
4062 MAINTAINER_MODE_TRUE=
4063 MAINTAINER_MODE_FALSE='#'
4064 else
4065 MAINTAINER_MODE_TRUE='#'
4066 MAINTAINER_MODE_FALSE=
4068 MAINT=$MAINTAINER_MODE_TRUE
4071 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
4072 echo "configure:4073: checking for Cygwin environment" >&5
4073 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
4074 echo $ac_n "(cached) $ac_c" 1>&6
4075 else
4076 cat > conftest.$ac_ext <<EOF
4077 #line 4078 "configure"
4078 #include "confdefs.h"
4080 int main() {
4082 #ifndef __CYGWIN__
4083 #define __CYGWIN__ __CYGWIN32__
4084 #endif
4085 return __CYGWIN__;
4086 ; return 0; }
4088 if { (eval echo configure:4089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4089 rm -rf conftest*
4090 ac_cv_cygwin=yes
4091 else
4092 echo "configure: failed program was:" >&5
4093 cat conftest.$ac_ext >&5
4094 rm -rf conftest*
4095 ac_cv_cygwin=no
4097 rm -f conftest*
4098 rm -f conftest*
4101 echo "$ac_t""$ac_cv_cygwin" 1>&6
4102 CYGWIN=
4103 test "$ac_cv_cygwin" = yes && CYGWIN=yes
4104 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
4105 echo "configure:4106: checking for mingw32 environment" >&5
4106 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
4107 echo $ac_n "(cached) $ac_c" 1>&6
4108 else
4109 cat > conftest.$ac_ext <<EOF
4110 #line 4111 "configure"
4111 #include "confdefs.h"
4113 int main() {
4114 return __MINGW32__;
4115 ; return 0; }
4117 if { (eval echo configure:4118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4118 rm -rf conftest*
4119 ac_cv_mingw32=yes
4120 else
4121 echo "configure: failed program was:" >&5
4122 cat conftest.$ac_ext >&5
4123 rm -rf conftest*
4124 ac_cv_mingw32=no
4126 rm -f conftest*
4127 rm -f conftest*
4130 echo "$ac_t""$ac_cv_mingw32" 1>&6
4131 MINGW32=
4132 test "$ac_cv_mingw32" = yes && MINGW32=yes
4135 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4136 echo "configure:4137: checking for executable suffix" >&5
4137 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
4138 echo $ac_n "(cached) $ac_c" 1>&6
4139 else
4140 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
4141 ac_cv_exeext=.exe
4142 else
4143 rm -f conftest*
4144 echo 'int main () { return 0; }' > conftest.$ac_ext
4145 ac_cv_exeext=
4146 if { (eval echo configure:4147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4147 for file in conftest.*; do
4148 case $file in
4149 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
4150 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4151 esac
4152 done
4153 else
4154 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4156 rm -f conftest*
4157 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4161 EXEEXT=""
4162 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4163 echo "$ac_t""${ac_cv_exeext}" 1>&6
4164 ac_exeext=$EXEEXT
4167 # host-specific stuff:
4169 HDEFINES=
4171 . ${srcdir}/../bfd/configure.host
4174 AR=${AR-ar}
4176 # Extract the first word of "ranlib", so it can be a program name with args.
4177 set dummy ranlib; ac_word=$2
4178 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4179 echo "configure:4180: checking for $ac_word" >&5
4180 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
4181 echo $ac_n "(cached) $ac_c" 1>&6
4182 else
4183 if test -n "$RANLIB"; then
4184 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4185 else
4186 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4187 ac_dummy="$PATH"
4188 for ac_dir in $ac_dummy; do
4189 test -z "$ac_dir" && ac_dir=.
4190 if test -f $ac_dir/$ac_word; then
4191 ac_cv_prog_RANLIB="ranlib"
4192 break
4194 done
4195 IFS="$ac_save_ifs"
4196 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4199 RANLIB="$ac_cv_prog_RANLIB"
4200 if test -n "$RANLIB"; then
4201 echo "$ac_t""$RANLIB" 1>&6
4202 else
4203 echo "$ac_t""no" 1>&6
4206 # Find a good install program. We prefer a C program (faster),
4207 # so one script is as good as another. But avoid the broken or
4208 # incompatible versions:
4209 # SysV /etc/install, /usr/sbin/install
4210 # SunOS /usr/etc/install
4211 # IRIX /sbin/install
4212 # AIX /bin/install
4213 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4214 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4215 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4216 # ./install, which can be erroneously created by make from ./install.sh.
4217 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
4218 echo "configure:4219: checking for a BSD compatible install" >&5
4219 if test -z "$INSTALL"; then
4220 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
4221 echo $ac_n "(cached) $ac_c" 1>&6
4222 else
4223 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
4224 for ac_dir in $PATH; do
4225 # Account for people who put trailing slashes in PATH elements.
4226 case "$ac_dir/" in
4227 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
4229 # OSF1 and SCO ODT 3.0 have their own names for install.
4230 # Don't use installbsd from OSF since it installs stuff as root
4231 # by default.
4232 for ac_prog in ginstall scoinst install; do
4233 if test -f $ac_dir/$ac_prog; then
4234 if test $ac_prog = install &&
4235 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
4236 # AIX install. It has an incompatible calling convention.
4238 else
4239 ac_cv_path_install="$ac_dir/$ac_prog -c"
4240 break 2
4243 done
4245 esac
4246 done
4247 IFS="$ac_save_IFS"
4250 if test "${ac_cv_path_install+set}" = set; then
4251 INSTALL="$ac_cv_path_install"
4252 else
4253 # As a last resort, use the slow shell script. We don't cache a
4254 # path for INSTALL within a source directory, because that will
4255 # break other packages using the cache if that directory is
4256 # removed, or if the path is relative.
4257 INSTALL="$ac_install_sh"
4260 echo "$ac_t""$INSTALL" 1>&6
4262 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4263 # It thinks the first close brace ends the variable substitution.
4264 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4266 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
4268 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4271 # Put a plausible default for CC_FOR_BUILD in Makefile.
4272 if test -z "$CC_FOR_BUILD"; then
4273 if test "x$cross_compiling" = "xno"; then
4274 CC_FOR_BUILD='$(CC)'
4275 else
4276 CC_FOR_BUILD=gcc
4280 # Also set EXEEXT_FOR_BUILD.
4281 if test "x$cross_compiling" = "xno"; then
4282 EXEEXT_FOR_BUILD='$(EXEEXT)'
4283 else
4284 echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
4285 echo "configure:4286: checking for build system executable suffix" >&5
4286 if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
4287 echo $ac_n "(cached) $ac_c" 1>&6
4288 else
4289 cat > ac_c_test.c << 'EOF'
4290 int main() {
4291 /* Nothing needed here */
4294 ${CC_FOR_BUILD} -o ac_c_test am_c_test.c 1>&5 2>&5
4295 bfd_cv_build_exeext=`echo ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//`
4296 rm -f ac_c_test*
4297 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
4300 echo "$ac_t""$bfd_cv_build_exeext" 1>&6
4301 EXEEXT_FOR_BUILD=""
4302 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
4306 for ac_hdr in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h
4308 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4309 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4310 echo "configure:4311: checking for $ac_hdr" >&5
4311 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4312 echo $ac_n "(cached) $ac_c" 1>&6
4313 else
4314 cat > conftest.$ac_ext <<EOF
4315 #line 4316 "configure"
4316 #include "confdefs.h"
4317 #include <$ac_hdr>
4319 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4320 { (eval echo configure:4321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4321 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4322 if test -z "$ac_err"; then
4323 rm -rf conftest*
4324 eval "ac_cv_header_$ac_safe=yes"
4325 else
4326 echo "$ac_err" >&5
4327 echo "configure: failed program was:" >&5
4328 cat conftest.$ac_ext >&5
4329 rm -rf conftest*
4330 eval "ac_cv_header_$ac_safe=no"
4332 rm -f conftest*
4334 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4335 echo "$ac_t""yes" 1>&6
4336 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4337 cat >> confdefs.h <<EOF
4338 #define $ac_tr_hdr 1
4341 else
4342 echo "$ac_t""no" 1>&6
4344 done
4346 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4347 echo "configure:4348: checking for sys/wait.h that is POSIX.1 compatible" >&5
4348 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
4349 echo $ac_n "(cached) $ac_c" 1>&6
4350 else
4351 cat > conftest.$ac_ext <<EOF
4352 #line 4353 "configure"
4353 #include "confdefs.h"
4354 #include <sys/types.h>
4355 #include <sys/wait.h>
4356 #ifndef WEXITSTATUS
4357 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4358 #endif
4359 #ifndef WIFEXITED
4360 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4361 #endif
4362 int main() {
4363 int s;
4364 wait (&s);
4365 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4366 ; return 0; }
4368 if { (eval echo configure:4369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4369 rm -rf conftest*
4370 ac_cv_header_sys_wait_h=yes
4371 else
4372 echo "configure: failed program was:" >&5
4373 cat conftest.$ac_ext >&5
4374 rm -rf conftest*
4375 ac_cv_header_sys_wait_h=no
4377 rm -f conftest*
4380 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4381 if test $ac_cv_header_sys_wait_h = yes; then
4382 cat >> confdefs.h <<\EOF
4383 #define HAVE_SYS_WAIT_H 1
4388 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4389 # for constant arguments. Useless!
4390 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4391 echo "configure:4392: checking for working alloca.h" >&5
4392 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4393 echo $ac_n "(cached) $ac_c" 1>&6
4394 else
4395 cat > conftest.$ac_ext <<EOF
4396 #line 4397 "configure"
4397 #include "confdefs.h"
4398 #include <alloca.h>
4399 int main() {
4400 char *p = alloca(2 * sizeof(int));
4401 ; return 0; }
4403 if { (eval echo configure:4404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4404 rm -rf conftest*
4405 ac_cv_header_alloca_h=yes
4406 else
4407 echo "configure: failed program was:" >&5
4408 cat conftest.$ac_ext >&5
4409 rm -rf conftest*
4410 ac_cv_header_alloca_h=no
4412 rm -f conftest*
4415 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4416 if test $ac_cv_header_alloca_h = yes; then
4417 cat >> confdefs.h <<\EOF
4418 #define HAVE_ALLOCA_H 1
4423 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4424 echo "configure:4425: checking for alloca" >&5
4425 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4426 echo $ac_n "(cached) $ac_c" 1>&6
4427 else
4428 cat > conftest.$ac_ext <<EOF
4429 #line 4430 "configure"
4430 #include "confdefs.h"
4432 #ifdef __GNUC__
4433 # define alloca __builtin_alloca
4434 #else
4435 # ifdef _MSC_VER
4436 # include <malloc.h>
4437 # define alloca _alloca
4438 # else
4439 # if HAVE_ALLOCA_H
4440 # include <alloca.h>
4441 # else
4442 # ifdef _AIX
4443 #pragma alloca
4444 # else
4445 # ifndef alloca /* predefined by HP cc +Olibcalls */
4446 char *alloca ();
4447 # endif
4448 # endif
4449 # endif
4450 # endif
4451 #endif
4453 int main() {
4454 char *p = (char *) alloca(1);
4455 ; return 0; }
4457 if { (eval echo configure:4458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4458 rm -rf conftest*
4459 ac_cv_func_alloca_works=yes
4460 else
4461 echo "configure: failed program was:" >&5
4462 cat conftest.$ac_ext >&5
4463 rm -rf conftest*
4464 ac_cv_func_alloca_works=no
4466 rm -f conftest*
4469 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4470 if test $ac_cv_func_alloca_works = yes; then
4471 cat >> confdefs.h <<\EOF
4472 #define HAVE_ALLOCA 1
4477 if test $ac_cv_func_alloca_works = no; then
4478 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4479 # that cause trouble. Some versions do not even contain alloca or
4480 # contain a buggy version. If you still want to use their alloca,
4481 # use ar to extract alloca.o from them instead of compiling alloca.c.
4482 ALLOCA=alloca.${ac_objext}
4483 cat >> confdefs.h <<\EOF
4484 #define C_ALLOCA 1
4488 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4489 echo "configure:4490: checking whether alloca needs Cray hooks" >&5
4490 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4491 echo $ac_n "(cached) $ac_c" 1>&6
4492 else
4493 cat > conftest.$ac_ext <<EOF
4494 #line 4495 "configure"
4495 #include "confdefs.h"
4496 #if defined(CRAY) && ! defined(CRAY2)
4497 webecray
4498 #else
4499 wenotbecray
4500 #endif
4503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4504 egrep "webecray" >/dev/null 2>&1; then
4505 rm -rf conftest*
4506 ac_cv_os_cray=yes
4507 else
4508 rm -rf conftest*
4509 ac_cv_os_cray=no
4511 rm -f conftest*
4515 echo "$ac_t""$ac_cv_os_cray" 1>&6
4516 if test $ac_cv_os_cray = yes; then
4517 for ac_func in _getb67 GETB67 getb67; do
4518 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4519 echo "configure:4520: checking for $ac_func" >&5
4520 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4521 echo $ac_n "(cached) $ac_c" 1>&6
4522 else
4523 cat > conftest.$ac_ext <<EOF
4524 #line 4525 "configure"
4525 #include "confdefs.h"
4526 /* System header to define __stub macros and hopefully few prototypes,
4527 which can conflict with char $ac_func(); below. */
4528 #include <assert.h>
4529 /* Override any gcc2 internal prototype to avoid an error. */
4530 /* We use char because int might match the return type of a gcc2
4531 builtin and then its argument prototype would still apply. */
4532 char $ac_func();
4534 int main() {
4536 /* The GNU C library defines this for functions which it implements
4537 to always fail with ENOSYS. Some functions are actually named
4538 something starting with __ and the normal name is an alias. */
4539 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4540 choke me
4541 #else
4542 $ac_func();
4543 #endif
4545 ; return 0; }
4547 if { (eval echo configure:4548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4548 rm -rf conftest*
4549 eval "ac_cv_func_$ac_func=yes"
4550 else
4551 echo "configure: failed program was:" >&5
4552 cat conftest.$ac_ext >&5
4553 rm -rf conftest*
4554 eval "ac_cv_func_$ac_func=no"
4556 rm -f conftest*
4559 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4560 echo "$ac_t""yes" 1>&6
4561 cat >> confdefs.h <<EOF
4562 #define CRAY_STACKSEG_END $ac_func
4565 break
4566 else
4567 echo "$ac_t""no" 1>&6
4570 done
4573 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4574 echo "configure:4575: checking stack direction for C alloca" >&5
4575 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4576 echo $ac_n "(cached) $ac_c" 1>&6
4577 else
4578 if test "$cross_compiling" = yes; then
4579 ac_cv_c_stack_direction=0
4580 else
4581 cat > conftest.$ac_ext <<EOF
4582 #line 4583 "configure"
4583 #include "confdefs.h"
4584 find_stack_direction ()
4586 static char *addr = 0;
4587 auto char dummy;
4588 if (addr == 0)
4590 addr = &dummy;
4591 return find_stack_direction ();
4593 else
4594 return (&dummy > addr) ? 1 : -1;
4596 main ()
4598 exit (find_stack_direction() < 0);
4601 if { (eval echo configure:4602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4602 then
4603 ac_cv_c_stack_direction=1
4604 else
4605 echo "configure: failed program was:" >&5
4606 cat conftest.$ac_ext >&5
4607 rm -fr conftest*
4608 ac_cv_c_stack_direction=-1
4610 rm -fr conftest*
4615 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4616 cat >> confdefs.h <<EOF
4617 #define STACK_DIRECTION $ac_cv_c_stack_direction
4622 for ac_func in sbrk utimes
4624 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4625 echo "configure:4626: checking for $ac_func" >&5
4626 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4627 echo $ac_n "(cached) $ac_c" 1>&6
4628 else
4629 cat > conftest.$ac_ext <<EOF
4630 #line 4631 "configure"
4631 #include "confdefs.h"
4632 /* System header to define __stub macros and hopefully few prototypes,
4633 which can conflict with char $ac_func(); below. */
4634 #include <assert.h>
4635 /* Override any gcc2 internal prototype to avoid an error. */
4636 /* We use char because int might match the return type of a gcc2
4637 builtin and then its argument prototype would still apply. */
4638 char $ac_func();
4640 int main() {
4642 /* The GNU C library defines this for functions which it implements
4643 to always fail with ENOSYS. Some functions are actually named
4644 something starting with __ and the normal name is an alias. */
4645 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4646 choke me
4647 #else
4648 $ac_func();
4649 #endif
4651 ; return 0; }
4653 if { (eval echo configure:4654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4654 rm -rf conftest*
4655 eval "ac_cv_func_$ac_func=yes"
4656 else
4657 echo "configure: failed program was:" >&5
4658 cat conftest.$ac_ext >&5
4659 rm -rf conftest*
4660 eval "ac_cv_func_$ac_func=no"
4662 rm -f conftest*
4665 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4666 echo "$ac_t""yes" 1>&6
4667 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4668 cat >> confdefs.h <<EOF
4669 #define $ac_tr_func 1
4672 else
4673 echo "$ac_t""no" 1>&6
4675 done
4678 echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
4679 echo "configure:4680: checking for time_t in time.h" >&5
4680 if eval "test \"`echo '$''{'bu_cv_decl_time_t_time_h'+set}'`\" = set"; then
4681 echo $ac_n "(cached) $ac_c" 1>&6
4682 else
4683 cat > conftest.$ac_ext <<EOF
4684 #line 4685 "configure"
4685 #include "confdefs.h"
4686 #include <time.h>
4687 int main() {
4688 time_t i;
4689 ; return 0; }
4691 if { (eval echo configure:4692: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4692 rm -rf conftest*
4693 bu_cv_decl_time_t_time_h=yes
4694 else
4695 echo "configure: failed program was:" >&5
4696 cat conftest.$ac_ext >&5
4697 rm -rf conftest*
4698 bu_cv_decl_time_t_time_h=no
4700 rm -f conftest*
4703 echo "$ac_t""$bu_cv_decl_time_t_time_h" 1>&6
4704 if test $bu_cv_decl_time_t_time_h = yes; then
4705 cat >> confdefs.h <<\EOF
4706 #define HAVE_TIME_T_IN_TIME_H 1
4711 echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6
4712 echo "configure:4713: checking for time_t in sys/types.h" >&5
4713 if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then
4714 echo $ac_n "(cached) $ac_c" 1>&6
4715 else
4716 cat > conftest.$ac_ext <<EOF
4717 #line 4718 "configure"
4718 #include "confdefs.h"
4719 #include <sys/types.h>
4720 int main() {
4721 time_t i;
4722 ; return 0; }
4724 if { (eval echo configure:4725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4725 rm -rf conftest*
4726 bu_cv_decl_time_t_types_h=yes
4727 else
4728 echo "configure: failed program was:" >&5
4729 cat conftest.$ac_ext >&5
4730 rm -rf conftest*
4731 bu_cv_decl_time_t_types_h=no
4733 rm -f conftest*
4736 echo "$ac_t""$bu_cv_decl_time_t_types_h" 1>&6
4737 if test $bu_cv_decl_time_t_types_h = yes; then
4738 cat >> confdefs.h <<\EOF
4739 #define HAVE_TIME_T_IN_TYPES_H 1
4744 # Under Next 3.2 <utime.h> apparently does not define struct utimbuf
4745 # by default.
4746 echo $ac_n "checking for utime.h""... $ac_c" 1>&6
4747 echo "configure:4748: checking for utime.h" >&5
4748 if eval "test \"`echo '$''{'bu_cv_header_utime_h'+set}'`\" = set"; then
4749 echo $ac_n "(cached) $ac_c" 1>&6
4750 else
4751 cat > conftest.$ac_ext <<EOF
4752 #line 4753 "configure"
4753 #include "confdefs.h"
4754 #include <sys/types.h>
4755 #ifdef HAVE_TIME_H
4756 #include <time.h>
4757 #endif
4758 #include <utime.h>
4759 int main() {
4760 struct utimbuf s;
4761 ; return 0; }
4763 if { (eval echo configure:4764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4764 rm -rf conftest*
4765 bu_cv_header_utime_h=yes
4766 else
4767 echo "configure: failed program was:" >&5
4768 cat conftest.$ac_ext >&5
4769 rm -rf conftest*
4770 bu_cv_header_utime_h=no
4772 rm -f conftest*
4775 echo "$ac_t""$bu_cv_header_utime_h" 1>&6
4776 if test $bu_cv_header_utime_h = yes; then
4777 cat >> confdefs.h <<\EOF
4778 #define HAVE_GOOD_UTIME_H 1
4783 echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6
4784 echo "configure:4785: checking whether fprintf must be declared" >&5
4785 if eval "test \"`echo '$''{'bfd_cv_decl_needed_fprintf'+set}'`\" = set"; then
4786 echo $ac_n "(cached) $ac_c" 1>&6
4787 else
4788 cat > conftest.$ac_ext <<EOF
4789 #line 4790 "configure"
4790 #include "confdefs.h"
4792 #include <stdio.h>
4793 #ifdef HAVE_STRING_H
4794 #include <string.h>
4795 #else
4796 #ifdef HAVE_STRINGS_H
4797 #include <strings.h>
4798 #endif
4799 #endif
4800 #ifdef HAVE_STDLIB_H
4801 #include <stdlib.h>
4802 #endif
4803 #ifdef HAVE_UNISTD_H
4804 #include <unistd.h>
4805 #endif
4806 int main() {
4807 char *(*pfn) = (char *(*)) fprintf
4808 ; return 0; }
4810 if { (eval echo configure:4811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4811 rm -rf conftest*
4812 bfd_cv_decl_needed_fprintf=no
4813 else
4814 echo "configure: failed program was:" >&5
4815 cat conftest.$ac_ext >&5
4816 rm -rf conftest*
4817 bfd_cv_decl_needed_fprintf=yes
4819 rm -f conftest*
4822 echo "$ac_t""$bfd_cv_decl_needed_fprintf" 1>&6
4823 if test $bfd_cv_decl_needed_fprintf = yes; then
4824 cat >> confdefs.h <<\EOF
4825 #define NEED_DECLARATION_FPRINTF 1
4830 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
4831 echo "configure:4832: checking whether strstr must be declared" >&5
4832 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
4833 echo $ac_n "(cached) $ac_c" 1>&6
4834 else
4835 cat > conftest.$ac_ext <<EOF
4836 #line 4837 "configure"
4837 #include "confdefs.h"
4839 #include <stdio.h>
4840 #ifdef HAVE_STRING_H
4841 #include <string.h>
4842 #else
4843 #ifdef HAVE_STRINGS_H
4844 #include <strings.h>
4845 #endif
4846 #endif
4847 #ifdef HAVE_STDLIB_H
4848 #include <stdlib.h>
4849 #endif
4850 #ifdef HAVE_UNISTD_H
4851 #include <unistd.h>
4852 #endif
4853 int main() {
4854 char *(*pfn) = (char *(*)) strstr
4855 ; return 0; }
4857 if { (eval echo configure:4858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4858 rm -rf conftest*
4859 bfd_cv_decl_needed_strstr=no
4860 else
4861 echo "configure: failed program was:" >&5
4862 cat conftest.$ac_ext >&5
4863 rm -rf conftest*
4864 bfd_cv_decl_needed_strstr=yes
4866 rm -f conftest*
4869 echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
4870 if test $bfd_cv_decl_needed_strstr = yes; then
4871 cat >> confdefs.h <<\EOF
4872 #define NEED_DECLARATION_STRSTR 1
4877 echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
4878 echo "configure:4879: checking whether sbrk must be declared" >&5
4879 if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
4880 echo $ac_n "(cached) $ac_c" 1>&6
4881 else
4882 cat > conftest.$ac_ext <<EOF
4883 #line 4884 "configure"
4884 #include "confdefs.h"
4886 #include <stdio.h>
4887 #ifdef HAVE_STRING_H
4888 #include <string.h>
4889 #else
4890 #ifdef HAVE_STRINGS_H
4891 #include <strings.h>
4892 #endif
4893 #endif
4894 #ifdef HAVE_STDLIB_H
4895 #include <stdlib.h>
4896 #endif
4897 #ifdef HAVE_UNISTD_H
4898 #include <unistd.h>
4899 #endif
4900 int main() {
4901 char *(*pfn) = (char *(*)) sbrk
4902 ; return 0; }
4904 if { (eval echo configure:4905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4905 rm -rf conftest*
4906 bfd_cv_decl_needed_sbrk=no
4907 else
4908 echo "configure: failed program was:" >&5
4909 cat conftest.$ac_ext >&5
4910 rm -rf conftest*
4911 bfd_cv_decl_needed_sbrk=yes
4913 rm -f conftest*
4916 echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6
4917 if test $bfd_cv_decl_needed_sbrk = yes; then
4918 cat >> confdefs.h <<\EOF
4919 #define NEED_DECLARATION_SBRK 1
4924 echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
4925 echo "configure:4926: checking whether getenv must be declared" >&5
4926 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
4927 echo $ac_n "(cached) $ac_c" 1>&6
4928 else
4929 cat > conftest.$ac_ext <<EOF
4930 #line 4931 "configure"
4931 #include "confdefs.h"
4933 #include <stdio.h>
4934 #ifdef HAVE_STRING_H
4935 #include <string.h>
4936 #else
4937 #ifdef HAVE_STRINGS_H
4938 #include <strings.h>
4939 #endif
4940 #endif
4941 #ifdef HAVE_STDLIB_H
4942 #include <stdlib.h>
4943 #endif
4944 #ifdef HAVE_UNISTD_H
4945 #include <unistd.h>
4946 #endif
4947 int main() {
4948 char *(*pfn) = (char *(*)) getenv
4949 ; return 0; }
4951 if { (eval echo configure:4952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4952 rm -rf conftest*
4953 bfd_cv_decl_needed_getenv=no
4954 else
4955 echo "configure: failed program was:" >&5
4956 cat conftest.$ac_ext >&5
4957 rm -rf conftest*
4958 bfd_cv_decl_needed_getenv=yes
4960 rm -f conftest*
4963 echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
4964 if test $bfd_cv_decl_needed_getenv = yes; then
4965 cat >> confdefs.h <<\EOF
4966 #define NEED_DECLARATION_GETENV 1
4971 echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
4972 echo "configure:4973: checking whether environ must be declared" >&5
4973 if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then
4974 echo $ac_n "(cached) $ac_c" 1>&6
4975 else
4976 cat > conftest.$ac_ext <<EOF
4977 #line 4978 "configure"
4978 #include "confdefs.h"
4980 #include <stdio.h>
4981 #ifdef HAVE_STRING_H
4982 #include <string.h>
4983 #else
4984 #ifdef HAVE_STRINGS_H
4985 #include <strings.h>
4986 #endif
4987 #endif
4988 #ifdef HAVE_STDLIB_H
4989 #include <stdlib.h>
4990 #endif
4991 #ifdef HAVE_UNISTD_H
4992 #include <unistd.h>
4993 #endif
4994 int main() {
4995 char *(*pfn) = (char *(*)) environ
4996 ; return 0; }
4998 if { (eval echo configure:4999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4999 rm -rf conftest*
5000 bfd_cv_decl_needed_environ=no
5001 else
5002 echo "configure: failed program was:" >&5
5003 cat conftest.$ac_ext >&5
5004 rm -rf conftest*
5005 bfd_cv_decl_needed_environ=yes
5007 rm -f conftest*
5010 echo "$ac_t""$bfd_cv_decl_needed_environ" 1>&6
5011 if test $bfd_cv_decl_needed_environ = yes; then
5012 cat >> confdefs.h <<\EOF
5013 #define NEED_DECLARATION_ENVIRON 1
5020 case "${host}" in
5021 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows)
5022 cat >> confdefs.h <<\EOF
5023 #define USE_BINARY_FOPEN 1
5026 esac
5028 # target-specific stuff:
5030 # Canonicalize the secondary target names.
5031 if test -n "$enable_targets"; then
5032 for targ in `echo $enable_targets | sed 's/,/ /g'`
5034 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
5035 if test -n "$result"; then
5036 canon_targets="$canon_targets $result"
5037 else
5038 # Allow targets that config.sub doesn't recognize, like "all".
5039 canon_targets="$canon_targets $targ"
5041 done
5044 all_targets=false
5045 BUILD_NLMCONV=
5046 NLMCONV_DEFS=
5047 BUILD_SRCONV=
5048 BUILD_DLLTOOL=
5049 DLLTOOL_DEFS=
5050 BUILD_WINDRES=
5051 BUILD_DLLWRAP=
5052 BUILD_MISC=
5054 for targ in $target $canon_targets
5056 if test "x$targ" = "xall"; then
5057 all_targets=true
5058 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
5059 BUILD_SRCONV='$(SRCONV_PROG)'
5060 NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
5061 else
5062 case $targ in
5063 i[3456]86*-*-netware*)
5064 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
5065 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386"
5067 alpha*-*-netware*)
5068 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
5069 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_ALPHA"
5071 powerpc*-*-netware*)
5072 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
5073 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_POWERPC"
5075 sparc*-*-netware*)
5076 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
5077 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_SPARC"
5079 esac
5080 case $targ in
5081 *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
5082 esac
5083 case $targ in
5084 arm-*pe*)
5085 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
5086 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
5087 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
5089 thumb-*pe*)
5090 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
5091 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
5092 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
5094 i[3-6]86-*pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*)
5095 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
5096 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
5097 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
5098 BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
5100 powerpc*-*-*pe* | powerpc*-*-cygwin*)
5101 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
5102 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
5103 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
5105 esac
5107 done
5118 cat >> confdefs.h <<EOF
5119 #define TARGET "${target}"
5123 targ=$target
5124 . $srcdir/../bfd/config.bfd
5125 if test "x$targ_underscore" = "xyes"; then
5126 UNDERSCORE=1
5127 else
5128 UNDERSCORE=0
5132 trap '' 1 2 15
5133 cat > confcache <<\EOF
5134 # This file is a shell script that caches the results of configure
5135 # tests run on this system so they can be shared between configure
5136 # scripts and configure runs. It is not useful on other systems.
5137 # If it contains results you don't want to keep, you may remove or edit it.
5139 # By default, configure uses ./config.cache as the cache file,
5140 # creating it if it does not exist already. You can give configure
5141 # the --cache-file=FILE option to use a different cache file; that is
5142 # what configure does when it calls configure scripts in
5143 # subdirectories, so they share the cache.
5144 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5145 # config.status only pays attention to the cache file if you give it the
5146 # --recheck option to rerun configure.
5149 # The following way of writing the cache mishandles newlines in values,
5150 # but we know of no workaround that is simple, portable, and efficient.
5151 # So, don't put newlines in cache variables' values.
5152 # Ultrix sh set writes to stderr and can't be redirected directly,
5153 # and sets the high bit in the cache file unless we assign to the vars.
5154 (set) 2>&1 |
5155 case `(ac_space=' '; set | grep ac_space) 2>&1` in
5156 *ac_space=\ *)
5157 # `set' does not quote correctly, so add quotes (double-quote substitution
5158 # turns \\\\ into \\, and sed turns \\ into \).
5159 sed -n \
5160 -e "s/'/'\\\\''/g" \
5161 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5164 # `set' quotes correctly as required by POSIX, so do not add quotes.
5165 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5167 esac >> confcache
5168 if cmp -s $cache_file confcache; then
5170 else
5171 if test -w $cache_file; then
5172 echo "updating cache $cache_file"
5173 cat confcache > $cache_file
5174 else
5175 echo "not updating unwritable cache $cache_file"
5178 rm -f confcache
5180 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5182 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5183 # Let make expand exec_prefix.
5184 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5186 # Any assignment to VPATH causes Sun make to only execute
5187 # the first set of double-colon rules, so remove it if not needed.
5188 # If there is a colon in the path, we need to keep it.
5189 if test "x$srcdir" = x.; then
5190 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5193 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5195 DEFS=-DHAVE_CONFIG_H
5197 # Without the "./", some shells look in PATH for config.status.
5198 : ${CONFIG_STATUS=./config.status}
5200 echo creating $CONFIG_STATUS
5201 rm -f $CONFIG_STATUS
5202 cat > $CONFIG_STATUS <<EOF
5203 #! /bin/sh
5204 # Generated automatically by configure.
5205 # Run this file to recreate the current configuration.
5206 # This directory was configured as follows,
5207 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5209 # $0 $ac_configure_args
5211 # Compiler output produced by configure, useful for debugging
5212 # configure, is in ./config.log if it exists.
5214 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5215 for ac_option
5217 case "\$ac_option" in
5218 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5219 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5220 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5221 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5222 echo "$CONFIG_STATUS generated by autoconf version 2.13"
5223 exit 0 ;;
5224 -help | --help | --hel | --he | --h)
5225 echo "\$ac_cs_usage"; exit 0 ;;
5226 *) echo "\$ac_cs_usage"; exit 1 ;;
5227 esac
5228 done
5230 ac_given_srcdir=$srcdir
5231 ac_given_INSTALL="$INSTALL"
5233 trap 'rm -fr `echo "Makefile po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5235 cat >> $CONFIG_STATUS <<EOF
5237 # Protect against being on the right side of a sed subst in config.status.
5238 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5239 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5240 $ac_vpsub
5241 $extrasub
5242 s%@SHELL@%$SHELL%g
5243 s%@CFLAGS@%$CFLAGS%g
5244 s%@CPPFLAGS@%$CPPFLAGS%g
5245 s%@CXXFLAGS@%$CXXFLAGS%g
5246 s%@FFLAGS@%$FFLAGS%g
5247 s%@DEFS@%$DEFS%g
5248 s%@LDFLAGS@%$LDFLAGS%g
5249 s%@LIBS@%$LIBS%g
5250 s%@exec_prefix@%$exec_prefix%g
5251 s%@prefix@%$prefix%g
5252 s%@program_transform_name@%$program_transform_name%g
5253 s%@bindir@%$bindir%g
5254 s%@sbindir@%$sbindir%g
5255 s%@libexecdir@%$libexecdir%g
5256 s%@datadir@%$datadir%g
5257 s%@sysconfdir@%$sysconfdir%g
5258 s%@sharedstatedir@%$sharedstatedir%g
5259 s%@localstatedir@%$localstatedir%g
5260 s%@libdir@%$libdir%g
5261 s%@includedir@%$includedir%g
5262 s%@oldincludedir@%$oldincludedir%g
5263 s%@infodir@%$infodir%g
5264 s%@mandir@%$mandir%g
5265 s%@host@%$host%g
5266 s%@host_alias@%$host_alias%g
5267 s%@host_cpu@%$host_cpu%g
5268 s%@host_vendor@%$host_vendor%g
5269 s%@host_os@%$host_os%g
5270 s%@target@%$target%g
5271 s%@target_alias@%$target_alias%g
5272 s%@target_cpu@%$target_cpu%g
5273 s%@target_vendor@%$target_vendor%g
5274 s%@target_os@%$target_os%g
5275 s%@build@%$build%g
5276 s%@build_alias@%$build_alias%g
5277 s%@build_cpu@%$build_cpu%g
5278 s%@build_vendor@%$build_vendor%g
5279 s%@build_os@%$build_os%g
5280 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5281 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5282 s%@INSTALL_DATA@%$INSTALL_DATA%g
5283 s%@PACKAGE@%$PACKAGE%g
5284 s%@VERSION@%$VERSION%g
5285 s%@ACLOCAL@%$ACLOCAL%g
5286 s%@AUTOCONF@%$AUTOCONF%g
5287 s%@AUTOMAKE@%$AUTOMAKE%g
5288 s%@AUTOHEADER@%$AUTOHEADER%g
5289 s%@MAKEINFO@%$MAKEINFO%g
5290 s%@SET_MAKE@%$SET_MAKE%g
5291 s%@RANLIB@%$RANLIB%g
5292 s%@CC@%$CC%g
5293 s%@LD@%$LD%g
5294 s%@NM@%$NM%g
5295 s%@USE_SYMBOL_UNDERSCORE@%$USE_SYMBOL_UNDERSCORE%g
5296 s%@LN_S@%$LN_S%g
5297 s%@DLLTOOL@%$DLLTOOL%g
5298 s%@AS@%$AS%g
5299 s%@LIBTOOL@%$LIBTOOL%g
5300 s%@YACC@%$YACC%g
5301 s%@LEX@%$LEX%g
5302 s%@LEXLIB@%$LEXLIB%g
5303 s%@CPP@%$CPP%g
5304 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
5305 s%@ALLOCA@%$ALLOCA%g
5306 s%@USE_NLS@%$USE_NLS%g
5307 s%@MSGFMT@%$MSGFMT%g
5308 s%@GMSGFMT@%$GMSGFMT%g
5309 s%@XGETTEXT@%$XGETTEXT%g
5310 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5311 s%@CATALOGS@%$CATALOGS%g
5312 s%@CATOBJEXT@%$CATOBJEXT%g
5313 s%@DATADIRNAME@%$DATADIRNAME%g
5314 s%@GMOFILES@%$GMOFILES%g
5315 s%@INSTOBJEXT@%$INSTOBJEXT%g
5316 s%@INTLDEPS@%$INTLDEPS%g
5317 s%@INTLLIBS@%$INTLLIBS%g
5318 s%@INTLOBJS@%$INTLOBJS%g
5319 s%@POFILES@%$POFILES%g
5320 s%@POSUB@%$POSUB%g
5321 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5322 s%@GT_NO@%$GT_NO%g
5323 s%@GT_YES@%$GT_YES%g
5324 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5325 s%@l@%$l%g
5326 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5327 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5328 s%@MAINT@%$MAINT%g
5329 s%@EXEEXT@%$EXEEXT%g
5330 s%@HDEFINES@%$HDEFINES%g
5331 s%@AR@%$AR%g
5332 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
5333 s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
5334 s%@NLMCONV_DEFS@%$NLMCONV_DEFS%g
5335 s%@BUILD_NLMCONV@%$BUILD_NLMCONV%g
5336 s%@BUILD_SRCONV@%$BUILD_SRCONV%g
5337 s%@BUILD_DLLTOOL@%$BUILD_DLLTOOL%g
5338 s%@DLLTOOL_DEFS@%$DLLTOOL_DEFS%g
5339 s%@BUILD_WINDRES@%$BUILD_WINDRES%g
5340 s%@BUILD_DLLWRAP@%$BUILD_DLLWRAP%g
5341 s%@BUILD_MISC@%$BUILD_MISC%g
5342 s%@UNDERSCORE@%$UNDERSCORE%g
5344 CEOF
5347 cat >> $CONFIG_STATUS <<\EOF
5349 # Split the substitutions into bite-sized pieces for seds with
5350 # small command number limits, like on Digital OSF/1 and HP-UX.
5351 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5352 ac_file=1 # Number of current file.
5353 ac_beg=1 # First line for current file.
5354 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5355 ac_more_lines=:
5356 ac_sed_cmds=""
5357 while $ac_more_lines; do
5358 if test $ac_beg -gt 1; then
5359 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5360 else
5361 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5363 if test ! -s conftest.s$ac_file; then
5364 ac_more_lines=false
5365 rm -f conftest.s$ac_file
5366 else
5367 if test -z "$ac_sed_cmds"; then
5368 ac_sed_cmds="sed -f conftest.s$ac_file"
5369 else
5370 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5372 ac_file=`expr $ac_file + 1`
5373 ac_beg=$ac_end
5374 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5376 done
5377 if test -z "$ac_sed_cmds"; then
5378 ac_sed_cmds=cat
5382 cat >> $CONFIG_STATUS <<EOF
5384 CONFIG_FILES=\${CONFIG_FILES-"Makefile po/Makefile.in:po/Make-in"}
5386 cat >> $CONFIG_STATUS <<\EOF
5387 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5388 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5389 case "$ac_file" in
5390 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5391 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5392 *) ac_file_in="${ac_file}.in" ;;
5393 esac
5395 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5397 # Remove last slash and all that follows it. Not all systems have dirname.
5398 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5399 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5400 # The file is in a subdirectory.
5401 test ! -d "$ac_dir" && mkdir "$ac_dir"
5402 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5403 # A "../" for each directory in $ac_dir_suffix.
5404 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5405 else
5406 ac_dir_suffix= ac_dots=
5409 case "$ac_given_srcdir" in
5410 .) srcdir=.
5411 if test -z "$ac_dots"; then top_srcdir=.
5412 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5413 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5414 *) # Relative path.
5415 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5416 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5417 esac
5419 case "$ac_given_INSTALL" in
5420 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5421 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5422 esac
5424 echo creating "$ac_file"
5425 rm -f "$ac_file"
5426 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5427 case "$ac_file" in
5428 *Makefile*) ac_comsub="1i\\
5429 # $configure_input" ;;
5430 *) ac_comsub= ;;
5431 esac
5433 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5434 sed -e "$ac_comsub
5435 s%@configure_input@%$configure_input%g
5436 s%@srcdir@%$srcdir%g
5437 s%@top_srcdir@%$top_srcdir%g
5438 s%@INSTALL@%$INSTALL%g
5439 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5440 fi; done
5441 rm -f conftest.s*
5443 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5444 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5446 # ac_d sets the value in "#define NAME VALUE" lines.
5447 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5448 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5449 ac_dC='\3'
5450 ac_dD='%g'
5451 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5452 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5453 ac_uB='\([ ]\)%\1#\2define\3'
5454 ac_uC=' '
5455 ac_uD='\4%g'
5456 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5457 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5458 ac_eB='$%\1#\2define\3'
5459 ac_eC=' '
5460 ac_eD='%g'
5462 if test "${CONFIG_HEADERS+set}" != set; then
5464 cat >> $CONFIG_STATUS <<EOF
5465 CONFIG_HEADERS="config.h:config.in"
5467 cat >> $CONFIG_STATUS <<\EOF
5469 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5470 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5471 case "$ac_file" in
5472 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5473 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5474 *) ac_file_in="${ac_file}.in" ;;
5475 esac
5477 echo creating $ac_file
5479 rm -f conftest.frag conftest.in conftest.out
5480 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5481 cat $ac_file_inputs > conftest.in
5485 # Transform confdefs.h into a sed script conftest.vals that substitutes
5486 # the proper values into config.h.in to produce config.h. And first:
5487 # Protect against being on the right side of a sed subst in config.status.
5488 # Protect against being in an unquoted here document in config.status.
5489 rm -f conftest.vals
5490 cat > conftest.hdr <<\EOF
5491 s/[\\&%]/\\&/g
5492 s%[\\$`]%\\&%g
5493 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5494 s%ac_d%ac_u%gp
5495 s%ac_u%ac_e%gp
5497 sed -n -f conftest.hdr confdefs.h > conftest.vals
5498 rm -f conftest.hdr
5500 # This sed command replaces #undef with comments. This is necessary, for
5501 # example, in the case of _POSIX_SOURCE, which is predefined and required
5502 # on some systems where configure will not decide to define it.
5503 cat >> conftest.vals <<\EOF
5504 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5507 # Break up conftest.vals because some shells have a limit on
5508 # the size of here documents, and old seds have small limits too.
5510 rm -f conftest.tail
5511 while :
5513 ac_lines=`grep -c . conftest.vals`
5514 # grep -c gives empty output for an empty file on some AIX systems.
5515 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5516 # Write a limited-size here document to conftest.frag.
5517 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5518 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5519 echo 'CEOF
5520 sed -f conftest.frag conftest.in > conftest.out
5521 rm -f conftest.in
5522 mv conftest.out conftest.in
5523 ' >> $CONFIG_STATUS
5524 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5525 rm -f conftest.vals
5526 mv conftest.tail conftest.vals
5527 done
5528 rm -f conftest.vals
5530 cat >> $CONFIG_STATUS <<\EOF
5531 rm -f conftest.frag conftest.h
5532 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5533 cat conftest.in >> conftest.h
5534 rm -f conftest.in
5535 if cmp -s $ac_file conftest.h 2>/dev/null; then
5536 echo "$ac_file is unchanged"
5537 rm -f conftest.h
5538 else
5539 # Remove last slash and all that follows it. Not all systems have dirname.
5540 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5541 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5542 # The file is in a subdirectory.
5543 test ! -d "$ac_dir" && mkdir "$ac_dir"
5545 rm -f $ac_file
5546 mv conftest.h $ac_file
5548 fi; done
5551 cat >> $CONFIG_STATUS <<EOF
5555 cat >> $CONFIG_STATUS <<\EOF
5556 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
5558 case "x$CONFIG_FILES" in
5559 *) sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;
5560 esac
5562 exit 0
5564 chmod +x $CONFIG_STATUS
5565 rm -fr confdefs* $ac_clean_files
5566 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1