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