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