* pe-dll.c (fill_edata): don't strip underscores
[deliverable/binutils-gdb.git] / sim / arm / configure
CommitLineData
24691f55
DE
1#! /bin/sh
2
92f91d1f
AC
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
b1df34b9 45sim_inline="-DDEFAULT_INLINE=0"
92f91d1f
AC
46
47
48
49
50
51
52
53
54
55
56
57
58
59
462cfbc4
DE
60
61
62
63
64
65
66
67
68
92f91d1f
AC
69
70
71
72
73
74
75
b1df34b9
TT
76
77
78
79
80
81# This file is derived from `gettext.m4'. The difference is that the
82# included macros assume Cygnus-style source and build trees.
83
84# Macro to add for using GNU gettext.
85# Ulrich Drepper <drepper@cygnus.com>, 1995.
86#
87# This file file be copied and used freely without restrictions. It can
88# be used in projects which are not available under the GNU Public License
89# but which still want to provide support for the GNU gettext functionality.
90# Please note that the actual code is *not* freely available.
91
92# serial 3
93
94
95
96
97
98# Search path for a program which passes the given test.
99# Ulrich Drepper <drepper@cygnus.com>, 1996.
100#
101# This file file be copied and used freely without restrictions. It can
102# be used in projects which are not available under the GNU Public License
103# but which still want to provide support for the GNU gettext functionality.
104# Please note that the actual code is *not* freely available.
105
106# serial 1
107
108
109
110# Check whether LC_MESSAGES is available in <locale.h>.
111# Ulrich Drepper <drepper@cygnus.com>, 1995.
112#
113# This file file be copied and used freely without restrictions. It can
114# be used in projects which are not available under the GNU Public License
115# but which still want to provide support for the GNU gettext functionality.
116# Please note that the actual code is *not* freely available.
117
118# serial 1
92f91d1f
AC
119
120
121
5da9ce07 122
24691f55 123# Guess values for system-dependent variables and create Makefiles.
462cfbc4 124# Generated automatically using autoconf version 2.12.1
295dbbe4 125# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24691f55
DE
126#
127# This configure script is free software; the Free Software Foundation
128# gives unlimited permission to copy, distribute and modify it.
129
130# Defaults:
131ac_help=
132ac_default_prefix=/usr/local
133# Any additions from configure.in:
b1df34b9
TT
134ac_help="$ac_help
135 --disable-nls do not use Native Language Support"
136ac_help="$ac_help
137 --with-included-gettext use the GNU gettext library included here"
462cfbc4
DE
138ac_help="$ac_help
139 --enable-maintainer-mode Enable developer functionality."
601fb8ae
MM
140ac_help="$ac_help
141 --enable-sim-bswap Use Host specific BSWAP instruction."
295dbbe4
SG
142ac_help="$ac_help
143 --enable-sim-cflags=opts Extra CFLAGS for use in building simulator"
144ac_help="$ac_help
145 --enable-sim-debug=opts Enable debugging flags"
a35e91c3
AC
146ac_help="$ac_help
147 --enable-sim-stdio Specify whether to use stdio for console input/output."
295dbbe4
SG
148ac_help="$ac_help
149 --enable-sim-trace=opts Enable tracing flags"
6fea4763
DE
150ac_help="$ac_help
151 --enable-sim-profile=opts Enable profiling flags"
24691f55
DE
152
153# Initialize some variables set by options.
154# The variables have the same names as the options, with
155# dashes changed to underlines.
156build=NONE
157cache_file=./config.cache
158exec_prefix=NONE
159host=NONE
160no_create=
161nonopt=NONE
162no_recursion=
163prefix=NONE
164program_prefix=NONE
165program_suffix=NONE
166program_transform_name=s,x,x,
167silent=
168site=
169srcdir=
170target=NONE
171verbose=
172x_includes=NONE
173x_libraries=NONE
295dbbe4
SG
174bindir='${exec_prefix}/bin'
175sbindir='${exec_prefix}/sbin'
176libexecdir='${exec_prefix}/libexec'
177datadir='${prefix}/share'
178sysconfdir='${prefix}/etc'
179sharedstatedir='${prefix}/com'
180localstatedir='${prefix}/var'
181libdir='${exec_prefix}/lib'
182includedir='${prefix}/include'
183oldincludedir='/usr/include'
184infodir='${prefix}/info'
185mandir='${prefix}/man'
24691f55
DE
186
187# Initialize some other variables.
188subdirs=
295dbbe4 189MFLAGS= MAKEFLAGS=
462cfbc4 190SHELL=${CONFIG_SHELL-/bin/sh}
6fea4763
DE
191# Maximum number of lines to put in a shell here document.
192ac_max_here_lines=12
24691f55
DE
193
194ac_prev=
195for ac_option
196do
197
198 # If the previous option needs an argument, assign it.
199 if test -n "$ac_prev"; then
200 eval "$ac_prev=\$ac_option"
201 ac_prev=
202 continue
203 fi
204
205 case "$ac_option" in
206 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
207 *) ac_optarg= ;;
208 esac
209
210 # Accept the important Cygnus configure options, so we can diagnose typos.
211
212 case "$ac_option" in
213
295dbbe4
SG
214 -bindir | --bindir | --bindi | --bind | --bin | --bi)
215 ac_prev=bindir ;;
216 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
217 bindir="$ac_optarg" ;;
218
219 -build | --build | --buil | --bui | --bu)
24691f55 220 ac_prev=build ;;
295dbbe4 221 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
24691f55
DE
222 build="$ac_optarg" ;;
223
224 -cache-file | --cache-file | --cache-fil | --cache-fi \
225 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
226 ac_prev=cache_file ;;
227 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
228 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
229 cache_file="$ac_optarg" ;;
230
295dbbe4
SG
231 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232 ac_prev=datadir ;;
233 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234 | --da=*)
235 datadir="$ac_optarg" ;;
236
24691f55
DE
237 -disable-* | --disable-*)
238 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
239 # Reject names that are not valid shell variable names.
240 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
241 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
242 fi
243 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
244 eval "enable_${ac_feature}=no" ;;
245
246 -enable-* | --enable-*)
247 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
248 # Reject names that are not valid shell variable names.
249 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
250 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
251 fi
252 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
253 case "$ac_option" in
254 *=*) ;;
255 *) ac_optarg=yes ;;
256 esac
257 eval "enable_${ac_feature}='$ac_optarg'" ;;
258
259 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
260 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
261 | --exec | --exe | --ex)
262 ac_prev=exec_prefix ;;
263 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
264 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
265 | --exec=* | --exe=* | --ex=*)
266 exec_prefix="$ac_optarg" ;;
267
268 -gas | --gas | --ga | --g)
269 # Obsolete; use --with-gas.
270 with_gas=yes ;;
271
272 -help | --help | --hel | --he)
273 # Omit some internal or obsolete options to make the list less imposing.
274 # This message is too long to be a string in the A/UX 3.1 sh.
275 cat << EOF
276Usage: configure [options] [host]
277Options: [defaults in brackets after descriptions]
278Configuration:
279 --cache-file=FILE cache test results in FILE
280 --help print this message
281 --no-create do not create output files
282 --quiet, --silent do not print \`checking...' messages
283 --version print the version of autoconf that created configure
284Directory and file names:
285 --prefix=PREFIX install architecture-independent files in PREFIX
286 [$ac_default_prefix]
295dbbe4 287 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
24691f55 288 [same as prefix]
295dbbe4
SG
289 --bindir=DIR user executables in DIR [EPREFIX/bin]
290 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
291 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
292 --datadir=DIR read-only architecture-independent data in DIR
293 [PREFIX/share]
294 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
295 --sharedstatedir=DIR modifiable architecture-independent data in DIR
296 [PREFIX/com]
297 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
298 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
299 --includedir=DIR C header files in DIR [PREFIX/include]
300 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
301 --infodir=DIR info documentation in DIR [PREFIX/info]
302 --mandir=DIR man documentation in DIR [PREFIX/man]
24691f55
DE
303 --srcdir=DIR find the sources in DIR [configure dir or ..]
304 --program-prefix=PREFIX prepend PREFIX to installed program names
305 --program-suffix=SUFFIX append SUFFIX to installed program names
295dbbe4
SG
306 --program-transform-name=PROGRAM
307 run sed PROGRAM on installed program names
308EOF
309 cat << EOF
24691f55
DE
310Host type:
311 --build=BUILD configure for building on BUILD [BUILD=HOST]
312 --host=HOST configure for HOST [guessed]
313 --target=TARGET configure for TARGET [TARGET=HOST]
314Features and packages:
315 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
316 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
317 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
318 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
319 --x-includes=DIR X include files are in DIR
320 --x-libraries=DIR X library files are in DIR
24691f55 321EOF
295dbbe4
SG
322 if test -n "$ac_help"; then
323 echo "--enable and --with options recognized:$ac_help"
324 fi
24691f55
DE
325 exit 0 ;;
326
327 -host | --host | --hos | --ho)
328 ac_prev=host ;;
329 -host=* | --host=* | --hos=* | --ho=*)
330 host="$ac_optarg" ;;
331
295dbbe4
SG
332 -includedir | --includedir | --includedi | --included | --include \
333 | --includ | --inclu | --incl | --inc)
334 ac_prev=includedir ;;
335 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
336 | --includ=* | --inclu=* | --incl=* | --inc=*)
337 includedir="$ac_optarg" ;;
338
339 -infodir | --infodir | --infodi | --infod | --info | --inf)
340 ac_prev=infodir ;;
341 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
342 infodir="$ac_optarg" ;;
343
344 -libdir | --libdir | --libdi | --libd)
345 ac_prev=libdir ;;
346 -libdir=* | --libdir=* | --libdi=* | --libd=*)
347 libdir="$ac_optarg" ;;
348
349 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
350 | --libexe | --libex | --libe)
351 ac_prev=libexecdir ;;
352 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
353 | --libexe=* | --libex=* | --libe=*)
354 libexecdir="$ac_optarg" ;;
355
356 -localstatedir | --localstatedir | --localstatedi | --localstated \
357 | --localstate | --localstat | --localsta | --localst \
358 | --locals | --local | --loca | --loc | --lo)
359 ac_prev=localstatedir ;;
360 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
361 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
362 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
363 localstatedir="$ac_optarg" ;;
364
365 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
366 ac_prev=mandir ;;
367 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
368 mandir="$ac_optarg" ;;
369
24691f55
DE
370 -nfp | --nfp | --nf)
371 # Obsolete; use --without-fp.
372 with_fp=no ;;
373
374 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
375 | --no-cr | --no-c)
376 no_create=yes ;;
377
378 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
379 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
380 no_recursion=yes ;;
381
295dbbe4
SG
382 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
383 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
384 | --oldin | --oldi | --old | --ol | --o)
385 ac_prev=oldincludedir ;;
386 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
387 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
388 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
389 oldincludedir="$ac_optarg" ;;
390
24691f55
DE
391 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
392 ac_prev=prefix ;;
393 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
394 prefix="$ac_optarg" ;;
395
396 -program-prefix | --program-prefix | --program-prefi | --program-pref \
397 | --program-pre | --program-pr | --program-p)
398 ac_prev=program_prefix ;;
399 -program-prefix=* | --program-prefix=* | --program-prefi=* \
400 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
401 program_prefix="$ac_optarg" ;;
402
403 -program-suffix | --program-suffix | --program-suffi | --program-suff \
404 | --program-suf | --program-su | --program-s)
405 ac_prev=program_suffix ;;
406 -program-suffix=* | --program-suffix=* | --program-suffi=* \
407 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
408 program_suffix="$ac_optarg" ;;
409
410 -program-transform-name | --program-transform-name \
411 | --program-transform-nam | --program-transform-na \
412 | --program-transform-n | --program-transform- \
413 | --program-transform | --program-transfor \
414 | --program-transfo | --program-transf \
415 | --program-trans | --program-tran \
416 | --progr-tra | --program-tr | --program-t)
417 ac_prev=program_transform_name ;;
418 -program-transform-name=* | --program-transform-name=* \
419 | --program-transform-nam=* | --program-transform-na=* \
420 | --program-transform-n=* | --program-transform-=* \
421 | --program-transform=* | --program-transfor=* \
422 | --program-transfo=* | --program-transf=* \
423 | --program-trans=* | --program-tran=* \
424 | --progr-tra=* | --program-tr=* | --program-t=*)
425 program_transform_name="$ac_optarg" ;;
426
427 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
428 | -silent | --silent | --silen | --sile | --sil)
429 silent=yes ;;
430
295dbbe4
SG
431 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
432 ac_prev=sbindir ;;
433 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
434 | --sbi=* | --sb=*)
435 sbindir="$ac_optarg" ;;
436
437 -sharedstatedir | --sharedstatedir | --sharedstatedi \
438 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
439 | --sharedst | --shareds | --shared | --share | --shar \
440 | --sha | --sh)
441 ac_prev=sharedstatedir ;;
442 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
443 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
444 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
445 | --sha=* | --sh=*)
446 sharedstatedir="$ac_optarg" ;;
447
24691f55
DE
448 -site | --site | --sit)
449 ac_prev=site ;;
450 -site=* | --site=* | --sit=*)
451 site="$ac_optarg" ;;
452
453 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
454 ac_prev=srcdir ;;
455 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
456 srcdir="$ac_optarg" ;;
457
295dbbe4
SG
458 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
459 | --syscon | --sysco | --sysc | --sys | --sy)
460 ac_prev=sysconfdir ;;
461 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
462 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
463 sysconfdir="$ac_optarg" ;;
464
24691f55
DE
465 -target | --target | --targe | --targ | --tar | --ta | --t)
466 ac_prev=target ;;
467 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
468 target="$ac_optarg" ;;
469
470 -v | -verbose | --verbose | --verbos | --verbo | --verb)
471 verbose=yes ;;
472
473 -version | --version | --versio | --versi | --vers)
462cfbc4 474 echo "configure generated by autoconf version 2.12.1"
24691f55
DE
475 exit 0 ;;
476
477 -with-* | --with-*)
478 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
479 # Reject names that are not valid shell variable names.
480 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
481 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
482 fi
483 ac_package=`echo $ac_package| sed 's/-/_/g'`
484 case "$ac_option" in
485 *=*) ;;
486 *) ac_optarg=yes ;;
487 esac
488 eval "with_${ac_package}='$ac_optarg'" ;;
489
490 -without-* | --without-*)
491 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
492 # Reject names that are not valid shell variable names.
493 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
494 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
495 fi
496 ac_package=`echo $ac_package| sed 's/-/_/g'`
497 eval "with_${ac_package}=no" ;;
498
499 --x)
500 # Obsolete; use --with-x.
501 with_x=yes ;;
502
503 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
504 | --x-incl | --x-inc | --x-in | --x-i)
505 ac_prev=x_includes ;;
506 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
507 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
508 x_includes="$ac_optarg" ;;
509
510 -x-libraries | --x-libraries | --x-librarie | --x-librari \
511 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
512 ac_prev=x_libraries ;;
513 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
514 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
515 x_libraries="$ac_optarg" ;;
516
517 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
518 ;;
519
295dbbe4 520 *)
24691f55
DE
521 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
522 echo "configure: warning: $ac_option: invalid host type" 1>&2
523 fi
524 if test "x$nonopt" != xNONE; then
525 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
526 fi
527 nonopt="$ac_option"
528 ;;
529
530 esac
531done
532
533if test -n "$ac_prev"; then
534 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
535fi
536
537trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
538
539# File descriptor usage:
540# 0 standard input
541# 1 file creation
542# 2 errors and warnings
543# 3 some systems may open it to /dev/tty
544# 4 used on the Kubota Titan
545# 6 checking for... messages and results
546# 5 compiler messages saved in config.log
547if test "$silent" = yes; then
548 exec 6>/dev/null
549else
550 exec 6>&1
551fi
552exec 5>./config.log
553
554echo "\
555This file contains any messages produced by compilers while
556running configure, to aid debugging if configure makes a mistake.
557" 1>&5
558
559# Strip out --no-create and --no-recursion so they do not pile up.
560# Also quote any args containing shell metacharacters.
561ac_configure_args=
562for ac_arg
563do
564 case "$ac_arg" in
565 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
566 | --no-cr | --no-c) ;;
567 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
568 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
569 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
570 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
571 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
572 esac
573done
574
575# NLS nuisances.
6fea4763
DE
576# Only set these to C if already set. These must not be set unconditionally
577# because not all systems understand e.g. LANG=C (notably SCO).
578# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
579# Non-C LC_CTYPE values break the ctype check.
08db4a65 580if test "${LANG+set}" = set; then LANG=C; export LANG; fi
6fea4763
DE
581if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
582if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
583if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
24691f55
DE
584
585# confdefs.h avoids OS command line length limits that DEFS can exceed.
586rm -rf conftest* confdefs.h
587# AIX cpp loses on an empty file, so make sure it contains at least a newline.
588echo > confdefs.h
589
590# A filename unique to this package, relative to the directory that
591# configure is in, which we can look for to find out if srcdir is correct.
592ac_unique_file=Makefile.in
593
594# Find the source files, if location was not specified.
595if test -z "$srcdir"; then
596 ac_srcdir_defaulted=yes
597 # Try the directory containing this script, then its parent.
598 ac_prog=$0
599 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
600 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
601 srcdir=$ac_confdir
602 if test ! -r $srcdir/$ac_unique_file; then
603 srcdir=..
604 fi
605else
606 ac_srcdir_defaulted=no
607fi
608if test ! -r $srcdir/$ac_unique_file; then
609 if test "$ac_srcdir_defaulted" = yes; then
610 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
611 else
612 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
613 fi
614fi
615srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
616
617# Prefer explicitly selected file to automatically selected ones.
618if test -z "$CONFIG_SITE"; then
619 if test "x$prefix" != xNONE; then
620 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
621 else
622 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
623 fi
624fi
625for ac_site_file in $CONFIG_SITE; do
626 if test -r "$ac_site_file"; then
627 echo "loading site script $ac_site_file"
628 . "$ac_site_file"
629 fi
630done
631
632if test -r "$cache_file"; then
633 echo "loading cache $cache_file"
634 . $cache_file
635else
636 echo "creating cache $cache_file"
637 > $cache_file
638fi
639
640ac_ext=c
641# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
642ac_cpp='$CPP $CPPFLAGS'
295dbbe4
SG
643ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
644ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
6fea4763 645cross_compiling=$ac_cv_prog_cc_cross
24691f55
DE
646
647if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
648 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
649 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
650 ac_n= ac_c='
651' ac_t=' '
652 else
653 ac_n=-n ac_c= ac_t=
654 fi
655else
656 ac_n= ac_c='\c' ac_t=
657fi
658
659
660
fbda74b1 661echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
5da9ce07 662echo "configure:663: checking how to run the C preprocessor" >&5
fbda74b1
DE
663# On Suns, sometimes $CPP names a directory.
664if test -n "$CPP" && test -d "$CPP"; then
665 CPP=
666fi
667if test -z "$CPP"; then
668if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
669 echo $ac_n "(cached) $ac_c" 1>&6
670else
671 # This must be in double quotes, not single quotes, because CPP may get
672 # substituted into the Makefile and "${CC-cc}" will confuse make.
673 CPP="${CC-cc} -E"
674 # On the NeXT, cc -E runs the code through the compiler's parser,
675 # not just through cpp.
676 cat > conftest.$ac_ext <<EOF
5da9ce07 677#line 678 "configure"
fbda74b1
DE
678#include "confdefs.h"
679#include <assert.h>
680Syntax Error
681EOF
682ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5da9ce07 683{ (eval echo configure:684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
fbda74b1
DE
684ac_err=`grep -v '^ *+' conftest.out`
685if test -z "$ac_err"; then
686 :
687else
688 echo "$ac_err" >&5
6fea4763
DE
689 echo "configure: failed program was:" >&5
690 cat conftest.$ac_ext >&5
fbda74b1
DE
691 rm -rf conftest*
692 CPP="${CC-cc} -E -traditional-cpp"
693 cat > conftest.$ac_ext <<EOF
5da9ce07 694#line 695 "configure"
fbda74b1
DE
695#include "confdefs.h"
696#include <assert.h>
697Syntax Error
698EOF
699ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5da9ce07 700{ (eval echo configure:701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
fbda74b1
DE
701ac_err=`grep -v '^ *+' conftest.out`
702if test -z "$ac_err"; then
703 :
704else
705 echo "$ac_err" >&5
6fea4763
DE
706 echo "configure: failed program was:" >&5
707 cat conftest.$ac_ext >&5
fbda74b1
DE
708 rm -rf conftest*
709 CPP=/lib/cpp
710fi
711rm -f conftest*
712fi
713rm -f conftest*
714 ac_cv_prog_CPP="$CPP"
715fi
716 CPP="$ac_cv_prog_CPP"
717else
718 ac_cv_prog_CPP="$CPP"
719fi
720echo "$ac_t""$CPP" 1>&6
721
b1df34b9 722echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
5da9ce07 723echo "configure:724: checking whether ${MAKE-make} sets \${MAKE}" >&5
b1df34b9
TT
724set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
725if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
726 echo $ac_n "(cached) $ac_c" 1>&6
727else
728 cat > conftestmake <<\EOF
729all:
730 @echo 'ac_maketemp="${MAKE}"'
731EOF
732# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
733eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
734if test -n "$ac_maketemp"; then
735 eval ac_cv_prog_make_${ac_make}_set=yes
736else
737 eval ac_cv_prog_make_${ac_make}_set=no
738fi
739rm -f conftestmake
740fi
741if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
742 echo "$ac_t""yes" 1>&6
743 SET_MAKE=
744else
745 echo "$ac_t""no" 1>&6
746 SET_MAKE="MAKE=${MAKE-make}"
747fi
295dbbe4 748
b1df34b9 749echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
5da9ce07 750echo "configure:751: checking for POSIXized ISC" >&5
b1df34b9
TT
751if test -d /etc/conf/kconfig.d &&
752 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
753then
754 echo "$ac_t""yes" 1>&6
755 ISC=yes # If later tests want to check for ISC.
756 cat >> confdefs.h <<\EOF
757#define _POSIX_SOURCE 1
758EOF
295dbbe4 759
b1df34b9
TT
760 if test "$GCC" = yes; then
761 CC="$CC -posix"
762 else
763 CC="$CC -Xp"
24691f55 764 fi
b1df34b9
TT
765else
766 echo "$ac_t""no" 1>&6
767 ISC=
24691f55 768fi
24691f55 769
b1df34b9 770echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
5da9ce07 771echo "configure:772: checking for ANSI C header files" >&5
b1df34b9
TT
772if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
773 echo $ac_n "(cached) $ac_c" 1>&6
774else
775 cat > conftest.$ac_ext <<EOF
5da9ce07 776#line 777 "configure"
b1df34b9
TT
777#include "confdefs.h"
778#include <stdlib.h>
779#include <stdarg.h>
780#include <string.h>
781#include <float.h>
782EOF
783ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5da9ce07 784{ (eval echo configure:785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b1df34b9
TT
785ac_err=`grep -v '^ *+' conftest.out`
786if test -z "$ac_err"; then
787 rm -rf conftest*
788 ac_cv_header_stdc=yes
789else
790 echo "$ac_err" >&5
791 echo "configure: failed program was:" >&5
792 cat conftest.$ac_ext >&5
793 rm -rf conftest*
794 ac_cv_header_stdc=no
795fi
796rm -f conftest*
24691f55 797
b1df34b9
TT
798if test $ac_cv_header_stdc = yes; then
799 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
800cat > conftest.$ac_ext <<EOF
5da9ce07 801#line 802 "configure"
b1df34b9
TT
802#include "confdefs.h"
803#include <string.h>
804EOF
805if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
806 egrep "memchr" >/dev/null 2>&1; then
807 :
808else
809 rm -rf conftest*
810 ac_cv_header_stdc=no
811fi
812rm -f conftest*
24691f55 813
24691f55
DE
814fi
815
b1df34b9
TT
816if test $ac_cv_header_stdc = yes; then
817 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
818cat > conftest.$ac_ext <<EOF
5da9ce07 819#line 820 "configure"
b1df34b9
TT
820#include "confdefs.h"
821#include <stdlib.h>
822EOF
823if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
824 egrep "free" >/dev/null 2>&1; then
825 :
826else
827 rm -rf conftest*
828 ac_cv_header_stdc=no
829fi
830rm -f conftest*
24691f55 831
b1df34b9 832fi
24691f55 833
b1df34b9
TT
834if test $ac_cv_header_stdc = yes; then
835 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
836if test "$cross_compiling" = yes; then
837 :
838else
839 cat > conftest.$ac_ext <<EOF
5da9ce07 840#line 841 "configure"
b1df34b9
TT
841#include "confdefs.h"
842#include <ctype.h>
843#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
844#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
845#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
846int main () { int i; for (i = 0; i < 256; i++)
847if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
848exit (0); }
24691f55 849
b1df34b9 850EOF
5da9ce07 851if { (eval echo configure:852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
b1df34b9
TT
852then
853 :
854else
855 echo "configure: failed program was:" >&5
856 cat conftest.$ac_ext >&5
857 rm -fr conftest*
858 ac_cv_header_stdc=no
859fi
860rm -fr conftest*
861fi
24691f55 862
b1df34b9
TT
863fi
864fi
24691f55 865
b1df34b9
TT
866echo "$ac_t""$ac_cv_header_stdc" 1>&6
867if test $ac_cv_header_stdc = yes; then
868 cat >> confdefs.h <<\EOF
869#define STDC_HEADERS 1
870EOF
24691f55 871
b1df34b9 872fi
24691f55 873
b1df34b9 874echo $ac_n "checking for working const""... $ac_c" 1>&6
5da9ce07 875echo "configure:876: checking for working const" >&5
b1df34b9
TT
876if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
877 echo $ac_n "(cached) $ac_c" 1>&6
878else
879 cat > conftest.$ac_ext <<EOF
5da9ce07 880#line 881 "configure"
b1df34b9 881#include "confdefs.h"
24691f55 882
b1df34b9 883int main() {
24691f55 884
b1df34b9
TT
885/* Ultrix mips cc rejects this. */
886typedef int charset[2]; const charset x;
887/* SunOS 4.1.1 cc rejects this. */
888char const *const *ccp;
889char **p;
890/* NEC SVR4.0.2 mips cc rejects this. */
891struct point {int x, y;};
892static struct point const zero = {0,0};
893/* AIX XL C 1.02.0.0 rejects this.
894 It does not let you subtract one const X* pointer from another in an arm
895 of an if-expression whose if-part is not a constant expression */
896const char *g = "string";
897ccp = &g + (g ? g-g : 0);
898/* HPUX 7.0 cc rejects these. */
899++ccp;
900p = (char**) ccp;
901ccp = (char const *const *) p;
902{ /* SCO 3.2v4 cc rejects this. */
903 char *t;
904 char const *s = 0 ? (char *) 0 : (char const *) 0;
905
906 *t++ = 0;
907}
908{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
909 int x[] = {25, 17};
910 const int *foo = &x[0];
911 ++foo;
912}
913{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
914 typedef const int *iptr;
915 iptr p = 0;
916 ++p;
917}
918{ /* AIX XL C 1.02.0.0 rejects this saying
919 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
920 struct s { int j; const int *ap[3]; };
921 struct s *b; b->j = 5;
922}
923{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
924 const int foo = 10;
925}
24691f55 926
b1df34b9
TT
927; return 0; }
928EOF
5da9ce07 929if { (eval echo configure:930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b1df34b9
TT
930 rm -rf conftest*
931 ac_cv_c_const=yes
24691f55 932else
b1df34b9
TT
933 echo "configure: failed program was:" >&5
934 cat conftest.$ac_ext >&5
935 rm -rf conftest*
936 ac_cv_c_const=no
937fi
938rm -f conftest*
24691f55 939fi
24691f55 940
b1df34b9
TT
941echo "$ac_t""$ac_cv_c_const" 1>&6
942if test $ac_cv_c_const = no; then
943 cat >> confdefs.h <<\EOF
944#define const
945EOF
24691f55 946
b1df34b9
TT
947fi
948
949echo $ac_n "checking for inline""... $ac_c" 1>&6
5da9ce07 950echo "configure:951: checking for inline" >&5
b1df34b9 951if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
24691f55
DE
952 echo $ac_n "(cached) $ac_c" 1>&6
953else
b1df34b9
TT
954 ac_cv_c_inline=no
955for ac_kw in inline __inline__ __inline; do
956 cat > conftest.$ac_ext <<EOF
5da9ce07 957#line 958 "configure"
b1df34b9
TT
958#include "confdefs.h"
959
960int main() {
961} $ac_kw foo() {
962; return 0; }
963EOF
5da9ce07 964if { (eval echo configure:965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
b1df34b9
TT
965 rm -rf conftest*
966 ac_cv_c_inline=$ac_kw; break
24691f55 967else
b1df34b9
TT
968 echo "configure: failed program was:" >&5
969 cat conftest.$ac_ext >&5
24691f55 970fi
b1df34b9
TT
971rm -f conftest*
972done
973
24691f55
DE
974fi
975
b1df34b9
TT
976echo "$ac_t""$ac_cv_c_inline" 1>&6
977case "$ac_cv_c_inline" in
978 inline | yes) ;;
979 no) cat >> confdefs.h <<\EOF
980#define inline
981EOF
982 ;;
983 *) cat >> confdefs.h <<EOF
984#define inline $ac_cv_c_inline
985EOF
986 ;;
987esac
988
989echo $ac_n "checking for off_t""... $ac_c" 1>&6
5da9ce07 990echo "configure:991: checking for off_t" >&5
b1df34b9 991if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
295dbbe4
SG
992 echo $ac_n "(cached) $ac_c" 1>&6
993else
b1df34b9 994 cat > conftest.$ac_ext <<EOF
5da9ce07 995#line 996 "configure"
b1df34b9
TT
996#include "confdefs.h"
997#include <sys/types.h>
998#if STDC_HEADERS
999#include <stdlib.h>
1000#include <stddef.h>
1001#endif
1002EOF
1003if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1004 egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1005 rm -rf conftest*
1006 ac_cv_type_off_t=yes
1007else
1008 rm -rf conftest*
1009 ac_cv_type_off_t=no
295dbbe4 1010fi
b1df34b9
TT
1011rm -f conftest*
1012
295dbbe4 1013fi
b1df34b9
TT
1014echo "$ac_t""$ac_cv_type_off_t" 1>&6
1015if test $ac_cv_type_off_t = no; then
1016 cat >> confdefs.h <<\EOF
1017#define off_t long
1018EOF
1019
295dbbe4 1020fi
b1df34b9
TT
1021
1022echo $ac_n "checking for size_t""... $ac_c" 1>&6
5da9ce07 1023echo "configure:1024: checking for size_t" >&5
b1df34b9
TT
1024if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1025 echo $ac_n "(cached) $ac_c" 1>&6
295dbbe4 1026else
b1df34b9 1027 cat > conftest.$ac_ext <<EOF
5da9ce07 1028#line 1029 "configure"
b1df34b9
TT
1029#include "confdefs.h"
1030#include <sys/types.h>
1031#if STDC_HEADERS
1032#include <stdlib.h>
1033#include <stddef.h>
1034#endif
1035EOF
1036if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1037 egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1038 rm -rf conftest*
1039 ac_cv_type_size_t=yes
1040else
1041 rm -rf conftest*
1042 ac_cv_type_size_t=no
295dbbe4 1043fi
b1df34b9 1044rm -f conftest*
295dbbe4 1045
295dbbe4 1046fi
b1df34b9
TT
1047echo "$ac_t""$ac_cv_type_size_t" 1>&6
1048if test $ac_cv_type_size_t = no; then
1049 cat >> confdefs.h <<\EOF
1050#define size_t unsigned
1051EOF
295dbbe4 1052
b1df34b9 1053fi
6fea4763 1054
b1df34b9
TT
1055# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1056# for constant arguments. Useless!
1057echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5da9ce07 1058echo "configure:1059: checking for working alloca.h" >&5
b1df34b9
TT
1059if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1060 echo $ac_n "(cached) $ac_c" 1>&6
1061else
1062 cat > conftest.$ac_ext <<EOF
5da9ce07 1063#line 1064 "configure"
6fea4763 1064#include "confdefs.h"
b1df34b9
TT
1065#include <alloca.h>
1066int main() {
1067char *p = alloca(2 * sizeof(int));
1068; return 0; }
6fea4763 1069EOF
5da9ce07 1070if { (eval echo configure:1071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b1df34b9
TT
1071 rm -rf conftest*
1072 ac_cv_header_alloca_h=yes
6fea4763
DE
1073else
1074 echo "configure: failed program was:" >&5
1075 cat conftest.$ac_ext >&5
b1df34b9
TT
1076 rm -rf conftest*
1077 ac_cv_header_alloca_h=no
1078fi
1079rm -f conftest*
6fea4763 1080fi
6fea4763 1081
b1df34b9
TT
1082echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1083if test $ac_cv_header_alloca_h = yes; then
1084 cat >> confdefs.h <<\EOF
1085#define HAVE_ALLOCA_H 1
1086EOF
1087
6fea4763 1088fi
6fea4763 1089
b1df34b9 1090echo $ac_n "checking for alloca""... $ac_c" 1>&6
5da9ce07 1091echo "configure:1092: checking for alloca" >&5
b1df34b9 1092if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
24691f55
DE
1093 echo $ac_n "(cached) $ac_c" 1>&6
1094else
b1df34b9 1095 cat > conftest.$ac_ext <<EOF
5da9ce07 1096#line 1097 "configure"
b1df34b9
TT
1097#include "confdefs.h"
1098
24691f55 1099#ifdef __GNUC__
b1df34b9
TT
1100# define alloca __builtin_alloca
1101#else
1102# if HAVE_ALLOCA_H
1103# include <alloca.h>
1104# else
1105# ifdef _AIX
1106 #pragma alloca
1107# else
1108# ifndef alloca /* predefined by HP cc +Olibcalls */
1109char *alloca ();
1110# endif
1111# endif
1112# endif
24691f55 1113#endif
b1df34b9
TT
1114
1115int main() {
1116char *p = (char *) alloca(1);
1117; return 0; }
24691f55 1118EOF
5da9ce07 1119if { (eval echo configure:1120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b1df34b9
TT
1120 rm -rf conftest*
1121 ac_cv_func_alloca_works=yes
24691f55 1122else
b1df34b9
TT
1123 echo "configure: failed program was:" >&5
1124 cat conftest.$ac_ext >&5
1125 rm -rf conftest*
1126 ac_cv_func_alloca_works=no
24691f55 1127fi
b1df34b9 1128rm -f conftest*
24691f55 1129fi
295dbbe4 1130
b1df34b9
TT
1131echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1132if test $ac_cv_func_alloca_works = yes; then
1133 cat >> confdefs.h <<\EOF
1134#define HAVE_ALLOCA 1
1135EOF
6fea4763 1136
24691f55 1137fi
24691f55 1138
b1df34b9
TT
1139if test $ac_cv_func_alloca_works = no; then
1140 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1141 # that cause trouble. Some versions do not even contain alloca or
1142 # contain a buggy version. If you still want to use their alloca,
1143 # use ar to extract alloca.o from them instead of compiling alloca.c.
1144 ALLOCA=alloca.o
1145 cat >> confdefs.h <<\EOF
1146#define C_ALLOCA 1
1147EOF
295dbbe4 1148
24691f55 1149
b1df34b9 1150echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5da9ce07 1151echo "configure:1152: checking whether alloca needs Cray hooks" >&5
b1df34b9 1152if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
24691f55
DE
1153 echo $ac_n "(cached) $ac_c" 1>&6
1154else
b1df34b9 1155 cat > conftest.$ac_ext <<EOF
5da9ce07 1156#line 1157 "configure"
b1df34b9
TT
1157#include "confdefs.h"
1158#if defined(CRAY) && ! defined(CRAY2)
1159webecray
1160#else
1161wenotbecray
1162#endif
295dbbe4 1163
b1df34b9
TT
1164EOF
1165if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1166 egrep "webecray" >/dev/null 2>&1; then
1167 rm -rf conftest*
1168 ac_cv_os_cray=yes
1169else
1170 rm -rf conftest*
1171 ac_cv_os_cray=no
24691f55 1172fi
b1df34b9
TT
1173rm -f conftest*
1174
24691f55 1175fi
24691f55 1176
b1df34b9
TT
1177echo "$ac_t""$ac_cv_os_cray" 1>&6
1178if test $ac_cv_os_cray = yes; then
1179for ac_func in _getb67 GETB67 getb67; do
1180 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5da9ce07 1181echo "configure:1182: checking for $ac_func" >&5
b1df34b9
TT
1182if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1183 echo $ac_n "(cached) $ac_c" 1>&6
1184else
1185 cat > conftest.$ac_ext <<EOF
5da9ce07 1186#line 1187 "configure"
b1df34b9
TT
1187#include "confdefs.h"
1188/* System header to define __stub macros and hopefully few prototypes,
1189 which can conflict with char $ac_func(); below. */
1190#include <assert.h>
1191/* Override any gcc2 internal prototype to avoid an error. */
1192/* We use char because int might match the return type of a gcc2
1193 builtin and then its argument prototype would still apply. */
1194char $ac_func();
24691f55 1195
b1df34b9 1196int main() {
24691f55 1197
b1df34b9
TT
1198/* The GNU C library defines this for functions which it implements
1199 to always fail with ENOSYS. Some functions are actually named
1200 something starting with __ and the normal name is an alias. */
1201#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1202choke me
1203#else
1204$ac_func();
1205#endif
295dbbe4 1206
b1df34b9
TT
1207; return 0; }
1208EOF
5da9ce07 1209if { (eval echo configure:1210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b1df34b9
TT
1210 rm -rf conftest*
1211 eval "ac_cv_func_$ac_func=yes"
295dbbe4 1212else
b1df34b9
TT
1213 echo "configure: failed program was:" >&5
1214 cat conftest.$ac_ext >&5
1215 rm -rf conftest*
1216 eval "ac_cv_func_$ac_func=no"
1217fi
1218rm -f conftest*
295dbbe4
SG
1219fi
1220
b1df34b9
TT
1221if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1222 echo "$ac_t""yes" 1>&6
1223 cat >> confdefs.h <<EOF
1224#define CRAY_STACKSEG_END $ac_func
1225EOF
295dbbe4 1226
b1df34b9
TT
1227 break
1228else
1229 echo "$ac_t""no" 1>&6
1230fi
295dbbe4 1231
b1df34b9
TT
1232done
1233fi
295dbbe4 1234
b1df34b9 1235echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5da9ce07 1236echo "configure:1237: checking stack direction for C alloca" >&5
b1df34b9 1237if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
295dbbe4
SG
1238 echo $ac_n "(cached) $ac_c" 1>&6
1239else
b1df34b9
TT
1240 if test "$cross_compiling" = yes; then
1241 ac_cv_c_stack_direction=0
295dbbe4 1242else
b1df34b9 1243 cat > conftest.$ac_ext <<EOF
5da9ce07 1244#line 1245 "configure"
b1df34b9
TT
1245#include "confdefs.h"
1246find_stack_direction ()
1247{
1248 static char *addr = 0;
1249 auto char dummy;
1250 if (addr == 0)
1251 {
1252 addr = &dummy;
1253 return find_stack_direction ();
1254 }
1255 else
1256 return (&dummy > addr) ? 1 : -1;
1257}
1258main ()
1259{
1260 exit (find_stack_direction() < 0);
1261}
1262EOF
5da9ce07 1263if { (eval echo configure:1264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
b1df34b9
TT
1264then
1265 ac_cv_c_stack_direction=1
1266else
1267 echo "configure: failed program was:" >&5
1268 cat conftest.$ac_ext >&5
1269 rm -fr conftest*
1270 ac_cv_c_stack_direction=-1
1271fi
1272rm -fr conftest*
1273fi
1274
1275fi
1276
1277echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1278cat >> confdefs.h <<EOF
1279#define STACK_DIRECTION $ac_cv_c_stack_direction
1280EOF
1281
1282fi
1283
1284for ac_hdr in unistd.h
1285do
1286ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1287echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5da9ce07 1288echo "configure:1289: checking for $ac_hdr" >&5
b1df34b9
TT
1289if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1290 echo $ac_n "(cached) $ac_c" 1>&6
1291else
1292 cat > conftest.$ac_ext <<EOF
5da9ce07 1293#line 1294 "configure"
b1df34b9
TT
1294#include "confdefs.h"
1295#include <$ac_hdr>
1296EOF
1297ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5da9ce07 1298{ (eval echo configure:1299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b1df34b9
TT
1299ac_err=`grep -v '^ *+' conftest.out`
1300if test -z "$ac_err"; then
1301 rm -rf conftest*
1302 eval "ac_cv_header_$ac_safe=yes"
1303else
1304 echo "$ac_err" >&5
1305 echo "configure: failed program was:" >&5
1306 cat conftest.$ac_ext >&5
1307 rm -rf conftest*
1308 eval "ac_cv_header_$ac_safe=no"
1309fi
1310rm -f conftest*
1311fi
1312if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1313 echo "$ac_t""yes" 1>&6
1314 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1315 cat >> confdefs.h <<EOF
1316#define $ac_tr_hdr 1
1317EOF
1318
1319else
1320 echo "$ac_t""no" 1>&6
1321fi
1322done
1323
1324for ac_func in getpagesize
1325do
1326echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5da9ce07 1327echo "configure:1328: checking for $ac_func" >&5
b1df34b9
TT
1328if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1329 echo $ac_n "(cached) $ac_c" 1>&6
1330else
1331 cat > conftest.$ac_ext <<EOF
5da9ce07 1332#line 1333 "configure"
b1df34b9
TT
1333#include "confdefs.h"
1334/* System header to define __stub macros and hopefully few prototypes,
1335 which can conflict with char $ac_func(); below. */
1336#include <assert.h>
1337/* Override any gcc2 internal prototype to avoid an error. */
1338/* We use char because int might match the return type of a gcc2
1339 builtin and then its argument prototype would still apply. */
1340char $ac_func();
1341
1342int main() {
1343
1344/* The GNU C library defines this for functions which it implements
1345 to always fail with ENOSYS. Some functions are actually named
1346 something starting with __ and the normal name is an alias. */
1347#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1348choke me
1349#else
1350$ac_func();
1351#endif
1352
1353; return 0; }
1354EOF
5da9ce07 1355if { (eval echo configure:1356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b1df34b9
TT
1356 rm -rf conftest*
1357 eval "ac_cv_func_$ac_func=yes"
1358else
1359 echo "configure: failed program was:" >&5
1360 cat conftest.$ac_ext >&5
1361 rm -rf conftest*
1362 eval "ac_cv_func_$ac_func=no"
1363fi
1364rm -f conftest*
1365fi
1366
1367if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1368 echo "$ac_t""yes" 1>&6
1369 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1370 cat >> confdefs.h <<EOF
1371#define $ac_tr_func 1
1372EOF
1373
1374else
1375 echo "$ac_t""no" 1>&6
1376fi
1377done
1378
1379echo $ac_n "checking for working mmap""... $ac_c" 1>&6
5da9ce07 1380echo "configure:1381: checking for working mmap" >&5
b1df34b9
TT
1381if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1382 echo $ac_n "(cached) $ac_c" 1>&6
1383else
1384 if test "$cross_compiling" = yes; then
1385 ac_cv_func_mmap_fixed_mapped=no
1386else
1387 cat > conftest.$ac_ext <<EOF
5da9ce07 1388#line 1389 "configure"
b1df34b9
TT
1389#include "confdefs.h"
1390
1391/* Thanks to Mike Haertel and Jim Avera for this test.
1392 Here is a matrix of mmap possibilities:
1393 mmap private not fixed
1394 mmap private fixed at somewhere currently unmapped
1395 mmap private fixed at somewhere already mapped
1396 mmap shared not fixed
1397 mmap shared fixed at somewhere currently unmapped
1398 mmap shared fixed at somewhere already mapped
1399 For private mappings, we should verify that changes cannot be read()
1400 back from the file, nor mmap's back from the file at a different
1401 address. (There have been systems where private was not correctly
1402 implemented like the infamous i386 svr4.0, and systems where the
1403 VM page cache was not coherent with the filesystem buffer cache
1404 like early versions of FreeBSD and possibly contemporary NetBSD.)
1405 For shared mappings, we should conversely verify that changes get
1406 propogated back to all the places they're supposed to be.
1407
1408 Grep wants private fixed already mapped.
1409 The main things grep needs to know about mmap are:
1410 * does it exist and is it safe to write into the mmap'd area
1411 * how to use it (BSD variants) */
1412#include <sys/types.h>
1413#include <fcntl.h>
1414#include <sys/mman.h>
1415
1416/* This mess was copied from the GNU getpagesize.h. */
1417#ifndef HAVE_GETPAGESIZE
1418# ifdef HAVE_UNISTD_H
1419# include <unistd.h>
1420# endif
1421
1422/* Assume that all systems that can run configure have sys/param.h. */
1423# ifndef HAVE_SYS_PARAM_H
1424# define HAVE_SYS_PARAM_H 1
1425# endif
1426
1427# ifdef _SC_PAGESIZE
1428# define getpagesize() sysconf(_SC_PAGESIZE)
1429# else /* no _SC_PAGESIZE */
1430# ifdef HAVE_SYS_PARAM_H
1431# include <sys/param.h>
1432# ifdef EXEC_PAGESIZE
1433# define getpagesize() EXEC_PAGESIZE
1434# else /* no EXEC_PAGESIZE */
1435# ifdef NBPG
1436# define getpagesize() NBPG * CLSIZE
1437# ifndef CLSIZE
1438# define CLSIZE 1
1439# endif /* no CLSIZE */
1440# else /* no NBPG */
1441# ifdef NBPC
1442# define getpagesize() NBPC
1443# else /* no NBPC */
1444# ifdef PAGESIZE
1445# define getpagesize() PAGESIZE
1446# endif /* PAGESIZE */
1447# endif /* no NBPC */
1448# endif /* no NBPG */
1449# endif /* no EXEC_PAGESIZE */
1450# else /* no HAVE_SYS_PARAM_H */
1451# define getpagesize() 8192 /* punt totally */
1452# endif /* no HAVE_SYS_PARAM_H */
1453# endif /* no _SC_PAGESIZE */
1454
1455#endif /* no HAVE_GETPAGESIZE */
1456
1457#ifdef __cplusplus
1458extern "C" { void *malloc(unsigned); }
1459#else
1460char *malloc();
1461#endif
1462
1463int
1464main()
1465{
1466 char *data, *data2, *data3;
1467 int i, pagesize;
1468 int fd;
1469
1470 pagesize = getpagesize();
1471
1472 /*
1473 * First, make a file with some known garbage in it.
1474 */
1475 data = malloc(pagesize);
1476 if (!data)
1477 exit(1);
1478 for (i = 0; i < pagesize; ++i)
1479 *(data + i) = rand();
1480 umask(0);
1481 fd = creat("conftestmmap", 0600);
1482 if (fd < 0)
1483 exit(1);
1484 if (write(fd, data, pagesize) != pagesize)
1485 exit(1);
1486 close(fd);
1487
1488 /*
1489 * Next, try to mmap the file at a fixed address which
1490 * already has something else allocated at it. If we can,
1491 * also make sure that we see the same garbage.
1492 */
1493 fd = open("conftestmmap", O_RDWR);
1494 if (fd < 0)
1495 exit(1);
1496 data2 = malloc(2 * pagesize);
1497 if (!data2)
1498 exit(1);
1499 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
1500 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
1501 MAP_PRIVATE | MAP_FIXED, fd, 0L))
1502 exit(1);
1503 for (i = 0; i < pagesize; ++i)
1504 if (*(data + i) != *(data2 + i))
1505 exit(1);
1506
1507 /*
1508 * Finally, make sure that changes to the mapped area
1509 * do not percolate back to the file as seen by read().
1510 * (This is a bug on some variants of i386 svr4.0.)
1511 */
1512 for (i = 0; i < pagesize; ++i)
1513 *(data2 + i) = *(data2 + i) + 1;
1514 data3 = malloc(pagesize);
1515 if (!data3)
1516 exit(1);
1517 if (read(fd, data3, pagesize) != pagesize)
1518 exit(1);
1519 for (i = 0; i < pagesize; ++i)
1520 if (*(data + i) != *(data3 + i))
1521 exit(1);
1522 close(fd);
1523 unlink("conftestmmap");
1524 exit(0);
1525}
1526
1527EOF
5da9ce07 1528if { (eval echo configure:1529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
b1df34b9
TT
1529then
1530 ac_cv_func_mmap_fixed_mapped=yes
1531else
1532 echo "configure: failed program was:" >&5
1533 cat conftest.$ac_ext >&5
1534 rm -fr conftest*
1535 ac_cv_func_mmap_fixed_mapped=no
1536fi
1537rm -fr conftest*
1538fi
1539
1540fi
1541
1542echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
1543if test $ac_cv_func_mmap_fixed_mapped = yes; then
1544 cat >> confdefs.h <<\EOF
1545#define HAVE_MMAP 1
1546EOF
1547
1548fi
1549
1550
1551# autoconf.info says this should be called right after AC_INIT.
1552
1553
1554ac_aux_dir=
1555for ac_dir in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../..; do
1556 if test -f $ac_dir/install-sh; then
1557 ac_aux_dir=$ac_dir
1558 ac_install_sh="$ac_aux_dir/install-sh -c"
1559 break
1560 elif test -f $ac_dir/install.sh; then
1561 ac_aux_dir=$ac_dir
1562 ac_install_sh="$ac_aux_dir/install.sh -c"
1563 break
1564 fi
1565done
1566if test -z "$ac_aux_dir"; then
1567 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/../.. $srcdir/`cd $srcdir;pwd`/../.." 1>&2; exit 1; }
1568fi
1569ac_config_guess=$ac_aux_dir/config.guess
1570ac_config_sub=$ac_aux_dir/config.sub
1571ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1572
1573
1574# Do some error checking and defaulting for the host and target type.
1575# The inputs are:
1576# configure --host=HOST --target=TARGET --build=BUILD NONOPT
1577#
1578# The rules are:
1579# 1. You are not allowed to specify --host, --target, and nonopt at the
1580# same time.
1581# 2. Host defaults to nonopt.
1582# 3. If nonopt is not specified, then host defaults to the current host,
1583# as determined by config.guess.
1584# 4. Target and build default to nonopt.
1585# 5. If nonopt is not specified, then target and build default to host.
1586
1587# The aliases save the names the user supplied, while $host etc.
1588# will get canonicalized.
1589case $host---$target---$nonopt in
1590NONE---*---* | *---NONE---* | *---*---NONE) ;;
1591*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1592esac
1593
1594
1595# Make sure we can run config.sub.
1596if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1597else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1598fi
1599
1600echo $ac_n "checking host system type""... $ac_c" 1>&6
5da9ce07 1601echo "configure:1602: checking host system type" >&5
b1df34b9
TT
1602
1603host_alias=$host
1604case "$host_alias" in
1605NONE)
1606 case $nonopt in
1607 NONE)
1608 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1609 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1610 fi ;;
1611 *) host_alias=$nonopt ;;
1612 esac ;;
1613esac
1614
1615host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1616host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1617host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1618host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1619echo "$ac_t""$host" 1>&6
1620
1621echo $ac_n "checking target system type""... $ac_c" 1>&6
5da9ce07 1622echo "configure:1623: checking target system type" >&5
b1df34b9
TT
1623
1624target_alias=$target
1625case "$target_alias" in
1626NONE)
1627 case $nonopt in
1628 NONE) target_alias=$host_alias ;;
1629 *) target_alias=$nonopt ;;
1630 esac ;;
1631esac
1632
1633target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1634target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1635target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1636target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1637echo "$ac_t""$target" 1>&6
1638
1639echo $ac_n "checking build system type""... $ac_c" 1>&6
5da9ce07 1640echo "configure:1641: checking build system type" >&5
b1df34b9
TT
1641
1642build_alias=$build
1643case "$build_alias" in
1644NONE)
1645 case $nonopt in
1646 NONE) build_alias=$host_alias ;;
1647 *) build_alias=$nonopt ;;
1648 esac ;;
1649esac
1650
1651build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1652build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1653build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1654build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1655echo "$ac_t""$build" 1>&6
1656
1657test "$host_alias" != "$target_alias" &&
1658 test "$program_prefix$program_suffix$program_transform_name" = \
1659 NONENONEs,x,x, &&
1660 program_prefix=${target_alias}-
1661
1662if test "$program_transform_name" = s,x,x,; then
1663 program_transform_name=
1664else
1665 # Double any \ or $. echo might interpret backslashes.
1666 cat <<\EOF_SED > conftestsed
1667s,\\,\\\\,g; s,\$,$$,g
1668EOF_SED
1669 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1670 rm -f conftestsed
1671fi
1672test "$program_prefix" != NONE &&
1673 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1674# Use a double $ so make ignores it.
1675test "$program_suffix" != NONE &&
1676 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1677
1678# sed with no file args requires a program.
1679test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1680
1681# Extract the first word of "gcc", so it can be a program name with args.
1682set dummy gcc; ac_word=$2
1683echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5da9ce07 1684echo "configure:1685: checking for $ac_word" >&5
b1df34b9
TT
1685if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1686 echo $ac_n "(cached) $ac_c" 1>&6
1687else
1688 if test -n "$CC"; then
1689 ac_cv_prog_CC="$CC" # Let the user override the test.
1690else
1691 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1692 for ac_dir in $PATH; do
1693 test -z "$ac_dir" && ac_dir=.
1694 if test -f $ac_dir/$ac_word; then
1695 ac_cv_prog_CC="gcc"
1696 break
1697 fi
1698 done
1699 IFS="$ac_save_ifs"
1700fi
1701fi
1702CC="$ac_cv_prog_CC"
1703if test -n "$CC"; then
1704 echo "$ac_t""$CC" 1>&6
1705else
1706 echo "$ac_t""no" 1>&6
1707fi
1708
1709if test -z "$CC"; then
1710 # Extract the first word of "cc", so it can be a program name with args.
1711set dummy cc; ac_word=$2
1712echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5da9ce07 1713echo "configure:1714: checking for $ac_word" >&5
b1df34b9
TT
1714if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
1715 echo $ac_n "(cached) $ac_c" 1>&6
1716else
1717 if test -n "$CC"; then
1718 ac_cv_prog_CC="$CC" # Let the user override the test.
1719else
1720 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1721 ac_prog_rejected=no
1722 for ac_dir in $PATH; do
1723 test -z "$ac_dir" && ac_dir=.
1724 if test -f $ac_dir/$ac_word; then
1725 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1726 ac_prog_rejected=yes
1727 continue
1728 fi
1729 ac_cv_prog_CC="cc"
1730 break
1731 fi
1732 done
1733 IFS="$ac_save_ifs"
1734if test $ac_prog_rejected = yes; then
1735 # We found a bogon in the path, so make sure we never use it.
1736 set dummy $ac_cv_prog_CC
1737 shift
1738 if test $# -gt 0; then
1739 # We chose a different compiler from the bogus one.
1740 # However, it has the same basename, so the bogon will be chosen
1741 # first if we set CC to just the basename; use the full file name.
1742 shift
1743 set dummy "$ac_dir/$ac_word" "$@"
1744 shift
1745 ac_cv_prog_CC="$@"
1746 fi
1747fi
1748fi
1749fi
1750CC="$ac_cv_prog_CC"
1751if test -n "$CC"; then
1752 echo "$ac_t""$CC" 1>&6
1753else
1754 echo "$ac_t""no" 1>&6
1755fi
1756
1757 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1758fi
1759
1760echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
5da9ce07 1761echo "configure:1762: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
b1df34b9
TT
1762
1763ac_ext=c
1764# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1765ac_cpp='$CPP $CPPFLAGS'
1766ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1767ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1768cross_compiling=$ac_cv_prog_cc_cross
1769
1770cat > conftest.$ac_ext <<EOF
5da9ce07 1771#line 1772 "configure"
b1df34b9
TT
1772#include "confdefs.h"
1773main(){return(0);}
1774EOF
5da9ce07 1775if { (eval echo configure:1776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b1df34b9
TT
1776 ac_cv_prog_cc_works=yes
1777 # If we can't run a trivial program, we are probably using a cross compiler.
1778 if (./conftest; exit) 2>/dev/null; then
1779 ac_cv_prog_cc_cross=no
1780 else
1781 ac_cv_prog_cc_cross=yes
1782 fi
1783else
1784 echo "configure: failed program was:" >&5
1785 cat conftest.$ac_ext >&5
1786 ac_cv_prog_cc_works=no
1787fi
1788rm -fr conftest*
1789
1790echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1791if test $ac_cv_prog_cc_works = no; then
1792 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1793fi
1794echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
5da9ce07 1795echo "configure:1796: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
b1df34b9
TT
1796echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1797cross_compiling=$ac_cv_prog_cc_cross
1798
1799echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
5da9ce07 1800echo "configure:1801: checking whether we are using GNU C" >&5
b1df34b9
TT
1801if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1802 echo $ac_n "(cached) $ac_c" 1>&6
1803else
1804 cat > conftest.c <<EOF
1805#ifdef __GNUC__
1806 yes;
1807#endif
1808EOF
5da9ce07 1809if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1810: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
b1df34b9
TT
1810 ac_cv_prog_gcc=yes
1811else
1812 ac_cv_prog_gcc=no
1813fi
1814fi
1815
1816echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1817
1818if test $ac_cv_prog_gcc = yes; then
1819 GCC=yes
1820 ac_test_CFLAGS="${CFLAGS+set}"
1821 ac_save_CFLAGS="$CFLAGS"
1822 CFLAGS=
1823 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
5da9ce07 1824echo "configure:1825: checking whether ${CC-cc} accepts -g" >&5
b1df34b9
TT
1825if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1826 echo $ac_n "(cached) $ac_c" 1>&6
1827else
1828 echo 'void f(){}' > conftest.c
1829if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1830 ac_cv_prog_cc_g=yes
1831else
1832 ac_cv_prog_cc_g=no
1833fi
1834rm -f conftest*
1835
1836fi
1837
1838echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1839 if test "$ac_test_CFLAGS" = set; then
1840 CFLAGS="$ac_save_CFLAGS"
1841 elif test $ac_cv_prog_cc_g = yes; then
1842 CFLAGS="-g -O2"
1843 else
1844 CFLAGS="-O2"
1845 fi
1846else
1847 GCC=
1848 test "${CFLAGS+set}" = set || CFLAGS="-g"
1849fi
1850
1851# Find a good install program. We prefer a C program (faster),
1852# so one script is as good as another. But avoid the broken or
1853# incompatible versions:
1854# SysV /etc/install, /usr/sbin/install
1855# SunOS /usr/etc/install
1856# IRIX /sbin/install
1857# AIX /bin/install
1858# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1859# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1860# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1861# ./install, which can be erroneously created by make from ./install.sh.
1862echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
5da9ce07 1863echo "configure:1864: checking for a BSD compatible install" >&5
b1df34b9
TT
1864if test -z "$INSTALL"; then
1865if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1866 echo $ac_n "(cached) $ac_c" 1>&6
1867else
1868 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1869 for ac_dir in $PATH; do
1870 # Account for people who put trailing slashes in PATH elements.
1871 case "$ac_dir/" in
1872 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1873 *)
1874 # OSF1 and SCO ODT 3.0 have their own names for install.
1875 # Don't use installbsd from OSF since it installs stuff as root
1876 # by default.
1877 for ac_prog in ginstall scoinst install; do
1878 if test -f $ac_dir/$ac_prog; then
1879 if test $ac_prog = install &&
1880 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1881 # AIX install. It has an incompatible calling convention.
1882 :
1883 else
1884 ac_cv_path_install="$ac_dir/$ac_prog -c"
1885 break 2
1886 fi
1887 fi
1888 done
1889 ;;
1890 esac
1891 done
1892 IFS="$ac_save_IFS"
1893
1894fi
1895 if test "${ac_cv_path_install+set}" = set; then
1896 INSTALL="$ac_cv_path_install"
1897 else
1898 # As a last resort, use the slow shell script. We don't cache a
1899 # path for INSTALL within a source directory, because that will
1900 # break other packages using the cache if that directory is
1901 # removed, or if the path is relative.
1902 INSTALL="$ac_install_sh"
1903 fi
1904fi
1905echo "$ac_t""$INSTALL" 1>&6
1906
1907# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1908# It thinks the first close brace ends the variable substitution.
1909test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1910
1911test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1912
1913
1914# Put a plausible default for CC_FOR_BUILD in Makefile.
1915if test "x$cross_compiling" = "xno"; then
1916 CC_FOR_BUILD='$(CC)'
1917else
1918 CC_FOR_BUILD=gcc
1919fi
1920
1921
1922
1923
1924AR=${AR-ar}
1925
1926# Extract the first word of "ranlib", so it can be a program name with args.
1927set dummy ranlib; ac_word=$2
1928echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5da9ce07 1929echo "configure:1930: checking for $ac_word" >&5
b1df34b9
TT
1930if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1931 echo $ac_n "(cached) $ac_c" 1>&6
1932else
1933 if test -n "$RANLIB"; then
1934 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1935else
1936 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1937 for ac_dir in $PATH; do
1938 test -z "$ac_dir" && ac_dir=.
1939 if test -f $ac_dir/$ac_word; then
1940 ac_cv_prog_RANLIB="ranlib"
1941 break
1942 fi
1943 done
1944 IFS="$ac_save_ifs"
1945 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1946fi
1947fi
1948RANLIB="$ac_cv_prog_RANLIB"
1949if test -n "$RANLIB"; then
1950 echo "$ac_t""$RANLIB" 1>&6
1951else
1952 echo "$ac_t""no" 1>&6
1953fi
1954
1955
1956ALL_LINGUAS=
1957
1958 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
1959unistd.h values.h sys/param.h
1960do
1961ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1962echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5da9ce07 1963echo "configure:1964: checking for $ac_hdr" >&5
b1df34b9
TT
1964if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1965 echo $ac_n "(cached) $ac_c" 1>&6
1966else
1967 cat > conftest.$ac_ext <<EOF
5da9ce07 1968#line 1969 "configure"
b1df34b9
TT
1969#include "confdefs.h"
1970#include <$ac_hdr>
1971EOF
1972ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5da9ce07 1973{ (eval echo configure:1974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b1df34b9
TT
1974ac_err=`grep -v '^ *+' conftest.out`
1975if test -z "$ac_err"; then
1976 rm -rf conftest*
1977 eval "ac_cv_header_$ac_safe=yes"
1978else
1979 echo "$ac_err" >&5
1980 echo "configure: failed program was:" >&5
1981 cat conftest.$ac_ext >&5
1982 rm -rf conftest*
1983 eval "ac_cv_header_$ac_safe=no"
1984fi
1985rm -f conftest*
1986fi
1987if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1988 echo "$ac_t""yes" 1>&6
1989 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1990 cat >> confdefs.h <<EOF
1991#define $ac_tr_hdr 1
1992EOF
1993
1994else
1995 echo "$ac_t""no" 1>&6
1996fi
1997done
1998
1999 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2000__argz_count __argz_stringify __argz_next
2001do
2002echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5da9ce07 2003echo "configure:2004: checking for $ac_func" >&5
b1df34b9
TT
2004if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2005 echo $ac_n "(cached) $ac_c" 1>&6
2006else
2007 cat > conftest.$ac_ext <<EOF
5da9ce07 2008#line 2009 "configure"
b1df34b9
TT
2009#include "confdefs.h"
2010/* System header to define __stub macros and hopefully few prototypes,
2011 which can conflict with char $ac_func(); below. */
2012#include <assert.h>
2013/* Override any gcc2 internal prototype to avoid an error. */
2014/* We use char because int might match the return type of a gcc2
2015 builtin and then its argument prototype would still apply. */
2016char $ac_func();
2017
2018int main() {
2019
2020/* The GNU C library defines this for functions which it implements
2021 to always fail with ENOSYS. Some functions are actually named
2022 something starting with __ and the normal name is an alias. */
2023#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2024choke me
2025#else
2026$ac_func();
2027#endif
2028
2029; return 0; }
2030EOF
5da9ce07 2031if { (eval echo configure:2032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b1df34b9
TT
2032 rm -rf conftest*
2033 eval "ac_cv_func_$ac_func=yes"
2034else
2035 echo "configure: failed program was:" >&5
2036 cat conftest.$ac_ext >&5
2037 rm -rf conftest*
2038 eval "ac_cv_func_$ac_func=no"
2039fi
2040rm -f conftest*
2041fi
2042
2043if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2044 echo "$ac_t""yes" 1>&6
2045 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2046 cat >> confdefs.h <<EOF
2047#define $ac_tr_func 1
2048EOF
2049
2050else
2051 echo "$ac_t""no" 1>&6
2052fi
2053done
2054
2055
2056 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2057 for ac_func in stpcpy
2058do
2059echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5da9ce07 2060echo "configure:2061: checking for $ac_func" >&5
b1df34b9
TT
2061if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2062 echo $ac_n "(cached) $ac_c" 1>&6
2063else
2064 cat > conftest.$ac_ext <<EOF
5da9ce07 2065#line 2066 "configure"
b1df34b9
TT
2066#include "confdefs.h"
2067/* System header to define __stub macros and hopefully few prototypes,
2068 which can conflict with char $ac_func(); below. */
2069#include <assert.h>
2070/* Override any gcc2 internal prototype to avoid an error. */
2071/* We use char because int might match the return type of a gcc2
2072 builtin and then its argument prototype would still apply. */
2073char $ac_func();
2074
2075int main() {
2076
2077/* The GNU C library defines this for functions which it implements
2078 to always fail with ENOSYS. Some functions are actually named
2079 something starting with __ and the normal name is an alias. */
2080#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2081choke me
2082#else
2083$ac_func();
2084#endif
2085
2086; return 0; }
2087EOF
5da9ce07 2088if { (eval echo configure:2089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b1df34b9
TT
2089 rm -rf conftest*
2090 eval "ac_cv_func_$ac_func=yes"
2091else
2092 echo "configure: failed program was:" >&5
2093 cat conftest.$ac_ext >&5
2094 rm -rf conftest*
2095 eval "ac_cv_func_$ac_func=no"
2096fi
2097rm -f conftest*
2098fi
2099
2100if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2101 echo "$ac_t""yes" 1>&6
2102 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2103 cat >> confdefs.h <<EOF
2104#define $ac_tr_func 1
2105EOF
2106
2107else
2108 echo "$ac_t""no" 1>&6
2109fi
2110done
2111
2112 fi
2113 if test "${ac_cv_func_stpcpy}" = "yes"; then
2114 cat >> confdefs.h <<\EOF
2115#define HAVE_STPCPY 1
2116EOF
2117
2118 fi
2119
2120 if test $ac_cv_header_locale_h = yes; then
2121 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
5da9ce07 2122echo "configure:2123: checking for LC_MESSAGES" >&5
b1df34b9
TT
2123if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2124 echo $ac_n "(cached) $ac_c" 1>&6
2125else
2126 cat > conftest.$ac_ext <<EOF
5da9ce07 2127#line 2128 "configure"
b1df34b9
TT
2128#include "confdefs.h"
2129#include <locale.h>
2130int main() {
2131return LC_MESSAGES
2132; return 0; }
2133EOF
5da9ce07 2134if { (eval echo configure:2135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b1df34b9
TT
2135 rm -rf conftest*
2136 am_cv_val_LC_MESSAGES=yes
2137else
2138 echo "configure: failed program was:" >&5
2139 cat conftest.$ac_ext >&5
2140 rm -rf conftest*
2141 am_cv_val_LC_MESSAGES=no
2142fi
2143rm -f conftest*
2144fi
2145
2146echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2147 if test $am_cv_val_LC_MESSAGES = yes; then
2148 cat >> confdefs.h <<\EOF
2149#define HAVE_LC_MESSAGES 1
2150EOF
2151
2152 fi
2153 fi
2154 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
5da9ce07 2155echo "configure:2156: checking whether NLS is requested" >&5
b1df34b9
TT
2156 # Check whether --enable-nls or --disable-nls was given.
2157if test "${enable_nls+set}" = set; then
2158 enableval="$enable_nls"
2159 USE_NLS=$enableval
2160else
2161 USE_NLS=yes
2162fi
2163
2164 echo "$ac_t""$USE_NLS" 1>&6
2165
2166
2167 USE_INCLUDED_LIBINTL=no
2168
2169 if test "$USE_NLS" = "yes"; then
2170 cat >> confdefs.h <<\EOF
2171#define ENABLE_NLS 1
2172EOF
2173
2174 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
5da9ce07 2175echo "configure:2176: checking whether included gettext is requested" >&5
b1df34b9
TT
2176 # Check whether --with-included-gettext or --without-included-gettext was given.
2177if test "${with_included_gettext+set}" = set; then
2178 withval="$with_included_gettext"
2179 nls_cv_force_use_gnu_gettext=$withval
2180else
2181 nls_cv_force_use_gnu_gettext=no
2182fi
2183
2184 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2185
2186 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2187 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2188 nls_cv_header_intl=
2189 nls_cv_header_libgt=
2190 CATOBJEXT=NONE
2191
2192 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2193echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
5da9ce07 2194echo "configure:2195: checking for libintl.h" >&5
b1df34b9
TT
2195if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2196 echo $ac_n "(cached) $ac_c" 1>&6
2197else
2198 cat > conftest.$ac_ext <<EOF
5da9ce07 2199#line 2200 "configure"
b1df34b9
TT
2200#include "confdefs.h"
2201#include <libintl.h>
2202EOF
2203ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5da9ce07 2204{ (eval echo configure:2205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b1df34b9
TT
2205ac_err=`grep -v '^ *+' conftest.out`
2206if test -z "$ac_err"; then
2207 rm -rf conftest*
2208 eval "ac_cv_header_$ac_safe=yes"
2209else
2210 echo "$ac_err" >&5
2211 echo "configure: failed program was:" >&5
2212 cat conftest.$ac_ext >&5
2213 rm -rf conftest*
2214 eval "ac_cv_header_$ac_safe=no"
2215fi
2216rm -f conftest*
2217fi
2218if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2219 echo "$ac_t""yes" 1>&6
2220 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
5da9ce07 2221echo "configure:2222: checking for gettext in libc" >&5
b1df34b9
TT
2222if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2223 echo $ac_n "(cached) $ac_c" 1>&6
2224else
2225 cat > conftest.$ac_ext <<EOF
5da9ce07 2226#line 2227 "configure"
b1df34b9
TT
2227#include "confdefs.h"
2228#include <libintl.h>
2229int main() {
2230return (int) gettext ("")
2231; return 0; }
2232EOF
5da9ce07 2233if { (eval echo configure:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b1df34b9
TT
2234 rm -rf conftest*
2235 gt_cv_func_gettext_libc=yes
2236else
2237 echo "configure: failed program was:" >&5
2238 cat conftest.$ac_ext >&5
2239 rm -rf conftest*
2240 gt_cv_func_gettext_libc=no
2241fi
2242rm -f conftest*
2243fi
2244
2245echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2246
2247 if test "$gt_cv_func_gettext_libc" != "yes"; then
2248 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
5da9ce07 2249echo "configure:2250: checking for bindtextdomain in -lintl" >&5
b1df34b9
TT
2250ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2251if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2252 echo $ac_n "(cached) $ac_c" 1>&6
2253else
2254 ac_save_LIBS="$LIBS"
2255LIBS="-lintl $LIBS"
2256cat > conftest.$ac_ext <<EOF
5da9ce07 2257#line 2258 "configure"
b1df34b9
TT
2258#include "confdefs.h"
2259/* Override any gcc2 internal prototype to avoid an error. */
2260/* We use char because int might match the return type of a gcc2
2261 builtin and then its argument prototype would still apply. */
2262char bindtextdomain();
2263
2264int main() {
2265bindtextdomain()
2266; return 0; }
2267EOF
5da9ce07 2268if { (eval echo configure:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b1df34b9
TT
2269 rm -rf conftest*
2270 eval "ac_cv_lib_$ac_lib_var=yes"
2271else
2272 echo "configure: failed program was:" >&5
2273 cat conftest.$ac_ext >&5
2274 rm -rf conftest*
2275 eval "ac_cv_lib_$ac_lib_var=no"
2276fi
2277rm -f conftest*
2278LIBS="$ac_save_LIBS"
2279
2280fi
2281if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2282 echo "$ac_t""yes" 1>&6
2283 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
5da9ce07 2284echo "configure:2285: checking for gettext in libintl" >&5
b1df34b9
TT
2285if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2286 echo $ac_n "(cached) $ac_c" 1>&6
2287else
2288 cat > conftest.$ac_ext <<EOF
5da9ce07 2289#line 2290 "configure"
b1df34b9
TT
2290#include "confdefs.h"
2291
2292int main() {
2293return (int) gettext ("")
2294; return 0; }
2295EOF
5da9ce07 2296if { (eval echo configure:2297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b1df34b9
TT
2297 rm -rf conftest*
2298 gt_cv_func_gettext_libintl=yes
2299else
2300 echo "configure: failed program was:" >&5
2301 cat conftest.$ac_ext >&5
2302 rm -rf conftest*
2303 gt_cv_func_gettext_libintl=no
2304fi
2305rm -f conftest*
2306fi
2307
2308echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2309else
2310 echo "$ac_t""no" 1>&6
2311fi
2312
2313 fi
2314
2315 if test "$gt_cv_func_gettext_libc" = "yes" \
2316 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2317 cat >> confdefs.h <<\EOF
2318#define HAVE_GETTEXT 1
2319EOF
2320
2321 # Extract the first word of "msgfmt", so it can be a program name with args.
2322set dummy msgfmt; ac_word=$2
2323echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5da9ce07 2324echo "configure:2325: checking for $ac_word" >&5
b1df34b9
TT
2325if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2326 echo $ac_n "(cached) $ac_c" 1>&6
2327else
2328 case "$MSGFMT" in
2329 /*)
2330 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2331 ;;
2332 *)
2333 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2334 for ac_dir in $PATH; do
2335 test -z "$ac_dir" && ac_dir=.
2336 if test -f $ac_dir/$ac_word; then
2337 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2338 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2339 break
2340 fi
2341 fi
2342 done
2343 IFS="$ac_save_ifs"
2344 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2345 ;;
2346esac
2347fi
2348MSGFMT="$ac_cv_path_MSGFMT"
2349if test -n "$MSGFMT"; then
2350 echo "$ac_t""$MSGFMT" 1>&6
2351else
2352 echo "$ac_t""no" 1>&6
2353fi
2354 if test "$MSGFMT" != "no"; then
2355 for ac_func in dcgettext
2356do
2357echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5da9ce07 2358echo "configure:2359: checking for $ac_func" >&5
b1df34b9
TT
2359if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2360 echo $ac_n "(cached) $ac_c" 1>&6
2361else
2362 cat > conftest.$ac_ext <<EOF
5da9ce07 2363#line 2364 "configure"
b1df34b9
TT
2364#include "confdefs.h"
2365/* System header to define __stub macros and hopefully few prototypes,
2366 which can conflict with char $ac_func(); below. */
2367#include <assert.h>
2368/* Override any gcc2 internal prototype to avoid an error. */
2369/* We use char because int might match the return type of a gcc2
2370 builtin and then its argument prototype would still apply. */
2371char $ac_func();
2372
2373int main() {
2374
2375/* The GNU C library defines this for functions which it implements
2376 to always fail with ENOSYS. Some functions are actually named
2377 something starting with __ and the normal name is an alias. */
2378#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2379choke me
2380#else
2381$ac_func();
2382#endif
2383
2384; return 0; }
2385EOF
5da9ce07 2386if { (eval echo configure:2387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b1df34b9
TT
2387 rm -rf conftest*
2388 eval "ac_cv_func_$ac_func=yes"
2389else
2390 echo "configure: failed program was:" >&5
2391 cat conftest.$ac_ext >&5
2392 rm -rf conftest*
2393 eval "ac_cv_func_$ac_func=no"
2394fi
2395rm -f conftest*
2396fi
2397
2398if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2399 echo "$ac_t""yes" 1>&6
2400 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2401 cat >> confdefs.h <<EOF
2402#define $ac_tr_func 1
2403EOF
2404
2405else
2406 echo "$ac_t""no" 1>&6
2407fi
2408done
2409
2410 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2411set dummy gmsgfmt; ac_word=$2
2412echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5da9ce07 2413echo "configure:2414: checking for $ac_word" >&5
b1df34b9
TT
2414if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2415 echo $ac_n "(cached) $ac_c" 1>&6
2416else
2417 case "$GMSGFMT" in
2418 /*)
2419 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2420 ;;
2421 ?:/*)
2422 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2423 ;;
2424 *)
2425 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
295dbbe4
SG
2426 for ac_dir in $PATH; do
2427 test -z "$ac_dir" && ac_dir=.
2428 if test -f $ac_dir/$ac_word; then
b1df34b9 2429 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
295dbbe4
SG
2430 break
2431 fi
2432 done
2433 IFS="$ac_save_ifs"
b1df34b9
TT
2434 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2435 ;;
2436esac
295dbbe4 2437fi
b1df34b9
TT
2438GMSGFMT="$ac_cv_path_GMSGFMT"
2439if test -n "$GMSGFMT"; then
2440 echo "$ac_t""$GMSGFMT" 1>&6
2441else
2442 echo "$ac_t""no" 1>&6
295dbbe4 2443fi
b1df34b9
TT
2444
2445 # Extract the first word of "xgettext", so it can be a program name with args.
2446set dummy xgettext; ac_word=$2
2447echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5da9ce07 2448echo "configure:2449: checking for $ac_word" >&5
b1df34b9
TT
2449if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2450 echo $ac_n "(cached) $ac_c" 1>&6
2451else
2452 case "$XGETTEXT" in
2453 /*)
2454 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2455 ;;
2456 *)
2457 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2458 for ac_dir in $PATH; do
2459 test -z "$ac_dir" && ac_dir=.
2460 if test -f $ac_dir/$ac_word; then
2461 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2462 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2463 break
2464 fi
2465 fi
2466 done
2467 IFS="$ac_save_ifs"
2468 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2469 ;;
2470esac
2471fi
2472XGETTEXT="$ac_cv_path_XGETTEXT"
2473if test -n "$XGETTEXT"; then
2474 echo "$ac_t""$XGETTEXT" 1>&6
2475else
2476 echo "$ac_t""no" 1>&6
2477fi
2478
2479 cat > conftest.$ac_ext <<EOF
5da9ce07 2480#line 2481 "configure"
b1df34b9
TT
2481#include "confdefs.h"
2482
2483int main() {
2484extern int _nl_msg_cat_cntr;
2485 return _nl_msg_cat_cntr
2486; return 0; }
2487EOF
5da9ce07 2488if { (eval echo configure:2489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
b1df34b9
TT
2489 rm -rf conftest*
2490 CATOBJEXT=.gmo
2491 DATADIRNAME=share
2492else
2493 echo "configure: failed program was:" >&5
2494 cat conftest.$ac_ext >&5
2495 rm -rf conftest*
2496 CATOBJEXT=.mo
2497 DATADIRNAME=lib
2498fi
2499rm -f conftest*
2500 INSTOBJEXT=.mo
2501 fi
2502 fi
2503
2504else
2505 echo "$ac_t""no" 1>&6
2506fi
2507
2508
2509
2510 if test "$CATOBJEXT" = "NONE"; then
2511 nls_cv_use_gnu_gettext=yes
2512 fi
2513 fi
2514
2515 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2516 INTLOBJS="\$(GETTOBJS)"
2517 # Extract the first word of "msgfmt", so it can be a program name with args.
2518set dummy msgfmt; ac_word=$2
2519echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5da9ce07 2520echo "configure:2521: checking for $ac_word" >&5
b1df34b9
TT
2521if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2522 echo $ac_n "(cached) $ac_c" 1>&6
2523else
2524 case "$MSGFMT" in
2525 /*)
2526 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2527 ;;
2528 *)
2529 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2530 for ac_dir in $PATH; do
2531 test -z "$ac_dir" && ac_dir=.
2532 if test -f $ac_dir/$ac_word; then
2533 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2534 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2535 break
2536 fi
2537 fi
2538 done
2539 IFS="$ac_save_ifs"
2540 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2541 ;;
2542esac
2543fi
2544MSGFMT="$ac_cv_path_MSGFMT"
2545if test -n "$MSGFMT"; then
2546 echo "$ac_t""$MSGFMT" 1>&6
2547else
2548 echo "$ac_t""no" 1>&6
2549fi
2550
2551 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2552set dummy gmsgfmt; ac_word=$2
2553echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5da9ce07 2554echo "configure:2555: checking for $ac_word" >&5
b1df34b9
TT
2555if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2556 echo $ac_n "(cached) $ac_c" 1>&6
2557else
2558 case "$GMSGFMT" in
2559 /*)
2560 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2561 ;;
2562 ?:/*)
2563 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2564 ;;
2565 *)
2566 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2567 for ac_dir in $PATH; do
2568 test -z "$ac_dir" && ac_dir=.
2569 if test -f $ac_dir/$ac_word; then
2570 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2571 break
2572 fi
2573 done
2574 IFS="$ac_save_ifs"
2575 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2576 ;;
2577esac
2578fi
2579GMSGFMT="$ac_cv_path_GMSGFMT"
2580if test -n "$GMSGFMT"; then
2581 echo "$ac_t""$GMSGFMT" 1>&6
295dbbe4
SG
2582else
2583 echo "$ac_t""no" 1>&6
2584fi
2585
b1df34b9
TT
2586 # Extract the first word of "xgettext", so it can be a program name with args.
2587set dummy xgettext; ac_word=$2
2588echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5da9ce07 2589echo "configure:2590: checking for $ac_word" >&5
b1df34b9
TT
2590if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2591 echo $ac_n "(cached) $ac_c" 1>&6
2592else
2593 case "$XGETTEXT" in
2594 /*)
2595 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2596 ;;
2597 *)
2598 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2599 for ac_dir in $PATH; do
2600 test -z "$ac_dir" && ac_dir=.
2601 if test -f $ac_dir/$ac_word; then
2602 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2603 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2604 break
2605 fi
2606 fi
2607 done
2608 IFS="$ac_save_ifs"
2609 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2610 ;;
2611esac
2612fi
2613XGETTEXT="$ac_cv_path_XGETTEXT"
2614if test -n "$XGETTEXT"; then
2615 echo "$ac_t""$XGETTEXT" 1>&6
2616else
2617 echo "$ac_t""no" 1>&6
2618fi
2619
2620
2621 USE_INCLUDED_LIBINTL=yes
2622 CATOBJEXT=.gmo
2623 INSTOBJEXT=.mo
2624 DATADIRNAME=share
2625 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2626 INTLLIBS=$INTLDEPS
2627 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2628 nls_cv_header_intl=libintl.h
2629 nls_cv_header_libgt=libgettext.h
2630 fi
2631
2632 if test "$XGETTEXT" != ":"; then
2633 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2634 : ;
2635 else
2636 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2637 XGETTEXT=":"
2638 fi
2639 fi
2640
2641 # We need to process the po/ directory.
2642 POSUB=po
2643 else
2644 DATADIRNAME=share
2645 nls_cv_header_intl=libintl.h
2646 nls_cv_header_libgt=libgettext.h
2647 fi
2648
2649 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2650 # because some of the sources are only built for this goal.
2651 if test "$PACKAGE" = gettext; then
2652 USE_NLS=yes
2653 USE_INCLUDED_LIBINTL=yes
2654 fi
2655
2656 for lang in $ALL_LINGUAS; do
2657 GMOFILES="$GMOFILES $lang.gmo"
2658 POFILES="$POFILES $lang.po"
2659 done
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674 if test "x$CATOBJEXT" != "x"; then
2675 if test "x$ALL_LINGUAS" = "x"; then
2676 LINGUAS=
2677 else
2678 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
5da9ce07 2679echo "configure:2680: checking for catalogs to be installed" >&5
b1df34b9
TT
2680 NEW_LINGUAS=
2681 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2682 case "$ALL_LINGUAS" in
2683 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2684 esac
2685 done
2686 LINGUAS=$NEW_LINGUAS
2687 echo "$ac_t""$LINGUAS" 1>&6
2688 fi
2689
2690 if test -n "$LINGUAS"; then
2691 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2692 fi
2693 fi
2694
2695 if test $ac_cv_header_locale_h = yes; then
2696 INCLUDE_LOCALE_H="#include <locale.h>"
2697 else
2698 INCLUDE_LOCALE_H="\
2699/* The system does not provide the header <locale.h>. Take care yourself. */"
2700 fi
2701
2702
2703 if test -f $srcdir/po2tbl.sed.in; then
2704 if test "$CATOBJEXT" = ".cat"; then
2705 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2706echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
5da9ce07 2707echo "configure:2708: checking for linux/version.h" >&5
b1df34b9
TT
2708if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2709 echo $ac_n "(cached) $ac_c" 1>&6
2710else
2711 cat > conftest.$ac_ext <<EOF
5da9ce07 2712#line 2713 "configure"
b1df34b9
TT
2713#include "confdefs.h"
2714#include <linux/version.h>
2715EOF
2716ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5da9ce07 2717{ (eval echo configure:2718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b1df34b9
TT
2718ac_err=`grep -v '^ *+' conftest.out`
2719if test -z "$ac_err"; then
2720 rm -rf conftest*
2721 eval "ac_cv_header_$ac_safe=yes"
2722else
2723 echo "$ac_err" >&5
2724 echo "configure: failed program was:" >&5
2725 cat conftest.$ac_ext >&5
2726 rm -rf conftest*
2727 eval "ac_cv_header_$ac_safe=no"
2728fi
2729rm -f conftest*
2730fi
2731if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2732 echo "$ac_t""yes" 1>&6
2733 msgformat=linux
2734else
2735 echo "$ac_t""no" 1>&6
2736msgformat=xopen
2737fi
2738
2739
2740 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2741 fi
2742 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2743 $srcdir/po2tbl.sed.in > po2tbl.sed
2744 fi
2745
2746 if test "$PACKAGE" = "gettext"; then
2747 GT_NO="#NO#"
2748 GT_YES=
2749 else
2750 GT_NO=
2751 GT_YES="#YES#"
2752 fi
2753
2754
2755
2756 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2757
2758
2759 l=
2760
2761
2762 if test -d $srcdir/po; then
2763 test -d po || mkdir po
2764 if test "x$srcdir" != "x."; then
2765 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2766 posrcprefix="$srcdir/"
2767 else
2768 posrcprefix="../$srcdir/"
2769 fi
2770 else
2771 posrcprefix="../"
2772 fi
2773 rm -f po/POTFILES
2774 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2775 < $srcdir/po/POTFILES.in > po/POTFILES
2776 fi
2777
295dbbe4 2778
fbda74b1 2779# Check for common headers.
6fea4763
DE
2780# FIXME: Seems to me this can cause problems for i386-windows hosts.
2781# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
b1df34b9
TT
2782for ac_hdr in stdlib.h string.h strings.h unistd.h time.h
2783do
2784ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2785echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5da9ce07 2786echo "configure:2787: checking for $ac_hdr" >&5
b1df34b9
TT
2787if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2788 echo $ac_n "(cached) $ac_c" 1>&6
2789else
2790 cat > conftest.$ac_ext <<EOF
5da9ce07 2791#line 2792 "configure"
b1df34b9
TT
2792#include "confdefs.h"
2793#include <$ac_hdr>
2794EOF
2795ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5da9ce07 2796{ (eval echo configure:2797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b1df34b9
TT
2797ac_err=`grep -v '^ *+' conftest.out`
2798if test -z "$ac_err"; then
2799 rm -rf conftest*
2800 eval "ac_cv_header_$ac_safe=yes"
2801else
2802 echo "$ac_err" >&5
2803 echo "configure: failed program was:" >&5
2804 cat conftest.$ac_ext >&5
2805 rm -rf conftest*
2806 eval "ac_cv_header_$ac_safe=no"
2807fi
2808rm -f conftest*
2809fi
2810if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2811 echo "$ac_t""yes" 1>&6
2812 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2813 cat >> confdefs.h <<EOF
2814#define $ac_tr_hdr 1
2815EOF
2816
2817else
2818 echo "$ac_t""no" 1>&6
2819fi
2820done
2821
2822for ac_hdr in sys/time.h sys/resource.h
2823do
2824ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2825echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5da9ce07 2826echo "configure:2827: checking for $ac_hdr" >&5
b1df34b9
TT
2827if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2828 echo $ac_n "(cached) $ac_c" 1>&6
2829else
2830 cat > conftest.$ac_ext <<EOF
5da9ce07 2831#line 2832 "configure"
b1df34b9
TT
2832#include "confdefs.h"
2833#include <$ac_hdr>
2834EOF
2835ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5da9ce07 2836{ (eval echo configure:2837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
b1df34b9
TT
2837ac_err=`grep -v '^ *+' conftest.out`
2838if test -z "$ac_err"; then
2839 rm -rf conftest*
2840 eval "ac_cv_header_$ac_safe=yes"
2841else
2842 echo "$ac_err" >&5
2843 echo "configure: failed program was:" >&5
2844 cat conftest.$ac_ext >&5
2845 rm -rf conftest*
2846 eval "ac_cv_header_$ac_safe=no"
2847fi
2848rm -f conftest*
2849fi
2850if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2851 echo "$ac_t""yes" 1>&6
2852 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2853 cat >> confdefs.h <<EOF
2854#define $ac_tr_hdr 1
2855EOF
2856
2857else
2858 echo "$ac_t""no" 1>&6
2859fi
2860done
2861
2862for ac_hdr in fcntl.h fpu_control.h
fbda74b1 2863do
6fea4763 2864ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
fbda74b1 2865echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5da9ce07 2866echo "configure:2867: checking for $ac_hdr" >&5
fbda74b1
DE
2867if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2868 echo $ac_n "(cached) $ac_c" 1>&6
2869else
2870 cat > conftest.$ac_ext <<EOF
5da9ce07 2871#line 2872 "configure"
fbda74b1
DE
2872#include "confdefs.h"
2873#include <$ac_hdr>
2874EOF
2875ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5da9ce07 2876{ (eval echo configure:2877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
fbda74b1
DE
2877ac_err=`grep -v '^ *+' conftest.out`
2878if test -z "$ac_err"; then
2879 rm -rf conftest*
2880 eval "ac_cv_header_$ac_safe=yes"
2881else
2882 echo "$ac_err" >&5
6fea4763
DE
2883 echo "configure: failed program was:" >&5
2884 cat conftest.$ac_ext >&5
fbda74b1
DE
2885 rm -rf conftest*
2886 eval "ac_cv_header_$ac_safe=no"
2887fi
2888rm -f conftest*
2889fi
2890if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2891 echo "$ac_t""yes" 1>&6
6fea4763 2892 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
fbda74b1
DE
2893 cat >> confdefs.h <<EOF
2894#define $ac_tr_hdr 1
2895EOF
2896
2897else
2898 echo "$ac_t""no" 1>&6
2899fi
2900done
2901
b1df34b9 2902for ac_func in getrusage time sigaction __setfpucw
6fea4763
DE
2903do
2904echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5da9ce07 2905echo "configure:2906: checking for $ac_func" >&5
6fea4763
DE
2906if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2907 echo $ac_n "(cached) $ac_c" 1>&6
2908else
2909 cat > conftest.$ac_ext <<EOF
5da9ce07 2910#line 2911 "configure"
6fea4763
DE
2911#include "confdefs.h"
2912/* System header to define __stub macros and hopefully few prototypes,
2913 which can conflict with char $ac_func(); below. */
2914#include <assert.h>
2915/* Override any gcc2 internal prototype to avoid an error. */
2916/* We use char because int might match the return type of a gcc2
2917 builtin and then its argument prototype would still apply. */
2918char $ac_func();
2919
2920int main() {
2921
2922/* The GNU C library defines this for functions which it implements
2923 to always fail with ENOSYS. Some functions are actually named
2924 something starting with __ and the normal name is an alias. */
2925#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2926choke me
2927#else
2928$ac_func();
2929#endif
2930
2931; return 0; }
2932EOF
5da9ce07 2933if { (eval echo configure:2934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6fea4763
DE
2934 rm -rf conftest*
2935 eval "ac_cv_func_$ac_func=yes"
2936else
2937 echo "configure: failed program was:" >&5
2938 cat conftest.$ac_ext >&5
2939 rm -rf conftest*
2940 eval "ac_cv_func_$ac_func=no"
2941fi
2942rm -f conftest*
2943fi
2944
2945if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2946 echo "$ac_t""yes" 1>&6
2947 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2948 cat >> confdefs.h <<EOF
2949#define $ac_tr_func 1
2950EOF
2951
2952else
2953 echo "$ac_t""no" 1>&6
2954fi
2955done
2956
fbda74b1 2957
295dbbe4
SG
2958. ${srcdir}/../../bfd/configure.host
2959
2960
601fb8ae 2961
b1df34b9 2962USE_MAINTAINER_MODE=no
462cfbc4
DE
2963# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
2964if test "${enable_maintainer_mode+set}" = set; then
2965 enableval="$enable_maintainer_mode"
2966 case "${enableval}" in
b1df34b9 2967 yes) MAINT="" USE_MAINTAINER_MODE=yes ;;
462cfbc4
DE
2968 no) MAINT="#" ;;
2969 *) { echo "configure: error: "--enable-maintainer-mode does not take a value"" 1>&2; exit 1; }; MAINT="#" ;;
2970esac
2971if test x"$silent" != x"yes" && test x"$MAINT" = x""; then
2972 echo "Setting maintainer mode" 6>&1
2973fi
2974else
2975 MAINT="#"
2976fi
2977
2978
2979
601fb8ae
MM
2980# Check whether --enable-sim-bswap or --disable-sim-bswap was given.
2981if test "${enable_sim_bswap+set}" = set; then
2982 enableval="$enable_sim_bswap"
2983 case "${enableval}" in
a77aa7ec 2984 yes) sim_bswap="-DWITH_BSWAP=1 -DUSE_BSWAP=1";;
601fb8ae
MM
2985 no) sim_bswap="-DWITH_BSWAP=0";;
2986 *) { echo "configure: error: "--enable-sim-bswap does not take a value"" 1>&2; exit 1; }; sim_bswap="";;
2987esac
2988if test x"$silent" != x"yes" && test x"$sim_bswap" != x""; then
2989 echo "Setting bswap flags = $sim_bswap" 6>&1
2990fi
2991else
2992 sim_bswap=""
2993fi
2994
2995
2996
295dbbe4
SG
2997# Check whether --enable-sim-cflags or --disable-sim-cflags was given.
2998if test "${enable_sim_cflags+set}" = set; then
2999 enableval="$enable_sim_cflags"
3000 case "${enableval}" in
b1df34b9 3001 yes) sim_cflags="-O2 -fomit-frame-pointer";;
295dbbe4
SG
3002 trace) { echo "configure: error: "Please use --enable-sim-debug instead."" 1>&2; exit 1; }; sim_cflags="";;
3003 no) sim_cflags="";;
3004 *) sim_cflags=`echo "${enableval}" | sed -e "s/,/ /g"`;;
3005esac
3006if test x"$silent" != x"yes" && test x"$sim_cflags" != x""; then
3007 echo "Setting sim cflags = $sim_cflags" 6>&1
3008fi
3009else
3010 sim_cflags=""
3011fi
3012
3013
601fb8ae 3014
295dbbe4
SG
3015# Check whether --enable-sim-debug or --disable-sim-debug was given.
3016if test "${enable_sim_debug+set}" = set; then
3017 enableval="$enable_sim_debug"
3018 case "${enableval}" in
fbda74b1
DE
3019 yes) sim_debug="-DDEBUG=7 -DWITH_DEBUG=7";;
3020 no) sim_debug="-DDEBUG=0 -DWITH_DEBUG=0";;
3021 *) sim_debug="-DDEBUG='(${enableval})' -DWITH_DEBUG='(${enableval})'";;
295dbbe4
SG
3022esac
3023if test x"$silent" != x"yes" && test x"$sim_debug" != x""; then
3024 echo "Setting sim debug = $sim_debug" 6>&1
3025fi
3026else
3027 sim_debug=""
3028fi
3029
3030
601fb8ae 3031
a35e91c3
AC
3032# Check whether --enable-sim-stdio or --disable-sim-stdio was given.
3033if test "${enable_sim_stdio+set}" = set; then
3034 enableval="$enable_sim_stdio"
3035 case "${enableval}" in
3036 yes) sim_stdio="-DWITH_STDIO=DO_USE_STDIO";;
3037 no) sim_stdio="-DWITH_STDIO=DONT_USE_STDIO";;
3038 *) { echo "configure: error: "Unknown value $enableval passed to --enable-sim-stdio"" 1>&2; exit 1; }; sim_stdio="";;
3039esac
3040if test x"$silent" != x"yes" && test x"$sim_stdio" != x""; then
3041 echo "Setting stdio flags = $sim_stdio" 6>&1
3042fi
3043else
3044 sim_stdio=""
3045fi
a77aa7ec
AC
3046
3047
3048
295dbbe4
SG
3049# Check whether --enable-sim-trace or --disable-sim-trace was given.
3050if test "${enable_sim_trace+set}" = set; then
3051 enableval="$enable_sim_trace"
3052 case "${enableval}" in
6fea4763 3053 yes) sim_trace="-DTRACE=1 -DWITH_TRACE=-1";;
a77aa7ec 3054 no) sim_trace="-DTRACE=0 -DWITH_TRACE=0";;
6fea4763
DE
3055 [-0-9]*)
3056 sim_trace="-DTRACE='(${enableval})' -DWITH_TRACE='(${enableval})'";;
3057 [a-z]*)
3058 sim_trace=""
3059 for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
3060 if test x"$sim_trace" = x; then
3061 sim_trace="-DWITH_TRACE='(TRACE_$x"
3062 else
3063 sim_trace="${sim_trace}|TRACE_$x"
3064 fi
3065 done
3066 sim_trace="$sim_trace)'" ;;
295dbbe4
SG
3067esac
3068if test x"$silent" != x"yes" && test x"$sim_trace" != x""; then
3069 echo "Setting sim trace = $sim_trace" 6>&1
3070fi
3071else
3072 sim_trace=""
3073fi
3074
3075
295dbbe4 3076
6fea4763
DE
3077# Check whether --enable-sim-profile or --disable-sim-profile was given.
3078if test "${enable_sim_profile+set}" = set; then
3079 enableval="$enable_sim_profile"
3080 case "${enableval}" in
3081 yes) sim_profile="-DPROFILE=1 -DWITH_PROFILE=-1";;
3082 no) sim_profile="-DPROFILE=0 -DWITH_PROFILE=0";;
3083 [-0-9]*)
3084 sim_profile="-DPROFILE='(${enableval})' -DWITH_PROFILE='(${enableval})'";;
3085 [a-z]*)
3086 sim_profile=""
3087 for x in `echo "$enableval" | sed -e "s/,/ /g"`; do
3088 if test x"$sim_profile" = x; then
3089 sim_profile="-DWITH_PROFILE='(PROFILE_$x"
3090 else
3091 sim_profile="${sim_profile}|PROFILE_$x"
3092 fi
3093 done
3094 sim_profile="$sim_profile)'" ;;
3095esac
3096if test x"$silent" != x"yes" && test x"$sim_profile" != x""; then
3097 echo "Setting sim profile = $sim_profile" 6>&1
3098fi
3099else
3100 sim_profile=""
3101fi
3102
3103
3104
08db4a65 3105echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
5da9ce07 3106echo "configure:3107: checking return type of signal handlers" >&5
08db4a65
AC
3107if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3108 echo $ac_n "(cached) $ac_c" 1>&6
3109else
3110 cat > conftest.$ac_ext <<EOF
5da9ce07 3111#line 3112 "configure"
08db4a65
AC
3112#include "confdefs.h"
3113#include <sys/types.h>
3114#include <signal.h>
3115#ifdef signal
3116#undef signal
3117#endif
3118#ifdef __cplusplus
3119extern "C" void (*signal (int, void (*)(int)))(int);
3120#else
3121void (*signal ()) ();
3122#endif
3123
6fea4763 3124int main() {
08db4a65
AC
3125int i;
3126; return 0; }
3127EOF
5da9ce07 3128if { (eval echo configure:3129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
08db4a65
AC
3129 rm -rf conftest*
3130 ac_cv_type_signal=void
3131else
6fea4763
DE
3132 echo "configure: failed program was:" >&5
3133 cat conftest.$ac_ext >&5
08db4a65
AC
3134 rm -rf conftest*
3135 ac_cv_type_signal=int
3136fi
3137rm -f conftest*
08db4a65
AC
3138fi
3139
3140echo "$ac_t""$ac_cv_type_signal" 1>&6
3141cat >> confdefs.h <<EOF
3142#define RETSIGTYPE $ac_cv_type_signal
3143EOF
3144
3145
3146
3147
295dbbe4
SG
3148sim_link_files=
3149sim_link_links=
3150
3151sim_link_links=tconfig.h
3152if test -f ${srcdir}/tconfig.in
3153then
3154 sim_link_files=tconfig.in
3155else
3156 sim_link_files=../common/tconfig.in
3157fi
3158
601fb8ae 3159# targ-vals.def points to the libc macro description file.
295dbbe4 3160case "${target}" in
601fb8ae 3161*-*-*) TARG_VALS_DEF=../common/nltvals.def ;;
295dbbe4 3162esac
601fb8ae
MM
3163sim_link_files="${sim_link_files} ${TARG_VALS_DEF}"
3164sim_link_links="${sim_link_links} targ-vals.def"
295dbbe4
SG
3165
3166
3167
295dbbe4
SG
3168for ac_hdr in unistd.h
3169do
6fea4763 3170ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
295dbbe4 3171echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5da9ce07 3172echo "configure:3173: checking for $ac_hdr" >&5
295dbbe4
SG
3173if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3174 echo $ac_n "(cached) $ac_c" 1>&6
3175else
3176 cat > conftest.$ac_ext <<EOF
5da9ce07 3177#line 3178 "configure"
295dbbe4
SG
3178#include "confdefs.h"
3179#include <$ac_hdr>
3180EOF
3181ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5da9ce07 3182{ (eval echo configure:3183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
295dbbe4
SG
3183ac_err=`grep -v '^ *+' conftest.out`
3184if test -z "$ac_err"; then
3185 rm -rf conftest*
3186 eval "ac_cv_header_$ac_safe=yes"
3187else
3188 echo "$ac_err" >&5
6fea4763
DE
3189 echo "configure: failed program was:" >&5
3190 cat conftest.$ac_ext >&5
295dbbe4
SG
3191 rm -rf conftest*
3192 eval "ac_cv_header_$ac_safe=no"
3193fi
3194rm -f conftest*
3195fi
3196if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3197 echo "$ac_t""yes" 1>&6
6fea4763 3198 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
295dbbe4
SG
3199 cat >> confdefs.h <<EOF
3200#define $ac_tr_hdr 1
3201EOF
3202
3203else
3204 echo "$ac_t""no" 1>&6
3205fi
3206done
3207
3208
3209
24691f55 3210
601fb8ae 3211trap '' 1 2 15
24691f55
DE
3212cat > confcache <<\EOF
3213# This file is a shell script that caches the results of configure
3214# tests run on this system so they can be shared between configure
3215# scripts and configure runs. It is not useful on other systems.
3216# If it contains results you don't want to keep, you may remove or edit it.
3217#
3218# By default, configure uses ./config.cache as the cache file,
3219# creating it if it does not exist already. You can give configure
3220# the --cache-file=FILE option to use a different cache file; that is
3221# what configure does when it calls configure scripts in
3222# subdirectories, so they share the cache.
3223# Giving --cache-file=/dev/null disables caching, for debugging configure.
3224# config.status only pays attention to the cache file if you give it the
3225# --recheck option to rerun configure.
3226#
3227EOF
6fea4763
DE
3228# The following way of writing the cache mishandles newlines in values,
3229# but we know of no workaround that is simple, portable, and efficient.
3230# So, don't put newlines in cache variables' values.
24691f55
DE
3231# Ultrix sh set writes to stderr and can't be redirected directly,
3232# and sets the high bit in the cache file unless we assign to the vars.
3233(set) 2>&1 |
462cfbc4 3234 case `(ac_space=' '; set) 2>&1 | grep ac_space` in
6fea4763
DE
3235 *ac_space=\ *)
3236 # `set' does not quote correctly, so add quotes (double-quote substitution
3237 # turns \\\\ into \\, and sed turns \\ into \).
3238 sed -n \
3239 -e "s/'/'\\\\''/g" \
3240 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
3241 ;;
3242 *)
3243 # `set' quotes correctly as required by POSIX, so do not add quotes.
3244 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
3245 ;;
3246 esac >> confcache
24691f55
DE
3247if cmp -s $cache_file confcache; then
3248 :
3249else
3250 if test -w $cache_file; then
3251 echo "updating cache $cache_file"
3252 cat confcache > $cache_file
3253 else
3254 echo "not updating unwritable cache $cache_file"
3255 fi
3256fi
3257rm -f confcache
3258
3259trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3260
3261test "x$prefix" = xNONE && prefix=$ac_default_prefix
3262# Let make expand exec_prefix.
3263test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3264
3265# Any assignment to VPATH causes Sun make to only execute
3266# the first set of double-colon rules, so remove it if not needed.
3267# If there is a colon in the path, we need to keep it.
3268if test "x$srcdir" = x.; then
3269 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3270fi
3271
3272trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3273
295dbbe4 3274DEFS=-DHAVE_CONFIG_H
24691f55
DE
3275
3276# Without the "./", some shells look in PATH for config.status.
3277: ${CONFIG_STATUS=./config.status}
3278
3279echo creating $CONFIG_STATUS
3280rm -f $CONFIG_STATUS
3281cat > $CONFIG_STATUS <<EOF
3282#! /bin/sh
3283# Generated automatically by configure.
3284# Run this file to recreate the current configuration.
3285# This directory was configured as follows,
3286# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3287#
3288# $0 $ac_configure_args
3289#
3290# Compiler output produced by configure, useful for debugging
3291# configure, is in ./config.log if it exists.
3292
3293ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3294for ac_option
3295do
3296 case "\$ac_option" in
3297 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3298 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3299 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3300 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
462cfbc4 3301 echo "$CONFIG_STATUS generated by autoconf version 2.12.1"
24691f55
DE
3302 exit 0 ;;
3303 -help | --help | --hel | --he | --h)
3304 echo "\$ac_cs_usage"; exit 0 ;;
3305 *) echo "\$ac_cs_usage"; exit 1 ;;
3306 esac
3307done
3308
3309ac_given_srcdir=$srcdir
3310ac_given_INSTALL="$INSTALL"
3311
6fea4763 3312trap 'rm -fr `echo "Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
295dbbe4
SG
3313EOF
3314cat >> $CONFIG_STATUS <<EOF
24691f55 3315
295dbbe4
SG
3316# Protect against being on the right side of a sed subst in config.status.
3317sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3318 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24691f55
DE
3319$ac_vpsub
3320$extrasub
462cfbc4 3321s%@sim_environment@%$sim_environment%g
92f91d1f
AC
3322s%@sim_alignment@%$sim_alignment%g
3323s%@sim_assert@%$sim_assert%g
462cfbc4 3324s%@sim_bitsize@%$sim_bitsize%g
92f91d1f
AC
3325s%@sim_endian@%$sim_endian%g
3326s%@sim_hostendian@%$sim_hostendian%g
3327s%@sim_float@%$sim_float%g
3328s%@sim_scache@%$sim_scache%g
3329s%@sim_default_model@%$sim_default_model%g
3330s%@sim_hardware@%$sim_hardware%g
b1df34b9
TT
3331s%@sim_hw_obj@%$sim_hw_obj%g
3332s%@sim_hw@%$sim_hw%g
92f91d1f
AC
3333s%@sim_inline@%$sim_inline%g
3334s%@sim_packages@%$sim_packages%g
3335s%@sim_regparm@%$sim_regparm%g
3336s%@sim_reserved_bits@%$sim_reserved_bits%g
3337s%@sim_smp@%$sim_smp%g
3338s%@sim_stdcall@%$sim_stdcall%g
3339s%@sim_xor_endian@%$sim_xor_endian%g
3340s%@sim_warnings@%$sim_warnings%g
462cfbc4 3341s%@SHELL@%$SHELL%g
24691f55
DE
3342s%@CFLAGS@%$CFLAGS%g
3343s%@CPPFLAGS@%$CPPFLAGS%g
3344s%@CXXFLAGS@%$CXXFLAGS%g
3345s%@DEFS@%$DEFS%g
3346s%@LDFLAGS@%$LDFLAGS%g
3347s%@LIBS@%$LIBS%g
3348s%@exec_prefix@%$exec_prefix%g
3349s%@prefix@%$prefix%g
3350s%@program_transform_name@%$program_transform_name%g
295dbbe4
SG
3351s%@bindir@%$bindir%g
3352s%@sbindir@%$sbindir%g
3353s%@libexecdir@%$libexecdir%g
3354s%@datadir@%$datadir%g
3355s%@sysconfdir@%$sysconfdir%g
3356s%@sharedstatedir@%$sharedstatedir%g
3357s%@localstatedir@%$localstatedir%g
3358s%@libdir@%$libdir%g
3359s%@includedir@%$includedir%g
3360s%@oldincludedir@%$oldincludedir%g
3361s%@infodir@%$infodir%g
3362s%@mandir@%$mandir%g
24691f55
DE
3363s%@host@%$host%g
3364s%@host_alias@%$host_alias%g
3365s%@host_cpu@%$host_cpu%g
3366s%@host_vendor@%$host_vendor%g
3367s%@host_os@%$host_os%g
3368s%@target@%$target%g
3369s%@target_alias@%$target_alias%g
3370s%@target_cpu@%$target_cpu%g
3371s%@target_vendor@%$target_vendor%g
3372s%@target_os@%$target_os%g
3373s%@build@%$build%g
3374s%@build_alias@%$build_alias%g
3375s%@build_cpu@%$build_cpu%g
3376s%@build_vendor@%$build_vendor%g
3377s%@build_os@%$build_os%g
3378s%@CC@%$CC%g
295dbbe4
SG
3379s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3380s%@INSTALL_DATA@%$INSTALL_DATA%g
3381s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
24691f55
DE
3382s%@HDEFINES@%$HDEFINES%g
3383s%@AR@%$AR%g
3384s%@RANLIB@%$RANLIB%g
b1df34b9 3385s%@SET_MAKE@%$SET_MAKE%g
fbda74b1 3386s%@CPP@%$CPP%g
b1df34b9
TT
3387s%@ALLOCA@%$ALLOCA%g
3388s%@USE_NLS@%$USE_NLS%g
3389s%@MSGFMT@%$MSGFMT%g
3390s%@GMSGFMT@%$GMSGFMT%g
3391s%@XGETTEXT@%$XGETTEXT%g
3392s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
3393s%@CATALOGS@%$CATALOGS%g
3394s%@CATOBJEXT@%$CATOBJEXT%g
3395s%@DATADIRNAME@%$DATADIRNAME%g
3396s%@GMOFILES@%$GMOFILES%g
3397s%@INSTOBJEXT@%$INSTOBJEXT%g
3398s%@INTLDEPS@%$INTLDEPS%g
3399s%@INTLLIBS@%$INTLLIBS%g
3400s%@INTLOBJS@%$INTLOBJS%g
3401s%@POFILES@%$POFILES%g
3402s%@POSUB@%$POSUB%g
3403s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
3404s%@GT_NO@%$GT_NO%g
3405s%@GT_YES@%$GT_YES%g
3406s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
3407s%@l@%$l%g
462cfbc4 3408s%@MAINT@%$MAINT%g
601fb8ae 3409s%@sim_bswap@%$sim_bswap%g
295dbbe4
SG
3410s%@sim_cflags@%$sim_cflags%g
3411s%@sim_debug@%$sim_debug%g
a35e91c3 3412s%@sim_stdio@%$sim_stdio%g
295dbbe4 3413s%@sim_trace@%$sim_trace%g
6fea4763 3414s%@sim_profile@%$sim_profile%g
24691f55
DE
3415
3416CEOF
3417EOF
6fea4763
DE
3418
3419cat >> $CONFIG_STATUS <<\EOF
3420
3421# Split the substitutions into bite-sized pieces for seds with
3422# small command number limits, like on Digital OSF/1 and HP-UX.
3423ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
3424ac_file=1 # Number of current file.
3425ac_beg=1 # First line for current file.
3426ac_end=$ac_max_sed_cmds # Line after last line for current file.
3427ac_more_lines=:
3428ac_sed_cmds=""
3429while $ac_more_lines; do
3430 if test $ac_beg -gt 1; then
3431 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
3432 else
3433 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
3434 fi
3435 if test ! -s conftest.s$ac_file; then
3436 ac_more_lines=false
3437 rm -f conftest.s$ac_file
3438 else
3439 if test -z "$ac_sed_cmds"; then
3440 ac_sed_cmds="sed -f conftest.s$ac_file"
3441 else
3442 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
3443 fi
3444 ac_file=`expr $ac_file + 1`
3445 ac_beg=$ac_end
3446 ac_end=`expr $ac_end + $ac_max_sed_cmds`
3447 fi
3448done
3449if test -z "$ac_sed_cmds"; then
3450 ac_sed_cmds=cat
3451fi
3452EOF
3453
24691f55
DE
3454cat >> $CONFIG_STATUS <<EOF
3455
6fea4763 3456CONFIG_FILES=\${CONFIG_FILES-"Makefile.sim:Makefile.in Make-common.sim:../common/Make-common.in .gdbinit:../common/gdbinit.in"}
24691f55
DE
3457EOF
3458cat >> $CONFIG_STATUS <<\EOF
3459for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
6fea4763 3460 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24691f55 3461 case "$ac_file" in
6fea4763 3462 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24691f55
DE
3463 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3464 *) ac_file_in="${ac_file}.in" ;;
3465 esac
3466
6fea4763 3467 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24691f55
DE
3468
3469 # Remove last slash and all that follows it. Not all systems have dirname.
3470 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3471 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3472 # The file is in a subdirectory.
3473 test ! -d "$ac_dir" && mkdir "$ac_dir"
3474 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3475 # A "../" for each directory in $ac_dir_suffix.
3476 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3477 else
3478 ac_dir_suffix= ac_dots=
3479 fi
3480
3481 case "$ac_given_srcdir" in
3482 .) srcdir=.
3483 if test -z "$ac_dots"; then top_srcdir=.
3484 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3485 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3486 *) # Relative path.
3487 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3488 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3489 esac
3490
3491 case "$ac_given_INSTALL" in
3492 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3493 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3494 esac
6fea4763 3495
24691f55
DE
3496 echo creating "$ac_file"
3497 rm -f "$ac_file"
3498 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3499 case "$ac_file" in
3500 *Makefile*) ac_comsub="1i\\
3501# $configure_input" ;;
3502 *) ac_comsub= ;;
3503 esac
6fea4763
DE
3504
3505 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24691f55
DE
3506 sed -e "$ac_comsub
3507s%@configure_input@%$configure_input%g
3508s%@srcdir@%$srcdir%g
3509s%@top_srcdir@%$top_srcdir%g
3510s%@INSTALL@%$INSTALL%g
6fea4763 3511" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24691f55 3512fi; done
6fea4763 3513rm -f conftest.s*
295dbbe4
SG
3514
3515# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3516# NAME is the cpp macro being defined and VALUE is the value it is being given.
3517#
3518# ac_d sets the value in "#define NAME VALUE" lines.
3519ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3520ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3521ac_dC='\3'
3522ac_dD='%g'
3523# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3524ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3525ac_uB='\([ ]\)%\1#\2define\3'
3526ac_uC=' '
3527ac_uD='\4%g'
3528# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3529ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3530ac_eB='$%\1#\2define\3'
3531ac_eC=' '
3532ac_eD='%g'
3533
6fea4763
DE
3534if test "${CONFIG_HEADERS+set}" != set; then
3535EOF
3536cat >> $CONFIG_STATUS <<EOF
3537 CONFIG_HEADERS="config.h:config.in"
3538EOF
3539cat >> $CONFIG_STATUS <<\EOF
3540fi
295dbbe4 3541for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
6fea4763 3542 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
295dbbe4 3543 case "$ac_file" in
6fea4763 3544 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
295dbbe4
SG
3545 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3546 *) ac_file_in="${ac_file}.in" ;;
3547 esac
3548
3549 echo creating $ac_file
24691f55 3550
295dbbe4 3551 rm -f conftest.frag conftest.in conftest.out
6fea4763
DE
3552 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
3553 cat $ac_file_inputs > conftest.in
24691f55 3554
295dbbe4 3555EOF
24691f55 3556
295dbbe4
SG
3557# Transform confdefs.h into a sed script conftest.vals that substitutes
3558# the proper values into config.h.in to produce config.h. And first:
3559# Protect against being on the right side of a sed subst in config.status.
3560# Protect against being in an unquoted here document in config.status.
3561rm -f conftest.vals
3562cat > conftest.hdr <<\EOF
3563s/[\\&%]/\\&/g
3564s%[\\$`]%\\&%g
3565s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3566s%ac_d%ac_u%gp
3567s%ac_u%ac_e%gp
3568EOF
3569sed -n -f conftest.hdr confdefs.h > conftest.vals
3570rm -f conftest.hdr
3571
3572# This sed command replaces #undef with comments. This is necessary, for
3573# example, in the case of _POSIX_SOURCE, which is predefined and required
3574# on some systems where configure will not decide to define it.
3575cat >> conftest.vals <<\EOF
3576s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3577EOF
3578
3579# Break up conftest.vals because some shells have a limit on
3580# the size of here documents, and old seds have small limits too.
3581
3582rm -f conftest.tail
3583while :
3584do
3585 ac_lines=`grep -c . conftest.vals`
3586 # grep -c gives empty output for an empty file on some AIX systems.
3587 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3588 # Write a limited-size here document to conftest.frag.
3589 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3590 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3591 echo 'CEOF
3592 sed -f conftest.frag conftest.in > conftest.out
3593 rm -f conftest.in
3594 mv conftest.out conftest.in
3595' >> $CONFIG_STATUS
3596 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3597 rm -f conftest.vals
3598 mv conftest.tail conftest.vals
3599done
3600rm -f conftest.vals
3601
3602cat >> $CONFIG_STATUS <<\EOF
3603 rm -f conftest.frag conftest.h
3604 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3605 cat conftest.in >> conftest.h
3606 rm -f conftest.in
3607 if cmp -s $ac_file conftest.h 2>/dev/null; then
3608 echo "$ac_file is unchanged"
3609 rm -f conftest.h
3610 else
3611 # Remove last slash and all that follows it. Not all systems have dirname.
3612 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3613 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3614 # The file is in a subdirectory.
3615 test ! -d "$ac_dir" && mkdir "$ac_dir"
3616 fi
3617 rm -f $ac_file
3618 mv conftest.h $ac_file
3619 fi
3620fi; done
3621
3622EOF
3623
3624cat >> $CONFIG_STATUS <<EOF
3625ac_sources="$sim_link_files"
3626ac_dests="$sim_link_links"
3627EOF
3628
3629cat >> $CONFIG_STATUS <<\EOF
3630srcdir=$ac_given_srcdir
3631while test -n "$ac_sources"; do
3632 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
3633 set $ac_sources; ac_source=$1; shift; ac_sources=$*
3634
3635 echo "linking $srcdir/$ac_source to $ac_dest"
3636
3637 if test ! -r $srcdir/$ac_source; then
3638 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
3639 fi
3640 rm -f $ac_dest
3641
3642 # Make relative symlinks.
3643 # Remove last slash and all that follows it. Not all systems have dirname.
3644 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
3645 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
3646 # The dest file is in a subdirectory.
3647 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
3648 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
3649 # A "../" for each directory in $ac_dest_dir_suffix.
3650 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
3651 else
3652 ac_dest_dir_suffix= ac_dots=
3653 fi
3654
3655 case "$srcdir" in
3656 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
3657 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
3658 esac
3659
3660 # Make a symlink if possible; otherwise try a hard link.
3661 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
3662 ln $srcdir/$ac_source $ac_dest; then :
3663 else
3664 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
3665 fi
3666done
6fea4763
DE
3667EOF
3668cat >> $CONFIG_STATUS <<EOF
295dbbe4 3669
6fea4763
DE
3670EOF
3671cat >> $CONFIG_STATUS <<\EOF
3672case "x$CONFIG_FILES" in
3673 xMakefile*)
601fb8ae
MM
3674 echo "Merging Makefile.sim+Make-common.sim into Makefile ..."
3675 rm -f Makesim1.tmp Makesim2.tmp Makefile
3676 sed -n -e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ p' <Make-common.sim >Makesim1.tmp
3677 sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >Makesim2.tmp
3678 sed -e '/^## COMMON_PRE_/ r Makesim1.tmp' \
3679 -e '/^## COMMON_POST_/ r Makesim2.tmp' \
3680 <Makefile.sim >Makefile
3681 rm -f Makefile.sim Make-common.sim Makesim1.tmp Makesim2.tmp
3682 ;;
3683 esac
295dbbe4 3684 case "x$CONFIG_HEADERS" in xconfig.h:config.in) echo > stamp-h ;; esac
601fb8ae 3685
24691f55
DE
3686exit 0
3687EOF
3688chmod +x $CONFIG_STATUS
3689rm -fr confdefs* $ac_clean_files
3690test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3691
295dbbe4 3692
This page took 0.274272 seconds and 4 git commands to generate.