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