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