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