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