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