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