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