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