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