]> git.ipfire.org Git - thirdparty/gcc.git/blame - libobjc/configure
configure.in: Clean up handling of --enable-version-specific-runtime-libs and related...
[thirdparty/gcc.git] / libobjc / configure
CommitLineData
bce1b489 1#! /bin/sh
03391b53 2
bce1b489 3# Guess values for system-dependent variables and create Makefiles.
03391b53 4# Generated automatically using autoconf version 2.13
9c01f395 5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
bce1b489
BE
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
03391b53
AO
10# Defaults:
11ac_help=
bce1b489 12ac_default_prefix=/usr/local
03391b53 13# Any additions from configure.in:
b150efee
FS
14ac_help="$ac_help
15 --enable-multilib build hella library versions (default)"
16ac_help="$ac_help
17 --with-target-subdir=SUBDIR
18 configuring in a subdirectory"
19ac_help="$ac_help
20 --with-cross-host=HOST configuring with a cross compiler"
21ac_help="$ac_help
22 --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory "
03391b53
AO
23ac_help="$ac_help
24 --enable-shared[=PKGS] build shared libraries [default=no]"
25ac_help="$ac_help
26 --enable-static[=PKGS] build static libraries [default=yes]"
27ac_help="$ac_help
28 --enable-fast-install[=PKGS] optimize for fast installation [default=yes]"
29ac_help="$ac_help
30 --with-gnu-ld assume the C compiler uses GNU ld [default=no]"
31ac_help="$ac_help
32 --disable-libtool-lock avoid locking (might break parallel builds)"
33ac_help="$ac_help
34 --with-pic try to use only PIC/non-PIC objects [default=use both]"
35ac_help="$ac_help
36 --enable-objc-gc enable the use of Boehm's garbage collector with
37 the GNU Objective-C runtime."
bce1b489
BE
38
39# Initialize some variables set by options.
40# The variables have the same names as the options, with
41# dashes changed to underlines.
03391b53
AO
42build=NONE
43cache_file=./config.cache
bce1b489 44exec_prefix=NONE
03391b53 45host=NONE
bce1b489 46no_create=
03391b53 47nonopt=NONE
bce1b489
BE
48no_recursion=
49prefix=NONE
50program_prefix=NONE
51program_suffix=NONE
52program_transform_name=s,x,x,
53silent=
54site=
55srcdir=
03391b53 56target=NONE
bce1b489
BE
57verbose=
58x_includes=NONE
59x_libraries=NONE
60bindir='${exec_prefix}/bin'
61sbindir='${exec_prefix}/sbin'
62libexecdir='${exec_prefix}/libexec'
63datadir='${prefix}/share'
64sysconfdir='${prefix}/etc'
65sharedstatedir='${prefix}/com'
66localstatedir='${prefix}/var'
67libdir='${exec_prefix}/lib'
68includedir='${prefix}/include'
69oldincludedir='/usr/include'
70infodir='${prefix}/info'
71mandir='${prefix}/man'
72
03391b53
AO
73# Initialize some other variables.
74subdirs=
75MFLAGS= MAKEFLAGS=
76SHELL=${CONFIG_SHELL-/bin/sh}
77# Maximum number of lines to put in a shell here document.
78ac_max_here_lines=12
79
bce1b489
BE
80ac_prev=
81for ac_option
82do
03391b53 83
bce1b489
BE
84 # If the previous option needs an argument, assign it.
85 if test -n "$ac_prev"; then
86 eval "$ac_prev=\$ac_option"
87 ac_prev=
88 continue
89 fi
90
03391b53
AO
91 case "$ac_option" in
92 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
93 *) ac_optarg= ;;
94 esac
bce1b489
BE
95
96 # Accept the important Cygnus configure options, so we can diagnose typos.
97
98 case "$ac_option" in
99
100 -bindir | --bindir | --bindi | --bind | --bin | --bi)
101 ac_prev=bindir ;;
102 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
03391b53 103 bindir="$ac_optarg" ;;
bce1b489
BE
104
105 -build | --build | --buil | --bui | --bu)
106 ac_prev=build ;;
107 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
03391b53 108 build="$ac_optarg" ;;
bce1b489
BE
109
110 -cache-file | --cache-file | --cache-fil | --cache-fi \
111 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
112 ac_prev=cache_file ;;
113 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
114 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
03391b53 115 cache_file="$ac_optarg" ;;
bce1b489
BE
116
117 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
118 ac_prev=datadir ;;
119 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
120 | --da=*)
03391b53 121 datadir="$ac_optarg" ;;
bce1b489
BE
122
123 -disable-* | --disable-*)
03391b53 124 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
bce1b489 125 # Reject names that are not valid shell variable names.
03391b53
AO
126 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
127 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
bce1b489
BE
128 fi
129 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
130 eval "enable_${ac_feature}=no" ;;
131
132 -enable-* | --enable-*)
03391b53 133 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
bce1b489 134 # Reject names that are not valid shell variable names.
03391b53
AO
135 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
136 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
bce1b489
BE
137 fi
138 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
139 case "$ac_option" in
03391b53 140 *=*) ;;
bce1b489
BE
141 *) ac_optarg=yes ;;
142 esac
143 eval "enable_${ac_feature}='$ac_optarg'" ;;
144
145 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
146 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
147 | --exec | --exe | --ex)
148 ac_prev=exec_prefix ;;
149 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
150 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
151 | --exec=* | --exe=* | --ex=*)
03391b53 152 exec_prefix="$ac_optarg" ;;
bce1b489
BE
153
154 -gas | --gas | --ga | --g)
155 # Obsolete; use --with-gas.
156 with_gas=yes ;;
157
03391b53
AO
158 -help | --help | --hel | --he)
159 # Omit some internal or obsolete options to make the list less imposing.
160 # This message is too long to be a string in the A/UX 3.1 sh.
161 cat << EOF
162Usage: configure [options] [host]
163Options: [defaults in brackets after descriptions]
164Configuration:
165 --cache-file=FILE cache test results in FILE
166 --help print this message
167 --no-create do not create output files
168 --quiet, --silent do not print \`checking...' messages
03391b53
AO
169 --version print the version of autoconf that created configure
170Directory and file names:
171 --prefix=PREFIX install architecture-independent files in PREFIX
172 [$ac_default_prefix]
173 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
174 [same as prefix]
175 --bindir=DIR user executables in DIR [EPREFIX/bin]
176 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
177 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
178 --datadir=DIR read-only architecture-independent data in DIR
179 [PREFIX/share]
180 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
181 --sharedstatedir=DIR modifiable architecture-independent data in DIR
182 [PREFIX/com]
183 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
184 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
185 --includedir=DIR C header files in DIR [PREFIX/include]
186 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
187 --infodir=DIR info documentation in DIR [PREFIX/info]
188 --mandir=DIR man documentation in DIR [PREFIX/man]
189 --srcdir=DIR find the sources in DIR [configure dir or ..]
190 --program-prefix=PREFIX prepend PREFIX to installed program names
191 --program-suffix=SUFFIX append SUFFIX to installed program names
192 --program-transform-name=PROGRAM
193 run sed PROGRAM on installed program names
194EOF
195 cat << EOF
196Host type:
197 --build=BUILD configure for building on BUILD [BUILD=HOST]
198 --host=HOST configure for HOST [guessed]
199 --target=TARGET configure for TARGET [TARGET=HOST]
200Features and packages:
201 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
202 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
203 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
204 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
205 --x-includes=DIR X include files are in DIR
206 --x-libraries=DIR X library files are in DIR
207EOF
208 if test -n "$ac_help"; then
209 echo "--enable and --with options recognized:$ac_help"
210 fi
211 exit 0 ;;
bce1b489
BE
212
213 -host | --host | --hos | --ho)
214 ac_prev=host ;;
215 -host=* | --host=* | --hos=* | --ho=*)
03391b53 216 host="$ac_optarg" ;;
bce1b489
BE
217
218 -includedir | --includedir | --includedi | --included | --include \
219 | --includ | --inclu | --incl | --inc)
220 ac_prev=includedir ;;
221 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
222 | --includ=* | --inclu=* | --incl=* | --inc=*)
03391b53 223 includedir="$ac_optarg" ;;
bce1b489
BE
224
225 -infodir | --infodir | --infodi | --infod | --info | --inf)
226 ac_prev=infodir ;;
227 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
03391b53 228 infodir="$ac_optarg" ;;
bce1b489
BE
229
230 -libdir | --libdir | --libdi | --libd)
231 ac_prev=libdir ;;
232 -libdir=* | --libdir=* | --libdi=* | --libd=*)
03391b53 233 libdir="$ac_optarg" ;;
bce1b489
BE
234
235 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
236 | --libexe | --libex | --libe)
237 ac_prev=libexecdir ;;
238 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
239 | --libexe=* | --libex=* | --libe=*)
03391b53 240 libexecdir="$ac_optarg" ;;
bce1b489
BE
241
242 -localstatedir | --localstatedir | --localstatedi | --localstated \
243 | --localstate | --localstat | --localsta | --localst \
244 | --locals | --local | --loca | --loc | --lo)
245 ac_prev=localstatedir ;;
246 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
247 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
248 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
03391b53 249 localstatedir="$ac_optarg" ;;
bce1b489
BE
250
251 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
252 ac_prev=mandir ;;
253 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
03391b53 254 mandir="$ac_optarg" ;;
bce1b489
BE
255
256 -nfp | --nfp | --nf)
257 # Obsolete; use --without-fp.
258 with_fp=no ;;
259
260 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
261 | --no-cr | --no-c)
262 no_create=yes ;;
263
264 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
265 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
266 no_recursion=yes ;;
267
268 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
269 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
270 | --oldin | --oldi | --old | --ol | --o)
271 ac_prev=oldincludedir ;;
272 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
273 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
274 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
03391b53 275 oldincludedir="$ac_optarg" ;;
bce1b489
BE
276
277 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
278 ac_prev=prefix ;;
279 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
03391b53 280 prefix="$ac_optarg" ;;
bce1b489
BE
281
282 -program-prefix | --program-prefix | --program-prefi | --program-pref \
283 | --program-pre | --program-pr | --program-p)
284 ac_prev=program_prefix ;;
285 -program-prefix=* | --program-prefix=* | --program-prefi=* \
286 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
03391b53 287 program_prefix="$ac_optarg" ;;
bce1b489
BE
288
289 -program-suffix | --program-suffix | --program-suffi | --program-suff \
290 | --program-suf | --program-su | --program-s)
291 ac_prev=program_suffix ;;
292 -program-suffix=* | --program-suffix=* | --program-suffi=* \
293 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
03391b53 294 program_suffix="$ac_optarg" ;;
bce1b489
BE
295
296 -program-transform-name | --program-transform-name \
297 | --program-transform-nam | --program-transform-na \
298 | --program-transform-n | --program-transform- \
299 | --program-transform | --program-transfor \
300 | --program-transfo | --program-transf \
301 | --program-trans | --program-tran \
302 | --progr-tra | --program-tr | --program-t)
303 ac_prev=program_transform_name ;;
304 -program-transform-name=* | --program-transform-name=* \
305 | --program-transform-nam=* | --program-transform-na=* \
306 | --program-transform-n=* | --program-transform-=* \
307 | --program-transform=* | --program-transfor=* \
308 | --program-transfo=* | --program-transf=* \
309 | --program-trans=* | --program-tran=* \
310 | --progr-tra=* | --program-tr=* | --program-t=*)
03391b53 311 program_transform_name="$ac_optarg" ;;
bce1b489
BE
312
313 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
314 | -silent | --silent | --silen | --sile | --sil)
315 silent=yes ;;
316
317 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
318 ac_prev=sbindir ;;
319 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
320 | --sbi=* | --sb=*)
03391b53 321 sbindir="$ac_optarg" ;;
bce1b489
BE
322
323 -sharedstatedir | --sharedstatedir | --sharedstatedi \
324 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
325 | --sharedst | --shareds | --shared | --share | --shar \
326 | --sha | --sh)
327 ac_prev=sharedstatedir ;;
328 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
329 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
330 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
331 | --sha=* | --sh=*)
03391b53 332 sharedstatedir="$ac_optarg" ;;
bce1b489
BE
333
334 -site | --site | --sit)
335 ac_prev=site ;;
336 -site=* | --site=* | --sit=*)
03391b53
AO
337 site="$ac_optarg" ;;
338
bce1b489
BE
339 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
340 ac_prev=srcdir ;;
341 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
03391b53 342 srcdir="$ac_optarg" ;;
bce1b489
BE
343
344 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
345 | --syscon | --sysco | --sysc | --sys | --sy)
346 ac_prev=sysconfdir ;;
347 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
348 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
03391b53 349 sysconfdir="$ac_optarg" ;;
bce1b489
BE
350
351 -target | --target | --targe | --targ | --tar | --ta | --t)
352 ac_prev=target ;;
353 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
03391b53 354 target="$ac_optarg" ;;
bce1b489
BE
355
356 -v | -verbose | --verbose | --verbos | --verbo | --verb)
357 verbose=yes ;;
358
03391b53
AO
359 -version | --version | --versio | --versi | --vers)
360 echo "configure generated by autoconf version 2.13"
361 exit 0 ;;
bce1b489
BE
362
363 -with-* | --with-*)
03391b53 364 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
bce1b489 365 # Reject names that are not valid shell variable names.
03391b53
AO
366 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
367 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
bce1b489
BE
368 fi
369 ac_package=`echo $ac_package| sed 's/-/_/g'`
370 case "$ac_option" in
03391b53 371 *=*) ;;
bce1b489
BE
372 *) ac_optarg=yes ;;
373 esac
374 eval "with_${ac_package}='$ac_optarg'" ;;
375
376 -without-* | --without-*)
03391b53 377 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
bce1b489 378 # Reject names that are not valid shell variable names.
03391b53
AO
379 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
380 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
bce1b489
BE
381 fi
382 ac_package=`echo $ac_package| sed 's/-/_/g'`
383 eval "with_${ac_package}=no" ;;
384
385 --x)
386 # Obsolete; use --with-x.
387 with_x=yes ;;
388
389 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
390 | --x-incl | --x-inc | --x-in | --x-i)
391 ac_prev=x_includes ;;
392 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
393 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
03391b53 394 x_includes="$ac_optarg" ;;
bce1b489
BE
395
396 -x-libraries | --x-libraries | --x-librarie | --x-librari \
397 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
398 ac_prev=x_libraries ;;
399 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
400 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
03391b53 401 x_libraries="$ac_optarg" ;;
bce1b489 402
03391b53 403 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
bce1b489
BE
404 ;;
405
162f5967 406 *)
03391b53
AO
407 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
408 echo "configure: warning: $ac_option: invalid host type" 1>&2
bce1b489 409 fi
03391b53
AO
410 if test "x$nonopt" != xNONE; then
411 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
412 fi
413 nonopt="$ac_option"
bce1b489
BE
414 ;;
415
416 esac
417done
418
419if test -n "$ac_prev"; then
03391b53 420 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
bce1b489
BE
421fi
422
423trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
424
425# File descriptor usage:
426# 0 standard input
427# 1 file creation
428# 2 errors and warnings
429# 3 some systems may open it to /dev/tty
430# 4 used on the Kubota Titan
431# 6 checking for... messages and results
432# 5 compiler messages saved in config.log
433if test "$silent" = yes; then
434 exec 6>/dev/null
435else
436 exec 6>&1
437fi
438exec 5>./config.log
439
440echo "\
441This file contains any messages produced by compilers while
442running configure, to aid debugging if configure makes a mistake.
03391b53
AO
443" 1>&5
444
445# Strip out --no-create and --no-recursion so they do not pile up.
446# Also quote any args containing shell metacharacters.
447ac_configure_args=
448for ac_arg
449do
450 case "$ac_arg" in
451 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
452 | --no-cr | --no-c) ;;
453 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
454 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
455 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
456 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
457 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
458 esac
459done
bce1b489 460
03391b53
AO
461# NLS nuisances.
462# Only set these to C if already set. These must not be set unconditionally
463# because not all systems understand e.g. LANG=C (notably SCO).
464# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
465# Non-C LC_CTYPE values break the ctype check.
466if test "${LANG+set}" = set; then LANG=C; export LANG; fi
467if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
468if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
469if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
bce1b489
BE
470
471# confdefs.h avoids OS command line length limits that DEFS can exceed.
472rm -rf conftest* confdefs.h
473# AIX cpp loses on an empty file, so make sure it contains at least a newline.
03391b53 474echo > confdefs.h
bce1b489 475
03391b53
AO
476# A filename unique to this package, relative to the directory that
477# configure is in, which we can look for to find out if srcdir is correct.
478ac_unique_file=objc/objc.h
479
480# Find the source files, if location was not specified.
481if test -z "$srcdir"; then
482 ac_srcdir_defaulted=yes
483 # Try the directory containing this script, then its parent.
484 ac_prog=$0
485 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
486 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
487 srcdir=$ac_confdir
488 if test ! -r $srcdir/$ac_unique_file; then
489 srcdir=..
490 fi
491else
492 ac_srcdir_defaulted=no
493fi
494if test ! -r $srcdir/$ac_unique_file; then
495 if test "$ac_srcdir_defaulted" = yes; then
496 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
bce1b489 497 else
03391b53
AO
498 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
499 fi
500fi
501srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
502
503# Prefer explicitly selected file to automatically selected ones.
4977bab6
ZW
504if test -z "$CONFIG_SITE"; then
505 if test "x$prefix" != xNONE; then
506 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
507 else
508 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
bce1b489
BE
509 fi
510fi
511for ac_site_file in $CONFIG_SITE; do
512 if test -r "$ac_site_file"; then
513 echo "loading site script $ac_site_file"
514 . "$ac_site_file"
515 fi
516done
517
518if test -r "$cache_file"; then
03391b53
AO
519 echo "loading cache $cache_file"
520 . $cache_file
bce1b489
BE
521else
522 echo "creating cache $cache_file"
03391b53 523 > $cache_file
bce1b489
BE
524fi
525
526ac_ext=c
527# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
528ac_cpp='$CPP $CPPFLAGS'
03391b53
AO
529ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
530ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
bce1b489
BE
531cross_compiling=$ac_cv_prog_cc_cross
532
03391b53
AO
533ac_exeext=
534ac_objext=o
bce1b489 535if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
03391b53 536 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
bce1b489 537 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
03391b53
AO
538 ac_n= ac_c='
539' ac_t=' '
bce1b489 540 else
03391b53 541 ac_n=-n ac_c= ac_t=
bce1b489
BE
542 fi
543else
03391b53
AO
544 ac_n= ac_c='\c' ac_t=
545fi
546
9c01f395
NN
547echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
548echo "configure:549: checking for Cygwin environment" >&5
549if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
550 echo $ac_n "(cached) $ac_c" 1>&6
551else
552 cat > conftest.$ac_ext <<EOF
553#line 554 "configure"
554#include "confdefs.h"
555
556int main() {
557
558#ifndef __CYGWIN__
559#define __CYGWIN__ __CYGWIN32__
560#endif
561return __CYGWIN__;
562; return 0; }
563EOF
564if { (eval echo configure:565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
565 rm -rf conftest*
566 ac_cv_cygwin=yes
567else
568 echo "configure: failed program was:" >&5
569 cat conftest.$ac_ext >&5
570 rm -rf conftest*
571 ac_cv_cygwin=no
572fi
573rm -f conftest*
574rm -f conftest*
575fi
576
577echo "$ac_t""$ac_cv_cygwin" 1>&6
578CYGWIN=
579test "$ac_cv_cygwin" = yes && CYGWIN=yes
580echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
581echo "configure:582: checking for mingw32 environment" >&5
582if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
583 echo $ac_n "(cached) $ac_c" 1>&6
584else
585 cat > conftest.$ac_ext <<EOF
586#line 587 "configure"
587#include "confdefs.h"
588
589int main() {
590return __MINGW32__;
591; return 0; }
592EOF
593if { (eval echo configure:594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
594 rm -rf conftest*
595 ac_cv_mingw32=yes
596else
597 echo "configure: failed program was:" >&5
598 cat conftest.$ac_ext >&5
599 rm -rf conftest*
600 ac_cv_mingw32=no
601fi
602rm -f conftest*
603rm -f conftest*
604fi
605
606echo "$ac_t""$ac_cv_mingw32" 1>&6
607MINGW32=
608test "$ac_cv_mingw32" = yes && MINGW32=yes
03391b53
AO
609
610
611
6706f116
AO
612# This works around the fact that libtool configuration may change LD
613# for this particular configuration, but some shells, instead of
614# keeping the changes in LD private, export them just because LD is
615# exported.
616ORIGINAL_LD_FOR_MULTILIBS=$LD
617
9c01f395 618# Check whether --enable-multilib or --disable-multilib was given.
aebb8c22
DD
619if test "${enable_multilib+set}" = set; then
620 enableval="$enable_multilib"
621 case "${enableval}" in
622 yes) multilib=yes ;;
623 no) multilib=no ;;
624 *) { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
625 esac
626else
627 multilib=yes
628fi
629
630# When building with srcdir == objdir, links to the source files will
631# be created in directories within the target_subdir. We have to
632# adjust toplevel_srcdir accordingly, so that configure finds
633# install-sh and other auxiliary files that live in the top-level
634# source directory.
635if test "${srcdir}" = "."; then
636 if test -z "${with_target_subdir}"; then
637 toprel=".."
638 else
639 if test "${with_target_subdir}" != "."; then
640 toprel="${with_multisrctop}../.."
641 else
642 toprel="${with_multisrctop}.."
643 fi
644 fi
645else
646 toprel=".."
647fi
b150efee 648ac_aux_dir=
aebb8c22 649for ac_dir in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel; do
b150efee
FS
650 if test -f $ac_dir/install-sh; then
651 ac_aux_dir=$ac_dir
652 ac_install_sh="$ac_aux_dir/install-sh -c"
653 break
654 elif test -f $ac_dir/install.sh; then
655 ac_aux_dir=$ac_dir
656 ac_install_sh="$ac_aux_dir/install.sh -c"
657 break
658 fi
659done
660if test -z "$ac_aux_dir"; then
aebb8c22 661 { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel" 1>&2; exit 1; }
b150efee
FS
662fi
663ac_config_guess=$ac_aux_dir/config.guess
664ac_config_sub=$ac_aux_dir/config.sub
665ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
666
aebb8c22
DD
667toplevel_srcdir=\${top_srcdir}/$toprel
668
669
670
b150efee
FS
671# Do some error checking and defaulting for the host and target type.
672# The inputs are:
673# configure --host=HOST --target=TARGET --build=BUILD NONOPT
674#
675# The rules are:
676# 1. You are not allowed to specify --host, --target, and nonopt at the
677# same time.
678# 2. Host defaults to nonopt.
679# 3. If nonopt is not specified, then host defaults to the current host,
680# as determined by config.guess.
681# 4. Target and build default to nonopt.
682# 5. If nonopt is not specified, then target and build default to host.
683
684# The aliases save the names the user supplied, while $host etc.
685# will get canonicalized.
686case $host---$target---$nonopt in
687NONE---*---* | *---NONE---* | *---*---NONE) ;;
688*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
689esac
690
691
692# Make sure we can run config.sub.
693if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
694else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
695fi
696
697echo $ac_n "checking host system type""... $ac_c" 1>&6
9c01f395 698echo "configure:699: checking host system type" >&5
b150efee
FS
699
700host_alias=$host
701case "$host_alias" in
702NONE)
703 case $nonopt in
704 NONE)
705 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
706 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
707 fi ;;
708 *) host_alias=$nonopt ;;
709 esac ;;
710esac
711
712host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
713host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
714host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
715host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
716echo "$ac_t""$host" 1>&6
717
718echo $ac_n "checking target system type""... $ac_c" 1>&6
9c01f395 719echo "configure:720: checking target system type" >&5
b150efee
FS
720
721target_alias=$target
722case "$target_alias" in
723NONE)
724 case $nonopt in
725 NONE) target_alias=$host_alias ;;
726 *) target_alias=$nonopt ;;
727 esac ;;
728esac
729
730target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
731target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
732target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
733target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
734echo "$ac_t""$target" 1>&6
735
736echo $ac_n "checking build system type""... $ac_c" 1>&6
9c01f395 737echo "configure:738: checking build system type" >&5
b150efee
FS
738
739build_alias=$build
740case "$build_alias" in
741NONE)
742 case $nonopt in
743 NONE) build_alias=$host_alias ;;
744 *) build_alias=$nonopt ;;
745 esac ;;
746esac
747
748build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
749build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
750build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
751build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
752echo "$ac_t""$build" 1>&6
753
754test "$host_alias" != "$target_alias" &&
755 test "$program_prefix$program_suffix$program_transform_name" = \
756 NONENONEs,x,x, &&
757 program_prefix=${target_alias}-
758
9c01f395
NN
759 case ${build_alias} in
760 "") build_noncanonical=${build} ;;
761 *) build_noncanonical=${build_alias} ;;
762esac
b150efee 763
9c01f395
NN
764 case ${host_alias} in
765 "") host_noncanonical=${build_noncanonical} ;;
766 *) host_noncanonical=${host_alias} ;;
767esac
b150efee 768
9c01f395
NN
769 case ${target_alias} in
770 "") target_noncanonical=${host_noncanonical} ;;
771 *) target_noncanonical=${target_alias} ;;
772esac
b150efee 773
b150efee 774
b150efee 775
b150efee
FS
776# Export build and source directories.
777# These need to be absolute paths, yet at the same time need to
778# canonicalize only relative paths, because then amd will not unmount
779# drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
1e6347d8 780glibcpp_builddir=`${PWDCMD-pwd}`
b150efee
FS
781case $srcdir in
782\\/$* | ?:\\/*) glibcpp_srcdir=${srcdir} ;;
783*) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
784esac
785
786
787
b150efee
FS
788# Will set LN_S to either 'ln -s' or 'ln'. With autoconf 2.50+, can also
789# be 'cp -p' if linking isn't available.
790#ac_cv_prog_LN_S='cp -p'
791echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
9c01f395 792echo "configure:793: checking whether ln -s works" >&5
b150efee 793if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
03391b53 794 echo $ac_n "(cached) $ac_c" 1>&6
71205e0b 795else
b150efee
FS
796 rm -f conftestdata
797if ln -s X conftestdata 2>/dev/null
798then
799 rm -f conftestdata
800 ac_cv_prog_LN_S="ln -s"
801else
802 ac_cv_prog_LN_S=ln
803fi
804fi
805LN_S="$ac_cv_prog_LN_S"
806if test "$ac_cv_prog_LN_S" = "ln -s"; then
807 echo "$ac_t""yes" 1>&6
808else
809 echo "$ac_t""no" 1>&6
da4b1927
MK
810fi
811
b150efee
FS
812
813# We use these options to decide which functions to include.
814# Check whether --with-target-subdir or --without-target-subdir was given.
815if test "${with_target_subdir+set}" = set; then
816 withval="$with_target_subdir"
817 :
71205e0b
MH
818fi
819
b150efee
FS
820# Check whether --with-cross-host or --without-cross-host was given.
821if test "${with_cross_host+set}" = set; then
822 withval="$with_cross_host"
823 :
71205e0b
MH
824fi
825
7c6b0e92 826
b150efee
FS
827 # Never versions of autoconf add an underscore to these functions.
828 # Prevent future problems ...
829
830
831
832
833
834# AC_PROG_CC
835
836# FIXME: We temporarily define our own version of AC_PROG_CC. This is
837# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
838# are probably using a cross compiler, which will not be able to fully
839# link an executable. This should really be fixed in autoconf
840# itself.
841
842
7c6b0e92
GK
843
844
03391b53 845# Extract the first word of "gcc", so it can be a program name with args.
bce1b489 846set dummy gcc; ac_word=$2
03391b53 847echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c01f395 848echo "configure:849: checking for $ac_word" >&5
03391b53
AO
849if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
850 echo $ac_n "(cached) $ac_c" 1>&6
bce1b489
BE
851else
852 if test -n "$CC"; then
853 ac_cv_prog_CC="$CC" # Let the user override the test.
854else
03391b53
AO
855 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
856 ac_dummy="$PATH"
857 for ac_dir in $ac_dummy; do
858 test -z "$ac_dir" && ac_dir=.
859 if test -f $ac_dir/$ac_word; then
860 ac_cv_prog_CC="gcc"
861 break
862 fi
bce1b489 863 done
03391b53 864 IFS="$ac_save_ifs"
bce1b489
BE
865fi
866fi
03391b53 867CC="$ac_cv_prog_CC"
bce1b489 868if test -n "$CC"; then
03391b53 869 echo "$ac_t""$CC" 1>&6
bce1b489 870else
03391b53 871 echo "$ac_t""no" 1>&6
bce1b489
BE
872fi
873
03391b53
AO
874if test -z "$CC"; then
875 # Extract the first word of "cc", so it can be a program name with args.
bce1b489 876set dummy cc; ac_word=$2
03391b53 877echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c01f395 878echo "configure:879: checking for $ac_word" >&5
03391b53
AO
879if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
880 echo $ac_n "(cached) $ac_c" 1>&6
bce1b489
BE
881else
882 if test -n "$CC"; then
883 ac_cv_prog_CC="$CC" # Let the user override the test.
884else
03391b53 885 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
bce1b489 886 ac_prog_rejected=no
03391b53
AO
887 ac_dummy="$PATH"
888 for ac_dir in $ac_dummy; do
889 test -z "$ac_dir" && ac_dir=.
890 if test -f $ac_dir/$ac_word; then
891 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
892 ac_prog_rejected=yes
893 continue
894 fi
895 ac_cv_prog_CC="cc"
896 break
bce1b489
BE
897 fi
898 done
03391b53 899 IFS="$ac_save_ifs"
bce1b489
BE
900if test $ac_prog_rejected = yes; then
901 # We found a bogon in the path, so make sure we never use it.
902 set dummy $ac_cv_prog_CC
903 shift
904 if test $# -gt 0; then
905 # We chose a different compiler from the bogus one.
906 # However, it has the same basename, so the bogon will be chosen
907 # first if we set CC to just the basename; use the full file name.
908 shift
03391b53 909 set dummy "$ac_dir/$ac_word" "$@"
bce1b489
BE
910 shift
911 ac_cv_prog_CC="$@"
912 fi
913fi
914fi
915fi
03391b53 916CC="$ac_cv_prog_CC"
bce1b489 917if test -n "$CC"; then
03391b53 918 echo "$ac_t""$CC" 1>&6
bce1b489 919else
03391b53 920 echo "$ac_t""no" 1>&6
bce1b489
BE
921fi
922
03391b53
AO
923 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
924fi
bce1b489 925
03391b53 926echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
9c01f395 927echo "configure:928: checking whether we are using GNU C" >&5
03391b53
AO
928if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
929 echo $ac_n "(cached) $ac_c" 1>&6
bce1b489 930else
03391b53 931 cat > conftest.c <<EOF
bce1b489
BE
932#ifdef __GNUC__
933 yes;
934#endif
935EOF
9c01f395 936if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
bce1b489
BE
937 ac_cv_prog_gcc=yes
938else
939 ac_cv_prog_gcc=no
940fi
941fi
03391b53
AO
942
943echo "$ac_t""$ac_cv_prog_gcc" 1>&6
bce1b489
BE
944
945if test $ac_cv_prog_gcc = yes; then
946 GCC=yes
b150efee
FS
947 ac_test_CFLAGS="${CFLAGS+set}"
948 ac_save_CFLAGS="$CFLAGS"
949 CFLAGS=
950 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
9c01f395 951echo "configure:952: checking whether ${CC-cc} accepts -g" >&5
03391b53
AO
952if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
953 echo $ac_n "(cached) $ac_c" 1>&6
bce1b489 954else
03391b53 955 echo 'void f(){}' > conftest.c
bce1b489
BE
956if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
957 ac_cv_prog_cc_g=yes
958else
959 ac_cv_prog_cc_g=no
960fi
961rm -f conftest*
962
963fi
03391b53
AO
964
965echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
b150efee
FS
966 if test "$ac_test_CFLAGS" = set; then
967 CFLAGS="$ac_save_CFLAGS"
968 elif test $ac_cv_prog_cc_g = yes; then
bce1b489
BE
969 CFLAGS="-g -O2"
970 else
da4b1927 971 CFLAGS="-O2"
da4b1927 972 fi
b150efee
FS
973else
974 GCC=
975 test "${CFLAGS+set}" = set || CFLAGS="-g"
bce1b489
BE
976fi
977
03391b53 978
9c01f395
NN
979if test $host != $build; then
980 ac_tool_prefix=${host_alias}-
981else
982 ac_tool_prefix=
983fi
984
985# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
b150efee 986set dummy ${ac_tool_prefix}as; ac_word=$2
03391b53 987echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c01f395 988echo "configure:989: checking for $ac_word" >&5
b150efee 989if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
03391b53 990 echo $ac_n "(cached) $ac_c" 1>&6
bce1b489 991else
b150efee
FS
992 if test -n "$AS"; then
993 ac_cv_prog_AS="$AS" # Let the user override the test.
994else
995 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
996 ac_dummy="$PATH"
997 for ac_dir in $ac_dummy; do
998 test -z "$ac_dir" && ac_dir=.
999 if test -f $ac_dir/$ac_word; then
1000 ac_cv_prog_AS="${ac_tool_prefix}as"
1001 break
1002 fi
1003 done
1004 IFS="$ac_save_ifs"
1005 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
1006fi
1007fi
1008AS="$ac_cv_prog_AS"
1009if test -n "$AS"; then
1010 echo "$ac_t""$AS" 1>&6
1011else
1012 echo "$ac_t""no" 1>&6
1013fi
1014
1015
1016
9c01f395 1017# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
b150efee
FS
1018set dummy ${ac_tool_prefix}ar; ac_word=$2
1019echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c01f395 1020echo "configure:1021: checking for $ac_word" >&5
b150efee
FS
1021if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1022 echo $ac_n "(cached) $ac_c" 1>&6
1023else
1024 if test -n "$AR"; then
1025 ac_cv_prog_AR="$AR" # Let the user override the test.
1026else
1027 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1028 ac_dummy="$PATH"
1029 for ac_dir in $ac_dummy; do
1030 test -z "$ac_dir" && ac_dir=.
1031 if test -f $ac_dir/$ac_word; then
1032 ac_cv_prog_AR="${ac_tool_prefix}ar"
1033 break
1034 fi
1035 done
1036 IFS="$ac_save_ifs"
1037 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1038fi
1039fi
1040AR="$ac_cv_prog_AR"
1041if test -n "$AR"; then
1042 echo "$ac_t""$AR" 1>&6
1043else
1044 echo "$ac_t""no" 1>&6
1045fi
1046
1047
1048
9c01f395 1049# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
b150efee
FS
1050set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1051echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c01f395 1052echo "configure:1053: checking for $ac_word" >&5
b150efee
FS
1053if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1054 echo $ac_n "(cached) $ac_c" 1>&6
1055else
1056 if test -n "$RANLIB"; then
1057 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1058else
1059 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1060 ac_dummy="$PATH"
1061 for ac_dir in $ac_dummy; do
1062 test -z "$ac_dir" && ac_dir=.
1063 if test -f $ac_dir/$ac_word; then
1064 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1065 break
1066 fi
1067 done
1068 IFS="$ac_save_ifs"
1069fi
1070fi
1071RANLIB="$ac_cv_prog_RANLIB"
1072if test -n "$RANLIB"; then
1073 echo "$ac_t""$RANLIB" 1>&6
1074else
1075 echo "$ac_t""no" 1>&6
1076fi
1077
1078
1079if test -z "$ac_cv_prog_RANLIB"; then
1080if test -n "$ac_tool_prefix"; then
1081 # Extract the first word of "ranlib", so it can be a program name with args.
1082set dummy ranlib; ac_word=$2
1083echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c01f395 1084echo "configure:1085: checking for $ac_word" >&5
b150efee
FS
1085if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1086 echo $ac_n "(cached) $ac_c" 1>&6
1087else
1088 if test -n "$RANLIB"; then
1089 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
bce1b489 1090else
03391b53
AO
1091 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1092 ac_dummy="$PATH"
1093 for ac_dir in $ac_dummy; do
1094 test -z "$ac_dir" && ac_dir=.
1095 if test -f $ac_dir/$ac_word; then
1096 ac_cv_prog_RANLIB="ranlib"
1097 break
1098 fi
bce1b489 1099 done
03391b53 1100 IFS="$ac_save_ifs"
b150efee 1101 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB="ranlib-not-found-in-path-error"
bce1b489
BE
1102fi
1103fi
03391b53 1104RANLIB="$ac_cv_prog_RANLIB"
bce1b489 1105if test -n "$RANLIB"; then
03391b53 1106 echo "$ac_t""$RANLIB" 1>&6
bce1b489 1107else
03391b53 1108 echo "$ac_t""no" 1>&6
bce1b489
BE
1109fi
1110
b150efee
FS
1111else
1112 RANLIB="ranlib-not-found-in-path-error"
bce1b489 1113fi
b150efee
FS
1114fi
1115
9c01f395 1116# Find a good install program. We prefer a C program (faster),
bce1b489
BE
1117# so one script is as good as another. But avoid the broken or
1118# incompatible versions:
1119# SysV /etc/install, /usr/sbin/install
1120# SunOS /usr/etc/install
1121# IRIX /sbin/install
1122# AIX /bin/install
1123# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1124# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1125# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1126# ./install, which can be erroneously created by make from ./install.sh.
03391b53 1127echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
9c01f395 1128echo "configure:1129: checking for a BSD compatible install" >&5
bce1b489 1129if test -z "$INSTALL"; then
03391b53
AO
1130if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1131 echo $ac_n "(cached) $ac_c" 1>&6
bce1b489 1132else
03391b53 1133 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
bce1b489
BE
1134 for ac_dir in $PATH; do
1135 # Account for people who put trailing slashes in PATH elements.
1136 case "$ac_dir/" in
1137 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1138 *)
1139 # OSF1 and SCO ODT 3.0 have their own names for install.
1140 # Don't use installbsd from OSF since it installs stuff as root
1141 # by default.
1142 for ac_prog in ginstall scoinst install; do
1143 if test -f $ac_dir/$ac_prog; then
1144 if test $ac_prog = install &&
1145 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1146 # AIX install. It has an incompatible calling convention.
1147 :
1148 else
1149 ac_cv_path_install="$ac_dir/$ac_prog -c"
1150 break 2
1151 fi
1152 fi
1153 done
1154 ;;
1155 esac
1156 done
03391b53 1157 IFS="$ac_save_IFS"
bce1b489
BE
1158
1159fi
1160 if test "${ac_cv_path_install+set}" = set; then
03391b53 1161 INSTALL="$ac_cv_path_install"
bce1b489
BE
1162 else
1163 # As a last resort, use the slow shell script. We don't cache a
1164 # path for INSTALL within a source directory, because that will
1165 # break other packages using the cache if that directory is
1166 # removed, or if the path is relative.
03391b53 1167 INSTALL="$ac_install_sh"
bce1b489
BE
1168 fi
1169fi
03391b53 1170echo "$ac_t""$INSTALL" 1>&6
bce1b489
BE
1171
1172# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1173# It thinks the first close brace ends the variable substitution.
1174test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1175
03391b53 1176test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
da4b1927 1177
bce1b489
BE
1178test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1179
03391b53 1180
b150efee
FS
1181
1182# Process the option "--enable-version-specific-runtime-libs"
1183echo $ac_n "checking for --enable-version-specific-runtime-libs""... $ac_c" 1>&6
9c01f395 1184echo "configure:1185: checking for --enable-version-specific-runtime-libs" >&5
b150efee
FS
1185# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
1186if test "${enable_version_specific_runtime_libs+set}" = set; then
1187 enableval="$enable_version_specific_runtime_libs"
1188 case "$enableval" in
1189 yes) version_specific_libs=yes ;;
1190 no) version_specific_libs=no ;;
1191 *) { echo "configure: error: Unknown argument to enable/disable version-specific libs" 1>&2; exit 1; };;
1192 esac
1193else
1194 version_specific_libs=no
7c6b0e92 1195fi
9c01f395 1196
b150efee
FS
1197# Option set, now we can test it.
1198echo "$ac_t""$version_specific_libs" 1>&6
7c6b0e92 1199
b150efee
FS
1200gcc_version_trigger=${srcdir}/../gcc/version.c
1201gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
1202gcc_version=`echo ${gcc_version_full} | sed -e 's/\(^ *\) .*/\1/'`
03391b53 1203
b150efee
FS
1204
1205
b150efee 1206# Calculate glibcpp_toolexecdir, glibcpp_toolexeclibdir
9c01f395
NN
1207case ${version_specific_libs} in
1208 yes)
1209 # Need the gcc compiler version to know where to install libraries
1210 # and header files if --enable-version-specific-runtime-libs option
1211 # is selected.
1212 glibcpp_toolexecdir='$(libdir)/gcc/$(target_noncanonical)'
1213 glibcpp_toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)'
1214 ;;
1215 no)
1216 if test -n "$with_cross_host" &&
1217 test x"$with_cross_host" != x"no"; then
1218 glibcpp_toolexecdir='$(exec_prefix)/$(target_noncanonical)'
1219 glibcpp_toolexeclibdir='$(toolexecdir)/lib'
1220 else
1221 # Install a library built with a cross compiler in tooldir, not libdir.
1222 glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)'
1223 glibcpp_toolexeclibdir='$(libdir)'
1224 fi
1225 multi_os_directory=`$CC -print-multi-os-directory`
1226 case $multi_os_directory in
1227 .) ;; # Avoid trailing /.
1228 *) glibcpp_toolexeclibdir=$glibcpp_toolexeclibdir/$multi_os_directory ;;
1229 esac
1230 ;;
1231esac
b150efee
FS
1232
1233
1234
9c01f395 1235glibcpp_prefixdir=${prefix}
b150efee
FS
1236
1237
03391b53
AO
1238
1239# Disable shared libs by default
1240# Check whether --enable-shared or --disable-shared was given.
1241if test "${enable_shared+set}" = set; then
1242 enableval="$enable_shared"
1243 p=${PACKAGE-default}
33456445 1244case $enableval in
03391b53
AO
1245yes) enable_shared=yes ;;
1246no) enable_shared=no ;;
1247*)
1248 enable_shared=no
1249 # Look at the argument we got. We use all the common list separators.
1250 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1251 for pkg in $enableval; do
1252 if test "X$pkg" = "X$p"; then
1253 enable_shared=yes
1254 fi
1255 done
1256 IFS="$ac_save_ifs"
1257 ;;
1258esac
1259else
1260 enable_shared=no
1261fi
1262
9c01f395
NN
1263# Enable Win32 DLL on MS Windows - FIXME
1264
b150efee 1265
03391b53
AO
1266# Check whether --enable-static or --disable-static was given.
1267if test "${enable_static+set}" = set; then
1268 enableval="$enable_static"
1269 p=${PACKAGE-default}
33456445 1270case $enableval in
03391b53
AO
1271yes) enable_static=yes ;;
1272no) enable_static=no ;;
1273*)
1274 enable_static=no
1275 # Look at the argument we got. We use all the common list separators.
1276 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1277 for pkg in $enableval; do
1278 if test "X$pkg" = "X$p"; then
1279 enable_static=yes
1280 fi
1281 done
1282 IFS="$ac_save_ifs"
1283 ;;
1284esac
1285else
1286 enable_static=yes
1287fi
1288
1289# Check whether --enable-fast-install or --disable-fast-install was given.
1290if test "${enable_fast_install+set}" = set; then
1291 enableval="$enable_fast_install"
1292 p=${PACKAGE-default}
33456445 1293case $enableval in
03391b53
AO
1294yes) enable_fast_install=yes ;;
1295no) enable_fast_install=no ;;
1296*)
1297 enable_fast_install=no
1298 # Look at the argument we got. We use all the common list separators.
1299 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
1300 for pkg in $enableval; do
1301 if test "X$pkg" = "X$p"; then
1302 enable_fast_install=yes
1303 fi
1304 done
1305 IFS="$ac_save_ifs"
1306 ;;
1307esac
1308else
1309 enable_fast_install=yes
1310fi
1311
03391b53
AO
1312# Check whether --with-gnu-ld or --without-gnu-ld was given.
1313if test "${with_gnu_ld+set}" = set; then
1314 withval="$with_gnu_ld"
1315 test "$withval" = no || with_gnu_ld=yes
1316else
1317 with_gnu_ld=no
1318fi
1319
1320ac_prog=ld
33456445 1321if test "$GCC" = yes; then
03391b53
AO
1322 # Check if gcc -print-prog-name=ld gives a path.
1323 echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
9c01f395 1324echo "configure:1325: checking for ld used by GCC" >&5
03391b53
AO
1325 case $host in
1326 *-*-mingw*)
1327 # gcc leaves a trailing carriage return which upsets mingw
1328 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1329 *)
1330 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1331 esac
33456445 1332 case $ac_prog in
03391b53
AO
1333 # Accept absolute paths.
1334 [\\/]* | [A-Za-z]:[\\/]*)
1335 re_direlt='/[^/][^/]*/\.\./'
1336 # Canonicalize the path of ld
1337 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
1338 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1339 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
1340 done
1341 test -z "$LD" && LD="$ac_prog"
1342 ;;
1343 "")
1344 # If it fails, then pretend we aren't using GCC.
1345 ac_prog=ld
1346 ;;
1347 *)
1348 # If it is relative, then search for the first ld in PATH.
1349 with_gnu_ld=unknown
1350 ;;
1351 esac
1352elif test "$with_gnu_ld" = yes; then
1353 echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
9c01f395 1354echo "configure:1355: checking for GNU ld" >&5
03391b53
AO
1355else
1356 echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
9c01f395 1357echo "configure:1358: checking for non-GNU ld" >&5
03391b53 1358fi
33456445 1359if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
03391b53
AO
1360 echo $ac_n "(cached) $ac_c" 1>&6
1361else
1362 if test -z "$LD"; then
1363 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1364 for ac_dir in $PATH; do
1365 test -z "$ac_dir" && ac_dir=.
1366 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
33456445 1367 lt_cv_path_LD="$ac_dir/$ac_prog"
03391b53
AO
1368 # Check to see if the program is GNU ld. I'd rather use --version,
1369 # but apparently some GNU ld's only accept -v.
1370 # Break only if it was the GNU/non-GNU ld that we prefer.
33456445 1371 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
03391b53
AO
1372 test "$with_gnu_ld" != no && break
1373 else
1374 test "$with_gnu_ld" != yes && break
1375 fi
1376 fi
1377 done
1378 IFS="$ac_save_ifs"
1379else
33456445 1380 lt_cv_path_LD="$LD" # Let the user override the test with a path.
03391b53
AO
1381fi
1382fi
1383
33456445 1384LD="$lt_cv_path_LD"
03391b53
AO
1385if test -n "$LD"; then
1386 echo "$ac_t""$LD" 1>&6
1387else
1388 echo "$ac_t""no" 1>&6
1389fi
1390test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
1391echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
9c01f395 1392echo "configure:1393: checking if the linker ($LD) is GNU ld" >&5
33456445 1393if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
03391b53
AO
1394 echo $ac_n "(cached) $ac_c" 1>&6
1395else
1396 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
1397if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
33456445 1398 lt_cv_prog_gnu_ld=yes
03391b53 1399else
33456445 1400 lt_cv_prog_gnu_ld=no
03391b53
AO
1401fi
1402fi
1403
33456445
AO
1404echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
1405with_gnu_ld=$lt_cv_prog_gnu_ld
03391b53
AO
1406
1407
1408echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
9c01f395 1409echo "configure:1410: checking for $LD option to reload object files" >&5
03391b53
AO
1410if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
1411 echo $ac_n "(cached) $ac_c" 1>&6
1412else
1413 lt_cv_ld_reload_flag='-r'
1414fi
1415
1416echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
1417reload_flag=$lt_cv_ld_reload_flag
1418test -n "$reload_flag" && reload_flag=" $reload_flag"
1419
1420echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
9c01f395 1421echo "configure:1422: checking for BSD-compatible nm" >&5
33456445 1422if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
03391b53
AO
1423 echo $ac_n "(cached) $ac_c" 1>&6
1424else
1425 if test -n "$NM"; then
1426 # Let the user override the test.
33456445 1427 lt_cv_path_NM="$NM"
03391b53
AO
1428else
1429 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
1430 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
1431 test -z "$ac_dir" && ac_dir=.
1432 tmp_nm=$ac_dir/${ac_tool_prefix}nm
1433 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
1434 # Check to see if the nm accepts a BSD-compat flag.
1435 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
1436 # nm: unknown option "B" ignored
1437 # Tru64's nm complains that /dev/null is an invalid object file
1438 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
33456445 1439 lt_cv_path_NM="$tmp_nm -B"
03391b53
AO
1440 break
1441 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
33456445 1442 lt_cv_path_NM="$tmp_nm -p"
03391b53
AO
1443 break
1444 else
33456445 1445 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
03391b53
AO
1446 continue # so that we can try to find one that supports BSD flags
1447 fi
1448 fi
1449 done
1450 IFS="$ac_save_ifs"
33456445 1451 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
03391b53
AO
1452fi
1453fi
1454
33456445 1455NM="$lt_cv_path_NM"
03391b53
AO
1456echo "$ac_t""$NM" 1>&6
1457
03391b53 1458echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
9c01f395 1459echo "configure:1460: checking how to recognise dependant libraries" >&5
03391b53
AO
1460if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
1461 echo $ac_n "(cached) $ac_c" 1>&6
1462else
1463 lt_cv_file_magic_cmd='$MAGIC_CMD'
1464lt_cv_file_magic_test_file=
1465lt_cv_deplibs_check_method='unknown'
1466# Need to set the preceding variable on all platforms that support
1467# interlibrary dependencies.
1468# 'none' -- dependencies not supported.
1469# `unknown' -- same as none, but documents that we really don't know.
1470# 'pass_all' -- all dependencies passed with no checks.
1471# 'test_compile' -- check by making test program.
1472# 'file_magic [regex]' -- check by looking for files in library path
1473# which responds to the $file_magic_cmd with a given egrep regex.
1474# If you have `file' or equivalent on your system and you're not sure
1475# whether `pass_all' will *always* work, you probably want this one.
1476
33456445
AO
1477case $host_os in
1478aix*)
03391b53
AO
1479 lt_cv_deplibs_check_method=pass_all
1480 ;;
1481
1482beos*)
1483 lt_cv_deplibs_check_method=pass_all
1484 ;;
1485
1486bsdi4*)
33456445
AO
1487 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
1488 lt_cv_file_magic_cmd='/usr/bin/file -L'
03391b53
AO
1489 lt_cv_file_magic_test_file=/shlib/libc.so
1490 ;;
1491
1492cygwin* | mingw* |pw32*)
1493 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
1494 lt_cv_file_magic_cmd='$OBJDUMP -f'
1495 ;;
1496
33456445 1497darwin* | rhapsody*)
9c01f395 1498 # this will be overwritten by pass_all, but leave it in just in case
33456445
AO
1499 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
1500 lt_cv_file_magic_cmd='/usr/bin/file -L'
1501 case "$host_os" in
1502 rhapsody* | darwin1.012)
1503 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
1504 ;;
1505 *) # Darwin 1.3 on
1506 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
1507 ;;
1508 esac
9c01f395 1509 lt_cv_deplibs_check_method=pass_all
33456445
AO
1510 ;;
1511
03391b53
AO
1512freebsd* )
1513 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
33456445 1514 case $host_cpu in
03391b53
AO
1515 i*86 )
1516 # Not sure whether the presence of OpenBSD here was a mistake.
1517 # Let's accept both of them until this is cleared up.
33456445
AO
1518 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
1519 lt_cv_file_magic_cmd=/usr/bin/file
03391b53
AO
1520 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
1521 ;;
1522 esac
1523 else
1524 lt_cv_deplibs_check_method=pass_all
1525 fi
1526 ;;
1527
1528gnu*)
1529 lt_cv_deplibs_check_method=pass_all
1530 ;;
1531
33456445 1532hpux10.20*|hpux11*)
f5cc59a7
AO
1533 case $host_cpu in
1534 hppa*)
1535 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
1536 lt_cv_file_magic_cmd=/usr/bin/file
1537 lt_cv_file_magic_test_file=/usr/lib/libc.sl
1538 ;;
1539 ia64*)
1540 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
1541 lt_cv_file_magic_cmd=/usr/bin/file
1542 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
1543 ;;
1544 esac
03391b53
AO
1545 ;;
1546
1547irix5* | irix6*)
33456445 1548 case $host_os in
03391b53
AO
1549 irix5*)
1550 # this will be overridden with pass_all, but let us keep it just in case
1551 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
1552 ;;
1553 *)
33456445 1554 case $LD in
03391b53
AO
1555 *-32|*"-32 ") libmagic=32-bit;;
1556 *-n32|*"-n32 ") libmagic=N32;;
1557 *-64|*"-64 ") libmagic=64-bit;;
1558 *) libmagic=never-match;;
1559 esac
1560 # this will be overridden with pass_all, but let us keep it just in case
33456445
AO
1561 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
1562 ;;
03391b53
AO
1563 esac
1564 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
1565 lt_cv_deplibs_check_method=pass_all
1566 ;;
1567
1568# This must be Linux ELF.
1569linux-gnu*)
33456445 1570 case $host_cpu in
b1e0a93e 1571 alpha* | mips* | hppa* | i*86 | powerpc* | sparc* | ia64* )
03391b53
AO
1572 lt_cv_deplibs_check_method=pass_all ;;
1573 *)
1574 # glibc up to 2.1.1 does not perform some relocations on ARM
33456445
AO
1575 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
1576 esac
03391b53
AO
1577 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
1578 ;;
1579
1580netbsd*)
33456445
AO
1581 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
1582 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
03391b53 1583 else
33456445 1584 lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
03391b53
AO
1585 fi
1586 ;;
1587
33456445
AO
1588newsos6)
1589 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
1590 lt_cv_file_magic_cmd=/usr/bin/file
1591 lt_cv_file_magic_test_file=/usr/lib/libnls.so
1592 ;;
1593
03391b53
AO
1594osf3* | osf4* | osf5*)
1595 # this will be overridden with pass_all, but let us keep it just in case
1596 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
1597 lt_cv_file_magic_test_file=/shlib/libc.so
1598 lt_cv_deplibs_check_method=pass_all
1599 ;;
1600
1601sco3.2v5*)
1602 lt_cv_deplibs_check_method=pass_all
1603 ;;
1604
1605solaris*)
1606 lt_cv_deplibs_check_method=pass_all
1607 lt_cv_file_magic_test_file=/lib/libc.so
1608 ;;
1609
33456445
AO
1610sysv5uw[78]* | sysv4*uw2*)
1611 lt_cv_deplibs_check_method=pass_all
1612 ;;
1613
03391b53 1614sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
33456445 1615 case $host_vendor in
03391b53
AO
1616 ncr)
1617 lt_cv_deplibs_check_method=pass_all
1618 ;;
1619 motorola)
33456445
AO
1620 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]'
1621 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
03391b53
AO
1622 ;;
1623 esac
1624 ;;
1625esac
1626
1627fi
1628
1629echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
1630file_magic_cmd=$lt_cv_file_magic_cmd
1631deplibs_check_method=$lt_cv_deplibs_check_method
1632
1633echo $ac_n "checking for object suffix""... $ac_c" 1>&6
9c01f395 1634echo "configure:1635: checking for object suffix" >&5
03391b53
AO
1635if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1636 echo $ac_n "(cached) $ac_c" 1>&6
1637else
1638 rm -f conftest*
1639echo 'int i = 1;' > conftest.$ac_ext
9c01f395 1640if { (eval echo configure:1641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
03391b53
AO
1641 for ac_file in conftest.*; do
1642 case $ac_file in
1643 *.c) ;;
1644 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1645 esac
1646 done
1647else
1648 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1649fi
1650rm -f conftest*
1651fi
1652
1653echo "$ac_t""$ac_cv_objext" 1>&6
1654OBJEXT=$ac_cv_objext
1655ac_objext=$ac_cv_objext
1656
9c01f395
NN
1657
1658
1659echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1660echo "configure:1661: checking for executable suffix" >&5
1661if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1662 echo $ac_n "(cached) $ac_c" 1>&6
1663else
1664 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1665 ac_cv_exeext=.exe
1666else
1667 rm -f conftest*
1668 echo 'int main () { return 0; }' > conftest.$ac_ext
1669 ac_cv_exeext=
1670 if { (eval echo configure:1671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1671 for file in conftest.*; do
1672 case $file in
1673 *.$ac_ext | *.c | *.o | *.obj) ;;
1674 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1675 esac
1676 done
1677 else
1678 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1679 fi
1680 rm -f conftest*
1681 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1682fi
1683fi
1684
1685EXEEXT=""
1686test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1687echo "$ac_t""${ac_cv_exeext}" 1>&6
1688ac_exeext=$EXEEXT
1689
03391b53
AO
1690# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
1691
1692# Only perform the check for file, if the check method requires it
33456445 1693case $deplibs_check_method in
03391b53
AO
1694file_magic*)
1695 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1696 echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
9c01f395 1697echo "configure:1698: checking for ${ac_tool_prefix}file" >&5
03391b53
AO
1698if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
1699 echo $ac_n "(cached) $ac_c" 1>&6
1700else
33456445 1701 case $MAGIC_CMD in
03391b53
AO
1702 /*)
1703 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1704 ;;
1705 ?:/*)
1706 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
1707 ;;
1708 *)
1709 ac_save_MAGIC_CMD="$MAGIC_CMD"
1710 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1711 ac_dummy="/usr/bin:$PATH"
1712 for ac_dir in $ac_dummy; do
1713 test -z "$ac_dir" && ac_dir=.
1714 if test -f $ac_dir/${ac_tool_prefix}file; then
1715 lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
1716 if test -n "$file_magic_test_file"; then
33456445 1717 case $deplibs_check_method in
03391b53
AO
1718 "file_magic "*)
1719 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1720 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1721 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1722 egrep "$file_magic_regex" > /dev/null; then
1723 :
1724 else
1725 cat <<EOF 1>&2
1726
1727*** Warning: the command libtool uses to detect shared libraries,
1728*** $file_magic_cmd, produces output that libtool cannot recognize.
1729*** The result is that libtool may fail to recognize shared libraries
1730*** as such. This will affect the creation of libtool libraries that
1731*** depend on shared libraries, but programs linked with such libtool
1732*** libraries will work regardless of this problem. Nevertheless, you
1733*** may want to report the problem to your system manager and/or to
1734*** bug-libtool@gnu.org
1735
1736EOF
1737 fi ;;
1738 esac
1739 fi
1740 break
1741 fi
1742 done
1743 IFS="$ac_save_ifs"
1744 MAGIC_CMD="$ac_save_MAGIC_CMD"
1745 ;;
1746esac
1747fi
1748
1749MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1750if test -n "$MAGIC_CMD"; then
1751 echo "$ac_t""$MAGIC_CMD" 1>&6
1752else
1753 echo "$ac_t""no" 1>&6
1754fi
1755
1756if test -z "$lt_cv_path_MAGIC_CMD"; then
1757 if test -n "$ac_tool_prefix"; then
1758 echo $ac_n "checking for file""... $ac_c" 1>&6
9c01f395 1759echo "configure:1760: checking for file" >&5
03391b53
AO
1760if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
1761 echo $ac_n "(cached) $ac_c" 1>&6
1762else
33456445 1763 case $MAGIC_CMD in
03391b53
AO
1764 /*)
1765 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1766 ;;
1767 ?:/*)
1768 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
1769 ;;
1770 *)
1771 ac_save_MAGIC_CMD="$MAGIC_CMD"
1772 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1773 ac_dummy="/usr/bin:$PATH"
1774 for ac_dir in $ac_dummy; do
1775 test -z "$ac_dir" && ac_dir=.
1776 if test -f $ac_dir/file; then
1777 lt_cv_path_MAGIC_CMD="$ac_dir/file"
1778 if test -n "$file_magic_test_file"; then
33456445 1779 case $deplibs_check_method in
03391b53
AO
1780 "file_magic "*)
1781 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1782 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1783 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1784 egrep "$file_magic_regex" > /dev/null; then
1785 :
1786 else
1787 cat <<EOF 1>&2
1788
1789*** Warning: the command libtool uses to detect shared libraries,
1790*** $file_magic_cmd, produces output that libtool cannot recognize.
1791*** The result is that libtool may fail to recognize shared libraries
1792*** as such. This will affect the creation of libtool libraries that
1793*** depend on shared libraries, but programs linked with such libtool
1794*** libraries will work regardless of this problem. Nevertheless, you
1795*** may want to report the problem to your system manager and/or to
1796*** bug-libtool@gnu.org
1797
1798EOF
1799 fi ;;
1800 esac
1801 fi
1802 break
1803 fi
1804 done
1805 IFS="$ac_save_ifs"
1806 MAGIC_CMD="$ac_save_MAGIC_CMD"
1807 ;;
1808esac
1809fi
1810
1811MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1812if test -n "$MAGIC_CMD"; then
1813 echo "$ac_t""$MAGIC_CMD" 1>&6
1814else
1815 echo "$ac_t""no" 1>&6
1816fi
1817
1818 else
1819 MAGIC_CMD=:
1820 fi
1821fi
1822
1823 fi
1824 ;;
1825esac
1826
1827# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1828set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1829echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c01f395 1830echo "configure:1831: checking for $ac_word" >&5
03391b53
AO
1831if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1832 echo $ac_n "(cached) $ac_c" 1>&6
1833else
1834 if test -n "$RANLIB"; then
1835 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1836else
1837 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1838 ac_dummy="$PATH"
1839 for ac_dir in $ac_dummy; do
1840 test -z "$ac_dir" && ac_dir=.
1841 if test -f $ac_dir/$ac_word; then
1842 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1843 break
1844 fi
1845 done
1846 IFS="$ac_save_ifs"
1847fi
1848fi
1849RANLIB="$ac_cv_prog_RANLIB"
1850if test -n "$RANLIB"; then
1851 echo "$ac_t""$RANLIB" 1>&6
1852else
1853 echo "$ac_t""no" 1>&6
1854fi
1855
1856
1857if test -z "$ac_cv_prog_RANLIB"; then
1858if test -n "$ac_tool_prefix"; then
1859 # Extract the first word of "ranlib", so it can be a program name with args.
1860set dummy ranlib; ac_word=$2
1861echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c01f395 1862echo "configure:1863: checking for $ac_word" >&5
03391b53
AO
1863if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1864 echo $ac_n "(cached) $ac_c" 1>&6
1865else
1866 if test -n "$RANLIB"; then
1867 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1868else
1869 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1870 ac_dummy="$PATH"
1871 for ac_dir in $ac_dummy; do
1872 test -z "$ac_dir" && ac_dir=.
1873 if test -f $ac_dir/$ac_word; then
1874 ac_cv_prog_RANLIB="ranlib"
1875 break
1876 fi
1877 done
1878 IFS="$ac_save_ifs"
1879 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1880fi
1881fi
1882RANLIB="$ac_cv_prog_RANLIB"
1883if test -n "$RANLIB"; then
1884 echo "$ac_t""$RANLIB" 1>&6
1885else
1886 echo "$ac_t""no" 1>&6
1887fi
1888
1889else
1890 RANLIB=":"
1891fi
1892fi
1893
1894# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
1895set dummy ${ac_tool_prefix}strip; ac_word=$2
1896echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c01f395 1897echo "configure:1898: checking for $ac_word" >&5
03391b53
AO
1898if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1899 echo $ac_n "(cached) $ac_c" 1>&6
1900else
1901 if test -n "$STRIP"; then
1902 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1903else
1904 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1905 ac_dummy="$PATH"
1906 for ac_dir in $ac_dummy; do
1907 test -z "$ac_dir" && ac_dir=.
1908 if test -f $ac_dir/$ac_word; then
1909 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
1910 break
1911 fi
1912 done
1913 IFS="$ac_save_ifs"
1914fi
1915fi
1916STRIP="$ac_cv_prog_STRIP"
1917if test -n "$STRIP"; then
1918 echo "$ac_t""$STRIP" 1>&6
1919else
1920 echo "$ac_t""no" 1>&6
1921fi
1922
1923
1924if test -z "$ac_cv_prog_STRIP"; then
1925if test -n "$ac_tool_prefix"; then
1926 # Extract the first word of "strip", so it can be a program name with args.
1927set dummy strip; ac_word=$2
1928echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c01f395 1929echo "configure:1930: checking for $ac_word" >&5
03391b53
AO
1930if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1931 echo $ac_n "(cached) $ac_c" 1>&6
1932else
1933 if test -n "$STRIP"; then
1934 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1935else
1936 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1937 ac_dummy="$PATH"
1938 for ac_dir in $ac_dummy; do
1939 test -z "$ac_dir" && ac_dir=.
1940 if test -f $ac_dir/$ac_word; then
1941 ac_cv_prog_STRIP="strip"
1942 break
1943 fi
1944 done
1945 IFS="$ac_save_ifs"
1946 test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
1947fi
1948fi
1949STRIP="$ac_cv_prog_STRIP"
1950if test -n "$STRIP"; then
1951 echo "$ac_t""$STRIP" 1>&6
1952else
1953 echo "$ac_t""no" 1>&6
1954fi
1955
1956else
1957 STRIP=":"
1958fi
1959fi
1960
1961
1962# Check for any special flags to pass to ltconfig.
1963libtool_flags="--cache-file=$cache_file"
1964test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
1965test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
1966test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
33456445
AO
1967test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
1968test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
03391b53
AO
1969
1970libtool_flags="$libtool_flags --enable-win32-dll"
1971# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
1972if test "${enable_libtool_lock+set}" = set; then
1973 enableval="$enable_libtool_lock"
1974 :
1975fi
1976
1977test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
1978test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
1979
1980# Check whether --with-pic or --without-pic was given.
1981if test "${with_pic+set}" = set; then
1982 withval="$with_pic"
1983 pic_mode="$withval"
1984else
1985 pic_mode=default
1986fi
1987
1988test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
1989test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
1990
1991# Some flags need to be propagated to the compiler or linker for good
1992# libtool support.
33456445 1993case $host in
03391b53
AO
1994*-*-irix6*)
1995 # Find out which ABI we are using.
9c01f395
NN
1996 echo '#line 1997 "configure"' > conftest.$ac_ext
1997 if { (eval echo configure:1998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3343fdd2
AO
1998 if test "$lt_cv_prog_gnu_ld" = yes; then
1999 case `/usr/bin/file conftest.$ac_objext` in
2000 *32-bit*)
2001 LD="${LD-ld} -melf32bsmip"
2002 ;;
2003 *N32*)
2004 LD="${LD-ld} -melf32bmipn32"
2005 ;;
2006 *64-bit*)
2007 LD="${LD-ld} -melf64bmip"
2008 ;;
2009 esac
2010 else
33456445 2011 case `/usr/bin/file conftest.$ac_objext` in
03391b53
AO
2012 *32-bit*)
2013 LD="${LD-ld} -32"
2014 ;;
2015 *N32*)
2016 LD="${LD-ld} -n32"
2017 ;;
2018 *64-bit*)
2019 LD="${LD-ld} -64"
2020 ;;
2021 esac
3343fdd2 2022 fi
03391b53
AO
2023 fi
2024 rm -rf conftest*
2025 ;;
2026
f5cc59a7
AO
2027ia64-*-hpux*)
2028 # Find out which ABI we are using.
2029 echo 'int i;' > conftest.$ac_ext
9c01f395 2030 if { (eval echo configure:2031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
f5cc59a7
AO
2031 case "`/usr/bin/file conftest.o`" in
2032 *ELF-32*)
2033 HPUX_IA64_MODE="32"
2034 ;;
2035 *ELF-64*)
2036 HPUX_IA64_MODE="64"
2037 ;;
2038 esac
2039 fi
2040 rm -rf conftest*
2041 ;;
2042
c5e3e1ed
AO
2043x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
2044 # Find out which ABI we are using.
2045 echo 'int i;' > conftest.$ac_ext
9c01f395 2046 if { (eval echo configure:2047: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
c5e3e1ed
AO
2047 case "`/usr/bin/file conftest.o`" in
2048 *32-bit*)
2049 case $host in
2050 x86_64-*linux*)
2051 LD="${LD-ld} -m elf_i386"
2052 ;;
e517f636 2053 ppc64-*linux*|powerpc64-*linux*)
c5e3e1ed
AO
2054 LD="${LD-ld} -m elf32ppclinux"
2055 ;;
2056 s390x-*linux*)
2057 LD="${LD-ld} -m elf_s390"
2058 ;;
2059 sparc64-*linux*)
2060 LD="${LD-ld} -m elf32_sparc"
2061 ;;
2062 esac
2063 ;;
2064 *64-bit*)
2065 case $host in
2066 x86_64-*linux*)
2067 LD="${LD-ld} -m elf_x86_64"
2068 ;;
2069 ppc*-*linux*|powerpc*-*linux*)
2070 LD="${LD-ld} -m elf64ppc"
2071 ;;
2072 s390*-*linux*)
2073 LD="${LD-ld} -m elf64_s390"
2074 ;;
2075 sparc*-*linux*)
2076 LD="${LD-ld} -m elf64_sparc"
2077 ;;
2078 esac
2079 ;;
2080 esac
2081 fi
2082 rm -rf conftest*
2083 ;;
2084
03391b53
AO
2085*-*-sco3.2v5*)
2086 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
2087 SAVE_CFLAGS="$CFLAGS"
2088 CFLAGS="$CFLAGS -belf"
2089 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
9c01f395 2090echo "configure:2091: checking whether the C compiler needs -belf" >&5
03391b53
AO
2091if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
2092 echo $ac_n "(cached) $ac_c" 1>&6
2093else
2094
2095 ac_ext=c
2096# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2097ac_cpp='$CPP $CPPFLAGS'
2098ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2099ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2100cross_compiling=$ac_cv_prog_cc_cross
2101
2102 cat > conftest.$ac_ext <<EOF
9c01f395 2103#line 2104 "configure"
03391b53
AO
2104#include "confdefs.h"
2105
2106int main() {
2107
2108; return 0; }
2109EOF
9c01f395 2110if { (eval echo configure:2111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
03391b53
AO
2111 rm -rf conftest*
2112 lt_cv_cc_needs_belf=yes
2113else
2114 echo "configure: failed program was:" >&5
2115 cat conftest.$ac_ext >&5
2116 rm -rf conftest*
2117 lt_cv_cc_needs_belf=no
2118fi
2119rm -f conftest*
2120 ac_ext=c
2121# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
2122ac_cpp='$CPP $CPPFLAGS'
2123ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
2124ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
2125cross_compiling=$ac_cv_prog_cc_cross
2126
2127fi
2128
2129echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
2130 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
2131 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
2132 CFLAGS="$SAVE_CFLAGS"
2133 fi
2134 ;;
2135
2136*-*-cygwin* | *-*-mingw* | *-*-pw32*)
2137 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
2138set dummy ${ac_tool_prefix}dlltool; ac_word=$2
2139echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c01f395 2140echo "configure:2141: checking for $ac_word" >&5
03391b53
AO
2141if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
2142 echo $ac_n "(cached) $ac_c" 1>&6
2143else
2144 if test -n "$DLLTOOL"; then
2145 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2146else
2147 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2148 ac_dummy="$PATH"
2149 for ac_dir in $ac_dummy; do
2150 test -z "$ac_dir" && ac_dir=.
2151 if test -f $ac_dir/$ac_word; then
2152 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
2153 break
2154 fi
2155 done
2156 IFS="$ac_save_ifs"
2157fi
2158fi
2159DLLTOOL="$ac_cv_prog_DLLTOOL"
2160if test -n "$DLLTOOL"; then
2161 echo "$ac_t""$DLLTOOL" 1>&6
2162else
2163 echo "$ac_t""no" 1>&6
2164fi
2165
2166
2167if test -z "$ac_cv_prog_DLLTOOL"; then
2168if test -n "$ac_tool_prefix"; then
2169 # Extract the first word of "dlltool", so it can be a program name with args.
2170set dummy dlltool; ac_word=$2
2171echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c01f395 2172echo "configure:2173: checking for $ac_word" >&5
03391b53
AO
2173if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
2174 echo $ac_n "(cached) $ac_c" 1>&6
2175else
2176 if test -n "$DLLTOOL"; then
2177 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
2178else
2179 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2180 ac_dummy="$PATH"
2181 for ac_dir in $ac_dummy; do
2182 test -z "$ac_dir" && ac_dir=.
2183 if test -f $ac_dir/$ac_word; then
2184 ac_cv_prog_DLLTOOL="dlltool"
2185 break
2186 fi
2187 done
2188 IFS="$ac_save_ifs"
2189 test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
2190fi
2191fi
2192DLLTOOL="$ac_cv_prog_DLLTOOL"
2193if test -n "$DLLTOOL"; then
2194 echo "$ac_t""$DLLTOOL" 1>&6
2195else
2196 echo "$ac_t""no" 1>&6
2197fi
2198
bce1b489 2199else
03391b53
AO
2200 DLLTOOL="false"
2201fi
2202fi
2203
2204 # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
2205set dummy ${ac_tool_prefix}as; ac_word=$2
2206echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c01f395 2207echo "configure:2208: checking for $ac_word" >&5
03391b53
AO
2208if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
2209 echo $ac_n "(cached) $ac_c" 1>&6
bce1b489 2210else
03391b53
AO
2211 if test -n "$AS"; then
2212 ac_cv_prog_AS="$AS" # Let the user override the test.
2213else
2214 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2215 ac_dummy="$PATH"
2216 for ac_dir in $ac_dummy; do
2217 test -z "$ac_dir" && ac_dir=.
2218 if test -f $ac_dir/$ac_word; then
2219 ac_cv_prog_AS="${ac_tool_prefix}as"
2220 break
2221 fi
2222 done
2223 IFS="$ac_save_ifs"
bce1b489
BE
2224fi
2225fi
03391b53
AO
2226AS="$ac_cv_prog_AS"
2227if test -n "$AS"; then
2228 echo "$ac_t""$AS" 1>&6
2229else
2230 echo "$ac_t""no" 1>&6
2231fi
2232
2233
2234if test -z "$ac_cv_prog_AS"; then
2235if test -n "$ac_tool_prefix"; then
2236 # Extract the first word of "as", so it can be a program name with args.
2237set dummy as; ac_word=$2
2238echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c01f395 2239echo "configure:2240: checking for $ac_word" >&5
03391b53
AO
2240if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
2241 echo $ac_n "(cached) $ac_c" 1>&6
2242else
2243 if test -n "$AS"; then
2244 ac_cv_prog_AS="$AS" # Let the user override the test.
2245else
2246 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2247 ac_dummy="$PATH"
2248 for ac_dir in $ac_dummy; do
2249 test -z "$ac_dir" && ac_dir=.
2250 if test -f $ac_dir/$ac_word; then
2251 ac_cv_prog_AS="as"
2252 break
2253 fi
2254 done
2255 IFS="$ac_save_ifs"
2256 test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
2257fi
2258fi
2259AS="$ac_cv_prog_AS"
2260if test -n "$AS"; then
2261 echo "$ac_t""$AS" 1>&6
2262else
2263 echo "$ac_t""no" 1>&6
2264fi
2265
2266else
2267 AS="false"
2268fi
2269fi
2270
2271 # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
2272set dummy ${ac_tool_prefix}objdump; ac_word=$2
2273echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c01f395 2274echo "configure:2275: checking for $ac_word" >&5
03391b53
AO
2275if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
2276 echo $ac_n "(cached) $ac_c" 1>&6
2277else
2278 if test -n "$OBJDUMP"; then
2279 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
2280else
2281 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2282 ac_dummy="$PATH"
2283 for ac_dir in $ac_dummy; do
2284 test -z "$ac_dir" && ac_dir=.
2285 if test -f $ac_dir/$ac_word; then
2286 ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
2287 break
2288 fi
2289 done
2290 IFS="$ac_save_ifs"
2291fi
2292fi
2293OBJDUMP="$ac_cv_prog_OBJDUMP"
2294if test -n "$OBJDUMP"; then
2295 echo "$ac_t""$OBJDUMP" 1>&6
2296else
2297 echo "$ac_t""no" 1>&6
2298fi
2299
b150efee
FS
2300
2301if test -z "$ac_cv_prog_OBJDUMP"; then
2302if test -n "$ac_tool_prefix"; then
2303 # Extract the first word of "objdump", so it can be a program name with args.
2304set dummy objdump; ac_word=$2
2305echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c01f395 2306echo "configure:2307: checking for $ac_word" >&5
b150efee
FS
2307if eval "test \"`echo '$''{'ac_cv_prog_OBJDUMP'+set}'`\" = set"; then
2308 echo $ac_n "(cached) $ac_c" 1>&6
2309else
2310 if test -n "$OBJDUMP"; then
2311 ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
2312else
2313 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2314 ac_dummy="$PATH"
2315 for ac_dir in $ac_dummy; do
2316 test -z "$ac_dir" && ac_dir=.
2317 if test -f $ac_dir/$ac_word; then
2318 ac_cv_prog_OBJDUMP="objdump"
2319 break
2320 fi
2321 done
2322 IFS="$ac_save_ifs"
2323 test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
2324fi
2325fi
2326OBJDUMP="$ac_cv_prog_OBJDUMP"
2327if test -n "$OBJDUMP"; then
2328 echo "$ac_t""$OBJDUMP" 1>&6
2329else
2330 echo "$ac_t""no" 1>&6
2331fi
2332
2333else
2334 OBJDUMP="false"
2335fi
2336fi
2337
2338
2339 # recent cygwin and mingw systems supply a stub DllMain which the user
2340 # can override, but on older systems we have to supply one
2341 echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
9c01f395 2342echo "configure:2343: checking if libtool should supply DllMain function" >&5
b150efee
FS
2343if eval "test \"`echo '$''{'lt_cv_need_dllmain'+set}'`\" = set"; then
2344 echo $ac_n "(cached) $ac_c" 1>&6
2345else
2346 cat > conftest.$ac_ext <<EOF
9c01f395 2347#line 2348 "configure"
b150efee
FS
2348#include "confdefs.h"
2349
2350int main() {
2351extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
2352 DllMain (0, 0, 0);
2353; return 0; }
2354EOF
9c01f395 2355if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b150efee
FS
2356 rm -rf conftest*
2357 lt_cv_need_dllmain=no
2358else
2359 echo "configure: failed program was:" >&5
2360 cat conftest.$ac_ext >&5
2361 rm -rf conftest*
2362 lt_cv_need_dllmain=yes
2363fi
2364rm -f conftest*
2365fi
2366
2367echo "$ac_t""$lt_cv_need_dllmain" 1>&6
2368
2369 case $host/$CC in
2370 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
2371 # old mingw systems require "-dll" to link a DLL, while more recent ones
2372 # require "-mdll"
2373 SAVE_CFLAGS="$CFLAGS"
2374 CFLAGS="$CFLAGS -mdll"
2375 echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
9c01f395 2376echo "configure:2377: checking how to link DLLs" >&5
b150efee
FS
2377if eval "test \"`echo '$''{'lt_cv_cc_dll_switch'+set}'`\" = set"; then
2378 echo $ac_n "(cached) $ac_c" 1>&6
2379else
2380 cat > conftest.$ac_ext <<EOF
9c01f395 2381#line 2382 "configure"
b150efee
FS
2382#include "confdefs.h"
2383
2384int main() {
2385
2386; return 0; }
2387EOF
9c01f395 2388if { (eval echo configure:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
b150efee
FS
2389 rm -rf conftest*
2390 lt_cv_cc_dll_switch=-mdll
2391else
2392 echo "configure: failed program was:" >&5
2393 cat conftest.$ac_ext >&5
2394 rm -rf conftest*
2395 lt_cv_cc_dll_switch=-dll
2396fi
2397rm -f conftest*
2398fi
2399
2400echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
2401 CFLAGS="$SAVE_CFLAGS" ;;
2402 *-*-cygwin* | *-*-pw32*)
2403 # cygwin systems need to pass --dll to the linker, and not link
2404 # crt.o which will require a WinMain@16 definition.
2405 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
2406 esac
2407 ;;
2408
2409esac
2410
2411
2412# Save cache, so that ltconfig can load it
2413cat > confcache <<\EOF
2414# This file is a shell script that caches the results of configure
2415# tests run on this system so they can be shared between configure
2416# scripts and configure runs. It is not useful on other systems.
2417# If it contains results you don't want to keep, you may remove or edit it.
2418#
2419# By default, configure uses ./config.cache as the cache file,
2420# creating it if it does not exist already. You can give configure
2421# the --cache-file=FILE option to use a different cache file; that is
2422# what configure does when it calls configure scripts in
2423# subdirectories, so they share the cache.
2424# Giving --cache-file=/dev/null disables caching, for debugging configure.
2425# config.status only pays attention to the cache file if you give it the
2426# --recheck option to rerun configure.
2427#
2428EOF
2429# The following way of writing the cache mishandles newlines in values,
2430# but we know of no workaround that is simple, portable, and efficient.
2431# So, don't put newlines in cache variables' values.
2432# Ultrix sh set writes to stderr and can't be redirected directly,
2433# and sets the high bit in the cache file unless we assign to the vars.
2434(set) 2>&1 |
2435 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2436 *ac_space=\ *)
2437 # `set' does not quote correctly, so add quotes (double-quote substitution
2438 # turns \\\\ into \\, and sed turns \\ into \).
2439 sed -n \
2440 -e "s/'/'\\\\''/g" \
2441 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2442 ;;
2443 *)
2444 # `set' quotes correctly as required by POSIX, so do not add quotes.
2445 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2446 ;;
2447 esac >> confcache
2448if cmp -s $cache_file confcache; then
2449 :
2450else
2451 if test -w $cache_file; then
2452 echo "updating cache $cache_file"
2453 cat confcache > $cache_file
2454 else
2455 echo "not updating unwritable cache $cache_file"
2456 fi
2457fi
2458rm -f confcache
2459
2460
2461# Actually configure libtool. ac_aux_dir is where install-sh is found.
2462AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
2463MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
2464LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
2465AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
2466objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
2467deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
2468${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
2469$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
2470|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
2471
2472# Reload cache, that may have been modified by ltconfig
2473if test -r "$cache_file"; then
2474 echo "loading cache $cache_file"
2475 . $cache_file
2476else
2477 echo "creating cache $cache_file"
2478 > $cache_file
2479fi
2480
2481
2482# This can be used to rebuild libtool when needed
2483LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
2484
2485# Always use our own libtool.
2486LIBTOOL='$(SHELL) $(top_builddir)/libtool'
2487
2488# Redirect the config.log output again, so that the ltconfig log is not
2489# clobbered by the next message.
2490exec 5>>./config.log
2491
2492
2493
2494
2495
2496
2497
2498test "$AR" || AR=ar
2499
2500if test "$RANLIB"; then :
2501
2502else
2503 # Extract the first word of "ranlib", so it can be a program name with args.
2504set dummy ranlib; ac_word=$2
2505echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
9c01f395 2506echo "configure:2507: checking for $ac_word" >&5
b150efee
FS
2507if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2508 echo $ac_n "(cached) $ac_c" 1>&6
2509else
2510 if test -n "$RANLIB"; then
2511 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2512else
2513 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2514 ac_dummy="$PATH"
2515 for ac_dir in $ac_dummy; do
2516 test -z "$ac_dir" && ac_dir=.
2517 if test -f $ac_dir/$ac_word; then
2518 ac_cv_prog_RANLIB="ranlib"
2519 break
2520 fi
2521 done
2522 IFS="$ac_save_ifs"
2523 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2524fi
2525fi
2526RANLIB="$ac_cv_prog_RANLIB"
2527if test -n "$RANLIB"; then
2528 echo "$ac_t""$RANLIB" 1>&6
2529else
2530 echo "$ac_t""no" 1>&6
2531fi
2532
2533fi
2534# Find a good install program. We prefer a C program (faster),
2535# so one script is as good as another. But avoid the broken or
2536# incompatible versions:
2537# SysV /etc/install, /usr/sbin/install
2538# SunOS /usr/etc/install
2539# IRIX /sbin/install
2540# AIX /bin/install
2541# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2542# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2543# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2544# ./install, which can be erroneously created by make from ./install.sh.
2545echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
9c01f395 2546echo "configure:2547: checking for a BSD compatible install" >&5
b150efee
FS
2547if test -z "$INSTALL"; then
2548if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2549 echo $ac_n "(cached) $ac_c" 1>&6
2550else
2551 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2552 for ac_dir in $PATH; do
2553 # Account for people who put trailing slashes in PATH elements.
2554 case "$ac_dir/" in
2555 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2556 *)
2557 # OSF1 and SCO ODT 3.0 have their own names for install.
2558 # Don't use installbsd from OSF since it installs stuff as root
2559 # by default.
2560 for ac_prog in ginstall scoinst install; do
2561 if test -f $ac_dir/$ac_prog; then
2562 if test $ac_prog = install &&
2563 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2564 # AIX install. It has an incompatible calling convention.
2565 :
2566 else
2567 ac_cv_path_install="$ac_dir/$ac_prog -c"
2568 break 2
2569 fi
2570 fi
2571 done
2572 ;;
2573 esac
2574 done
2575 IFS="$ac_save_IFS"
2576
2577fi
2578 if test "${ac_cv_path_install+set}" = set; then
2579 INSTALL="$ac_cv_path_install"
2580 else
2581 # As a last resort, use the slow shell script. We don't cache a
2582 # path for INSTALL within a source directory, because that will
2583 # break other packages using the cache if that directory is
2584 # removed, or if the path is relative.
2585 INSTALL="$ac_install_sh"
2586 fi
2587fi
2588echo "$ac_t""$INSTALL" 1>&6
2589
2590# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2591# It thinks the first close brace ends the variable substitution.
2592test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2593
2594test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2595
2596test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2597
2598echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
9c01f395 2599echo "configure:2600: checking whether ${MAKE-make} sets \${MAKE}" >&5
b150efee
FS
2600set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
2601if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
2602 echo $ac_n "(cached) $ac_c" 1>&6
2603else
2604 cat > conftestmake <<\EOF
2605all:
2606 @echo 'ac_maketemp="${MAKE}"'
2607EOF
2608# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2609eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
2610if test -n "$ac_maketemp"; then
2611 eval ac_cv_prog_make_${ac_make}_set=yes
2612else
2613 eval ac_cv_prog_make_${ac_make}_set=no
2614fi
2615rm -f conftestmake
2616fi
2617if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2618 echo "$ac_t""yes" 1>&6
2619 SET_MAKE=
2620else
2621 echo "$ac_t""no" 1>&6
2622 SET_MAKE="MAKE=${MAKE-make}"
2623fi
2624
2625
68a1af87
MH
2626PACKAGE=libobjc
2627VERSION=1:0:0
2628
2629
b150efee
FS
2630# Sanity check for the cross-compilation case:
2631echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
9c01f395 2632echo "configure:2633: checking how to run the C preprocessor" >&5
b150efee
FS
2633# On Suns, sometimes $CPP names a directory.
2634if test -n "$CPP" && test -d "$CPP"; then
2635 CPP=
2636fi
2637if test -z "$CPP"; then
2638if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
2639 echo $ac_n "(cached) $ac_c" 1>&6
2640else
2641 # This must be in double quotes, not single quotes, because CPP may get
2642 # substituted into the Makefile and "${CC-cc}" will confuse make.
2643 CPP="${CC-cc} -E"
2644 # On the NeXT, cc -E runs the code through the compiler's parser,
2645 # not just through cpp.
2646 cat > conftest.$ac_ext <<EOF
9c01f395 2647#line 2648 "configure"
b150efee
FS
2648#include "confdefs.h"
2649#include <assert.h>
2650Syntax Error
2651EOF
2652ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9c01f395 2653{ (eval echo configure:2654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b150efee
FS
2654ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2655if test -z "$ac_err"; then
2656 :
2657else
2658 echo "$ac_err" >&5
2659 echo "configure: failed program was:" >&5
2660 cat conftest.$ac_ext >&5
2661 rm -rf conftest*
2662 CPP="${CC-cc} -E -traditional-cpp"
2663 cat > conftest.$ac_ext <<EOF
9c01f395 2664#line 2665 "configure"
b150efee
FS
2665#include "confdefs.h"
2666#include <assert.h>
2667Syntax Error
2668EOF
2669ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9c01f395 2670{ (eval echo configure:2671: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b150efee
FS
2671ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2672if test -z "$ac_err"; then
2673 :
2674else
2675 echo "$ac_err" >&5
2676 echo "configure: failed program was:" >&5
2677 cat conftest.$ac_ext >&5
2678 rm -rf conftest*
2679 CPP="${CC-cc} -nologo -E"
2680 cat > conftest.$ac_ext <<EOF
9c01f395 2681#line 2682 "configure"
b150efee
FS
2682#include "confdefs.h"
2683#include <assert.h>
2684Syntax Error
2685EOF
2686ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9c01f395 2687{ (eval echo configure:2688: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b150efee
FS
2688ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2689if test -z "$ac_err"; then
2690 :
2691else
2692 echo "$ac_err" >&5
2693 echo "configure: failed program was:" >&5
2694 cat conftest.$ac_ext >&5
2695 rm -rf conftest*
2696 CPP=/lib/cpp
2697fi
2698rm -f conftest*
2699fi
2700rm -f conftest*
2701fi
2702rm -f conftest*
2703 ac_cv_prog_CPP="$CPP"
2704fi
2705 CPP="$ac_cv_prog_CPP"
2706else
2707 ac_cv_prog_CPP="$CPP"
2708fi
2709echo "$ac_t""$CPP" 1>&6
2710
2711ac_safe=`echo "stdio.h" | sed 'y%./+-%__p_%'`
2712echo $ac_n "checking for stdio.h""... $ac_c" 1>&6
9c01f395 2713echo "configure:2714: checking for stdio.h" >&5
b150efee
FS
2714if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2715 echo $ac_n "(cached) $ac_c" 1>&6
2716else
2717 cat > conftest.$ac_ext <<EOF
9c01f395 2718#line 2719 "configure"
b150efee
FS
2719#include "confdefs.h"
2720#include <stdio.h>
2721EOF
2722ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9c01f395 2723{ (eval echo configure:2724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b150efee
FS
2724ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2725if test -z "$ac_err"; then
2726 rm -rf conftest*
2727 eval "ac_cv_header_$ac_safe=yes"
2728else
2729 echo "$ac_err" >&5
2730 echo "configure: failed program was:" >&5
2731 cat conftest.$ac_ext >&5
2732 rm -rf conftest*
2733 eval "ac_cv_header_$ac_safe=no"
2734fi
2735rm -f conftest*
2736fi
2737if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2738 echo "$ac_t""yes" 1>&6
2739 :
2740else
2741 echo "$ac_t""no" 1>&6
2742{ echo "configure: error: Can't find stdio.h.
2743You must have a usable C system for the target already installed, at least
2744including headers and, preferably, the library, before you can configure
2745the Objective C runtime system. If necessary, install gcc now with
2746\`LANGUAGES=c', then the target library, then build with \`LANGUAGES=objc'." 1>&2; exit 1; }
2747fi
2748
2749
2750echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
9c01f395 2751echo "configure:2752: checking for ANSI C header files" >&5
b150efee
FS
2752if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2753 echo $ac_n "(cached) $ac_c" 1>&6
2754else
2755 cat > conftest.$ac_ext <<EOF
9c01f395 2756#line 2757 "configure"
b150efee
FS
2757#include "confdefs.h"
2758#include <stdlib.h>
2759#include <stdarg.h>
2760#include <string.h>
2761#include <float.h>
2762EOF
2763ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9c01f395 2764{ (eval echo configure:2765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b150efee
FS
2765ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2766if test -z "$ac_err"; then
2767 rm -rf conftest*
2768 ac_cv_header_stdc=yes
2769else
2770 echo "$ac_err" >&5
2771 echo "configure: failed program was:" >&5
2772 cat conftest.$ac_ext >&5
2773 rm -rf conftest*
2774 ac_cv_header_stdc=no
2775fi
2776rm -f conftest*
2777
2778if test $ac_cv_header_stdc = yes; then
2779 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2780cat > conftest.$ac_ext <<EOF
9c01f395 2781#line 2782 "configure"
b150efee
FS
2782#include "confdefs.h"
2783#include <string.h>
2784EOF
2785if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2786 egrep "memchr" >/dev/null 2>&1; then
2787 :
03391b53 2788else
b150efee
FS
2789 rm -rf conftest*
2790 ac_cv_header_stdc=no
03391b53 2791fi
b150efee
FS
2792rm -f conftest*
2793
03391b53
AO
2794fi
2795
b150efee
FS
2796if test $ac_cv_header_stdc = yes; then
2797 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2798cat > conftest.$ac_ext <<EOF
9c01f395 2799#line 2800 "configure"
b150efee
FS
2800#include "confdefs.h"
2801#include <stdlib.h>
2802EOF
2803if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2804 egrep "free" >/dev/null 2>&1; then
2805 :
03391b53 2806else
b150efee
FS
2807 rm -rf conftest*
2808 ac_cv_header_stdc=no
03391b53 2809fi
b150efee 2810rm -f conftest*
03391b53 2811
b150efee 2812fi
03391b53 2813
b150efee
FS
2814if test $ac_cv_header_stdc = yes; then
2815 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2816if test "$cross_compiling" = yes; then
2817 :
03391b53
AO
2818else
2819 cat > conftest.$ac_ext <<EOF
9c01f395 2820#line 2821 "configure"
03391b53 2821#include "confdefs.h"
b150efee
FS
2822#include <ctype.h>
2823#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2824#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2825#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2826int main () { int i; for (i = 0; i < 256; i++)
2827if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2828exit (0); }
03391b53 2829
03391b53 2830EOF
9c01f395 2831if { (eval echo configure:2832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
b150efee
FS
2832then
2833 :
03391b53
AO
2834else
2835 echo "configure: failed program was:" >&5
2836 cat conftest.$ac_ext >&5
b150efee
FS
2837 rm -fr conftest*
2838 ac_cv_header_stdc=no
03391b53 2839fi
b150efee 2840rm -fr conftest*
03391b53
AO
2841fi
2842
b150efee
FS
2843fi
2844fi
03391b53 2845
b150efee
FS
2846echo "$ac_t""$ac_cv_header_stdc" 1>&6
2847if test $ac_cv_header_stdc = yes; then
2848 cat >> confdefs.h <<\EOF
2849#define STDC_HEADERS 1
2850EOF
2851
2852fi
2853
2854
2855for ac_hdr in sched.h
2856do
2857ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2858echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9c01f395 2859echo "configure:2860: checking for $ac_hdr" >&5
b150efee 2860if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
03391b53
AO
2861 echo $ac_n "(cached) $ac_c" 1>&6
2862else
2863 cat > conftest.$ac_ext <<EOF
9c01f395 2864#line 2865 "configure"
03391b53 2865#include "confdefs.h"
b150efee 2866#include <$ac_hdr>
03391b53 2867EOF
b150efee 2868ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9c01f395 2869{ (eval echo configure:2870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b150efee
FS
2870ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2871if test -z "$ac_err"; then
03391b53 2872 rm -rf conftest*
b150efee 2873 eval "ac_cv_header_$ac_safe=yes"
03391b53 2874else
b150efee 2875 echo "$ac_err" >&5
03391b53
AO
2876 echo "configure: failed program was:" >&5
2877 cat conftest.$ac_ext >&5
2878 rm -rf conftest*
b150efee 2879 eval "ac_cv_header_$ac_safe=no"
03391b53
AO
2880fi
2881rm -f conftest*
2882fi
b150efee
FS
2883if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2884 echo "$ac_t""yes" 1>&6
2885 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2886 cat >> confdefs.h <<EOF
2887#define $ac_tr_hdr 1
03391b53 2888EOF
b150efee 2889
03391b53 2890else
b150efee 2891 echo "$ac_t""no" 1>&6
03391b53 2892fi
b150efee 2893done
bce1b489 2894
03391b53 2895
b150efee 2896# Determine CFLAGS for gthread.
03391b53 2897
b150efee 2898echo $ac_n "checking for gthread cflags""... $ac_c" 1>&6
9c01f395 2899echo "configure:2900: checking for gthread cflags" >&5
b150efee
FS
2900if eval "test \"`echo '$''{'objc_cv_gthread_flags'+set}'`\" = set"; then
2901 echo $ac_n "(cached) $ac_c" 1>&6
03391b53 2902else
b150efee
FS
2903 if test -f "$r"/gcc/Makefile
2904then
2905 objc_cv_gthread_flags=`grep \^GTHREAD_FLAGS "$r"/gcc/Makefile | awk -F= '{ print $2 }'`
2906else
2907 { echo "configure: error: not found" 1>&2; exit 1; }
2908fi
03391b53
AO
2909fi
2910
b150efee
FS
2911echo "$ac_t""$objc_cv_gthread_flags" 1>&6
2912GTHREAD_FLAGS=$objc_cv_gthread_flags
03391b53 2913
c161c99b 2914
bce1b489
BE
2915# Check whether --enable-objc-gc or --disable-objc-gc was given.
2916if test "${enable_objc_gc+set}" = set; then
2917 enableval="$enable_objc_gc"
2918 if [ x$enable_objc_gc = xno ]; then
2919 OBJC_BOEHM_GC=''
2920else
c161c99b 2921 OBJC_BOEHM_GC=libobjc_gc.la
bce1b489
BE
2922fi
2923else
2924 OBJC_BOEHM_GC=''
2925fi
2926
03391b53
AO
2927
2928
2929
bce1b489
BE
2930# We need multilib support, but only if configuring for the target.
2931trap '' 1 2 15
03391b53 2932cat > confcache <<\EOF
bce1b489
BE
2933# This file is a shell script that caches the results of configure
2934# tests run on this system so they can be shared between configure
2935# scripts and configure runs. It is not useful on other systems.
2936# If it contains results you don't want to keep, you may remove or edit it.
2937#
2938# By default, configure uses ./config.cache as the cache file,
2939# creating it if it does not exist already. You can give configure
2940# the --cache-file=FILE option to use a different cache file; that is
2941# what configure does when it calls configure scripts in
2942# subdirectories, so they share the cache.
2943# Giving --cache-file=/dev/null disables caching, for debugging configure.
2944# config.status only pays attention to the cache file if you give it the
2945# --recheck option to rerun configure.
2946#
2947EOF
2948# The following way of writing the cache mishandles newlines in values,
2949# but we know of no workaround that is simple, portable, and efficient.
2950# So, don't put newlines in cache variables' values.
2951# Ultrix sh set writes to stderr and can't be redirected directly,
2952# and sets the high bit in the cache file unless we assign to the vars.
03391b53
AO
2953(set) 2>&1 |
2954 case `(ac_space=' '; set | grep ac_space) 2>&1` in
2955 *ac_space=\ *)
2956 # `set' does not quote correctly, so add quotes (double-quote substitution
2957 # turns \\\\ into \\, and sed turns \\ into \).
2958 sed -n \
2959 -e "s/'/'\\\\''/g" \
2960 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
2961 ;;
2962 *)
2963 # `set' quotes correctly as required by POSIX, so do not add quotes.
2964 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
2965 ;;
2966 esac >> confcache
2967if cmp -s $cache_file confcache; then
2968 :
2969else
bce1b489 2970 if test -w $cache_file; then
03391b53
AO
2971 echo "updating cache $cache_file"
2972 cat confcache > $cache_file
bce1b489
BE
2973 else
2974 echo "not updating unwritable cache $cache_file"
2975 fi
2976fi
2977rm -f confcache
03391b53 2978
bce1b489
BE
2979trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2980
2981test "x$prefix" = xNONE && prefix=$ac_default_prefix
2982# Let make expand exec_prefix.
2983test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2984
2985# Any assignment to VPATH causes Sun make to only execute
2986# the first set of double-colon rules, so remove it if not needed.
2987# If there is a colon in the path, we need to keep it.
2988if test "x$srcdir" = x.; then
2989 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2990fi
2991
03391b53 2992trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
bce1b489 2993
03391b53 2994DEFS=-DHAVE_CONFIG_H
bce1b489 2995
03391b53 2996# Without the "./", some shells look in PATH for config.status.
162f5967 2997: ${CONFIG_STATUS=./config.status}
03391b53 2998
bce1b489 2999echo creating $CONFIG_STATUS
03391b53
AO
3000rm -f $CONFIG_STATUS
3001cat > $CONFIG_STATUS <<EOF
bce1b489
BE
3002#! /bin/sh
3003# Generated automatically by configure.
3004# Run this file to recreate the current configuration.
03391b53
AO
3005# This directory was configured as follows,
3006# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3007#
3008# $0 $ac_configure_args
3009#
bce1b489
BE
3010# Compiler output produced by configure, useful for debugging
3011# configure, is in ./config.log if it exists.
3012
03391b53
AO
3013ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3014for ac_option
bce1b489 3015do
03391b53 3016 case "\$ac_option" in
bce1b489 3017 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
03391b53
AO
3018 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3019 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3020 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
3021 echo "$CONFIG_STATUS generated by autoconf version 2.13"
3022 exit 0 ;;
3023 -help | --help | --hel | --he | --h)
3024 echo "\$ac_cs_usage"; exit 0 ;;
3025 *) echo "\$ac_cs_usage"; exit 1 ;;
bce1b489
BE
3026 esac
3027done
3028
03391b53
AO
3029ac_given_srcdir=$srcdir
3030ac_given_INSTALL="$INSTALL"
162f5967 3031
03391b53 3032trap 'rm -fr `echo "Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
162f5967 3033EOF
03391b53 3034cat >> $CONFIG_STATUS <<EOF
162f5967 3035
03391b53
AO
3036# Protect against being on the right side of a sed subst in config.status.
3037sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3038 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
3039$ac_vpsub
3040$extrasub
3041s%@SHELL@%$SHELL%g
3042s%@CFLAGS@%$CFLAGS%g
3043s%@CPPFLAGS@%$CPPFLAGS%g
3044s%@CXXFLAGS@%$CXXFLAGS%g
3045s%@FFLAGS@%$FFLAGS%g
3046s%@DEFS@%$DEFS%g
3047s%@LDFLAGS@%$LDFLAGS%g
3048s%@LIBS@%$LIBS%g
3049s%@exec_prefix@%$exec_prefix%g
3050s%@prefix@%$prefix%g
3051s%@program_transform_name@%$program_transform_name%g
3052s%@bindir@%$bindir%g
3053s%@sbindir@%$sbindir%g
3054s%@libexecdir@%$libexecdir%g
3055s%@datadir@%$datadir%g
3056s%@sysconfdir@%$sysconfdir%g
3057s%@sharedstatedir@%$sharedstatedir%g
3058s%@localstatedir@%$localstatedir%g
3059s%@libdir@%$libdir%g
3060s%@includedir@%$includedir%g
3061s%@oldincludedir@%$oldincludedir%g
3062s%@infodir@%$infodir%g
3063s%@mandir@%$mandir%g
aebb8c22 3064s%@toplevel_srcdir@%$toplevel_srcdir%g
03391b53
AO
3065s%@host@%$host%g
3066s%@host_alias@%$host_alias%g
3067s%@host_cpu@%$host_cpu%g
3068s%@host_vendor@%$host_vendor%g
3069s%@host_os@%$host_os%g
b150efee
FS
3070s%@target@%$target%g
3071s%@target_alias@%$target_alias%g
3072s%@target_cpu@%$target_cpu%g
3073s%@target_vendor@%$target_vendor%g
3074s%@target_os@%$target_os%g
03391b53
AO
3075s%@build@%$build%g
3076s%@build_alias@%$build_alias%g
3077s%@build_cpu@%$build_cpu%g
3078s%@build_vendor@%$build_vendor%g
3079s%@build_os@%$build_os%g
9c01f395 3080s%@target_noncanonical@%$target_noncanonical%g
b150efee
FS
3081s%@glibcpp_builddir@%$glibcpp_builddir%g
3082s%@glibcpp_srcdir@%$glibcpp_srcdir%g
03391b53 3083s%@LN_S@%$LN_S%g
b150efee
FS
3084s%@CC@%$CC%g
3085s%@AS@%$AS%g
3086s%@AR@%$AR%g
3087s%@RANLIB@%$RANLIB%g
3088s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3089s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
3090s%@INSTALL_DATA@%$INSTALL_DATA%g
b150efee
FS
3091s%@gcc_version@%$gcc_version%g
3092s%@gcc_version_trigger@%$gcc_version_trigger%g
b150efee
FS
3093s%@glibcpp_toolexecdir@%$glibcpp_toolexecdir%g
3094s%@glibcpp_toolexeclibdir@%$glibcpp_toolexeclibdir%g
9c01f395 3095s%@glibcpp_prefixdir@%$glibcpp_prefixdir%g
03391b53 3096s%@OBJEXT@%$OBJEXT%g
9c01f395 3097s%@EXEEXT@%$EXEEXT%g
03391b53
AO
3098s%@STRIP@%$STRIP%g
3099s%@DLLTOOL@%$DLLTOOL%g
03391b53
AO
3100s%@OBJDUMP@%$OBJDUMP%g
3101s%@LIBTOOL@%$LIBTOOL%g
b150efee 3102s%@SET_MAKE@%$SET_MAKE%g
68a1af87 3103s%@VERSION@%$VERSION%g
b150efee
FS
3104s%@CPP@%$CPP%g
3105s%@GTHREAD_FLAGS@%$GTHREAD_FLAGS%g
03391b53 3106s%@OBJC_BOEHM_GC@%$OBJC_BOEHM_GC%g
bce1b489
BE
3107
3108CEOF
3109EOF
3110
03391b53
AO
3111cat >> $CONFIG_STATUS <<\EOF
3112
3113# Split the substitutions into bite-sized pieces for seds with
3114# small command number limits, like on Digital OSF/1 and HP-UX.
3115ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3116ac_file=1 # Number of current file.
3117ac_beg=1 # First line for current file.
3118ac_end=$ac_max_sed_cmds # Line after last line for current file.
3119ac_more_lines=:
3120ac_sed_cmds=""
3121while $ac_more_lines; do
3122 if test $ac_beg -gt 1; then
3123 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3124 else
3125 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3126 fi
3127 if test ! -s conftest.s$ac_file; then
3128 ac_more_lines=false
3129 rm -f conftest.s$ac_file
3130 else
3131 if test -z "$ac_sed_cmds"; then
3132 ac_sed_cmds="sed -f conftest.s$ac_file"
bce1b489 3133 else
03391b53 3134 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
bce1b489 3135 fi
03391b53
AO
3136 ac_file=`expr $ac_file + 1`
3137 ac_beg=$ac_end
3138 ac_end=`expr $ac_end + $ac_max_sed_cmds`
bce1b489 3139 fi
03391b53
AO
3140done
3141if test -z "$ac_sed_cmds"; then
3142 ac_sed_cmds=cat
3143fi
3144EOF
bce1b489 3145
03391b53
AO
3146cat >> $CONFIG_STATUS <<EOF
3147
3148CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
bce1b489 3149EOF
03391b53
AO
3150cat >> $CONFIG_STATUS <<\EOF
3151for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
bce1b489
BE
3152 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3153 case "$ac_file" in
03391b53
AO
3154 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3155 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3156 *) ac_file_in="${ac_file}.in" ;;
bce1b489
BE
3157 esac
3158
3159 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
3160
3161 # Remove last slash and all that follows it. Not all systems have dirname.
03391b53 3162 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
bce1b489
BE
3163 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3164 # The file is in a subdirectory.
3165 test ! -d "$ac_dir" && mkdir "$ac_dir"
3166 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3167 # A "../" for each directory in $ac_dir_suffix.
03391b53 3168 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
bce1b489
BE
3169 else
3170 ac_dir_suffix= ac_dots=
3171 fi
3172
3173 case "$ac_given_srcdir" in
3174 .) srcdir=.
3175 if test -z "$ac_dots"; then top_srcdir=.
03391b53
AO
3176 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3177 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
bce1b489 3178 *) # Relative path.
03391b53
AO
3179 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3180 top_srcdir="$ac_dots$ac_given_srcdir" ;;
bce1b489
BE
3181 esac
3182
3183 case "$ac_given_INSTALL" in
03391b53
AO
3184 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3185 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
bce1b489
BE
3186 esac
3187
3188 echo creating "$ac_file"
3189 rm -f "$ac_file"
03391b53
AO
3190 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3191 case "$ac_file" in
3192 *Makefile*) ac_comsub="1i\\
3193# $configure_input" ;;
3194 *) ac_comsub= ;;
3195 esac
bce1b489 3196
03391b53
AO
3197 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3198 sed -e "$ac_comsub
3199s%@configure_input@%$configure_input%g
3200s%@srcdir@%$srcdir%g
3201s%@top_srcdir@%$top_srcdir%g
3202s%@INSTALL@%$INSTALL%g
3203" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
3204fi; done
3205rm -f conftest.s*
bce1b489 3206
d972a4c2
OP
3207# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3208# NAME is the cpp macro being defined and VALUE is the value it is being given.
3209#
3210# ac_d sets the value in "#define NAME VALUE" lines.
3211ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
03391b53
AO
3212ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3213ac_dC='\3'
3214ac_dD='%g'
3215# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
d972a4c2 3216ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
03391b53 3217ac_uB='\([ ]\)%\1#\2define\3'
d972a4c2 3218ac_uC=' '
03391b53
AO
3219ac_uD='\4%g'
3220# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3221ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3222ac_eB='$%\1#\2define\3'
3223ac_eC=' '
3224ac_eD='%g'
3225
3226if test "${CONFIG_HEADERS+set}" != set; then
3227EOF
3228cat >> $CONFIG_STATUS <<EOF
3229 CONFIG_HEADERS="config.h"
3230EOF
3231cat >> $CONFIG_STATUS <<\EOF
3232fi
3233for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
d972a4c2
OP
3234 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
3235 case "$ac_file" in
03391b53
AO
3236 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
3237 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3238 *) ac_file_in="${ac_file}.in" ;;
d972a4c2
OP
3239 esac
3240
3241 echo creating $ac_file
3242
03391b53
AO
3243 rm -f conftest.frag conftest.in conftest.out
3244 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3245 cat $ac_file_inputs > conftest.in
d972a4c2
OP
3246
3247EOF
3248
03391b53
AO
3249# Transform confdefs.h into a sed script conftest.vals that substitutes
3250# the proper values into config.h.in to produce config.h. And first:
3251# Protect against being on the right side of a sed subst in config.status.
3252# Protect against being in an unquoted here document in config.status.
3253rm -f conftest.vals
3254cat > conftest.hdr <<\EOF
d972a4c2
OP
3255s/[\\&%]/\\&/g
3256s%[\\$`]%\\&%g
03391b53
AO
3257s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3258s%ac_d%ac_u%gp
3259s%ac_u%ac_e%gp
d972a4c2 3260EOF
03391b53
AO
3261sed -n -f conftest.hdr confdefs.h > conftest.vals
3262rm -f conftest.hdr
d972a4c2
OP
3263
3264# This sed command replaces #undef with comments. This is necessary, for
3265# example, in the case of _POSIX_SOURCE, which is predefined and required
3266# on some systems where configure will not decide to define it.
03391b53 3267cat >> conftest.vals <<\EOF
d972a4c2
OP
3268s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3269EOF
3270
03391b53
AO
3271# Break up conftest.vals because some shells have a limit on
3272# the size of here documents, and old seds have small limits too.
d972a4c2
OP
3273
3274rm -f conftest.tail
03391b53 3275while :
d972a4c2 3276do
03391b53
AO
3277 ac_lines=`grep -c . conftest.vals`
3278 # grep -c gives empty output for an empty file on some AIX systems.
3279 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3280 # Write a limited-size here document to conftest.frag.
3281 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3282 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
d972a4c2 3283 echo 'CEOF
03391b53
AO
3284 sed -f conftest.frag conftest.in > conftest.out
3285 rm -f conftest.in
3286 mv conftest.out conftest.in
3287' >> $CONFIG_STATUS
3288 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3289 rm -f conftest.vals
3290 mv conftest.tail conftest.vals
d972a4c2 3291done
03391b53
AO
3292rm -f conftest.vals
3293
3294cat >> $CONFIG_STATUS <<\EOF
3295 rm -f conftest.frag conftest.h
3296 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3297 cat conftest.in >> conftest.h
3298 rm -f conftest.in
3299 if cmp -s $ac_file conftest.h 2>/dev/null; then
d972a4c2 3300 echo "$ac_file is unchanged"
03391b53 3301 rm -f conftest.h
d972a4c2
OP
3302 else
3303 # Remove last slash and all that follows it. Not all systems have dirname.
03391b53
AO
3304 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3305 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
d972a4c2
OP
3306 # The file is in a subdirectory.
3307 test ! -d "$ac_dir" && mkdir "$ac_dir"
3308 fi
3309 rm -f $ac_file
03391b53 3310 mv conftest.h $ac_file
d972a4c2 3311 fi
03391b53 3312fi; done
bce1b489 3313
03391b53
AO
3314EOF
3315cat >> $CONFIG_STATUS <<EOF
3316srcdir=${srcdir}
3317host=${host}
3318target=${target}
3319with_target_subdir=${with_target_subdir}
3320with_multisubdir=${with_multisubdir}
3321ac_configure_args="--enable-multilib ${ac_configure_args}"
b150efee 3322toplevel_srcdir=${toplevel_srcdir}
03391b53 3323CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
3343fdd2 3324ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
162f5967 3325
03391b53
AO
3326EOF
3327cat >> $CONFIG_STATUS <<\EOF
3328test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
bce1b489
BE
3329if test -n "$CONFIG_FILES"; then
3330 if test -n "${with_target_subdir}"; then
3331 # FIXME: We shouldn't need to set ac_file
3332 ac_file=Makefile
6706f116 3333 LD="${ORIGINAL_LD_FOR_MULTILIBS}"
b150efee 3334 . ${toplevel_srcdir}/config-ml.in
bce1b489 3335 fi
03391b53 3336fi
bce1b489
BE
3337exit 0
3338EOF
3339chmod +x $CONFIG_STATUS
3340rm -fr confdefs* $ac_clean_files
03391b53 3341test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
bce1b489 3342