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