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