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