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