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