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