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