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