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