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