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