document behaviour of dot inside sections.
[binutils.git] / binutils / configure
bloba8469fff34d8d51a15250ff783338215a42c362e
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 sitefile=
53 srcdir=
54 target=NONE
55 verbose=
56 x_includes=NONE
57 x_libraries=NONE
58 bindir='${exec_prefix}/bin'
59 sbindir='${exec_prefix}/sbin'
60 libexecdir='${exec_prefix}/libexec'
61 datadir='${prefix}/share'
62 sysconfdir='${prefix}/etc'
63 sharedstatedir='${prefix}/com'
64 localstatedir='${prefix}/var'
65 libdir='${exec_prefix}/lib'
66 includedir='${prefix}/include'
67 oldincludedir='/usr/include'
68 infodir='${prefix}/info'
69 mandir='${prefix}/man'
71 # Initialize some other variables.
72 subdirs=
73 MFLAGS= MAKEFLAGS=
74 SHELL=${CONFIG_SHELL-/bin/sh}
75 # Maximum number of lines to put in a shell here document.
76 ac_max_here_lines=12
78 ac_prev=
79 for ac_option
82 # If the previous option needs an argument, assign it.
83 if test -n "$ac_prev"; then
84 eval "$ac_prev=\$ac_option"
85 ac_prev=
86 continue
89 case "$ac_option" in
90 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
91 *) ac_optarg= ;;
92 esac
94 # Accept the important Cygnus configure options, so we can diagnose typos.
96 case "$ac_option" in
98 -bindir | --bindir | --bindi | --bind | --bin | --bi)
99 ac_prev=bindir ;;
100 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
101 bindir="$ac_optarg" ;;
103 -build | --build | --buil | --bui | --bu)
104 ac_prev=build ;;
105 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
106 build="$ac_optarg" ;;
108 -cache-file | --cache-file | --cache-fil | --cache-fi \
109 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
110 ac_prev=cache_file ;;
111 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
112 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
113 cache_file="$ac_optarg" ;;
115 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
116 ac_prev=datadir ;;
117 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
118 | --da=*)
119 datadir="$ac_optarg" ;;
121 -disable-* | --disable-*)
122 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
123 # Reject names that are not valid shell variable names.
124 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
125 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
127 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
128 eval "enable_${ac_feature}=no" ;;
130 -enable-* | --enable-*)
131 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
132 # Reject names that are not valid shell variable names.
133 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
134 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
136 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
137 case "$ac_option" in
138 *=*) ;;
139 *) ac_optarg=yes ;;
140 esac
141 eval "enable_${ac_feature}='$ac_optarg'" ;;
143 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
144 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
145 | --exec | --exe | --ex)
146 ac_prev=exec_prefix ;;
147 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
148 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
149 | --exec=* | --exe=* | --ex=*)
150 exec_prefix="$ac_optarg" ;;
152 -gas | --gas | --ga | --g)
153 # Obsolete; use --with-gas.
154 with_gas=yes ;;
156 -help | --help | --hel | --he)
157 # Omit some internal or obsolete options to make the list less imposing.
158 # This message is too long to be a string in the A/UX 3.1 sh.
159 cat << EOF
160 Usage: configure [options] [host]
161 Options: [defaults in brackets after descriptions]
162 Configuration:
163 --cache-file=FILE cache test results in FILE
164 --help print this message
165 --no-create do not create output files
166 --quiet, --silent do not print \`checking...' messages
167 --site-file=FILE use FILE as the site file
168 --version print the version of autoconf that created configure
169 Directory and file names:
170 --prefix=PREFIX install architecture-independent files in PREFIX
171 [$ac_default_prefix]
172 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
173 [same as prefix]
174 --bindir=DIR user executables in DIR [EPREFIX/bin]
175 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
176 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
177 --datadir=DIR read-only architecture-independent data in DIR
178 [PREFIX/share]
179 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
180 --sharedstatedir=DIR modifiable architecture-independent data in DIR
181 [PREFIX/com]
182 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
183 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
184 --includedir=DIR C header files in DIR [PREFIX/include]
185 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
186 --infodir=DIR info documentation in DIR [PREFIX/info]
187 --mandir=DIR man documentation in DIR [PREFIX/man]
188 --srcdir=DIR find the sources in DIR [configure dir or ..]
189 --program-prefix=PREFIX prepend PREFIX to installed program names
190 --program-suffix=SUFFIX append SUFFIX to installed program names
191 --program-transform-name=PROGRAM
192 run sed PROGRAM on installed program names
194 cat << EOF
195 Host type:
196 --build=BUILD configure for building on BUILD [BUILD=HOST]
197 --host=HOST configure for HOST [guessed]
198 --target=TARGET configure for TARGET [TARGET=HOST]
199 Features and packages:
200 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
201 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
202 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
203 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
204 --x-includes=DIR X include files are in DIR
205 --x-libraries=DIR X library files are in DIR
207 if test -n "$ac_help"; then
208 echo "--enable and --with options recognized:$ac_help"
210 exit 0 ;;
212 -host | --host | --hos | --ho)
213 ac_prev=host ;;
214 -host=* | --host=* | --hos=* | --ho=*)
215 host="$ac_optarg" ;;
217 -includedir | --includedir | --includedi | --included | --include \
218 | --includ | --inclu | --incl | --inc)
219 ac_prev=includedir ;;
220 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
221 | --includ=* | --inclu=* | --incl=* | --inc=*)
222 includedir="$ac_optarg" ;;
224 -infodir | --infodir | --infodi | --infod | --info | --inf)
225 ac_prev=infodir ;;
226 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
227 infodir="$ac_optarg" ;;
229 -libdir | --libdir | --libdi | --libd)
230 ac_prev=libdir ;;
231 -libdir=* | --libdir=* | --libdi=* | --libd=*)
232 libdir="$ac_optarg" ;;
234 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
235 | --libexe | --libex | --libe)
236 ac_prev=libexecdir ;;
237 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
238 | --libexe=* | --libex=* | --libe=*)
239 libexecdir="$ac_optarg" ;;
241 -localstatedir | --localstatedir | --localstatedi | --localstated \
242 | --localstate | --localstat | --localsta | --localst \
243 | --locals | --local | --loca | --loc | --lo)
244 ac_prev=localstatedir ;;
245 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
246 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
247 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
248 localstatedir="$ac_optarg" ;;
250 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
251 ac_prev=mandir ;;
252 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
253 mandir="$ac_optarg" ;;
255 -nfp | --nfp | --nf)
256 # Obsolete; use --without-fp.
257 with_fp=no ;;
259 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
260 | --no-cr | --no-c)
261 no_create=yes ;;
263 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
264 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
265 no_recursion=yes ;;
267 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
268 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
269 | --oldin | --oldi | --old | --ol | --o)
270 ac_prev=oldincludedir ;;
271 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
272 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
273 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
274 oldincludedir="$ac_optarg" ;;
276 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
277 ac_prev=prefix ;;
278 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
279 prefix="$ac_optarg" ;;
281 -program-prefix | --program-prefix | --program-prefi | --program-pref \
282 | --program-pre | --program-pr | --program-p)
283 ac_prev=program_prefix ;;
284 -program-prefix=* | --program-prefix=* | --program-prefi=* \
285 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
286 program_prefix="$ac_optarg" ;;
288 -program-suffix | --program-suffix | --program-suffi | --program-suff \
289 | --program-suf | --program-su | --program-s)
290 ac_prev=program_suffix ;;
291 -program-suffix=* | --program-suffix=* | --program-suffi=* \
292 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
293 program_suffix="$ac_optarg" ;;
295 -program-transform-name | --program-transform-name \
296 | --program-transform-nam | --program-transform-na \
297 | --program-transform-n | --program-transform- \
298 | --program-transform | --program-transfor \
299 | --program-transfo | --program-transf \
300 | --program-trans | --program-tran \
301 | --progr-tra | --program-tr | --program-t)
302 ac_prev=program_transform_name ;;
303 -program-transform-name=* | --program-transform-name=* \
304 | --program-transform-nam=* | --program-transform-na=* \
305 | --program-transform-n=* | --program-transform-=* \
306 | --program-transform=* | --program-transfor=* \
307 | --program-transfo=* | --program-transf=* \
308 | --program-trans=* | --program-tran=* \
309 | --progr-tra=* | --program-tr=* | --program-t=*)
310 program_transform_name="$ac_optarg" ;;
312 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
313 | -silent | --silent | --silen | --sile | --sil)
314 silent=yes ;;
316 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
317 ac_prev=sbindir ;;
318 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
319 | --sbi=* | --sb=*)
320 sbindir="$ac_optarg" ;;
322 -sharedstatedir | --sharedstatedir | --sharedstatedi \
323 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
324 | --sharedst | --shareds | --shared | --share | --shar \
325 | --sha | --sh)
326 ac_prev=sharedstatedir ;;
327 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
328 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
329 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
330 | --sha=* | --sh=*)
331 sharedstatedir="$ac_optarg" ;;
333 -site | --site | --sit)
334 ac_prev=site ;;
335 -site=* | --site=* | --sit=*)
336 site="$ac_optarg" ;;
338 -site-file | --site-file | --site-fil | --site-fi | --site-f)
339 ac_prev=sitefile ;;
340 -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
341 sitefile="$ac_optarg" ;;
343 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
344 ac_prev=srcdir ;;
345 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
346 srcdir="$ac_optarg" ;;
348 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
349 | --syscon | --sysco | --sysc | --sys | --sy)
350 ac_prev=sysconfdir ;;
351 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
352 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
353 sysconfdir="$ac_optarg" ;;
355 -target | --target | --targe | --targ | --tar | --ta | --t)
356 ac_prev=target ;;
357 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
358 target="$ac_optarg" ;;
360 -v | -verbose | --verbose | --verbos | --verbo | --verb)
361 verbose=yes ;;
363 -version | --version | --versio | --versi | --vers)
364 echo "configure generated by autoconf version 2.13"
365 exit 0 ;;
367 -with-* | --with-*)
368 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
369 # Reject names that are not valid shell variable names.
370 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
371 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
373 ac_package=`echo $ac_package| sed 's/-/_/g'`
374 case "$ac_option" in
375 *=*) ;;
376 *) ac_optarg=yes ;;
377 esac
378 eval "with_${ac_package}='$ac_optarg'" ;;
380 -without-* | --without-*)
381 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
382 # Reject names that are not valid shell variable names.
383 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
384 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
386 ac_package=`echo $ac_package| sed 's/-/_/g'`
387 eval "with_${ac_package}=no" ;;
389 --x)
390 # Obsolete; use --with-x.
391 with_x=yes ;;
393 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
394 | --x-incl | --x-inc | --x-in | --x-i)
395 ac_prev=x_includes ;;
396 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
397 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
398 x_includes="$ac_optarg" ;;
400 -x-libraries | --x-libraries | --x-librarie | --x-librari \
401 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
402 ac_prev=x_libraries ;;
403 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
404 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
405 x_libraries="$ac_optarg" ;;
407 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
411 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
412 echo "configure: warning: $ac_option: invalid host type" 1>&2
414 if test "x$nonopt" != xNONE; then
415 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
417 nonopt="$ac_option"
420 esac
421 done
423 if test -n "$ac_prev"; then
424 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
427 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
429 # File descriptor usage:
430 # 0 standard input
431 # 1 file creation
432 # 2 errors and warnings
433 # 3 some systems may open it to /dev/tty
434 # 4 used on the Kubota Titan
435 # 6 checking for... messages and results
436 # 5 compiler messages saved in config.log
437 if test "$silent" = yes; then
438 exec 6>/dev/null
439 else
440 exec 6>&1
442 exec 5>./config.log
444 echo "\
445 This file contains any messages produced by compilers while
446 running configure, to aid debugging if configure makes a mistake.
447 " 1>&5
449 # Strip out --no-create and --no-recursion so they do not pile up.
450 # Also quote any args containing shell metacharacters.
451 ac_configure_args=
452 for ac_arg
454 case "$ac_arg" in
455 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
456 | --no-cr | --no-c) ;;
457 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
458 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
459 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
460 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
461 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
462 esac
463 done
465 # NLS nuisances.
466 # Only set these to C if already set. These must not be set unconditionally
467 # because not all systems understand e.g. LANG=C (notably SCO).
468 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
469 # Non-C LC_CTYPE values break the ctype check.
470 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
471 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
472 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
473 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
475 # confdefs.h avoids OS command line length limits that DEFS can exceed.
476 rm -rf conftest* confdefs.h
477 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
478 echo > confdefs.h
480 # A filename unique to this package, relative to the directory that
481 # configure is in, which we can look for to find out if srcdir is correct.
482 ac_unique_file=ar.c
484 # Find the source files, if location was not specified.
485 if test -z "$srcdir"; then
486 ac_srcdir_defaulted=yes
487 # Try the directory containing this script, then its parent.
488 ac_prog=$0
489 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
490 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
491 srcdir=$ac_confdir
492 if test ! -r $srcdir/$ac_unique_file; then
493 srcdir=..
495 else
496 ac_srcdir_defaulted=no
498 if test ! -r $srcdir/$ac_unique_file; then
499 if test "$ac_srcdir_defaulted" = yes; then
500 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
501 else
502 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
505 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
507 # Prefer explicitly selected file to automatically selected ones.
508 if test -z "$sitefile"; then
509 if test -z "$CONFIG_SITE"; then
510 if test "x$prefix" != xNONE; then
511 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
512 else
513 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
516 else
517 CONFIG_SITE="$sitefile"
519 for ac_site_file in $CONFIG_SITE; do
520 if test -r "$ac_site_file"; then
521 echo "loading site script $ac_site_file"
522 . "$ac_site_file"
524 done
526 if test -r "$cache_file"; then
527 echo "loading cache $cache_file"
528 . $cache_file
529 else
530 echo "creating cache $cache_file"
531 > $cache_file
534 ac_ext=c
535 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
536 ac_cpp='$CPP $CPPFLAGS'
537 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
538 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
539 cross_compiling=$ac_cv_prog_cc_cross
541 ac_exeext=
542 ac_objext=o
543 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
544 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
545 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
546 ac_n= ac_c='
547 ' ac_t=' '
548 else
549 ac_n=-n ac_c= ac_t=
551 else
552 ac_n= ac_c='\c' ac_t=
557 ac_aux_dir=
558 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
559 if test -f $ac_dir/install-sh; then
560 ac_aux_dir=$ac_dir
561 ac_install_sh="$ac_aux_dir/install-sh -c"
562 break
563 elif test -f $ac_dir/install.sh; then
564 ac_aux_dir=$ac_dir
565 ac_install_sh="$ac_aux_dir/install.sh -c"
566 break
568 done
569 if test -z "$ac_aux_dir"; then
570 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
572 ac_config_guess=$ac_aux_dir/config.guess
573 ac_config_sub=$ac_aux_dir/config.sub
574 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
577 # Do some error checking and defaulting for the host and target type.
578 # The inputs are:
579 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
581 # The rules are:
582 # 1. You are not allowed to specify --host, --target, and nonopt at the
583 # same time.
584 # 2. Host defaults to nonopt.
585 # 3. If nonopt is not specified, then host defaults to the current host,
586 # as determined by config.guess.
587 # 4. Target and build default to nonopt.
588 # 5. If nonopt is not specified, then target and build default to host.
590 # The aliases save the names the user supplied, while $host etc.
591 # will get canonicalized.
592 case $host---$target---$nonopt in
593 NONE---*---* | *---NONE---* | *---*---NONE) ;;
594 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
595 esac
598 # Make sure we can run config.sub.
599 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
600 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
603 echo $ac_n "checking host system type""... $ac_c" 1>&6
604 echo "configure:605: checking host system type" >&5
606 host_alias=$host
607 case "$host_alias" in
608 NONE)
609 case $nonopt in
610 NONE)
611 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
612 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
613 fi ;;
614 *) host_alias=$nonopt ;;
615 esac ;;
616 esac
618 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
619 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
620 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
621 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
622 echo "$ac_t""$host" 1>&6
624 echo $ac_n "checking target system type""... $ac_c" 1>&6
625 echo "configure:626: checking target system type" >&5
627 target_alias=$target
628 case "$target_alias" in
629 NONE)
630 case $nonopt in
631 NONE) target_alias=$host_alias ;;
632 *) target_alias=$nonopt ;;
633 esac ;;
634 esac
636 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
637 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
638 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
639 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
640 echo "$ac_t""$target" 1>&6
642 echo $ac_n "checking build system type""... $ac_c" 1>&6
643 echo "configure:644: checking build system type" >&5
645 build_alias=$build
646 case "$build_alias" in
647 NONE)
648 case $nonopt in
649 NONE) build_alias=$host_alias ;;
650 *) build_alias=$nonopt ;;
651 esac ;;
652 esac
654 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
655 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
656 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
657 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
658 echo "$ac_t""$build" 1>&6
660 test "$host_alias" != "$target_alias" &&
661 test "$program_prefix$program_suffix$program_transform_name" = \
662 NONENONEs,x,x, &&
663 program_prefix=${target_alias}-
666 # Find a good install program. We prefer a C program (faster),
667 # so one script is as good as another. But avoid the broken or
668 # incompatible versions:
669 # SysV /etc/install, /usr/sbin/install
670 # SunOS /usr/etc/install
671 # IRIX /sbin/install
672 # AIX /bin/install
673 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
674 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
675 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
676 # ./install, which can be erroneously created by make from ./install.sh.
677 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
678 echo "configure:679: checking for a BSD compatible install" >&5
679 if test -z "$INSTALL"; then
680 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
681 echo $ac_n "(cached) $ac_c" 1>&6
682 else
683 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
684 for ac_dir in $PATH; do
685 # Account for people who put trailing slashes in PATH elements.
686 case "$ac_dir/" in
687 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
689 # OSF1 and SCO ODT 3.0 have their own names for install.
690 # Don't use installbsd from OSF since it installs stuff as root
691 # by default.
692 for ac_prog in ginstall scoinst install; do
693 if test -f $ac_dir/$ac_prog; then
694 if test $ac_prog = install &&
695 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
696 # AIX install. It has an incompatible calling convention.
698 else
699 ac_cv_path_install="$ac_dir/$ac_prog -c"
700 break 2
703 done
705 esac
706 done
707 IFS="$ac_save_IFS"
710 if test "${ac_cv_path_install+set}" = set; then
711 INSTALL="$ac_cv_path_install"
712 else
713 # As a last resort, use the slow shell script. We don't cache a
714 # path for INSTALL within a source directory, because that will
715 # break other packages using the cache if that directory is
716 # removed, or if the path is relative.
717 INSTALL="$ac_install_sh"
720 echo "$ac_t""$INSTALL" 1>&6
722 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
723 # It thinks the first close brace ends the variable substitution.
724 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
726 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
728 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
730 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
731 echo "configure:732: checking whether build environment is sane" >&5
732 # Just in case
733 sleep 1
734 echo timestamp > conftestfile
735 # Do `set' in a subshell so we don't clobber the current shell's
736 # arguments. Must try -L first in case configure is actually a
737 # symlink; some systems play weird games with the mod time of symlinks
738 # (eg FreeBSD returns the mod time of the symlink's containing
739 # directory).
740 if (
741 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
742 if test "$*" = "X"; then
743 # -L didn't work.
744 set X `ls -t $srcdir/configure conftestfile`
746 if test "$*" != "X $srcdir/configure conftestfile" \
747 && test "$*" != "X conftestfile $srcdir/configure"; then
749 # If neither matched, then we have a broken ls. This can happen
750 # if, for instance, CONFIG_SHELL is bash and it inherits a
751 # broken ls alias from the environment. This has actually
752 # happened. Such a system could not be considered "sane".
753 { echo "configure: error: ls -t appears to fail. Make sure there is not a broken
754 alias in your environment" 1>&2; exit 1; }
757 test "$2" = conftestfile
759 then
760 # Ok.
762 else
763 { echo "configure: error: newly created file is older than distributed files!
764 Check your system clock" 1>&2; exit 1; }
766 rm -f conftest*
767 echo "$ac_t""yes" 1>&6
768 if test "$program_transform_name" = s,x,x,; then
769 program_transform_name=
770 else
771 # Double any \ or $. echo might interpret backslashes.
772 cat <<\EOF_SED > conftestsed
773 s,\\,\\\\,g; s,\$,$$,g
774 EOF_SED
775 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
776 rm -f conftestsed
778 test "$program_prefix" != NONE &&
779 program_transform_name="s,^,${program_prefix},; $program_transform_name"
780 # Use a double $ so make ignores it.
781 test "$program_suffix" != NONE &&
782 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
784 # sed with no file args requires a program.
785 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
787 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
788 echo "configure:789: checking whether ${MAKE-make} sets \${MAKE}" >&5
789 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
790 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
791 echo $ac_n "(cached) $ac_c" 1>&6
792 else
793 cat > conftestmake <<\EOF
794 all:
795 @echo 'ac_maketemp="${MAKE}"'
797 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
798 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
799 if test -n "$ac_maketemp"; then
800 eval ac_cv_prog_make_${ac_make}_set=yes
801 else
802 eval ac_cv_prog_make_${ac_make}_set=no
804 rm -f conftestmake
806 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
807 echo "$ac_t""yes" 1>&6
808 SET_MAKE=
809 else
810 echo "$ac_t""no" 1>&6
811 SET_MAKE="MAKE=${MAKE-make}"
815 PACKAGE=binutils
817 VERSION=2.9.4
819 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
820 { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
822 cat >> confdefs.h <<EOF
823 #define PACKAGE "$PACKAGE"
826 cat >> confdefs.h <<EOF
827 #define VERSION "$VERSION"
832 missing_dir=`cd $ac_aux_dir && pwd`
833 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
834 echo "configure:835: checking for working aclocal" >&5
835 # Run test in a subshell; some versions of sh will print an error if
836 # an executable is not found, even if stderr is redirected.
837 # Redirect stdin to placate older versions of autoconf. Sigh.
838 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
839 ACLOCAL=aclocal
840 echo "$ac_t""found" 1>&6
841 else
842 ACLOCAL="$missing_dir/missing aclocal"
843 echo "$ac_t""missing" 1>&6
846 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
847 echo "configure:848: checking for working autoconf" >&5
848 # Run test in a subshell; some versions of sh will print an error if
849 # an executable is not found, even if stderr is redirected.
850 # Redirect stdin to placate older versions of autoconf. Sigh.
851 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
852 AUTOCONF=autoconf
853 echo "$ac_t""found" 1>&6
854 else
855 AUTOCONF="$missing_dir/missing autoconf"
856 echo "$ac_t""missing" 1>&6
859 echo $ac_n "checking for working automake""... $ac_c" 1>&6
860 echo "configure:861: checking for working automake" >&5
861 # Run test in a subshell; some versions of sh will print an error if
862 # an executable is not found, even if stderr is redirected.
863 # Redirect stdin to placate older versions of autoconf. Sigh.
864 if (automake --version) < /dev/null > /dev/null 2>&1; then
865 AUTOMAKE=automake
866 echo "$ac_t""found" 1>&6
867 else
868 AUTOMAKE="$missing_dir/missing automake"
869 echo "$ac_t""missing" 1>&6
872 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
873 echo "configure:874: checking for working autoheader" >&5
874 # Run test in a subshell; some versions of sh will print an error if
875 # an executable is not found, even if stderr is redirected.
876 # Redirect stdin to placate older versions of autoconf. Sigh.
877 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
878 AUTOHEADER=autoheader
879 echo "$ac_t""found" 1>&6
880 else
881 AUTOHEADER="$missing_dir/missing autoheader"
882 echo "$ac_t""missing" 1>&6
885 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
886 echo "configure:887: checking for working makeinfo" >&5
887 # Run test in a subshell; some versions of sh will print an error if
888 # an executable is not found, even if stderr is redirected.
889 # Redirect stdin to placate older versions of autoconf. Sigh.
890 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
891 MAKEINFO=makeinfo
892 echo "$ac_t""found" 1>&6
893 else
894 MAKEINFO="$missing_dir/missing makeinfo"
895 echo "$ac_t""missing" 1>&6
900 # Check whether --enable-shared or --disable-shared was given.
901 if test "${enable_shared+set}" = set; then
902 enableval="$enable_shared"
903 p=${PACKAGE-default}
904 case "$enableval" in
905 yes) enable_shared=yes ;;
906 no) enable_shared=no ;;
908 enable_shared=no
909 # Look at the argument we got. We use all the common list separators.
910 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
911 for pkg in $enableval; do
912 if test "X$pkg" = "X$p"; then
913 enable_shared=yes
915 done
916 IFS="$ac_save_ifs"
918 esac
919 else
920 enable_shared=yes
923 # Check whether --enable-static or --disable-static was given.
924 if test "${enable_static+set}" = set; then
925 enableval="$enable_static"
926 p=${PACKAGE-default}
927 case "$enableval" in
928 yes) enable_static=yes ;;
929 no) enable_static=no ;;
931 enable_static=no
932 # Look at the argument we got. We use all the common list separators.
933 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
934 for pkg in $enableval; do
935 if test "X$pkg" = "X$p"; then
936 enable_static=yes
938 done
939 IFS="$ac_save_ifs"
941 esac
942 else
943 enable_static=yes
946 # Check whether --enable-fast-install or --disable-fast-install was given.
947 if test "${enable_fast_install+set}" = set; then
948 enableval="$enable_fast_install"
949 p=${PACKAGE-default}
950 case "$enableval" in
951 yes) enable_fast_install=yes ;;
952 no) enable_fast_install=no ;;
954 enable_fast_install=no
955 # Look at the argument we got. We use all the common list separators.
956 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
957 for pkg in $enableval; do
958 if test "X$pkg" = "X$p"; then
959 enable_fast_install=yes
961 done
962 IFS="$ac_save_ifs"
964 esac
965 else
966 enable_fast_install=yes
969 # Extract the first word of "ranlib", so it can be a program name with args.
970 set dummy ranlib; ac_word=$2
971 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
972 echo "configure:973: checking for $ac_word" >&5
973 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
974 echo $ac_n "(cached) $ac_c" 1>&6
975 else
976 if test -n "$RANLIB"; then
977 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
978 else
979 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
980 ac_dummy="$PATH"
981 for ac_dir in $ac_dummy; do
982 test -z "$ac_dir" && ac_dir=.
983 if test -f $ac_dir/$ac_word; then
984 ac_cv_prog_RANLIB="ranlib"
985 break
987 done
988 IFS="$ac_save_ifs"
989 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
992 RANLIB="$ac_cv_prog_RANLIB"
993 if test -n "$RANLIB"; then
994 echo "$ac_t""$RANLIB" 1>&6
995 else
996 echo "$ac_t""no" 1>&6
999 # Extract the first word of "gcc", so it can be a program name with args.
1000 set dummy gcc; ac_word=$2
1001 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1002 echo "configure:1003: checking for $ac_word" >&5
1003 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1004 echo $ac_n "(cached) $ac_c" 1>&6
1005 else
1006 if test -n "$CC"; then
1007 ac_cv_prog_CC="$CC" # Let the user override the test.
1008 else
1009 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1010 ac_dummy="$PATH"
1011 for ac_dir in $ac_dummy; do
1012 test -z "$ac_dir" && ac_dir=.
1013 if test -f $ac_dir/$ac_word; then
1014 ac_cv_prog_CC="gcc"
1015 break
1017 done
1018 IFS="$ac_save_ifs"
1021 CC="$ac_cv_prog_CC"
1022 if test -n "$CC"; then
1023 echo "$ac_t""$CC" 1>&6
1024 else
1025 echo "$ac_t""no" 1>&6
1028 if test -z "$CC"; then
1029 # Extract the first word of "cc", so it can be a program name with args.
1030 set dummy cc; ac_word=$2
1031 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1032 echo "configure:1033: checking for $ac_word" >&5
1033 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1034 echo $ac_n "(cached) $ac_c" 1>&6
1035 else
1036 if test -n "$CC"; then
1037 ac_cv_prog_CC="$CC" # Let the user override the test.
1038 else
1039 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1040 ac_prog_rejected=no
1041 ac_dummy="$PATH"
1042 for ac_dir in $ac_dummy; do
1043 test -z "$ac_dir" && ac_dir=.
1044 if test -f $ac_dir/$ac_word; then
1045 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1046 ac_prog_rejected=yes
1047 continue
1049 ac_cv_prog_CC="cc"
1050 break
1052 done
1053 IFS="$ac_save_ifs"
1054 if test $ac_prog_rejected = yes; then
1055 # We found a bogon in the path, so make sure we never use it.
1056 set dummy $ac_cv_prog_CC
1057 shift
1058 if test $# -gt 0; then
1059 # We chose a different compiler from the bogus one.
1060 # However, it has the same basename, so the bogon will be chosen
1061 # first if we set CC to just the basename; use the full file name.
1062 shift
1063 set dummy "$ac_dir/$ac_word" "$@"
1064 shift
1065 ac_cv_prog_CC="$@"
1070 CC="$ac_cv_prog_CC"
1071 if test -n "$CC"; then
1072 echo "$ac_t""$CC" 1>&6
1073 else
1074 echo "$ac_t""no" 1>&6
1077 if test -z "$CC"; then
1078 case "`uname -s`" in
1079 *win32* | *WIN32*)
1080 # Extract the first word of "cl", so it can be a program name with args.
1081 set dummy cl; ac_word=$2
1082 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1083 echo "configure:1084: checking for $ac_word" >&5
1084 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1085 echo $ac_n "(cached) $ac_c" 1>&6
1086 else
1087 if test -n "$CC"; then
1088 ac_cv_prog_CC="$CC" # Let the user override the test.
1089 else
1090 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1091 ac_dummy="$PATH"
1092 for ac_dir in $ac_dummy; do
1093 test -z "$ac_dir" && ac_dir=.
1094 if test -f $ac_dir/$ac_word; then
1095 ac_cv_prog_CC="cl"
1096 break
1098 done
1099 IFS="$ac_save_ifs"
1102 CC="$ac_cv_prog_CC"
1103 if test -n "$CC"; then
1104 echo "$ac_t""$CC" 1>&6
1105 else
1106 echo "$ac_t""no" 1>&6
1109 esac
1111 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1114 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1115 echo "configure:1116: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1117 ac_ext=c
1118 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1119 ac_cpp='$CPP $CPPFLAGS'
1120 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1121 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1122 cross_compiling=$ac_cv_prog_cc_cross
1124 cat > conftest.$ac_ext << EOF
1126 #line 1127 "configure"
1127 #include "confdefs.h"
1129 main(){return(0);}
1131 if { (eval echo configure:1132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1132 ac_cv_prog_cc_works=yes
1133 # If we can't run a trivial program, we are probably using a cross compiler.
1134 if (./conftest; exit) 2>/dev/null; then
1135 ac_cv_prog_cc_cross=no
1136 else
1137 ac_cv_prog_cc_cross=yes
1139 else
1140 echo "configure: failed program was:" >&5
1141 cat conftest.$ac_ext >&5
1142 ac_cv_prog_cc_works=no
1144 rm -fr conftest*
1145 ac_ext=c
1146 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1147 ac_cpp='$CPP $CPPFLAGS'
1148 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1149 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1150 cross_compiling=$ac_cv_prog_cc_cross
1152 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1153 if test $ac_cv_prog_cc_works = no; then
1154 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1156 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1157 echo "configure:1158: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1158 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1159 cross_compiling=$ac_cv_prog_cc_cross
1161 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1162 echo "configure:1163: checking whether we are using GNU C" >&5
1163 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1164 echo $ac_n "(cached) $ac_c" 1>&6
1165 else
1166 cat > conftest.c <<EOF
1167 #ifdef __GNUC__
1168 yes;
1169 #endif
1171 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1172 ac_cv_prog_gcc=yes
1173 else
1174 ac_cv_prog_gcc=no
1178 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1180 if test $ac_cv_prog_gcc = yes; then
1181 GCC=yes
1182 else
1183 GCC=
1186 ac_test_CFLAGS="${CFLAGS+set}"
1187 ac_save_CFLAGS="$CFLAGS"
1188 CFLAGS=
1189 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1190 echo "configure:1191: checking whether ${CC-cc} accepts -g" >&5
1191 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1192 echo $ac_n "(cached) $ac_c" 1>&6
1193 else
1194 echo 'void f(){}' > conftest.c
1195 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1196 ac_cv_prog_cc_g=yes
1197 else
1198 ac_cv_prog_cc_g=no
1200 rm -f conftest*
1204 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1205 if test "$ac_test_CFLAGS" = set; then
1206 CFLAGS="$ac_save_CFLAGS"
1207 elif test $ac_cv_prog_cc_g = yes; then
1208 if test "$GCC" = yes; then
1209 CFLAGS="-g -O2"
1210 else
1211 CFLAGS="-g"
1213 else
1214 if test "$GCC" = yes; then
1215 CFLAGS="-O2"
1216 else
1217 CFLAGS=
1221 # Check whether --with-gnu-ld or --without-gnu-ld was given.
1222 if test "${with_gnu_ld+set}" = set; then
1223 withval="$with_gnu_ld"
1224 test "$withval" = no || with_gnu_ld=yes
1225 else
1226 with_gnu_ld=no
1229 ac_prog=ld
1230 if test "$ac_cv_prog_gcc" = yes; then
1231 # Check if gcc -print-prog-name=ld gives a path.
1232 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
1233 echo "configure:1234: checking for ld used by GCC" >&5
1234 ac_prog=`($CC -print-prog-name=ld) 2>&5`
1235 case "$ac_prog" in
1236 # Accept absolute paths.
1237 /* | [A-Za-z]:[\\/]*)
1238 re_direlt='/[^/][^/]*/\.\./'
1239 # Canonicalize the path of ld
1240 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1241 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1242 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1243 done
1244 test -z "$LD" && LD="$ac_prog"
1247 # If it fails, then pretend we aren't using GCC.
1248 ac_prog=ld
1251 # If it is relative, then search for the first ld in PATH.
1252 with_gnu_ld=unknown
1254 esac
1255 elif test "$with_gnu_ld" = yes; then
1256 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
1257 echo "configure:1258: checking for GNU ld" >&5
1258 else
1259 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
1260 echo "configure:1261: checking for non-GNU ld" >&5
1262 if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
1263 echo $ac_n "(cached) $ac_c" 1>&6
1264 else
1265 if test -z "$LD"; then
1266 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1267 for ac_dir in $PATH; do
1268 test -z "$ac_dir" && ac_dir=.
1269 if test -f "$ac_dir/$ac_prog"; then
1270 ac_cv_path_LD="$ac_dir/$ac_prog"
1271 # Check to see if the program is GNU ld. I'd rather use --version,
1272 # but apparently some GNU ld's only accept -v.
1273 # Break only if it was the GNU/non-GNU ld that we prefer.
1274 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
1275 test "$with_gnu_ld" != no && break
1276 else
1277 test "$with_gnu_ld" != yes && break
1280 done
1281 IFS="$ac_save_ifs"
1282 else
1283 ac_cv_path_LD="$LD" # Let the user override the test with a path.
1287 LD="$ac_cv_path_LD"
1288 if test -n "$LD"; then
1289 echo "$ac_t""$LD" 1>&6
1290 else
1291 echo "$ac_t""no" 1>&6
1293 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1295 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
1296 echo "configure:1297: checking if the linker ($LD) is GNU ld" >&5
1297 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
1298 echo $ac_n "(cached) $ac_c" 1>&6
1299 else
1300 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1301 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
1302 ac_cv_prog_gnu_ld=yes
1303 else
1304 ac_cv_prog_gnu_ld=no
1308 echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
1311 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
1312 echo "configure:1313: checking for BSD-compatible nm" >&5
1313 if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
1314 echo $ac_n "(cached) $ac_c" 1>&6
1315 else
1316 if test -n "$NM"; then
1317 # Let the user override the test.
1318 ac_cv_path_NM="$NM"
1319 else
1320 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1321 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1322 test -z "$ac_dir" && ac_dir=.
1323 if test -f $ac_dir/nm; then
1324 # Check to see if the nm accepts a BSD-compat flag.
1325 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1326 # nm: unknown option "B" ignored
1327 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1328 ac_cv_path_NM="$ac_dir/nm -B"
1329 break
1330 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
1331 ac_cv_path_NM="$ac_dir/nm -p"
1332 break
1333 else
1334 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
1335 continue # so that we can try to find one that supports BSD flags
1338 done
1339 IFS="$ac_save_ifs"
1340 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
1344 NM="$ac_cv_path_NM"
1345 echo "$ac_t""$NM" 1>&6
1348 # Check for command to grab the raw symbol name followed by C symbol from nm.
1349 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
1350 echo "configure:1351: checking command to parse $NM output" >&5
1351 if eval "test \"`echo '$''{'ac_cv_sys_global_symbol_pipe'+set}'`\" = set"; then
1352 echo $ac_n "(cached) $ac_c" 1>&6
1353 else
1354 # These are sane defaults that work on at least a few old systems.
1355 # {They come from Ultrix. What could be older than Ultrix?!! ;)}
1357 # Character class describing NM global symbol codes.
1358 ac_symcode='[BCDEGRST]'
1360 # Regexp to match symbols that can be accessed directly from C.
1361 ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
1363 # Transform the above into a raw symbol and a C symbol.
1364 ac_symxfrm='\1 \2\3 \3'
1366 # Transform an extracted symbol line into a proper C declaration
1367 ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1369 # Define system-specific variables.
1370 case "$host_os" in
1371 aix*)
1372 ac_symcode='[BCDT]'
1374 cygwin* | mingw*)
1375 ac_symcode='[ABCDGISTW]'
1377 hpux*)
1378 ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
1380 irix*)
1381 ac_symcode='[BCDEGRST]'
1383 solaris*)
1384 ac_symcode='[BDT]'
1386 esac
1388 # If we're using GNU nm, then use its standard symbol codes.
1389 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1390 ac_symcode='[ABCDGISTW]'
1393 # Try without a prefix undercore, then with it.
1394 for ac_symprfx in "" "_"; do
1396 ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.* \($ac_symcode\) *\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'"
1398 # Check to see that the pipe works correctly.
1399 ac_pipe_works=no
1400 rm -f conftest.$ac_ext
1401 cat > conftest.$ac_ext <<EOF
1402 #ifdef __cplusplus
1403 extern "C" {
1404 #endif
1405 char nm_test_var;
1406 void nm_test_func(){}
1407 #ifdef __cplusplus
1409 #endif
1410 int main(){nm_test_var='a';nm_test_func;return 0;}
1413 if { (eval echo configure:1414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1414 # Now try to grab the symbols.
1415 ac_nlist=conftest.nm
1417 if { (eval echo configure:1418: \"$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
1419 # Try sorting and uniquifying the output.
1420 if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
1421 mv -f "$ac_nlist"T "$ac_nlist"
1422 else
1423 rm -f "$ac_nlist"T
1426 # Make sure that we snagged all the symbols we need.
1427 if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
1428 if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
1429 cat <<EOF > conftest.c
1430 #ifdef __cplusplus
1431 extern "C" {
1432 #endif
1435 # Now generate the symbol file.
1436 eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c'
1438 cat <<EOF >> conftest.c
1439 #if defined (__STDC__) && __STDC__
1440 # define lt_ptr_t void *
1441 #else
1442 # define lt_ptr_t char *
1443 # define const
1444 #endif
1446 /* The mapping between symbol names and symbols. */
1447 const struct {
1448 const char *name;
1449 lt_ptr_t address;
1451 lt_preloaded_symbols[] =
1454 sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
1455 cat <<\EOF >> conftest.c
1456 {0, (lt_ptr_t) 0}
1459 #ifdef __cplusplus
1461 #endif
1463 # Now try linking the two files.
1464 mv conftest.$ac_objext conftestm.$ac_objext
1465 ac_save_LIBS="$LIBS"
1466 ac_save_CFLAGS="$CFLAGS"
1467 LIBS="conftestm.$ac_objext"
1468 CFLAGS="$CFLAGS$no_builtin_flag"
1469 if { (eval echo configure:1470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1470 ac_pipe_works=yes
1471 else
1472 echo "configure: failed program was:" >&5
1473 cat conftest.c >&5
1475 LIBS="$ac_save_LIBS"
1476 CFLAGS="$ac_save_CFLAGS"
1477 else
1478 echo "cannot find nm_test_func in $ac_nlist" >&5
1480 else
1481 echo "cannot find nm_test_var in $ac_nlist" >&5
1483 else
1484 echo "cannot run $ac_cv_sys_global_symbol_pipe" >&5
1486 else
1487 echo "$progname: failed program was:" >&5
1488 cat conftest.c >&5
1490 rm -rf conftest*
1492 # Do not use the global_symbol_pipe unless it works.
1493 if test "$ac_pipe_works" = yes; then
1494 if test x"$ac_symprfx" = x"_"; then
1495 ac_cv_sys_symbol_underscore=yes
1496 else
1497 ac_cv_sys_symbol_underscore=no
1499 break
1500 else
1501 ac_cv_sys_global_symbol_pipe=
1503 done
1508 ac_result=yes
1509 if test -z "$ac_cv_sys_global_symbol_pipe"; then
1510 ac_result=no
1512 echo "$ac_t""$ac_result" 1>&6
1514 echo $ac_n "checking for _ prefix in compiled symbols""... $ac_c" 1>&6
1515 echo "configure:1516: checking for _ prefix in compiled symbols" >&5
1516 if eval "test \"`echo '$''{'ac_cv_sys_symbol_underscore'+set}'`\" = set"; then
1517 echo $ac_n "(cached) $ac_c" 1>&6
1518 else
1519 ac_cv_sys_symbol_underscore=no
1520 cat > conftest.$ac_ext <<EOF
1521 void nm_test_func(){}
1522 int main(){nm_test_func;return 0;}
1524 if { (eval echo configure:1525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1525 # Now try to grab the symbols.
1526 ac_nlist=conftest.nm
1527 if { (eval echo configure:1528: \"$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
1528 # See whether the symbols have a leading underscore.
1529 if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
1530 ac_cv_sys_symbol_underscore=yes
1531 else
1532 if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
1534 else
1535 echo "configure: cannot find nm_test_func in $ac_nlist" >&5
1538 else
1539 echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&5
1541 else
1542 echo "configure: failed program was:" >&5
1543 cat conftest.c >&5
1545 rm -rf conftest*
1549 echo "$ac_t""$ac_cv_sys_symbol_underscore" 1>&6
1550 USE_SYMBOL_UNDERSCORE=${ac_cv_sys_symbol_underscore=no}
1552 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1553 echo "configure:1554: checking whether ln -s works" >&5
1554 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1555 echo $ac_n "(cached) $ac_c" 1>&6
1556 else
1557 rm -f conftestdata
1558 if ln -s X conftestdata 2>/dev/null
1559 then
1560 rm -f conftestdata
1561 ac_cv_prog_LN_S="ln -s"
1562 else
1563 ac_cv_prog_LN_S=ln
1566 LN_S="$ac_cv_prog_LN_S"
1567 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1568 echo "$ac_t""yes" 1>&6
1569 else
1570 echo "$ac_t""no" 1>&6
1573 if test $host != $build; then
1574 ac_tool_prefix=${host_alias}-
1575 else
1576 ac_tool_prefix=
1580 # Check for any special flags to pass to ltconfig.
1581 libtool_flags="--cache-file=$cache_file"
1582 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1583 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1584 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
1585 test "$lt_dlopen" = yes && libtool_flags="$libtool_flags --enable-dlopen"
1586 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
1587 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
1588 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
1590 # Some flags need to be propagated to the compiler or linker for good
1591 # libtool support.
1592 case "$host" in
1593 *-*-irix6*)
1594 # Find out which ABI we are using.
1595 echo '#line 1596 "configure"' > conftest.$ac_ext
1596 if { (eval echo configure:1597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1597 case "`/usr/bin/file conftest.o`" in
1598 *32-bit*)
1599 LD="${LD-ld} -32"
1601 *N32*)
1602 LD="${LD-ld} -n32"
1604 *64-bit*)
1605 LD="${LD-ld} -64"
1607 esac
1609 rm -rf conftest*
1612 *-*-sco3.2v5*)
1613 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1614 SAVE_CFLAGS="$CFLAGS"
1615 CFLAGS="$CFLAGS -belf"
1616 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
1617 echo "configure:1618: checking whether the C compiler needs -belf" >&5
1618 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
1619 echo $ac_n "(cached) $ac_c" 1>&6
1620 else
1621 cat > conftest.$ac_ext <<EOF
1622 #line 1623 "configure"
1623 #include "confdefs.h"
1625 int main() {
1627 ; return 0; }
1629 if { (eval echo configure:1630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1630 rm -rf conftest*
1631 lt_cv_cc_needs_belf=yes
1632 else
1633 echo "configure: failed program was:" >&5
1634 cat conftest.$ac_ext >&5
1635 rm -rf conftest*
1636 lt_cv_cc_needs_belf=no
1638 rm -f conftest*
1641 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
1642 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1643 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1644 CFLAGS="$SAVE_CFLAGS"
1648 *-*-cygwin*)
1649 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
1650 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
1651 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1652 echo "configure:1653: checking for $ac_word" >&5
1653 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
1654 echo $ac_n "(cached) $ac_c" 1>&6
1655 else
1656 if test -n "$DLLTOOL"; then
1657 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1658 else
1659 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1660 ac_dummy="$PATH"
1661 for ac_dir in $ac_dummy; do
1662 test -z "$ac_dir" && ac_dir=.
1663 if test -f $ac_dir/$ac_word; then
1664 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
1665 break
1667 done
1668 IFS="$ac_save_ifs"
1671 DLLTOOL="$ac_cv_prog_DLLTOOL"
1672 if test -n "$DLLTOOL"; then
1673 echo "$ac_t""$DLLTOOL" 1>&6
1674 else
1675 echo "$ac_t""no" 1>&6
1679 if test -z "$ac_cv_prog_DLLTOOL"; then
1680 if test -n "$ac_tool_prefix"; then
1681 # Extract the first word of "dlltool", so it can be a program name with args.
1682 set dummy dlltool; ac_word=$2
1683 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1684 echo "configure:1685: checking for $ac_word" >&5
1685 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
1686 echo $ac_n "(cached) $ac_c" 1>&6
1687 else
1688 if test -n "$DLLTOOL"; then
1689 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
1690 else
1691 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1692 ac_dummy="$PATH"
1693 for ac_dir in $ac_dummy; do
1694 test -z "$ac_dir" && ac_dir=.
1695 if test -f $ac_dir/$ac_word; then
1696 ac_cv_prog_DLLTOOL="dlltool"
1697 break
1699 done
1700 IFS="$ac_save_ifs"
1701 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
1704 DLLTOOL="$ac_cv_prog_DLLTOOL"
1705 if test -n "$DLLTOOL"; then
1706 echo "$ac_t""$DLLTOOL" 1>&6
1707 else
1708 echo "$ac_t""no" 1>&6
1711 else
1712 DLLTOOL="false"
1716 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
1717 set dummy ${ac_tool_prefix}as; ac_word=$2
1718 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1719 echo "configure:1720: checking for $ac_word" >&5
1720 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1721 echo $ac_n "(cached) $ac_c" 1>&6
1722 else
1723 if test -n "$AS"; then
1724 ac_cv_prog_AS="$AS" # Let the user override the test.
1725 else
1726 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1727 ac_dummy="$PATH"
1728 for ac_dir in $ac_dummy; do
1729 test -z "$ac_dir" && ac_dir=.
1730 if test -f $ac_dir/$ac_word; then
1731 ac_cv_prog_AS="${ac_tool_prefix}as"
1732 break
1734 done
1735 IFS="$ac_save_ifs"
1738 AS="$ac_cv_prog_AS"
1739 if test -n "$AS"; then
1740 echo "$ac_t""$AS" 1>&6
1741 else
1742 echo "$ac_t""no" 1>&6
1746 if test -z "$ac_cv_prog_AS"; then
1747 if test -n "$ac_tool_prefix"; then
1748 # Extract the first word of "as", so it can be a program name with args.
1749 set dummy as; ac_word=$2
1750 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1751 echo "configure:1752: checking for $ac_word" >&5
1752 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
1753 echo $ac_n "(cached) $ac_c" 1>&6
1754 else
1755 if test -n "$AS"; then
1756 ac_cv_prog_AS="$AS" # Let the user override the test.
1757 else
1758 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1759 ac_dummy="$PATH"
1760 for ac_dir in $ac_dummy; do
1761 test -z "$ac_dir" && ac_dir=.
1762 if test -f $ac_dir/$ac_word; then
1763 ac_cv_prog_AS="as"
1764 break
1766 done
1767 IFS="$ac_save_ifs"
1768 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
1771 AS="$ac_cv_prog_AS"
1772 if test -n "$AS"; then
1773 echo "$ac_t""$AS" 1>&6
1774 else
1775 echo "$ac_t""no" 1>&6
1778 else
1779 AS="false"
1786 esac
1788 # enable the --disable-libtool-lock switch
1790 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1791 if test "${enable_libtool_lock+set}" = set; then
1792 enableval="$enable_libtool_lock"
1793 need_locks=$enableval
1794 else
1795 need_locks=yes
1799 if test x"$need_locks" = xno; then
1800 libtool_flags="$libtool_flags --disable-lock"
1804 # Save cache, so that ltconfig can load it
1805 cat > confcache <<\EOF
1806 # This file is a shell script that caches the results of configure
1807 # tests run on this system so they can be shared between configure
1808 # scripts and configure runs. It is not useful on other systems.
1809 # If it contains results you don't want to keep, you may remove or edit it.
1811 # By default, configure uses ./config.cache as the cache file,
1812 # creating it if it does not exist already. You can give configure
1813 # the --cache-file=FILE option to use a different cache file; that is
1814 # what configure does when it calls configure scripts in
1815 # subdirectories, so they share the cache.
1816 # Giving --cache-file=/dev/null disables caching, for debugging configure.
1817 # config.status only pays attention to the cache file if you give it the
1818 # --recheck option to rerun configure.
1821 # The following way of writing the cache mishandles newlines in values,
1822 # but we know of no workaround that is simple, portable, and efficient.
1823 # So, don't put newlines in cache variables' values.
1824 # Ultrix sh set writes to stderr and can't be redirected directly,
1825 # and sets the high bit in the cache file unless we assign to the vars.
1826 (set) 2>&1 |
1827 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1828 *ac_space=\ *)
1829 # `set' does not quote correctly, so add quotes (double-quote substitution
1830 # turns \\\\ into \\, and sed turns \\ into \).
1831 sed -n \
1832 -e "s/'/'\\\\''/g" \
1833 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1836 # `set' quotes correctly as required by POSIX, so do not add quotes.
1837 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1839 esac >> confcache
1840 if cmp -s $cache_file confcache; then
1842 else
1843 if test -w $cache_file; then
1844 echo "updating cache $cache_file"
1845 cat confcache > $cache_file
1846 else
1847 echo "not updating unwritable cache $cache_file"
1850 rm -f confcache
1853 # Actually configure libtool. ac_aux_dir is where install-sh is found.
1854 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
1855 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
1856 DLLTOOL="$DLLTOOL" AS="$AS" \
1857 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
1858 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
1859 || { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
1861 # Reload cache, that may have been modified by ltconfig
1862 if test -r "$cache_file"; then
1863 echo "loading cache $cache_file"
1864 . $cache_file
1865 else
1866 echo "creating cache $cache_file"
1867 > $cache_file
1871 # This can be used to rebuild libtool when needed
1872 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
1874 # Always use our own libtool.
1875 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1877 # Redirect the config.log output again, so that the ltconfig log is not
1878 # clobbered by the next message.
1879 exec 5>>./config.log
1882 # Check whether --enable-targets or --disable-targets was given.
1883 if test "${enable_targets+set}" = set; then
1884 enableval="$enable_targets"
1885 case "${enableval}" in
1886 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
1888 no) enable_targets= ;;
1889 *) enable_targets=$enableval ;;
1890 esac
1892 # Check whether --enable-commonbfdlib or --disable-commonbfdlib was given.
1893 if test "${enable_commonbfdlib+set}" = set; then
1894 enableval="$enable_commonbfdlib"
1895 case "${enableval}" in
1896 yes) commonbfdlib=true ;;
1897 no) commonbfdlib=false ;;
1898 *) { echo "configure: error: bad value ${enableval} for BFD commonbfdlib option" 1>&2; exit 1; } ;;
1899 esac
1906 if test -z "$target" ; then
1907 { echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
1909 if test -z "$host" ; then
1910 { echo "configure: error: Unrecognized host system type; please check config.sub." 1>&2; exit 1; }
1913 # Extract the first word of "gcc", so it can be a program name with args.
1914 set dummy gcc; ac_word=$2
1915 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1916 echo "configure:1917: checking for $ac_word" >&5
1917 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1918 echo $ac_n "(cached) $ac_c" 1>&6
1919 else
1920 if test -n "$CC"; then
1921 ac_cv_prog_CC="$CC" # Let the user override the test.
1922 else
1923 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1924 ac_dummy="$PATH"
1925 for ac_dir in $ac_dummy; do
1926 test -z "$ac_dir" && ac_dir=.
1927 if test -f $ac_dir/$ac_word; then
1928 ac_cv_prog_CC="gcc"
1929 break
1931 done
1932 IFS="$ac_save_ifs"
1935 CC="$ac_cv_prog_CC"
1936 if test -n "$CC"; then
1937 echo "$ac_t""$CC" 1>&6
1938 else
1939 echo "$ac_t""no" 1>&6
1942 if test -z "$CC"; then
1943 # Extract the first word of "cc", so it can be a program name with args.
1944 set dummy cc; ac_word=$2
1945 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1946 echo "configure:1947: checking for $ac_word" >&5
1947 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1948 echo $ac_n "(cached) $ac_c" 1>&6
1949 else
1950 if test -n "$CC"; then
1951 ac_cv_prog_CC="$CC" # Let the user override the test.
1952 else
1953 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1954 ac_prog_rejected=no
1955 ac_dummy="$PATH"
1956 for ac_dir in $ac_dummy; do
1957 test -z "$ac_dir" && ac_dir=.
1958 if test -f $ac_dir/$ac_word; then
1959 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1960 ac_prog_rejected=yes
1961 continue
1963 ac_cv_prog_CC="cc"
1964 break
1966 done
1967 IFS="$ac_save_ifs"
1968 if test $ac_prog_rejected = yes; then
1969 # We found a bogon in the path, so make sure we never use it.
1970 set dummy $ac_cv_prog_CC
1971 shift
1972 if test $# -gt 0; then
1973 # We chose a different compiler from the bogus one.
1974 # However, it has the same basename, so the bogon will be chosen
1975 # first if we set CC to just the basename; use the full file name.
1976 shift
1977 set dummy "$ac_dir/$ac_word" "$@"
1978 shift
1979 ac_cv_prog_CC="$@"
1984 CC="$ac_cv_prog_CC"
1985 if test -n "$CC"; then
1986 echo "$ac_t""$CC" 1>&6
1987 else
1988 echo "$ac_t""no" 1>&6
1991 if test -z "$CC"; then
1992 case "`uname -s`" in
1993 *win32* | *WIN32*)
1994 # Extract the first word of "cl", so it can be a program name with args.
1995 set dummy cl; ac_word=$2
1996 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1997 echo "configure:1998: checking for $ac_word" >&5
1998 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1999 echo $ac_n "(cached) $ac_c" 1>&6
2000 else
2001 if test -n "$CC"; then
2002 ac_cv_prog_CC="$CC" # Let the user override the test.
2003 else
2004 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2005 ac_dummy="$PATH"
2006 for ac_dir in $ac_dummy; do
2007 test -z "$ac_dir" && ac_dir=.
2008 if test -f $ac_dir/$ac_word; then
2009 ac_cv_prog_CC="cl"
2010 break
2012 done
2013 IFS="$ac_save_ifs"
2016 CC="$ac_cv_prog_CC"
2017 if test -n "$CC"; then
2018 echo "$ac_t""$CC" 1>&6
2019 else
2020 echo "$ac_t""no" 1>&6
2023 esac
2025 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2028 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2029 echo "configure:2030: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2031 ac_ext=c
2032 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2033 ac_cpp='$CPP $CPPFLAGS'
2034 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2035 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2036 cross_compiling=$ac_cv_prog_cc_cross
2038 cat > conftest.$ac_ext << EOF
2040 #line 2041 "configure"
2041 #include "confdefs.h"
2043 main(){return(0);}
2045 if { (eval echo configure:2046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2046 ac_cv_prog_cc_works=yes
2047 # If we can't run a trivial program, we are probably using a cross compiler.
2048 if (./conftest; exit) 2>/dev/null; then
2049 ac_cv_prog_cc_cross=no
2050 else
2051 ac_cv_prog_cc_cross=yes
2053 else
2054 echo "configure: failed program was:" >&5
2055 cat conftest.$ac_ext >&5
2056 ac_cv_prog_cc_works=no
2058 rm -fr conftest*
2059 ac_ext=c
2060 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2061 ac_cpp='$CPP $CPPFLAGS'
2062 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2063 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2064 cross_compiling=$ac_cv_prog_cc_cross
2066 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2067 if test $ac_cv_prog_cc_works = no; then
2068 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2070 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2071 echo "configure:2072: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2072 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2073 cross_compiling=$ac_cv_prog_cc_cross
2075 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2076 echo "configure:2077: checking whether we are using GNU C" >&5
2077 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
2078 echo $ac_n "(cached) $ac_c" 1>&6
2079 else
2080 cat > conftest.c <<EOF
2081 #ifdef __GNUC__
2082 yes;
2083 #endif
2085 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2086 ac_cv_prog_gcc=yes
2087 else
2088 ac_cv_prog_gcc=no
2092 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2094 if test $ac_cv_prog_gcc = yes; then
2095 GCC=yes
2096 else
2097 GCC=
2100 ac_test_CFLAGS="${CFLAGS+set}"
2101 ac_save_CFLAGS="$CFLAGS"
2102 CFLAGS=
2103 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2104 echo "configure:2105: checking whether ${CC-cc} accepts -g" >&5
2105 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
2106 echo $ac_n "(cached) $ac_c" 1>&6
2107 else
2108 echo 'void f(){}' > conftest.c
2109 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2110 ac_cv_prog_cc_g=yes
2111 else
2112 ac_cv_prog_cc_g=no
2114 rm -f conftest*
2118 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2119 if test "$ac_test_CFLAGS" = set; then
2120 CFLAGS="$ac_save_CFLAGS"
2121 elif test $ac_cv_prog_cc_g = yes; then
2122 if test "$GCC" = yes; then
2123 CFLAGS="-g -O2"
2124 else
2125 CFLAGS="-g"
2127 else
2128 if test "$GCC" = yes; then
2129 CFLAGS="-O2"
2130 else
2131 CFLAGS=
2136 for ac_prog in 'bison -y' byacc
2138 # Extract the first word of "$ac_prog", so it can be a program name with args.
2139 set dummy $ac_prog; ac_word=$2
2140 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2141 echo "configure:2142: checking for $ac_word" >&5
2142 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2143 echo $ac_n "(cached) $ac_c" 1>&6
2144 else
2145 if test -n "$YACC"; then
2146 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2147 else
2148 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2149 ac_dummy="$PATH"
2150 for ac_dir in $ac_dummy; do
2151 test -z "$ac_dir" && ac_dir=.
2152 if test -f $ac_dir/$ac_word; then
2153 ac_cv_prog_YACC="$ac_prog"
2154 break
2156 done
2157 IFS="$ac_save_ifs"
2160 YACC="$ac_cv_prog_YACC"
2161 if test -n "$YACC"; then
2162 echo "$ac_t""$YACC" 1>&6
2163 else
2164 echo "$ac_t""no" 1>&6
2167 test -n "$YACC" && break
2168 done
2169 test -n "$YACC" || YACC="yacc"
2171 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2172 echo "configure:2173: checking how to run the C preprocessor" >&5
2173 # On Suns, sometimes $CPP names a directory.
2174 if test -n "$CPP" && test -d "$CPP"; then
2175 CPP=
2177 if test -z "$CPP"; then
2178 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2179 echo $ac_n "(cached) $ac_c" 1>&6
2180 else
2181 # This must be in double quotes, not single quotes, because CPP may get
2182 # substituted into the Makefile and "${CC-cc}" will confuse make.
2183 CPP="${CC-cc} -E"
2184 # On the NeXT, cc -E runs the code through the compiler's parser,
2185 # not just through cpp.
2186 cat > conftest.$ac_ext <<EOF
2187 #line 2188 "configure"
2188 #include "confdefs.h"
2189 #include <assert.h>
2190 Syntax Error
2192 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2193 { (eval echo configure:2194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2194 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2195 if test -z "$ac_err"; then
2197 else
2198 echo "$ac_err" >&5
2199 echo "configure: failed program was:" >&5
2200 cat conftest.$ac_ext >&5
2201 rm -rf conftest*
2202 CPP="${CC-cc} -E -traditional-cpp"
2203 cat > conftest.$ac_ext <<EOF
2204 #line 2205 "configure"
2205 #include "confdefs.h"
2206 #include <assert.h>
2207 Syntax Error
2209 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2210 { (eval echo configure:2211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2211 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2212 if test -z "$ac_err"; then
2214 else
2215 echo "$ac_err" >&5
2216 echo "configure: failed program was:" >&5
2217 cat conftest.$ac_ext >&5
2218 rm -rf conftest*
2219 CPP="${CC-cc} -nologo -E"
2220 cat > conftest.$ac_ext <<EOF
2221 #line 2222 "configure"
2222 #include "confdefs.h"
2223 #include <assert.h>
2224 Syntax Error
2226 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2227 { (eval echo configure:2228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2228 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2229 if test -z "$ac_err"; then
2231 else
2232 echo "$ac_err" >&5
2233 echo "configure: failed program was:" >&5
2234 cat conftest.$ac_ext >&5
2235 rm -rf conftest*
2236 CPP=/lib/cpp
2238 rm -f conftest*
2240 rm -f conftest*
2242 rm -f conftest*
2243 ac_cv_prog_CPP="$CPP"
2245 CPP="$ac_cv_prog_CPP"
2246 else
2247 ac_cv_prog_CPP="$CPP"
2249 echo "$ac_t""$CPP" 1>&6
2251 missing_dir=`cd $ac_aux_dir && pwd`
2252 for ac_prog in flex lex
2254 # Extract the first word of "$ac_prog", so it can be a program name with args.
2255 set dummy $ac_prog; ac_word=$2
2256 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2257 echo "configure:2258: checking for $ac_word" >&5
2258 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
2259 echo $ac_n "(cached) $ac_c" 1>&6
2260 else
2261 if test -n "$LEX"; then
2262 ac_cv_prog_LEX="$LEX" # Let the user override the test.
2263 else
2264 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2265 ac_dummy="$PATH"
2266 for ac_dir in $ac_dummy; do
2267 test -z "$ac_dir" && ac_dir=.
2268 if test -f $ac_dir/$ac_word; then
2269 ac_cv_prog_LEX="$ac_prog"
2270 break
2272 done
2273 IFS="$ac_save_ifs"
2276 LEX="$ac_cv_prog_LEX"
2277 if test -n "$LEX"; then
2278 echo "$ac_t""$LEX" 1>&6
2279 else
2280 echo "$ac_t""no" 1>&6
2283 test -n "$LEX" && break
2284 done
2285 test -n "$LEX" || LEX=""$missing_dir/missing flex""
2287 # Extract the first word of "flex", so it can be a program name with args.
2288 set dummy flex; ac_word=$2
2289 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2290 echo "configure:2291: checking for $ac_word" >&5
2291 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then
2292 echo $ac_n "(cached) $ac_c" 1>&6
2293 else
2294 if test -n "$LEX"; then
2295 ac_cv_prog_LEX="$LEX" # Let the user override the test.
2296 else
2297 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2298 ac_dummy="$PATH"
2299 for ac_dir in $ac_dummy; do
2300 test -z "$ac_dir" && ac_dir=.
2301 if test -f $ac_dir/$ac_word; then
2302 ac_cv_prog_LEX="flex"
2303 break
2305 done
2306 IFS="$ac_save_ifs"
2307 test -z "$ac_cv_prog_LEX" && ac_cv_prog_LEX="lex"
2310 LEX="$ac_cv_prog_LEX"
2311 if test -n "$LEX"; then
2312 echo "$ac_t""$LEX" 1>&6
2313 else
2314 echo "$ac_t""no" 1>&6
2317 if test -z "$LEXLIB"
2318 then
2319 case "$LEX" in
2320 flex*) ac_lib=fl ;;
2321 *) ac_lib=l ;;
2322 esac
2323 echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
2324 echo "configure:2325: checking for yywrap in -l$ac_lib" >&5
2325 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'`
2326 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2327 echo $ac_n "(cached) $ac_c" 1>&6
2328 else
2329 ac_save_LIBS="$LIBS"
2330 LIBS="-l$ac_lib $LIBS"
2331 cat > conftest.$ac_ext <<EOF
2332 #line 2333 "configure"
2333 #include "confdefs.h"
2334 /* Override any gcc2 internal prototype to avoid an error. */
2335 /* We use char because int might match the return type of a gcc2
2336 builtin and then its argument prototype would still apply. */
2337 char yywrap();
2339 int main() {
2340 yywrap()
2341 ; return 0; }
2343 if { (eval echo configure:2344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2344 rm -rf conftest*
2345 eval "ac_cv_lib_$ac_lib_var=yes"
2346 else
2347 echo "configure: failed program was:" >&5
2348 cat conftest.$ac_ext >&5
2349 rm -rf conftest*
2350 eval "ac_cv_lib_$ac_lib_var=no"
2352 rm -f conftest*
2353 LIBS="$ac_save_LIBS"
2356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2357 echo "$ac_t""yes" 1>&6
2358 LEXLIB="-l$ac_lib"
2359 else
2360 echo "$ac_t""no" 1>&6
2365 echo $ac_n "checking lex output file root""... $ac_c" 1>&6
2366 echo "configure:2367: checking lex output file root" >&5
2367 if eval "test \"`echo '$''{'ac_cv_prog_lex_root'+set}'`\" = set"; then
2368 echo $ac_n "(cached) $ac_c" 1>&6
2369 else
2370 # The minimal lex program is just a single line: %%. But some broken lexes
2371 # (Solaris, I think it was) want two %% lines, so accommodate them.
2372 echo '%%
2373 %%' | $LEX
2374 if test -f lex.yy.c; then
2375 ac_cv_prog_lex_root=lex.yy
2376 elif test -f lexyy.c; then
2377 ac_cv_prog_lex_root=lexyy
2378 else
2379 { echo "configure: error: cannot find output from $LEX; giving up" 1>&2; exit 1; }
2383 echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
2384 LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
2386 echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
2387 echo "configure:2388: checking whether yytext is a pointer" >&5
2388 if eval "test \"`echo '$''{'ac_cv_prog_lex_yytext_pointer'+set}'`\" = set"; then
2389 echo $ac_n "(cached) $ac_c" 1>&6
2390 else
2391 # POSIX says lex can declare yytext either as a pointer or an array; the
2392 # default is implementation-dependent. Figure out which it is, since
2393 # not all implementations provide the %pointer and %array declarations.
2394 ac_cv_prog_lex_yytext_pointer=no
2395 echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
2396 ac_save_LIBS="$LIBS"
2397 LIBS="$LIBS $LEXLIB"
2398 cat > conftest.$ac_ext <<EOF
2399 #line 2400 "configure"
2400 #include "confdefs.h"
2401 `cat $LEX_OUTPUT_ROOT.c`
2402 int main() {
2404 ; return 0; }
2406 if { (eval echo configure:2407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2407 rm -rf conftest*
2408 ac_cv_prog_lex_yytext_pointer=yes
2409 else
2410 echo "configure: failed program was:" >&5
2411 cat conftest.$ac_ext >&5
2413 rm -f conftest*
2414 LIBS="$ac_save_LIBS"
2415 rm -f "${LEX_OUTPUT_ROOT}.c"
2419 echo "$ac_t""$ac_cv_prog_lex_yytext_pointer" 1>&6
2420 if test $ac_cv_prog_lex_yytext_pointer = yes; then
2421 cat >> confdefs.h <<\EOF
2422 #define YYTEXT_POINTER 1
2428 ALL_LINGUAS=
2429 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
2430 echo "configure:2431: checking for POSIXized ISC" >&5
2431 if test -d /etc/conf/kconfig.d &&
2432 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2433 then
2434 echo "$ac_t""yes" 1>&6
2435 ISC=yes # If later tests want to check for ISC.
2436 cat >> confdefs.h <<\EOF
2437 #define _POSIX_SOURCE 1
2440 if test "$GCC" = yes; then
2441 CC="$CC -posix"
2442 else
2443 CC="$CC -Xp"
2445 else
2446 echo "$ac_t""no" 1>&6
2447 ISC=
2450 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2451 echo "configure:2452: checking for ANSI C header files" >&5
2452 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2453 echo $ac_n "(cached) $ac_c" 1>&6
2454 else
2455 cat > conftest.$ac_ext <<EOF
2456 #line 2457 "configure"
2457 #include "confdefs.h"
2458 #include <stdlib.h>
2459 #include <stdarg.h>
2460 #include <string.h>
2461 #include <float.h>
2463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2464 { (eval echo configure:2465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2466 if test -z "$ac_err"; then
2467 rm -rf conftest*
2468 ac_cv_header_stdc=yes
2469 else
2470 echo "$ac_err" >&5
2471 echo "configure: failed program was:" >&5
2472 cat conftest.$ac_ext >&5
2473 rm -rf conftest*
2474 ac_cv_header_stdc=no
2476 rm -f conftest*
2478 if test $ac_cv_header_stdc = yes; then
2479 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2480 cat > conftest.$ac_ext <<EOF
2481 #line 2482 "configure"
2482 #include "confdefs.h"
2483 #include <string.h>
2485 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2486 egrep "memchr" >/dev/null 2>&1; then
2488 else
2489 rm -rf conftest*
2490 ac_cv_header_stdc=no
2492 rm -f conftest*
2496 if test $ac_cv_header_stdc = yes; then
2497 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2498 cat > conftest.$ac_ext <<EOF
2499 #line 2500 "configure"
2500 #include "confdefs.h"
2501 #include <stdlib.h>
2503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2504 egrep "free" >/dev/null 2>&1; then
2506 else
2507 rm -rf conftest*
2508 ac_cv_header_stdc=no
2510 rm -f conftest*
2514 if test $ac_cv_header_stdc = yes; then
2515 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2516 if test "$cross_compiling" = yes; then
2518 else
2519 cat > conftest.$ac_ext <<EOF
2520 #line 2521 "configure"
2521 #include "confdefs.h"
2522 #include <ctype.h>
2523 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2524 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2525 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2526 int main () { int i; for (i = 0; i < 256; i++)
2527 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2528 exit (0); }
2531 if { (eval echo configure:2532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2532 then
2534 else
2535 echo "configure: failed program was:" >&5
2536 cat conftest.$ac_ext >&5
2537 rm -fr conftest*
2538 ac_cv_header_stdc=no
2540 rm -fr conftest*
2546 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2547 if test $ac_cv_header_stdc = yes; then
2548 cat >> confdefs.h <<\EOF
2549 #define STDC_HEADERS 1
2554 echo $ac_n "checking for working const""... $ac_c" 1>&6
2555 echo "configure:2556: checking for working const" >&5
2556 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2557 echo $ac_n "(cached) $ac_c" 1>&6
2558 else
2559 cat > conftest.$ac_ext <<EOF
2560 #line 2561 "configure"
2561 #include "confdefs.h"
2563 int main() {
2565 /* Ultrix mips cc rejects this. */
2566 typedef int charset[2]; const charset x;
2567 /* SunOS 4.1.1 cc rejects this. */
2568 char const *const *ccp;
2569 char **p;
2570 /* NEC SVR4.0.2 mips cc rejects this. */
2571 struct point {int x, y;};
2572 static struct point const zero = {0,0};
2573 /* AIX XL C 1.02.0.0 rejects this.
2574 It does not let you subtract one const X* pointer from another in an arm
2575 of an if-expression whose if-part is not a constant expression */
2576 const char *g = "string";
2577 ccp = &g + (g ? g-g : 0);
2578 /* HPUX 7.0 cc rejects these. */
2579 ++ccp;
2580 p = (char**) ccp;
2581 ccp = (char const *const *) p;
2582 { /* SCO 3.2v4 cc rejects this. */
2583 char *t;
2584 char const *s = 0 ? (char *) 0 : (char const *) 0;
2586 *t++ = 0;
2588 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2589 int x[] = {25, 17};
2590 const int *foo = &x[0];
2591 ++foo;
2593 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2594 typedef const int *iptr;
2595 iptr p = 0;
2596 ++p;
2598 { /* AIX XL C 1.02.0.0 rejects this saying
2599 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2600 struct s { int j; const int *ap[3]; };
2601 struct s *b; b->j = 5;
2603 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2604 const int foo = 10;
2607 ; return 0; }
2609 if { (eval echo configure:2610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2610 rm -rf conftest*
2611 ac_cv_c_const=yes
2612 else
2613 echo "configure: failed program was:" >&5
2614 cat conftest.$ac_ext >&5
2615 rm -rf conftest*
2616 ac_cv_c_const=no
2618 rm -f conftest*
2621 echo "$ac_t""$ac_cv_c_const" 1>&6
2622 if test $ac_cv_c_const = no; then
2623 cat >> confdefs.h <<\EOF
2624 #define const
2629 echo $ac_n "checking for inline""... $ac_c" 1>&6
2630 echo "configure:2631: checking for inline" >&5
2631 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2632 echo $ac_n "(cached) $ac_c" 1>&6
2633 else
2634 ac_cv_c_inline=no
2635 for ac_kw in inline __inline__ __inline; do
2636 cat > conftest.$ac_ext <<EOF
2637 #line 2638 "configure"
2638 #include "confdefs.h"
2640 int main() {
2641 } $ac_kw foo() {
2642 ; return 0; }
2644 if { (eval echo configure:2645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2645 rm -rf conftest*
2646 ac_cv_c_inline=$ac_kw; break
2647 else
2648 echo "configure: failed program was:" >&5
2649 cat conftest.$ac_ext >&5
2651 rm -f conftest*
2652 done
2656 echo "$ac_t""$ac_cv_c_inline" 1>&6
2657 case "$ac_cv_c_inline" in
2658 inline | yes) ;;
2659 no) cat >> confdefs.h <<\EOF
2660 #define inline
2663 *) cat >> confdefs.h <<EOF
2664 #define inline $ac_cv_c_inline
2667 esac
2669 echo $ac_n "checking for off_t""... $ac_c" 1>&6
2670 echo "configure:2671: checking for off_t" >&5
2671 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2672 echo $ac_n "(cached) $ac_c" 1>&6
2673 else
2674 cat > conftest.$ac_ext <<EOF
2675 #line 2676 "configure"
2676 #include "confdefs.h"
2677 #include <sys/types.h>
2678 #if STDC_HEADERS
2679 #include <stdlib.h>
2680 #include <stddef.h>
2681 #endif
2683 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2684 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2685 rm -rf conftest*
2686 ac_cv_type_off_t=yes
2687 else
2688 rm -rf conftest*
2689 ac_cv_type_off_t=no
2691 rm -f conftest*
2694 echo "$ac_t""$ac_cv_type_off_t" 1>&6
2695 if test $ac_cv_type_off_t = no; then
2696 cat >> confdefs.h <<\EOF
2697 #define off_t long
2702 echo $ac_n "checking for size_t""... $ac_c" 1>&6
2703 echo "configure:2704: checking for size_t" >&5
2704 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2705 echo $ac_n "(cached) $ac_c" 1>&6
2706 else
2707 cat > conftest.$ac_ext <<EOF
2708 #line 2709 "configure"
2709 #include "confdefs.h"
2710 #include <sys/types.h>
2711 #if STDC_HEADERS
2712 #include <stdlib.h>
2713 #include <stddef.h>
2714 #endif
2716 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2717 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2718 rm -rf conftest*
2719 ac_cv_type_size_t=yes
2720 else
2721 rm -rf conftest*
2722 ac_cv_type_size_t=no
2724 rm -f conftest*
2727 echo "$ac_t""$ac_cv_type_size_t" 1>&6
2728 if test $ac_cv_type_size_t = no; then
2729 cat >> confdefs.h <<\EOF
2730 #define size_t unsigned
2735 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
2736 # for constant arguments. Useless!
2737 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
2738 echo "configure:2739: checking for working alloca.h" >&5
2739 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
2740 echo $ac_n "(cached) $ac_c" 1>&6
2741 else
2742 cat > conftest.$ac_ext <<EOF
2743 #line 2744 "configure"
2744 #include "confdefs.h"
2745 #include <alloca.h>
2746 int main() {
2747 char *p = alloca(2 * sizeof(int));
2748 ; return 0; }
2750 if { (eval echo configure:2751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2751 rm -rf conftest*
2752 ac_cv_header_alloca_h=yes
2753 else
2754 echo "configure: failed program was:" >&5
2755 cat conftest.$ac_ext >&5
2756 rm -rf conftest*
2757 ac_cv_header_alloca_h=no
2759 rm -f conftest*
2762 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
2763 if test $ac_cv_header_alloca_h = yes; then
2764 cat >> confdefs.h <<\EOF
2765 #define HAVE_ALLOCA_H 1
2770 echo $ac_n "checking for alloca""... $ac_c" 1>&6
2771 echo "configure:2772: checking for alloca" >&5
2772 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
2773 echo $ac_n "(cached) $ac_c" 1>&6
2774 else
2775 cat > conftest.$ac_ext <<EOF
2776 #line 2777 "configure"
2777 #include "confdefs.h"
2779 #ifdef __GNUC__
2780 # define alloca __builtin_alloca
2781 #else
2782 # ifdef _MSC_VER
2783 # include <malloc.h>
2784 # define alloca _alloca
2785 # else
2786 # if HAVE_ALLOCA_H
2787 # include <alloca.h>
2788 # else
2789 # ifdef _AIX
2790 #pragma alloca
2791 # else
2792 # ifndef alloca /* predefined by HP cc +Olibcalls */
2793 char *alloca ();
2794 # endif
2795 # endif
2796 # endif
2797 # endif
2798 #endif
2800 int main() {
2801 char *p = (char *) alloca(1);
2802 ; return 0; }
2804 if { (eval echo configure:2805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2805 rm -rf conftest*
2806 ac_cv_func_alloca_works=yes
2807 else
2808 echo "configure: failed program was:" >&5
2809 cat conftest.$ac_ext >&5
2810 rm -rf conftest*
2811 ac_cv_func_alloca_works=no
2813 rm -f conftest*
2816 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
2817 if test $ac_cv_func_alloca_works = yes; then
2818 cat >> confdefs.h <<\EOF
2819 #define HAVE_ALLOCA 1
2824 if test $ac_cv_func_alloca_works = no; then
2825 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
2826 # that cause trouble. Some versions do not even contain alloca or
2827 # contain a buggy version. If you still want to use their alloca,
2828 # use ar to extract alloca.o from them instead of compiling alloca.c.
2829 ALLOCA=alloca.${ac_objext}
2830 cat >> confdefs.h <<\EOF
2831 #define C_ALLOCA 1
2835 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
2836 echo "configure:2837: checking whether alloca needs Cray hooks" >&5
2837 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
2838 echo $ac_n "(cached) $ac_c" 1>&6
2839 else
2840 cat > conftest.$ac_ext <<EOF
2841 #line 2842 "configure"
2842 #include "confdefs.h"
2843 #if defined(CRAY) && ! defined(CRAY2)
2844 webecray
2845 #else
2846 wenotbecray
2847 #endif
2850 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2851 egrep "webecray" >/dev/null 2>&1; then
2852 rm -rf conftest*
2853 ac_cv_os_cray=yes
2854 else
2855 rm -rf conftest*
2856 ac_cv_os_cray=no
2858 rm -f conftest*
2862 echo "$ac_t""$ac_cv_os_cray" 1>&6
2863 if test $ac_cv_os_cray = yes; then
2864 for ac_func in _getb67 GETB67 getb67; do
2865 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2866 echo "configure:2867: checking for $ac_func" >&5
2867 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2868 echo $ac_n "(cached) $ac_c" 1>&6
2869 else
2870 cat > conftest.$ac_ext <<EOF
2871 #line 2872 "configure"
2872 #include "confdefs.h"
2873 /* System header to define __stub macros and hopefully few prototypes,
2874 which can conflict with char $ac_func(); below. */
2875 #include <assert.h>
2876 /* Override any gcc2 internal prototype to avoid an error. */
2877 /* We use char because int might match the return type of a gcc2
2878 builtin and then its argument prototype would still apply. */
2879 char $ac_func();
2881 int main() {
2883 /* The GNU C library defines this for functions which it implements
2884 to always fail with ENOSYS. Some functions are actually named
2885 something starting with __ and the normal name is an alias. */
2886 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2887 choke me
2888 #else
2889 $ac_func();
2890 #endif
2892 ; return 0; }
2894 if { (eval echo configure:2895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2895 rm -rf conftest*
2896 eval "ac_cv_func_$ac_func=yes"
2897 else
2898 echo "configure: failed program was:" >&5
2899 cat conftest.$ac_ext >&5
2900 rm -rf conftest*
2901 eval "ac_cv_func_$ac_func=no"
2903 rm -f conftest*
2906 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2907 echo "$ac_t""yes" 1>&6
2908 cat >> confdefs.h <<EOF
2909 #define CRAY_STACKSEG_END $ac_func
2912 break
2913 else
2914 echo "$ac_t""no" 1>&6
2917 done
2920 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
2921 echo "configure:2922: checking stack direction for C alloca" >&5
2922 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
2923 echo $ac_n "(cached) $ac_c" 1>&6
2924 else
2925 if test "$cross_compiling" = yes; then
2926 ac_cv_c_stack_direction=0
2927 else
2928 cat > conftest.$ac_ext <<EOF
2929 #line 2930 "configure"
2930 #include "confdefs.h"
2931 find_stack_direction ()
2933 static char *addr = 0;
2934 auto char dummy;
2935 if (addr == 0)
2937 addr = &dummy;
2938 return find_stack_direction ();
2940 else
2941 return (&dummy > addr) ? 1 : -1;
2943 main ()
2945 exit (find_stack_direction() < 0);
2948 if { (eval echo configure:2949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2949 then
2950 ac_cv_c_stack_direction=1
2951 else
2952 echo "configure: failed program was:" >&5
2953 cat conftest.$ac_ext >&5
2954 rm -fr conftest*
2955 ac_cv_c_stack_direction=-1
2957 rm -fr conftest*
2962 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
2963 cat >> confdefs.h <<EOF
2964 #define STACK_DIRECTION $ac_cv_c_stack_direction
2969 for ac_hdr in unistd.h
2971 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2972 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2973 echo "configure:2974: checking for $ac_hdr" >&5
2974 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2975 echo $ac_n "(cached) $ac_c" 1>&6
2976 else
2977 cat > conftest.$ac_ext <<EOF
2978 #line 2979 "configure"
2979 #include "confdefs.h"
2980 #include <$ac_hdr>
2982 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2983 { (eval echo configure:2984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2984 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2985 if test -z "$ac_err"; then
2986 rm -rf conftest*
2987 eval "ac_cv_header_$ac_safe=yes"
2988 else
2989 echo "$ac_err" >&5
2990 echo "configure: failed program was:" >&5
2991 cat conftest.$ac_ext >&5
2992 rm -rf conftest*
2993 eval "ac_cv_header_$ac_safe=no"
2995 rm -f conftest*
2997 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2998 echo "$ac_t""yes" 1>&6
2999 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3000 cat >> confdefs.h <<EOF
3001 #define $ac_tr_hdr 1
3004 else
3005 echo "$ac_t""no" 1>&6
3007 done
3009 for ac_func in getpagesize
3011 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3012 echo "configure:3013: checking for $ac_func" >&5
3013 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3014 echo $ac_n "(cached) $ac_c" 1>&6
3015 else
3016 cat > conftest.$ac_ext <<EOF
3017 #line 3018 "configure"
3018 #include "confdefs.h"
3019 /* System header to define __stub macros and hopefully few prototypes,
3020 which can conflict with char $ac_func(); below. */
3021 #include <assert.h>
3022 /* Override any gcc2 internal prototype to avoid an error. */
3023 /* We use char because int might match the return type of a gcc2
3024 builtin and then its argument prototype would still apply. */
3025 char $ac_func();
3027 int main() {
3029 /* The GNU C library defines this for functions which it implements
3030 to always fail with ENOSYS. Some functions are actually named
3031 something starting with __ and the normal name is an alias. */
3032 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3033 choke me
3034 #else
3035 $ac_func();
3036 #endif
3038 ; return 0; }
3040 if { (eval echo configure:3041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3041 rm -rf conftest*
3042 eval "ac_cv_func_$ac_func=yes"
3043 else
3044 echo "configure: failed program was:" >&5
3045 cat conftest.$ac_ext >&5
3046 rm -rf conftest*
3047 eval "ac_cv_func_$ac_func=no"
3049 rm -f conftest*
3052 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3053 echo "$ac_t""yes" 1>&6
3054 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3055 cat >> confdefs.h <<EOF
3056 #define $ac_tr_func 1
3059 else
3060 echo "$ac_t""no" 1>&6
3062 done
3064 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
3065 echo "configure:3066: checking for working mmap" >&5
3066 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
3067 echo $ac_n "(cached) $ac_c" 1>&6
3068 else
3069 if test "$cross_compiling" = yes; then
3070 ac_cv_func_mmap_fixed_mapped=no
3071 else
3072 cat > conftest.$ac_ext <<EOF
3073 #line 3074 "configure"
3074 #include "confdefs.h"
3076 /* Thanks to Mike Haertel and Jim Avera for this test.
3077 Here is a matrix of mmap possibilities:
3078 mmap private not fixed
3079 mmap private fixed at somewhere currently unmapped
3080 mmap private fixed at somewhere already mapped
3081 mmap shared not fixed
3082 mmap shared fixed at somewhere currently unmapped
3083 mmap shared fixed at somewhere already mapped
3084 For private mappings, we should verify that changes cannot be read()
3085 back from the file, nor mmap's back from the file at a different
3086 address. (There have been systems where private was not correctly
3087 implemented like the infamous i386 svr4.0, and systems where the
3088 VM page cache was not coherent with the filesystem buffer cache
3089 like early versions of FreeBSD and possibly contemporary NetBSD.)
3090 For shared mappings, we should conversely verify that changes get
3091 propogated back to all the places they're supposed to be.
3093 Grep wants private fixed already mapped.
3094 The main things grep needs to know about mmap are:
3095 * does it exist and is it safe to write into the mmap'd area
3096 * how to use it (BSD variants) */
3097 #include <sys/types.h>
3098 #include <fcntl.h>
3099 #include <sys/mman.h>
3101 /* This mess was copied from the GNU getpagesize.h. */
3102 #ifndef HAVE_GETPAGESIZE
3103 # ifdef HAVE_UNISTD_H
3104 # include <unistd.h>
3105 # endif
3107 /* Assume that all systems that can run configure have sys/param.h. */
3108 # ifndef HAVE_SYS_PARAM_H
3109 # define HAVE_SYS_PARAM_H 1
3110 # endif
3112 # ifdef _SC_PAGESIZE
3113 # define getpagesize() sysconf(_SC_PAGESIZE)
3114 # else /* no _SC_PAGESIZE */
3115 # ifdef HAVE_SYS_PARAM_H
3116 # include <sys/param.h>
3117 # ifdef EXEC_PAGESIZE
3118 # define getpagesize() EXEC_PAGESIZE
3119 # else /* no EXEC_PAGESIZE */
3120 # ifdef NBPG
3121 # define getpagesize() NBPG * CLSIZE
3122 # ifndef CLSIZE
3123 # define CLSIZE 1
3124 # endif /* no CLSIZE */
3125 # else /* no NBPG */
3126 # ifdef NBPC
3127 # define getpagesize() NBPC
3128 # else /* no NBPC */
3129 # ifdef PAGESIZE
3130 # define getpagesize() PAGESIZE
3131 # endif /* PAGESIZE */
3132 # endif /* no NBPC */
3133 # endif /* no NBPG */
3134 # endif /* no EXEC_PAGESIZE */
3135 # else /* no HAVE_SYS_PARAM_H */
3136 # define getpagesize() 8192 /* punt totally */
3137 # endif /* no HAVE_SYS_PARAM_H */
3138 # endif /* no _SC_PAGESIZE */
3140 #endif /* no HAVE_GETPAGESIZE */
3142 #ifdef __cplusplus
3143 extern "C" { void *malloc(unsigned); }
3144 #else
3145 char *malloc();
3146 #endif
3149 main()
3151 char *data, *data2, *data3;
3152 int i, pagesize;
3153 int fd;
3155 pagesize = getpagesize();
3158 * First, make a file with some known garbage in it.
3160 data = malloc(pagesize);
3161 if (!data)
3162 exit(1);
3163 for (i = 0; i < pagesize; ++i)
3164 *(data + i) = rand();
3165 umask(0);
3166 fd = creat("conftestmmap", 0600);
3167 if (fd < 0)
3168 exit(1);
3169 if (write(fd, data, pagesize) != pagesize)
3170 exit(1);
3171 close(fd);
3174 * Next, try to mmap the file at a fixed address which
3175 * already has something else allocated at it. If we can,
3176 * also make sure that we see the same garbage.
3178 fd = open("conftestmmap", O_RDWR);
3179 if (fd < 0)
3180 exit(1);
3181 data2 = malloc(2 * pagesize);
3182 if (!data2)
3183 exit(1);
3184 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
3185 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
3186 MAP_PRIVATE | MAP_FIXED, fd, 0L))
3187 exit(1);
3188 for (i = 0; i < pagesize; ++i)
3189 if (*(data + i) != *(data2 + i))
3190 exit(1);
3193 * Finally, make sure that changes to the mapped area
3194 * do not percolate back to the file as seen by read().
3195 * (This is a bug on some variants of i386 svr4.0.)
3197 for (i = 0; i < pagesize; ++i)
3198 *(data2 + i) = *(data2 + i) + 1;
3199 data3 = malloc(pagesize);
3200 if (!data3)
3201 exit(1);
3202 if (read(fd, data3, pagesize) != pagesize)
3203 exit(1);
3204 for (i = 0; i < pagesize; ++i)
3205 if (*(data + i) != *(data3 + i))
3206 exit(1);
3207 close(fd);
3208 unlink("conftestmmap");
3209 exit(0);
3213 if { (eval echo configure:3214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3214 then
3215 ac_cv_func_mmap_fixed_mapped=yes
3216 else
3217 echo "configure: failed program was:" >&5
3218 cat conftest.$ac_ext >&5
3219 rm -fr conftest*
3220 ac_cv_func_mmap_fixed_mapped=no
3222 rm -fr conftest*
3227 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
3228 if test $ac_cv_func_mmap_fixed_mapped = yes; then
3229 cat >> confdefs.h <<\EOF
3230 #define HAVE_MMAP 1
3236 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
3237 unistd.h values.h sys/param.h
3239 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3240 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3241 echo "configure:3242: checking for $ac_hdr" >&5
3242 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3243 echo $ac_n "(cached) $ac_c" 1>&6
3244 else
3245 cat > conftest.$ac_ext <<EOF
3246 #line 3247 "configure"
3247 #include "confdefs.h"
3248 #include <$ac_hdr>
3250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3251 { (eval echo configure:3252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3252 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3253 if test -z "$ac_err"; then
3254 rm -rf conftest*
3255 eval "ac_cv_header_$ac_safe=yes"
3256 else
3257 echo "$ac_err" >&5
3258 echo "configure: failed program was:" >&5
3259 cat conftest.$ac_ext >&5
3260 rm -rf conftest*
3261 eval "ac_cv_header_$ac_safe=no"
3263 rm -f conftest*
3265 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3266 echo "$ac_t""yes" 1>&6
3267 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3268 cat >> confdefs.h <<EOF
3269 #define $ac_tr_hdr 1
3272 else
3273 echo "$ac_t""no" 1>&6
3275 done
3277 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
3278 __argz_count __argz_stringify __argz_next
3280 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3281 echo "configure:3282: checking for $ac_func" >&5
3282 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3283 echo $ac_n "(cached) $ac_c" 1>&6
3284 else
3285 cat > conftest.$ac_ext <<EOF
3286 #line 3287 "configure"
3287 #include "confdefs.h"
3288 /* System header to define __stub macros and hopefully few prototypes,
3289 which can conflict with char $ac_func(); below. */
3290 #include <assert.h>
3291 /* Override any gcc2 internal prototype to avoid an error. */
3292 /* We use char because int might match the return type of a gcc2
3293 builtin and then its argument prototype would still apply. */
3294 char $ac_func();
3296 int main() {
3298 /* The GNU C library defines this for functions which it implements
3299 to always fail with ENOSYS. Some functions are actually named
3300 something starting with __ and the normal name is an alias. */
3301 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3302 choke me
3303 #else
3304 $ac_func();
3305 #endif
3307 ; return 0; }
3309 if { (eval echo configure:3310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3310 rm -rf conftest*
3311 eval "ac_cv_func_$ac_func=yes"
3312 else
3313 echo "configure: failed program was:" >&5
3314 cat conftest.$ac_ext >&5
3315 rm -rf conftest*
3316 eval "ac_cv_func_$ac_func=no"
3318 rm -f conftest*
3321 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3322 echo "$ac_t""yes" 1>&6
3323 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3324 cat >> confdefs.h <<EOF
3325 #define $ac_tr_func 1
3328 else
3329 echo "$ac_t""no" 1>&6
3331 done
3334 if test "${ac_cv_func_stpcpy+set}" != "set"; then
3335 for ac_func in stpcpy
3337 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3338 echo "configure:3339: checking for $ac_func" >&5
3339 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3340 echo $ac_n "(cached) $ac_c" 1>&6
3341 else
3342 cat > conftest.$ac_ext <<EOF
3343 #line 3344 "configure"
3344 #include "confdefs.h"
3345 /* System header to define __stub macros and hopefully few prototypes,
3346 which can conflict with char $ac_func(); below. */
3347 #include <assert.h>
3348 /* Override any gcc2 internal prototype to avoid an error. */
3349 /* We use char because int might match the return type of a gcc2
3350 builtin and then its argument prototype would still apply. */
3351 char $ac_func();
3353 int main() {
3355 /* The GNU C library defines this for functions which it implements
3356 to always fail with ENOSYS. Some functions are actually named
3357 something starting with __ and the normal name is an alias. */
3358 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3359 choke me
3360 #else
3361 $ac_func();
3362 #endif
3364 ; return 0; }
3366 if { (eval echo configure:3367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3367 rm -rf conftest*
3368 eval "ac_cv_func_$ac_func=yes"
3369 else
3370 echo "configure: failed program was:" >&5
3371 cat conftest.$ac_ext >&5
3372 rm -rf conftest*
3373 eval "ac_cv_func_$ac_func=no"
3375 rm -f conftest*
3378 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3379 echo "$ac_t""yes" 1>&6
3380 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3381 cat >> confdefs.h <<EOF
3382 #define $ac_tr_func 1
3385 else
3386 echo "$ac_t""no" 1>&6
3388 done
3391 if test "${ac_cv_func_stpcpy}" = "yes"; then
3392 cat >> confdefs.h <<\EOF
3393 #define HAVE_STPCPY 1
3398 if test $ac_cv_header_locale_h = yes; then
3399 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
3400 echo "configure:3401: checking for LC_MESSAGES" >&5
3401 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
3402 echo $ac_n "(cached) $ac_c" 1>&6
3403 else
3404 cat > conftest.$ac_ext <<EOF
3405 #line 3406 "configure"
3406 #include "confdefs.h"
3407 #include <locale.h>
3408 int main() {
3409 return LC_MESSAGES
3410 ; return 0; }
3412 if { (eval echo configure:3413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3413 rm -rf conftest*
3414 am_cv_val_LC_MESSAGES=yes
3415 else
3416 echo "configure: failed program was:" >&5
3417 cat conftest.$ac_ext >&5
3418 rm -rf conftest*
3419 am_cv_val_LC_MESSAGES=no
3421 rm -f conftest*
3424 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
3425 if test $am_cv_val_LC_MESSAGES = yes; then
3426 cat >> confdefs.h <<\EOF
3427 #define HAVE_LC_MESSAGES 1
3432 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
3433 echo "configure:3434: checking whether NLS is requested" >&5
3434 # Check whether --enable-nls or --disable-nls was given.
3435 if test "${enable_nls+set}" = set; then
3436 enableval="$enable_nls"
3437 USE_NLS=$enableval
3438 else
3439 USE_NLS=yes
3442 echo "$ac_t""$USE_NLS" 1>&6
3445 USE_INCLUDED_LIBINTL=no
3447 if test "$USE_NLS" = "yes"; then
3448 cat >> confdefs.h <<\EOF
3449 #define ENABLE_NLS 1
3452 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
3453 echo "configure:3454: checking whether included gettext is requested" >&5
3454 # Check whether --with-included-gettext or --without-included-gettext was given.
3455 if test "${with_included_gettext+set}" = set; then
3456 withval="$with_included_gettext"
3457 nls_cv_force_use_gnu_gettext=$withval
3458 else
3459 nls_cv_force_use_gnu_gettext=no
3462 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
3464 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
3465 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
3466 nls_cv_header_intl=
3467 nls_cv_header_libgt=
3468 CATOBJEXT=NONE
3470 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
3471 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
3472 echo "configure:3473: checking for libintl.h" >&5
3473 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3474 echo $ac_n "(cached) $ac_c" 1>&6
3475 else
3476 cat > conftest.$ac_ext <<EOF
3477 #line 3478 "configure"
3478 #include "confdefs.h"
3479 #include <libintl.h>
3481 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3482 { (eval echo configure:3483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3483 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3484 if test -z "$ac_err"; then
3485 rm -rf conftest*
3486 eval "ac_cv_header_$ac_safe=yes"
3487 else
3488 echo "$ac_err" >&5
3489 echo "configure: failed program was:" >&5
3490 cat conftest.$ac_ext >&5
3491 rm -rf conftest*
3492 eval "ac_cv_header_$ac_safe=no"
3494 rm -f conftest*
3496 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3497 echo "$ac_t""yes" 1>&6
3498 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
3499 echo "configure:3500: checking for gettext in libc" >&5
3500 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
3501 echo $ac_n "(cached) $ac_c" 1>&6
3502 else
3503 cat > conftest.$ac_ext <<EOF
3504 #line 3505 "configure"
3505 #include "confdefs.h"
3506 #include <libintl.h>
3507 int main() {
3508 return (int) gettext ("")
3509 ; return 0; }
3511 if { (eval echo configure:3512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3512 rm -rf conftest*
3513 gt_cv_func_gettext_libc=yes
3514 else
3515 echo "configure: failed program was:" >&5
3516 cat conftest.$ac_ext >&5
3517 rm -rf conftest*
3518 gt_cv_func_gettext_libc=no
3520 rm -f conftest*
3523 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
3525 if test "$gt_cv_func_gettext_libc" != "yes"; then
3526 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
3527 echo "configure:3528: checking for bindtextdomain in -lintl" >&5
3528 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
3529 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3530 echo $ac_n "(cached) $ac_c" 1>&6
3531 else
3532 ac_save_LIBS="$LIBS"
3533 LIBS="-lintl $LIBS"
3534 cat > conftest.$ac_ext <<EOF
3535 #line 3536 "configure"
3536 #include "confdefs.h"
3537 /* Override any gcc2 internal prototype to avoid an error. */
3538 /* We use char because int might match the return type of a gcc2
3539 builtin and then its argument prototype would still apply. */
3540 char bindtextdomain();
3542 int main() {
3543 bindtextdomain()
3544 ; return 0; }
3546 if { (eval echo configure:3547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3547 rm -rf conftest*
3548 eval "ac_cv_lib_$ac_lib_var=yes"
3549 else
3550 echo "configure: failed program was:" >&5
3551 cat conftest.$ac_ext >&5
3552 rm -rf conftest*
3553 eval "ac_cv_lib_$ac_lib_var=no"
3555 rm -f conftest*
3556 LIBS="$ac_save_LIBS"
3559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3560 echo "$ac_t""yes" 1>&6
3561 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
3562 echo "configure:3563: checking for gettext in libintl" >&5
3563 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
3564 echo $ac_n "(cached) $ac_c" 1>&6
3565 else
3566 cat > conftest.$ac_ext <<EOF
3567 #line 3568 "configure"
3568 #include "confdefs.h"
3570 int main() {
3571 return (int) gettext ("")
3572 ; return 0; }
3574 if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3575 rm -rf conftest*
3576 gt_cv_func_gettext_libintl=yes
3577 else
3578 echo "configure: failed program was:" >&5
3579 cat conftest.$ac_ext >&5
3580 rm -rf conftest*
3581 gt_cv_func_gettext_libintl=no
3583 rm -f conftest*
3586 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
3587 else
3588 echo "$ac_t""no" 1>&6
3593 if test "$gt_cv_func_gettext_libc" = "yes" \
3594 || test "$gt_cv_func_gettext_libintl" = "yes"; then
3595 cat >> confdefs.h <<\EOF
3596 #define HAVE_GETTEXT 1
3599 # Extract the first word of "msgfmt", so it can be a program name with args.
3600 set dummy msgfmt; ac_word=$2
3601 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3602 echo "configure:3603: checking for $ac_word" >&5
3603 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3604 echo $ac_n "(cached) $ac_c" 1>&6
3605 else
3606 case "$MSGFMT" in
3608 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3611 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3612 for ac_dir in $PATH; do
3613 test -z "$ac_dir" && ac_dir=.
3614 if test -f $ac_dir/$ac_word; then
3615 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3616 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3617 break
3620 done
3621 IFS="$ac_save_ifs"
3622 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
3624 esac
3626 MSGFMT="$ac_cv_path_MSGFMT"
3627 if test -n "$MSGFMT"; then
3628 echo "$ac_t""$MSGFMT" 1>&6
3629 else
3630 echo "$ac_t""no" 1>&6
3632 if test "$MSGFMT" != "no"; then
3633 for ac_func in dcgettext
3635 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3636 echo "configure:3637: checking for $ac_func" >&5
3637 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3638 echo $ac_n "(cached) $ac_c" 1>&6
3639 else
3640 cat > conftest.$ac_ext <<EOF
3641 #line 3642 "configure"
3642 #include "confdefs.h"
3643 /* System header to define __stub macros and hopefully few prototypes,
3644 which can conflict with char $ac_func(); below. */
3645 #include <assert.h>
3646 /* Override any gcc2 internal prototype to avoid an error. */
3647 /* We use char because int might match the return type of a gcc2
3648 builtin and then its argument prototype would still apply. */
3649 char $ac_func();
3651 int main() {
3653 /* The GNU C library defines this for functions which it implements
3654 to always fail with ENOSYS. Some functions are actually named
3655 something starting with __ and the normal name is an alias. */
3656 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3657 choke me
3658 #else
3659 $ac_func();
3660 #endif
3662 ; return 0; }
3664 if { (eval echo configure:3665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3665 rm -rf conftest*
3666 eval "ac_cv_func_$ac_func=yes"
3667 else
3668 echo "configure: failed program was:" >&5
3669 cat conftest.$ac_ext >&5
3670 rm -rf conftest*
3671 eval "ac_cv_func_$ac_func=no"
3673 rm -f conftest*
3676 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3677 echo "$ac_t""yes" 1>&6
3678 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3679 cat >> confdefs.h <<EOF
3680 #define $ac_tr_func 1
3683 else
3684 echo "$ac_t""no" 1>&6
3686 done
3688 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3689 set dummy gmsgfmt; ac_word=$2
3690 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3691 echo "configure:3692: checking for $ac_word" >&5
3692 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3693 echo $ac_n "(cached) $ac_c" 1>&6
3694 else
3695 case "$GMSGFMT" in
3697 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3699 ?:/*)
3700 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3703 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3704 ac_dummy="$PATH"
3705 for ac_dir in $ac_dummy; do
3706 test -z "$ac_dir" && ac_dir=.
3707 if test -f $ac_dir/$ac_word; then
3708 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3709 break
3711 done
3712 IFS="$ac_save_ifs"
3713 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3715 esac
3717 GMSGFMT="$ac_cv_path_GMSGFMT"
3718 if test -n "$GMSGFMT"; then
3719 echo "$ac_t""$GMSGFMT" 1>&6
3720 else
3721 echo "$ac_t""no" 1>&6
3724 # Extract the first word of "xgettext", so it can be a program name with args.
3725 set dummy xgettext; ac_word=$2
3726 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3727 echo "configure:3728: checking for $ac_word" >&5
3728 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3729 echo $ac_n "(cached) $ac_c" 1>&6
3730 else
3731 case "$XGETTEXT" in
3733 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3736 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3737 for ac_dir in $PATH; do
3738 test -z "$ac_dir" && ac_dir=.
3739 if test -f $ac_dir/$ac_word; then
3740 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3741 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3742 break
3745 done
3746 IFS="$ac_save_ifs"
3747 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3749 esac
3751 XGETTEXT="$ac_cv_path_XGETTEXT"
3752 if test -n "$XGETTEXT"; then
3753 echo "$ac_t""$XGETTEXT" 1>&6
3754 else
3755 echo "$ac_t""no" 1>&6
3758 cat > conftest.$ac_ext <<EOF
3759 #line 3760 "configure"
3760 #include "confdefs.h"
3762 int main() {
3763 extern int _nl_msg_cat_cntr;
3764 return _nl_msg_cat_cntr
3765 ; return 0; }
3767 if { (eval echo configure:3768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3768 rm -rf conftest*
3769 CATOBJEXT=.gmo
3770 DATADIRNAME=share
3771 else
3772 echo "configure: failed program was:" >&5
3773 cat conftest.$ac_ext >&5
3774 rm -rf conftest*
3775 CATOBJEXT=.mo
3776 DATADIRNAME=lib
3778 rm -f conftest*
3779 INSTOBJEXT=.mo
3783 else
3784 echo "$ac_t""no" 1>&6
3789 if test "$CATOBJEXT" = "NONE"; then
3790 nls_cv_use_gnu_gettext=yes
3794 if test "$nls_cv_use_gnu_gettext" = "yes"; then
3795 INTLOBJS="\$(GETTOBJS)"
3796 # Extract the first word of "msgfmt", so it can be a program name with args.
3797 set dummy msgfmt; ac_word=$2
3798 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3799 echo "configure:3800: checking for $ac_word" >&5
3800 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
3801 echo $ac_n "(cached) $ac_c" 1>&6
3802 else
3803 case "$MSGFMT" in
3805 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
3808 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3809 for ac_dir in $PATH; do
3810 test -z "$ac_dir" && ac_dir=.
3811 if test -f $ac_dir/$ac_word; then
3812 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
3813 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
3814 break
3817 done
3818 IFS="$ac_save_ifs"
3819 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
3821 esac
3823 MSGFMT="$ac_cv_path_MSGFMT"
3824 if test -n "$MSGFMT"; then
3825 echo "$ac_t""$MSGFMT" 1>&6
3826 else
3827 echo "$ac_t""no" 1>&6
3830 # Extract the first word of "gmsgfmt", so it can be a program name with args.
3831 set dummy gmsgfmt; ac_word=$2
3832 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3833 echo "configure:3834: checking for $ac_word" >&5
3834 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
3835 echo $ac_n "(cached) $ac_c" 1>&6
3836 else
3837 case "$GMSGFMT" in
3839 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
3841 ?:/*)
3842 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
3845 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3846 ac_dummy="$PATH"
3847 for ac_dir in $ac_dummy; do
3848 test -z "$ac_dir" && ac_dir=.
3849 if test -f $ac_dir/$ac_word; then
3850 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
3851 break
3853 done
3854 IFS="$ac_save_ifs"
3855 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
3857 esac
3859 GMSGFMT="$ac_cv_path_GMSGFMT"
3860 if test -n "$GMSGFMT"; then
3861 echo "$ac_t""$GMSGFMT" 1>&6
3862 else
3863 echo "$ac_t""no" 1>&6
3866 # Extract the first word of "xgettext", so it can be a program name with args.
3867 set dummy xgettext; ac_word=$2
3868 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3869 echo "configure:3870: checking for $ac_word" >&5
3870 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
3871 echo $ac_n "(cached) $ac_c" 1>&6
3872 else
3873 case "$XGETTEXT" in
3875 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
3878 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3879 for ac_dir in $PATH; do
3880 test -z "$ac_dir" && ac_dir=.
3881 if test -f $ac_dir/$ac_word; then
3882 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
3883 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
3884 break
3887 done
3888 IFS="$ac_save_ifs"
3889 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
3891 esac
3893 XGETTEXT="$ac_cv_path_XGETTEXT"
3894 if test -n "$XGETTEXT"; then
3895 echo "$ac_t""$XGETTEXT" 1>&6
3896 else
3897 echo "$ac_t""no" 1>&6
3901 USE_INCLUDED_LIBINTL=yes
3902 CATOBJEXT=.gmo
3903 INSTOBJEXT=.mo
3904 DATADIRNAME=share
3905 INTLDEPS='$(top_builddir)/../intl/libintl.a'
3906 INTLLIBS=$INTLDEPS
3907 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
3908 nls_cv_header_intl=libintl.h
3909 nls_cv_header_libgt=libgettext.h
3912 if test "$XGETTEXT" != ":"; then
3913 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
3915 else
3916 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
3917 XGETTEXT=":"
3921 # We need to process the po/ directory.
3922 POSUB=po
3923 else
3924 DATADIRNAME=share
3925 nls_cv_header_intl=libintl.h
3926 nls_cv_header_libgt=libgettext.h
3929 # If this is used in GNU gettext we have to set USE_NLS to `yes'
3930 # because some of the sources are only built for this goal.
3931 if test "$PACKAGE" = gettext; then
3932 USE_NLS=yes
3933 USE_INCLUDED_LIBINTL=yes
3936 for lang in $ALL_LINGUAS; do
3937 GMOFILES="$GMOFILES $lang.gmo"
3938 POFILES="$POFILES $lang.po"
3939 done
3954 if test "x$CATOBJEXT" != "x"; then
3955 if test "x$ALL_LINGUAS" = "x"; then
3956 LINGUAS=
3957 else
3958 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
3959 echo "configure:3960: checking for catalogs to be installed" >&5
3960 NEW_LINGUAS=
3961 for lang in ${LINGUAS=$ALL_LINGUAS}; do
3962 case "$ALL_LINGUAS" in
3963 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
3964 esac
3965 done
3966 LINGUAS=$NEW_LINGUAS
3967 echo "$ac_t""$LINGUAS" 1>&6
3970 if test -n "$LINGUAS"; then
3971 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
3975 if test $ac_cv_header_locale_h = yes; then
3976 INCLUDE_LOCALE_H="#include <locale.h>"
3977 else
3978 INCLUDE_LOCALE_H="\
3979 /* The system does not provide the header <locale.h>. Take care yourself. */"
3983 if test -f $srcdir/po2tbl.sed.in; then
3984 if test "$CATOBJEXT" = ".cat"; then
3985 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
3986 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
3987 echo "configure:3988: checking for linux/version.h" >&5
3988 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3989 echo $ac_n "(cached) $ac_c" 1>&6
3990 else
3991 cat > conftest.$ac_ext <<EOF
3992 #line 3993 "configure"
3993 #include "confdefs.h"
3994 #include <linux/version.h>
3996 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3997 { (eval echo configure:3998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3998 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3999 if test -z "$ac_err"; then
4000 rm -rf conftest*
4001 eval "ac_cv_header_$ac_safe=yes"
4002 else
4003 echo "$ac_err" >&5
4004 echo "configure: failed program was:" >&5
4005 cat conftest.$ac_ext >&5
4006 rm -rf conftest*
4007 eval "ac_cv_header_$ac_safe=no"
4009 rm -f conftest*
4011 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4012 echo "$ac_t""yes" 1>&6
4013 msgformat=linux
4014 else
4015 echo "$ac_t""no" 1>&6
4016 msgformat=xopen
4020 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
4022 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
4023 $srcdir/po2tbl.sed.in > po2tbl.sed
4026 if test "$PACKAGE" = "gettext"; then
4027 GT_NO="#NO#"
4028 GT_YES=
4029 else
4030 GT_NO=
4031 GT_YES="#YES#"
4036 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
4042 if test -d $srcdir/po; then
4043 test -d po || mkdir po
4044 if test "x$srcdir" != "x."; then
4045 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
4046 posrcprefix="$srcdir/"
4047 else
4048 posrcprefix="../$srcdir/"
4050 else
4051 posrcprefix="../"
4053 rm -f po/POTFILES
4054 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
4055 < $srcdir/po/POTFILES.in > po/POTFILES
4059 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
4060 echo "configure:4061: checking whether to enable maintainer-specific portions of Makefiles" >&5
4061 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
4062 if test "${enable_maintainer_mode+set}" = set; then
4063 enableval="$enable_maintainer_mode"
4064 USE_MAINTAINER_MODE=$enableval
4065 else
4066 USE_MAINTAINER_MODE=no
4069 echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
4072 if test $USE_MAINTAINER_MODE = yes; then
4073 MAINTAINER_MODE_TRUE=
4074 MAINTAINER_MODE_FALSE='#'
4075 else
4076 MAINTAINER_MODE_TRUE='#'
4077 MAINTAINER_MODE_FALSE=
4079 MAINT=$MAINTAINER_MODE_TRUE
4082 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
4083 echo "configure:4084: checking for Cygwin environment" >&5
4084 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
4085 echo $ac_n "(cached) $ac_c" 1>&6
4086 else
4087 cat > conftest.$ac_ext <<EOF
4088 #line 4089 "configure"
4089 #include "confdefs.h"
4091 int main() {
4093 #ifndef __CYGWIN__
4094 #define __CYGWIN__ __CYGWIN32__
4095 #endif
4096 return __CYGWIN__;
4097 ; return 0; }
4099 if { (eval echo configure:4100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4100 rm -rf conftest*
4101 ac_cv_cygwin=yes
4102 else
4103 echo "configure: failed program was:" >&5
4104 cat conftest.$ac_ext >&5
4105 rm -rf conftest*
4106 ac_cv_cygwin=no
4108 rm -f conftest*
4109 rm -f conftest*
4112 echo "$ac_t""$ac_cv_cygwin" 1>&6
4113 CYGWIN=
4114 test "$ac_cv_cygwin" = yes && CYGWIN=yes
4115 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
4116 echo "configure:4117: checking for mingw32 environment" >&5
4117 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
4118 echo $ac_n "(cached) $ac_c" 1>&6
4119 else
4120 cat > conftest.$ac_ext <<EOF
4121 #line 4122 "configure"
4122 #include "confdefs.h"
4124 int main() {
4125 return __MINGW32__;
4126 ; return 0; }
4128 if { (eval echo configure:4129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4129 rm -rf conftest*
4130 ac_cv_mingw32=yes
4131 else
4132 echo "configure: failed program was:" >&5
4133 cat conftest.$ac_ext >&5
4134 rm -rf conftest*
4135 ac_cv_mingw32=no
4137 rm -f conftest*
4138 rm -f conftest*
4141 echo "$ac_t""$ac_cv_mingw32" 1>&6
4142 MINGW32=
4143 test "$ac_cv_mingw32" = yes && MINGW32=yes
4146 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4147 echo "configure:4148: checking for executable suffix" >&5
4148 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
4149 echo $ac_n "(cached) $ac_c" 1>&6
4150 else
4151 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
4152 ac_cv_exeext=.exe
4153 else
4154 rm -f conftest*
4155 echo 'int main () { return 0; }' > conftest.$ac_ext
4156 ac_cv_exeext=
4157 if { (eval echo configure:4158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4158 for file in conftest.*; do
4159 case $file in
4160 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
4161 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4162 esac
4163 done
4164 else
4165 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4167 rm -f conftest*
4168 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4172 EXEEXT=""
4173 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4174 echo "$ac_t""${ac_cv_exeext}" 1>&6
4175 ac_exeext=$EXEEXT
4178 # host-specific stuff:
4180 HDEFINES=
4182 . ${srcdir}/../bfd/configure.host
4185 AR=${AR-ar}
4187 # Extract the first word of "ranlib", so it can be a program name with args.
4188 set dummy ranlib; ac_word=$2
4189 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4190 echo "configure:4191: checking for $ac_word" >&5
4191 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
4192 echo $ac_n "(cached) $ac_c" 1>&6
4193 else
4194 if test -n "$RANLIB"; then
4195 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4196 else
4197 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4198 ac_dummy="$PATH"
4199 for ac_dir in $ac_dummy; do
4200 test -z "$ac_dir" && ac_dir=.
4201 if test -f $ac_dir/$ac_word; then
4202 ac_cv_prog_RANLIB="ranlib"
4203 break
4205 done
4206 IFS="$ac_save_ifs"
4207 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4210 RANLIB="$ac_cv_prog_RANLIB"
4211 if test -n "$RANLIB"; then
4212 echo "$ac_t""$RANLIB" 1>&6
4213 else
4214 echo "$ac_t""no" 1>&6
4217 # Find a good install program. We prefer a C program (faster),
4218 # so one script is as good as another. But avoid the broken or
4219 # incompatible versions:
4220 # SysV /etc/install, /usr/sbin/install
4221 # SunOS /usr/etc/install
4222 # IRIX /sbin/install
4223 # AIX /bin/install
4224 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4225 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4226 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4227 # ./install, which can be erroneously created by make from ./install.sh.
4228 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
4229 echo "configure:4230: checking for a BSD compatible install" >&5
4230 if test -z "$INSTALL"; then
4231 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
4232 echo $ac_n "(cached) $ac_c" 1>&6
4233 else
4234 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
4235 for ac_dir in $PATH; do
4236 # Account for people who put trailing slashes in PATH elements.
4237 case "$ac_dir/" in
4238 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
4240 # OSF1 and SCO ODT 3.0 have their own names for install.
4241 # Don't use installbsd from OSF since it installs stuff as root
4242 # by default.
4243 for ac_prog in ginstall scoinst install; do
4244 if test -f $ac_dir/$ac_prog; then
4245 if test $ac_prog = install &&
4246 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
4247 # AIX install. It has an incompatible calling convention.
4249 else
4250 ac_cv_path_install="$ac_dir/$ac_prog -c"
4251 break 2
4254 done
4256 esac
4257 done
4258 IFS="$ac_save_IFS"
4261 if test "${ac_cv_path_install+set}" = set; then
4262 INSTALL="$ac_cv_path_install"
4263 else
4264 # As a last resort, use the slow shell script. We don't cache a
4265 # path for INSTALL within a source directory, because that will
4266 # break other packages using the cache if that directory is
4267 # removed, or if the path is relative.
4268 INSTALL="$ac_install_sh"
4271 echo "$ac_t""$INSTALL" 1>&6
4273 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4274 # It thinks the first close brace ends the variable substitution.
4275 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4277 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
4279 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4282 # Put a plausible default for CC_FOR_BUILD in Makefile.
4283 if test -z "$CC_FOR_BUILD"; then
4284 if test "x$cross_compiling" = "xno"; then
4285 CC_FOR_BUILD='$(CC)'
4286 else
4287 CC_FOR_BUILD=gcc
4291 # Also set EXEEXT_FOR_BUILD.
4292 if test "x$cross_compiling" = "xno"; then
4293 EXEEXT_FOR_BUILD='$(EXEEXT)'
4294 else
4295 echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
4296 echo "configure:4297: checking for build system executable suffix" >&5
4297 if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then
4298 echo $ac_n "(cached) $ac_c" 1>&6
4299 else
4300 cat > ac_c_test.c << 'EOF'
4301 int main() {
4302 /* Nothing needed here */
4305 ${CC_FOR_BUILD} -o ac_c_test am_c_test.c 1>&5 2>&5
4306 bfd_cv_build_exeext=`echo ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//`
4307 rm -f ac_c_test*
4308 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no
4311 echo "$ac_t""$bfd_cv_build_exeext" 1>&6
4312 EXEEXT_FOR_BUILD=""
4313 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
4317 for ac_hdr in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h
4319 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4320 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4321 echo "configure:4322: checking for $ac_hdr" >&5
4322 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4323 echo $ac_n "(cached) $ac_c" 1>&6
4324 else
4325 cat > conftest.$ac_ext <<EOF
4326 #line 4327 "configure"
4327 #include "confdefs.h"
4328 #include <$ac_hdr>
4330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4331 { (eval echo configure:4332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4333 if test -z "$ac_err"; then
4334 rm -rf conftest*
4335 eval "ac_cv_header_$ac_safe=yes"
4336 else
4337 echo "$ac_err" >&5
4338 echo "configure: failed program was:" >&5
4339 cat conftest.$ac_ext >&5
4340 rm -rf conftest*
4341 eval "ac_cv_header_$ac_safe=no"
4343 rm -f conftest*
4345 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4346 echo "$ac_t""yes" 1>&6
4347 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4348 cat >> confdefs.h <<EOF
4349 #define $ac_tr_hdr 1
4352 else
4353 echo "$ac_t""no" 1>&6
4355 done
4357 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
4358 echo "configure:4359: checking for sys/wait.h that is POSIX.1 compatible" >&5
4359 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
4360 echo $ac_n "(cached) $ac_c" 1>&6
4361 else
4362 cat > conftest.$ac_ext <<EOF
4363 #line 4364 "configure"
4364 #include "confdefs.h"
4365 #include <sys/types.h>
4366 #include <sys/wait.h>
4367 #ifndef WEXITSTATUS
4368 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
4369 #endif
4370 #ifndef WIFEXITED
4371 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
4372 #endif
4373 int main() {
4374 int s;
4375 wait (&s);
4376 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
4377 ; return 0; }
4379 if { (eval echo configure:4380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4380 rm -rf conftest*
4381 ac_cv_header_sys_wait_h=yes
4382 else
4383 echo "configure: failed program was:" >&5
4384 cat conftest.$ac_ext >&5
4385 rm -rf conftest*
4386 ac_cv_header_sys_wait_h=no
4388 rm -f conftest*
4391 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
4392 if test $ac_cv_header_sys_wait_h = yes; then
4393 cat >> confdefs.h <<\EOF
4394 #define HAVE_SYS_WAIT_H 1
4399 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
4400 # for constant arguments. Useless!
4401 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
4402 echo "configure:4403: checking for working alloca.h" >&5
4403 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
4404 echo $ac_n "(cached) $ac_c" 1>&6
4405 else
4406 cat > conftest.$ac_ext <<EOF
4407 #line 4408 "configure"
4408 #include "confdefs.h"
4409 #include <alloca.h>
4410 int main() {
4411 char *p = alloca(2 * sizeof(int));
4412 ; return 0; }
4414 if { (eval echo configure:4415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4415 rm -rf conftest*
4416 ac_cv_header_alloca_h=yes
4417 else
4418 echo "configure: failed program was:" >&5
4419 cat conftest.$ac_ext >&5
4420 rm -rf conftest*
4421 ac_cv_header_alloca_h=no
4423 rm -f conftest*
4426 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
4427 if test $ac_cv_header_alloca_h = yes; then
4428 cat >> confdefs.h <<\EOF
4429 #define HAVE_ALLOCA_H 1
4434 echo $ac_n "checking for alloca""... $ac_c" 1>&6
4435 echo "configure:4436: checking for alloca" >&5
4436 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
4437 echo $ac_n "(cached) $ac_c" 1>&6
4438 else
4439 cat > conftest.$ac_ext <<EOF
4440 #line 4441 "configure"
4441 #include "confdefs.h"
4443 #ifdef __GNUC__
4444 # define alloca __builtin_alloca
4445 #else
4446 # ifdef _MSC_VER
4447 # include <malloc.h>
4448 # define alloca _alloca
4449 # else
4450 # if HAVE_ALLOCA_H
4451 # include <alloca.h>
4452 # else
4453 # ifdef _AIX
4454 #pragma alloca
4455 # else
4456 # ifndef alloca /* predefined by HP cc +Olibcalls */
4457 char *alloca ();
4458 # endif
4459 # endif
4460 # endif
4461 # endif
4462 #endif
4464 int main() {
4465 char *p = (char *) alloca(1);
4466 ; return 0; }
4468 if { (eval echo configure:4469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4469 rm -rf conftest*
4470 ac_cv_func_alloca_works=yes
4471 else
4472 echo "configure: failed program was:" >&5
4473 cat conftest.$ac_ext >&5
4474 rm -rf conftest*
4475 ac_cv_func_alloca_works=no
4477 rm -f conftest*
4480 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
4481 if test $ac_cv_func_alloca_works = yes; then
4482 cat >> confdefs.h <<\EOF
4483 #define HAVE_ALLOCA 1
4488 if test $ac_cv_func_alloca_works = no; then
4489 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
4490 # that cause trouble. Some versions do not even contain alloca or
4491 # contain a buggy version. If you still want to use their alloca,
4492 # use ar to extract alloca.o from them instead of compiling alloca.c.
4493 ALLOCA=alloca.${ac_objext}
4494 cat >> confdefs.h <<\EOF
4495 #define C_ALLOCA 1
4499 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
4500 echo "configure:4501: checking whether alloca needs Cray hooks" >&5
4501 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
4502 echo $ac_n "(cached) $ac_c" 1>&6
4503 else
4504 cat > conftest.$ac_ext <<EOF
4505 #line 4506 "configure"
4506 #include "confdefs.h"
4507 #if defined(CRAY) && ! defined(CRAY2)
4508 webecray
4509 #else
4510 wenotbecray
4511 #endif
4514 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4515 egrep "webecray" >/dev/null 2>&1; then
4516 rm -rf conftest*
4517 ac_cv_os_cray=yes
4518 else
4519 rm -rf conftest*
4520 ac_cv_os_cray=no
4522 rm -f conftest*
4526 echo "$ac_t""$ac_cv_os_cray" 1>&6
4527 if test $ac_cv_os_cray = yes; then
4528 for ac_func in _getb67 GETB67 getb67; do
4529 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4530 echo "configure:4531: checking for $ac_func" >&5
4531 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4532 echo $ac_n "(cached) $ac_c" 1>&6
4533 else
4534 cat > conftest.$ac_ext <<EOF
4535 #line 4536 "configure"
4536 #include "confdefs.h"
4537 /* System header to define __stub macros and hopefully few prototypes,
4538 which can conflict with char $ac_func(); below. */
4539 #include <assert.h>
4540 /* Override any gcc2 internal prototype to avoid an error. */
4541 /* We use char because int might match the return type of a gcc2
4542 builtin and then its argument prototype would still apply. */
4543 char $ac_func();
4545 int main() {
4547 /* The GNU C library defines this for functions which it implements
4548 to always fail with ENOSYS. Some functions are actually named
4549 something starting with __ and the normal name is an alias. */
4550 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4551 choke me
4552 #else
4553 $ac_func();
4554 #endif
4556 ; return 0; }
4558 if { (eval echo configure:4559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4559 rm -rf conftest*
4560 eval "ac_cv_func_$ac_func=yes"
4561 else
4562 echo "configure: failed program was:" >&5
4563 cat conftest.$ac_ext >&5
4564 rm -rf conftest*
4565 eval "ac_cv_func_$ac_func=no"
4567 rm -f conftest*
4570 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4571 echo "$ac_t""yes" 1>&6
4572 cat >> confdefs.h <<EOF
4573 #define CRAY_STACKSEG_END $ac_func
4576 break
4577 else
4578 echo "$ac_t""no" 1>&6
4581 done
4584 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4585 echo "configure:4586: checking stack direction for C alloca" >&5
4586 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4587 echo $ac_n "(cached) $ac_c" 1>&6
4588 else
4589 if test "$cross_compiling" = yes; then
4590 ac_cv_c_stack_direction=0
4591 else
4592 cat > conftest.$ac_ext <<EOF
4593 #line 4594 "configure"
4594 #include "confdefs.h"
4595 find_stack_direction ()
4597 static char *addr = 0;
4598 auto char dummy;
4599 if (addr == 0)
4601 addr = &dummy;
4602 return find_stack_direction ();
4604 else
4605 return (&dummy > addr) ? 1 : -1;
4607 main ()
4609 exit (find_stack_direction() < 0);
4612 if { (eval echo configure:4613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4613 then
4614 ac_cv_c_stack_direction=1
4615 else
4616 echo "configure: failed program was:" >&5
4617 cat conftest.$ac_ext >&5
4618 rm -fr conftest*
4619 ac_cv_c_stack_direction=-1
4621 rm -fr conftest*
4626 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4627 cat >> confdefs.h <<EOF
4628 #define STACK_DIRECTION $ac_cv_c_stack_direction
4633 for ac_func in sbrk utimes
4635 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4636 echo "configure:4637: checking for $ac_func" >&5
4637 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4638 echo $ac_n "(cached) $ac_c" 1>&6
4639 else
4640 cat > conftest.$ac_ext <<EOF
4641 #line 4642 "configure"
4642 #include "confdefs.h"
4643 /* System header to define __stub macros and hopefully few prototypes,
4644 which can conflict with char $ac_func(); below. */
4645 #include <assert.h>
4646 /* Override any gcc2 internal prototype to avoid an error. */
4647 /* We use char because int might match the return type of a gcc2
4648 builtin and then its argument prototype would still apply. */
4649 char $ac_func();
4651 int main() {
4653 /* The GNU C library defines this for functions which it implements
4654 to always fail with ENOSYS. Some functions are actually named
4655 something starting with __ and the normal name is an alias. */
4656 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4657 choke me
4658 #else
4659 $ac_func();
4660 #endif
4662 ; return 0; }
4664 if { (eval echo configure:4665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4665 rm -rf conftest*
4666 eval "ac_cv_func_$ac_func=yes"
4667 else
4668 echo "configure: failed program was:" >&5
4669 cat conftest.$ac_ext >&5
4670 rm -rf conftest*
4671 eval "ac_cv_func_$ac_func=no"
4673 rm -f conftest*
4676 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4677 echo "$ac_t""yes" 1>&6
4678 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4679 cat >> confdefs.h <<EOF
4680 #define $ac_tr_func 1
4683 else
4684 echo "$ac_t""no" 1>&6
4686 done
4689 # Some systems have frexp only in -lm, not in -lc.
4691 echo $ac_n "checking for library containing frexp""... $ac_c" 1>&6
4692 echo "configure:4693: checking for library containing frexp" >&5
4693 if eval "test \"`echo '$''{'ac_cv_search_frexp'+set}'`\" = set"; then
4694 echo $ac_n "(cached) $ac_c" 1>&6
4695 else
4696 ac_func_search_save_LIBS="$LIBS"
4697 ac_cv_search_frexp="no"
4698 cat > conftest.$ac_ext <<EOF
4699 #line 4700 "configure"
4700 #include "confdefs.h"
4701 /* Override any gcc2 internal prototype to avoid an error. */
4702 /* We use char because int might match the return type of a gcc2
4703 builtin and then its argument prototype would still apply. */
4704 char frexp();
4706 int main() {
4707 frexp()
4708 ; return 0; }
4710 if { (eval echo configure:4711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4711 rm -rf conftest*
4712 ac_cv_search_frexp="none required"
4713 else
4714 echo "configure: failed program was:" >&5
4715 cat conftest.$ac_ext >&5
4717 rm -f conftest*
4718 test "$ac_cv_search_frexp" = "no" && for i in -lm; do
4719 LIBS="-l$i $ac_func_search_save_LIBS"
4720 cat > conftest.$ac_ext <<EOF
4721 #line 4722 "configure"
4722 #include "confdefs.h"
4723 /* Override any gcc2 internal prototype to avoid an error. */
4724 /* We use char because int might match the return type of a gcc2
4725 builtin and then its argument prototype would still apply. */
4726 char frexp();
4728 int main() {
4729 frexp()
4730 ; return 0; }
4732 if { (eval echo configure:4733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4733 rm -rf conftest*
4734 ac_cv_search_frexp="-l$i"
4735 break
4736 else
4737 echo "configure: failed program was:" >&5
4738 cat conftest.$ac_ext >&5
4740 rm -f conftest*
4741 done
4742 LIBS="$ac_func_search_save_LIBS"
4745 echo "$ac_t""$ac_cv_search_frexp" 1>&6
4746 if test "$ac_cv_search_frexp" != "no"; then
4747 test "$ac_cv_search_frexp" = "none required" || LIBS="$ac_cv_search_frexp $LIBS"
4749 else :
4753 echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
4754 echo "configure:4755: checking for time_t in time.h" >&5
4755 if eval "test \"`echo '$''{'bu_cv_decl_time_t_time_h'+set}'`\" = set"; then
4756 echo $ac_n "(cached) $ac_c" 1>&6
4757 else
4758 cat > conftest.$ac_ext <<EOF
4759 #line 4760 "configure"
4760 #include "confdefs.h"
4761 #include <time.h>
4762 int main() {
4763 time_t i;
4764 ; return 0; }
4766 if { (eval echo configure:4767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4767 rm -rf conftest*
4768 bu_cv_decl_time_t_time_h=yes
4769 else
4770 echo "configure: failed program was:" >&5
4771 cat conftest.$ac_ext >&5
4772 rm -rf conftest*
4773 bu_cv_decl_time_t_time_h=no
4775 rm -f conftest*
4778 echo "$ac_t""$bu_cv_decl_time_t_time_h" 1>&6
4779 if test $bu_cv_decl_time_t_time_h = yes; then
4780 cat >> confdefs.h <<\EOF
4781 #define HAVE_TIME_T_IN_TIME_H 1
4786 echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6
4787 echo "configure:4788: checking for time_t in sys/types.h" >&5
4788 if eval "test \"`echo '$''{'bu_cv_decl_time_t_types_h'+set}'`\" = set"; then
4789 echo $ac_n "(cached) $ac_c" 1>&6
4790 else
4791 cat > conftest.$ac_ext <<EOF
4792 #line 4793 "configure"
4793 #include "confdefs.h"
4794 #include <sys/types.h>
4795 int main() {
4796 time_t i;
4797 ; return 0; }
4799 if { (eval echo configure:4800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4800 rm -rf conftest*
4801 bu_cv_decl_time_t_types_h=yes
4802 else
4803 echo "configure: failed program was:" >&5
4804 cat conftest.$ac_ext >&5
4805 rm -rf conftest*
4806 bu_cv_decl_time_t_types_h=no
4808 rm -f conftest*
4811 echo "$ac_t""$bu_cv_decl_time_t_types_h" 1>&6
4812 if test $bu_cv_decl_time_t_types_h = yes; then
4813 cat >> confdefs.h <<\EOF
4814 #define HAVE_TIME_T_IN_TYPES_H 1
4819 # Under Next 3.2 <utime.h> apparently does not define struct utimbuf
4820 # by default.
4821 echo $ac_n "checking for utime.h""... $ac_c" 1>&6
4822 echo "configure:4823: checking for utime.h" >&5
4823 if eval "test \"`echo '$''{'bu_cv_header_utime_h'+set}'`\" = set"; then
4824 echo $ac_n "(cached) $ac_c" 1>&6
4825 else
4826 cat > conftest.$ac_ext <<EOF
4827 #line 4828 "configure"
4828 #include "confdefs.h"
4829 #include <sys/types.h>
4830 #ifdef HAVE_TIME_H
4831 #include <time.h>
4832 #endif
4833 #include <utime.h>
4834 int main() {
4835 struct utimbuf s;
4836 ; return 0; }
4838 if { (eval echo configure:4839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4839 rm -rf conftest*
4840 bu_cv_header_utime_h=yes
4841 else
4842 echo "configure: failed program was:" >&5
4843 cat conftest.$ac_ext >&5
4844 rm -rf conftest*
4845 bu_cv_header_utime_h=no
4847 rm -f conftest*
4850 echo "$ac_t""$bu_cv_header_utime_h" 1>&6
4851 if test $bu_cv_header_utime_h = yes; then
4852 cat >> confdefs.h <<\EOF
4853 #define HAVE_GOOD_UTIME_H 1
4858 echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6
4859 echo "configure:4860: checking whether fprintf must be declared" >&5
4860 if eval "test \"`echo '$''{'bfd_cv_decl_needed_fprintf'+set}'`\" = set"; then
4861 echo $ac_n "(cached) $ac_c" 1>&6
4862 else
4863 cat > conftest.$ac_ext <<EOF
4864 #line 4865 "configure"
4865 #include "confdefs.h"
4867 #include <stdio.h>
4868 #ifdef HAVE_STRING_H
4869 #include <string.h>
4870 #else
4871 #ifdef HAVE_STRINGS_H
4872 #include <strings.h>
4873 #endif
4874 #endif
4875 #ifdef HAVE_STDLIB_H
4876 #include <stdlib.h>
4877 #endif
4878 #ifdef HAVE_UNISTD_H
4879 #include <unistd.h>
4880 #endif
4881 int main() {
4882 char *(*pfn) = (char *(*)) fprintf
4883 ; return 0; }
4885 if { (eval echo configure:4886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4886 rm -rf conftest*
4887 bfd_cv_decl_needed_fprintf=no
4888 else
4889 echo "configure: failed program was:" >&5
4890 cat conftest.$ac_ext >&5
4891 rm -rf conftest*
4892 bfd_cv_decl_needed_fprintf=yes
4894 rm -f conftest*
4897 echo "$ac_t""$bfd_cv_decl_needed_fprintf" 1>&6
4898 if test $bfd_cv_decl_needed_fprintf = yes; then
4899 cat >> confdefs.h <<\EOF
4900 #define NEED_DECLARATION_FPRINTF 1
4905 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
4906 echo "configure:4907: checking whether strstr must be declared" >&5
4907 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
4908 echo $ac_n "(cached) $ac_c" 1>&6
4909 else
4910 cat > conftest.$ac_ext <<EOF
4911 #line 4912 "configure"
4912 #include "confdefs.h"
4914 #include <stdio.h>
4915 #ifdef HAVE_STRING_H
4916 #include <string.h>
4917 #else
4918 #ifdef HAVE_STRINGS_H
4919 #include <strings.h>
4920 #endif
4921 #endif
4922 #ifdef HAVE_STDLIB_H
4923 #include <stdlib.h>
4924 #endif
4925 #ifdef HAVE_UNISTD_H
4926 #include <unistd.h>
4927 #endif
4928 int main() {
4929 char *(*pfn) = (char *(*)) strstr
4930 ; return 0; }
4932 if { (eval echo configure:4933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4933 rm -rf conftest*
4934 bfd_cv_decl_needed_strstr=no
4935 else
4936 echo "configure: failed program was:" >&5
4937 cat conftest.$ac_ext >&5
4938 rm -rf conftest*
4939 bfd_cv_decl_needed_strstr=yes
4941 rm -f conftest*
4944 echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
4945 if test $bfd_cv_decl_needed_strstr = yes; then
4946 cat >> confdefs.h <<\EOF
4947 #define NEED_DECLARATION_STRSTR 1
4952 echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
4953 echo "configure:4954: checking whether sbrk must be declared" >&5
4954 if eval "test \"`echo '$''{'bfd_cv_decl_needed_sbrk'+set}'`\" = set"; then
4955 echo $ac_n "(cached) $ac_c" 1>&6
4956 else
4957 cat > conftest.$ac_ext <<EOF
4958 #line 4959 "configure"
4959 #include "confdefs.h"
4961 #include <stdio.h>
4962 #ifdef HAVE_STRING_H
4963 #include <string.h>
4964 #else
4965 #ifdef HAVE_STRINGS_H
4966 #include <strings.h>
4967 #endif
4968 #endif
4969 #ifdef HAVE_STDLIB_H
4970 #include <stdlib.h>
4971 #endif
4972 #ifdef HAVE_UNISTD_H
4973 #include <unistd.h>
4974 #endif
4975 int main() {
4976 char *(*pfn) = (char *(*)) sbrk
4977 ; return 0; }
4979 if { (eval echo configure:4980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4980 rm -rf conftest*
4981 bfd_cv_decl_needed_sbrk=no
4982 else
4983 echo "configure: failed program was:" >&5
4984 cat conftest.$ac_ext >&5
4985 rm -rf conftest*
4986 bfd_cv_decl_needed_sbrk=yes
4988 rm -f conftest*
4991 echo "$ac_t""$bfd_cv_decl_needed_sbrk" 1>&6
4992 if test $bfd_cv_decl_needed_sbrk = yes; then
4993 cat >> confdefs.h <<\EOF
4994 #define NEED_DECLARATION_SBRK 1
4999 echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
5000 echo "configure:5001: checking whether getenv must be declared" >&5
5001 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then
5002 echo $ac_n "(cached) $ac_c" 1>&6
5003 else
5004 cat > conftest.$ac_ext <<EOF
5005 #line 5006 "configure"
5006 #include "confdefs.h"
5008 #include <stdio.h>
5009 #ifdef HAVE_STRING_H
5010 #include <string.h>
5011 #else
5012 #ifdef HAVE_STRINGS_H
5013 #include <strings.h>
5014 #endif
5015 #endif
5016 #ifdef HAVE_STDLIB_H
5017 #include <stdlib.h>
5018 #endif
5019 #ifdef HAVE_UNISTD_H
5020 #include <unistd.h>
5021 #endif
5022 int main() {
5023 char *(*pfn) = (char *(*)) getenv
5024 ; return 0; }
5026 if { (eval echo configure:5027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5027 rm -rf conftest*
5028 bfd_cv_decl_needed_getenv=no
5029 else
5030 echo "configure: failed program was:" >&5
5031 cat conftest.$ac_ext >&5
5032 rm -rf conftest*
5033 bfd_cv_decl_needed_getenv=yes
5035 rm -f conftest*
5038 echo "$ac_t""$bfd_cv_decl_needed_getenv" 1>&6
5039 if test $bfd_cv_decl_needed_getenv = yes; then
5040 cat >> confdefs.h <<\EOF
5041 #define NEED_DECLARATION_GETENV 1
5046 echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
5047 echo "configure:5048: checking whether environ must be declared" >&5
5048 if eval "test \"`echo '$''{'bfd_cv_decl_needed_environ'+set}'`\" = set"; then
5049 echo $ac_n "(cached) $ac_c" 1>&6
5050 else
5051 cat > conftest.$ac_ext <<EOF
5052 #line 5053 "configure"
5053 #include "confdefs.h"
5055 #include <stdio.h>
5056 #ifdef HAVE_STRING_H
5057 #include <string.h>
5058 #else
5059 #ifdef HAVE_STRINGS_H
5060 #include <strings.h>
5061 #endif
5062 #endif
5063 #ifdef HAVE_STDLIB_H
5064 #include <stdlib.h>
5065 #endif
5066 #ifdef HAVE_UNISTD_H
5067 #include <unistd.h>
5068 #endif
5069 int main() {
5070 char *(*pfn) = (char *(*)) environ
5071 ; return 0; }
5073 if { (eval echo configure:5074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5074 rm -rf conftest*
5075 bfd_cv_decl_needed_environ=no
5076 else
5077 echo "configure: failed program was:" >&5
5078 cat conftest.$ac_ext >&5
5079 rm -rf conftest*
5080 bfd_cv_decl_needed_environ=yes
5082 rm -f conftest*
5085 echo "$ac_t""$bfd_cv_decl_needed_environ" 1>&6
5086 if test $bfd_cv_decl_needed_environ = yes; then
5087 cat >> confdefs.h <<\EOF
5088 #define NEED_DECLARATION_ENVIRON 1
5095 case "${host}" in
5096 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows)
5097 cat >> confdefs.h <<\EOF
5098 #define USE_BINARY_FOPEN 1
5101 esac
5103 # target-specific stuff:
5105 # Canonicalize the secondary target names.
5106 if test -n "$enable_targets"; then
5107 for targ in `echo $enable_targets | sed 's/,/ /g'`
5109 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
5110 if test -n "$result"; then
5111 canon_targets="$canon_targets $result"
5112 else
5113 # Allow targets that config.sub doesn't recognize, like "all".
5114 canon_targets="$canon_targets $targ"
5116 done
5119 all_targets=false
5120 BUILD_NLMCONV=
5121 NLMCONV_DEFS=
5122 BUILD_SRCONV=
5123 BUILD_DLLTOOL=
5124 DLLTOOL_DEFS=
5125 BUILD_WINDRES=
5126 BUILD_DLLWRAP=
5127 BUILD_MISC=
5129 for targ in $target $canon_targets
5131 if test "x$targ" = "xall"; then
5132 all_targets=true
5133 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
5134 BUILD_SRCONV='$(SRCONV_PROG)'
5135 NLMCONV_DEFS="-DNLMCONV_I386 -DNLMCONV_ALPHA -DNLMCONV_POWERPC -DNLMCONV_SPARC"
5136 else
5137 case $targ in
5138 i[3456]86*-*-netware*)
5139 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
5140 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_I386"
5142 alpha*-*-netware*)
5143 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
5144 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_ALPHA"
5146 powerpc*-*-netware*)
5147 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
5148 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_POWERPC"
5150 sparc*-*-netware*)
5151 BUILD_NLMCONV='$(NLMCONV_PROG)$(EXEEXT)'
5152 NLMCONV_DEFS="$NLMCONV_DEFS -DNLMCONV_SPARC"
5154 esac
5155 case $targ in
5156 *-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
5157 esac
5158 case $targ in
5159 arm-*pe*)
5160 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
5161 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
5162 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
5164 thumb-*pe*)
5165 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
5166 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_ARM"
5167 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
5169 i[3-6]86-*pe* | i[3-6]86-*-cygwin* | i[3-6]86-*-mingw32*)
5170 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
5171 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
5172 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
5173 BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
5175 powerpc*-*-*pe* | powerpc*-*-cygwin*)
5176 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
5177 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_PPC"
5178 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
5180 mcore-*pe)
5181 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
5182 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE"
5183 BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
5185 mcore-*elf)
5186 BUILD_DLLTOOL='$(DLLTOOL_PROG)$(EXEEXT)'
5187 DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_MCORE_ELF"
5189 esac
5191 done
5202 cat >> confdefs.h <<EOF
5203 #define TARGET "${target}"
5207 targ=$target
5208 . $srcdir/../bfd/config.bfd
5209 if test "x$targ_underscore" = "xyes"; then
5210 UNDERSCORE=1
5211 else
5212 UNDERSCORE=0
5216 trap '' 1 2 15
5217 cat > confcache <<\EOF
5218 # This file is a shell script that caches the results of configure
5219 # tests run on this system so they can be shared between configure
5220 # scripts and configure runs. It is not useful on other systems.
5221 # If it contains results you don't want to keep, you may remove or edit it.
5223 # By default, configure uses ./config.cache as the cache file,
5224 # creating it if it does not exist already. You can give configure
5225 # the --cache-file=FILE option to use a different cache file; that is
5226 # what configure does when it calls configure scripts in
5227 # subdirectories, so they share the cache.
5228 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5229 # config.status only pays attention to the cache file if you give it the
5230 # --recheck option to rerun configure.
5233 # The following way of writing the cache mishandles newlines in values,
5234 # but we know of no workaround that is simple, portable, and efficient.
5235 # So, don't put newlines in cache variables' values.
5236 # Ultrix sh set writes to stderr and can't be redirected directly,
5237 # and sets the high bit in the cache file unless we assign to the vars.
5238 (set) 2>&1 |
5239 case `(ac_space=' '; set | grep ac_space) 2>&1` in
5240 *ac_space=\ *)
5241 # `set' does not quote correctly, so add quotes (double-quote substitution
5242 # turns \\\\ into \\, and sed turns \\ into \).
5243 sed -n \
5244 -e "s/'/'\\\\''/g" \
5245 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5248 # `set' quotes correctly as required by POSIX, so do not add quotes.
5249 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5251 esac >> confcache
5252 if cmp -s $cache_file confcache; then
5254 else
5255 if test -w $cache_file; then
5256 echo "updating cache $cache_file"
5257 cat confcache > $cache_file
5258 else
5259 echo "not updating unwritable cache $cache_file"
5262 rm -f confcache
5264 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5266 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5267 # Let make expand exec_prefix.
5268 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5270 # Any assignment to VPATH causes Sun make to only execute
5271 # the first set of double-colon rules, so remove it if not needed.
5272 # If there is a colon in the path, we need to keep it.
5273 if test "x$srcdir" = x.; then
5274 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5277 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5279 DEFS=-DHAVE_CONFIG_H
5281 # Without the "./", some shells look in PATH for config.status.
5282 : ${CONFIG_STATUS=./config.status}
5284 echo creating $CONFIG_STATUS
5285 rm -f $CONFIG_STATUS
5286 cat > $CONFIG_STATUS <<EOF
5287 #! /bin/sh
5288 # Generated automatically by configure.
5289 # Run this file to recreate the current configuration.
5290 # This directory was configured as follows,
5291 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5293 # $0 $ac_configure_args
5295 # Compiler output produced by configure, useful for debugging
5296 # configure, is in ./config.log if it exists.
5298 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5299 for ac_option
5301 case "\$ac_option" in
5302 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5303 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5304 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5305 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5306 echo "$CONFIG_STATUS generated by autoconf version 2.13"
5307 exit 0 ;;
5308 -help | --help | --hel | --he | --h)
5309 echo "\$ac_cs_usage"; exit 0 ;;
5310 *) echo "\$ac_cs_usage"; exit 1 ;;
5311 esac
5312 done
5314 ac_given_srcdir=$srcdir
5315 ac_given_INSTALL="$INSTALL"
5317 trap 'rm -fr `echo "Makefile po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5319 cat >> $CONFIG_STATUS <<EOF
5321 # Protect against being on the right side of a sed subst in config.status.
5322 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5323 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5324 $ac_vpsub
5325 $extrasub
5326 s%@SHELL@%$SHELL%g
5327 s%@CFLAGS@%$CFLAGS%g
5328 s%@CPPFLAGS@%$CPPFLAGS%g
5329 s%@CXXFLAGS@%$CXXFLAGS%g
5330 s%@FFLAGS@%$FFLAGS%g
5331 s%@DEFS@%$DEFS%g
5332 s%@LDFLAGS@%$LDFLAGS%g
5333 s%@LIBS@%$LIBS%g
5334 s%@exec_prefix@%$exec_prefix%g
5335 s%@prefix@%$prefix%g
5336 s%@program_transform_name@%$program_transform_name%g
5337 s%@bindir@%$bindir%g
5338 s%@sbindir@%$sbindir%g
5339 s%@libexecdir@%$libexecdir%g
5340 s%@datadir@%$datadir%g
5341 s%@sysconfdir@%$sysconfdir%g
5342 s%@sharedstatedir@%$sharedstatedir%g
5343 s%@localstatedir@%$localstatedir%g
5344 s%@libdir@%$libdir%g
5345 s%@includedir@%$includedir%g
5346 s%@oldincludedir@%$oldincludedir%g
5347 s%@infodir@%$infodir%g
5348 s%@mandir@%$mandir%g
5349 s%@host@%$host%g
5350 s%@host_alias@%$host_alias%g
5351 s%@host_cpu@%$host_cpu%g
5352 s%@host_vendor@%$host_vendor%g
5353 s%@host_os@%$host_os%g
5354 s%@target@%$target%g
5355 s%@target_alias@%$target_alias%g
5356 s%@target_cpu@%$target_cpu%g
5357 s%@target_vendor@%$target_vendor%g
5358 s%@target_os@%$target_os%g
5359 s%@build@%$build%g
5360 s%@build_alias@%$build_alias%g
5361 s%@build_cpu@%$build_cpu%g
5362 s%@build_vendor@%$build_vendor%g
5363 s%@build_os@%$build_os%g
5364 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5365 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5366 s%@INSTALL_DATA@%$INSTALL_DATA%g
5367 s%@PACKAGE@%$PACKAGE%g
5368 s%@VERSION@%$VERSION%g
5369 s%@ACLOCAL@%$ACLOCAL%g
5370 s%@AUTOCONF@%$AUTOCONF%g
5371 s%@AUTOMAKE@%$AUTOMAKE%g
5372 s%@AUTOHEADER@%$AUTOHEADER%g
5373 s%@MAKEINFO@%$MAKEINFO%g
5374 s%@SET_MAKE@%$SET_MAKE%g
5375 s%@RANLIB@%$RANLIB%g
5376 s%@CC@%$CC%g
5377 s%@LD@%$LD%g
5378 s%@NM@%$NM%g
5379 s%@USE_SYMBOL_UNDERSCORE@%$USE_SYMBOL_UNDERSCORE%g
5380 s%@LN_S@%$LN_S%g
5381 s%@DLLTOOL@%$DLLTOOL%g
5382 s%@AS@%$AS%g
5383 s%@LIBTOOL@%$LIBTOOL%g
5384 s%@YACC@%$YACC%g
5385 s%@LEX@%$LEX%g
5386 s%@LEXLIB@%$LEXLIB%g
5387 s%@CPP@%$CPP%g
5388 s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
5389 s%@ALLOCA@%$ALLOCA%g
5390 s%@USE_NLS@%$USE_NLS%g
5391 s%@MSGFMT@%$MSGFMT%g
5392 s%@GMSGFMT@%$GMSGFMT%g
5393 s%@XGETTEXT@%$XGETTEXT%g
5394 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
5395 s%@CATALOGS@%$CATALOGS%g
5396 s%@CATOBJEXT@%$CATOBJEXT%g
5397 s%@DATADIRNAME@%$DATADIRNAME%g
5398 s%@GMOFILES@%$GMOFILES%g
5399 s%@INSTOBJEXT@%$INSTOBJEXT%g
5400 s%@INTLDEPS@%$INTLDEPS%g
5401 s%@INTLLIBS@%$INTLLIBS%g
5402 s%@INTLOBJS@%$INTLOBJS%g
5403 s%@POFILES@%$POFILES%g
5404 s%@POSUB@%$POSUB%g
5405 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
5406 s%@GT_NO@%$GT_NO%g
5407 s%@GT_YES@%$GT_YES%g
5408 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
5409 s%@l@%$l%g
5410 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
5411 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
5412 s%@MAINT@%$MAINT%g
5413 s%@EXEEXT@%$EXEEXT%g
5414 s%@HDEFINES@%$HDEFINES%g
5415 s%@AR@%$AR%g
5416 s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
5417 s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
5418 s%@NLMCONV_DEFS@%$NLMCONV_DEFS%g
5419 s%@BUILD_NLMCONV@%$BUILD_NLMCONV%g
5420 s%@BUILD_SRCONV@%$BUILD_SRCONV%g
5421 s%@BUILD_DLLTOOL@%$BUILD_DLLTOOL%g
5422 s%@DLLTOOL_DEFS@%$DLLTOOL_DEFS%g
5423 s%@BUILD_WINDRES@%$BUILD_WINDRES%g
5424 s%@BUILD_DLLWRAP@%$BUILD_DLLWRAP%g
5425 s%@BUILD_MISC@%$BUILD_MISC%g
5426 s%@UNDERSCORE@%$UNDERSCORE%g
5428 CEOF
5431 cat >> $CONFIG_STATUS <<\EOF
5433 # Split the substitutions into bite-sized pieces for seds with
5434 # small command number limits, like on Digital OSF/1 and HP-UX.
5435 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5436 ac_file=1 # Number of current file.
5437 ac_beg=1 # First line for current file.
5438 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5439 ac_more_lines=:
5440 ac_sed_cmds=""
5441 while $ac_more_lines; do
5442 if test $ac_beg -gt 1; then
5443 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5444 else
5445 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5447 if test ! -s conftest.s$ac_file; then
5448 ac_more_lines=false
5449 rm -f conftest.s$ac_file
5450 else
5451 if test -z "$ac_sed_cmds"; then
5452 ac_sed_cmds="sed -f conftest.s$ac_file"
5453 else
5454 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5456 ac_file=`expr $ac_file + 1`
5457 ac_beg=$ac_end
5458 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5460 done
5461 if test -z "$ac_sed_cmds"; then
5462 ac_sed_cmds=cat
5466 cat >> $CONFIG_STATUS <<EOF
5468 CONFIG_FILES=\${CONFIG_FILES-"Makefile po/Makefile.in:po/Make-in"}
5470 cat >> $CONFIG_STATUS <<\EOF
5471 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5472 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5473 case "$ac_file" in
5474 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5475 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5476 *) ac_file_in="${ac_file}.in" ;;
5477 esac
5479 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5481 # Remove last slash and all that follows it. Not all systems have dirname.
5482 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5483 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5484 # The file is in a subdirectory.
5485 test ! -d "$ac_dir" && mkdir "$ac_dir"
5486 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5487 # A "../" for each directory in $ac_dir_suffix.
5488 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5489 else
5490 ac_dir_suffix= ac_dots=
5493 case "$ac_given_srcdir" in
5494 .) srcdir=.
5495 if test -z "$ac_dots"; then top_srcdir=.
5496 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5497 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5498 *) # Relative path.
5499 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5500 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5501 esac
5503 case "$ac_given_INSTALL" in
5504 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5505 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5506 esac
5508 echo creating "$ac_file"
5509 rm -f "$ac_file"
5510 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5511 case "$ac_file" in
5512 *Makefile*) ac_comsub="1i\\
5513 # $configure_input" ;;
5514 *) ac_comsub= ;;
5515 esac
5517 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5518 sed -e "$ac_comsub
5519 s%@configure_input@%$configure_input%g
5520 s%@srcdir@%$srcdir%g
5521 s%@top_srcdir@%$top_srcdir%g
5522 s%@INSTALL@%$INSTALL%g
5523 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5524 fi; done
5525 rm -f conftest.s*
5527 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5528 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5530 # ac_d sets the value in "#define NAME VALUE" lines.
5531 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5532 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5533 ac_dC='\3'
5534 ac_dD='%g'
5535 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5536 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5537 ac_uB='\([ ]\)%\1#\2define\3'
5538 ac_uC=' '
5539 ac_uD='\4%g'
5540 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5541 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5542 ac_eB='$%\1#\2define\3'
5543 ac_eC=' '
5544 ac_eD='%g'
5546 if test "${CONFIG_HEADERS+set}" != set; then
5548 cat >> $CONFIG_STATUS <<EOF
5549 CONFIG_HEADERS="config.h:config.in"
5551 cat >> $CONFIG_STATUS <<\EOF
5553 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5554 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5555 case "$ac_file" in
5556 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5557 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5558 *) ac_file_in="${ac_file}.in" ;;
5559 esac
5561 echo creating $ac_file
5563 rm -f conftest.frag conftest.in conftest.out
5564 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5565 cat $ac_file_inputs > conftest.in
5569 # Transform confdefs.h into a sed script conftest.vals that substitutes
5570 # the proper values into config.h.in to produce config.h. And first:
5571 # Protect against being on the right side of a sed subst in config.status.
5572 # Protect against being in an unquoted here document in config.status.
5573 rm -f conftest.vals
5574 cat > conftest.hdr <<\EOF
5575 s/[\\&%]/\\&/g
5576 s%[\\$`]%\\&%g
5577 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5578 s%ac_d%ac_u%gp
5579 s%ac_u%ac_e%gp
5581 sed -n -f conftest.hdr confdefs.h > conftest.vals
5582 rm -f conftest.hdr
5584 # This sed command replaces #undef with comments. This is necessary, for
5585 # example, in the case of _POSIX_SOURCE, which is predefined and required
5586 # on some systems where configure will not decide to define it.
5587 cat >> conftest.vals <<\EOF
5588 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5591 # Break up conftest.vals because some shells have a limit on
5592 # the size of here documents, and old seds have small limits too.
5594 rm -f conftest.tail
5595 while :
5597 ac_lines=`grep -c . conftest.vals`
5598 # grep -c gives empty output for an empty file on some AIX systems.
5599 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5600 # Write a limited-size here document to conftest.frag.
5601 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5602 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5603 echo 'CEOF
5604 sed -f conftest.frag conftest.in > conftest.out
5605 rm -f conftest.in
5606 mv conftest.out conftest.in
5607 ' >> $CONFIG_STATUS
5608 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5609 rm -f conftest.vals
5610 mv conftest.tail conftest.vals
5611 done
5612 rm -f conftest.vals
5614 cat >> $CONFIG_STATUS <<\EOF
5615 rm -f conftest.frag conftest.h
5616 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5617 cat conftest.in >> conftest.h
5618 rm -f conftest.in
5619 if cmp -s $ac_file conftest.h 2>/dev/null; then
5620 echo "$ac_file is unchanged"
5621 rm -f conftest.h
5622 else
5623 # Remove last slash and all that follows it. Not all systems have dirname.
5624 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5625 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5626 # The file is in a subdirectory.
5627 test ! -d "$ac_dir" && mkdir "$ac_dir"
5629 rm -f $ac_file
5630 mv conftest.h $ac_file
5632 fi; done
5635 cat >> $CONFIG_STATUS <<EOF
5639 cat >> $CONFIG_STATUS <<\EOF
5640 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
5642 case "x$CONFIG_FILES" in
5643 *) sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;
5644 esac
5646 exit 0
5648 chmod +x $CONFIG_STATUS
5649 rm -fr confdefs* $ac_clean_files
5650 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1