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