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