]> Git Repo - binutils.git/blob - gdb/configure
* acconfig.h (DEFAULT_BFD_ARCH, DEFAULT_BFD_VEC): Remove.
[binutils.git] / gdb / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13 
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6 #
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
9
10 # Defaults:
11 ac_help=
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
14 ac_help="$ac_help
15   --enable-maintainer-mode enable make rules and dependencies not useful
16                           (and sometimes confusing) to the casual installer"
17 ac_help="$ac_help
18   --disable-nls           do not use Native Language Support"
19 ac_help="$ac_help
20   --with-included-gettext use the GNU gettext library included here"
21 ac_help="$ac_help
22   --enable-multi-ice            Build the multi-ice-gdb-server"
23 ac_help="$ac_help
24   --disable-gdbcli        disable command-line interface (CLI)"
25 ac_help="$ac_help
26   --disable-gdbmi         disable machine-interface (MI)"
27 ac_help="$ac_help
28   --enable-tui            enable full-screen terminal user interface (TUI)"
29 ac_help="$ac_help
30   --without-included-regex don't use included regex; this is the default
31                           on systems with version 2 of the GNU C library
32                           (use with caution on other system)"
33 ac_help="$ac_help
34   --enable-netrom         Enable NetROM support"
35 ac_help="$ac_help
36   --enable-build-warnings Enable build-time compiler warnings if gcc is used"
37 ac_help="$ac_help
38   --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
39 ac_help="$ac_help
40   --with-mmalloc          Use memory mapped malloc package"
41 ac_help="$ac_help
42   --with-cpu=CPU          Set the default CPU variant to debug"
43 ac_help="$ac_help
44   --enable-gdbtk          Enable GDBTK GUI front end"
45 ac_help="$ac_help
46   --with-tclconfig=DIR    Directory containing tcl configuration (tclConfig.sh)"
47 ac_help="$ac_help
48   --with-tkconfig=DIR     Directory containing tk configuration (tkConfig.sh)"
49 ac_help="$ac_help
50   --with-tclinclude=DIR   Directory where tcl private headers are"
51 ac_help="$ac_help
52   --with-tkinclude=DIR    Directory where tk private headers are"
53 ac_help="$ac_help
54   --with-itclconfig       Directory containing itcl configuration (itclConfig.sh)"
55 ac_help="$ac_help
56   --with-itkconfig        Directory containing itk configuration (itkConfig.sh)"
57 ac_help="$ac_help
58   --with-x                use the X Window System"
59 ac_help="$ac_help
60   --enable-sim            Link gdb with simulator"
61 ac_help="$ac_help
62   --enable-shared         Use shared libraries"
63 ac_help="$ac_help
64   --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib"
65
66 # Initialize some variables set by options.
67 # The variables have the same names as the options, with
68 # dashes changed to underlines.
69 build=NONE
70 cache_file=./config.cache
71 exec_prefix=NONE
72 host=NONE
73 no_create=
74 nonopt=NONE
75 no_recursion=
76 prefix=NONE
77 program_prefix=NONE
78 program_suffix=NONE
79 program_transform_name=s,x,x,
80 silent=
81 site=
82 sitefile=
83 srcdir=
84 target=NONE
85 verbose=
86 x_includes=NONE
87 x_libraries=NONE
88 bindir='${exec_prefix}/bin'
89 sbindir='${exec_prefix}/sbin'
90 libexecdir='${exec_prefix}/libexec'
91 datadir='${prefix}/share'
92 sysconfdir='${prefix}/etc'
93 sharedstatedir='${prefix}/com'
94 localstatedir='${prefix}/var'
95 libdir='${exec_prefix}/lib'
96 includedir='${prefix}/include'
97 oldincludedir='/usr/include'
98 infodir='${prefix}/info'
99 mandir='${prefix}/man'
100
101 # Initialize some other variables.
102 subdirs=
103 MFLAGS= MAKEFLAGS=
104 SHELL=${CONFIG_SHELL-/bin/sh}
105 # Maximum number of lines to put in a shell here document.
106 ac_max_here_lines=12
107
108 ac_prev=
109 for ac_option
110 do
111
112   # If the previous option needs an argument, assign it.
113   if test -n "$ac_prev"; then
114     eval "$ac_prev=\$ac_option"
115     ac_prev=
116     continue
117   fi
118
119   case "$ac_option" in
120   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
121   *) ac_optarg= ;;
122   esac
123
124   # Accept the important Cygnus configure options, so we can diagnose typos.
125
126   case "$ac_option" in
127
128   -bindir | --bindir | --bindi | --bind | --bin | --bi)
129     ac_prev=bindir ;;
130   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
131     bindir="$ac_optarg" ;;
132
133   -build | --build | --buil | --bui | --bu)
134     ac_prev=build ;;
135   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
136     build="$ac_optarg" ;;
137
138   -cache-file | --cache-file | --cache-fil | --cache-fi \
139   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
140     ac_prev=cache_file ;;
141   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
142   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
143     cache_file="$ac_optarg" ;;
144
145   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
146     ac_prev=datadir ;;
147   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
148   | --da=*)
149     datadir="$ac_optarg" ;;
150
151   -disable-* | --disable-*)
152     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
153     # Reject names that are not valid shell variable names.
154     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
155       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
156     fi
157     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
158     eval "enable_${ac_feature}=no" ;;
159
160   -enable-* | --enable-*)
161     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
162     # Reject names that are not valid shell variable names.
163     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
164       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
165     fi
166     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
167     case "$ac_option" in
168       *=*) ;;
169       *) ac_optarg=yes ;;
170     esac
171     eval "enable_${ac_feature}='$ac_optarg'" ;;
172
173   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
174   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
175   | --exec | --exe | --ex)
176     ac_prev=exec_prefix ;;
177   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
178   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
179   | --exec=* | --exe=* | --ex=*)
180     exec_prefix="$ac_optarg" ;;
181
182   -gas | --gas | --ga | --g)
183     # Obsolete; use --with-gas.
184     with_gas=yes ;;
185
186   -help | --help | --hel | --he)
187     # Omit some internal or obsolete options to make the list less imposing.
188     # This message is too long to be a string in the A/UX 3.1 sh.
189     cat << EOF
190 Usage: configure [options] [host]
191 Options: [defaults in brackets after descriptions]
192 Configuration:
193   --cache-file=FILE       cache test results in FILE
194   --help                  print this message
195   --no-create             do not create output files
196   --quiet, --silent       do not print \`checking...' messages
197   --site-file=FILE        use FILE as the site file
198   --version               print the version of autoconf that created configure
199 Directory and file names:
200   --prefix=PREFIX         install architecture-independent files in PREFIX
201                           [$ac_default_prefix]
202   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
203                           [same as prefix]
204   --bindir=DIR            user executables in DIR [EPREFIX/bin]
205   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
206   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
207   --datadir=DIR           read-only architecture-independent data in DIR
208                           [PREFIX/share]
209   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
210   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
211                           [PREFIX/com]
212   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
213   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
214   --includedir=DIR        C header files in DIR [PREFIX/include]
215   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
216   --infodir=DIR           info documentation in DIR [PREFIX/info]
217   --mandir=DIR            man documentation in DIR [PREFIX/man]
218   --srcdir=DIR            find the sources in DIR [configure dir or ..]
219   --program-prefix=PREFIX prepend PREFIX to installed program names
220   --program-suffix=SUFFIX append SUFFIX to installed program names
221   --program-transform-name=PROGRAM
222                           run sed PROGRAM on installed program names
223 EOF
224     cat << EOF
225 Host type:
226   --build=BUILD           configure for building on BUILD [BUILD=HOST]
227   --host=HOST             configure for HOST [guessed]
228   --target=TARGET         configure for TARGET [TARGET=HOST]
229 Features and packages:
230   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
231   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
232   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
233   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
234   --x-includes=DIR        X include files are in DIR
235   --x-libraries=DIR       X library files are in DIR
236 EOF
237     if test -n "$ac_help"; then
238       echo "--enable and --with options recognized:$ac_help"
239     fi
240     exit 0 ;;
241
242   -host | --host | --hos | --ho)
243     ac_prev=host ;;
244   -host=* | --host=* | --hos=* | --ho=*)
245     host="$ac_optarg" ;;
246
247   -includedir | --includedir | --includedi | --included | --include \
248   | --includ | --inclu | --incl | --inc)
249     ac_prev=includedir ;;
250   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
251   | --includ=* | --inclu=* | --incl=* | --inc=*)
252     includedir="$ac_optarg" ;;
253
254   -infodir | --infodir | --infodi | --infod | --info | --inf)
255     ac_prev=infodir ;;
256   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
257     infodir="$ac_optarg" ;;
258
259   -libdir | --libdir | --libdi | --libd)
260     ac_prev=libdir ;;
261   -libdir=* | --libdir=* | --libdi=* | --libd=*)
262     libdir="$ac_optarg" ;;
263
264   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
265   | --libexe | --libex | --libe)
266     ac_prev=libexecdir ;;
267   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
268   | --libexe=* | --libex=* | --libe=*)
269     libexecdir="$ac_optarg" ;;
270
271   -localstatedir | --localstatedir | --localstatedi | --localstated \
272   | --localstate | --localstat | --localsta | --localst \
273   | --locals | --local | --loca | --loc | --lo)
274     ac_prev=localstatedir ;;
275   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
276   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
277   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
278     localstatedir="$ac_optarg" ;;
279
280   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
281     ac_prev=mandir ;;
282   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
283     mandir="$ac_optarg" ;;
284
285   -nfp | --nfp | --nf)
286     # Obsolete; use --without-fp.
287     with_fp=no ;;
288
289   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
290   | --no-cr | --no-c)
291     no_create=yes ;;
292
293   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
294   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
295     no_recursion=yes ;;
296
297   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
298   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
299   | --oldin | --oldi | --old | --ol | --o)
300     ac_prev=oldincludedir ;;
301   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
302   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
303   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
304     oldincludedir="$ac_optarg" ;;
305
306   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
307     ac_prev=prefix ;;
308   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
309     prefix="$ac_optarg" ;;
310
311   -program-prefix | --program-prefix | --program-prefi | --program-pref \
312   | --program-pre | --program-pr | --program-p)
313     ac_prev=program_prefix ;;
314   -program-prefix=* | --program-prefix=* | --program-prefi=* \
315   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
316     program_prefix="$ac_optarg" ;;
317
318   -program-suffix | --program-suffix | --program-suffi | --program-suff \
319   | --program-suf | --program-su | --program-s)
320     ac_prev=program_suffix ;;
321   -program-suffix=* | --program-suffix=* | --program-suffi=* \
322   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
323     program_suffix="$ac_optarg" ;;
324
325   -program-transform-name | --program-transform-name \
326   | --program-transform-nam | --program-transform-na \
327   | --program-transform-n | --program-transform- \
328   | --program-transform | --program-transfor \
329   | --program-transfo | --program-transf \
330   | --program-trans | --program-tran \
331   | --progr-tra | --program-tr | --program-t)
332     ac_prev=program_transform_name ;;
333   -program-transform-name=* | --program-transform-name=* \
334   | --program-transform-nam=* | --program-transform-na=* \
335   | --program-transform-n=* | --program-transform-=* \
336   | --program-transform=* | --program-transfor=* \
337   | --program-transfo=* | --program-transf=* \
338   | --program-trans=* | --program-tran=* \
339   | --progr-tra=* | --program-tr=* | --program-t=*)
340     program_transform_name="$ac_optarg" ;;
341
342   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
343   | -silent | --silent | --silen | --sile | --sil)
344     silent=yes ;;
345
346   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
347     ac_prev=sbindir ;;
348   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
349   | --sbi=* | --sb=*)
350     sbindir="$ac_optarg" ;;
351
352   -sharedstatedir | --sharedstatedir | --sharedstatedi \
353   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
354   | --sharedst | --shareds | --shared | --share | --shar \
355   | --sha | --sh)
356     ac_prev=sharedstatedir ;;
357   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
358   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
359   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
360   | --sha=* | --sh=*)
361     sharedstatedir="$ac_optarg" ;;
362
363   -site | --site | --sit)
364     ac_prev=site ;;
365   -site=* | --site=* | --sit=*)
366     site="$ac_optarg" ;;
367
368   -site-file | --site-file | --site-fil | --site-fi | --site-f)
369     ac_prev=sitefile ;;
370   -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
371     sitefile="$ac_optarg" ;;
372
373   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
374     ac_prev=srcdir ;;
375   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
376     srcdir="$ac_optarg" ;;
377
378   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
379   | --syscon | --sysco | --sysc | --sys | --sy)
380     ac_prev=sysconfdir ;;
381   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
382   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
383     sysconfdir="$ac_optarg" ;;
384
385   -target | --target | --targe | --targ | --tar | --ta | --t)
386     ac_prev=target ;;
387   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
388     target="$ac_optarg" ;;
389
390   -v | -verbose | --verbose | --verbos | --verbo | --verb)
391     verbose=yes ;;
392
393   -version | --version | --versio | --versi | --vers)
394     echo "configure generated by autoconf version 2.13"
395     exit 0 ;;
396
397   -with-* | --with-*)
398     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
399     # Reject names that are not valid shell variable names.
400     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
401       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
402     fi
403     ac_package=`echo $ac_package| sed 's/-/_/g'`
404     case "$ac_option" in
405       *=*) ;;
406       *) ac_optarg=yes ;;
407     esac
408     eval "with_${ac_package}='$ac_optarg'" ;;
409
410   -without-* | --without-*)
411     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
412     # Reject names that are not valid shell variable names.
413     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
414       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
415     fi
416     ac_package=`echo $ac_package| sed 's/-/_/g'`
417     eval "with_${ac_package}=no" ;;
418
419   --x)
420     # Obsolete; use --with-x.
421     with_x=yes ;;
422
423   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
424   | --x-incl | --x-inc | --x-in | --x-i)
425     ac_prev=x_includes ;;
426   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
427   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
428     x_includes="$ac_optarg" ;;
429
430   -x-libraries | --x-libraries | --x-librarie | --x-librari \
431   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
432     ac_prev=x_libraries ;;
433   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
434   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
435     x_libraries="$ac_optarg" ;;
436
437   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
438     ;;
439
440   *)
441     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
442       echo "configure: warning: $ac_option: invalid host type" 1>&2
443     fi
444     if test "x$nonopt" != xNONE; then
445       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
446     fi
447     nonopt="$ac_option"
448     ;;
449
450   esac
451 done
452
453 if test -n "$ac_prev"; then
454   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
455 fi
456
457 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
458
459 # File descriptor usage:
460 # 0 standard input
461 # 1 file creation
462 # 2 errors and warnings
463 # 3 some systems may open it to /dev/tty
464 # 4 used on the Kubota Titan
465 # 6 checking for... messages and results
466 # 5 compiler messages saved in config.log
467 if test "$silent" = yes; then
468   exec 6>/dev/null
469 else
470   exec 6>&1
471 fi
472 exec 5>./config.log
473
474 echo "\
475 This file contains any messages produced by compilers while
476 running configure, to aid debugging if configure makes a mistake.
477 " 1>&5
478
479 # Strip out --no-create and --no-recursion so they do not pile up.
480 # Also quote any args containing shell metacharacters.
481 ac_configure_args=
482 for ac_arg
483 do
484   case "$ac_arg" in
485   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
486   | --no-cr | --no-c) ;;
487   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
488   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
489   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
490   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
491   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
492   esac
493 done
494
495 # NLS nuisances.
496 # Only set these to C if already set.  These must not be set unconditionally
497 # because not all systems understand e.g. LANG=C (notably SCO).
498 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
499 # Non-C LC_CTYPE values break the ctype check.
500 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
501 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
502 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
503 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
504
505 # confdefs.h avoids OS command line length limits that DEFS can exceed.
506 rm -rf conftest* confdefs.h
507 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
508 echo > confdefs.h
509
510 # A filename unique to this package, relative to the directory that
511 # configure is in, which we can look for to find out if srcdir is correct.
512 ac_unique_file=main.c
513
514 # Find the source files, if location was not specified.
515 if test -z "$srcdir"; then
516   ac_srcdir_defaulted=yes
517   # Try the directory containing this script, then its parent.
518   ac_prog=$0
519   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
520   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
521   srcdir=$ac_confdir
522   if test ! -r $srcdir/$ac_unique_file; then
523     srcdir=..
524   fi
525 else
526   ac_srcdir_defaulted=no
527 fi
528 if test ! -r $srcdir/$ac_unique_file; then
529   if test "$ac_srcdir_defaulted" = yes; then
530     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
531   else
532     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
533   fi
534 fi
535 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
536
537 # Prefer explicitly selected file to automatically selected ones.
538 if test -z "$sitefile"; then
539   if test -z "$CONFIG_SITE"; then
540     if test "x$prefix" != xNONE; then
541       CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
542     else
543       CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
544     fi
545   fi
546 else
547   CONFIG_SITE="$sitefile"
548 fi
549 for ac_site_file in $CONFIG_SITE; do
550   if test -r "$ac_site_file"; then
551     echo "loading site script $ac_site_file"
552     . "$ac_site_file"
553   fi
554 done
555
556 if test -r "$cache_file"; then
557   echo "loading cache $cache_file"
558   . $cache_file
559 else
560   echo "creating cache $cache_file"
561   > $cache_file
562 fi
563
564 ac_ext=c
565 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
566 ac_cpp='$CPP $CPPFLAGS'
567 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
568 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
569 cross_compiling=$ac_cv_prog_cc_cross
570
571 ac_exeext=
572 ac_objext=o
573 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
574   # Stardent Vistra SVR4 grep lacks -e, says [email protected].
575   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
576     ac_n= ac_c='
577 ' ac_t='        '
578   else
579     ac_n=-n ac_c= ac_t=
580   fi
581 else
582   ac_n= ac_c='\c' ac_t=
583 fi
584
585
586
587 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
588 echo "configure:589: checking whether to enable maintainer-specific portions of Makefiles" >&5
589     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
590 if test "${enable_maintainer_mode+set}" = set; then
591   enableval="$enable_maintainer_mode"
592   USE_MAINTAINER_MODE=$enableval
593 else
594   USE_MAINTAINER_MODE=no
595 fi
596
597   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
598   
599
600 if test $USE_MAINTAINER_MODE = yes; then
601   MAINTAINER_MODE_TRUE=
602   MAINTAINER_MODE_FALSE='#'
603 else
604   MAINTAINER_MODE_TRUE='#'
605   MAINTAINER_MODE_FALSE=
606 fi
607   MAINT=$MAINTAINER_MODE_TRUE
608   
609
610
611 # Extract the first word of "gcc", so it can be a program name with args.
612 set dummy gcc; ac_word=$2
613 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
614 echo "configure:615: checking for $ac_word" >&5
615 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
616   echo $ac_n "(cached) $ac_c" 1>&6
617 else
618   if test -n "$CC"; then
619   ac_cv_prog_CC="$CC" # Let the user override the test.
620 else
621   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
622   ac_dummy="$PATH"
623   for ac_dir in $ac_dummy; do
624     test -z "$ac_dir" && ac_dir=.
625     if test -f $ac_dir/$ac_word; then
626       ac_cv_prog_CC="gcc"
627       break
628     fi
629   done
630   IFS="$ac_save_ifs"
631 fi
632 fi
633 CC="$ac_cv_prog_CC"
634 if test -n "$CC"; then
635   echo "$ac_t""$CC" 1>&6
636 else
637   echo "$ac_t""no" 1>&6
638 fi
639
640 if test -z "$CC"; then
641   # Extract the first word of "cc", so it can be a program name with args.
642 set dummy cc; ac_word=$2
643 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
644 echo "configure:645: checking for $ac_word" >&5
645 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
646   echo $ac_n "(cached) $ac_c" 1>&6
647 else
648   if test -n "$CC"; then
649   ac_cv_prog_CC="$CC" # Let the user override the test.
650 else
651   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
652   ac_prog_rejected=no
653   ac_dummy="$PATH"
654   for ac_dir in $ac_dummy; do
655     test -z "$ac_dir" && ac_dir=.
656     if test -f $ac_dir/$ac_word; then
657       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
658         ac_prog_rejected=yes
659         continue
660       fi
661       ac_cv_prog_CC="cc"
662       break
663     fi
664   done
665   IFS="$ac_save_ifs"
666 if test $ac_prog_rejected = yes; then
667   # We found a bogon in the path, so make sure we never use it.
668   set dummy $ac_cv_prog_CC
669   shift
670   if test $# -gt 0; then
671     # We chose a different compiler from the bogus one.
672     # However, it has the same basename, so the bogon will be chosen
673     # first if we set CC to just the basename; use the full file name.
674     shift
675     set dummy "$ac_dir/$ac_word" "$@"
676     shift
677     ac_cv_prog_CC="$@"
678   fi
679 fi
680 fi
681 fi
682 CC="$ac_cv_prog_CC"
683 if test -n "$CC"; then
684   echo "$ac_t""$CC" 1>&6
685 else
686   echo "$ac_t""no" 1>&6
687 fi
688
689   if test -z "$CC"; then
690     case "`uname -s`" in
691     *win32* | *WIN32*)
692       # Extract the first word of "cl", so it can be a program name with args.
693 set dummy cl; ac_word=$2
694 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
695 echo "configure:696: checking for $ac_word" >&5
696 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
697   echo $ac_n "(cached) $ac_c" 1>&6
698 else
699   if test -n "$CC"; then
700   ac_cv_prog_CC="$CC" # Let the user override the test.
701 else
702   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
703   ac_dummy="$PATH"
704   for ac_dir in $ac_dummy; do
705     test -z "$ac_dir" && ac_dir=.
706     if test -f $ac_dir/$ac_word; then
707       ac_cv_prog_CC="cl"
708       break
709     fi
710   done
711   IFS="$ac_save_ifs"
712 fi
713 fi
714 CC="$ac_cv_prog_CC"
715 if test -n "$CC"; then
716   echo "$ac_t""$CC" 1>&6
717 else
718   echo "$ac_t""no" 1>&6
719 fi
720  ;;
721     esac
722   fi
723   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
724 fi
725
726 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
727 echo "configure:728: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
728
729 ac_ext=c
730 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
731 ac_cpp='$CPP $CPPFLAGS'
732 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
733 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
734 cross_compiling=$ac_cv_prog_cc_cross
735
736 cat > conftest.$ac_ext << EOF
737
738 #line 739 "configure"
739 #include "confdefs.h"
740
741 main(){return(0);}
742 EOF
743 if { (eval echo configure:744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
744   ac_cv_prog_cc_works=yes
745   # If we can't run a trivial program, we are probably using a cross compiler.
746   if (./conftest; exit) 2>/dev/null; then
747     ac_cv_prog_cc_cross=no
748   else
749     ac_cv_prog_cc_cross=yes
750   fi
751 else
752   echo "configure: failed program was:" >&5
753   cat conftest.$ac_ext >&5
754   ac_cv_prog_cc_works=no
755 fi
756 rm -fr conftest*
757 ac_ext=c
758 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
759 ac_cpp='$CPP $CPPFLAGS'
760 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
761 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
762 cross_compiling=$ac_cv_prog_cc_cross
763
764 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
765 if test $ac_cv_prog_cc_works = no; then
766   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
767 fi
768 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
769 echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
770 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
771 cross_compiling=$ac_cv_prog_cc_cross
772
773 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
774 echo "configure:775: checking whether we are using GNU C" >&5
775 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
776   echo $ac_n "(cached) $ac_c" 1>&6
777 else
778   cat > conftest.c <<EOF
779 #ifdef __GNUC__
780   yes;
781 #endif
782 EOF
783 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
784   ac_cv_prog_gcc=yes
785 else
786   ac_cv_prog_gcc=no
787 fi
788 fi
789
790 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
791
792 if test $ac_cv_prog_gcc = yes; then
793   GCC=yes
794 else
795   GCC=
796 fi
797
798 ac_test_CFLAGS="${CFLAGS+set}"
799 ac_save_CFLAGS="$CFLAGS"
800 CFLAGS=
801 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
802 echo "configure:803: checking whether ${CC-cc} accepts -g" >&5
803 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
804   echo $ac_n "(cached) $ac_c" 1>&6
805 else
806   echo 'void f(){}' > conftest.c
807 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
808   ac_cv_prog_cc_g=yes
809 else
810   ac_cv_prog_cc_g=no
811 fi
812 rm -f conftest*
813
814 fi
815
816 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
817 if test "$ac_test_CFLAGS" = set; then
818   CFLAGS="$ac_save_CFLAGS"
819 elif test $ac_cv_prog_cc_g = yes; then
820   if test "$GCC" = yes; then
821     CFLAGS="-g -O2"
822   else
823     CFLAGS="-g"
824   fi
825 else
826   if test "$GCC" = yes; then
827     CFLAGS="-O2"
828   else
829     CFLAGS=
830   fi
831 fi
832
833 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
834 echo "configure:835: checking how to run the C preprocessor" >&5
835 # On Suns, sometimes $CPP names a directory.
836 if test -n "$CPP" && test -d "$CPP"; then
837   CPP=
838 fi
839 if test -z "$CPP"; then
840 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
841   echo $ac_n "(cached) $ac_c" 1>&6
842 else
843     # This must be in double quotes, not single quotes, because CPP may get
844   # substituted into the Makefile and "${CC-cc}" will confuse make.
845   CPP="${CC-cc} -E"
846   # On the NeXT, cc -E runs the code through the compiler's parser,
847   # not just through cpp.
848   cat > conftest.$ac_ext <<EOF
849 #line 850 "configure"
850 #include "confdefs.h"
851 #include <assert.h>
852 Syntax Error
853 EOF
854 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
855 { (eval echo configure:856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
856 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
857 if test -z "$ac_err"; then
858   :
859 else
860   echo "$ac_err" >&5
861   echo "configure: failed program was:" >&5
862   cat conftest.$ac_ext >&5
863   rm -rf conftest*
864   CPP="${CC-cc} -E -traditional-cpp"
865   cat > conftest.$ac_ext <<EOF
866 #line 867 "configure"
867 #include "confdefs.h"
868 #include <assert.h>
869 Syntax Error
870 EOF
871 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
872 { (eval echo configure:873: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
873 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
874 if test -z "$ac_err"; then
875   :
876 else
877   echo "$ac_err" >&5
878   echo "configure: failed program was:" >&5
879   cat conftest.$ac_ext >&5
880   rm -rf conftest*
881   CPP="${CC-cc} -nologo -E"
882   cat > conftest.$ac_ext <<EOF
883 #line 884 "configure"
884 #include "confdefs.h"
885 #include <assert.h>
886 Syntax Error
887 EOF
888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
889 { (eval echo configure:890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
891 if test -z "$ac_err"; then
892   :
893 else
894   echo "$ac_err" >&5
895   echo "configure: failed program was:" >&5
896   cat conftest.$ac_ext >&5
897   rm -rf conftest*
898   CPP=/lib/cpp
899 fi
900 rm -f conftest*
901 fi
902 rm -f conftest*
903 fi
904 rm -f conftest*
905   ac_cv_prog_CPP="$CPP"
906 fi
907   CPP="$ac_cv_prog_CPP"
908 else
909   ac_cv_prog_CPP="$CPP"
910 fi
911 echo "$ac_t""$CPP" 1>&6
912
913 echo $ac_n "checking for AIX""... $ac_c" 1>&6
914 echo "configure:915: checking for AIX" >&5
915 cat > conftest.$ac_ext <<EOF
916 #line 917 "configure"
917 #include "confdefs.h"
918 #ifdef _AIX
919   yes
920 #endif
921
922 EOF
923 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
924   egrep "yes" >/dev/null 2>&1; then
925   rm -rf conftest*
926   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
927 #define _ALL_SOURCE 1
928 EOF
929
930 else
931   rm -rf conftest*
932   echo "$ac_t""no" 1>&6
933 fi
934 rm -f conftest*
935
936
937 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
938 echo "configure:939: checking for POSIXized ISC" >&5
939 if test -d /etc/conf/kconfig.d &&
940   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
941 then
942   echo "$ac_t""yes" 1>&6
943   ISC=yes # If later tests want to check for ISC.
944   cat >> confdefs.h <<\EOF
945 #define _POSIX_SOURCE 1
946 EOF
947
948   if test "$GCC" = yes; then
949     CC="$CC -posix"
950   else
951     CC="$CC -Xp"
952   fi
953 else
954   echo "$ac_t""no" 1>&6
955   ISC=
956 fi
957
958
959
960
961 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
962 echo "configure:963: checking for ${CC-cc} option to accept ANSI C" >&5
963 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
964   echo $ac_n "(cached) $ac_c" 1>&6
965 else
966   am_cv_prog_cc_stdc=no
967 ac_save_CC="$CC"
968 # Don't try gcc -ansi; that turns off useful extensions and
969 # breaks some systems' header files.
970 # AIX                   -qlanglvl=ansi
971 # Ultrix and OSF/1      -std1
972 # HP-UX 10.20 and later -Ae
973 # HP-UX older versions  -Aa -D_HPUX_SOURCE
974 # SVR4                  -Xc -D__EXTENSIONS__
975 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
976 do
977   CC="$ac_save_CC $ac_arg"
978   cat > conftest.$ac_ext <<EOF
979 #line 980 "configure"
980 #include "confdefs.h"
981 #include <stdarg.h>
982 #include <stdio.h>
983 #include <sys/types.h>
984 #include <sys/stat.h>
985 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
986 struct buf { int x; };
987 FILE * (*rcsopen) (struct buf *, struct stat *, int);
988 static char *e (p, i)
989      char **p;
990      int i;
991 {
992   return p[i];
993 }
994 static char *f (char * (*g) (char **, int), char **p, ...)
995 {
996   char *s;
997   va_list v;
998   va_start (v,p);
999   s = g (p, va_arg (v,int));
1000   va_end (v);
1001   return s;
1002 }
1003 int test (int i, double x);
1004 struct s1 {int (*f) (int a);};
1005 struct s2 {int (*f) (double a);};
1006 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1007 int argc;
1008 char **argv;
1009
1010 int main() {
1011
1012 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1013
1014 ; return 0; }
1015 EOF
1016 if { (eval echo configure:1017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1017   rm -rf conftest*
1018   am_cv_prog_cc_stdc="$ac_arg"; break
1019 else
1020   echo "configure: failed program was:" >&5
1021   cat conftest.$ac_ext >&5
1022 fi
1023 rm -f conftest*
1024 done
1025 CC="$ac_save_CC"
1026
1027 fi
1028
1029 if test -z "$am_cv_prog_cc_stdc"; then
1030   echo "$ac_t""none needed" 1>&6
1031 else
1032   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1033 fi
1034 case "x$am_cv_prog_cc_stdc" in
1035   x|xno) ;;
1036   *) CC="$CC $am_cv_prog_cc_stdc" ;;
1037 esac
1038
1039
1040 ac_aux_dir=
1041 for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1042   if test -f $ac_dir/install-sh; then
1043     ac_aux_dir=$ac_dir
1044     ac_install_sh="$ac_aux_dir/install-sh -c"
1045     break
1046   elif test -f $ac_dir/install.sh; then
1047     ac_aux_dir=$ac_dir
1048     ac_install_sh="$ac_aux_dir/install.sh -c"
1049     break
1050   fi
1051 done
1052 if test -z "$ac_aux_dir"; then
1053   { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1054 fi
1055 ac_config_guess=$ac_aux_dir/config.guess
1056 ac_config_sub=$ac_aux_dir/config.sub
1057 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1058
1059
1060 # Do some error checking and defaulting for the host and target type.
1061 # The inputs are:
1062 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1063 #
1064 # The rules are:
1065 # 1. You are not allowed to specify --host, --target, and nonopt at the
1066 #    same time.
1067 # 2. Host defaults to nonopt.
1068 # 3. If nonopt is not specified, then host defaults to the current host,
1069 #    as determined by config.guess.
1070 # 4. Target and build default to nonopt.
1071 # 5. If nonopt is not specified, then target and build default to host.
1072
1073 # The aliases save the names the user supplied, while $host etc.
1074 # will get canonicalized.
1075 case $host---$target---$nonopt in
1076 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1077 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1078 esac
1079
1080
1081 # Make sure we can run config.sub.
1082 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1083 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1084 fi
1085
1086 echo $ac_n "checking host system type""... $ac_c" 1>&6
1087 echo "configure:1088: checking host system type" >&5
1088
1089 host_alias=$host
1090 case "$host_alias" in
1091 NONE)
1092   case $nonopt in
1093   NONE)
1094     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1095     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1096     fi ;;
1097   *) host_alias=$nonopt ;;
1098   esac ;;
1099 esac
1100
1101 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1102 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1103 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1104 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1105 echo "$ac_t""$host" 1>&6
1106
1107 echo $ac_n "checking target system type""... $ac_c" 1>&6
1108 echo "configure:1109: checking target system type" >&5
1109
1110 target_alias=$target
1111 case "$target_alias" in
1112 NONE)
1113   case $nonopt in
1114   NONE) target_alias=$host_alias ;;
1115   *) target_alias=$nonopt ;;
1116   esac ;;
1117 esac
1118
1119 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1120 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1121 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1122 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1123 echo "$ac_t""$target" 1>&6
1124
1125 echo $ac_n "checking build system type""... $ac_c" 1>&6
1126 echo "configure:1127: checking build system type" >&5
1127
1128 build_alias=$build
1129 case "$build_alias" in
1130 NONE)
1131   case $nonopt in
1132   NONE) build_alias=$host_alias ;;
1133   *) build_alias=$nonopt ;;
1134   esac ;;
1135 esac
1136
1137 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1138 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1139 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1140 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1141 echo "$ac_t""$build" 1>&6
1142
1143 test "$host_alias" != "$target_alias" &&
1144   test "$program_prefix$program_suffix$program_transform_name" = \
1145     NONENONEs,x,x, &&
1146   program_prefix=${target_alias}-
1147
1148
1149 # FIXME: kettenis/20030102: The AC_PROG_RANLIB from Autoconf 2.13
1150 # doesn't support cross-compilation, but the one from Autoconf 2.5x
1151 # does.  Override RANLIB here (i.e. before running AC_PROG_RANLIB) to
1152 # deal with the lossage.  Note that CY_GNU_GETTEXT currently calls
1153 # AC_PROG_RANLIB.  This can be removed when we switch to # Autoconf
1154 # 2.5x.
1155 if test $host != $build; then
1156   ac_tool_prefix=${host_alias}-
1157 else
1158   ac_tool_prefix=
1159 fi
1160
1161 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1162 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1163 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1164 echo "configure:1165: checking for $ac_word" >&5
1165 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1166   echo $ac_n "(cached) $ac_c" 1>&6
1167 else
1168   if test -n "$RANLIB"; then
1169   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1170 else
1171   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1172   ac_dummy="$PATH"
1173   for ac_dir in $ac_dummy; do
1174     test -z "$ac_dir" && ac_dir=.
1175     if test -f $ac_dir/$ac_word; then
1176       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1177       break
1178     fi
1179   done
1180   IFS="$ac_save_ifs"
1181 fi
1182 fi
1183 RANLIB="$ac_cv_prog_RANLIB"
1184 if test -n "$RANLIB"; then
1185   echo "$ac_t""$RANLIB" 1>&6
1186 else
1187   echo "$ac_t""no" 1>&6
1188 fi
1189
1190
1191 if test -z "$ac_cv_prog_RANLIB"; then
1192 if test -n "$ac_tool_prefix"; then
1193   # Extract the first word of "ranlib", so it can be a program name with args.
1194 set dummy ranlib; ac_word=$2
1195 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1196 echo "configure:1197: checking for $ac_word" >&5
1197 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1198   echo $ac_n "(cached) $ac_c" 1>&6
1199 else
1200   if test -n "$RANLIB"; then
1201   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1202 else
1203   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1204   ac_dummy="$PATH"
1205   for ac_dir in $ac_dummy; do
1206     test -z "$ac_dir" && ac_dir=.
1207     if test -f $ac_dir/$ac_word; then
1208       ac_cv_prog_RANLIB="ranlib"
1209       break
1210     fi
1211   done
1212   IFS="$ac_save_ifs"
1213   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1214 fi
1215 fi
1216 RANLIB="$ac_cv_prog_RANLIB"
1217 if test -n "$RANLIB"; then
1218   echo "$ac_t""$RANLIB" 1>&6
1219 else
1220   echo "$ac_t""no" 1>&6
1221 fi
1222
1223 else
1224   RANLIB=":"
1225 fi
1226 fi
1227
1228
1229 ALL_LINGUAS=
1230 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1231 echo "configure:1232: checking whether ${MAKE-make} sets \${MAKE}" >&5
1232 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1233 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1234   echo $ac_n "(cached) $ac_c" 1>&6
1235 else
1236   cat > conftestmake <<\EOF
1237 all:
1238         @echo 'ac_maketemp="${MAKE}"'
1239 EOF
1240 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1241 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1242 if test -n "$ac_maketemp"; then
1243   eval ac_cv_prog_make_${ac_make}_set=yes
1244 else
1245   eval ac_cv_prog_make_${ac_make}_set=no
1246 fi
1247 rm -f conftestmake
1248 fi
1249 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1250   echo "$ac_t""yes" 1>&6
1251   SET_MAKE=
1252 else
1253   echo "$ac_t""no" 1>&6
1254   SET_MAKE="MAKE=${MAKE-make}"
1255 fi
1256
1257 # Extract the first word of "ranlib", so it can be a program name with args.
1258 set dummy ranlib; ac_word=$2
1259 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1260 echo "configure:1261: checking for $ac_word" >&5
1261 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1262   echo $ac_n "(cached) $ac_c" 1>&6
1263 else
1264   if test -n "$RANLIB"; then
1265   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1266 else
1267   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1268   ac_dummy="$PATH"
1269   for ac_dir in $ac_dummy; do
1270     test -z "$ac_dir" && ac_dir=.
1271     if test -f $ac_dir/$ac_word; then
1272       ac_cv_prog_RANLIB="ranlib"
1273       break
1274     fi
1275   done
1276   IFS="$ac_save_ifs"
1277   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1278 fi
1279 fi
1280 RANLIB="$ac_cv_prog_RANLIB"
1281 if test -n "$RANLIB"; then
1282   echo "$ac_t""$RANLIB" 1>&6
1283 else
1284   echo "$ac_t""no" 1>&6
1285 fi
1286
1287 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1288 echo "configure:1289: checking for ANSI C header files" >&5
1289 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1290   echo $ac_n "(cached) $ac_c" 1>&6
1291 else
1292   cat > conftest.$ac_ext <<EOF
1293 #line 1294 "configure"
1294 #include "confdefs.h"
1295 #include <stdlib.h>
1296 #include <stdarg.h>
1297 #include <string.h>
1298 #include <float.h>
1299 EOF
1300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1301 { (eval echo configure:1302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1303 if test -z "$ac_err"; then
1304   rm -rf conftest*
1305   ac_cv_header_stdc=yes
1306 else
1307   echo "$ac_err" >&5
1308   echo "configure: failed program was:" >&5
1309   cat conftest.$ac_ext >&5
1310   rm -rf conftest*
1311   ac_cv_header_stdc=no
1312 fi
1313 rm -f conftest*
1314
1315 if test $ac_cv_header_stdc = yes; then
1316   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1317 cat > conftest.$ac_ext <<EOF
1318 #line 1319 "configure"
1319 #include "confdefs.h"
1320 #include <string.h>
1321 EOF
1322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1323   egrep "memchr" >/dev/null 2>&1; then
1324   :
1325 else
1326   rm -rf conftest*
1327   ac_cv_header_stdc=no
1328 fi
1329 rm -f conftest*
1330
1331 fi
1332
1333 if test $ac_cv_header_stdc = yes; then
1334   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1335 cat > conftest.$ac_ext <<EOF
1336 #line 1337 "configure"
1337 #include "confdefs.h"
1338 #include <stdlib.h>
1339 EOF
1340 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1341   egrep "free" >/dev/null 2>&1; then
1342   :
1343 else
1344   rm -rf conftest*
1345   ac_cv_header_stdc=no
1346 fi
1347 rm -f conftest*
1348
1349 fi
1350
1351 if test $ac_cv_header_stdc = yes; then
1352   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1353 if test "$cross_compiling" = yes; then
1354   :
1355 else
1356   cat > conftest.$ac_ext <<EOF
1357 #line 1358 "configure"
1358 #include "confdefs.h"
1359 #include <ctype.h>
1360 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1361 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1362 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1363 int main () { int i; for (i = 0; i < 256; i++)
1364 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1365 exit (0); }
1366
1367 EOF
1368 if { (eval echo configure:1369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1369 then
1370   :
1371 else
1372   echo "configure: failed program was:" >&5
1373   cat conftest.$ac_ext >&5
1374   rm -fr conftest*
1375   ac_cv_header_stdc=no
1376 fi
1377 rm -fr conftest*
1378 fi
1379
1380 fi
1381 fi
1382
1383 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1384 if test $ac_cv_header_stdc = yes; then
1385   cat >> confdefs.h <<\EOF
1386 #define STDC_HEADERS 1
1387 EOF
1388
1389 fi
1390
1391 echo $ac_n "checking for working const""... $ac_c" 1>&6
1392 echo "configure:1393: checking for working const" >&5
1393 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1394   echo $ac_n "(cached) $ac_c" 1>&6
1395 else
1396   cat > conftest.$ac_ext <<EOF
1397 #line 1398 "configure"
1398 #include "confdefs.h"
1399
1400 int main() {
1401
1402 /* Ultrix mips cc rejects this.  */
1403 typedef int charset[2]; const charset x;
1404 /* SunOS 4.1.1 cc rejects this.  */
1405 char const *const *ccp;
1406 char **p;
1407 /* NEC SVR4.0.2 mips cc rejects this.  */
1408 struct point {int x, y;};
1409 static struct point const zero = {0,0};
1410 /* AIX XL C 1.02.0.0 rejects this.
1411    It does not let you subtract one const X* pointer from another in an arm
1412    of an if-expression whose if-part is not a constant expression */
1413 const char *g = "string";
1414 ccp = &g + (g ? g-g : 0);
1415 /* HPUX 7.0 cc rejects these. */
1416 ++ccp;
1417 p = (char**) ccp;
1418 ccp = (char const *const *) p;
1419 { /* SCO 3.2v4 cc rejects this.  */
1420   char *t;
1421   char const *s = 0 ? (char *) 0 : (char const *) 0;
1422
1423   *t++ = 0;
1424 }
1425 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1426   int x[] = {25, 17};
1427   const int *foo = &x[0];
1428   ++foo;
1429 }
1430 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1431   typedef const int *iptr;
1432   iptr p = 0;
1433   ++p;
1434 }
1435 { /* AIX XL C 1.02.0.0 rejects this saying
1436      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1437   struct s { int j; const int *ap[3]; };
1438   struct s *b; b->j = 5;
1439 }
1440 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1441   const int foo = 10;
1442 }
1443
1444 ; return 0; }
1445 EOF
1446 if { (eval echo configure:1447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1447   rm -rf conftest*
1448   ac_cv_c_const=yes
1449 else
1450   echo "configure: failed program was:" >&5
1451   cat conftest.$ac_ext >&5
1452   rm -rf conftest*
1453   ac_cv_c_const=no
1454 fi
1455 rm -f conftest*
1456 fi
1457
1458 echo "$ac_t""$ac_cv_c_const" 1>&6
1459 if test $ac_cv_c_const = no; then
1460   cat >> confdefs.h <<\EOF
1461 #define const 
1462 EOF
1463
1464 fi
1465
1466 echo $ac_n "checking for inline""... $ac_c" 1>&6
1467 echo "configure:1468: checking for inline" >&5
1468 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1469   echo $ac_n "(cached) $ac_c" 1>&6
1470 else
1471   ac_cv_c_inline=no
1472 for ac_kw in inline __inline__ __inline; do
1473   cat > conftest.$ac_ext <<EOF
1474 #line 1475 "configure"
1475 #include "confdefs.h"
1476
1477 int main() {
1478 } $ac_kw foo() {
1479 ; return 0; }
1480 EOF
1481 if { (eval echo configure:1482: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1482   rm -rf conftest*
1483   ac_cv_c_inline=$ac_kw; break
1484 else
1485   echo "configure: failed program was:" >&5
1486   cat conftest.$ac_ext >&5
1487 fi
1488 rm -f conftest*
1489 done
1490
1491 fi
1492
1493 echo "$ac_t""$ac_cv_c_inline" 1>&6
1494 case "$ac_cv_c_inline" in
1495   inline | yes) ;;
1496   no) cat >> confdefs.h <<\EOF
1497 #define inline 
1498 EOF
1499  ;;
1500   *)  cat >> confdefs.h <<EOF
1501 #define inline $ac_cv_c_inline
1502 EOF
1503  ;;
1504 esac
1505
1506 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1507 echo "configure:1508: checking for off_t" >&5
1508 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1509   echo $ac_n "(cached) $ac_c" 1>&6
1510 else
1511   cat > conftest.$ac_ext <<EOF
1512 #line 1513 "configure"
1513 #include "confdefs.h"
1514 #include <sys/types.h>
1515 #if STDC_HEADERS
1516 #include <stdlib.h>
1517 #include <stddef.h>
1518 #endif
1519 EOF
1520 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1521   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1522   rm -rf conftest*
1523   ac_cv_type_off_t=yes
1524 else
1525   rm -rf conftest*
1526   ac_cv_type_off_t=no
1527 fi
1528 rm -f conftest*
1529
1530 fi
1531 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1532 if test $ac_cv_type_off_t = no; then
1533   cat >> confdefs.h <<\EOF
1534 #define off_t long
1535 EOF
1536
1537 fi
1538
1539 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1540 echo "configure:1541: checking for size_t" >&5
1541 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1542   echo $ac_n "(cached) $ac_c" 1>&6
1543 else
1544   cat > conftest.$ac_ext <<EOF
1545 #line 1546 "configure"
1546 #include "confdefs.h"
1547 #include <sys/types.h>
1548 #if STDC_HEADERS
1549 #include <stdlib.h>
1550 #include <stddef.h>
1551 #endif
1552 EOF
1553 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1554   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1555   rm -rf conftest*
1556   ac_cv_type_size_t=yes
1557 else
1558   rm -rf conftest*
1559   ac_cv_type_size_t=no
1560 fi
1561 rm -f conftest*
1562
1563 fi
1564 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1565 if test $ac_cv_type_size_t = no; then
1566   cat >> confdefs.h <<\EOF
1567 #define size_t unsigned
1568 EOF
1569
1570 fi
1571
1572 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1573 # for constant arguments.  Useless!
1574 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1575 echo "configure:1576: checking for working alloca.h" >&5
1576 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1577   echo $ac_n "(cached) $ac_c" 1>&6
1578 else
1579   cat > conftest.$ac_ext <<EOF
1580 #line 1581 "configure"
1581 #include "confdefs.h"
1582 #include <alloca.h>
1583 int main() {
1584 char *p = alloca(2 * sizeof(int));
1585 ; return 0; }
1586 EOF
1587 if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1588   rm -rf conftest*
1589   ac_cv_header_alloca_h=yes
1590 else
1591   echo "configure: failed program was:" >&5
1592   cat conftest.$ac_ext >&5
1593   rm -rf conftest*
1594   ac_cv_header_alloca_h=no
1595 fi
1596 rm -f conftest*
1597 fi
1598
1599 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1600 if test $ac_cv_header_alloca_h = yes; then
1601   cat >> confdefs.h <<\EOF
1602 #define HAVE_ALLOCA_H 1
1603 EOF
1604
1605 fi
1606
1607 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1608 echo "configure:1609: checking for alloca" >&5
1609 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1610   echo $ac_n "(cached) $ac_c" 1>&6
1611 else
1612   cat > conftest.$ac_ext <<EOF
1613 #line 1614 "configure"
1614 #include "confdefs.h"
1615
1616 #ifdef __GNUC__
1617 # define alloca __builtin_alloca
1618 #else
1619 # ifdef _MSC_VER
1620 #  include <malloc.h>
1621 #  define alloca _alloca
1622 # else
1623 #  if HAVE_ALLOCA_H
1624 #   include <alloca.h>
1625 #  else
1626 #   ifdef _AIX
1627  #pragma alloca
1628 #   else
1629 #    ifndef alloca /* predefined by HP cc +Olibcalls */
1630 char *alloca ();
1631 #    endif
1632 #   endif
1633 #  endif
1634 # endif
1635 #endif
1636
1637 int main() {
1638 char *p = (char *) alloca(1);
1639 ; return 0; }
1640 EOF
1641 if { (eval echo configure:1642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1642   rm -rf conftest*
1643   ac_cv_func_alloca_works=yes
1644 else
1645   echo "configure: failed program was:" >&5
1646   cat conftest.$ac_ext >&5
1647   rm -rf conftest*
1648   ac_cv_func_alloca_works=no
1649 fi
1650 rm -f conftest*
1651 fi
1652
1653 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1654 if test $ac_cv_func_alloca_works = yes; then
1655   cat >> confdefs.h <<\EOF
1656 #define HAVE_ALLOCA 1
1657 EOF
1658
1659 fi
1660
1661 if test $ac_cv_func_alloca_works = no; then
1662   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1663   # that cause trouble.  Some versions do not even contain alloca or
1664   # contain a buggy version.  If you still want to use their alloca,
1665   # use ar to extract alloca.o from them instead of compiling alloca.c.
1666   ALLOCA=alloca.${ac_objext}
1667   cat >> confdefs.h <<\EOF
1668 #define C_ALLOCA 1
1669 EOF
1670
1671
1672 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1673 echo "configure:1674: checking whether alloca needs Cray hooks" >&5
1674 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1675   echo $ac_n "(cached) $ac_c" 1>&6
1676 else
1677   cat > conftest.$ac_ext <<EOF
1678 #line 1679 "configure"
1679 #include "confdefs.h"
1680 #if defined(CRAY) && ! defined(CRAY2)
1681 webecray
1682 #else
1683 wenotbecray
1684 #endif
1685
1686 EOF
1687 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1688   egrep "webecray" >/dev/null 2>&1; then
1689   rm -rf conftest*
1690   ac_cv_os_cray=yes
1691 else
1692   rm -rf conftest*
1693   ac_cv_os_cray=no
1694 fi
1695 rm -f conftest*
1696
1697 fi
1698
1699 echo "$ac_t""$ac_cv_os_cray" 1>&6
1700 if test $ac_cv_os_cray = yes; then
1701 for ac_func in _getb67 GETB67 getb67; do
1702   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1703 echo "configure:1704: checking for $ac_func" >&5
1704 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1705   echo $ac_n "(cached) $ac_c" 1>&6
1706 else
1707   cat > conftest.$ac_ext <<EOF
1708 #line 1709 "configure"
1709 #include "confdefs.h"
1710 /* System header to define __stub macros and hopefully few prototypes,
1711     which can conflict with char $ac_func(); below.  */
1712 #include <assert.h>
1713 /* Override any gcc2 internal prototype to avoid an error.  */
1714 /* We use char because int might match the return type of a gcc2
1715     builtin and then its argument prototype would still apply.  */
1716 char $ac_func();
1717
1718 int main() {
1719
1720 /* The GNU C library defines this for functions which it implements
1721     to always fail with ENOSYS.  Some functions are actually named
1722     something starting with __ and the normal name is an alias.  */
1723 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1724 choke me
1725 #else
1726 $ac_func();
1727 #endif
1728
1729 ; return 0; }
1730 EOF
1731 if { (eval echo configure:1732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1732   rm -rf conftest*
1733   eval "ac_cv_func_$ac_func=yes"
1734 else
1735   echo "configure: failed program was:" >&5
1736   cat conftest.$ac_ext >&5
1737   rm -rf conftest*
1738   eval "ac_cv_func_$ac_func=no"
1739 fi
1740 rm -f conftest*
1741 fi
1742
1743 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1744   echo "$ac_t""yes" 1>&6
1745   cat >> confdefs.h <<EOF
1746 #define CRAY_STACKSEG_END $ac_func
1747 EOF
1748
1749   break
1750 else
1751   echo "$ac_t""no" 1>&6
1752 fi
1753
1754 done
1755 fi
1756
1757 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1758 echo "configure:1759: checking stack direction for C alloca" >&5
1759 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1760   echo $ac_n "(cached) $ac_c" 1>&6
1761 else
1762   if test "$cross_compiling" = yes; then
1763   ac_cv_c_stack_direction=0
1764 else
1765   cat > conftest.$ac_ext <<EOF
1766 #line 1767 "configure"
1767 #include "confdefs.h"
1768 find_stack_direction ()
1769 {
1770   static char *addr = 0;
1771   auto char dummy;
1772   if (addr == 0)
1773     {
1774       addr = &dummy;
1775       return find_stack_direction ();
1776     }
1777   else
1778     return (&dummy > addr) ? 1 : -1;
1779 }
1780 main ()
1781 {
1782   exit (find_stack_direction() < 0);
1783 }
1784 EOF
1785 if { (eval echo configure:1786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1786 then
1787   ac_cv_c_stack_direction=1
1788 else
1789   echo "configure: failed program was:" >&5
1790   cat conftest.$ac_ext >&5
1791   rm -fr conftest*
1792   ac_cv_c_stack_direction=-1
1793 fi
1794 rm -fr conftest*
1795 fi
1796
1797 fi
1798
1799 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1800 cat >> confdefs.h <<EOF
1801 #define STACK_DIRECTION $ac_cv_c_stack_direction
1802 EOF
1803
1804 fi
1805
1806 for ac_hdr in unistd.h
1807 do
1808 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1809 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1810 echo "configure:1811: checking for $ac_hdr" >&5
1811 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1812   echo $ac_n "(cached) $ac_c" 1>&6
1813 else
1814   cat > conftest.$ac_ext <<EOF
1815 #line 1816 "configure"
1816 #include "confdefs.h"
1817 #include <$ac_hdr>
1818 EOF
1819 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1820 { (eval echo configure:1821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1821 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1822 if test -z "$ac_err"; then
1823   rm -rf conftest*
1824   eval "ac_cv_header_$ac_safe=yes"
1825 else
1826   echo "$ac_err" >&5
1827   echo "configure: failed program was:" >&5
1828   cat conftest.$ac_ext >&5
1829   rm -rf conftest*
1830   eval "ac_cv_header_$ac_safe=no"
1831 fi
1832 rm -f conftest*
1833 fi
1834 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1835   echo "$ac_t""yes" 1>&6
1836     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1837   cat >> confdefs.h <<EOF
1838 #define $ac_tr_hdr 1
1839 EOF
1840  
1841 else
1842   echo "$ac_t""no" 1>&6
1843 fi
1844 done
1845
1846 for ac_func in getpagesize
1847 do
1848 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1849 echo "configure:1850: checking for $ac_func" >&5
1850 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1851   echo $ac_n "(cached) $ac_c" 1>&6
1852 else
1853   cat > conftest.$ac_ext <<EOF
1854 #line 1855 "configure"
1855 #include "confdefs.h"
1856 /* System header to define __stub macros and hopefully few prototypes,
1857     which can conflict with char $ac_func(); below.  */
1858 #include <assert.h>
1859 /* Override any gcc2 internal prototype to avoid an error.  */
1860 /* We use char because int might match the return type of a gcc2
1861     builtin and then its argument prototype would still apply.  */
1862 char $ac_func();
1863
1864 int main() {
1865
1866 /* The GNU C library defines this for functions which it implements
1867     to always fail with ENOSYS.  Some functions are actually named
1868     something starting with __ and the normal name is an alias.  */
1869 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1870 choke me
1871 #else
1872 $ac_func();
1873 #endif
1874
1875 ; return 0; }
1876 EOF
1877 if { (eval echo configure:1878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1878   rm -rf conftest*
1879   eval "ac_cv_func_$ac_func=yes"
1880 else
1881   echo "configure: failed program was:" >&5
1882   cat conftest.$ac_ext >&5
1883   rm -rf conftest*
1884   eval "ac_cv_func_$ac_func=no"
1885 fi
1886 rm -f conftest*
1887 fi
1888
1889 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1890   echo "$ac_t""yes" 1>&6
1891     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1892   cat >> confdefs.h <<EOF
1893 #define $ac_tr_func 1
1894 EOF
1895  
1896 else
1897   echo "$ac_t""no" 1>&6
1898 fi
1899 done
1900
1901 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1902 echo "configure:1903: checking for working mmap" >&5
1903 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1904   echo $ac_n "(cached) $ac_c" 1>&6
1905 else
1906   if test "$cross_compiling" = yes; then
1907   ac_cv_func_mmap_fixed_mapped=no
1908 else
1909   cat > conftest.$ac_ext <<EOF
1910 #line 1911 "configure"
1911 #include "confdefs.h"
1912
1913 /* Thanks to Mike Haertel and Jim Avera for this test.
1914    Here is a matrix of mmap possibilities:
1915         mmap private not fixed
1916         mmap private fixed at somewhere currently unmapped
1917         mmap private fixed at somewhere already mapped
1918         mmap shared not fixed
1919         mmap shared fixed at somewhere currently unmapped
1920         mmap shared fixed at somewhere already mapped
1921    For private mappings, we should verify that changes cannot be read()
1922    back from the file, nor mmap's back from the file at a different
1923    address.  (There have been systems where private was not correctly
1924    implemented like the infamous i386 svr4.0, and systems where the
1925    VM page cache was not coherent with the filesystem buffer cache
1926    like early versions of FreeBSD and possibly contemporary NetBSD.)
1927    For shared mappings, we should conversely verify that changes get
1928    propogated back to all the places they're supposed to be.
1929
1930    Grep wants private fixed already mapped.
1931    The main things grep needs to know about mmap are:
1932    * does it exist and is it safe to write into the mmap'd area
1933    * how to use it (BSD variants)  */
1934 #include <sys/types.h>
1935 #include <fcntl.h>
1936 #include <sys/mman.h>
1937
1938 /* This mess was copied from the GNU getpagesize.h.  */
1939 #ifndef HAVE_GETPAGESIZE
1940 # ifdef HAVE_UNISTD_H
1941 #  include <unistd.h>
1942 # endif
1943
1944 /* Assume that all systems that can run configure have sys/param.h.  */
1945 # ifndef HAVE_SYS_PARAM_H
1946 #  define HAVE_SYS_PARAM_H 1
1947 # endif
1948
1949 # ifdef _SC_PAGESIZE
1950 #  define getpagesize() sysconf(_SC_PAGESIZE)
1951 # else /* no _SC_PAGESIZE */
1952 #  ifdef HAVE_SYS_PARAM_H
1953 #   include <sys/param.h>
1954 #   ifdef EXEC_PAGESIZE
1955 #    define getpagesize() EXEC_PAGESIZE
1956 #   else /* no EXEC_PAGESIZE */
1957 #    ifdef NBPG
1958 #     define getpagesize() NBPG * CLSIZE
1959 #     ifndef CLSIZE
1960 #      define CLSIZE 1
1961 #     endif /* no CLSIZE */
1962 #    else /* no NBPG */
1963 #     ifdef NBPC
1964 #      define getpagesize() NBPC
1965 #     else /* no NBPC */
1966 #      ifdef PAGESIZE
1967 #       define getpagesize() PAGESIZE
1968 #      endif /* PAGESIZE */
1969 #     endif /* no NBPC */
1970 #    endif /* no NBPG */
1971 #   endif /* no EXEC_PAGESIZE */
1972 #  else /* no HAVE_SYS_PARAM_H */
1973 #   define getpagesize() 8192   /* punt totally */
1974 #  endif /* no HAVE_SYS_PARAM_H */
1975 # endif /* no _SC_PAGESIZE */
1976
1977 #endif /* no HAVE_GETPAGESIZE */
1978
1979 #ifdef __cplusplus
1980 extern "C" { void *malloc(unsigned); }
1981 #else
1982 char *malloc();
1983 #endif
1984
1985 int
1986 main()
1987 {
1988         char *data, *data2, *data3;
1989         int i, pagesize;
1990         int fd;
1991
1992         pagesize = getpagesize();
1993
1994         /*
1995          * First, make a file with some known garbage in it.
1996          */
1997         data = malloc(pagesize);
1998         if (!data)
1999                 exit(1);
2000         for (i = 0; i < pagesize; ++i)
2001                 *(data + i) = rand();
2002         umask(0);
2003         fd = creat("conftestmmap", 0600);
2004         if (fd < 0)
2005                 exit(1);
2006         if (write(fd, data, pagesize) != pagesize)
2007                 exit(1);
2008         close(fd);
2009
2010         /*
2011          * Next, try to mmap the file at a fixed address which
2012          * already has something else allocated at it.  If we can,
2013          * also make sure that we see the same garbage.
2014          */
2015         fd = open("conftestmmap", O_RDWR);
2016         if (fd < 0)
2017                 exit(1);
2018         data2 = malloc(2 * pagesize);
2019         if (!data2)
2020                 exit(1);
2021         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2022         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2023             MAP_PRIVATE | MAP_FIXED, fd, 0L))
2024                 exit(1);
2025         for (i = 0; i < pagesize; ++i)
2026                 if (*(data + i) != *(data2 + i))
2027                         exit(1);
2028
2029         /*
2030          * Finally, make sure that changes to the mapped area
2031          * do not percolate back to the file as seen by read().
2032          * (This is a bug on some variants of i386 svr4.0.)
2033          */
2034         for (i = 0; i < pagesize; ++i)
2035                 *(data2 + i) = *(data2 + i) + 1;
2036         data3 = malloc(pagesize);
2037         if (!data3)
2038                 exit(1);
2039         if (read(fd, data3, pagesize) != pagesize)
2040                 exit(1);
2041         for (i = 0; i < pagesize; ++i)
2042                 if (*(data + i) != *(data3 + i))
2043                         exit(1);
2044         close(fd);
2045         unlink("conftestmmap");
2046         exit(0);
2047 }
2048
2049 EOF
2050 if { (eval echo configure:2051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2051 then
2052   ac_cv_func_mmap_fixed_mapped=yes
2053 else
2054   echo "configure: failed program was:" >&5
2055   cat conftest.$ac_ext >&5
2056   rm -fr conftest*
2057   ac_cv_func_mmap_fixed_mapped=no
2058 fi
2059 rm -fr conftest*
2060 fi
2061
2062 fi
2063
2064 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2065 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2066   cat >> confdefs.h <<\EOF
2067 #define HAVE_MMAP 1
2068 EOF
2069
2070 fi
2071
2072                               
2073    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
2074 unistd.h values.h sys/param.h
2075 do
2076 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2077 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2078 echo "configure:2079: checking for $ac_hdr" >&5
2079 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2080   echo $ac_n "(cached) $ac_c" 1>&6
2081 else
2082   cat > conftest.$ac_ext <<EOF
2083 #line 2084 "configure"
2084 #include "confdefs.h"
2085 #include <$ac_hdr>
2086 EOF
2087 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2088 { (eval echo configure:2089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2089 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2090 if test -z "$ac_err"; then
2091   rm -rf conftest*
2092   eval "ac_cv_header_$ac_safe=yes"
2093 else
2094   echo "$ac_err" >&5
2095   echo "configure: failed program was:" >&5
2096   cat conftest.$ac_ext >&5
2097   rm -rf conftest*
2098   eval "ac_cv_header_$ac_safe=no"
2099 fi
2100 rm -f conftest*
2101 fi
2102 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2103   echo "$ac_t""yes" 1>&6
2104     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2105   cat >> confdefs.h <<EOF
2106 #define $ac_tr_hdr 1
2107 EOF
2108  
2109 else
2110   echo "$ac_t""no" 1>&6
2111 fi
2112 done
2113
2114    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2115 __argz_count __argz_stringify __argz_next
2116 do
2117 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2118 echo "configure:2119: checking for $ac_func" >&5
2119 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2120   echo $ac_n "(cached) $ac_c" 1>&6
2121 else
2122   cat > conftest.$ac_ext <<EOF
2123 #line 2124 "configure"
2124 #include "confdefs.h"
2125 /* System header to define __stub macros and hopefully few prototypes,
2126     which can conflict with char $ac_func(); below.  */
2127 #include <assert.h>
2128 /* Override any gcc2 internal prototype to avoid an error.  */
2129 /* We use char because int might match the return type of a gcc2
2130     builtin and then its argument prototype would still apply.  */
2131 char $ac_func();
2132
2133 int main() {
2134
2135 /* The GNU C library defines this for functions which it implements
2136     to always fail with ENOSYS.  Some functions are actually named
2137     something starting with __ and the normal name is an alias.  */
2138 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2139 choke me
2140 #else
2141 $ac_func();
2142 #endif
2143
2144 ; return 0; }
2145 EOF
2146 if { (eval echo configure:2147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2147   rm -rf conftest*
2148   eval "ac_cv_func_$ac_func=yes"
2149 else
2150   echo "configure: failed program was:" >&5
2151   cat conftest.$ac_ext >&5
2152   rm -rf conftest*
2153   eval "ac_cv_func_$ac_func=no"
2154 fi
2155 rm -f conftest*
2156 fi
2157
2158 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2159   echo "$ac_t""yes" 1>&6
2160     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2161   cat >> confdefs.h <<EOF
2162 #define $ac_tr_func 1
2163 EOF
2164  
2165 else
2166   echo "$ac_t""no" 1>&6
2167 fi
2168 done
2169
2170
2171    if test "${ac_cv_func_stpcpy+set}" != "set"; then
2172      for ac_func in stpcpy
2173 do
2174 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2175 echo "configure:2176: checking for $ac_func" >&5
2176 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2177   echo $ac_n "(cached) $ac_c" 1>&6
2178 else
2179   cat > conftest.$ac_ext <<EOF
2180 #line 2181 "configure"
2181 #include "confdefs.h"
2182 /* System header to define __stub macros and hopefully few prototypes,
2183     which can conflict with char $ac_func(); below.  */
2184 #include <assert.h>
2185 /* Override any gcc2 internal prototype to avoid an error.  */
2186 /* We use char because int might match the return type of a gcc2
2187     builtin and then its argument prototype would still apply.  */
2188 char $ac_func();
2189
2190 int main() {
2191
2192 /* The GNU C library defines this for functions which it implements
2193     to always fail with ENOSYS.  Some functions are actually named
2194     something starting with __ and the normal name is an alias.  */
2195 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2196 choke me
2197 #else
2198 $ac_func();
2199 #endif
2200
2201 ; return 0; }
2202 EOF
2203 if { (eval echo configure:2204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2204   rm -rf conftest*
2205   eval "ac_cv_func_$ac_func=yes"
2206 else
2207   echo "configure: failed program was:" >&5
2208   cat conftest.$ac_ext >&5
2209   rm -rf conftest*
2210   eval "ac_cv_func_$ac_func=no"
2211 fi
2212 rm -f conftest*
2213 fi
2214
2215 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2216   echo "$ac_t""yes" 1>&6
2217     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2218   cat >> confdefs.h <<EOF
2219 #define $ac_tr_func 1
2220 EOF
2221  
2222 else
2223   echo "$ac_t""no" 1>&6
2224 fi
2225 done
2226
2227    fi
2228    if test "${ac_cv_func_stpcpy}" = "yes"; then
2229      cat >> confdefs.h <<\EOF
2230 #define HAVE_STPCPY 1
2231 EOF
2232
2233    fi
2234
2235    if test $ac_cv_header_locale_h = yes; then
2236     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2237 echo "configure:2238: checking for LC_MESSAGES" >&5
2238 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2239   echo $ac_n "(cached) $ac_c" 1>&6
2240 else
2241   cat > conftest.$ac_ext <<EOF
2242 #line 2243 "configure"
2243 #include "confdefs.h"
2244 #include <locale.h>
2245 int main() {
2246 return LC_MESSAGES
2247 ; return 0; }
2248 EOF
2249 if { (eval echo configure:2250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2250   rm -rf conftest*
2251   am_cv_val_LC_MESSAGES=yes
2252 else
2253   echo "configure: failed program was:" >&5
2254   cat conftest.$ac_ext >&5
2255   rm -rf conftest*
2256   am_cv_val_LC_MESSAGES=no
2257 fi
2258 rm -f conftest*
2259 fi
2260
2261 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2262     if test $am_cv_val_LC_MESSAGES = yes; then
2263       cat >> confdefs.h <<\EOF
2264 #define HAVE_LC_MESSAGES 1
2265 EOF
2266
2267     fi
2268   fi
2269    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2270 echo "configure:2271: checking whether NLS is requested" >&5
2271         # Check whether --enable-nls or --disable-nls was given.
2272 if test "${enable_nls+set}" = set; then
2273   enableval="$enable_nls"
2274   USE_NLS=$enableval
2275 else
2276   USE_NLS=yes
2277 fi
2278
2279     echo "$ac_t""$USE_NLS" 1>&6
2280     
2281
2282     USE_INCLUDED_LIBINTL=no
2283
2284         if test "$USE_NLS" = "yes"; then
2285       cat >> confdefs.h <<\EOF
2286 #define ENABLE_NLS 1
2287 EOF
2288
2289       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2290 echo "configure:2291: checking whether included gettext is requested" >&5
2291       # Check whether --with-included-gettext or --without-included-gettext was given.
2292 if test "${with_included_gettext+set}" = set; then
2293   withval="$with_included_gettext"
2294   nls_cv_force_use_gnu_gettext=$withval
2295 else
2296   nls_cv_force_use_gnu_gettext=no
2297 fi
2298
2299       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2300
2301       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2302       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2303                                         nls_cv_header_intl=
2304         nls_cv_header_libgt=
2305         CATOBJEXT=NONE
2306
2307         ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2308 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2309 echo "configure:2310: checking for libintl.h" >&5
2310 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2311   echo $ac_n "(cached) $ac_c" 1>&6
2312 else
2313   cat > conftest.$ac_ext <<EOF
2314 #line 2315 "configure"
2315 #include "confdefs.h"
2316 #include <libintl.h>
2317 EOF
2318 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2319 { (eval echo configure:2320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2320 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2321 if test -z "$ac_err"; then
2322   rm -rf conftest*
2323   eval "ac_cv_header_$ac_safe=yes"
2324 else
2325   echo "$ac_err" >&5
2326   echo "configure: failed program was:" >&5
2327   cat conftest.$ac_ext >&5
2328   rm -rf conftest*
2329   eval "ac_cv_header_$ac_safe=no"
2330 fi
2331 rm -f conftest*
2332 fi
2333 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2334   echo "$ac_t""yes" 1>&6
2335   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
2336 echo "configure:2337: checking for gettext in libc" >&5
2337 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2338   echo $ac_n "(cached) $ac_c" 1>&6
2339 else
2340   cat > conftest.$ac_ext <<EOF
2341 #line 2342 "configure"
2342 #include "confdefs.h"
2343 #include <libintl.h>
2344 int main() {
2345 return (int) gettext ("")
2346 ; return 0; }
2347 EOF
2348 if { (eval echo configure:2349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2349   rm -rf conftest*
2350   gt_cv_func_gettext_libc=yes
2351 else
2352   echo "configure: failed program was:" >&5
2353   cat conftest.$ac_ext >&5
2354   rm -rf conftest*
2355   gt_cv_func_gettext_libc=no
2356 fi
2357 rm -f conftest*
2358 fi
2359
2360 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2361
2362            if test "$gt_cv_func_gettext_libc" != "yes"; then
2363              echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
2364 echo "configure:2365: checking for bindtextdomain in -lintl" >&5
2365 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2366 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2367   echo $ac_n "(cached) $ac_c" 1>&6
2368 else
2369   ac_save_LIBS="$LIBS"
2370 LIBS="-lintl  $LIBS"
2371 cat > conftest.$ac_ext <<EOF
2372 #line 2373 "configure"
2373 #include "confdefs.h"
2374 /* Override any gcc2 internal prototype to avoid an error.  */
2375 /* We use char because int might match the return type of a gcc2
2376     builtin and then its argument prototype would still apply.  */
2377 char bindtextdomain();
2378
2379 int main() {
2380 bindtextdomain()
2381 ; return 0; }
2382 EOF
2383 if { (eval echo configure:2384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2384   rm -rf conftest*
2385   eval "ac_cv_lib_$ac_lib_var=yes"
2386 else
2387   echo "configure: failed program was:" >&5
2388   cat conftest.$ac_ext >&5
2389   rm -rf conftest*
2390   eval "ac_cv_lib_$ac_lib_var=no"
2391 fi
2392 rm -f conftest*
2393 LIBS="$ac_save_LIBS"
2394
2395 fi
2396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2397   echo "$ac_t""yes" 1>&6
2398   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
2399 echo "configure:2400: checking for gettext in libintl" >&5
2400 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2401   echo $ac_n "(cached) $ac_c" 1>&6
2402 else
2403   cat > conftest.$ac_ext <<EOF
2404 #line 2405 "configure"
2405 #include "confdefs.h"
2406
2407 int main() {
2408 return (int) gettext ("")
2409 ; return 0; }
2410 EOF
2411 if { (eval echo configure:2412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2412   rm -rf conftest*
2413   gt_cv_func_gettext_libintl=yes
2414 else
2415   echo "configure: failed program was:" >&5
2416   cat conftest.$ac_ext >&5
2417   rm -rf conftest*
2418   gt_cv_func_gettext_libintl=no
2419 fi
2420 rm -f conftest*
2421 fi
2422
2423 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2424 else
2425   echo "$ac_t""no" 1>&6
2426 fi
2427
2428            fi
2429
2430            if test "$gt_cv_func_gettext_libc" = "yes" \
2431               || test "$gt_cv_func_gettext_libintl" = "yes"; then
2432               cat >> confdefs.h <<\EOF
2433 #define HAVE_GETTEXT 1
2434 EOF
2435
2436               # Extract the first word of "msgfmt", so it can be a program name with args.
2437 set dummy msgfmt; ac_word=$2
2438 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2439 echo "configure:2440: checking for $ac_word" >&5
2440 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2441   echo $ac_n "(cached) $ac_c" 1>&6
2442 else
2443   case "$MSGFMT" in
2444   /*)
2445   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2446   ;;
2447   *)
2448   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2449   for ac_dir in $PATH; do
2450     test -z "$ac_dir" && ac_dir=.
2451     if test -f $ac_dir/$ac_word; then
2452       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2453         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2454         break
2455       fi
2456     fi
2457   done
2458   IFS="$ac_save_ifs"
2459   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2460   ;;
2461 esac
2462 fi
2463 MSGFMT="$ac_cv_path_MSGFMT"
2464 if test -n "$MSGFMT"; then
2465   echo "$ac_t""$MSGFMT" 1>&6
2466 else
2467   echo "$ac_t""no" 1>&6
2468 fi
2469               if test "$MSGFMT" != "no"; then
2470                 for ac_func in dcgettext
2471 do
2472 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2473 echo "configure:2474: checking for $ac_func" >&5
2474 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2475   echo $ac_n "(cached) $ac_c" 1>&6
2476 else
2477   cat > conftest.$ac_ext <<EOF
2478 #line 2479 "configure"
2479 #include "confdefs.h"
2480 /* System header to define __stub macros and hopefully few prototypes,
2481     which can conflict with char $ac_func(); below.  */
2482 #include <assert.h>
2483 /* Override any gcc2 internal prototype to avoid an error.  */
2484 /* We use char because int might match the return type of a gcc2
2485     builtin and then its argument prototype would still apply.  */
2486 char $ac_func();
2487
2488 int main() {
2489
2490 /* The GNU C library defines this for functions which it implements
2491     to always fail with ENOSYS.  Some functions are actually named
2492     something starting with __ and the normal name is an alias.  */
2493 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2494 choke me
2495 #else
2496 $ac_func();
2497 #endif
2498
2499 ; return 0; }
2500 EOF
2501 if { (eval echo configure:2502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2502   rm -rf conftest*
2503   eval "ac_cv_func_$ac_func=yes"
2504 else
2505   echo "configure: failed program was:" >&5
2506   cat conftest.$ac_ext >&5
2507   rm -rf conftest*
2508   eval "ac_cv_func_$ac_func=no"
2509 fi
2510 rm -f conftest*
2511 fi
2512
2513 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2514   echo "$ac_t""yes" 1>&6
2515     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2516   cat >> confdefs.h <<EOF
2517 #define $ac_tr_func 1
2518 EOF
2519  
2520 else
2521   echo "$ac_t""no" 1>&6
2522 fi
2523 done
2524
2525                 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2526 set dummy gmsgfmt; ac_word=$2
2527 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2528 echo "configure:2529: checking for $ac_word" >&5
2529 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2530   echo $ac_n "(cached) $ac_c" 1>&6
2531 else
2532   case "$GMSGFMT" in
2533   /*)
2534   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2535   ;;
2536   ?:/*)                  
2537   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2538   ;;
2539   *)
2540   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2541   ac_dummy="$PATH"
2542   for ac_dir in $ac_dummy; do 
2543     test -z "$ac_dir" && ac_dir=.
2544     if test -f $ac_dir/$ac_word; then
2545       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2546       break
2547     fi
2548   done
2549   IFS="$ac_save_ifs"
2550   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2551   ;;
2552 esac
2553 fi
2554 GMSGFMT="$ac_cv_path_GMSGFMT"
2555 if test -n "$GMSGFMT"; then
2556   echo "$ac_t""$GMSGFMT" 1>&6
2557 else
2558   echo "$ac_t""no" 1>&6
2559 fi
2560
2561                 # Extract the first word of "xgettext", so it can be a program name with args.
2562 set dummy xgettext; ac_word=$2
2563 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2564 echo "configure:2565: checking for $ac_word" >&5
2565 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2566   echo $ac_n "(cached) $ac_c" 1>&6
2567 else
2568   case "$XGETTEXT" in
2569   /*)
2570   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2571   ;;
2572   *)
2573   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2574   for ac_dir in $PATH; do
2575     test -z "$ac_dir" && ac_dir=.
2576     if test -f $ac_dir/$ac_word; then
2577       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2578         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2579         break
2580       fi
2581     fi
2582   done
2583   IFS="$ac_save_ifs"
2584   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2585   ;;
2586 esac
2587 fi
2588 XGETTEXT="$ac_cv_path_XGETTEXT"
2589 if test -n "$XGETTEXT"; then
2590   echo "$ac_t""$XGETTEXT" 1>&6
2591 else
2592   echo "$ac_t""no" 1>&6
2593 fi
2594
2595                 cat > conftest.$ac_ext <<EOF
2596 #line 2597 "configure"
2597 #include "confdefs.h"
2598
2599 int main() {
2600 extern int _nl_msg_cat_cntr;
2601                                return _nl_msg_cat_cntr
2602 ; return 0; }
2603 EOF
2604 if { (eval echo configure:2605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2605   rm -rf conftest*
2606   CATOBJEXT=.gmo
2607                    DATADIRNAME=share
2608 else
2609   echo "configure: failed program was:" >&5
2610   cat conftest.$ac_ext >&5
2611   rm -rf conftest*
2612   CATOBJEXT=.mo
2613                    DATADIRNAME=lib
2614 fi
2615 rm -f conftest*
2616                 INSTOBJEXT=.mo
2617               fi
2618             fi
2619         
2620 else
2621   echo "$ac_t""no" 1>&6
2622 fi
2623
2624
2625                 
2626         if test "$CATOBJEXT" = "NONE"; then
2627                           nls_cv_use_gnu_gettext=yes
2628         fi
2629       fi
2630
2631       if test "$nls_cv_use_gnu_gettext" = "yes"; then
2632                 INTLOBJS="\$(GETTOBJS)"
2633         # Extract the first word of "msgfmt", so it can be a program name with args.
2634 set dummy msgfmt; ac_word=$2
2635 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2636 echo "configure:2637: checking for $ac_word" >&5
2637 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2638   echo $ac_n "(cached) $ac_c" 1>&6
2639 else
2640   case "$MSGFMT" in
2641   /*)
2642   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2643   ;;
2644   *)
2645   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2646   for ac_dir in $PATH; do
2647     test -z "$ac_dir" && ac_dir=.
2648     if test -f $ac_dir/$ac_word; then
2649       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2650         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2651         break
2652       fi
2653     fi
2654   done
2655   IFS="$ac_save_ifs"
2656   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2657   ;;
2658 esac
2659 fi
2660 MSGFMT="$ac_cv_path_MSGFMT"
2661 if test -n "$MSGFMT"; then
2662   echo "$ac_t""$MSGFMT" 1>&6
2663 else
2664   echo "$ac_t""no" 1>&6
2665 fi
2666
2667         # Extract the first word of "gmsgfmt", so it can be a program name with args.
2668 set dummy gmsgfmt; ac_word=$2
2669 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2670 echo "configure:2671: checking for $ac_word" >&5
2671 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2672   echo $ac_n "(cached) $ac_c" 1>&6
2673 else
2674   case "$GMSGFMT" in
2675   /*)
2676   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2677   ;;
2678   ?:/*)                  
2679   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2680   ;;
2681   *)
2682   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2683   ac_dummy="$PATH"
2684   for ac_dir in $ac_dummy; do 
2685     test -z "$ac_dir" && ac_dir=.
2686     if test -f $ac_dir/$ac_word; then
2687       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2688       break
2689     fi
2690   done
2691   IFS="$ac_save_ifs"
2692   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2693   ;;
2694 esac
2695 fi
2696 GMSGFMT="$ac_cv_path_GMSGFMT"
2697 if test -n "$GMSGFMT"; then
2698   echo "$ac_t""$GMSGFMT" 1>&6
2699 else
2700   echo "$ac_t""no" 1>&6
2701 fi
2702
2703         # Extract the first word of "xgettext", so it can be a program name with args.
2704 set dummy xgettext; ac_word=$2
2705 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2706 echo "configure:2707: checking for $ac_word" >&5
2707 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2708   echo $ac_n "(cached) $ac_c" 1>&6
2709 else
2710   case "$XGETTEXT" in
2711   /*)
2712   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2713   ;;
2714   *)
2715   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2716   for ac_dir in $PATH; do
2717     test -z "$ac_dir" && ac_dir=.
2718     if test -f $ac_dir/$ac_word; then
2719       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2720         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2721         break
2722       fi
2723     fi
2724   done
2725   IFS="$ac_save_ifs"
2726   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2727   ;;
2728 esac
2729 fi
2730 XGETTEXT="$ac_cv_path_XGETTEXT"
2731 if test -n "$XGETTEXT"; then
2732   echo "$ac_t""$XGETTEXT" 1>&6
2733 else
2734   echo "$ac_t""no" 1>&6
2735 fi
2736
2737         
2738         USE_INCLUDED_LIBINTL=yes
2739         CATOBJEXT=.gmo
2740         INSTOBJEXT=.mo
2741         DATADIRNAME=share
2742         INTLDEPS='$(top_builddir)/../intl/libintl.a'
2743         INTLLIBS=$INTLDEPS
2744         LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2745         nls_cv_header_intl=libintl.h
2746         nls_cv_header_libgt=libgettext.h
2747       fi
2748
2749             if test "$XGETTEXT" != ":"; then
2750                         if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2751           : ;
2752         else
2753           echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2754           XGETTEXT=":"
2755         fi
2756       fi
2757
2758       # We need to process the po/ directory.
2759       POSUB=po
2760     else
2761       DATADIRNAME=share
2762       nls_cv_header_intl=libintl.h
2763       nls_cv_header_libgt=libgettext.h
2764     fi
2765
2766     # If this is used in GNU gettext we have to set USE_NLS to `yes'
2767     # because some of the sources are only built for this goal.
2768     if test "$PACKAGE" = gettext; then
2769       USE_NLS=yes
2770       USE_INCLUDED_LIBINTL=yes
2771     fi
2772
2773                 for lang in $ALL_LINGUAS; do
2774       GMOFILES="$GMOFILES $lang.gmo"
2775       POFILES="$POFILES $lang.po"
2776     done
2777
2778         
2779     
2780     
2781     
2782     
2783     
2784     
2785     
2786     
2787     
2788     
2789   
2790
2791    if test "x$CATOBJEXT" != "x"; then
2792      if test "x$ALL_LINGUAS" = "x"; then
2793        LINGUAS=
2794      else
2795        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2796 echo "configure:2797: checking for catalogs to be installed" >&5
2797        NEW_LINGUAS=
2798        for lang in ${LINGUAS=$ALL_LINGUAS}; do
2799          case "$ALL_LINGUAS" in
2800           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2801          esac
2802        done
2803        LINGUAS=$NEW_LINGUAS
2804        echo "$ac_t""$LINGUAS" 1>&6
2805      fi
2806
2807           if test -n "$LINGUAS"; then
2808        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2809      fi
2810    fi
2811
2812             if test $ac_cv_header_locale_h = yes; then
2813      INCLUDE_LOCALE_H="#include <locale.h>"
2814    else
2815      INCLUDE_LOCALE_H="\
2816 /* The system does not provide the header <locale.h>.  Take care yourself.  */"
2817    fi
2818    
2819
2820             if test -f $srcdir/po2tbl.sed.in; then
2821       if test "$CATOBJEXT" = ".cat"; then
2822          ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2823 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
2824 echo "configure:2825: checking for linux/version.h" >&5
2825 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2826   echo $ac_n "(cached) $ac_c" 1>&6
2827 else
2828   cat > conftest.$ac_ext <<EOF
2829 #line 2830 "configure"
2830 #include "confdefs.h"
2831 #include <linux/version.h>
2832 EOF
2833 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2834 { (eval echo configure:2835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2835 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2836 if test -z "$ac_err"; then
2837   rm -rf conftest*
2838   eval "ac_cv_header_$ac_safe=yes"
2839 else
2840   echo "$ac_err" >&5
2841   echo "configure: failed program was:" >&5
2842   cat conftest.$ac_ext >&5
2843   rm -rf conftest*
2844   eval "ac_cv_header_$ac_safe=no"
2845 fi
2846 rm -f conftest*
2847 fi
2848 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2849   echo "$ac_t""yes" 1>&6
2850   msgformat=linux
2851 else
2852   echo "$ac_t""no" 1>&6
2853 msgformat=xopen
2854 fi
2855
2856
2857                          sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2858       fi
2859             sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2860          $srcdir/po2tbl.sed.in > po2tbl.sed
2861    fi
2862
2863             if test "$PACKAGE" = "gettext"; then
2864      GT_NO="#NO#"
2865      GT_YES=
2866    else
2867      GT_NO=
2868      GT_YES="#YES#"
2869    fi
2870    
2871    
2872
2873    MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2874    
2875
2876       l=
2877    
2878
2879             if test -f $srcdir/po/POTFILES.in; then
2880       test -d po || mkdir po
2881       if test "x$srcdir" != "x."; then
2882          if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2883             posrcprefix="$srcdir/"
2884          else
2885             posrcprefix="../$srcdir/"
2886          fi
2887       else
2888          posrcprefix="../"
2889       fi
2890       rm -f po/POTFILES
2891       sed -e "/^#/d" -e "/^\$/d" -e "s,.*,      $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2892          < $srcdir/po/POTFILES.in > po/POTFILES
2893    fi
2894   
2895 cat >> confdefs.h <<\EOF
2896 #define PACKAGE "gdb"
2897 EOF
2898
2899
2900
2901
2902 CONFIG_OBS=
2903 CONFIG_LIB_OBS=
2904 CONFIG_DEPS=
2905 CONFIG_SRCS=
2906 CONFIG_INITS=
2907 ENABLE_CFLAGS=
2908 CONFIG_ALL=
2909 CONFIG_CLEAN=
2910 CONFIG_INSTALL=
2911 CONFIG_UNINSTALL=
2912
2913 SUBDIRS="doc testsuite nlm"
2914 configdirs="doc testsuite"
2915
2916 # Check whether --enable-multi-ice or --disable-multi-ice was given.
2917 if test "${enable_multi_ice+set}" = set; then
2918   enableval="$enable_multi_ice"
2919   case "${enableval}" in
2920     yes ) enable_multi_ice="yes" ;;
2921     no)  enable_multi_ice="no" ;;
2922     *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;;
2923   esac
2924
2925 fi
2926
2927
2928 if test "${enable_multi_ice}" = "yes"; then
2929   configdirs="${configdirs} multi-ice"
2930 fi
2931
2932 . $srcdir/configure.host
2933
2934 . $srcdir/configure.tgt
2935
2936 # Fetch the default architecture and default target vector from BFD.
2937 targ=$target; . $srcdir/../bfd/config.bfd
2938
2939 # We only want the first architecture, so strip off the others if
2940 # there is more than one.
2941 targ_archs=`echo $targ_archs | sed 's/ .*//'`
2942
2943 if test "x$targ_archs" != x; then
2944   cat >> confdefs.h <<EOF
2945 #define DEFAULT_BFD_ARCH $targ_archs
2946 EOF
2947
2948 fi
2949 if test "x$targ_defvec" != x; then
2950   cat >> confdefs.h <<EOF
2951 #define DEFAULT_BFD_VEC $targ_defvec
2952 EOF
2953
2954 fi
2955
2956 if test "$program_transform_name" = s,x,x,; then
2957   program_transform_name=
2958 else
2959   # Double any \ or $.  echo might interpret backslashes.
2960   cat <<\EOF_SED > conftestsed
2961 s,\\,\\\\,g; s,\$,$$,g
2962 EOF_SED
2963   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
2964   rm -f conftestsed
2965 fi
2966 test "$program_prefix" != NONE &&
2967   program_transform_name="s,^,${program_prefix},; $program_transform_name"
2968 # Use a double $ so make ignores it.
2969 test "$program_suffix" != NONE &&
2970   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
2971
2972 # sed with no file args requires a program.
2973 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
2974
2975
2976 # The CLI cannot be disabled yet, but may be in the future.
2977
2978 # Enable CLI.
2979 # Check whether --enable-gdbcli or --disable-gdbcli was given.
2980 if test "${enable_gdbcli+set}" = set; then
2981   enableval="$enable_gdbcli"
2982   case $enableval in
2983     yes)
2984       ;;
2985     no)
2986       { echo "configure: error: the command-line interface cannot be disabled yet" 1>&2; exit 1; } ;;
2987     *)
2988       { echo "configure: error: bad value $enableval for --enable-gdbcli" 1>&2; exit 1; } ;;
2989   esac
2990 else
2991   enable_gdbcli=yes
2992 fi
2993
2994 if test x"$enable_gdbcli" = xyes; then
2995   if test -d $srcdir/cli; then
2996     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_CLI_OBS)"
2997     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_CLI_DEPS)"
2998     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_CLI_SRCS)"
2999     CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_CLI_INITS)"
3000     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_CLI_CFLAGS)"
3001     CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_CLI_ALL)"
3002     CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_CLI_CLEAN)"
3003     CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_CLI_INSTALL)"
3004     CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_CLI_UNINSTALL)"
3005   fi
3006 fi
3007
3008 # Enable MI.
3009 # Check whether --enable-gdbmi or --disable-gdbmi was given.
3010 if test "${enable_gdbmi+set}" = set; then
3011   enableval="$enable_gdbmi"
3012   case $enableval in
3013     yes | no)
3014       ;;
3015     *)
3016       { echo "configure: error: bad value $enableval for --enable-gdbmi" 1>&2; exit 1; } ;;
3017   esac
3018 else
3019   enable_gdbmi=yes
3020 fi
3021
3022 if test x"$enable_gdbmi" = xyes; then
3023   if test -d $srcdir/mi; then
3024     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
3025     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
3026     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
3027     CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_MI_INITS)"
3028     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
3029     CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_MI_ALL)"
3030     CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_MI_CLEAN)"
3031     CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_MI_INSTALL)"
3032     CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_MI_UNINSTALL)"
3033   fi
3034 fi
3035
3036 # Enable TUI.
3037 # Check whether --enable-tui or --disable-tui was given.
3038 if test "${enable_tui+set}" = set; then
3039   enableval="$enable_tui"
3040   case $enableval in
3041     yes | no)
3042       ;;
3043     *)
3044       { echo "configure: error: bad value $enableval for --enable-tui" 1>&2; exit 1; } ;;
3045   esac
3046 fi
3047
3048 if test x"$enable_tui" = xyes; then
3049   if test -d $srcdir/tui; then
3050     CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
3051     CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
3052     CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
3053     CONFIG_INITS="$CONFIG_INITS \$(SUBDIR_TUI_INITS)"
3054     ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
3055     CONFIG_ALL="$CONFIG_ALL \$(SUBDIR_TUI_ALL)"
3056     CONFIG_CLEAN="$CONFIG_CLEAN \$(SUBDIR_TUI_CLEAN)"
3057     CONFIG_INSTALL="$CONFIG_INSTALL \$(SUBDIR_TUI_INSTALL)"
3058     CONFIG_UNINSTALL="$CONFIG_UNINSTALL \$(SUBDIR_TUI_UNINSTALL)"
3059     need_curses=yes
3060   fi
3061 fi
3062
3063 # --------------------- #
3064 # Checks for programs.  #
3065 # --------------------- #
3066
3067 for ac_prog in mawk gawk nawk awk
3068 do
3069 # Extract the first word of "$ac_prog", so it can be a program name with args.
3070 set dummy $ac_prog; ac_word=$2
3071 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3072 echo "configure:3073: checking for $ac_word" >&5
3073 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
3074   echo $ac_n "(cached) $ac_c" 1>&6
3075 else
3076   if test -n "$AWK"; then
3077   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3078 else
3079   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3080   ac_dummy="$PATH"
3081   for ac_dir in $ac_dummy; do
3082     test -z "$ac_dir" && ac_dir=.
3083     if test -f $ac_dir/$ac_word; then
3084       ac_cv_prog_AWK="$ac_prog"
3085       break
3086     fi
3087   done
3088   IFS="$ac_save_ifs"
3089 fi
3090 fi
3091 AWK="$ac_cv_prog_AWK"
3092 if test -n "$AWK"; then
3093   echo "$ac_t""$AWK" 1>&6
3094 else
3095   echo "$ac_t""no" 1>&6
3096 fi
3097
3098 test -n "$AWK" && break
3099 done
3100
3101 # Find a good install program.  We prefer a C program (faster),
3102 # so one script is as good as another.  But avoid the broken or
3103 # incompatible versions:
3104 # SysV /etc/install, /usr/sbin/install
3105 # SunOS /usr/etc/install
3106 # IRIX /sbin/install
3107 # AIX /bin/install
3108 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3109 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3110 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3111 # ./install, which can be erroneously created by make from ./install.sh.
3112 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3113 echo "configure:3114: checking for a BSD compatible install" >&5
3114 if test -z "$INSTALL"; then
3115 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
3116   echo $ac_n "(cached) $ac_c" 1>&6
3117 else
3118     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
3119   for ac_dir in $PATH; do
3120     # Account for people who put trailing slashes in PATH elements.
3121     case "$ac_dir/" in
3122     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3123     *)
3124       # OSF1 and SCO ODT 3.0 have their own names for install.
3125       # Don't use installbsd from OSF since it installs stuff as root
3126       # by default.
3127       for ac_prog in ginstall scoinst install; do
3128         if test -f $ac_dir/$ac_prog; then
3129           if test $ac_prog = install &&
3130             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3131             # AIX install.  It has an incompatible calling convention.
3132             :
3133           else
3134             ac_cv_path_install="$ac_dir/$ac_prog -c"
3135             break 2
3136           fi
3137         fi
3138       done
3139       ;;
3140     esac
3141   done
3142   IFS="$ac_save_IFS"
3143
3144 fi
3145   if test "${ac_cv_path_install+set}" = set; then
3146     INSTALL="$ac_cv_path_install"
3147   else
3148     # As a last resort, use the slow shell script.  We don't cache a
3149     # path for INSTALL within a source directory, because that will
3150     # break other packages using the cache if that directory is
3151     # removed, or if the path is relative.
3152     INSTALL="$ac_install_sh"
3153   fi
3154 fi
3155 echo "$ac_t""$INSTALL" 1>&6
3156
3157 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3158 # It thinks the first close brace ends the variable substitution.
3159 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3160
3161 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3162
3163 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3164
3165 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3166 echo "configure:3167: checking whether ln -s works" >&5
3167 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
3168   echo $ac_n "(cached) $ac_c" 1>&6
3169 else
3170   rm -f conftestdata
3171 if ln -s X conftestdata 2>/dev/null
3172 then
3173   rm -f conftestdata
3174   ac_cv_prog_LN_S="ln -s"
3175 else
3176   ac_cv_prog_LN_S=ln
3177 fi
3178 fi
3179 LN_S="$ac_cv_prog_LN_S"
3180 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3181   echo "$ac_t""yes" 1>&6
3182 else
3183   echo "$ac_t""no" 1>&6
3184 fi
3185
3186 # Extract the first word of "ranlib", so it can be a program name with args.
3187 set dummy ranlib; ac_word=$2
3188 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3189 echo "configure:3190: checking for $ac_word" >&5
3190 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3191   echo $ac_n "(cached) $ac_c" 1>&6
3192 else
3193   if test -n "$RANLIB"; then
3194   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3195 else
3196   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3197   ac_dummy="$PATH"
3198   for ac_dir in $ac_dummy; do
3199     test -z "$ac_dir" && ac_dir=.
3200     if test -f $ac_dir/$ac_word; then
3201       ac_cv_prog_RANLIB="ranlib"
3202       break
3203     fi
3204   done
3205   IFS="$ac_save_ifs"
3206   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3207 fi
3208 fi
3209 RANLIB="$ac_cv_prog_RANLIB"
3210 if test -n "$RANLIB"; then
3211   echo "$ac_t""$RANLIB" 1>&6
3212 else
3213   echo "$ac_t""no" 1>&6
3214 fi
3215
3216 for ac_prog in 'bison -y' byacc
3217 do
3218 # Extract the first word of "$ac_prog", so it can be a program name with args.
3219 set dummy $ac_prog; ac_word=$2
3220 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3221 echo "configure:3222: checking for $ac_word" >&5
3222 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3223   echo $ac_n "(cached) $ac_c" 1>&6
3224 else
3225   if test -n "$YACC"; then
3226   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3227 else
3228   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3229   ac_dummy="$PATH"
3230   for ac_dir in $ac_dummy; do
3231     test -z "$ac_dir" && ac_dir=.
3232     if test -f $ac_dir/$ac_word; then
3233       ac_cv_prog_YACC="$ac_prog"
3234       break
3235     fi
3236   done
3237   IFS="$ac_save_ifs"
3238 fi
3239 fi
3240 YACC="$ac_cv_prog_YACC"
3241 if test -n "$YACC"; then
3242   echo "$ac_t""$YACC" 1>&6
3243 else
3244   echo "$ac_t""no" 1>&6
3245 fi
3246
3247 test -n "$YACC" && break
3248 done
3249 test -n "$YACC" || YACC="yacc"
3250
3251
3252 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3253 set dummy ${ac_tool_prefix}ar; ac_word=$2
3254 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3255 echo "configure:3256: checking for $ac_word" >&5
3256 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
3257   echo $ac_n "(cached) $ac_c" 1>&6
3258 else
3259   if test -n "$AR"; then
3260   ac_cv_prog_AR="$AR" # Let the user override the test.
3261 else
3262   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3263   ac_dummy="$PATH"
3264   for ac_dir in $ac_dummy; do
3265     test -z "$ac_dir" && ac_dir=.
3266     if test -f $ac_dir/$ac_word; then
3267       ac_cv_prog_AR="${ac_tool_prefix}ar"
3268       break
3269     fi
3270   done
3271   IFS="$ac_save_ifs"
3272   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
3273 fi
3274 fi
3275 AR="$ac_cv_prog_AR"
3276 if test -n "$AR"; then
3277   echo "$ac_t""$AR" 1>&6
3278 else
3279   echo "$ac_t""no" 1>&6
3280 fi
3281
3282
3283
3284 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3285 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3286 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3287 echo "configure:3288: checking for $ac_word" >&5
3288 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3289   echo $ac_n "(cached) $ac_c" 1>&6
3290 else
3291   if test -n "$DLLTOOL"; then
3292   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3293 else
3294   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3295   ac_dummy="$PATH"
3296   for ac_dir in $ac_dummy; do
3297     test -z "$ac_dir" && ac_dir=.
3298     if test -f $ac_dir/$ac_word; then
3299       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3300       break
3301     fi
3302   done
3303   IFS="$ac_save_ifs"
3304   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3305 fi
3306 fi
3307 DLLTOOL="$ac_cv_prog_DLLTOOL"
3308 if test -n "$DLLTOOL"; then
3309   echo "$ac_t""$DLLTOOL" 1>&6
3310 else
3311   echo "$ac_t""no" 1>&6
3312 fi
3313
3314
3315
3316 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3317 set dummy ${ac_tool_prefix}windres; ac_word=$2
3318 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3319 echo "configure:3320: checking for $ac_word" >&5
3320 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3321   echo $ac_n "(cached) $ac_c" 1>&6
3322 else
3323   if test -n "$WINDRES"; then
3324   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3325 else
3326   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3327   ac_dummy="$PATH"
3328   for ac_dir in $ac_dummy; do
3329     test -z "$ac_dir" && ac_dir=.
3330     if test -f $ac_dir/$ac_word; then
3331       ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3332       break
3333     fi
3334   done
3335   IFS="$ac_save_ifs"
3336   test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3337 fi
3338 fi
3339 WINDRES="$ac_cv_prog_WINDRES"
3340 if test -n "$WINDRES"; then
3341   echo "$ac_t""$WINDRES" 1>&6
3342 else
3343   echo "$ac_t""no" 1>&6
3344 fi
3345
3346
3347
3348
3349 # Needed for GNU/Hurd.
3350 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3351 set dummy ${ac_tool_prefix}mig; ac_word=$2
3352 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3353 echo "configure:3354: checking for $ac_word" >&5
3354 if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3355   echo $ac_n "(cached) $ac_c" 1>&6
3356 else
3357   if test -n "$MIG"; then
3358   ac_cv_prog_MIG="$MIG" # Let the user override the test.
3359 else
3360   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3361   ac_dummy="$PATH"
3362   for ac_dir in $ac_dummy; do
3363     test -z "$ac_dir" && ac_dir=.
3364     if test -f $ac_dir/$ac_word; then
3365       ac_cv_prog_MIG="${ac_tool_prefix}mig"
3366       break
3367     fi
3368   done
3369   IFS="$ac_save_ifs"
3370   test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3371 fi
3372 fi
3373 MIG="$ac_cv_prog_MIG"
3374 if test -n "$MIG"; then
3375   echo "$ac_t""$MIG" 1>&6
3376 else
3377   echo "$ac_t""no" 1>&6
3378 fi
3379
3380
3381
3382
3383 # ---------------------- #
3384 # Checks for libraries.  #
3385 # ---------------------- #
3386
3387 # We might need to link with -lm; most simulators need it.
3388 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
3389 echo "configure:3390: checking for main in -lm" >&5
3390 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3391 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3392   echo $ac_n "(cached) $ac_c" 1>&6
3393 else
3394   ac_save_LIBS="$LIBS"
3395 LIBS="-lm  $LIBS"
3396 cat > conftest.$ac_ext <<EOF
3397 #line 3398 "configure"
3398 #include "confdefs.h"
3399
3400 int main() {
3401 main()
3402 ; return 0; }
3403 EOF
3404 if { (eval echo configure:3405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3405   rm -rf conftest*
3406   eval "ac_cv_lib_$ac_lib_var=yes"
3407 else
3408   echo "configure: failed program was:" >&5
3409   cat conftest.$ac_ext >&5
3410   rm -rf conftest*
3411   eval "ac_cv_lib_$ac_lib_var=no"
3412 fi
3413 rm -f conftest*
3414 LIBS="$ac_save_LIBS"
3415
3416 fi
3417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3418   echo "$ac_t""yes" 1>&6
3419     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3420     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3421   cat >> confdefs.h <<EOF
3422 #define $ac_tr_lib 1
3423 EOF
3424
3425   LIBS="-lm $LIBS"
3426
3427 else
3428   echo "$ac_t""no" 1>&6
3429 fi
3430
3431
3432 # We need to link with -lw to get `wctype' on Solaris before Solaris
3433 # 2.6.  Solaris 2.6 and beyond have this function in libc, and have a
3434 # libw that some versions of the GNU linker cannot hanle (GNU ld 2.9.1
3435 # is known to have this problem).  Therefore we avoid libw if we can.
3436 echo $ac_n "checking for wctype""... $ac_c" 1>&6
3437 echo "configure:3438: checking for wctype" >&5
3438 if eval "test \"`echo '$''{'ac_cv_func_wctype'+set}'`\" = set"; then
3439   echo $ac_n "(cached) $ac_c" 1>&6
3440 else
3441   cat > conftest.$ac_ext <<EOF
3442 #line 3443 "configure"
3443 #include "confdefs.h"
3444 /* System header to define __stub macros and hopefully few prototypes,
3445     which can conflict with char wctype(); below.  */
3446 #include <assert.h>
3447 /* Override any gcc2 internal prototype to avoid an error.  */
3448 /* We use char because int might match the return type of a gcc2
3449     builtin and then its argument prototype would still apply.  */
3450 char wctype();
3451
3452 int main() {
3453
3454 /* The GNU C library defines this for functions which it implements
3455     to always fail with ENOSYS.  Some functions are actually named
3456     something starting with __ and the normal name is an alias.  */
3457 #if defined (__stub_wctype) || defined (__stub___wctype)
3458 choke me
3459 #else
3460 wctype();
3461 #endif
3462
3463 ; return 0; }
3464 EOF
3465 if { (eval echo configure:3466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3466   rm -rf conftest*
3467   eval "ac_cv_func_wctype=yes"
3468 else
3469   echo "configure: failed program was:" >&5
3470   cat conftest.$ac_ext >&5
3471   rm -rf conftest*
3472   eval "ac_cv_func_wctype=no"
3473 fi
3474 rm -f conftest*
3475 fi
3476
3477 if eval "test \"`echo '$ac_cv_func_'wctype`\" = yes"; then
3478   echo "$ac_t""yes" 1>&6
3479   :
3480 else
3481   echo "$ac_t""no" 1>&6
3482 echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
3483 echo "configure:3484: checking for wctype in -lw" >&5
3484 ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
3485 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3486   echo $ac_n "(cached) $ac_c" 1>&6
3487 else
3488   ac_save_LIBS="$LIBS"
3489 LIBS="-lw  $LIBS"
3490 cat > conftest.$ac_ext <<EOF
3491 #line 3492 "configure"
3492 #include "confdefs.h"
3493 /* Override any gcc2 internal prototype to avoid an error.  */
3494 /* We use char because int might match the return type of a gcc2
3495     builtin and then its argument prototype would still apply.  */
3496 char wctype();
3497
3498 int main() {
3499 wctype()
3500 ; return 0; }
3501 EOF
3502 if { (eval echo configure:3503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3503   rm -rf conftest*
3504   eval "ac_cv_lib_$ac_lib_var=yes"
3505 else
3506   echo "configure: failed program was:" >&5
3507   cat conftest.$ac_ext >&5
3508   rm -rf conftest*
3509   eval "ac_cv_lib_$ac_lib_var=no"
3510 fi
3511 rm -f conftest*
3512 LIBS="$ac_save_LIBS"
3513
3514 fi
3515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3516   echo "$ac_t""yes" 1>&6
3517     ac_tr_lib=HAVE_LIB`echo w | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3518     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3519   cat >> confdefs.h <<EOF
3520 #define $ac_tr_lib 1
3521 EOF
3522
3523   LIBS="-lw $LIBS"
3524
3525 else
3526   echo "$ac_t""no" 1>&6
3527 fi
3528
3529 fi
3530
3531
3532 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
3533
3534 echo $ac_n "checking for library containing socketpair""... $ac_c" 1>&6
3535 echo "configure:3536: checking for library containing socketpair" >&5
3536 if eval "test \"`echo '$''{'ac_cv_search_socketpair'+set}'`\" = set"; then
3537   echo $ac_n "(cached) $ac_c" 1>&6
3538 else
3539   ac_func_search_save_LIBS="$LIBS"
3540 ac_cv_search_socketpair="no"
3541 cat > conftest.$ac_ext <<EOF
3542 #line 3543 "configure"
3543 #include "confdefs.h"
3544 /* Override any gcc2 internal prototype to avoid an error.  */
3545 /* We use char because int might match the return type of a gcc2
3546     builtin and then its argument prototype would still apply.  */
3547 char socketpair();
3548
3549 int main() {
3550 socketpair()
3551 ; return 0; }
3552 EOF
3553 if { (eval echo configure:3554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3554   rm -rf conftest*
3555   ac_cv_search_socketpair="none required"
3556 else
3557   echo "configure: failed program was:" >&5
3558   cat conftest.$ac_ext >&5
3559 fi
3560 rm -f conftest*
3561 test "$ac_cv_search_socketpair" = "no" && for i in socket; do
3562 LIBS="-l$i  $ac_func_search_save_LIBS"
3563 cat > conftest.$ac_ext <<EOF
3564 #line 3565 "configure"
3565 #include "confdefs.h"
3566 /* Override any gcc2 internal prototype to avoid an error.  */
3567 /* We use char because int might match the return type of a gcc2
3568     builtin and then its argument prototype would still apply.  */
3569 char socketpair();
3570
3571 int main() {
3572 socketpair()
3573 ; return 0; }
3574 EOF
3575 if { (eval echo configure:3576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3576   rm -rf conftest*
3577   ac_cv_search_socketpair="-l$i"
3578 break
3579 else
3580   echo "configure: failed program was:" >&5
3581   cat conftest.$ac_ext >&5
3582 fi
3583 rm -f conftest*
3584 done
3585 LIBS="$ac_func_search_save_LIBS"
3586 fi
3587
3588 echo "$ac_t""$ac_cv_search_socketpair" 1>&6
3589 if test "$ac_cv_search_socketpair" != "no"; then
3590   test "$ac_cv_search_socketpair" = "none required" || LIBS="$ac_cv_search_socketpair $LIBS"
3591   
3592 else :
3593   
3594 fi
3595
3596 # Since GDB uses Readline, we need termcap functionality, so we need
3597 # to find a library that provides that.  When GDB is configured with
3598 # --enable-tui, we need full curses functionality.
3599 #
3600 # FIXME: kettenis/20030102: We seem to prefer HP curses (Hcurses) over
3601 # Xcurses on HP-UX; see the `-D__HP_CURSES' in the relevant host
3602 # Makefile fragments.  That's why we need to have `Hcurses' before
3603 # `curses'.  I don't see why we should use HP curses if a more
3604 # standard curses is available, except that according to HP's
3605 # documentation one needs to compile `-D_XOPEN_SOURCE_EXTENDED' on
3606 # HP-UX 10.10 and 10.20.
3607
3608 if test "$need_curses" = yes; then
3609   
3610 echo $ac_n "checking for library containing initscr""... $ac_c" 1>&6
3611 echo "configure:3612: checking for library containing initscr" >&5
3612 if eval "test \"`echo '$''{'ac_cv_search_initscr'+set}'`\" = set"; then
3613   echo $ac_n "(cached) $ac_c" 1>&6
3614 else
3615   ac_func_search_save_LIBS="$LIBS"
3616 ac_cv_search_initscr="no"
3617 cat > conftest.$ac_ext <<EOF
3618 #line 3619 "configure"
3619 #include "confdefs.h"
3620 /* Override any gcc2 internal prototype to avoid an error.  */
3621 /* We use char because int might match the return type of a gcc2
3622     builtin and then its argument prototype would still apply.  */
3623 char initscr();
3624
3625 int main() {
3626 initscr()
3627 ; return 0; }
3628 EOF
3629 if { (eval echo configure:3630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3630   rm -rf conftest*
3631   ac_cv_search_initscr="none required"
3632 else
3633   echo "configure: failed program was:" >&5
3634   cat conftest.$ac_ext >&5
3635 fi
3636 rm -f conftest*
3637 test "$ac_cv_search_initscr" = "no" && for i in ncurses Hcurses curses; do
3638 LIBS="-l$i  $ac_func_search_save_LIBS"
3639 cat > conftest.$ac_ext <<EOF
3640 #line 3641 "configure"
3641 #include "confdefs.h"
3642 /* Override any gcc2 internal prototype to avoid an error.  */
3643 /* We use char because int might match the return type of a gcc2
3644     builtin and then its argument prototype would still apply.  */
3645 char initscr();
3646
3647 int main() {
3648 initscr()
3649 ; return 0; }
3650 EOF
3651 if { (eval echo configure:3652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3652   rm -rf conftest*
3653   ac_cv_search_initscr="-l$i"
3654 break
3655 else
3656   echo "configure: failed program was:" >&5
3657   cat conftest.$ac_ext >&5
3658 fi
3659 rm -f conftest*
3660 done
3661 LIBS="$ac_func_search_save_LIBS"
3662 fi
3663
3664 echo "$ac_t""$ac_cv_search_initscr" 1>&6
3665 if test "$ac_cv_search_initscr" != "no"; then
3666   test "$ac_cv_search_initscr" = "none required" || LIBS="$ac_cv_search_initscr $LIBS"
3667   
3668 else :
3669   { echo "configure: error: no curses library found" 1>&2; exit 1; }
3670 fi
3671 fi
3672
3673 case $host_os in
3674   cygwin*)
3675     if test -d $srcdir/libtermcap; then
3676       LIBS="../libtermcap/libtermcap.a $LIBS"
3677       ac_cv_search_tgetent="../libtermcap/libtermcap.a"
3678     fi ;;
3679   go32*)
3680     # ??? Is this really true?
3681     ac_cv_search_tgetent="none required"
3682     ;;
3683   aix*)
3684     # Readline prefers curses over termcap on AIX.
3685     # ??? Why?
3686     
3687 echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
3688 echo "configure:3689: checking for library containing tgetent" >&5
3689 if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3690   echo $ac_n "(cached) $ac_c" 1>&6
3691 else
3692   ac_func_search_save_LIBS="$LIBS"
3693 ac_cv_search_tgetent="no"
3694 cat > conftest.$ac_ext <<EOF
3695 #line 3696 "configure"
3696 #include "confdefs.h"
3697 /* Override any gcc2 internal prototype to avoid an error.  */
3698 /* We use char because int might match the return type of a gcc2
3699     builtin and then its argument prototype would still apply.  */
3700 char tgetent();
3701
3702 int main() {
3703 tgetent()
3704 ; return 0; }
3705 EOF
3706 if { (eval echo configure:3707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3707   rm -rf conftest*
3708   ac_cv_search_tgetent="none required"
3709 else
3710   echo "configure: failed program was:" >&5
3711   cat conftest.$ac_ext >&5
3712 fi
3713 rm -f conftest*
3714 test "$ac_cv_search_tgetent" = "no" && for i in tinfo ncurses curses termcap; do
3715 LIBS="-l$i  $ac_func_search_save_LIBS"
3716 cat > conftest.$ac_ext <<EOF
3717 #line 3718 "configure"
3718 #include "confdefs.h"
3719 /* Override any gcc2 internal prototype to avoid an error.  */
3720 /* We use char because int might match the return type of a gcc2
3721     builtin and then its argument prototype would still apply.  */
3722 char tgetent();
3723
3724 int main() {
3725 tgetent()
3726 ; return 0; }
3727 EOF
3728 if { (eval echo configure:3729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3729   rm -rf conftest*
3730   ac_cv_search_tgetent="-l$i"
3731 break
3732 else
3733   echo "configure: failed program was:" >&5
3734   cat conftest.$ac_ext >&5
3735 fi
3736 rm -f conftest*
3737 done
3738 LIBS="$ac_func_search_save_LIBS"
3739 fi
3740
3741 echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3742 if test "$ac_cv_search_tgetent" != "no"; then
3743   test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3744   
3745 else :
3746   
3747 fi
3748     ;;
3749 esac
3750
3751 # Note: We used to check for libtermlib and libterminfo too, but
3752 # Readline doesn't, so I think we're safe with leaving them out.
3753
3754 echo $ac_n "checking for library containing tgetent""... $ac_c" 1>&6
3755 echo "configure:3756: checking for library containing tgetent" >&5
3756 if eval "test \"`echo '$''{'ac_cv_search_tgetent'+set}'`\" = set"; then
3757   echo $ac_n "(cached) $ac_c" 1>&6
3758 else
3759   ac_func_search_save_LIBS="$LIBS"
3760 ac_cv_search_tgetent="no"
3761 cat > conftest.$ac_ext <<EOF
3762 #line 3763 "configure"
3763 #include "confdefs.h"
3764 /* Override any gcc2 internal prototype to avoid an error.  */
3765 /* We use char because int might match the return type of a gcc2
3766     builtin and then its argument prototype would still apply.  */
3767 char tgetent();
3768
3769 int main() {
3770 tgetent()
3771 ; return 0; }
3772 EOF
3773 if { (eval echo configure:3774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3774   rm -rf conftest*
3775   ac_cv_search_tgetent="none required"
3776 else
3777   echo "configure: failed program was:" >&5
3778   cat conftest.$ac_ext >&5
3779 fi
3780 rm -f conftest*
3781 test "$ac_cv_search_tgetent" = "no" && for i in termcap tinfo ncurses Hcurses curses; do
3782 LIBS="-l$i  $ac_func_search_save_LIBS"
3783 cat > conftest.$ac_ext <<EOF
3784 #line 3785 "configure"
3785 #include "confdefs.h"
3786 /* Override any gcc2 internal prototype to avoid an error.  */
3787 /* We use char because int might match the return type of a gcc2
3788     builtin and then its argument prototype would still apply.  */
3789 char tgetent();
3790
3791 int main() {
3792 tgetent()
3793 ; return 0; }
3794 EOF
3795 if { (eval echo configure:3796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3796   rm -rf conftest*
3797   ac_cv_search_tgetent="-l$i"
3798 break
3799 else
3800   echo "configure: failed program was:" >&5
3801   cat conftest.$ac_ext >&5
3802 fi
3803 rm -f conftest*
3804 done
3805 LIBS="$ac_func_search_save_LIBS"
3806 fi
3807
3808 echo "$ac_t""$ac_cv_search_tgetent" 1>&6
3809 if test "$ac_cv_search_tgetent" != "no"; then
3810   test "$ac_cv_search_tgetent" = "none required" || LIBS="$ac_cv_search_tgetent $LIBS"
3811   
3812 else :
3813   
3814 fi
3815
3816 if test "$ac_cv_search_tgetent" = no; then
3817   { echo "configure: error: no termcap library found" 1>&2; exit 1; }
3818 fi
3819
3820 # ------------------------- #
3821 # Checks for header files.  #
3822 # ------------------------- #
3823
3824 ac_header_dirent=no
3825 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3826 do
3827 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3828 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3829 echo "configure:3830: checking for $ac_hdr that defines DIR" >&5
3830 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
3831   echo $ac_n "(cached) $ac_c" 1>&6
3832 else
3833   cat > conftest.$ac_ext <<EOF
3834 #line 3835 "configure"
3835 #include "confdefs.h"
3836 #include <sys/types.h>
3837 #include <$ac_hdr>
3838 int main() {
3839 DIR *dirp = 0;
3840 ; return 0; }
3841 EOF
3842 if { (eval echo configure:3843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3843   rm -rf conftest*
3844   eval "ac_cv_header_dirent_$ac_safe=yes"
3845 else
3846   echo "configure: failed program was:" >&5
3847   cat conftest.$ac_ext >&5
3848   rm -rf conftest*
3849   eval "ac_cv_header_dirent_$ac_safe=no"
3850 fi
3851 rm -f conftest*
3852 fi
3853 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3854   echo "$ac_t""yes" 1>&6
3855     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3856   cat >> confdefs.h <<EOF
3857 #define $ac_tr_hdr 1
3858 EOF
3859  ac_header_dirent=$ac_hdr; break
3860 else
3861   echo "$ac_t""no" 1>&6
3862 fi
3863 done
3864 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3865 if test $ac_header_dirent = dirent.h; then
3866 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3867 echo "configure:3868: checking for opendir in -ldir" >&5
3868 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3869 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3870   echo $ac_n "(cached) $ac_c" 1>&6
3871 else
3872   ac_save_LIBS="$LIBS"
3873 LIBS="-ldir  $LIBS"
3874 cat > conftest.$ac_ext <<EOF
3875 #line 3876 "configure"
3876 #include "confdefs.h"
3877 /* Override any gcc2 internal prototype to avoid an error.  */
3878 /* We use char because int might match the return type of a gcc2
3879     builtin and then its argument prototype would still apply.  */
3880 char opendir();
3881
3882 int main() {
3883 opendir()
3884 ; return 0; }
3885 EOF
3886 if { (eval echo configure:3887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3887   rm -rf conftest*
3888   eval "ac_cv_lib_$ac_lib_var=yes"
3889 else
3890   echo "configure: failed program was:" >&5
3891   cat conftest.$ac_ext >&5
3892   rm -rf conftest*
3893   eval "ac_cv_lib_$ac_lib_var=no"
3894 fi
3895 rm -f conftest*
3896 LIBS="$ac_save_LIBS"
3897
3898 fi
3899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3900   echo "$ac_t""yes" 1>&6
3901   LIBS="$LIBS -ldir"
3902 else
3903   echo "$ac_t""no" 1>&6
3904 fi
3905
3906 else
3907 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3908 echo "configure:3909: checking for opendir in -lx" >&5
3909 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3910 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3911   echo $ac_n "(cached) $ac_c" 1>&6
3912 else
3913   ac_save_LIBS="$LIBS"
3914 LIBS="-lx  $LIBS"
3915 cat > conftest.$ac_ext <<EOF
3916 #line 3917 "configure"
3917 #include "confdefs.h"
3918 /* Override any gcc2 internal prototype to avoid an error.  */
3919 /* We use char because int might match the return type of a gcc2
3920     builtin and then its argument prototype would still apply.  */
3921 char opendir();
3922
3923 int main() {
3924 opendir()
3925 ; return 0; }
3926 EOF
3927 if { (eval echo configure:3928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3928   rm -rf conftest*
3929   eval "ac_cv_lib_$ac_lib_var=yes"
3930 else
3931   echo "configure: failed program was:" >&5
3932   cat conftest.$ac_ext >&5
3933   rm -rf conftest*
3934   eval "ac_cv_lib_$ac_lib_var=no"
3935 fi
3936 rm -f conftest*
3937 LIBS="$ac_save_LIBS"
3938
3939 fi
3940 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3941   echo "$ac_t""yes" 1>&6
3942   LIBS="$LIBS -lx"
3943 else
3944   echo "$ac_t""no" 1>&6
3945 fi
3946
3947 fi
3948
3949 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
3950 echo "configure:3951: checking whether stat file-mode macros are broken" >&5
3951 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
3952   echo $ac_n "(cached) $ac_c" 1>&6
3953 else
3954   cat > conftest.$ac_ext <<EOF
3955 #line 3956 "configure"
3956 #include "confdefs.h"
3957 #include <sys/types.h>
3958 #include <sys/stat.h>
3959
3960 #if defined(S_ISBLK) && defined(S_IFDIR)
3961 # if S_ISBLK (S_IFDIR)
3962 You lose.
3963 # endif
3964 #endif
3965
3966 #if defined(S_ISBLK) && defined(S_IFCHR)
3967 # if S_ISBLK (S_IFCHR)
3968 You lose.
3969 # endif
3970 #endif
3971
3972 #if defined(S_ISLNK) && defined(S_IFREG)
3973 # if S_ISLNK (S_IFREG)
3974 You lose.
3975 # endif
3976 #endif
3977
3978 #if defined(S_ISSOCK) && defined(S_IFREG)
3979 # if S_ISSOCK (S_IFREG)
3980 You lose.
3981 # endif
3982 #endif
3983
3984 EOF
3985 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3986   egrep "You lose" >/dev/null 2>&1; then
3987   rm -rf conftest*
3988   ac_cv_header_stat_broken=yes
3989 else
3990   rm -rf conftest*
3991   ac_cv_header_stat_broken=no
3992 fi
3993 rm -f conftest*
3994
3995 fi
3996
3997 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3998 if test $ac_cv_header_stat_broken = yes; then
3999   cat >> confdefs.h <<\EOF
4000 #define STAT_MACROS_BROKEN 1
4001 EOF
4002
4003 fi
4004
4005 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4006 echo "configure:4007: checking for ANSI C header files" >&5
4007 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4008   echo $ac_n "(cached) $ac_c" 1>&6
4009 else
4010   cat > conftest.$ac_ext <<EOF
4011 #line 4012 "configure"
4012 #include "confdefs.h"
4013 #include <stdlib.h>
4014 #include <stdarg.h>
4015 #include <string.h>
4016 #include <float.h>
4017 EOF
4018 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4019 { (eval echo configure:4020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4020 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4021 if test -z "$ac_err"; then
4022   rm -rf conftest*
4023   ac_cv_header_stdc=yes
4024 else
4025   echo "$ac_err" >&5
4026   echo "configure: failed program was:" >&5
4027   cat conftest.$ac_ext >&5
4028   rm -rf conftest*
4029   ac_cv_header_stdc=no
4030 fi
4031 rm -f conftest*
4032
4033 if test $ac_cv_header_stdc = yes; then
4034   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4035 cat > conftest.$ac_ext <<EOF
4036 #line 4037 "configure"
4037 #include "confdefs.h"
4038 #include <string.h>
4039 EOF
4040 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4041   egrep "memchr" >/dev/null 2>&1; then
4042   :
4043 else
4044   rm -rf conftest*
4045   ac_cv_header_stdc=no
4046 fi
4047 rm -f conftest*
4048
4049 fi
4050
4051 if test $ac_cv_header_stdc = yes; then
4052   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4053 cat > conftest.$ac_ext <<EOF
4054 #line 4055 "configure"
4055 #include "confdefs.h"
4056 #include <stdlib.h>
4057 EOF
4058 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4059   egrep "free" >/dev/null 2>&1; then
4060   :
4061 else
4062   rm -rf conftest*
4063   ac_cv_header_stdc=no
4064 fi
4065 rm -f conftest*
4066
4067 fi
4068
4069 if test $ac_cv_header_stdc = yes; then
4070   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4071 if test "$cross_compiling" = yes; then
4072   :
4073 else
4074   cat > conftest.$ac_ext <<EOF
4075 #line 4076 "configure"
4076 #include "confdefs.h"
4077 #include <ctype.h>
4078 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4079 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4080 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4081 int main () { int i; for (i = 0; i < 256; i++)
4082 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4083 exit (0); }
4084
4085 EOF
4086 if { (eval echo configure:4087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4087 then
4088   :
4089 else
4090   echo "configure: failed program was:" >&5
4091   cat conftest.$ac_ext >&5
4092   rm -fr conftest*
4093   ac_cv_header_stdc=no
4094 fi
4095 rm -fr conftest*
4096 fi
4097
4098 fi
4099 fi
4100
4101 echo "$ac_t""$ac_cv_header_stdc" 1>&6
4102 if test $ac_cv_header_stdc = yes; then
4103   cat >> confdefs.h <<\EOF
4104 #define STDC_HEADERS 1
4105 EOF
4106
4107 fi
4108
4109 for ac_hdr in link.h
4110 do
4111 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4112 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4113 echo "configure:4114: checking for $ac_hdr" >&5
4114 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4115   echo $ac_n "(cached) $ac_c" 1>&6
4116 else
4117   cat > conftest.$ac_ext <<EOF
4118 #line 4119 "configure"
4119 #include "confdefs.h"
4120 #include <$ac_hdr>
4121 EOF
4122 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4123 { (eval echo configure:4124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4124 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4125 if test -z "$ac_err"; then
4126   rm -rf conftest*
4127   eval "ac_cv_header_$ac_safe=yes"
4128 else
4129   echo "$ac_err" >&5
4130   echo "configure: failed program was:" >&5
4131   cat conftest.$ac_ext >&5
4132   rm -rf conftest*
4133   eval "ac_cv_header_$ac_safe=no"
4134 fi
4135 rm -f conftest*
4136 fi
4137 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4138   echo "$ac_t""yes" 1>&6
4139     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4140   cat >> confdefs.h <<EOF
4141 #define $ac_tr_hdr 1
4142 EOF
4143  
4144 else
4145   echo "$ac_t""no" 1>&6
4146 fi
4147 done
4148
4149 for ac_hdr in nlist.h
4150 do
4151 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4152 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4153 echo "configure:4154: checking for $ac_hdr" >&5
4154 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4155   echo $ac_n "(cached) $ac_c" 1>&6
4156 else
4157   cat > conftest.$ac_ext <<EOF
4158 #line 4159 "configure"
4159 #include "confdefs.h"
4160 #include <$ac_hdr>
4161 EOF
4162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4163 { (eval echo configure:4164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4165 if test -z "$ac_err"; then
4166   rm -rf conftest*
4167   eval "ac_cv_header_$ac_safe=yes"
4168 else
4169   echo "$ac_err" >&5
4170   echo "configure: failed program was:" >&5
4171   cat conftest.$ac_ext >&5
4172   rm -rf conftest*
4173   eval "ac_cv_header_$ac_safe=no"
4174 fi
4175 rm -f conftest*
4176 fi
4177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4178   echo "$ac_t""yes" 1>&6
4179     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4180   cat >> confdefs.h <<EOF
4181 #define $ac_tr_hdr 1
4182 EOF
4183  
4184 else
4185   echo "$ac_t""no" 1>&6
4186 fi
4187 done
4188
4189 for ac_hdr in poll.h sys/poll.h
4190 do
4191 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4192 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4193 echo "configure:4194: checking for $ac_hdr" >&5
4194 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4195   echo $ac_n "(cached) $ac_c" 1>&6
4196 else
4197   cat > conftest.$ac_ext <<EOF
4198 #line 4199 "configure"
4199 #include "confdefs.h"
4200 #include <$ac_hdr>
4201 EOF
4202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4203 { (eval echo configure:4204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4205 if test -z "$ac_err"; then
4206   rm -rf conftest*
4207   eval "ac_cv_header_$ac_safe=yes"
4208 else
4209   echo "$ac_err" >&5
4210   echo "configure: failed program was:" >&5
4211   cat conftest.$ac_ext >&5
4212   rm -rf conftest*
4213   eval "ac_cv_header_$ac_safe=no"
4214 fi
4215 rm -f conftest*
4216 fi
4217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4218   echo "$ac_t""yes" 1>&6
4219     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4220   cat >> confdefs.h <<EOF
4221 #define $ac_tr_hdr 1
4222 EOF
4223  
4224 else
4225   echo "$ac_t""no" 1>&6
4226 fi
4227 done
4228
4229 for ac_hdr in proc_service.h thread_db.h
4230 do
4231 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4232 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4233 echo "configure:4234: checking for $ac_hdr" >&5
4234 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4235   echo $ac_n "(cached) $ac_c" 1>&6
4236 else
4237   cat > conftest.$ac_ext <<EOF
4238 #line 4239 "configure"
4239 #include "confdefs.h"
4240 #include <$ac_hdr>
4241 EOF
4242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4243 { (eval echo configure:4244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4244 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4245 if test -z "$ac_err"; then
4246   rm -rf conftest*
4247   eval "ac_cv_header_$ac_safe=yes"
4248 else
4249   echo "$ac_err" >&5
4250   echo "configure: failed program was:" >&5
4251   cat conftest.$ac_ext >&5
4252   rm -rf conftest*
4253   eval "ac_cv_header_$ac_safe=no"
4254 fi
4255 rm -f conftest*
4256 fi
4257 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4258   echo "$ac_t""yes" 1>&6
4259     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4260   cat >> confdefs.h <<EOF
4261 #define $ac_tr_hdr 1
4262 EOF
4263  
4264 else
4265   echo "$ac_t""no" 1>&6
4266 fi
4267 done
4268
4269 for ac_hdr in stddef.h
4270 do
4271 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4272 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4273 echo "configure:4274: checking for $ac_hdr" >&5
4274 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4275   echo $ac_n "(cached) $ac_c" 1>&6
4276 else
4277   cat > conftest.$ac_ext <<EOF
4278 #line 4279 "configure"
4279 #include "confdefs.h"
4280 #include <$ac_hdr>
4281 EOF
4282 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4283 { (eval echo configure:4284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4284 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4285 if test -z "$ac_err"; then
4286   rm -rf conftest*
4287   eval "ac_cv_header_$ac_safe=yes"
4288 else
4289   echo "$ac_err" >&5
4290   echo "configure: failed program was:" >&5
4291   cat conftest.$ac_ext >&5
4292   rm -rf conftest*
4293   eval "ac_cv_header_$ac_safe=no"
4294 fi
4295 rm -f conftest*
4296 fi
4297 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4298   echo "$ac_t""yes" 1>&6
4299     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4300   cat >> confdefs.h <<EOF
4301 #define $ac_tr_hdr 1
4302 EOF
4303  
4304 else
4305   echo "$ac_t""no" 1>&6
4306 fi
4307 done
4308
4309 for ac_hdr in stdlib.h
4310 do
4311 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4312 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4313 echo "configure:4314: checking for $ac_hdr" >&5
4314 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4315   echo $ac_n "(cached) $ac_c" 1>&6
4316 else
4317   cat > conftest.$ac_ext <<EOF
4318 #line 4319 "configure"
4319 #include "confdefs.h"
4320 #include <$ac_hdr>
4321 EOF
4322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4323 { (eval echo configure:4324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4325 if test -z "$ac_err"; then
4326   rm -rf conftest*
4327   eval "ac_cv_header_$ac_safe=yes"
4328 else
4329   echo "$ac_err" >&5
4330   echo "configure: failed program was:" >&5
4331   cat conftest.$ac_ext >&5
4332   rm -rf conftest*
4333   eval "ac_cv_header_$ac_safe=no"
4334 fi
4335 rm -f conftest*
4336 fi
4337 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4338   echo "$ac_t""yes" 1>&6
4339     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4340   cat >> confdefs.h <<EOF
4341 #define $ac_tr_hdr 1
4342 EOF
4343  
4344 else
4345   echo "$ac_t""no" 1>&6
4346 fi
4347 done
4348
4349 for ac_hdr in stdint.h
4350 do
4351 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4352 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4353 echo "configure:4354: checking for $ac_hdr" >&5
4354 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4355   echo $ac_n "(cached) $ac_c" 1>&6
4356 else
4357   cat > conftest.$ac_ext <<EOF
4358 #line 4359 "configure"
4359 #include "confdefs.h"
4360 #include <$ac_hdr>
4361 EOF
4362 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4363 { (eval echo configure:4364: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4364 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4365 if test -z "$ac_err"; then
4366   rm -rf conftest*
4367   eval "ac_cv_header_$ac_safe=yes"
4368 else
4369   echo "$ac_err" >&5
4370   echo "configure: failed program was:" >&5
4371   cat conftest.$ac_ext >&5
4372   rm -rf conftest*
4373   eval "ac_cv_header_$ac_safe=no"
4374 fi
4375 rm -f conftest*
4376 fi
4377 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4378   echo "$ac_t""yes" 1>&6
4379     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4380   cat >> confdefs.h <<EOF
4381 #define $ac_tr_hdr 1
4382 EOF
4383  
4384 else
4385   echo "$ac_t""no" 1>&6
4386 fi
4387 done
4388
4389 for ac_hdr in string.h memory.h strings.h
4390 do
4391 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4392 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4393 echo "configure:4394: checking for $ac_hdr" >&5
4394 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4395   echo $ac_n "(cached) $ac_c" 1>&6
4396 else
4397   cat > conftest.$ac_ext <<EOF
4398 #line 4399 "configure"
4399 #include "confdefs.h"
4400 #include <$ac_hdr>
4401 EOF
4402 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4403 { (eval echo configure:4404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4404 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4405 if test -z "$ac_err"; then
4406   rm -rf conftest*
4407   eval "ac_cv_header_$ac_safe=yes"
4408 else
4409   echo "$ac_err" >&5
4410   echo "configure: failed program was:" >&5
4411   cat conftest.$ac_ext >&5
4412   rm -rf conftest*
4413   eval "ac_cv_header_$ac_safe=no"
4414 fi
4415 rm -f conftest*
4416 fi
4417 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4418   echo "$ac_t""yes" 1>&6
4419     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4420   cat >> confdefs.h <<EOF
4421 #define $ac_tr_hdr 1
4422 EOF
4423  
4424 else
4425   echo "$ac_t""no" 1>&6
4426 fi
4427 done
4428
4429 for ac_hdr in sys/fault.h
4430 do
4431 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4432 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4433 echo "configure:4434: checking for $ac_hdr" >&5
4434 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4435   echo $ac_n "(cached) $ac_c" 1>&6
4436 else
4437   cat > conftest.$ac_ext <<EOF
4438 #line 4439 "configure"
4439 #include "confdefs.h"
4440 #include <$ac_hdr>
4441 EOF
4442 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4443 { (eval echo configure:4444: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4444 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4445 if test -z "$ac_err"; then
4446   rm -rf conftest*
4447   eval "ac_cv_header_$ac_safe=yes"
4448 else
4449   echo "$ac_err" >&5
4450   echo "configure: failed program was:" >&5
4451   cat conftest.$ac_ext >&5
4452   rm -rf conftest*
4453   eval "ac_cv_header_$ac_safe=no"
4454 fi
4455 rm -f conftest*
4456 fi
4457 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4458   echo "$ac_t""yes" 1>&6
4459     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4460   cat >> confdefs.h <<EOF
4461 #define $ac_tr_hdr 1
4462 EOF
4463  
4464 else
4465   echo "$ac_t""no" 1>&6
4466 fi
4467 done
4468
4469 for ac_hdr in sys/file.h
4470 do
4471 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4472 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4473 echo "configure:4474: checking for $ac_hdr" >&5
4474 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4475   echo $ac_n "(cached) $ac_c" 1>&6
4476 else
4477   cat > conftest.$ac_ext <<EOF
4478 #line 4479 "configure"
4479 #include "confdefs.h"
4480 #include <$ac_hdr>
4481 EOF
4482 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4483 { (eval echo configure:4484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4484 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4485 if test -z "$ac_err"; then
4486   rm -rf conftest*
4487   eval "ac_cv_header_$ac_safe=yes"
4488 else
4489   echo "$ac_err" >&5
4490   echo "configure: failed program was:" >&5
4491   cat conftest.$ac_ext >&5
4492   rm -rf conftest*
4493   eval "ac_cv_header_$ac_safe=no"
4494 fi
4495 rm -f conftest*
4496 fi
4497 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4498   echo "$ac_t""yes" 1>&6
4499     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4500   cat >> confdefs.h <<EOF
4501 #define $ac_tr_hdr 1
4502 EOF
4503  
4504 else
4505   echo "$ac_t""no" 1>&6
4506 fi
4507 done
4508
4509 for ac_hdr in sys/filio.h
4510 do
4511 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4512 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4513 echo "configure:4514: checking for $ac_hdr" >&5
4514 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4515   echo $ac_n "(cached) $ac_c" 1>&6
4516 else
4517   cat > conftest.$ac_ext <<EOF
4518 #line 4519 "configure"
4519 #include "confdefs.h"
4520 #include <$ac_hdr>
4521 EOF
4522 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4523 { (eval echo configure:4524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4524 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4525 if test -z "$ac_err"; then
4526   rm -rf conftest*
4527   eval "ac_cv_header_$ac_safe=yes"
4528 else
4529   echo "$ac_err" >&5
4530   echo "configure: failed program was:" >&5
4531   cat conftest.$ac_ext >&5
4532   rm -rf conftest*
4533   eval "ac_cv_header_$ac_safe=no"
4534 fi
4535 rm -f conftest*
4536 fi
4537 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4538   echo "$ac_t""yes" 1>&6
4539     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4540   cat >> confdefs.h <<EOF
4541 #define $ac_tr_hdr 1
4542 EOF
4543  
4544 else
4545   echo "$ac_t""no" 1>&6
4546 fi
4547 done
4548
4549 for ac_hdr in sys/ioctl.h
4550 do
4551 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4552 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4553 echo "configure:4554: checking for $ac_hdr" >&5
4554 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4555   echo $ac_n "(cached) $ac_c" 1>&6
4556 else
4557   cat > conftest.$ac_ext <<EOF
4558 #line 4559 "configure"
4559 #include "confdefs.h"
4560 #include <$ac_hdr>
4561 EOF
4562 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4563 { (eval echo configure:4564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4564 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4565 if test -z "$ac_err"; then
4566   rm -rf conftest*
4567   eval "ac_cv_header_$ac_safe=yes"
4568 else
4569   echo "$ac_err" >&5
4570   echo "configure: failed program was:" >&5
4571   cat conftest.$ac_ext >&5
4572   rm -rf conftest*
4573   eval "ac_cv_header_$ac_safe=no"
4574 fi
4575 rm -f conftest*
4576 fi
4577 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4578   echo "$ac_t""yes" 1>&6
4579     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4580   cat >> confdefs.h <<EOF
4581 #define $ac_tr_hdr 1
4582 EOF
4583  
4584 else
4585   echo "$ac_t""no" 1>&6
4586 fi
4587 done
4588
4589 for ac_hdr in sys/param.h
4590 do
4591 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4592 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4593 echo "configure:4594: checking for $ac_hdr" >&5
4594 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4595   echo $ac_n "(cached) $ac_c" 1>&6
4596 else
4597   cat > conftest.$ac_ext <<EOF
4598 #line 4599 "configure"
4599 #include "confdefs.h"
4600 #include <$ac_hdr>
4601 EOF
4602 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4603 { (eval echo configure:4604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4604 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4605 if test -z "$ac_err"; then
4606   rm -rf conftest*
4607   eval "ac_cv_header_$ac_safe=yes"
4608 else
4609   echo "$ac_err" >&5
4610   echo "configure: failed program was:" >&5
4611   cat conftest.$ac_ext >&5
4612   rm -rf conftest*
4613   eval "ac_cv_header_$ac_safe=no"
4614 fi
4615 rm -f conftest*
4616 fi
4617 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4618   echo "$ac_t""yes" 1>&6
4619     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4620   cat >> confdefs.h <<EOF
4621 #define $ac_tr_hdr 1
4622 EOF
4623  
4624 else
4625   echo "$ac_t""no" 1>&6
4626 fi
4627 done
4628
4629 for ac_hdr in sys/proc.h
4630 do
4631 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4632 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4633 echo "configure:4634: checking for $ac_hdr" >&5
4634 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4635   echo $ac_n "(cached) $ac_c" 1>&6
4636 else
4637   cat > conftest.$ac_ext <<EOF
4638 #line 4639 "configure"
4639 #include "confdefs.h"
4640 #include <$ac_hdr>
4641 EOF
4642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4643 { (eval echo configure:4644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4644 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4645 if test -z "$ac_err"; then
4646   rm -rf conftest*
4647   eval "ac_cv_header_$ac_safe=yes"
4648 else
4649   echo "$ac_err" >&5
4650   echo "configure: failed program was:" >&5
4651   cat conftest.$ac_ext >&5
4652   rm -rf conftest*
4653   eval "ac_cv_header_$ac_safe=no"
4654 fi
4655 rm -f conftest*
4656 fi
4657 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4658   echo "$ac_t""yes" 1>&6
4659     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4660   cat >> confdefs.h <<EOF
4661 #define $ac_tr_hdr 1
4662 EOF
4663  
4664 else
4665   echo "$ac_t""no" 1>&6
4666 fi
4667 done
4668
4669 for ac_hdr in sys/procfs.h
4670 do
4671 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4672 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4673 echo "configure:4674: checking for $ac_hdr" >&5
4674 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4675   echo $ac_n "(cached) $ac_c" 1>&6
4676 else
4677   cat > conftest.$ac_ext <<EOF
4678 #line 4679 "configure"
4679 #include "confdefs.h"
4680 #include <$ac_hdr>
4681 EOF
4682 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4683 { (eval echo configure:4684: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4684 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4685 if test -z "$ac_err"; then
4686   rm -rf conftest*
4687   eval "ac_cv_header_$ac_safe=yes"
4688 else
4689   echo "$ac_err" >&5
4690   echo "configure: failed program was:" >&5
4691   cat conftest.$ac_ext >&5
4692   rm -rf conftest*
4693   eval "ac_cv_header_$ac_safe=no"
4694 fi
4695 rm -f conftest*
4696 fi
4697 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4698   echo "$ac_t""yes" 1>&6
4699     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4700   cat >> confdefs.h <<EOF
4701 #define $ac_tr_hdr 1
4702 EOF
4703  
4704 else
4705   echo "$ac_t""no" 1>&6
4706 fi
4707 done
4708
4709 for ac_hdr in sys/ptrace.h ptrace.h
4710 do
4711 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4712 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4713 echo "configure:4714: checking for $ac_hdr" >&5
4714 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4715   echo $ac_n "(cached) $ac_c" 1>&6
4716 else
4717   cat > conftest.$ac_ext <<EOF
4718 #line 4719 "configure"
4719 #include "confdefs.h"
4720 #include <$ac_hdr>
4721 EOF
4722 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4723 { (eval echo configure:4724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4724 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4725 if test -z "$ac_err"; then
4726   rm -rf conftest*
4727   eval "ac_cv_header_$ac_safe=yes"
4728 else
4729   echo "$ac_err" >&5
4730   echo "configure: failed program was:" >&5
4731   cat conftest.$ac_ext >&5
4732   rm -rf conftest*
4733   eval "ac_cv_header_$ac_safe=no"
4734 fi
4735 rm -f conftest*
4736 fi
4737 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4738   echo "$ac_t""yes" 1>&6
4739     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4740   cat >> confdefs.h <<EOF
4741 #define $ac_tr_hdr 1
4742 EOF
4743  
4744 else
4745   echo "$ac_t""no" 1>&6
4746 fi
4747 done
4748
4749 for ac_hdr in sys/reg.h sys/debugreg.h
4750 do
4751 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4752 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4753 echo "configure:4754: checking for $ac_hdr" >&5
4754 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4755   echo $ac_n "(cached) $ac_c" 1>&6
4756 else
4757   cat > conftest.$ac_ext <<EOF
4758 #line 4759 "configure"
4759 #include "confdefs.h"
4760 #include <$ac_hdr>
4761 EOF
4762 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4763 { (eval echo configure:4764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4764 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4765 if test -z "$ac_err"; then
4766   rm -rf conftest*
4767   eval "ac_cv_header_$ac_safe=yes"
4768 else
4769   echo "$ac_err" >&5
4770   echo "configure: failed program was:" >&5
4771   cat conftest.$ac_ext >&5
4772   rm -rf conftest*
4773   eval "ac_cv_header_$ac_safe=no"
4774 fi
4775 rm -f conftest*
4776 fi
4777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4778   echo "$ac_t""yes" 1>&6
4779     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4780   cat >> confdefs.h <<EOF
4781 #define $ac_tr_hdr 1
4782 EOF
4783  
4784 else
4785   echo "$ac_t""no" 1>&6
4786 fi
4787 done
4788
4789 for ac_hdr in sys/select.h
4790 do
4791 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4792 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4793 echo "configure:4794: checking for $ac_hdr" >&5
4794 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4795   echo $ac_n "(cached) $ac_c" 1>&6
4796 else
4797   cat > conftest.$ac_ext <<EOF
4798 #line 4799 "configure"
4799 #include "confdefs.h"
4800 #include <$ac_hdr>
4801 EOF
4802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4803 { (eval echo configure:4804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4805 if test -z "$ac_err"; then
4806   rm -rf conftest*
4807   eval "ac_cv_header_$ac_safe=yes"
4808 else
4809   echo "$ac_err" >&5
4810   echo "configure: failed program was:" >&5
4811   cat conftest.$ac_ext >&5
4812   rm -rf conftest*
4813   eval "ac_cv_header_$ac_safe=no"
4814 fi
4815 rm -f conftest*
4816 fi
4817 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4818   echo "$ac_t""yes" 1>&6
4819     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4820   cat >> confdefs.h <<EOF
4821 #define $ac_tr_hdr 1
4822 EOF
4823  
4824 else
4825   echo "$ac_t""no" 1>&6
4826 fi
4827 done
4828
4829 for ac_hdr in sys/syscall.h
4830 do
4831 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4832 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4833 echo "configure:4834: checking for $ac_hdr" >&5
4834 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4835   echo $ac_n "(cached) $ac_c" 1>&6
4836 else
4837   cat > conftest.$ac_ext <<EOF
4838 #line 4839 "configure"
4839 #include "confdefs.h"
4840 #include <$ac_hdr>
4841 EOF
4842 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4843 { (eval echo configure:4844: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4844 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4845 if test -z "$ac_err"; then
4846   rm -rf conftest*
4847   eval "ac_cv_header_$ac_safe=yes"
4848 else
4849   echo "$ac_err" >&5
4850   echo "configure: failed program was:" >&5
4851   cat conftest.$ac_ext >&5
4852   rm -rf conftest*
4853   eval "ac_cv_header_$ac_safe=no"
4854 fi
4855 rm -f conftest*
4856 fi
4857 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4858   echo "$ac_t""yes" 1>&6
4859     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4860   cat >> confdefs.h <<EOF
4861 #define $ac_tr_hdr 1
4862 EOF
4863  
4864 else
4865   echo "$ac_t""no" 1>&6
4866 fi
4867 done
4868
4869 for ac_hdr in sys/user.h
4870 do
4871 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4872 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4873 echo "configure:4874: checking for $ac_hdr" >&5
4874 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4875   echo $ac_n "(cached) $ac_c" 1>&6
4876 else
4877   cat > conftest.$ac_ext <<EOF
4878 #line 4879 "configure"
4879 #include "confdefs.h"
4880 #include <$ac_hdr>
4881 EOF
4882 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4883 { (eval echo configure:4884: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4884 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4885 if test -z "$ac_err"; then
4886   rm -rf conftest*
4887   eval "ac_cv_header_$ac_safe=yes"
4888 else
4889   echo "$ac_err" >&5
4890   echo "configure: failed program was:" >&5
4891   cat conftest.$ac_ext >&5
4892   rm -rf conftest*
4893   eval "ac_cv_header_$ac_safe=no"
4894 fi
4895 rm -f conftest*
4896 fi
4897 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4898   echo "$ac_t""yes" 1>&6
4899     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4900   cat >> confdefs.h <<EOF
4901 #define $ac_tr_hdr 1
4902 EOF
4903  
4904 else
4905   echo "$ac_t""no" 1>&6
4906 fi
4907 done
4908
4909 for ac_hdr in sys/wait.h wait.h
4910 do
4911 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4912 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4913 echo "configure:4914: checking for $ac_hdr" >&5
4914 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4915   echo $ac_n "(cached) $ac_c" 1>&6
4916 else
4917   cat > conftest.$ac_ext <<EOF
4918 #line 4919 "configure"
4919 #include "confdefs.h"
4920 #include <$ac_hdr>
4921 EOF
4922 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4923 { (eval echo configure:4924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4924 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4925 if test -z "$ac_err"; then
4926   rm -rf conftest*
4927   eval "ac_cv_header_$ac_safe=yes"
4928 else
4929   echo "$ac_err" >&5
4930   echo "configure: failed program was:" >&5
4931   cat conftest.$ac_ext >&5
4932   rm -rf conftest*
4933   eval "ac_cv_header_$ac_safe=no"
4934 fi
4935 rm -f conftest*
4936 fi
4937 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4938   echo "$ac_t""yes" 1>&6
4939     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4940   cat >> confdefs.h <<EOF
4941 #define $ac_tr_hdr 1
4942 EOF
4943  
4944 else
4945   echo "$ac_t""no" 1>&6
4946 fi
4947 done
4948
4949 for ac_hdr in termios.h termio.h sgtty.h
4950 do
4951 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4952 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4953 echo "configure:4954: checking for $ac_hdr" >&5
4954 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4955   echo $ac_n "(cached) $ac_c" 1>&6
4956 else
4957   cat > conftest.$ac_ext <<EOF
4958 #line 4959 "configure"
4959 #include "confdefs.h"
4960 #include <$ac_hdr>
4961 EOF
4962 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4963 { (eval echo configure:4964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4964 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4965 if test -z "$ac_err"; then
4966   rm -rf conftest*
4967   eval "ac_cv_header_$ac_safe=yes"
4968 else
4969   echo "$ac_err" >&5
4970   echo "configure: failed program was:" >&5
4971   cat conftest.$ac_ext >&5
4972   rm -rf conftest*
4973   eval "ac_cv_header_$ac_safe=no"
4974 fi
4975 rm -f conftest*
4976 fi
4977 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4978   echo "$ac_t""yes" 1>&6
4979     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4980   cat >> confdefs.h <<EOF
4981 #define $ac_tr_hdr 1
4982 EOF
4983  
4984 else
4985   echo "$ac_t""no" 1>&6
4986 fi
4987 done
4988
4989 for ac_hdr in unistd.h
4990 do
4991 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4992 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4993 echo "configure:4994: checking for $ac_hdr" >&5
4994 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4995   echo $ac_n "(cached) $ac_c" 1>&6
4996 else
4997   cat > conftest.$ac_ext <<EOF
4998 #line 4999 "configure"
4999 #include "confdefs.h"
5000 #include <$ac_hdr>
5001 EOF
5002 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5003 { (eval echo configure:5004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5004 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5005 if test -z "$ac_err"; then
5006   rm -rf conftest*
5007   eval "ac_cv_header_$ac_safe=yes"
5008 else
5009   echo "$ac_err" >&5
5010   echo "configure: failed program was:" >&5
5011   cat conftest.$ac_ext >&5
5012   rm -rf conftest*
5013   eval "ac_cv_header_$ac_safe=no"
5014 fi
5015 rm -f conftest*
5016 fi
5017 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5018   echo "$ac_t""yes" 1>&6
5019     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5020   cat >> confdefs.h <<EOF
5021 #define $ac_tr_hdr 1
5022 EOF
5023  
5024 else
5025   echo "$ac_t""no" 1>&6
5026 fi
5027 done
5028
5029
5030 # On Solaris 2.[78], we need to define _MSE_INT_H to avoid a clash
5031 # between <widec.h> and <wchar.h> that would cause AC_CHECK_HEADERS to
5032 # think that we don't have <curses.h> if we're using GCC.
5033 case $host_os in
5034   solaris2.[78])
5035     if test "$GCC" = yes; then
5036       cat >> confdefs.h <<\EOF
5037 #define _MSE_INT_H 1
5038 EOF
5039
5040     fi ;;
5041 esac
5042 for ac_hdr in curses.h ncurses.h term.h
5043 do
5044 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5045 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5046 echo "configure:5047: checking for $ac_hdr" >&5
5047 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5048   echo $ac_n "(cached) $ac_c" 1>&6
5049 else
5050   cat > conftest.$ac_ext <<EOF
5051 #line 5052 "configure"
5052 #include "confdefs.h"
5053 #include <$ac_hdr>
5054 EOF
5055 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5056 { (eval echo configure:5057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5057 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5058 if test -z "$ac_err"; then
5059   rm -rf conftest*
5060   eval "ac_cv_header_$ac_safe=yes"
5061 else
5062   echo "$ac_err" >&5
5063   echo "configure: failed program was:" >&5
5064   cat conftest.$ac_ext >&5
5065   rm -rf conftest*
5066   eval "ac_cv_header_$ac_safe=no"
5067 fi
5068 rm -f conftest*
5069 fi
5070 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5071   echo "$ac_t""yes" 1>&6
5072     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5073   cat >> confdefs.h <<EOF
5074 #define $ac_tr_hdr 1
5075 EOF
5076  
5077 else
5078   echo "$ac_t""no" 1>&6
5079 fi
5080 done
5081
5082
5083 # FIXME: kettenis/20030102: In most cases we include these
5084 # unconditionally, so what's the point in checking these?
5085 for ac_hdr in ctype.h time.h
5086 do
5087 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5088 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5089 echo "configure:5090: checking for $ac_hdr" >&5
5090 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5091   echo $ac_n "(cached) $ac_c" 1>&6
5092 else
5093   cat > conftest.$ac_ext <<EOF
5094 #line 5095 "configure"
5095 #include "confdefs.h"
5096 #include <$ac_hdr>
5097 EOF
5098 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5099 { (eval echo configure:5100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5100 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5101 if test -z "$ac_err"; then
5102   rm -rf conftest*
5103   eval "ac_cv_header_$ac_safe=yes"
5104 else
5105   echo "$ac_err" >&5
5106   echo "configure: failed program was:" >&5
5107   cat conftest.$ac_ext >&5
5108   rm -rf conftest*
5109   eval "ac_cv_header_$ac_safe=no"
5110 fi
5111 rm -f conftest*
5112 fi
5113 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5114   echo "$ac_t""yes" 1>&6
5115     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5116   cat >> confdefs.h <<EOF
5117 #define $ac_tr_hdr 1
5118 EOF
5119  
5120 else
5121   echo "$ac_t""no" 1>&6
5122 fi
5123 done
5124
5125
5126 # ------------------ #
5127 # Checks for types.  #
5128 # ------------------ #
5129
5130 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
5131 echo "configure:5132: checking return type of signal handlers" >&5
5132 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
5133   echo $ac_n "(cached) $ac_c" 1>&6
5134 else
5135   cat > conftest.$ac_ext <<EOF
5136 #line 5137 "configure"
5137 #include "confdefs.h"
5138 #include <sys/types.h>
5139 #include <signal.h>
5140 #ifdef signal
5141 #undef signal
5142 #endif
5143 #ifdef __cplusplus
5144 extern "C" void (*signal (int, void (*)(int)))(int);
5145 #else
5146 void (*signal ()) ();
5147 #endif
5148
5149 int main() {
5150 int i;
5151 ; return 0; }
5152 EOF
5153 if { (eval echo configure:5154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5154   rm -rf conftest*
5155   ac_cv_type_signal=void
5156 else
5157   echo "configure: failed program was:" >&5
5158   cat conftest.$ac_ext >&5
5159   rm -rf conftest*
5160   ac_cv_type_signal=int
5161 fi
5162 rm -f conftest*
5163 fi
5164
5165 echo "$ac_t""$ac_cv_type_signal" 1>&6
5166 cat >> confdefs.h <<EOF
5167 #define RETSIGTYPE $ac_cv_type_signal
5168 EOF
5169
5170
5171
5172 # ------------------------------------- #
5173 # Checks for compiler characteristics.  #
5174 # ------------------------------------- #
5175
5176 echo $ac_n "checking for working const""... $ac_c" 1>&6
5177 echo "configure:5178: checking for working const" >&5
5178 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5179   echo $ac_n "(cached) $ac_c" 1>&6
5180 else
5181   cat > conftest.$ac_ext <<EOF
5182 #line 5183 "configure"
5183 #include "confdefs.h"
5184
5185 int main() {
5186
5187 /* Ultrix mips cc rejects this.  */
5188 typedef int charset[2]; const charset x;
5189 /* SunOS 4.1.1 cc rejects this.  */
5190 char const *const *ccp;
5191 char **p;
5192 /* NEC SVR4.0.2 mips cc rejects this.  */
5193 struct point {int x, y;};
5194 static struct point const zero = {0,0};
5195 /* AIX XL C 1.02.0.0 rejects this.
5196    It does not let you subtract one const X* pointer from another in an arm
5197    of an if-expression whose if-part is not a constant expression */
5198 const char *g = "string";
5199 ccp = &g + (g ? g-g : 0);
5200 /* HPUX 7.0 cc rejects these. */
5201 ++ccp;
5202 p = (char**) ccp;
5203 ccp = (char const *const *) p;
5204 { /* SCO 3.2v4 cc rejects this.  */
5205   char *t;
5206   char const *s = 0 ? (char *) 0 : (char const *) 0;
5207
5208   *t++ = 0;
5209 }
5210 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
5211   int x[] = {25, 17};
5212   const int *foo = &x[0];
5213   ++foo;
5214 }
5215 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5216   typedef const int *iptr;
5217   iptr p = 0;
5218   ++p;
5219 }
5220 { /* AIX XL C 1.02.0.0 rejects this saying
5221      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5222   struct s { int j; const int *ap[3]; };
5223   struct s *b; b->j = 5;
5224 }
5225 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5226   const int foo = 10;
5227 }
5228
5229 ; return 0; }
5230 EOF
5231 if { (eval echo configure:5232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5232   rm -rf conftest*
5233   ac_cv_c_const=yes
5234 else
5235   echo "configure: failed program was:" >&5
5236   cat conftest.$ac_ext >&5
5237   rm -rf conftest*
5238   ac_cv_c_const=no
5239 fi
5240 rm -f conftest*
5241 fi
5242
5243 echo "$ac_t""$ac_cv_c_const" 1>&6
5244 if test $ac_cv_c_const = no; then
5245   cat >> confdefs.h <<\EOF
5246 #define const 
5247 EOF
5248
5249 fi
5250
5251 echo $ac_n "checking for inline""... $ac_c" 1>&6
5252 echo "configure:5253: checking for inline" >&5
5253 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5254   echo $ac_n "(cached) $ac_c" 1>&6
5255 else
5256   ac_cv_c_inline=no
5257 for ac_kw in inline __inline__ __inline; do
5258   cat > conftest.$ac_ext <<EOF
5259 #line 5260 "configure"
5260 #include "confdefs.h"
5261
5262 int main() {
5263 } $ac_kw foo() {
5264 ; return 0; }
5265 EOF
5266 if { (eval echo configure:5267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5267   rm -rf conftest*
5268   ac_cv_c_inline=$ac_kw; break
5269 else
5270   echo "configure: failed program was:" >&5
5271   cat conftest.$ac_ext >&5
5272 fi
5273 rm -f conftest*
5274 done
5275
5276 fi
5277
5278 echo "$ac_t""$ac_cv_c_inline" 1>&6
5279 case "$ac_cv_c_inline" in
5280   inline | yes) ;;
5281   no) cat >> confdefs.h <<\EOF
5282 #define inline 
5283 EOF
5284  ;;
5285   *)  cat >> confdefs.h <<EOF
5286 #define inline $ac_cv_c_inline
5287 EOF
5288  ;;
5289 esac
5290
5291
5292 # ------------------------------ #
5293 # Checks for library functions.  #
5294 # ------------------------------ #
5295
5296 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
5297 # for constant arguments.  Useless!
5298 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
5299 echo "configure:5300: checking for working alloca.h" >&5
5300 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
5301   echo $ac_n "(cached) $ac_c" 1>&6
5302 else
5303   cat > conftest.$ac_ext <<EOF
5304 #line 5305 "configure"
5305 #include "confdefs.h"
5306 #include <alloca.h>
5307 int main() {
5308 char *p = alloca(2 * sizeof(int));
5309 ; return 0; }
5310 EOF
5311 if { (eval echo configure:5312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5312   rm -rf conftest*
5313   ac_cv_header_alloca_h=yes
5314 else
5315   echo "configure: failed program was:" >&5
5316   cat conftest.$ac_ext >&5
5317   rm -rf conftest*
5318   ac_cv_header_alloca_h=no
5319 fi
5320 rm -f conftest*
5321 fi
5322
5323 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
5324 if test $ac_cv_header_alloca_h = yes; then
5325   cat >> confdefs.h <<\EOF
5326 #define HAVE_ALLOCA_H 1
5327 EOF
5328
5329 fi
5330
5331 echo $ac_n "checking for alloca""... $ac_c" 1>&6
5332 echo "configure:5333: checking for alloca" >&5
5333 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
5334   echo $ac_n "(cached) $ac_c" 1>&6
5335 else
5336   cat > conftest.$ac_ext <<EOF
5337 #line 5338 "configure"
5338 #include "confdefs.h"
5339
5340 #ifdef __GNUC__
5341 # define alloca __builtin_alloca
5342 #else
5343 # ifdef _MSC_VER
5344 #  include <malloc.h>
5345 #  define alloca _alloca
5346 # else
5347 #  if HAVE_ALLOCA_H
5348 #   include <alloca.h>
5349 #  else
5350 #   ifdef _AIX
5351  #pragma alloca
5352 #   else
5353 #    ifndef alloca /* predefined by HP cc +Olibcalls */
5354 char *alloca ();
5355 #    endif
5356 #   endif
5357 #  endif
5358 # endif
5359 #endif
5360
5361 int main() {
5362 char *p = (char *) alloca(1);
5363 ; return 0; }
5364 EOF
5365 if { (eval echo configure:5366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5366   rm -rf conftest*
5367   ac_cv_func_alloca_works=yes
5368 else
5369   echo "configure: failed program was:" >&5
5370   cat conftest.$ac_ext >&5
5371   rm -rf conftest*
5372   ac_cv_func_alloca_works=no
5373 fi
5374 rm -f conftest*
5375 fi
5376
5377 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
5378 if test $ac_cv_func_alloca_works = yes; then
5379   cat >> confdefs.h <<\EOF
5380 #define HAVE_ALLOCA 1
5381 EOF
5382
5383 fi
5384
5385 if test $ac_cv_func_alloca_works = no; then
5386   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
5387   # that cause trouble.  Some versions do not even contain alloca or
5388   # contain a buggy version.  If you still want to use their alloca,
5389   # use ar to extract alloca.o from them instead of compiling alloca.c.
5390   ALLOCA=alloca.${ac_objext}
5391   cat >> confdefs.h <<\EOF
5392 #define C_ALLOCA 1
5393 EOF
5394
5395
5396 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
5397 echo "configure:5398: checking whether alloca needs Cray hooks" >&5
5398 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
5399   echo $ac_n "(cached) $ac_c" 1>&6
5400 else
5401   cat > conftest.$ac_ext <<EOF
5402 #line 5403 "configure"
5403 #include "confdefs.h"
5404 #if defined(CRAY) && ! defined(CRAY2)
5405 webecray
5406 #else
5407 wenotbecray
5408 #endif
5409
5410 EOF
5411 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5412   egrep "webecray" >/dev/null 2>&1; then
5413   rm -rf conftest*
5414   ac_cv_os_cray=yes
5415 else
5416   rm -rf conftest*
5417   ac_cv_os_cray=no
5418 fi
5419 rm -f conftest*
5420
5421 fi
5422
5423 echo "$ac_t""$ac_cv_os_cray" 1>&6
5424 if test $ac_cv_os_cray = yes; then
5425 for ac_func in _getb67 GETB67 getb67; do
5426   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5427 echo "configure:5428: checking for $ac_func" >&5
5428 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5429   echo $ac_n "(cached) $ac_c" 1>&6
5430 else
5431   cat > conftest.$ac_ext <<EOF
5432 #line 5433 "configure"
5433 #include "confdefs.h"
5434 /* System header to define __stub macros and hopefully few prototypes,
5435     which can conflict with char $ac_func(); below.  */
5436 #include <assert.h>
5437 /* Override any gcc2 internal prototype to avoid an error.  */
5438 /* We use char because int might match the return type of a gcc2
5439     builtin and then its argument prototype would still apply.  */
5440 char $ac_func();
5441
5442 int main() {
5443
5444 /* The GNU C library defines this for functions which it implements
5445     to always fail with ENOSYS.  Some functions are actually named
5446     something starting with __ and the normal name is an alias.  */
5447 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5448 choke me
5449 #else
5450 $ac_func();
5451 #endif
5452
5453 ; return 0; }
5454 EOF
5455 if { (eval echo configure:5456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5456   rm -rf conftest*
5457   eval "ac_cv_func_$ac_func=yes"
5458 else
5459   echo "configure: failed program was:" >&5
5460   cat conftest.$ac_ext >&5
5461   rm -rf conftest*
5462   eval "ac_cv_func_$ac_func=no"
5463 fi
5464 rm -f conftest*
5465 fi
5466
5467 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5468   echo "$ac_t""yes" 1>&6
5469   cat >> confdefs.h <<EOF
5470 #define CRAY_STACKSEG_END $ac_func
5471 EOF
5472
5473   break
5474 else
5475   echo "$ac_t""no" 1>&6
5476 fi
5477
5478 done
5479 fi
5480
5481 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
5482 echo "configure:5483: checking stack direction for C alloca" >&5
5483 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
5484   echo $ac_n "(cached) $ac_c" 1>&6
5485 else
5486   if test "$cross_compiling" = yes; then
5487   ac_cv_c_stack_direction=0
5488 else
5489   cat > conftest.$ac_ext <<EOF
5490 #line 5491 "configure"
5491 #include "confdefs.h"
5492 find_stack_direction ()
5493 {
5494   static char *addr = 0;
5495   auto char dummy;
5496   if (addr == 0)
5497     {
5498       addr = &dummy;
5499       return find_stack_direction ();
5500     }
5501   else
5502     return (&dummy > addr) ? 1 : -1;
5503 }
5504 main ()
5505 {
5506   exit (find_stack_direction() < 0);
5507 }
5508 EOF
5509 if { (eval echo configure:5510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5510 then
5511   ac_cv_c_stack_direction=1
5512 else
5513   echo "configure: failed program was:" >&5
5514   cat conftest.$ac_ext >&5
5515   rm -fr conftest*
5516   ac_cv_c_stack_direction=-1
5517 fi
5518 rm -fr conftest*
5519 fi
5520
5521 fi
5522
5523 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
5524 cat >> confdefs.h <<EOF
5525 #define STACK_DIRECTION $ac_cv_c_stack_direction
5526 EOF
5527
5528 fi
5529
5530 for ac_hdr in unistd.h
5531 do
5532 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5533 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5534 echo "configure:5535: checking for $ac_hdr" >&5
5535 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5536   echo $ac_n "(cached) $ac_c" 1>&6
5537 else
5538   cat > conftest.$ac_ext <<EOF
5539 #line 5540 "configure"
5540 #include "confdefs.h"
5541 #include <$ac_hdr>
5542 EOF
5543 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5544 { (eval echo configure:5545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5545 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5546 if test -z "$ac_err"; then
5547   rm -rf conftest*
5548   eval "ac_cv_header_$ac_safe=yes"
5549 else
5550   echo "$ac_err" >&5
5551   echo "configure: failed program was:" >&5
5552   cat conftest.$ac_ext >&5
5553   rm -rf conftest*
5554   eval "ac_cv_header_$ac_safe=no"
5555 fi
5556 rm -f conftest*
5557 fi
5558 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5559   echo "$ac_t""yes" 1>&6
5560     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5561   cat >> confdefs.h <<EOF
5562 #define $ac_tr_hdr 1
5563 EOF
5564  
5565 else
5566   echo "$ac_t""no" 1>&6
5567 fi
5568 done
5569
5570 for ac_func in getpagesize
5571 do
5572 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5573 echo "configure:5574: checking for $ac_func" >&5
5574 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5575   echo $ac_n "(cached) $ac_c" 1>&6
5576 else
5577   cat > conftest.$ac_ext <<EOF
5578 #line 5579 "configure"
5579 #include "confdefs.h"
5580 /* System header to define __stub macros and hopefully few prototypes,
5581     which can conflict with char $ac_func(); below.  */
5582 #include <assert.h>
5583 /* Override any gcc2 internal prototype to avoid an error.  */
5584 /* We use char because int might match the return type of a gcc2
5585     builtin and then its argument prototype would still apply.  */
5586 char $ac_func();
5587
5588 int main() {
5589
5590 /* The GNU C library defines this for functions which it implements
5591     to always fail with ENOSYS.  Some functions are actually named
5592     something starting with __ and the normal name is an alias.  */
5593 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5594 choke me
5595 #else
5596 $ac_func();
5597 #endif
5598
5599 ; return 0; }
5600 EOF
5601 if { (eval echo configure:5602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5602   rm -rf conftest*
5603   eval "ac_cv_func_$ac_func=yes"
5604 else
5605   echo "configure: failed program was:" >&5
5606   cat conftest.$ac_ext >&5
5607   rm -rf conftest*
5608   eval "ac_cv_func_$ac_func=no"
5609 fi
5610 rm -f conftest*
5611 fi
5612
5613 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5614   echo "$ac_t""yes" 1>&6
5615     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5616   cat >> confdefs.h <<EOF
5617 #define $ac_tr_func 1
5618 EOF
5619  
5620 else
5621   echo "$ac_t""no" 1>&6
5622 fi
5623 done
5624
5625 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
5626 echo "configure:5627: checking for working mmap" >&5
5627 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
5628   echo $ac_n "(cached) $ac_c" 1>&6
5629 else
5630   if test "$cross_compiling" = yes; then
5631   ac_cv_func_mmap_fixed_mapped=no
5632 else
5633   cat > conftest.$ac_ext <<EOF
5634 #line 5635 "configure"
5635 #include "confdefs.h"
5636
5637 /* Thanks to Mike Haertel and Jim Avera for this test.
5638    Here is a matrix of mmap possibilities:
5639         mmap private not fixed
5640         mmap private fixed at somewhere currently unmapped
5641         mmap private fixed at somewhere already mapped
5642         mmap shared not fixed
5643         mmap shared fixed at somewhere currently unmapped
5644         mmap shared fixed at somewhere already mapped
5645    For private mappings, we should verify that changes cannot be read()
5646    back from the file, nor mmap's back from the file at a different
5647    address.  (There have been systems where private was not correctly
5648    implemented like the infamous i386 svr4.0, and systems where the
5649    VM page cache was not coherent with the filesystem buffer cache
5650    like early versions of FreeBSD and possibly contemporary NetBSD.)
5651    For shared mappings, we should conversely verify that changes get
5652    propogated back to all the places they're supposed to be.
5653
5654    Grep wants private fixed already mapped.
5655    The main things grep needs to know about mmap are:
5656    * does it exist and is it safe to write into the mmap'd area
5657    * how to use it (BSD variants)  */
5658 #include <sys/types.h>
5659 #include <fcntl.h>
5660 #include <sys/mman.h>
5661
5662 /* This mess was copied from the GNU getpagesize.h.  */
5663 #ifndef HAVE_GETPAGESIZE
5664 # ifdef HAVE_UNISTD_H
5665 #  include <unistd.h>
5666 # endif
5667
5668 /* Assume that all systems that can run configure have sys/param.h.  */
5669 # ifndef HAVE_SYS_PARAM_H
5670 #  define HAVE_SYS_PARAM_H 1
5671 # endif
5672
5673 # ifdef _SC_PAGESIZE
5674 #  define getpagesize() sysconf(_SC_PAGESIZE)
5675 # else /* no _SC_PAGESIZE */
5676 #  ifdef HAVE_SYS_PARAM_H
5677 #   include <sys/param.h>
5678 #   ifdef EXEC_PAGESIZE
5679 #    define getpagesize() EXEC_PAGESIZE
5680 #   else /* no EXEC_PAGESIZE */
5681 #    ifdef NBPG
5682 #     define getpagesize() NBPG * CLSIZE
5683 #     ifndef CLSIZE
5684 #      define CLSIZE 1
5685 #     endif /* no CLSIZE */
5686 #    else /* no NBPG */
5687 #     ifdef NBPC
5688 #      define getpagesize() NBPC
5689 #     else /* no NBPC */
5690 #      ifdef PAGESIZE
5691 #       define getpagesize() PAGESIZE
5692 #      endif /* PAGESIZE */
5693 #     endif /* no NBPC */
5694 #    endif /* no NBPG */
5695 #   endif /* no EXEC_PAGESIZE */
5696 #  else /* no HAVE_SYS_PARAM_H */
5697 #   define getpagesize() 8192   /* punt totally */
5698 #  endif /* no HAVE_SYS_PARAM_H */
5699 # endif /* no _SC_PAGESIZE */
5700
5701 #endif /* no HAVE_GETPAGESIZE */
5702
5703 #ifdef __cplusplus
5704 extern "C" { void *malloc(unsigned); }
5705 #else
5706 char *malloc();
5707 #endif
5708
5709 int
5710 main()
5711 {
5712         char *data, *data2, *data3;
5713         int i, pagesize;
5714         int fd;
5715
5716         pagesize = getpagesize();
5717
5718         /*
5719          * First, make a file with some known garbage in it.
5720          */
5721         data = malloc(pagesize);
5722         if (!data)
5723                 exit(1);
5724         for (i = 0; i < pagesize; ++i)
5725                 *(data + i) = rand();
5726         umask(0);
5727         fd = creat("conftestmmap", 0600);
5728         if (fd < 0)
5729                 exit(1);
5730         if (write(fd, data, pagesize) != pagesize)
5731                 exit(1);
5732         close(fd);
5733
5734         /*
5735          * Next, try to mmap the file at a fixed address which
5736          * already has something else allocated at it.  If we can,
5737          * also make sure that we see the same garbage.
5738          */
5739         fd = open("conftestmmap", O_RDWR);
5740         if (fd < 0)
5741                 exit(1);
5742         data2 = malloc(2 * pagesize);
5743         if (!data2)
5744                 exit(1);
5745         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
5746         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
5747             MAP_PRIVATE | MAP_FIXED, fd, 0L))
5748                 exit(1);
5749         for (i = 0; i < pagesize; ++i)
5750                 if (*(data + i) != *(data2 + i))
5751                         exit(1);
5752
5753         /*
5754          * Finally, make sure that changes to the mapped area
5755          * do not percolate back to the file as seen by read().
5756          * (This is a bug on some variants of i386 svr4.0.)
5757          */
5758         for (i = 0; i < pagesize; ++i)
5759                 *(data2 + i) = *(data2 + i) + 1;
5760         data3 = malloc(pagesize);
5761         if (!data3)
5762                 exit(1);
5763         if (read(fd, data3, pagesize) != pagesize)
5764                 exit(1);
5765         for (i = 0; i < pagesize; ++i)
5766                 if (*(data + i) != *(data3 + i))
5767                         exit(1);
5768         close(fd);
5769         unlink("conftestmmap");
5770         exit(0);
5771 }
5772
5773 EOF
5774 if { (eval echo configure:5775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5775 then
5776   ac_cv_func_mmap_fixed_mapped=yes
5777 else
5778   echo "configure: failed program was:" >&5
5779   cat conftest.$ac_ext >&5
5780   rm -fr conftest*
5781   ac_cv_func_mmap_fixed_mapped=no
5782 fi
5783 rm -fr conftest*
5784 fi
5785
5786 fi
5787
5788 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
5789 if test $ac_cv_func_mmap_fixed_mapped = yes; then
5790   cat >> confdefs.h <<\EOF
5791 #define HAVE_MMAP 1
5792 EOF
5793
5794 fi
5795
5796 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
5797 echo "configure:5798: checking for pid_t" >&5
5798 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
5799   echo $ac_n "(cached) $ac_c" 1>&6
5800 else
5801   cat > conftest.$ac_ext <<EOF
5802 #line 5803 "configure"
5803 #include "confdefs.h"
5804 #include <sys/types.h>
5805 #if STDC_HEADERS
5806 #include <stdlib.h>
5807 #include <stddef.h>
5808 #endif
5809 EOF
5810 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5811   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5812   rm -rf conftest*
5813   ac_cv_type_pid_t=yes
5814 else
5815   rm -rf conftest*
5816   ac_cv_type_pid_t=no
5817 fi
5818 rm -f conftest*
5819
5820 fi
5821 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
5822 if test $ac_cv_type_pid_t = no; then
5823   cat >> confdefs.h <<\EOF
5824 #define pid_t int
5825 EOF
5826
5827 fi
5828
5829 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
5830 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
5831 echo "configure:5832: checking for vfork.h" >&5
5832 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5833   echo $ac_n "(cached) $ac_c" 1>&6
5834 else
5835   cat > conftest.$ac_ext <<EOF
5836 #line 5837 "configure"
5837 #include "confdefs.h"
5838 #include <vfork.h>
5839 EOF
5840 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5841 { (eval echo configure:5842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5842 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5843 if test -z "$ac_err"; then
5844   rm -rf conftest*
5845   eval "ac_cv_header_$ac_safe=yes"
5846 else
5847   echo "$ac_err" >&5
5848   echo "configure: failed program was:" >&5
5849   cat conftest.$ac_ext >&5
5850   rm -rf conftest*
5851   eval "ac_cv_header_$ac_safe=no"
5852 fi
5853 rm -f conftest*
5854 fi
5855 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5856   echo "$ac_t""yes" 1>&6
5857   cat >> confdefs.h <<\EOF
5858 #define HAVE_VFORK_H 1
5859 EOF
5860
5861 else
5862   echo "$ac_t""no" 1>&6
5863 fi
5864
5865 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
5866 echo "configure:5867: checking for working vfork" >&5
5867 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
5868   echo $ac_n "(cached) $ac_c" 1>&6
5869 else
5870   if test "$cross_compiling" = yes; then
5871   echo $ac_n "checking for vfork""... $ac_c" 1>&6
5872 echo "configure:5873: checking for vfork" >&5
5873 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
5874   echo $ac_n "(cached) $ac_c" 1>&6
5875 else
5876   cat > conftest.$ac_ext <<EOF
5877 #line 5878 "configure"
5878 #include "confdefs.h"
5879 /* System header to define __stub macros and hopefully few prototypes,
5880     which can conflict with char vfork(); below.  */
5881 #include <assert.h>
5882 /* Override any gcc2 internal prototype to avoid an error.  */
5883 /* We use char because int might match the return type of a gcc2
5884     builtin and then its argument prototype would still apply.  */
5885 char vfork();
5886
5887 int main() {
5888
5889 /* The GNU C library defines this for functions which it implements
5890     to always fail with ENOSYS.  Some functions are actually named
5891     something starting with __ and the normal name is an alias.  */
5892 #if defined (__stub_vfork) || defined (__stub___vfork)
5893 choke me
5894 #else
5895 vfork();
5896 #endif
5897
5898 ; return 0; }
5899 EOF
5900 if { (eval echo configure:5901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5901   rm -rf conftest*
5902   eval "ac_cv_func_vfork=yes"
5903 else
5904   echo "configure: failed program was:" >&5
5905   cat conftest.$ac_ext >&5
5906   rm -rf conftest*
5907   eval "ac_cv_func_vfork=no"
5908 fi
5909 rm -f conftest*
5910 fi
5911
5912 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
5913   echo "$ac_t""yes" 1>&6
5914   :
5915 else
5916   echo "$ac_t""no" 1>&6
5917 fi
5918
5919 ac_cv_func_vfork_works=$ac_cv_func_vfork
5920 else
5921   cat > conftest.$ac_ext <<EOF
5922 #line 5923 "configure"
5923 #include "confdefs.h"
5924 /* Thanks to Paul Eggert for this test.  */
5925 #include <stdio.h>
5926 #include <sys/types.h>
5927 #include <sys/stat.h>
5928 #ifdef HAVE_UNISTD_H
5929 #include <unistd.h>
5930 #endif
5931 #ifdef HAVE_VFORK_H
5932 #include <vfork.h>
5933 #endif
5934 /* On some sparc systems, changes by the child to local and incoming
5935    argument registers are propagated back to the parent.
5936    The compiler is told about this with #include <vfork.h>,
5937    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
5938    Test for this by using a static variable whose address
5939    is put into a register that is clobbered by the vfork.  */
5940 static
5941 #ifdef __cplusplus
5942 sparc_address_test (int arg)
5943 #else
5944 sparc_address_test (arg) int arg;
5945 #endif
5946 {
5947   static pid_t child;
5948   if (!child) {
5949     child = vfork ();
5950     if (child < 0) {
5951       perror ("vfork");
5952       _exit(2);
5953     }
5954     if (!child) {
5955       arg = getpid();
5956       write(-1, "", 0);
5957       _exit (arg);
5958     }
5959   }
5960 }
5961 main() {
5962   pid_t parent = getpid ();
5963   pid_t child;
5964
5965   sparc_address_test ();
5966
5967   child = vfork ();
5968
5969   if (child == 0) {
5970     /* Here is another test for sparc vfork register problems.
5971        This test uses lots of local variables, at least
5972        as many local variables as main has allocated so far
5973        including compiler temporaries.  4 locals are enough for
5974        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
5975        A buggy compiler should reuse the register of parent
5976        for one of the local variables, since it will think that
5977        parent can't possibly be used any more in this routine.
5978        Assigning to the local variable will thus munge parent
5979        in the parent process.  */
5980     pid_t
5981       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
5982       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
5983     /* Convince the compiler that p..p7 are live; otherwise, it might
5984        use the same hardware register for all 8 local variables.  */
5985     if (p != p1 || p != p2 || p != p3 || p != p4
5986         || p != p5 || p != p6 || p != p7)
5987       _exit(1);
5988
5989     /* On some systems (e.g. IRIX 3.3),
5990        vfork doesn't separate parent from child file descriptors.
5991        If the child closes a descriptor before it execs or exits,
5992        this munges the parent's descriptor as well.
5993        Test for this by closing stdout in the child.  */
5994     _exit(close(fileno(stdout)) != 0);
5995   } else {
5996     int status;
5997     struct stat st;
5998
5999     while (wait(&status) != child)
6000       ;
6001     exit(
6002          /* Was there some problem with vforking?  */
6003          child < 0
6004
6005          /* Did the child fail?  (This shouldn't happen.)  */
6006          || status
6007
6008          /* Did the vfork/compiler bug occur?  */
6009          || parent != getpid()
6010
6011          /* Did the file descriptor bug occur?  */
6012          || fstat(fileno(stdout), &st) != 0
6013          );
6014   }
6015 }
6016 EOF
6017 if { (eval echo configure:6018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6018 then
6019   ac_cv_func_vfork_works=yes
6020 else
6021   echo "configure: failed program was:" >&5
6022   cat conftest.$ac_ext >&5
6023   rm -fr conftest*
6024   ac_cv_func_vfork_works=no
6025 fi
6026 rm -fr conftest*
6027 fi
6028
6029 fi
6030
6031 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
6032 if test $ac_cv_func_vfork_works = no; then
6033   cat >> confdefs.h <<\EOF
6034 #define vfork fork
6035 EOF
6036
6037 fi
6038
6039 for ac_func in canonicalize_file_name realpath
6040 do
6041 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6042 echo "configure:6043: checking for $ac_func" >&5
6043 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6044   echo $ac_n "(cached) $ac_c" 1>&6
6045 else
6046   cat > conftest.$ac_ext <<EOF
6047 #line 6048 "configure"
6048 #include "confdefs.h"
6049 /* System header to define __stub macros and hopefully few prototypes,
6050     which can conflict with char $ac_func(); below.  */
6051 #include <assert.h>
6052 /* Override any gcc2 internal prototype to avoid an error.  */
6053 /* We use char because int might match the return type of a gcc2
6054     builtin and then its argument prototype would still apply.  */
6055 char $ac_func();
6056
6057 int main() {
6058
6059 /* The GNU C library defines this for functions which it implements
6060     to always fail with ENOSYS.  Some functions are actually named
6061     something starting with __ and the normal name is an alias.  */
6062 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6063 choke me
6064 #else
6065 $ac_func();
6066 #endif
6067
6068 ; return 0; }
6069 EOF
6070 if { (eval echo configure:6071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6071   rm -rf conftest*
6072   eval "ac_cv_func_$ac_func=yes"
6073 else
6074   echo "configure: failed program was:" >&5
6075   cat conftest.$ac_ext >&5
6076   rm -rf conftest*
6077   eval "ac_cv_func_$ac_func=no"
6078 fi
6079 rm -f conftest*
6080 fi
6081
6082 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6083   echo "$ac_t""yes" 1>&6
6084     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6085   cat >> confdefs.h <<EOF
6086 #define $ac_tr_func 1
6087 EOF
6088  
6089 else
6090   echo "$ac_t""no" 1>&6
6091 fi
6092 done
6093
6094 for ac_func in poll
6095 do
6096 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6097 echo "configure:6098: checking for $ac_func" >&5
6098 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6099   echo $ac_n "(cached) $ac_c" 1>&6
6100 else
6101   cat > conftest.$ac_ext <<EOF
6102 #line 6103 "configure"
6103 #include "confdefs.h"
6104 /* System header to define __stub macros and hopefully few prototypes,
6105     which can conflict with char $ac_func(); below.  */
6106 #include <assert.h>
6107 /* Override any gcc2 internal prototype to avoid an error.  */
6108 /* We use char because int might match the return type of a gcc2
6109     builtin and then its argument prototype would still apply.  */
6110 char $ac_func();
6111
6112 int main() {
6113
6114 /* The GNU C library defines this for functions which it implements
6115     to always fail with ENOSYS.  Some functions are actually named
6116     something starting with __ and the normal name is an alias.  */
6117 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6118 choke me
6119 #else
6120 $ac_func();
6121 #endif
6122
6123 ; return 0; }
6124 EOF
6125 if { (eval echo configure:6126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6126   rm -rf conftest*
6127   eval "ac_cv_func_$ac_func=yes"
6128 else
6129   echo "configure: failed program was:" >&5
6130   cat conftest.$ac_ext >&5
6131   rm -rf conftest*
6132   eval "ac_cv_func_$ac_func=no"
6133 fi
6134 rm -f conftest*
6135 fi
6136
6137 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6138   echo "$ac_t""yes" 1>&6
6139     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6140   cat >> confdefs.h <<EOF
6141 #define $ac_tr_func 1
6142 EOF
6143  
6144 else
6145   echo "$ac_t""no" 1>&6
6146 fi
6147 done
6148
6149 for ac_func in sbrk
6150 do
6151 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6152 echo "configure:6153: checking for $ac_func" >&5
6153 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6154   echo $ac_n "(cached) $ac_c" 1>&6
6155 else
6156   cat > conftest.$ac_ext <<EOF
6157 #line 6158 "configure"
6158 #include "confdefs.h"
6159 /* System header to define __stub macros and hopefully few prototypes,
6160     which can conflict with char $ac_func(); below.  */
6161 #include <assert.h>
6162 /* Override any gcc2 internal prototype to avoid an error.  */
6163 /* We use char because int might match the return type of a gcc2
6164     builtin and then its argument prototype would still apply.  */
6165 char $ac_func();
6166
6167 int main() {
6168
6169 /* The GNU C library defines this for functions which it implements
6170     to always fail with ENOSYS.  Some functions are actually named
6171     something starting with __ and the normal name is an alias.  */
6172 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6173 choke me
6174 #else
6175 $ac_func();
6176 #endif
6177
6178 ; return 0; }
6179 EOF
6180 if { (eval echo configure:6181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6181   rm -rf conftest*
6182   eval "ac_cv_func_$ac_func=yes"
6183 else
6184   echo "configure: failed program was:" >&5
6185   cat conftest.$ac_ext >&5
6186   rm -rf conftest*
6187   eval "ac_cv_func_$ac_func=no"
6188 fi
6189 rm -f conftest*
6190 fi
6191
6192 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6193   echo "$ac_t""yes" 1>&6
6194     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6195   cat >> confdefs.h <<EOF
6196 #define $ac_tr_func 1
6197 EOF
6198  
6199 else
6200   echo "$ac_t""no" 1>&6
6201 fi
6202 done
6203
6204 for ac_func in setpgid setpgrp
6205 do
6206 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6207 echo "configure:6208: checking for $ac_func" >&5
6208 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6209   echo $ac_n "(cached) $ac_c" 1>&6
6210 else
6211   cat > conftest.$ac_ext <<EOF
6212 #line 6213 "configure"
6213 #include "confdefs.h"
6214 /* System header to define __stub macros and hopefully few prototypes,
6215     which can conflict with char $ac_func(); below.  */
6216 #include <assert.h>
6217 /* Override any gcc2 internal prototype to avoid an error.  */
6218 /* We use char because int might match the return type of a gcc2
6219     builtin and then its argument prototype would still apply.  */
6220 char $ac_func();
6221
6222 int main() {
6223
6224 /* The GNU C library defines this for functions which it implements
6225     to always fail with ENOSYS.  Some functions are actually named
6226     something starting with __ and the normal name is an alias.  */
6227 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6228 choke me
6229 #else
6230 $ac_func();
6231 #endif
6232
6233 ; return 0; }
6234 EOF
6235 if { (eval echo configure:6236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6236   rm -rf conftest*
6237   eval "ac_cv_func_$ac_func=yes"
6238 else
6239   echo "configure: failed program was:" >&5
6240   cat conftest.$ac_ext >&5
6241   rm -rf conftest*
6242   eval "ac_cv_func_$ac_func=no"
6243 fi
6244 rm -f conftest*
6245 fi
6246
6247 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6248   echo "$ac_t""yes" 1>&6
6249     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6250   cat >> confdefs.h <<EOF
6251 #define $ac_tr_func 1
6252 EOF
6253  
6254 else
6255   echo "$ac_t""no" 1>&6
6256 fi
6257 done
6258
6259 for ac_func in sigaction sigprocmask sigsetmask
6260 do
6261 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6262 echo "configure:6263: checking for $ac_func" >&5
6263 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6264   echo $ac_n "(cached) $ac_c" 1>&6
6265 else
6266   cat > conftest.$ac_ext <<EOF
6267 #line 6268 "configure"
6268 #include "confdefs.h"
6269 /* System header to define __stub macros and hopefully few prototypes,
6270     which can conflict with char $ac_func(); below.  */
6271 #include <assert.h>
6272 /* Override any gcc2 internal prototype to avoid an error.  */
6273 /* We use char because int might match the return type of a gcc2
6274     builtin and then its argument prototype would still apply.  */
6275 char $ac_func();
6276
6277 int main() {
6278
6279 /* The GNU C library defines this for functions which it implements
6280     to always fail with ENOSYS.  Some functions are actually named
6281     something starting with __ and the normal name is an alias.  */
6282 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6283 choke me
6284 #else
6285 $ac_func();
6286 #endif
6287
6288 ; return 0; }
6289 EOF
6290 if { (eval echo configure:6291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6291   rm -rf conftest*
6292   eval "ac_cv_func_$ac_func=yes"
6293 else
6294   echo "configure: failed program was:" >&5
6295   cat conftest.$ac_ext >&5
6296   rm -rf conftest*
6297   eval "ac_cv_func_$ac_func=no"
6298 fi
6299 rm -f conftest*
6300 fi
6301
6302 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6303   echo "$ac_t""yes" 1>&6
6304     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6305   cat >> confdefs.h <<EOF
6306 #define $ac_tr_func 1
6307 EOF
6308  
6309 else
6310   echo "$ac_t""no" 1>&6
6311 fi
6312 done
6313
6314 for ac_func in socketpair
6315 do
6316 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6317 echo "configure:6318: checking for $ac_func" >&5
6318 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6319   echo $ac_n "(cached) $ac_c" 1>&6
6320 else
6321   cat > conftest.$ac_ext <<EOF
6322 #line 6323 "configure"
6323 #include "confdefs.h"
6324 /* System header to define __stub macros and hopefully few prototypes,
6325     which can conflict with char $ac_func(); below.  */
6326 #include <assert.h>
6327 /* Override any gcc2 internal prototype to avoid an error.  */
6328 /* We use char because int might match the return type of a gcc2
6329     builtin and then its argument prototype would still apply.  */
6330 char $ac_func();
6331
6332 int main() {
6333
6334 /* The GNU C library defines this for functions which it implements
6335     to always fail with ENOSYS.  Some functions are actually named
6336     something starting with __ and the normal name is an alias.  */
6337 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6338 choke me
6339 #else
6340 $ac_func();
6341 #endif
6342
6343 ; return 0; }
6344 EOF
6345 if { (eval echo configure:6346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6346   rm -rf conftest*
6347   eval "ac_cv_func_$ac_func=yes"
6348 else
6349   echo "configure: failed program was:" >&5
6350   cat conftest.$ac_ext >&5
6351   rm -rf conftest*
6352   eval "ac_cv_func_$ac_func=no"
6353 fi
6354 rm -f conftest*
6355 fi
6356
6357 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6358   echo "$ac_t""yes" 1>&6
6359     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6360   cat >> confdefs.h <<EOF
6361 #define $ac_tr_func 1
6362 EOF
6363  
6364 else
6365   echo "$ac_t""no" 1>&6
6366 fi
6367 done
6368
6369
6370 if test "$cross_compiling" = no; then
6371   echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
6372 echo "configure:6373: checking whether setpgrp takes no argument" >&5
6373 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
6374   echo $ac_n "(cached) $ac_c" 1>&6
6375 else
6376   if test "$cross_compiling" = yes; then
6377   { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
6378 else
6379   cat > conftest.$ac_ext <<EOF
6380 #line 6381 "configure"
6381 #include "confdefs.h"
6382
6383 #ifdef HAVE_UNISTD_H
6384 #include <unistd.h>
6385 #endif
6386
6387 /*
6388  * If this system has a BSD-style setpgrp, which takes arguments, exit
6389  * successfully.
6390  */
6391 main()
6392 {
6393     if (setpgrp(1,1) == -1)
6394         exit(0);
6395     else
6396         exit(1);
6397 }
6398
6399 EOF
6400 if { (eval echo configure:6401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6401 then
6402   ac_cv_func_setpgrp_void=no
6403 else
6404   echo "configure: failed program was:" >&5
6405   cat conftest.$ac_ext >&5
6406   rm -fr conftest*
6407   ac_cv_func_setpgrp_void=yes
6408 fi
6409 rm -fr conftest*
6410 fi
6411
6412
6413 fi
6414
6415 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6416 if test $ac_cv_func_setpgrp_void = yes; then
6417   cat >> confdefs.h <<\EOF
6418 #define SETPGRP_VOID 1
6419 EOF
6420
6421 fi
6422
6423 else
6424   echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
6425 echo "configure:6426: checking whether setpgrp takes no argument" >&5
6426 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
6427   echo $ac_n "(cached) $ac_c" 1>&6
6428 else
6429   cat > conftest.$ac_ext <<EOF
6430 #line 6431 "configure"
6431 #include "confdefs.h"
6432
6433 #include <unistd.h>
6434
6435 int main() {
6436
6437   if (setpgrp(1,1) == -1)
6438     exit (0);
6439   else
6440     exit (1);
6441
6442 ; return 0; }
6443 EOF
6444 if { (eval echo configure:6445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6445   rm -rf conftest*
6446   ac_cv_func_setpgrp_void=no
6447 else
6448   echo "configure: failed program was:" >&5
6449   cat conftest.$ac_ext >&5
6450   rm -rf conftest*
6451   ac_cv_func_setpgrp_void=yes
6452 fi
6453 rm -f conftest*
6454 fi
6455
6456 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
6457 if test $ac_cv_func_setpgrp_void = yes; then
6458   cat >> confdefs.h <<\EOF
6459 #define SETPGRP_VOID 1
6460 EOF
6461
6462 fi
6463 fi
6464
6465 # Check if sigsetjmp is available.  Using AC_CHECK_FUNCS won't do
6466 # since sigsetjmp might only be defined as a macro.
6467 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
6468 echo "configure:6469: checking for sigsetjmp" >&5
6469 if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
6470   echo $ac_n "(cached) $ac_c" 1>&6
6471 else
6472   cat > conftest.$ac_ext <<EOF
6473 #line 6474 "configure"
6474 #include "confdefs.h"
6475
6476 #include <setjmp.h>
6477
6478 int main() {
6479 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
6480 ; return 0; }
6481 EOF
6482 if { (eval echo configure:6483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6483   rm -rf conftest*
6484   gdb_cv_func_sigsetjmp=yes
6485 else
6486   echo "configure: failed program was:" >&5
6487   cat conftest.$ac_ext >&5
6488   rm -rf conftest*
6489   gdb_cv_func_sigsetjmp=no
6490 fi
6491 rm -f conftest*
6492 fi
6493
6494 echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
6495 if test $gdb_cv_func_sigsetjmp = yes; then
6496   cat >> confdefs.h <<\EOF
6497 #define HAVE_SIGSETJMP 1
6498 EOF
6499
6500 fi
6501
6502 # Assume we'll default to using the included libiberty regex.
6503 gdb_use_included_regex=yes
6504
6505 # However, if the system regex is GNU regex, then default to *not*
6506 # using the included regex.
6507 echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
6508 echo "configure:6509: checking for GNU regex" >&5
6509 if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
6510   echo $ac_n "(cached) $ac_c" 1>&6
6511 else
6512   cat > conftest.$ac_ext <<EOF
6513 #line 6514 "configure"
6514 #include "confdefs.h"
6515 #include <gnu-versions.h>
6516 int main() {
6517 #define REGEX_INTERFACE_VERSION 1
6518 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
6519 # error "Version mismatch"
6520 #endif
6521 ; return 0; }
6522 EOF
6523 if { (eval echo configure:6524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6524   rm -rf conftest*
6525   gdb_cv_have_gnu_regex=yes
6526 else
6527   echo "configure: failed program was:" >&5
6528   cat conftest.$ac_ext >&5
6529   rm -rf conftest*
6530   gdb_cv_have_gnu_regex=no
6531 fi
6532 rm -f conftest*
6533 fi
6534
6535 echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
6536 if test $gdb_cv_have_gnu_regex = yes; then
6537   gdb_use_included_regex=no
6538 fi
6539
6540 # Check whether --with-included-regex or --without-included-regex was given.
6541 if test "${with_included_regex+set}" = set; then
6542   withval="$with_included_regex"
6543   gdb_with_regex=$withval
6544 else
6545   gdb_with_regex=$gdb_use_included_regex
6546 fi
6547
6548 if test "$gdb_with_regex" = yes; then
6549   cat >> confdefs.h <<\EOF
6550 #define USE_INCLUDED_REGEX 1
6551 EOF
6552
6553 fi
6554
6555 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
6556 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
6557 echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
6558 echo "configure:6559: checking for r_fs in struct reg" >&5
6559 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
6560   echo $ac_n "(cached) $ac_c" 1>&6
6561 else
6562   cat > conftest.$ac_ext <<EOF
6563 #line 6564 "configure"
6564 #include "confdefs.h"
6565 #include <machine/reg.h>
6566 int main() {
6567 struct reg r; r.r_fs;
6568 ; return 0; }
6569 EOF
6570 if { (eval echo configure:6571: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6571   rm -rf conftest*
6572   gdb_cv_struct_reg_r_fs=yes
6573 else
6574   echo "configure: failed program was:" >&5
6575   cat conftest.$ac_ext >&5
6576   rm -rf conftest*
6577   gdb_cv_struct_reg_r_fs=no
6578 fi
6579 rm -f conftest*
6580 fi
6581
6582 echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
6583 if test $gdb_cv_struct_reg_r_fs = yes; then
6584   cat >> confdefs.h <<\EOF
6585 #define HAVE_STRUCT_REG_R_FS 1
6586 EOF
6587
6588 fi
6589 echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
6590 echo "configure:6591: checking for r_gs in struct reg" >&5
6591 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
6592   echo $ac_n "(cached) $ac_c" 1>&6
6593 else
6594   cat > conftest.$ac_ext <<EOF
6595 #line 6596 "configure"
6596 #include "confdefs.h"
6597 #include <machine/reg.h>
6598 int main() {
6599 struct reg r; r.r_gs;
6600 ; return 0; }
6601 EOF
6602 if { (eval echo configure:6603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6603   rm -rf conftest*
6604   gdb_cv_struct_reg_r_gs=yes
6605 else
6606   echo "configure: failed program was:" >&5
6607   cat conftest.$ac_ext >&5
6608   rm -rf conftest*
6609   gdb_cv_struct_reg_r_gs=no
6610 fi
6611 rm -f conftest*
6612 fi
6613
6614 echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
6615 if test $gdb_cv_struct_reg_r_gs = yes; then
6616   cat >> confdefs.h <<\EOF
6617 #define HAVE_STRUCT_REG_R_GS 1
6618 EOF
6619
6620 fi
6621
6622 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
6623 echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
6624 echo "configure:6625: checking for PTRACE_GETREGS" >&5
6625 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
6626   echo $ac_n "(cached) $ac_c" 1>&6
6627 else
6628   cat > conftest.$ac_ext <<EOF
6629 #line 6630 "configure"
6630 #include "confdefs.h"
6631 #include <sys/ptrace.h>
6632 int main() {
6633 PTRACE_GETREGS;
6634 ; return 0; }
6635 EOF
6636 if { (eval echo configure:6637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6637   rm -rf conftest*
6638   gdb_cv_have_ptrace_getregs=yes
6639 else
6640   echo "configure: failed program was:" >&5
6641   cat conftest.$ac_ext >&5
6642   rm -rf conftest*
6643   gdb_cv_have_ptrace_getregs=no
6644 fi
6645 rm -f conftest*
6646 fi
6647
6648 echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
6649 if test $gdb_cv_have_ptrace_getregs = yes; then
6650   cat >> confdefs.h <<\EOF
6651 #define HAVE_PTRACE_GETREGS 1
6652 EOF
6653
6654 fi
6655
6656 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
6657 echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
6658 echo "configure:6659: checking for PTRACE_GETFPXREGS" >&5
6659 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
6660   echo $ac_n "(cached) $ac_c" 1>&6
6661 else
6662   cat > conftest.$ac_ext <<EOF
6663 #line 6664 "configure"
6664 #include "confdefs.h"
6665 #include <sys/ptrace.h>
6666 int main() {
6667 PTRACE_GETFPXREGS;
6668 ; return 0; }
6669 EOF
6670 if { (eval echo configure:6671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6671   rm -rf conftest*
6672   gdb_cv_have_ptrace_getfpxregs=yes
6673 else
6674   echo "configure: failed program was:" >&5
6675   cat conftest.$ac_ext >&5
6676   rm -rf conftest*
6677   gdb_cv_have_ptrace_getfpxregs=no
6678 fi
6679 rm -f conftest*
6680 fi
6681
6682 echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
6683 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
6684   cat >> confdefs.h <<\EOF
6685 #define HAVE_PTRACE_GETFPXREGS 1
6686 EOF
6687
6688 fi
6689
6690 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
6691 echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
6692 echo "configure:6693: checking for PT_GETDBREGS" >&5
6693 if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+set}'`\" = set"; then
6694   echo $ac_n "(cached) $ac_c" 1>&6
6695 else
6696   cat > conftest.$ac_ext <<EOF
6697 #line 6698 "configure"
6698 #include "confdefs.h"
6699 #include <sys/types.h>
6700 #include <sys/ptrace.h>
6701 int main() {
6702 PT_GETDBREGS;
6703 ; return 0; }
6704 EOF
6705 if { (eval echo configure:6706: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6706   rm -rf conftest*
6707   gdb_cv_have_pt_getdbregs=yes
6708 else
6709   echo "configure: failed program was:" >&5
6710   cat conftest.$ac_ext >&5
6711   rm -rf conftest*
6712   gdb_cv_have_pt_getdbregs=no
6713 fi
6714 rm -f conftest*
6715 fi
6716
6717 echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
6718 if test $gdb_cv_have_pt_getdbregs = yes; then
6719   cat >> confdefs.h <<\EOF
6720 #define HAVE_PT_GETDBREGS 1
6721 EOF
6722
6723 fi
6724
6725 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
6726 echo $ac_n "checking for PT_GETXMMREGS""... $ac_c" 1>&6
6727 echo "configure:6728: checking for PT_GETXMMREGS" >&5
6728 if eval "test \"`echo '$''{'gdb_cv_have_pt_getxmmregs'+set}'`\" = set"; then
6729   echo $ac_n "(cached) $ac_c" 1>&6
6730 else
6731   cat > conftest.$ac_ext <<EOF
6732 #line 6733 "configure"
6733 #include "confdefs.h"
6734 #include <sys/types.h>
6735 #include <sys/ptrace.h>
6736 int main() {
6737 PT_GETXMMREGS;
6738 ; return 0; }
6739 EOF
6740 if { (eval echo configure:6741: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6741   rm -rf conftest*
6742   gdb_cv_have_pt_getxmmregs=yes
6743 else
6744   echo "configure: failed program was:" >&5
6745   cat conftest.$ac_ext >&5
6746   rm -rf conftest*
6747   gdb_cv_have_pt_getxmmregs=no
6748 fi
6749 rm -f conftest*
6750 fi
6751
6752 echo "$ac_t""$gdb_cv_have_pt_getxmmregs" 1>&6
6753 if test $gdb_cv_have_pt_getxmmregs = yes; then
6754   cat >> confdefs.h <<\EOF
6755 #define HAVE_PT_GETXMMREGS 1
6756 EOF
6757
6758 fi
6759
6760
6761 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
6762 echo "configure:6763: checking whether malloc must be declared" >&5
6763 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
6764   echo $ac_n "(cached) $ac_c" 1>&6
6765 else
6766   cat > conftest.$ac_ext <<EOF
6767 #line 6768 "configure"
6768 #include "confdefs.h"
6769
6770 #include <stdio.h>
6771 #ifdef HAVE_STRING_H
6772 #include <string.h>
6773 #else
6774 #ifdef HAVE_STRINGS_H
6775 #include <strings.h>
6776 #endif
6777 #endif
6778 #ifdef HAVE_STDLIB_H
6779 #include <stdlib.h>
6780 #endif
6781 #ifdef HAVE_UNISTD_H
6782 #include <unistd.h>
6783 #endif
6784 int main() {
6785 char *(*pfn) = (char *(*)) malloc
6786 ; return 0; }
6787 EOF
6788 if { (eval echo configure:6789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6789   rm -rf conftest*
6790   bfd_cv_decl_needed_malloc=no
6791 else
6792   echo "configure: failed program was:" >&5
6793   cat conftest.$ac_ext >&5
6794   rm -rf conftest*
6795   bfd_cv_decl_needed_malloc=yes
6796 fi
6797 rm -f conftest*
6798 fi
6799
6800 echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
6801 if test $bfd_cv_decl_needed_malloc = yes; then
6802   cat >> confdefs.h <<\EOF
6803 #define NEED_DECLARATION_MALLOC 1
6804 EOF
6805
6806 fi
6807
6808 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
6809 echo "configure:6810: checking whether realloc must be declared" >&5
6810 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
6811   echo $ac_n "(cached) $ac_c" 1>&6
6812 else
6813   cat > conftest.$ac_ext <<EOF
6814 #line 6815 "configure"
6815 #include "confdefs.h"
6816
6817 #include <stdio.h>
6818 #ifdef HAVE_STRING_H
6819 #include <string.h>
6820 #else
6821 #ifdef HAVE_STRINGS_H
6822 #include <strings.h>
6823 #endif
6824 #endif
6825 #ifdef HAVE_STDLIB_H
6826 #include <stdlib.h>
6827 #endif
6828 #ifdef HAVE_UNISTD_H
6829 #include <unistd.h>
6830 #endif
6831 int main() {
6832 char *(*pfn) = (char *(*)) realloc
6833 ; return 0; }
6834 EOF
6835 if { (eval echo configure:6836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6836   rm -rf conftest*
6837   bfd_cv_decl_needed_realloc=no
6838 else
6839   echo "configure: failed program was:" >&5
6840   cat conftest.$ac_ext >&5
6841   rm -rf conftest*
6842   bfd_cv_decl_needed_realloc=yes
6843 fi
6844 rm -f conftest*
6845 fi
6846
6847 echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
6848 if test $bfd_cv_decl_needed_realloc = yes; then
6849   cat >> confdefs.h <<\EOF
6850 #define NEED_DECLARATION_REALLOC 1
6851 EOF
6852
6853 fi
6854
6855 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
6856 echo "configure:6857: checking whether free must be declared" >&5
6857 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
6858   echo $ac_n "(cached) $ac_c" 1>&6
6859 else
6860   cat > conftest.$ac_ext <<EOF
6861 #line 6862 "configure"
6862 #include "confdefs.h"
6863
6864 #include <stdio.h>
6865 #ifdef HAVE_STRING_H
6866 #include <string.h>
6867 #else
6868 #ifdef HAVE_STRINGS_H
6869 #include <strings.h>
6870 #endif
6871 #endif
6872 #ifdef HAVE_STDLIB_H
6873 #include <stdlib.h>
6874 #endif
6875 #ifdef HAVE_UNISTD_H
6876 #include <unistd.h>
6877 #endif
6878 int main() {
6879 char *(*pfn) = (char *(*)) free
6880 ; return 0; }
6881 EOF
6882 if { (eval echo configure:6883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6883   rm -rf conftest*
6884   bfd_cv_decl_needed_free=no
6885 else
6886   echo "configure: failed program was:" >&5
6887   cat conftest.$ac_ext >&5
6888   rm -rf conftest*
6889   bfd_cv_decl_needed_free=yes
6890 fi
6891 rm -f conftest*
6892 fi
6893
6894 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
6895 if test $bfd_cv_decl_needed_free = yes; then
6896   cat >> confdefs.h <<\EOF
6897 #define NEED_DECLARATION_FREE 1
6898 EOF
6899
6900 fi
6901
6902 echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
6903 echo "configure:6904: checking whether strerror must be declared" >&5
6904 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
6905   echo $ac_n "(cached) $ac_c" 1>&6
6906 else
6907   cat > conftest.$ac_ext <<EOF
6908 #line 6909 "configure"
6909 #include "confdefs.h"
6910
6911 #include <stdio.h>
6912 #ifdef HAVE_STRING_H
6913 #include <string.h>
6914 #else
6915 #ifdef HAVE_STRINGS_H
6916 #include <strings.h>
6917 #endif
6918 #endif
6919 #ifdef HAVE_STDLIB_H
6920 #include <stdlib.h>
6921 #endif
6922 #ifdef HAVE_UNISTD_H
6923 #include <unistd.h>
6924 #endif
6925 int main() {
6926 char *(*pfn) = (char *(*)) strerror
6927 ; return 0; }
6928 EOF
6929 if { (eval echo configure:6930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6930   rm -rf conftest*
6931   bfd_cv_decl_needed_strerror=no
6932 else
6933   echo "configure: failed program was:" >&5
6934   cat conftest.$ac_ext >&5
6935   rm -rf conftest*
6936   bfd_cv_decl_needed_strerror=yes
6937 fi
6938 rm -f conftest*
6939 fi
6940
6941 echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
6942 if test $bfd_cv_decl_needed_strerror = yes; then
6943   cat >> confdefs.h <<\EOF
6944 #define NEED_DECLARATION_STRERROR 1
6945 EOF
6946
6947 fi
6948
6949 echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
6950 echo "configure:6951: checking whether strdup must be declared" >&5
6951 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
6952   echo $ac_n "(cached) $ac_c" 1>&6
6953 else
6954   cat > conftest.$ac_ext <<EOF
6955 #line 6956 "configure"
6956 #include "confdefs.h"
6957
6958 #include <stdio.h>
6959 #ifdef HAVE_STRING_H
6960 #include <string.h>
6961 #else
6962 #ifdef HAVE_STRINGS_H
6963 #include <strings.h>
6964 #endif
6965 #endif
6966 #ifdef HAVE_STDLIB_H
6967 #include <stdlib.h>
6968 #endif
6969 #ifdef HAVE_UNISTD_H
6970 #include <unistd.h>
6971 #endif
6972 int main() {
6973 char *(*pfn) = (char *(*)) strdup
6974 ; return 0; }
6975 EOF
6976 if { (eval echo configure:6977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6977   rm -rf conftest*
6978   bfd_cv_decl_needed_strdup=no
6979 else
6980   echo "configure: failed program was:" >&5
6981   cat conftest.$ac_ext >&5
6982   rm -rf conftest*
6983   bfd_cv_decl_needed_strdup=yes
6984 fi
6985 rm -f conftest*
6986 fi
6987
6988 echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
6989 if test $bfd_cv_decl_needed_strdup = yes; then
6990   cat >> confdefs.h <<\EOF
6991 #define NEED_DECLARATION_STRDUP 1
6992 EOF
6993
6994 fi
6995
6996 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
6997 echo "configure:6998: checking whether strstr must be declared" >&5
6998 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
6999   echo $ac_n "(cached) $ac_c" 1>&6
7000 else
7001   cat > conftest.$ac_ext <<EOF
7002 #line 7003 "configure"
7003 #include "confdefs.h"
7004
7005 #include <stdio.h>
7006 #ifdef HAVE_STRING_H
7007 #include <string.h>
7008 #else
7009 #ifdef HAVE_STRINGS_H
7010 #include <strings.h>
7011 #endif
7012 #endif
7013 #ifdef HAVE_STDLIB_H
7014 #include <stdlib.h>
7015 #endif
7016 #ifdef HAVE_UNISTD_H
7017 #include <unistd.h>
7018 #endif
7019 int main() {
7020 char *(*pfn) = (char *(*)) strstr
7021 ; return 0; }
7022 EOF
7023 if { (eval echo configure:7024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7024   rm -rf conftest*
7025   bfd_cv_decl_needed_strstr=no
7026 else
7027   echo "configure: failed program was:" >&5
7028   cat conftest.$ac_ext >&5
7029   rm -rf conftest*
7030   bfd_cv_decl_needed_strstr=yes
7031 fi
7032 rm -f conftest*
7033 fi
7034
7035 echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
7036 if test $bfd_cv_decl_needed_strstr = yes; then
7037   cat >> confdefs.h <<\EOF
7038 #define NEED_DECLARATION_STRSTR 1
7039 EOF
7040
7041 fi
7042
7043 echo $ac_n "checking whether canonicalize_file_name must be declared""... $ac_c" 1>&6
7044 echo "configure:7045: checking whether canonicalize_file_name must be declared" >&5
7045 if eval "test \"`echo '$''{'bfd_cv_decl_needed_canonicalize_file_name'+set}'`\" = set"; then
7046   echo $ac_n "(cached) $ac_c" 1>&6
7047 else
7048   cat > conftest.$ac_ext <<EOF
7049 #line 7050 "configure"
7050 #include "confdefs.h"
7051
7052 #include <stdio.h>
7053 #ifdef HAVE_STRING_H
7054 #include <string.h>
7055 #else
7056 #ifdef HAVE_STRINGS_H
7057 #include <strings.h>
7058 #endif
7059 #endif
7060 #ifdef HAVE_STDLIB_H
7061 #include <stdlib.h>
7062 #endif
7063 #ifdef HAVE_UNISTD_H
7064 #include <unistd.h>
7065 #endif
7066 int main() {
7067 char *(*pfn) = (char *(*)) canonicalize_file_name
7068 ; return 0; }
7069 EOF
7070 if { (eval echo configure:7071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7071   rm -rf conftest*
7072   bfd_cv_decl_needed_canonicalize_file_name=no
7073 else
7074   echo "configure: failed program was:" >&5
7075   cat conftest.$ac_ext >&5
7076   rm -rf conftest*
7077   bfd_cv_decl_needed_canonicalize_file_name=yes
7078 fi
7079 rm -f conftest*
7080 fi
7081
7082 echo "$ac_t""$bfd_cv_decl_needed_canonicalize_file_name" 1>&6
7083 if test $bfd_cv_decl_needed_canonicalize_file_name = yes; then
7084   cat >> confdefs.h <<\EOF
7085 #define NEED_DECLARATION_CANONICALIZE_FILE_NAME 1
7086 EOF
7087
7088 fi
7089
7090
7091 # The following save_state_t checkery is only necessary for HPUX 
7092 # versions earlier than 10.20.  When those fade from memory, this 
7093 # could be expunged. --jsm 1999-03-22
7094
7095 echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
7096 echo "configure:7097: checking for HPUX save_state structure" >&5
7097 cat > conftest.$ac_ext <<EOF
7098 #line 7099 "configure"
7099 #include "confdefs.h"
7100 #include <machine/save_state.h>
7101 EOF
7102 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7103   egrep "save_state_t" >/dev/null 2>&1; then
7104   rm -rf conftest*
7105   gdb_cv_hpux_savestate=yes
7106 else
7107   rm -rf conftest*
7108   gdb_cv_hpux_savestate=no
7109 fi
7110 rm -f conftest*
7111
7112 cat > conftest.$ac_ext <<EOF
7113 #line 7114 "configure"
7114 #include "confdefs.h"
7115 #include <machine/save_state.h>
7116 EOF
7117 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7118   egrep "ss_wide" >/dev/null 2>&1; then
7119   rm -rf conftest*
7120   gdb_cv_hpux_sswide=yes
7121 else
7122   rm -rf conftest*
7123   gdb_cv_hpux_sswide=no
7124 fi
7125 rm -f conftest*
7126
7127 if test $gdb_cv_hpux_savestate = yes
7128 then
7129   cat >> confdefs.h <<\EOF
7130 #define HAVE_STRUCT_SAVE_STATE_T 1
7131 EOF
7132
7133 fi
7134 if test $gdb_cv_hpux_sswide = yes
7135 then
7136   cat >> confdefs.h <<\EOF
7137 #define HAVE_STRUCT_MEMBER_SS_WIDE 1
7138 EOF
7139
7140 fi
7141 echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
7142
7143
7144 # If we are configured native on GNU/Linux, work around problems with
7145 # sys/procfs.h
7146 # Also detect which type of /proc is in use, such as for Unixware or Solaris.
7147
7148 if test "${target}" = "${host}"; then
7149   case "${host}" in
7150   i[3456]86-*-linux*)
7151         cat >> confdefs.h <<\EOF
7152 #define START_INFERIOR_TRAPS_EXPECTED 2
7153 EOF
7154
7155         cat >> confdefs.h <<\EOF
7156 #define sys_quotactl 1
7157 EOF
7158
7159         ;;
7160   ia64-*-aix*)
7161       cat >> confdefs.h <<\EOF
7162 #define NEW_PROC_API 1
7163 EOF
7164
7165       ;;
7166   *-*-unixware* | *-*-sysv4.2* | *-*-sysv5* | *-*-interix* )
7167       cat >> confdefs.h <<\EOF
7168 #define NEW_PROC_API 1
7169 EOF
7170
7171       ;;
7172   *-*-solaris2.[678])
7173       cat >> confdefs.h <<\EOF
7174 #define NEW_PROC_API 1
7175 EOF
7176
7177       ;;
7178   esac
7179 fi
7180
7181 if test "$ac_cv_header_sys_procfs_h" = yes; then
7182   echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
7183 echo "configure:7184: checking for pstatus_t in sys/procfs.h" >&5
7184  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
7185   echo $ac_n "(cached) $ac_c" 1>&6
7186 else
7187   cat > conftest.$ac_ext <<EOF
7188 #line 7189 "configure"
7189 #include "confdefs.h"
7190
7191 #define _SYSCALL32
7192 #include <sys/procfs.h>
7193 int main() {
7194 pstatus_t avar
7195 ; return 0; }
7196 EOF
7197 if { (eval echo configure:7198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7198   rm -rf conftest*
7199   bfd_cv_have_sys_procfs_type_pstatus_t=yes
7200 else
7201   echo "configure: failed program was:" >&5
7202   cat conftest.$ac_ext >&5
7203   rm -rf conftest*
7204   bfd_cv_have_sys_procfs_type_pstatus_t=no
7205    
7206 fi
7207 rm -f conftest*
7208 fi
7209
7210  if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
7211    cat >> confdefs.h <<\EOF
7212 #define HAVE_PSTATUS_T 1
7213 EOF
7214
7215  fi
7216  echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
7217
7218   echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
7219 echo "configure:7220: checking for prrun_t in sys/procfs.h" >&5
7220  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
7221   echo $ac_n "(cached) $ac_c" 1>&6
7222 else
7223   cat > conftest.$ac_ext <<EOF
7224 #line 7225 "configure"
7225 #include "confdefs.h"
7226
7227 #define _SYSCALL32
7228 #include <sys/procfs.h>
7229 int main() {
7230 prrun_t avar
7231 ; return 0; }
7232 EOF
7233 if { (eval echo configure:7234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7234   rm -rf conftest*
7235   bfd_cv_have_sys_procfs_type_prrun_t=yes
7236 else
7237   echo "configure: failed program was:" >&5
7238   cat conftest.$ac_ext >&5
7239   rm -rf conftest*
7240   bfd_cv_have_sys_procfs_type_prrun_t=no
7241    
7242 fi
7243 rm -f conftest*
7244 fi
7245
7246  if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
7247    cat >> confdefs.h <<\EOF
7248 #define HAVE_PRRUN_T 1
7249 EOF
7250
7251  fi
7252  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
7253
7254   echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
7255 echo "configure:7256: checking for gregset_t in sys/procfs.h" >&5
7256  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
7257   echo $ac_n "(cached) $ac_c" 1>&6
7258 else
7259   cat > conftest.$ac_ext <<EOF
7260 #line 7261 "configure"
7261 #include "confdefs.h"
7262
7263 #define _SYSCALL32
7264 #include <sys/procfs.h>
7265 int main() {
7266 gregset_t avar
7267 ; return 0; }
7268 EOF
7269 if { (eval echo configure:7270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7270   rm -rf conftest*
7271   bfd_cv_have_sys_procfs_type_gregset_t=yes
7272 else
7273   echo "configure: failed program was:" >&5
7274   cat conftest.$ac_ext >&5
7275   rm -rf conftest*
7276   bfd_cv_have_sys_procfs_type_gregset_t=no
7277    
7278 fi
7279 rm -f conftest*
7280 fi
7281
7282  if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
7283    cat >> confdefs.h <<\EOF
7284 #define HAVE_GREGSET_T 1
7285 EOF
7286
7287  fi
7288  echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
7289
7290   echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
7291 echo "configure:7292: checking for fpregset_t in sys/procfs.h" >&5
7292  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
7293   echo $ac_n "(cached) $ac_c" 1>&6
7294 else
7295   cat > conftest.$ac_ext <<EOF
7296 #line 7297 "configure"
7297 #include "confdefs.h"
7298
7299 #define _SYSCALL32
7300 #include <sys/procfs.h>
7301 int main() {
7302 fpregset_t avar
7303 ; return 0; }
7304 EOF
7305 if { (eval echo configure:7306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7306   rm -rf conftest*
7307   bfd_cv_have_sys_procfs_type_fpregset_t=yes
7308 else
7309   echo "configure: failed program was:" >&5
7310   cat conftest.$ac_ext >&5
7311   rm -rf conftest*
7312   bfd_cv_have_sys_procfs_type_fpregset_t=no
7313    
7314 fi
7315 rm -f conftest*
7316 fi
7317
7318  if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
7319    cat >> confdefs.h <<\EOF
7320 #define HAVE_FPREGSET_T 1
7321 EOF
7322
7323  fi
7324  echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
7325
7326   echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
7327 echo "configure:7328: checking for prgregset_t in sys/procfs.h" >&5
7328  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
7329   echo $ac_n "(cached) $ac_c" 1>&6
7330 else
7331   cat > conftest.$ac_ext <<EOF
7332 #line 7333 "configure"
7333 #include "confdefs.h"
7334
7335 #define _SYSCALL32
7336 #include <sys/procfs.h>
7337 int main() {
7338 prgregset_t avar
7339 ; return 0; }
7340 EOF
7341 if { (eval echo configure:7342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7342   rm -rf conftest*
7343   bfd_cv_have_sys_procfs_type_prgregset_t=yes
7344 else
7345   echo "configure: failed program was:" >&5
7346   cat conftest.$ac_ext >&5
7347   rm -rf conftest*
7348   bfd_cv_have_sys_procfs_type_prgregset_t=no
7349    
7350 fi
7351 rm -f conftest*
7352 fi
7353
7354  if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
7355    cat >> confdefs.h <<\EOF
7356 #define HAVE_PRGREGSET_T 1
7357 EOF
7358
7359  fi
7360  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
7361
7362   echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
7363 echo "configure:7364: checking for prfpregset_t in sys/procfs.h" >&5
7364  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
7365   echo $ac_n "(cached) $ac_c" 1>&6
7366 else
7367   cat > conftest.$ac_ext <<EOF
7368 #line 7369 "configure"
7369 #include "confdefs.h"
7370
7371 #define _SYSCALL32
7372 #include <sys/procfs.h>
7373 int main() {
7374 prfpregset_t avar
7375 ; return 0; }
7376 EOF
7377 if { (eval echo configure:7378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7378   rm -rf conftest*
7379   bfd_cv_have_sys_procfs_type_prfpregset_t=yes
7380 else
7381   echo "configure: failed program was:" >&5
7382   cat conftest.$ac_ext >&5
7383   rm -rf conftest*
7384   bfd_cv_have_sys_procfs_type_prfpregset_t=no
7385    
7386 fi
7387 rm -f conftest*
7388 fi
7389
7390  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7391    cat >> confdefs.h <<\EOF
7392 #define HAVE_PRFPREGSET_T 1
7393 EOF
7394
7395  fi
7396  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
7397
7398   echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
7399 echo "configure:7400: checking for prgregset32_t in sys/procfs.h" >&5
7400  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
7401   echo $ac_n "(cached) $ac_c" 1>&6
7402 else
7403   cat > conftest.$ac_ext <<EOF
7404 #line 7405 "configure"
7405 #include "confdefs.h"
7406
7407 #define _SYSCALL32
7408 #include <sys/procfs.h>
7409 int main() {
7410 prgregset32_t avar
7411 ; return 0; }
7412 EOF
7413 if { (eval echo configure:7414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7414   rm -rf conftest*
7415   bfd_cv_have_sys_procfs_type_prgregset32_t=yes
7416 else
7417   echo "configure: failed program was:" >&5
7418   cat conftest.$ac_ext >&5
7419   rm -rf conftest*
7420   bfd_cv_have_sys_procfs_type_prgregset32_t=no
7421    
7422 fi
7423 rm -f conftest*
7424 fi
7425
7426  if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
7427    cat >> confdefs.h <<\EOF
7428 #define HAVE_PRGREGSET32_T 1
7429 EOF
7430
7431  fi
7432  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
7433
7434   echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
7435 echo "configure:7436: checking for prfpregset32_t in sys/procfs.h" >&5
7436  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
7437   echo $ac_n "(cached) $ac_c" 1>&6
7438 else
7439   cat > conftest.$ac_ext <<EOF
7440 #line 7441 "configure"
7441 #include "confdefs.h"
7442
7443 #define _SYSCALL32
7444 #include <sys/procfs.h>
7445 int main() {
7446 prfpregset32_t avar
7447 ; return 0; }
7448 EOF
7449 if { (eval echo configure:7450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7450   rm -rf conftest*
7451   bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
7452 else
7453   echo "configure: failed program was:" >&5
7454   cat conftest.$ac_ext >&5
7455   rm -rf conftest*
7456   bfd_cv_have_sys_procfs_type_prfpregset32_t=no
7457    
7458 fi
7459 rm -f conftest*
7460 fi
7461
7462  if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
7463    cat >> confdefs.h <<\EOF
7464 #define HAVE_PRFPREGSET32_T 1
7465 EOF
7466
7467  fi
7468  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
7469
7470   echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
7471 echo "configure:7472: checking for lwpid_t in sys/procfs.h" >&5
7472  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
7473   echo $ac_n "(cached) $ac_c" 1>&6
7474 else
7475   cat > conftest.$ac_ext <<EOF
7476 #line 7477 "configure"
7477 #include "confdefs.h"
7478
7479 #define _SYSCALL32
7480 #include <sys/procfs.h>
7481 int main() {
7482 lwpid_t avar
7483 ; return 0; }
7484 EOF
7485 if { (eval echo configure:7486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7486   rm -rf conftest*
7487   bfd_cv_have_sys_procfs_type_lwpid_t=yes
7488 else
7489   echo "configure: failed program was:" >&5
7490   cat conftest.$ac_ext >&5
7491   rm -rf conftest*
7492   bfd_cv_have_sys_procfs_type_lwpid_t=no
7493    
7494 fi
7495 rm -f conftest*
7496 fi
7497
7498  if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
7499    cat >> confdefs.h <<\EOF
7500 #define HAVE_LWPID_T 1
7501 EOF
7502
7503  fi
7504  echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
7505
7506   echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
7507 echo "configure:7508: checking for psaddr_t in sys/procfs.h" >&5
7508  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
7509   echo $ac_n "(cached) $ac_c" 1>&6
7510 else
7511   cat > conftest.$ac_ext <<EOF
7512 #line 7513 "configure"
7513 #include "confdefs.h"
7514
7515 #define _SYSCALL32
7516 #include <sys/procfs.h>
7517 int main() {
7518 psaddr_t avar
7519 ; return 0; }
7520 EOF
7521 if { (eval echo configure:7522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7522   rm -rf conftest*
7523   bfd_cv_have_sys_procfs_type_psaddr_t=yes
7524 else
7525   echo "configure: failed program was:" >&5
7526   cat conftest.$ac_ext >&5
7527   rm -rf conftest*
7528   bfd_cv_have_sys_procfs_type_psaddr_t=no
7529    
7530 fi
7531 rm -f conftest*
7532 fi
7533
7534  if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
7535    cat >> confdefs.h <<\EOF
7536 #define HAVE_PSADDR_T 1
7537 EOF
7538
7539  fi
7540  echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
7541
7542   echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
7543 echo "configure:7544: checking for prsysent_t in sys/procfs.h" >&5
7544  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
7545   echo $ac_n "(cached) $ac_c" 1>&6
7546 else
7547   cat > conftest.$ac_ext <<EOF
7548 #line 7549 "configure"
7549 #include "confdefs.h"
7550
7551 #define _SYSCALL32
7552 #include <sys/procfs.h>
7553 int main() {
7554 prsysent_t avar
7555 ; return 0; }
7556 EOF
7557 if { (eval echo configure:7558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7558   rm -rf conftest*
7559   bfd_cv_have_sys_procfs_type_prsysent_t=yes
7560 else
7561   echo "configure: failed program was:" >&5
7562   cat conftest.$ac_ext >&5
7563   rm -rf conftest*
7564   bfd_cv_have_sys_procfs_type_prsysent_t=no
7565    
7566 fi
7567 rm -f conftest*
7568 fi
7569
7570  if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
7571    cat >> confdefs.h <<\EOF
7572 #define HAVE_PRSYSENT_T 1
7573 EOF
7574
7575  fi
7576  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
7577
7578   echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
7579 echo "configure:7580: checking for pr_sigset_t in sys/procfs.h" >&5
7580  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
7581   echo $ac_n "(cached) $ac_c" 1>&6
7582 else
7583   cat > conftest.$ac_ext <<EOF
7584 #line 7585 "configure"
7585 #include "confdefs.h"
7586
7587 #define _SYSCALL32
7588 #include <sys/procfs.h>
7589 int main() {
7590 pr_sigset_t avar
7591 ; return 0; }
7592 EOF
7593 if { (eval echo configure:7594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7594   rm -rf conftest*
7595   bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
7596 else
7597   echo "configure: failed program was:" >&5
7598   cat conftest.$ac_ext >&5
7599   rm -rf conftest*
7600   bfd_cv_have_sys_procfs_type_pr_sigset_t=no
7601    
7602 fi
7603 rm -f conftest*
7604 fi
7605
7606  if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
7607    cat >> confdefs.h <<\EOF
7608 #define HAVE_PR_SIGSET_T 1
7609 EOF
7610
7611  fi
7612  echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
7613
7614   echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
7615 echo "configure:7616: checking for pr_sigaction64_t in sys/procfs.h" >&5
7616  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+set}'`\" = set"; then
7617   echo $ac_n "(cached) $ac_c" 1>&6
7618 else
7619   cat > conftest.$ac_ext <<EOF
7620 #line 7621 "configure"
7621 #include "confdefs.h"
7622
7623 #define _SYSCALL32
7624 #include <sys/procfs.h>
7625 int main() {
7626 pr_sigaction64_t avar
7627 ; return 0; }
7628 EOF
7629 if { (eval echo configure:7630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7630   rm -rf conftest*
7631   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
7632 else
7633   echo "configure: failed program was:" >&5
7634   cat conftest.$ac_ext >&5
7635   rm -rf conftest*
7636   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
7637    
7638 fi
7639 rm -f conftest*
7640 fi
7641
7642  if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
7643    cat >> confdefs.h <<\EOF
7644 #define HAVE_PR_SIGACTION64_T 1
7645 EOF
7646
7647  fi
7648  echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
7649
7650   echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
7651 echo "configure:7652: checking for pr_siginfo64_t in sys/procfs.h" >&5
7652  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
7653   echo $ac_n "(cached) $ac_c" 1>&6
7654 else
7655   cat > conftest.$ac_ext <<EOF
7656 #line 7657 "configure"
7657 #include "confdefs.h"
7658
7659 #define _SYSCALL32
7660 #include <sys/procfs.h>
7661 int main() {
7662 pr_siginfo64_t avar
7663 ; return 0; }
7664 EOF
7665 if { (eval echo configure:7666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7666   rm -rf conftest*
7667   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
7668 else
7669   echo "configure: failed program was:" >&5
7670   cat conftest.$ac_ext >&5
7671   rm -rf conftest*
7672   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
7673    
7674 fi
7675 rm -f conftest*
7676 fi
7677
7678  if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
7679    cat >> confdefs.h <<\EOF
7680 #define HAVE_PR_SIGINFO64_T 1
7681 EOF
7682
7683  fi
7684  echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
7685
7686
7687
7688   
7689         
7690   if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
7691     echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
7692 echo "configure:7693: checking whether prfpregset_t type is broken" >&5
7693     if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
7694   echo $ac_n "(cached) $ac_c" 1>&6
7695 else
7696   if test "$cross_compiling" = yes; then
7697   gdb_cv_prfpregset_t_broken=yes
7698 else
7699   cat > conftest.$ac_ext <<EOF
7700 #line 7701 "configure"
7701 #include "confdefs.h"
7702 #include <sys/procfs.h>
7703        int main ()
7704        {
7705          if (sizeof (prfpregset_t) == sizeof (void *))
7706            return 1;
7707          return 0;
7708        }
7709 EOF
7710 if { (eval echo configure:7711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7711 then
7712   gdb_cv_prfpregset_t_broken=no
7713 else
7714   echo "configure: failed program was:" >&5
7715   cat conftest.$ac_ext >&5
7716   rm -fr conftest*
7717   gdb_cv_prfpregset_t_broken=yes
7718 fi
7719 rm -fr conftest*
7720 fi
7721
7722 fi
7723
7724     echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
7725     if test $gdb_cv_prfpregset_t_broken = yes; then
7726       cat >> confdefs.h <<\EOF
7727 #define PRFPREGSET_T_BROKEN 1
7728 EOF
7729
7730     fi
7731   fi
7732
7733   
7734   echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
7735 echo "configure:7736: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
7736   if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
7737   echo $ac_n "(cached) $ac_c" 1>&6
7738 else
7739   cat > conftest.$ac_ext <<EOF
7740 #line 7741 "configure"
7741 #include "confdefs.h"
7742 #include <unistd.h>
7743 #include <sys/types.h>
7744 #include <sys/procfs.h>
7745
7746 int main() {
7747
7748     int dummy;;
7749     dummy = ioctl(0, PIOCSET, &dummy);
7750   
7751 ; return 0; }
7752 EOF
7753 if { (eval echo configure:7754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7754   rm -rf conftest*
7755   gdb_cv_have_procfs_piocset=yes
7756 else
7757   echo "configure: failed program was:" >&5
7758   cat conftest.$ac_ext >&5
7759   rm -rf conftest*
7760   gdb_cv_have_procfs_piocset=no
7761 fi
7762 rm -f conftest*
7763 fi
7764
7765   echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
7766   if test $gdb_cv_have_procfs_piocset = yes; then
7767     cat >> confdefs.h <<\EOF
7768 #define HAVE_PROCFS_PIOCSET 1
7769 EOF
7770
7771   fi
7772 fi
7773
7774 if test ${host} = ${target} ; then
7775     
7776   echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
7777 echo "configure:7778: checking for member l_addr in struct link_map" >&5
7778   if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
7779   echo $ac_n "(cached) $ac_c" 1>&6
7780 else
7781   cat > conftest.$ac_ext <<EOF
7782 #line 7783 "configure"
7783 #include "confdefs.h"
7784 #include <link.h>
7785 int main() {
7786 struct link_map lm; (void) lm.l_addr;
7787 ; return 0; }
7788 EOF
7789 if { (eval echo configure:7790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7790   rm -rf conftest*
7791   gdb_cv_have_struct_link_map_with_l_members=yes
7792 else
7793   echo "configure: failed program was:" >&5
7794   cat conftest.$ac_ext >&5
7795   rm -rf conftest*
7796   gdb_cv_have_struct_link_map_with_l_members=no
7797 fi
7798 rm -f conftest*
7799 fi
7800
7801   echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
7802   if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
7803     cat >> confdefs.h <<\EOF
7804 #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
7805 EOF
7806
7807   fi
7808
7809     
7810   echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
7811 echo "configure:7812: checking for member lm_addr in struct link_map" >&5
7812   if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
7813   echo $ac_n "(cached) $ac_c" 1>&6
7814 else
7815   cat > conftest.$ac_ext <<EOF
7816 #line 7817 "configure"
7817 #include "confdefs.h"
7818 #include <sys/types.h>
7819 #include <link.h>
7820 int main() {
7821 struct link_map lm; (void) lm.lm_addr;
7822 ; return 0; }
7823 EOF
7824 if { (eval echo configure:7825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7825   rm -rf conftest*
7826   gdb_cv_have_struct_link_map_with_lm_members=yes
7827 else
7828   echo "configure: failed program was:" >&5
7829   cat conftest.$ac_ext >&5
7830   rm -rf conftest*
7831   gdb_cv_have_struct_link_map_with_lm_members=no
7832 fi
7833 rm -f conftest*
7834 fi
7835
7836   echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
7837   if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
7838     cat >> confdefs.h <<\EOF
7839 #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
7840 EOF
7841
7842   fi
7843
7844     
7845   echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
7846 echo "configure:7847: checking for member som_addr in struct so_map" >&5
7847   if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
7848   echo $ac_n "(cached) $ac_c" 1>&6
7849 else
7850   cat > conftest.$ac_ext <<EOF
7851 #line 7852 "configure"
7852 #include "confdefs.h"
7853 #include <sys/types.h>
7854 #ifdef HAVE_NLIST_H
7855 #include <nlist.h>
7856 #endif
7857 #include <link.h>
7858 int main() {
7859 struct so_map lm; (void) lm.som_addr;
7860 ; return 0; }
7861 EOF
7862 if { (eval echo configure:7863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7863   rm -rf conftest*
7864   gdb_cv_have_struct_so_map_with_som_members=yes
7865 else
7866   echo "configure: failed program was:" >&5
7867   cat conftest.$ac_ext >&5
7868   rm -rf conftest*
7869   gdb_cv_have_struct_so_map_with_som_members=no
7870 fi
7871 rm -f conftest*
7872 fi
7873
7874   echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
7875   if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
7876     cat >> confdefs.h <<\EOF
7877 #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
7878 EOF
7879
7880   fi
7881
7882     
7883   echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
7884 echo "configure:7885: checking for struct link_map32 in sys/link.h" >&5
7885   if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
7886   echo $ac_n "(cached) $ac_c" 1>&6
7887 else
7888   cat > conftest.$ac_ext <<EOF
7889 #line 7890 "configure"
7890 #include "confdefs.h"
7891 #define _SYSCALL32
7892 #include <sys/link.h>
7893 int main() {
7894 struct link_map32 l;
7895 ; return 0; }
7896 EOF
7897 if { (eval echo configure:7898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7898   rm -rf conftest*
7899   gdb_cv_have_struct_link_map32=yes
7900 else
7901   echo "configure: failed program was:" >&5
7902   cat conftest.$ac_ext >&5
7903   rm -rf conftest*
7904   gdb_cv_have_struct_link_map32=no
7905 fi
7906 rm -f conftest*
7907 fi
7908
7909   echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
7910   if test $gdb_cv_have_struct_link_map32 = yes; then
7911     cat >> confdefs.h <<\EOF
7912 #define HAVE_STRUCT_LINK_MAP32 1
7913 EOF
7914
7915     cat >> confdefs.h <<\EOF
7916 #define _SYSCALL32 1
7917 EOF
7918
7919   fi
7920 fi
7921
7922
7923 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
7924 echo "configure:7925: checking for long long support in compiler" >&5
7925 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
7926   echo $ac_n "(cached) $ac_c" 1>&6
7927 else
7928   cat > conftest.$ac_ext <<EOF
7929 #line 7930 "configure"
7930 #include "confdefs.h"
7931
7932 int main() {
7933
7934   extern long long foo;
7935   switch (foo & 2) { case 0: return 1; }
7936
7937 ; return 0; }
7938 EOF
7939 if { (eval echo configure:7940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7940   rm -rf conftest*
7941   gdb_cv_c_long_long=yes
7942 else
7943   echo "configure: failed program was:" >&5
7944   cat conftest.$ac_ext >&5
7945   rm -rf conftest*
7946   gdb_cv_c_long_long=no
7947 fi
7948 rm -f conftest*
7949 fi
7950
7951 echo "$ac_t""$gdb_cv_c_long_long" 1>&6
7952 if test $gdb_cv_c_long_long = yes; then
7953   cat >> confdefs.h <<\EOF
7954 #define CC_HAS_LONG_LONG 1
7955 EOF
7956
7957 fi
7958
7959
7960 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
7961 echo "configure:7962: checking for long long support in printf" >&5
7962 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
7963   echo $ac_n "(cached) $ac_c" 1>&6
7964 else
7965   if test "$cross_compiling" = yes; then
7966   gdb_cv_printf_has_long_long=no
7967 else
7968   cat > conftest.$ac_ext <<EOF
7969 #line 7970 "configure"
7970 #include "confdefs.h"
7971
7972 int main () {
7973   char buf[32];
7974   long long l = 0;
7975   l = (l << 16) + 0x0123;
7976   l = (l << 16) + 0x4567;
7977   l = (l << 16) + 0x89ab;
7978   l = (l << 16) + 0xcdef;
7979   sprintf (buf, "0x%016llx", l);
7980   return (strcmp ("0x0123456789abcdef", buf));
7981 }
7982 EOF
7983 if { (eval echo configure:7984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7984 then
7985   gdb_cv_printf_has_long_long=yes
7986 else
7987   echo "configure: failed program was:" >&5
7988   cat conftest.$ac_ext >&5
7989   rm -fr conftest*
7990   gdb_cv_printf_has_long_long=no
7991 fi
7992 rm -fr conftest*
7993 fi
7994
7995 fi
7996
7997 if test $gdb_cv_printf_has_long_long = yes; then
7998   cat >> confdefs.h <<\EOF
7999 #define PRINTF_HAS_LONG_LONG 1
8000 EOF
8001
8002 fi
8003 echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
8004
8005
8006 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
8007 echo "configure:8008: checking for long double support in compiler" >&5
8008 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
8009   echo $ac_n "(cached) $ac_c" 1>&6
8010 else
8011   cat > conftest.$ac_ext <<EOF
8012 #line 8013 "configure"
8013 #include "confdefs.h"
8014
8015 int main() {
8016 long double foo;
8017 ; return 0; }
8018 EOF
8019 if { (eval echo configure:8020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8020   rm -rf conftest*
8021   ac_cv_c_long_double=yes
8022 else
8023   echo "configure: failed program was:" >&5
8024   cat conftest.$ac_ext >&5
8025   rm -rf conftest*
8026   ac_cv_c_long_double=no
8027 fi
8028 rm -f conftest*
8029 fi
8030
8031 echo "$ac_t""$ac_cv_c_long_double" 1>&6
8032 if test $ac_cv_c_long_double = yes; then
8033   cat >> confdefs.h <<\EOF
8034 #define HAVE_LONG_DOUBLE 1
8035 EOF
8036
8037 fi
8038
8039
8040 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
8041 echo "configure:8042: checking for long double support in printf" >&5
8042 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
8043   echo $ac_n "(cached) $ac_c" 1>&6
8044 else
8045   if test "$cross_compiling" = yes; then
8046   gdb_cv_printf_has_long_double=no
8047 else
8048   cat > conftest.$ac_ext <<EOF
8049 #line 8050 "configure"
8050 #include "confdefs.h"
8051
8052 int main () {
8053   char buf[16];
8054   long double f = 3.141592653;
8055   sprintf (buf, "%Lg", f);
8056   return (strncmp ("3.14159", buf, 7));
8057 }
8058 EOF
8059 if { (eval echo configure:8060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8060 then
8061   gdb_cv_printf_has_long_double=yes
8062 else
8063   echo "configure: failed program was:" >&5
8064   cat conftest.$ac_ext >&5
8065   rm -fr conftest*
8066   gdb_cv_printf_has_long_double=no
8067 fi
8068 rm -fr conftest*
8069 fi
8070
8071 fi
8072
8073 if test $gdb_cv_printf_has_long_double = yes; then
8074   cat >> confdefs.h <<\EOF
8075 #define PRINTF_HAS_LONG_DOUBLE 1
8076 EOF
8077
8078 fi
8079 echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
8080
8081
8082 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
8083 echo "configure:8084: checking for long double support in scanf" >&5
8084 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
8085   echo $ac_n "(cached) $ac_c" 1>&6
8086 else
8087   if test "$cross_compiling" = yes; then
8088   gdb_cv_scanf_has_long_double=no
8089 else
8090   cat > conftest.$ac_ext <<EOF
8091 #line 8092 "configure"
8092 #include "confdefs.h"
8093
8094 int main () {
8095   char *buf = "3.141592653";
8096   long double f = 0;
8097   sscanf (buf, "%Lg", &f);
8098   return !(f > 3.14159 && f < 3.14160);
8099 }
8100 EOF
8101 if { (eval echo configure:8102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8102 then
8103   gdb_cv_scanf_has_long_double=yes
8104 else
8105   echo "configure: failed program was:" >&5
8106   cat conftest.$ac_ext >&5
8107   rm -fr conftest*
8108   gdb_cv_scanf_has_long_double=no
8109 fi
8110 rm -fr conftest*
8111 fi
8112
8113 fi
8114
8115 if test $gdb_cv_scanf_has_long_double = yes; then
8116   cat >> confdefs.h <<\EOF
8117 #define SCANF_HAS_LONG_DOUBLE 1
8118 EOF
8119
8120 fi
8121 echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
8122
8123 case ${host_os} in
8124 aix*)
8125   echo $ac_n "checking for -bbigtoc option""... $ac_c" 1>&6
8126 echo "configure:8127: checking for -bbigtoc option" >&5
8127 if eval "test \"`echo '$''{'gdb_cv_bigtoc'+set}'`\" = set"; then
8128   echo $ac_n "(cached) $ac_c" 1>&6
8129 else
8130   
8131     SAVE_LDFLAGS=$LDFLAGS
8132
8133     case $GCC in
8134     yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
8135     *) gdb_cv_bigtoc=-bbigtoc ;;
8136     esac
8137
8138     LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
8139     cat > conftest.$ac_ext <<EOF
8140 #line 8141 "configure"
8141 #include "confdefs.h"
8142
8143 int main() {
8144 int i;
8145 ; return 0; }
8146 EOF
8147 if { (eval echo configure:8148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8148   :
8149 else
8150   echo "configure: failed program was:" >&5
8151   cat conftest.$ac_ext >&5
8152   rm -rf conftest*
8153   gdb_cv_bigtoc=
8154 fi
8155 rm -f conftest*
8156   
8157 fi
8158
8159 echo "$ac_t""$gdb_cv_bigtoc" 1>&6
8160   CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
8161   ;;
8162 esac
8163
8164
8165
8166 if test ${build} = ${host} -a ${host} = ${target} ; then
8167    case ${host_os} in
8168    hpux*)
8169       echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
8170 echo "configure:8171: checking for HPUX/OSF thread support" >&5
8171       if test -f /usr/include/dce/cma_config.h ; then
8172          if test "$GCC" = "yes" ; then
8173             echo "$ac_t""yes" 1>&6
8174             cat >> confdefs.h <<\EOF
8175 #define HAVE_HPUX_THREAD_SUPPORT 1
8176 EOF
8177
8178             CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
8179             CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
8180          else
8181             echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
8182          fi
8183       else
8184          echo "$ac_t""no" 1>&6
8185       fi
8186       ;;
8187    solaris*)
8188       # See if thread_db library is around for Solaris thread debugging.
8189       # Note that we must explicitly test for version 1 of the library
8190       # because version 0 (present on Solaris 2.4 or earlier) doesn't have
8191       # the same API.
8192       echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
8193 echo "configure:8194: checking for Solaris thread debugging library" >&5
8194       if test -f /usr/lib/libthread_db.so.1 ; then
8195          echo "$ac_t""yes" 1>&6
8196          cat >> confdefs.h <<\EOF
8197 #define HAVE_THREAD_DB_LIB 1
8198 EOF
8199
8200          CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
8201          CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
8202          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8203 echo "configure:8204: checking for dlopen in -ldl" >&5
8204 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
8205 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8206   echo $ac_n "(cached) $ac_c" 1>&6
8207 else
8208   ac_save_LIBS="$LIBS"
8209 LIBS="-ldl  $LIBS"
8210 cat > conftest.$ac_ext <<EOF
8211 #line 8212 "configure"
8212 #include "confdefs.h"
8213 /* Override any gcc2 internal prototype to avoid an error.  */
8214 /* We use char because int might match the return type of a gcc2
8215     builtin and then its argument prototype would still apply.  */
8216 char dlopen();
8217
8218 int main() {
8219 dlopen()
8220 ; return 0; }
8221 EOF
8222 if { (eval echo configure:8223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8223   rm -rf conftest*
8224   eval "ac_cv_lib_$ac_lib_var=yes"
8225 else
8226   echo "configure: failed program was:" >&5
8227   cat conftest.$ac_ext >&5
8228   rm -rf conftest*
8229   eval "ac_cv_lib_$ac_lib_var=no"
8230 fi
8231 rm -f conftest*
8232 LIBS="$ac_save_LIBS"
8233
8234 fi
8235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8236   echo "$ac_t""yes" 1>&6
8237     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8238     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8239   cat >> confdefs.h <<EOF
8240 #define $ac_tr_lib 1
8241 EOF
8242
8243   LIBS="-ldl $LIBS"
8244
8245 else
8246   echo "$ac_t""no" 1>&6
8247 fi
8248
8249          if test "$GCC" = "yes" ; then
8250             # The GNU linker requires the -export-dynamic option to make
8251             # all symbols visible in the dynamic symbol table.
8252             hold_ldflags=$LDFLAGS
8253             echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
8254 echo "configure:8255: checking for the ld -export-dynamic flag" >&5
8255             LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
8256             cat > conftest.$ac_ext <<EOF
8257 #line 8258 "configure"
8258 #include "confdefs.h"
8259
8260 int main() {
8261 int i;
8262 ; return 0; }
8263 EOF
8264 if { (eval echo configure:8265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8265   rm -rf conftest*
8266   found=yes
8267 else
8268   echo "configure: failed program was:" >&5
8269   cat conftest.$ac_ext >&5
8270   rm -rf conftest*
8271   found=no
8272 fi
8273 rm -f conftest*
8274             LDFLAGS=$hold_ldflags
8275             echo "$ac_t""$found" 1>&6
8276             if test $found = yes; then
8277                CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
8278             fi
8279          fi
8280          # Sun randomly tweaked the prototypes in <proc_service.h>
8281          # at one point.
8282          echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
8283 echo "configure:8284: checking if <proc_service.h> is old" >&5
8284          if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
8285   echo $ac_n "(cached) $ac_c" 1>&6
8286 else
8287   
8288             cat > conftest.$ac_ext <<EOF
8289 #line 8290 "configure"
8290 #include "confdefs.h"
8291
8292                 #include <proc_service.h>
8293                 ps_err_e ps_pdwrite
8294                     (struct ps_prochandle*, psaddr_t, const void*, size_t);
8295             
8296 int main() {
8297
8298 ; return 0; }
8299 EOF
8300 if { (eval echo configure:8301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8301   rm -rf conftest*
8302   gdb_cv_proc_service_is_old=no
8303 else
8304   echo "configure: failed program was:" >&5
8305   cat conftest.$ac_ext >&5
8306   rm -rf conftest*
8307   gdb_cv_proc_service_is_old=yes
8308 fi
8309 rm -f conftest*
8310          
8311 fi
8312
8313          echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
8314          if test $gdb_cv_proc_service_is_old = yes; then
8315             cat >> confdefs.h <<\EOF
8316 #define PROC_SERVICE_IS_OLD 1
8317 EOF
8318
8319          fi
8320       else
8321          echo "$ac_t""no" 1>&6
8322       fi
8323       ;;
8324    aix*)
8325       echo $ac_n "checking for AiX thread debugging library""... $ac_c" 1>&6
8326 echo "configure:8327: checking for AiX thread debugging library" >&5
8327       if eval "test \"`echo '$''{'gdb_cv_have_aix_thread_debug'+set}'`\" = set"; then
8328   echo $ac_n "(cached) $ac_c" 1>&6
8329 else
8330   cat > conftest.$ac_ext <<EOF
8331 #line 8332 "configure"
8332 #include "confdefs.h"
8333 #include <sys/pthdebug.h>
8334 int main() {
8335 #ifndef PTHDB_VERSION_3
8336                                     #error
8337                                     #endif
8338 ; return 0; }
8339 EOF
8340 if { (eval echo configure:8341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8341   rm -rf conftest*
8342   gdb_cv_have_aix_thread_debug=yes
8343 else
8344   echo "configure: failed program was:" >&5
8345   cat conftest.$ac_ext >&5
8346   rm -rf conftest*
8347   gdb_cv_have_aix_thread_debug=no
8348 fi
8349 rm -f conftest*
8350 fi
8351
8352       echo "$ac_t""$gdb_cv_have_aix_thread_debug" 1>&6
8353       if test $gdb_cv_have_aix_thread_debug = yes; then
8354          CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
8355          CONFIG_LIB_OBS="${CONFIG_LIB_OBS} aix-thread.o"
8356          CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -lpthdebug"
8357       fi
8358       ;;
8359    esac
8360    
8361 fi
8362
8363 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
8364    echo $ac_n "checking whether <thread_db.h> has TD_NOTALLOC""... $ac_c" 1>&6
8365 echo "configure:8366: checking whether <thread_db.h> has TD_NOTALLOC" >&5
8366 if eval "test \"`echo '$''{'gdb_cv_thread_db_h_has_td_notalloc'+set}'`\" = set"; then
8367   echo $ac_n "(cached) $ac_c" 1>&6
8368 else
8369   cat > conftest.$ac_ext <<EOF
8370 #line 8371 "configure"
8371 #include "confdefs.h"
8372 #include <thread_db.h>
8373 int main() {
8374 int i = TD_NOTALLOC;
8375 ; return 0; }
8376 EOF
8377 if { (eval echo configure:8378: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8378   rm -rf conftest*
8379   gdb_cv_thread_db_h_has_td_notalloc=yes
8380 else
8381   echo "configure: failed program was:" >&5
8382   cat conftest.$ac_ext >&5
8383   rm -rf conftest*
8384   gdb_cv_thread_db_h_has_td_notalloc=no
8385      
8386 fi
8387 rm -f conftest*
8388    
8389 fi
8390
8391 echo "$ac_t""$gdb_cv_thread_db_h_has_td_notalloc" 1>&6
8392 fi
8393 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
8394   cat >> confdefs.h <<\EOF
8395 #define THREAD_DB_HAS_TD_NOTALLOC 1
8396 EOF
8397
8398 fi
8399
8400 if test $host = $target; then
8401   case $target in
8402     *-linux*)
8403       save_CFLAGS=$CFLAGS
8404       CFLAGS="$CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
8405       cat > conftest.$ac_ext <<EOF
8406 #line 8407 "configure"
8407 #include "confdefs.h"
8408 #include <unistd.h>
8409 int main() {
8410 pread64 (0, NULL, 0, 0);
8411 ; return 0; }
8412 EOF
8413 if { (eval echo configure:8414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8414   rm -rf conftest*
8415   ENABLE_CFLAGS="$ENABLE_CFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_LARGEFILE64_SOURCE"
8416                    cat >> confdefs.h <<\EOF
8417 #define HAVE_PREAD64 1
8418 EOF
8419
8420 else
8421   echo "configure: failed program was:" >&5
8422   cat conftest.$ac_ext >&5
8423 fi
8424 rm -f conftest*
8425       CFLAGS=$save_CFLAGS
8426       ;;
8427   esac
8428 fi
8429
8430
8431 # Check whether --enable-netrom or --disable-netrom was given.
8432 if test "${enable_netrom+set}" = set; then
8433   enableval="$enable_netrom"
8434   case "${enableval}" in
8435 yes)    enable_netrom=yes ;;
8436 no)     enable_netrom=no ;;
8437 *)      { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
8438 esac
8439 fi
8440
8441
8442 if test "${enable_netrom}" = "yes"; then
8443         CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o" 
8444         CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
8445 fi
8446
8447
8448 # NOTE: Don't add -Wall or -Wunused, they both include
8449 # -Wunused-parameter which reports bogus warnings.
8450 # NOTE: If you add to this list, remember to update
8451 # gdb/doc/gdbint.texinfo.
8452 build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
8453 -Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
8454 # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
8455 # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
8456 # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
8457 # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
8458 # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
8459 # -Woverloaded-virtual -Winline -Werror"
8460 # Check whether --enable-build-warnings or --disable-build-warnings was given.
8461 if test "${enable_build_warnings+set}" = set; then
8462   enableval="$enable_build_warnings"
8463   case "${enableval}" in
8464   yes)  ;;
8465   no)   build_warnings="-w";;
8466   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
8467         build_warnings="${build_warnings} ${t}";;
8468   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
8469         build_warnings="${t} ${build_warnings}";;
8470   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8471 esac
8472 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
8473   echo "Setting compiler warning flags = $build_warnings" 6>&1
8474 fi
8475 fi
8476 # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
8477 if test "${enable_gdb_build_warnings+set}" = set; then
8478   enableval="$enable_gdb_build_warnings"
8479   case "${enableval}" in
8480   yes)  ;;
8481   no)   build_warnings="-w";;
8482   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
8483         build_warnings="${build_warnings} ${t}";;
8484   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
8485         build_warnings="${t} ${build_warnings}";;
8486   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
8487 esac
8488 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
8489   echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
8490 fi
8491 fi
8492 WARN_CFLAGS=""
8493 WERROR_CFLAGS=""
8494 if test "x${build_warnings}" != x -a "x$GCC" = xyes
8495 then
8496     echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
8497 echo "configure:8498: checking compiler warning flags" >&5
8498     # Separate out the -Werror flag as some files just cannot be
8499     # compiled with it enabled.
8500     for w in ${build_warnings}; do
8501         case $w in
8502         -Werr*) WERROR_CFLAGS=-Werror ;;
8503         *) # Check that GCC accepts it
8504             saved_CFLAGS="$CFLAGS"
8505             CFLAGS="$CFLAGS $w"
8506             cat > conftest.$ac_ext <<EOF
8507 #line 8508 "configure"
8508 #include "confdefs.h"
8509
8510 int main() {
8511
8512 ; return 0; }
8513 EOF
8514 if { (eval echo configure:8515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8515   rm -rf conftest*
8516   WARN_CFLAGS="${WARN_CFLAGS} $w"
8517 else
8518   echo "configure: failed program was:" >&5
8519   cat conftest.$ac_ext >&5
8520 fi
8521 rm -f conftest*
8522             CFLAGS="$saved_CFLAGS"
8523         esac
8524     done
8525     echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
8526 fi
8527
8528
8529
8530 MMALLOC_CFLAGS=
8531 MMALLOC=
8532
8533
8534
8535 # Check whether --with-mmalloc or --without-mmalloc was given.
8536 if test "${with_mmalloc+set}" = set; then
8537   withval="$with_mmalloc"
8538   case "${withval}" in
8539   yes)  want_mmalloc=true ;;
8540   no)   want_mmalloc=false;;
8541   *)    { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
8542 esac
8543 else
8544   want_mmalloc=false
8545 fi
8546
8547 if test x$want_mmalloc = xtrue; then
8548    cat >> confdefs.h <<\EOF
8549 #define USE_MMALLOC 1
8550 EOF
8551
8552    cat >> confdefs.h <<\EOF
8553 #define MMCHECK_FORCE 1
8554 EOF
8555
8556    MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
8557    MMALLOC='../mmalloc/libmmalloc.a'
8558 fi
8559
8560 # In the Cygwin environment, we need some additional flags.
8561 echo $ac_n "checking for cygwin""... $ac_c" 1>&6
8562 echo "configure:8563: checking for cygwin" >&5
8563 if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
8564   echo $ac_n "(cached) $ac_c" 1>&6
8565 else
8566   cat > conftest.$ac_ext <<EOF
8567 #line 8568 "configure"
8568 #include "confdefs.h"
8569
8570 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
8571 lose
8572 #endif
8573 EOF
8574 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8575   egrep "lose" >/dev/null 2>&1; then
8576   rm -rf conftest*
8577   gdb_cv_os_cygwin=yes
8578 else
8579   rm -rf conftest*
8580   gdb_cv_os_cygwin=no
8581 fi
8582 rm -f conftest*
8583
8584 fi
8585
8586 echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
8587
8588
8589 SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
8590 case ${host} in
8591   *go32* ) SER_HARDWIRE=ser-go32.o ;;
8592   *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
8593 esac
8594
8595
8596 # libreadline needs libuser32.a in a cygwin environment
8597 WIN32LIBS=
8598 if test x$gdb_cv_os_cygwin = xyes; then
8599     WIN32LIBS="-luser32"
8600     case "${target}" in
8601         *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
8602         ;;
8603     esac
8604 fi
8605
8606
8607 LIBGUI="../libgui/src/libgui.a"
8608 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
8609
8610
8611
8612 # Check whether --with-cpu or --without-cpu was given.
8613 if test "${with_cpu+set}" = set; then
8614   withval="$with_cpu"
8615   case "${target}" in
8616   powerpc-* | powerpcle-* )
8617     ## It would be nice to keep this table in sync with the one in
8618     ## gcc/configure.
8619     case "${with_cpu}" in
8620       ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
8621       | 604 | 750 )
8622         ## Those are all handled in variants in rs6000-tdep.c, so they're fine.
8623       ;;
8624       common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 ) 
8625         ## These are all RS6000 variants, as far as GDB is concerned.
8626         with_cpu=rs6000
8627       ;;
8628       603e | ec603e )
8629         with_cpu=603
8630       ;;
8631       604e )
8632         with_cpu=604
8633       ;;
8634       * )
8635         echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2
8636         with_cpu=ppc-uisa
8637       ;;
8638     esac
8639   ;;
8640   * )
8641     echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2
8642   ;;
8643 esac
8644 cat >> confdefs.h <<EOF
8645 #define TARGET_CPU_DEFAULT "${with_cpu}"
8646 EOF
8647
8648
8649 fi
8650
8651
8652
8653 # Check whether --enable-gdbtk or --disable-gdbtk was given.
8654 if test "${enable_gdbtk+set}" = set; then
8655   enableval="$enable_gdbtk"
8656   case "${enableval}" in
8657     yes)
8658         case "$host" in
8659         *go32*)
8660             echo "configure: warning: GDB does not support GDBtk on host ${host}.  GDBtk will be disabled." 1>&2
8661             enable_gdbtk=no ;;
8662         *windows*)
8663             echo "configure: warning: GDB does not support GDBtk on host ${host}.  GDBtk will be disabled." 1>&2
8664             enable_gdbtk=no ;;
8665         *)
8666             enable_gdbtk=yes ;;
8667         esac ;;
8668     no)
8669         enable_gdbtk=no  ;;
8670     *)
8671         { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
8672 esac
8673 else
8674   
8675 # Default is on for everything but go32 and Cygwin
8676 case "$host" in
8677     *go32* | *windows*)
8678         ;;
8679     *)
8680         if test -d "${srcdir}/gdbtk" ; then
8681             enable_gdbtk=yes
8682         fi
8683         ;;
8684 esac
8685
8686 fi
8687
8688
8689 WIN32LDAPP=
8690
8691
8692
8693 configdir="unix"
8694
8695 GDBTKLIBS=
8696 if test "${enable_gdbtk}" = "yes"; then
8697
8698     # Gdbtk must have an absolute path to srcdir in order to run
8699     # properly when not installed.
8700     here=`pwd`
8701     cd ${srcdir}
8702     GDBTK_SRC_DIR=`pwd`
8703     cd $here
8704
8705     
8706 #
8707 # Ok, lets find the tcl configuration
8708 # First, look for one uninstalled.  
8709 # the alternative search directory is invoked by --with-tclconfig
8710 #
8711
8712 if test x"${no_tcl}" = x ; then
8713   # we reset no_tcl in case something fails here
8714   no_tcl=true
8715   # Check whether --with-tclconfig or --without-tclconfig was given.
8716 if test "${with_tclconfig+set}" = set; then
8717   withval="$with_tclconfig"
8718   with_tclconfig=${withval}
8719 fi
8720
8721   echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
8722 echo "configure:8723: checking for Tcl configuration" >&5
8723   if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
8724   echo $ac_n "(cached) $ac_c" 1>&6
8725 else
8726   
8727
8728   # First check to see if --with-tclconfig was specified.
8729   if test x"${with_tclconfig}" != x ; then
8730     if test -f "${with_tclconfig}/tclConfig.sh" ; then
8731       ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
8732     else
8733       { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
8734     fi
8735   fi
8736
8737   # then check for a private Tcl installation
8738   if test x"${ac_cv_c_tclconfig}" = x ; then
8739     for i in \
8740                 ../tcl \
8741                 `ls -dr ../tcl[7-9]* 2>/dev/null` \
8742                 ../../tcl \
8743                 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
8744                 ../../../tcl \
8745                 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
8746       if test -f "$i/${configdir}/tclConfig.sh" ; then
8747         ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8748         break
8749       fi
8750     done
8751   fi
8752   # check in a few common install locations
8753   if test x"${ac_cv_c_tclconfig}" = x ; then
8754     for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8755       if test -f "$i/tclConfig.sh" ; then
8756         ac_cv_c_tclconfig=`(cd $i; pwd)`
8757         break
8758       fi
8759     done
8760   fi
8761   # check in a few other private locations
8762   if test x"${ac_cv_c_tclconfig}" = x ; then
8763     for i in \
8764                 ${srcdir}/../tcl \
8765                 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
8766       if test -f "$i/${configdir}/tclConfig.sh" ; then
8767         ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
8768         break
8769       fi
8770     done
8771   fi
8772   
8773 fi
8774
8775   if test x"${ac_cv_c_tclconfig}" = x ; then
8776     TCLCONFIG="# no Tcl configs found"
8777     echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
8778   else
8779     no_tcl=
8780     TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
8781     echo "$ac_t""found $TCLCONFIG" 1>&6
8782   fi
8783 fi
8784
8785     if test -z "${no_tcl}"; then
8786         
8787     . $TCLCONFIG
8788
8789     
8790     
8791     
8792     
8793     
8794
8795
8796
8797
8798     
8799     
8800     
8801     
8802     
8803     
8804     
8805     
8806     
8807     
8808     
8809     
8810
8811
8812
8813         
8814 #
8815 # Ok, lets find the tk configuration
8816 # First, look for one uninstalled.  
8817 # the alternative search directory is invoked by --with-tkconfig
8818 #
8819
8820 if test x"${no_tk}" = x ; then
8821   # we reset no_tk in case something fails here
8822   no_tk=true
8823   # Check whether --with-tkconfig or --without-tkconfig was given.
8824 if test "${with_tkconfig+set}" = set; then
8825   withval="$with_tkconfig"
8826   with_tkconfig=${withval}
8827 fi
8828
8829   echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
8830 echo "configure:8831: checking for Tk configuration" >&5
8831   if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
8832   echo $ac_n "(cached) $ac_c" 1>&6
8833 else
8834   
8835
8836   # First check to see if --with-tkconfig was specified.
8837   if test x"${with_tkconfig}" != x ; then
8838     if test -f "${with_tkconfig}/tkConfig.sh" ; then
8839       ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
8840     else
8841       { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
8842     fi
8843   fi
8844
8845   # then check for a private Tk library
8846   if test x"${ac_cv_c_tkconfig}" = x ; then
8847     for i in \
8848                 ../tk \
8849                 `ls -dr ../tk[4-9]* 2>/dev/null` \
8850                 ../../tk \
8851                 `ls -dr ../../tk[4-9]* 2>/dev/null` \
8852                 ../../../tk \
8853                 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
8854       if test -f "$i/${configdir}/tkConfig.sh" ; then
8855         ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8856         break
8857       fi
8858     done
8859   fi
8860   # check in a few common install locations
8861   if test x"${ac_cv_c_tkconfig}" = x ; then
8862     for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
8863       if test -f "$i/tkConfig.sh" ; then
8864         ac_cv_c_tkconfig=`(cd $i; pwd)`
8865         break
8866       fi
8867     done
8868   fi
8869   # check in a few other private locations
8870   if test x"${ac_cv_c_tkconfig}" = x ; then
8871     for i in \
8872                 ${srcdir}/../tk \
8873                 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
8874       if test -f "$i/${configdir}/tkConfig.sh" ; then
8875         ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
8876         break
8877       fi
8878     done
8879   fi
8880   
8881 fi
8882
8883   if test x"${ac_cv_c_tkconfig}" = x ; then
8884     TKCONFIG="# no Tk configs found"
8885     echo "configure: warning: Can't find Tk configuration definitions" 1>&2
8886   else
8887     no_tk=
8888     TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
8889     echo "$ac_t""found $TKCONFIG" 1>&6
8890   fi
8891 fi
8892
8893
8894
8895         # now look for Tcl library stuff
8896
8897         case "${host}" in
8898         *-*-cygwin*)
8899             tcldir=../tcl/win/
8900             ;;
8901         *)
8902             tcldir=../tcl/unix/
8903             ;;
8904         esac
8905
8906         TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
8907
8908         # If $no_tk is nonempty, then we can't do Tk, and there is no
8909         # point to doing Tcl.
8910         if test -z "${no_tk}"; then
8911            
8912     if test -f "$TKCONFIG" ; then
8913       . $TKCONFIG
8914     fi
8915
8916     
8917     
8918
8919     
8920
8921
8922     
8923     
8924     
8925     
8926     
8927
8928            
8929 #
8930 # Ok, lets find the tcl source trees so we can use the headers
8931 # Warning: transition of version 9 to 10 will break this algorithm
8932 # because 10 sorts before 9. We also look for just tcl. We have to
8933 # be careful that we don't match stuff like tclX by accident.
8934 # the alternative search directory is involked by --with-tclinclude
8935 #
8936
8937 no_tcl=true
8938 echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
8939 echo "configure:8940: checking for Tcl private headers. dir=${configdir}" >&5
8940 # Check whether --with-tclinclude or --without-tclinclude was given.
8941 if test "${with_tclinclude+set}" = set; then
8942   withval="$with_tclinclude"
8943   with_tclinclude=${withval}
8944 fi
8945
8946 if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
8947   echo $ac_n "(cached) $ac_c" 1>&6
8948 else
8949   
8950 # first check to see if --with-tclinclude was specified
8951 if test x"${with_tclinclude}" != x ; then
8952   if test -f ${with_tclinclude}/tclInt.h ; then
8953     ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
8954   elif test -f ${with_tclinclude}/generic/tclInt.h ; then
8955     ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
8956   else
8957     { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
8958   fi
8959 fi
8960
8961 # next check if it came with Tcl configuration file
8962 if test x"${ac_cv_c_tclconfig}" = x ; then
8963   if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
8964     ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
8965   fi
8966 fi
8967
8968 # next check in private source directory
8969 #
8970 # since ls returns lowest version numbers first, reverse its output
8971 if test x"${ac_cv_c_tclh}" = x ; then
8972   for i in \
8973                 ${srcdir}/../tcl \
8974                 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
8975                 ${srcdir}/../../tcl \
8976                 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
8977                 ${srcdir}/../../../tcl \
8978                 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
8979     if test -f $i/generic/tclInt.h ; then
8980       ac_cv_c_tclh=`(cd $i/generic; pwd)`
8981       break
8982     fi
8983   done
8984 fi
8985 # finally check in a few common install locations
8986 #
8987 # since ls returns lowest version numbers first, reverse its output
8988 if test x"${ac_cv_c_tclh}" = x ; then
8989   for i in \
8990                 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
8991                 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
8992                 /usr/local/src/tcl \
8993                 /usr/local/lib/tcl \
8994                 ${prefix}/include ; do
8995     if test -f $i/generic/tclInt.h ; then
8996       ac_cv_c_tclh=`(cd $i/generic; pwd)`
8997       break
8998     fi
8999   done
9000 fi
9001 # see if one is installed
9002 if test x"${ac_cv_c_tclh}" = x ; then
9003    ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
9004 echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
9005 echo "configure:9006: checking for tclInt.h" >&5
9006 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9007   echo $ac_n "(cached) $ac_c" 1>&6
9008 else
9009   cat > conftest.$ac_ext <<EOF
9010 #line 9011 "configure"
9011 #include "confdefs.h"
9012 #include <tclInt.h>
9013 EOF
9014 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9015 { (eval echo configure:9016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9016 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9017 if test -z "$ac_err"; then
9018   rm -rf conftest*
9019   eval "ac_cv_header_$ac_safe=yes"
9020 else
9021   echo "$ac_err" >&5
9022   echo "configure: failed program was:" >&5
9023   cat conftest.$ac_ext >&5
9024   rm -rf conftest*
9025   eval "ac_cv_header_$ac_safe=no"
9026 fi
9027 rm -f conftest*
9028 fi
9029 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9030   echo "$ac_t""yes" 1>&6
9031   ac_cv_c_tclh=installed
9032 else
9033   echo "$ac_t""no" 1>&6
9034 ac_cv_c_tclh=""
9035 fi
9036
9037 fi
9038
9039 fi
9040
9041 if test x"${ac_cv_c_tclh}" = x ; then
9042   TCLHDIR="# no Tcl private headers found"
9043   { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
9044 fi
9045 if test x"${ac_cv_c_tclh}" != x ; then
9046   no_tcl=""
9047   if test x"${ac_cv_c_tclh}" = x"installed" ; then
9048     echo "$ac_t""is installed" 1>&6
9049     TCLHDIR=""
9050   else
9051     echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
9052     # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
9053     TCLHDIR="-I${ac_cv_c_tclh}"
9054   fi
9055 fi
9056
9057
9058
9059            
9060 #
9061 # Ok, lets find the tk source trees so we can use the headers
9062 # If the directory (presumably symlink) named "tk" exists, use that one
9063 # in preference to any others.  Same logic is used when choosing library
9064 # and again with Tcl. The search order is the best place to look first, then in
9065 # decreasing significance. The loop breaks if the trigger file is found.
9066 # Note the gross little conversion here of srcdir by cd'ing to the found
9067 # directory. This converts the path from a relative to an absolute, so
9068 # recursive cache variables for the path will work right. We check all
9069 # the possible paths in one loop rather than many seperate loops to speed
9070 # things up.
9071 # the alternative search directory is involked by --with-tkinclude
9072 #
9073 no_tk=true
9074 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
9075 echo "configure:9076: checking for Tk private headers" >&5
9076 # Check whether --with-tkinclude or --without-tkinclude was given.
9077 if test "${with_tkinclude+set}" = set; then
9078   withval="$with_tkinclude"
9079   with_tkinclude=${withval}
9080 fi
9081
9082 if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
9083   echo $ac_n "(cached) $ac_c" 1>&6
9084 else
9085   
9086 # first check to see if --with-tkinclude was specified
9087 if test x"${with_tkinclude}" != x ; then
9088   if test -f ${with_tkinclude}/tk.h ; then
9089     ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
9090   elif test -f ${with_tkinclude}/generic/tk.h ; then
9091     ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
9092   else
9093     { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
9094   fi
9095 fi
9096
9097 # next check if it came with Tk configuration file
9098 if test x"${ac_cv_c_tkconfig}" = x ; then
9099   if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
9100     ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
9101   fi
9102 fi
9103
9104 # next check in private source directory
9105 #
9106 # since ls returns lowest version numbers first, reverse its output
9107 if test x"${ac_cv_c_tkh}" = x ; then
9108   for i in \
9109                 ${srcdir}/../tk \
9110                 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
9111                 ${srcdir}/../../tk \
9112                 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
9113                 ${srcdir}/../../../tk \
9114                 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
9115     if test -f $i/generic/tk.h ; then
9116       ac_cv_c_tkh=`(cd $i/generic; pwd)`
9117       break
9118     fi
9119   done
9120 fi
9121 # finally check in a few common install locations
9122 #
9123 # since ls returns lowest version numbers first, reverse its output
9124 if test x"${ac_cv_c_tkh}" = x ; then
9125   for i in \
9126                 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
9127                 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
9128                 /usr/local/src/tk \
9129                 /usr/local/lib/tk \
9130                 ${prefix}/include ; do
9131     if test -f $i/generic/tk.h ; then
9132       ac_cv_c_tkh=`(cd $i/generic; pwd)`
9133       break
9134     fi
9135   done
9136 fi
9137 # see if one is installed
9138 if test x"${ac_cv_c_tkh}" = x ; then
9139    ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
9140 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
9141 echo "configure:9142: checking for tk.h" >&5
9142 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9143   echo $ac_n "(cached) $ac_c" 1>&6
9144 else
9145   cat > conftest.$ac_ext <<EOF
9146 #line 9147 "configure"
9147 #include "confdefs.h"
9148 #include <tk.h>
9149 EOF
9150 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9151 { (eval echo configure:9152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9152 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9153 if test -z "$ac_err"; then
9154   rm -rf conftest*
9155   eval "ac_cv_header_$ac_safe=yes"
9156 else
9157   echo "$ac_err" >&5
9158   echo "configure: failed program was:" >&5
9159   cat conftest.$ac_ext >&5
9160   rm -rf conftest*
9161   eval "ac_cv_header_$ac_safe=no"
9162 fi
9163 rm -f conftest*
9164 fi
9165 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9166   echo "$ac_t""yes" 1>&6
9167   ac_cv_c_tkh=installed
9168 else
9169   echo "$ac_t""no" 1>&6
9170 ac_cv_c_tkh=""
9171 fi
9172
9173 fi
9174
9175 fi
9176
9177 if test x"${ac_cv_c_tkh}" != x ; then
9178   no_tk=""
9179   if test x"${ac_cv_c_tkh}" = x"installed" ; then
9180     echo "$ac_t""is installed" 1>&6
9181     TKHDIR=""
9182   else
9183     echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
9184     # this hack is cause the TKHDIR won't print if there is a "-I" in it.
9185     TKHDIR="-I${ac_cv_c_tkh}"
9186   fi
9187 else
9188   TKHDIR="# no Tk directory found"
9189   echo "configure: warning: Can't find Tk private headers" 1>&2
9190   no_tk=true
9191 fi
9192
9193
9194
9195            
9196 echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
9197 echo "configure:9198: checking for Itcl private headers. srcdir=${srcdir}" >&5
9198 if test x"${ac_cv_c_itclh}" = x ; then
9199   for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
9200     if test -f $i/generic/itcl.h ; then
9201       ac_cv_c_itclh=`(cd $i/generic; pwd)`
9202       break
9203     fi
9204   done
9205 fi
9206 if test x"${ac_cv_c_itclh}" = x ; then
9207   ITCLHDIR="# no Itcl private headers found"
9208   { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
9209 fi
9210 if test x"${ac_cv_c_itclh}" != x ; then
9211      ITCLHDIR="-I${ac_cv_c_itclh}"
9212 fi
9213 # should always be here
9214 #     ITCLLIB="../itcl/itcl/unix/libitcl.a"
9215
9216 #AC_SUBST(ITCLLIB)
9217
9218            
9219 echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
9220 echo "configure:9221: checking for Itk private headers. srcdir=${srcdir}" >&5
9221 if test x"${ac_cv_c_itkh}" = x ; then
9222   for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
9223     if test -f $i/generic/itk.h ; then
9224       ac_cv_c_itkh=`(cd $i/generic; pwd)`
9225       break
9226     fi
9227   done
9228 fi
9229 if test x"${ac_cv_c_itkh}" = x ; then
9230   ITKHDIR="# no Itk private headers found"
9231   { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
9232 fi
9233 if test x"${ac_cv_c_itkh}" != x ; then
9234      ITKHDIR="-I${ac_cv_c_itkh}"
9235 fi
9236 # should always be here
9237 #     ITKLIB="../itcl/itk/unix/libitk.a"
9238
9239 #AC_SUBST(ITKLIB)
9240
9241
9242
9243            # now look for Tk library stuff
9244
9245            case "${host}" in
9246            *-*-cygwin*)
9247                tkdir=../tk/win/
9248                ;;
9249            *)
9250                tkdir=../tk/unix/
9251                ;;
9252            esac
9253
9254            TK_DEPS="${tkdir}${TK_LIB_FILE}"
9255
9256            # now look for Itcl library stuff
9257
9258            
9259 #
9260 # Ok, lets find the itcl configuration
9261 # First, look for one uninstalled.  
9262 # the alternative search directory is invoked by --with-itclconfig
9263 #
9264
9265 if test x"${no_itcl}" = x ; then
9266   # we reset no_itcl in case something fails here
9267   no_itcl=true
9268   # Check whether --with-itclconfig or --without-itclconfig was given.
9269 if test "${with_itclconfig+set}" = set; then
9270   withval="$with_itclconfig"
9271   with_itclconfig=${withval}
9272 fi
9273
9274   echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
9275 echo "configure:9276: checking for Itcl configuration" >&5
9276   if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
9277   echo $ac_n "(cached) $ac_c" 1>&6
9278 else
9279   
9280
9281   # First check to see if --with-itclconfig was specified.
9282   if test x"${with_itclconfig}" != x ; then
9283     if test -f "${with_itclconfig}/itclConfig.sh" ; then
9284       ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
9285     else
9286       { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
9287     fi
9288   fi
9289
9290   # then check for a private Itcl library
9291   if test x"${ac_cv_c_itclconfig}" = x ; then
9292     for i in \
9293                 ../itcl/itcl \
9294                 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
9295                 ../../itcl \
9296                 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
9297                 ../../../itcl \
9298                 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
9299       if test -f "$i/itclConfig.sh" ; then
9300         ac_cv_c_itclconfig=`(cd $i; pwd)`
9301         break
9302       fi
9303     done
9304   fi
9305   # check in a few common install locations
9306   if test x"${ac_cv_c_itclconfig}" = x ; then
9307     for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9308       if test -f "$i/itclConfig.sh" ; then
9309         ac_cv_c_itclconfig=`(cd $i; pwd)`
9310         break
9311       fi
9312     done
9313   fi
9314   # check in a few other private locations
9315   if test x"${ac_cv_c_itclconfig}" = x ; then
9316     for i in \
9317                 ${srcdir}/../itcl/itcl \
9318                 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
9319       if test -f "$i/itclConfig.sh" ; then
9320         ac_cv_c_itclconfig=`(cd $i; pwd)`
9321         break
9322       fi
9323     done
9324   fi
9325   
9326 fi
9327
9328   if test x"${ac_cv_c_itclconfig}" = x ; then
9329     ITCLCONFIG="# no Itcl configs found"
9330     echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
9331   else
9332     no_itcl=
9333     ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
9334     echo "$ac_t""found $ITCLCONFIG" 1>&6
9335   fi
9336 fi
9337
9338            if test -z "${no_itcl}"; then
9339              
9340     if test -f "$ITCLCONFIG" ; then
9341       . $ITCLCONFIG
9342     fi
9343
9344     
9345     
9346
9347     
9348
9349
9350     
9351     
9352     
9353  
9354
9355              ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
9356              ITCL_DEPS="${ITCL_LIB_FULL_PATH}"
9357            fi
9358
9359            
9360            # now look for Itk library stuff
9361            
9362 #
9363 # Ok, lets find the itk configuration
9364 # First, look for one uninstalled.  
9365 # the alternative search directory is invoked by --with-itkconfig
9366 #
9367
9368 if test x"${no_itk}" = x ; then
9369   # we reset no_itk in case something fails here
9370   no_itk=true
9371   # Check whether --with-itkconfig or --without-itkconfig was given.
9372 if test "${with_itkconfig+set}" = set; then
9373   withval="$with_itkconfig"
9374   with_itkconfig=${withval}
9375 fi
9376
9377   echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
9378 echo "configure:9379: checking for Itk configuration" >&5
9379   if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
9380   echo $ac_n "(cached) $ac_c" 1>&6
9381 else
9382   
9383
9384   # First check to see if --with-itkconfig was specified.
9385   if test x"${with_itkconfig}" != x ; then
9386     if test -f "${with_itkconfig}/itkConfig.sh" ; then
9387       ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
9388     else
9389       { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
9390     fi
9391   fi
9392
9393   # then check for a private Itk library
9394   if test x"${ac_cv_c_itkconfig}" = x ; then
9395     for i in \
9396                 ../itcl/itk \
9397                 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
9398                 ../../itk \
9399                 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
9400                 ../../../itk \
9401                 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
9402       if test -f "$i/itkConfig.sh" ; then
9403         ac_cv_c_itkconfig=`(cd $i; pwd)`
9404         break
9405       fi
9406     done
9407   fi
9408   # check in a few common install locations
9409   if test x"${ac_cv_c_itkconfig}" = x ; then
9410     for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
9411       if test -f "$i/itkConfig.sh" ; then
9412         ac_cv_c_itkconfig=`(cd $i; pwd)`
9413         break
9414       fi
9415     done
9416   fi
9417   # check in a few other private locations
9418   if test x"${ac_cv_c_itkconfig}" = x ; then
9419     for i in \
9420                 ${srcdir}/../itcl/itk \
9421                 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
9422       if test -f "$i/itkConfig.sh" ; then
9423         ac_cv_c_itkconfig=`(cd $i; pwd)`
9424         break
9425       fi
9426     done
9427   fi
9428   
9429 fi
9430
9431   if test x"${ac_cv_c_itkconfig}" = x ; then
9432     ITKCONFIG="# no Itk configs found"
9433     echo "configure: warning: Can't find Itk configuration definitions" 1>&2
9434   else
9435     no_itk=
9436     ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
9437     echo "$ac_t""found $ITKCONFIG" 1>&6
9438   fi
9439 fi
9440
9441
9442            if test -z "${no_itcl}"; then
9443              
9444     if test -f "$ITKCONFIG" ; then
9445       . $ITKCONFIG
9446     fi
9447
9448     
9449     
9450
9451     
9452
9453
9454     
9455     
9456     
9457
9458
9459              ITKLIB="${ITK_BUILD_LIB_SPEC}"
9460              ITK_DEPS="${ITK_LIB_FULL_PATH}"
9461            fi
9462
9463            ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
9464            # Tcl/Tk 8.1 require -fwritable strings.  I don't
9465            # know whether 8.2 will or not, but I bet it will.
9466            # I don't have to worry about 7.x since we don't support it.
9467            GDBTK_CFLAGS=""
9468            if test "$GCC" = "yes"; then
9469                if test "$TCL_VERSION" != "8.0" ; then
9470                    GDBTK_CFLAGS="-fwritable-strings"
9471                fi
9472            fi
9473
9474            # Include some libraries that Tcl and Tk want.
9475            TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
9476            # Yes, the ordering seems wrong here.  But it isn't.
9477            # TK_LIBS is the list of libraries that need to be linked
9478            # after Tcl/Tk.  Note that this isn't put into LIBS.  If it
9479            # were in LIBS then any link tests after this point would
9480            # try to include things like `$(LIBGUI)', which wouldn't work.
9481            GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
9482
9483            CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
9484            CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
9485            CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
9486            CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
9487            CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
9488            CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
9489            CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
9490            CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
9491
9492            if test x$gdb_cv_os_cygwin = xyes; then
9493               WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
9494               WIN32LDAPP="-Wl,--subsystem,console"
9495               CONFIG_OBS="${CONFIG_OBS} gdbres.o"
9496            fi
9497         fi
9498     fi
9499
9500     SUBDIRS="${SUBDIRS} gdbtk"
9501     configdirs="${configdirs} gdbtk"
9502 fi
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517 # If we find X, set shell vars x_includes and x_libraries to the
9518 # paths, otherwise set no_x=yes.
9519 # Uses ac_ vars as temps to allow command line to override cache and checks.
9520 # --without-x overrides everything else, but does not touch the cache.
9521 echo $ac_n "checking for X""... $ac_c" 1>&6
9522 echo "configure:9523: checking for X" >&5
9523
9524 # Check whether --with-x or --without-x was given.
9525 if test "${with_x+set}" = set; then
9526   withval="$with_x"
9527   :
9528 fi
9529
9530 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9531 if test "x$with_x" = xno; then
9532   # The user explicitly disabled X.
9533   have_x=disabled
9534 else
9535   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9536     # Both variables are already set.
9537     have_x=yes
9538   else
9539 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
9540   echo $ac_n "(cached) $ac_c" 1>&6
9541 else
9542   # One or both of the vars are not set, and there is no cached value.
9543 ac_x_includes=NO ac_x_libraries=NO
9544 rm -fr conftestdir
9545 if mkdir conftestdir; then
9546   cd conftestdir
9547   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9548   cat > Imakefile <<'EOF'
9549 acfindx:
9550         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9551 EOF
9552   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9553     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9554     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9555     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9556     for ac_extension in a so sl; do
9557       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9558         test -f $ac_im_libdir/libX11.$ac_extension; then
9559         ac_im_usrlibdir=$ac_im_libdir; break
9560       fi
9561     done
9562     # Screen out bogus values from the imake configuration.  They are
9563     # bogus both because they are the default anyway, and because
9564     # using them would break gcc on systems where it needs fixed includes.
9565     case "$ac_im_incroot" in
9566         /usr/include) ;;
9567         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
9568     esac
9569     case "$ac_im_usrlibdir" in
9570         /usr/lib | /lib) ;;
9571         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
9572     esac
9573   fi
9574   cd ..
9575   rm -fr conftestdir
9576 fi
9577
9578 if test "$ac_x_includes" = NO; then
9579   # Guess where to find include files, by looking for this one X11 .h file.
9580   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
9581
9582   # First, try using that file with no special directory specified.
9583 cat > conftest.$ac_ext <<EOF
9584 #line 9585 "configure"
9585 #include "confdefs.h"
9586 #include <$x_direct_test_include>
9587 EOF
9588 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9589 { (eval echo configure:9590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9590 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9591 if test -z "$ac_err"; then
9592   rm -rf conftest*
9593   # We can compile using X headers with no special include directory.
9594 ac_x_includes=
9595 else
9596   echo "$ac_err" >&5
9597   echo "configure: failed program was:" >&5
9598   cat conftest.$ac_ext >&5
9599   rm -rf conftest*
9600   # Look for the header file in a standard set of common directories.
9601 # Check X11 before X11Rn because it is often a symlink to the current release.
9602   for ac_dir in               \
9603     /usr/X11/include          \
9604     /usr/X11R6/include        \
9605     /usr/X11R5/include        \
9606     /usr/X11R4/include        \
9607                               \
9608     /usr/include/X11          \
9609     /usr/include/X11R6        \
9610     /usr/include/X11R5        \
9611     /usr/include/X11R4        \
9612                               \
9613     /usr/local/X11/include    \
9614     /usr/local/X11R6/include  \
9615     /usr/local/X11R5/include  \
9616     /usr/local/X11R4/include  \
9617                               \
9618     /usr/local/include/X11    \
9619     /usr/local/include/X11R6  \
9620     /usr/local/include/X11R5  \
9621     /usr/local/include/X11R4  \
9622                               \
9623     /usr/X386/include         \
9624     /usr/x386/include         \
9625     /usr/XFree86/include/X11  \
9626                               \
9627     /usr/include              \
9628     /usr/local/include        \
9629     /usr/unsupported/include  \
9630     /usr/athena/include       \
9631     /usr/local/x11r5/include  \
9632     /usr/lpp/Xamples/include  \
9633                               \
9634     /usr/openwin/include      \
9635     /usr/openwin/share/include \
9636     ; \
9637   do
9638     if test -r "$ac_dir/$x_direct_test_include"; then
9639       ac_x_includes=$ac_dir
9640       break
9641     fi
9642   done
9643 fi
9644 rm -f conftest*
9645 fi # $ac_x_includes = NO
9646
9647 if test "$ac_x_libraries" = NO; then
9648   # Check for the libraries.
9649
9650   test -z "$x_direct_test_library" && x_direct_test_library=Xt
9651   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
9652
9653   # See if we find them without any special options.
9654   # Don't add to $LIBS permanently.
9655   ac_save_LIBS="$LIBS"
9656   LIBS="-l$x_direct_test_library $LIBS"
9657 cat > conftest.$ac_ext <<EOF
9658 #line 9659 "configure"
9659 #include "confdefs.h"
9660
9661 int main() {
9662 ${x_direct_test_function}()
9663 ; return 0; }
9664 EOF
9665 if { (eval echo configure:9666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9666   rm -rf conftest*
9667   LIBS="$ac_save_LIBS"
9668 # We can link X programs with no special library path.
9669 ac_x_libraries=
9670 else
9671   echo "configure: failed program was:" >&5
9672   cat conftest.$ac_ext >&5
9673   rm -rf conftest*
9674   LIBS="$ac_save_LIBS"
9675 # First see if replacing the include by lib works.
9676 # Check X11 before X11Rn because it is often a symlink to the current release.
9677 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
9678     /usr/X11/lib          \
9679     /usr/X11R6/lib        \
9680     /usr/X11R5/lib        \
9681     /usr/X11R4/lib        \
9682                           \
9683     /usr/lib/X11          \
9684     /usr/lib/X11R6        \
9685     /usr/lib/X11R5        \
9686     /usr/lib/X11R4        \
9687                           \
9688     /usr/local/X11/lib    \
9689     /usr/local/X11R6/lib  \
9690     /usr/local/X11R5/lib  \
9691     /usr/local/X11R4/lib  \
9692                           \
9693     /usr/local/lib/X11    \
9694     /usr/local/lib/X11R6  \
9695     /usr/local/lib/X11R5  \
9696     /usr/local/lib/X11R4  \
9697                           \
9698     /usr/X386/lib         \
9699     /usr/x386/lib         \
9700     /usr/XFree86/lib/X11  \
9701                           \
9702     /usr/lib              \
9703     /usr/local/lib        \
9704     /usr/unsupported/lib  \
9705     /usr/athena/lib       \
9706     /usr/local/x11r5/lib  \
9707     /usr/lpp/Xamples/lib  \
9708     /lib/usr/lib/X11      \
9709                           \
9710     /usr/openwin/lib      \
9711     /usr/openwin/share/lib \
9712     ; \
9713 do
9714   for ac_extension in a so sl; do
9715     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
9716       ac_x_libraries=$ac_dir
9717       break 2
9718     fi
9719   done
9720 done
9721 fi
9722 rm -f conftest*
9723 fi # $ac_x_libraries = NO
9724
9725 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
9726   # Didn't find X anywhere.  Cache the known absence of X.
9727   ac_cv_have_x="have_x=no"
9728 else
9729   # Record where we found X for the cache.
9730   ac_cv_have_x="have_x=yes \
9731                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9732 fi
9733 fi
9734   fi
9735   eval "$ac_cv_have_x"
9736 fi # $with_x != no
9737
9738 if test "$have_x" != yes; then
9739   echo "$ac_t""$have_x" 1>&6
9740   no_x=yes
9741 else
9742   # If each of the values was on the command line, it overrides each guess.
9743   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9744   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9745   # Update the cache value to reflect the command line values.
9746   ac_cv_have_x="have_x=yes \
9747                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9748   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
9749 fi
9750
9751
9752  
9753 # Unlike the sim directory, whether a simulator is linked is controlled by 
9754 # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.  
9755 # This code just checks for a few cases where we'd like to ignore those
9756 # definitions, even when they're present in the '.mt' file.  These cases
9757 # are when --disable-sim is specified, or if the simulator directory is
9758 # not part of the source tree.
9759 #
9760 # Check whether --enable-sim or --disable-sim was given.
9761 if test "${enable_sim+set}" = set; then
9762   enableval="$enable_sim"
9763   echo "enable_sim = $enable_sim";
9764  echo "enableval = ${enableval}";
9765  case "${enableval}" in
9766   yes) ignore_sim=false ;;
9767   no)  ignore_sim=true ;;
9768   *)   ignore_sim=false ;;
9769  esac
9770 else
9771   ignore_sim=false
9772 fi
9773
9774
9775 if test ! -d "${srcdir}/../sim"; then
9776   ignore_sim=true
9777 fi
9778
9779 if test "${ignore_sim}" = "true"; then
9780     IGNORE_SIM="SIM="
9781     IGNORE_SIM_OBS="SIM_OBS="
9782 else
9783     IGNORE_SIM=""
9784     IGNORE_SIM_OBS=""
9785     cat >> confdefs.h <<\EOF
9786 #define WITH_SIM 1
9787 EOF
9788
9789 fi
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805 # Begin stuff to support --enable-shared
9806 # Check whether --enable-shared or --disable-shared was given.
9807 if test "${enable_shared+set}" = set; then
9808   enableval="$enable_shared"
9809   case "${enableval}" in
9810   yes) shared=true ;;
9811   no)  shared=false ;;
9812   *) shared=true ;;
9813 esac
9814 fi
9815
9816 HLDFLAGS=
9817 HLDENV=
9818 # If we have shared libraries, try to set rpath reasonably.
9819 if test "${shared}" = "true"; then
9820   case "${host}" in
9821   *-*-hpux*)
9822     HLDFLAGS='-Wl,+s,+b,$(libdir)'
9823     ;;
9824   *-*-irix5* | *-*-irix6*)
9825     HLDFLAGS='-Wl,-rpath,$(libdir)'
9826     ;;
9827   *-*-linux*aout*)
9828     ;;
9829   *-*-linux* | *-pc-linux-gnu*)
9830     HLDFLAGS='-Wl,-rpath,$(libdir)'
9831     ;;
9832   *-*-solaris*)
9833     HLDFLAGS='-R $(libdir)'
9834     ;;
9835   *-*-sysv4*)
9836     HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;'
9837     ;;
9838   esac
9839 fi
9840
9841 # On SunOS, if the linker supports the -rpath option, use it to
9842 # prevent ../bfd and ../opcodes from being included in the run time
9843 # search path.
9844 case "${host}" in
9845   *-*-sunos*)
9846     echo 'main () { }' > conftest.c
9847     ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
9848     if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
9849       :
9850     elif grep 'No such file' conftest.t >/dev/null 2>&1; then
9851       :
9852     elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
9853       :
9854     elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
9855       :
9856     elif test "${shared}" = "true"; then
9857       HLDFLAGS='-Wl,-rpath=$(libdir)'
9858     else
9859       HLDFLAGS='-Wl,-rpath='
9860     fi
9861     rm -f conftest.t conftest.c conftest
9862     ;;
9863 esac
9864
9865
9866 # End stuff to support --enable-shared
9867
9868 # target_subdir is used by the testsuite to find the target libraries.
9869 target_subdir=
9870 if test "${host}" != "${target}"; then
9871     target_subdir="${target_alias}/"
9872 fi
9873
9874
9875 frags=
9876 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
9877 if test ! -f ${host_makefile_frag}; then
9878     # When building a native debuger the .mh file containing things
9879     # like NATDEPFILES is needed.  Cross debuggers don't need .mh
9880     # since it no longer contains anything useful.
9881     if test "${target}" = "${host}"; then
9882         { echo "configure: error: "*** Gdb does not support native target ${host}"" 1>&2; exit 1; }
9883     else
9884         host_makefile_frag=/dev/null
9885     fi
9886 fi
9887 frags="$frags $host_makefile_frag"
9888
9889 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
9890 if test ! -f ${target_makefile_frag}; then
9891 { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
9892 fi
9893 frags="$frags $target_makefile_frag"
9894
9895
9896
9897
9898
9899 hostfile=`sed -n '
9900 s/XM_FILE[      ]*=[    ]*\([^  ]*\)/\1/p
9901 ' ${host_makefile_frag}`
9902
9903 targetfile=`sed -n '
9904 s/TM_FILE[      ]*=[    ]*\([^  ]*\)/\1/p
9905 ' ${target_makefile_frag}`
9906
9907 GDB_MULTI_ARCH=`sed -n '
9908 s/GDB_MULTI_ARCH[       ]*=[    ]*\([^  ]*\)[   ]*/\1/p
9909 ' ${target_makefile_frag}`
9910
9911 if test "${target}" = "${host}"; then
9912 # We pick this up from the host configuration file (.mh) because we
9913 # do not have a native configuration Makefile fragment.
9914 nativefile=`sed -n '
9915 s/NAT_FILE[     ]*=[    ]*\([^  ]*\)/\1/p
9916 ' ${host_makefile_frag}`
9917 fi
9918
9919
9920 # New targets should just set gdb_multi_arch=yes in configure.tgt.
9921 # Old targets being converted can either do that or set GDB_MULTI_ARCH
9922 # in the target specific makefile frag.  Eventually gdb_multi_arch=yes
9923 # will be the default.
9924 if test x"${GDB_MULTI_ARCH}" = x ; then
9925     case "${gdb_multi_arch}" in
9926     yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
9927     no ) GDB_MULTI_ARCH=0 ;;
9928     0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
9929     esac
9930 fi
9931 if test x"${GDB_MULTI_ARCH}" != x ; then
9932     cat >> confdefs.h <<EOF
9933 #define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
9934 EOF
9935
9936 fi
9937 # Warn the user when they use an old practice
9938 case "${GDB_MULTI_ARCH}" in
9939     "" ) ;;
9940     0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
9941         echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
9942     GDB_MULTI_ARCH_PURE )
9943         if test x"${targetfile}" != x ; then
9944             echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
9945             targetfile=""
9946         fi ;;
9947     *)  { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
9948 esac
9949
9950 if test "${enable_multi_ice}" = "yes"; then
9951   SUBDIRS="${SUBDIRS} multi-ice"
9952 fi
9953
9954 # ``gdbserver'' can only be built in a native configuration.
9955 if test x"${target}" = x"${host}"; then
9956     echo $ac_n "checking whether gdbserver is supported on this host""... $ac_c" 1>&6
9957 echo "configure:9958: checking whether gdbserver is supported on this host" >&5
9958     if test x"${build_gdbserver}" = xyes ; then
9959         configdirs="${configdirs} gdbserver"
9960         SUBDIRS="${SUBDIRS} gdbserver"
9961         echo "$ac_t""yes" 1>&6
9962     else
9963         echo "$ac_t""no" 1>&6
9964     fi
9965 fi
9966
9967
9968
9969 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
9970 # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
9971 # version.
9972
9973 files=
9974 links=
9975
9976 rm -f xm.h
9977 xm_h=""
9978 if test "${hostfile}" != ""; then
9979     xm_h=xm.h
9980     GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
9981     files="${files} ${GDB_XM_FILE}"
9982     links="${links} xm.h"
9983     cat >> confdefs.h <<EOF
9984 #define GDB_XM_FILE ${GDB_XM_FILE}
9985 EOF
9986
9987 fi
9988
9989
9990 rm -f tm.h
9991 tm_h=""
9992 if test "${targetfile}" != ""; then
9993     tm_h=tm.h
9994     GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
9995     files="${files} ${GDB_TM_FILE}"
9996     links="${links} tm.h"
9997     cat >> confdefs.h <<EOF
9998 #define GDB_TM_FILE ${GDB_TM_FILE}
9999 EOF
10000
10001 fi
10002
10003
10004 rm -f nm.h
10005 nm_h=""
10006 if test "${nativefile}" != ""; then
10007     nm_h=nm.h
10008     GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
10009     files="${files} ${GDB_NM_FILE}"
10010     links="${links} nm.h"
10011     cat >> confdefs.h <<EOF
10012 #define GDB_NM_FILE ${GDB_NM_FILE}
10013 EOF
10014
10015 fi
10016
10017
10018
10019
10020 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
10021 echo "configure:10022: checking for Cygwin environment" >&5
10022 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
10023   echo $ac_n "(cached) $ac_c" 1>&6
10024 else
10025   cat > conftest.$ac_ext <<EOF
10026 #line 10027 "configure"
10027 #include "confdefs.h"
10028
10029 int main() {
10030
10031 #ifndef __CYGWIN__
10032 #define __CYGWIN__ __CYGWIN32__
10033 #endif
10034 return __CYGWIN__;
10035 ; return 0; }
10036 EOF
10037 if { (eval echo configure:10038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10038   rm -rf conftest*
10039   ac_cv_cygwin=yes
10040 else
10041   echo "configure: failed program was:" >&5
10042   cat conftest.$ac_ext >&5
10043   rm -rf conftest*
10044   ac_cv_cygwin=no
10045 fi
10046 rm -f conftest*
10047 rm -f conftest*
10048 fi
10049
10050 echo "$ac_t""$ac_cv_cygwin" 1>&6
10051 CYGWIN=
10052 test "$ac_cv_cygwin" = yes && CYGWIN=yes
10053 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
10054 echo "configure:10055: checking for mingw32 environment" >&5
10055 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
10056   echo $ac_n "(cached) $ac_c" 1>&6
10057 else
10058   cat > conftest.$ac_ext <<EOF
10059 #line 10060 "configure"
10060 #include "confdefs.h"
10061
10062 int main() {
10063 return __MINGW32__;
10064 ; return 0; }
10065 EOF
10066 if { (eval echo configure:10067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10067   rm -rf conftest*
10068   ac_cv_mingw32=yes
10069 else
10070   echo "configure: failed program was:" >&5
10071   cat conftest.$ac_ext >&5
10072   rm -rf conftest*
10073   ac_cv_mingw32=no
10074 fi
10075 rm -f conftest*
10076 rm -f conftest*
10077 fi
10078
10079 echo "$ac_t""$ac_cv_mingw32" 1>&6
10080 MINGW32=
10081 test "$ac_cv_mingw32" = yes && MINGW32=yes
10082
10083
10084 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
10085 echo "configure:10086: checking for executable suffix" >&5
10086 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
10087   echo $ac_n "(cached) $ac_c" 1>&6
10088 else
10089   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
10090   ac_cv_exeext=.exe
10091 else
10092   rm -f conftest*
10093   echo 'int main () { return 0; }' > conftest.$ac_ext
10094   ac_cv_exeext=
10095   if { (eval echo configure:10096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
10096     for file in conftest.*; do
10097       case $file in
10098       *.c | *.C | *.o | *.obj | *.ilk | *.pdb) ;;
10099       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
10100       esac
10101     done
10102   else
10103     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
10104   fi
10105   rm -f conftest*
10106   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
10107 fi
10108 fi
10109
10110 EXEEXT=""
10111 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
10112 echo "$ac_t""${ac_cv_exeext}" 1>&6
10113 ac_exeext=$EXEEXT
10114
10115
10116
10117 cat >> confdefs.h <<\EOF
10118 #define GDB_DEFAULT_HOST_CHARSET "ISO-8859-1"
10119 EOF
10120
10121
10122
10123     
10124   # Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
10125 if test "${with_libiconv_prefix+set}" = set; then
10126   withval="$with_libiconv_prefix"
10127   
10128     for dir in `echo "$withval" | tr : ' '`; do
10129       if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
10130       if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
10131     done
10132    
10133 fi
10134
10135
10136   echo $ac_n "checking for iconv""... $ac_c" 1>&6
10137 echo "configure:10138: checking for iconv" >&5
10138 if eval "test \"`echo '$''{'am_cv_func_iconv'+set}'`\" = set"; then
10139   echo $ac_n "(cached) $ac_c" 1>&6
10140 else
10141   
10142     am_cv_func_iconv="no, consider installing GNU libiconv"
10143     am_cv_lib_iconv=no
10144     cat > conftest.$ac_ext <<EOF
10145 #line 10146 "configure"
10146 #include "confdefs.h"
10147 #include <stdlib.h>
10148 #include <iconv.h>
10149 int main() {
10150 iconv_t cd = iconv_open("","");
10151        iconv(cd,NULL,NULL,NULL,NULL);
10152        iconv_close(cd);
10153 ; return 0; }
10154 EOF
10155 if { (eval echo configure:10156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10156   rm -rf conftest*
10157   am_cv_func_iconv=yes
10158 else
10159   echo "configure: failed program was:" >&5
10160   cat conftest.$ac_ext >&5
10161 fi
10162 rm -f conftest*
10163     if test "$am_cv_func_iconv" != yes; then
10164       am_save_LIBS="$LIBS"
10165       LIBS="$LIBS -liconv"
10166       cat > conftest.$ac_ext <<EOF
10167 #line 10168 "configure"
10168 #include "confdefs.h"
10169 #include <stdlib.h>
10170 #include <iconv.h>
10171 int main() {
10172 iconv_t cd = iconv_open("","");
10173          iconv(cd,NULL,NULL,NULL,NULL);
10174          iconv_close(cd);
10175 ; return 0; }
10176 EOF
10177 if { (eval echo configure:10178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10178   rm -rf conftest*
10179   am_cv_lib_iconv=yes
10180         am_cv_func_iconv=yes
10181 else
10182   echo "configure: failed program was:" >&5
10183   cat conftest.$ac_ext >&5
10184 fi
10185 rm -f conftest*
10186       LIBS="$am_save_LIBS"
10187     fi
10188   
10189 fi
10190
10191 echo "$ac_t""$am_cv_func_iconv" 1>&6
10192   if test "$am_cv_func_iconv" = yes; then
10193     cat >> confdefs.h <<\EOF
10194 #define HAVE_ICONV 1
10195 EOF
10196
10197     echo $ac_n "checking for iconv declaration""... $ac_c" 1>&6
10198 echo "configure:10199: checking for iconv declaration" >&5
10199     if eval "test \"`echo '$''{'am_cv_proto_iconv'+set}'`\" = set"; then
10200   echo $ac_n "(cached) $ac_c" 1>&6
10201 else
10202   
10203       cat > conftest.$ac_ext <<EOF
10204 #line 10205 "configure"
10205 #include "confdefs.h"
10206
10207 #include <stdlib.h>
10208 #include <iconv.h>
10209 extern
10210 #ifdef __cplusplus
10211 "C"
10212 #endif
10213 #if defined(__STDC__) || defined(__cplusplus)
10214 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
10215 #else
10216 size_t iconv();
10217 #endif
10218
10219 int main() {
10220
10221 ; return 0; }
10222 EOF
10223 if { (eval echo configure:10224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10224   rm -rf conftest*
10225   am_cv_proto_iconv_arg1=""
10226 else
10227   echo "configure: failed program was:" >&5
10228   cat conftest.$ac_ext >&5
10229   rm -rf conftest*
10230   am_cv_proto_iconv_arg1="const"
10231 fi
10232 rm -f conftest*
10233       am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
10234 fi
10235
10236     am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
10237     echo "$ac_t""${ac_t:-
10238          }$am_cv_proto_iconv" 1>&6
10239     cat >> confdefs.h <<EOF
10240 #define ICONV_CONST $am_cv_proto_iconv_arg1
10241 EOF
10242
10243   fi
10244   LIBICONV=
10245   if test "$am_cv_lib_iconv" = yes; then
10246     LIBICONV="-liconv"
10247   fi
10248   
10249
10250
10251 subdirs="$configdirs"
10252
10253 trap '' 1 2 15
10254 cat > confcache <<\EOF
10255 # This file is a shell script that caches the results of configure
10256 # tests run on this system so they can be shared between configure
10257 # scripts and configure runs.  It is not useful on other systems.
10258 # If it contains results you don't want to keep, you may remove or edit it.
10259 #
10260 # By default, configure uses ./config.cache as the cache file,
10261 # creating it if it does not exist already.  You can give configure
10262 # the --cache-file=FILE option to use a different cache file; that is
10263 # what configure does when it calls configure scripts in
10264 # subdirectories, so they share the cache.
10265 # Giving --cache-file=/dev/null disables caching, for debugging configure.
10266 # config.status only pays attention to the cache file if you give it the
10267 # --recheck option to rerun configure.
10268 #
10269 EOF
10270 # The following way of writing the cache mishandles newlines in values,
10271 # but we know of no workaround that is simple, portable, and efficient.
10272 # So, don't put newlines in cache variables' values.
10273 # Ultrix sh set writes to stderr and can't be redirected directly,
10274 # and sets the high bit in the cache file unless we assign to the vars.
10275 (set) 2>&1 |
10276   case `(ac_space=' '; set | grep ac_space) 2>&1` in
10277   *ac_space=\ *)
10278     # `set' does not quote correctly, so add quotes (double-quote substitution
10279     # turns \\\\ into \\, and sed turns \\ into \).
10280     sed -n \
10281       -e "s/'/'\\\\''/g" \
10282       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10283     ;;
10284   *)
10285     # `set' quotes correctly as required by POSIX, so do not add quotes.
10286     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10287     ;;
10288   esac >> confcache
10289 if cmp -s $cache_file confcache; then
10290   :
10291 else
10292   if test -w $cache_file; then
10293     echo "updating cache $cache_file"
10294     cat confcache > $cache_file
10295   else
10296     echo "not updating unwritable cache $cache_file"
10297   fi
10298 fi
10299 rm -f confcache
10300
10301 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10302
10303 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10304 # Let make expand exec_prefix.
10305 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10306
10307 # Any assignment to VPATH causes Sun make to only execute
10308 # the first set of double-colon rules, so remove it if not needed.
10309 # If there is a colon in the path, we need to keep it.
10310 if test "x$srcdir" = x.; then
10311   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
10312 fi
10313
10314 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10315
10316 DEFS=-DHAVE_CONFIG_H
10317
10318 # Without the "./", some shells look in PATH for config.status.
10319 : ${CONFIG_STATUS=./config.status}
10320
10321 echo creating $CONFIG_STATUS
10322 rm -f $CONFIG_STATUS
10323 cat > $CONFIG_STATUS <<EOF
10324 #! /bin/sh
10325 # Generated automatically by configure.
10326 # Run this file to recreate the current configuration.
10327 # This directory was configured as follows,
10328 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10329 #
10330 # $0 $ac_configure_args
10331 #
10332 # Compiler output produced by configure, useful for debugging
10333 # configure, is in ./config.log if it exists.
10334
10335 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10336 for ac_option
10337 do
10338   case "\$ac_option" in
10339   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10340     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10341     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10342   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10343     echo "$CONFIG_STATUS generated by autoconf version 2.13"
10344     exit 0 ;;
10345   -help | --help | --hel | --he | --h)
10346     echo "\$ac_cs_usage"; exit 0 ;;
10347   *) echo "\$ac_cs_usage"; exit 1 ;;
10348   esac
10349 done
10350
10351 ac_given_srcdir=$srcdir
10352 ac_given_INSTALL="$INSTALL"
10353
10354 trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
10355 EOF
10356 cat >> $CONFIG_STATUS <<EOF
10357
10358 # Protect against being on the right side of a sed subst in config.status.
10359 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10360  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10361 $ac_vpsub
10362 $extrasub
10363 s%@SHELL@%$SHELL%g
10364 s%@CFLAGS@%$CFLAGS%g
10365 s%@CPPFLAGS@%$CPPFLAGS%g
10366 s%@CXXFLAGS@%$CXXFLAGS%g
10367 s%@FFLAGS@%$FFLAGS%g
10368 s%@DEFS@%$DEFS%g
10369 s%@LDFLAGS@%$LDFLAGS%g
10370 s%@LIBS@%$LIBS%g
10371 s%@exec_prefix@%$exec_prefix%g
10372 s%@prefix@%$prefix%g
10373 s%@program_transform_name@%$program_transform_name%g
10374 s%@bindir@%$bindir%g
10375 s%@sbindir@%$sbindir%g
10376 s%@libexecdir@%$libexecdir%g
10377 s%@datadir@%$datadir%g
10378 s%@sysconfdir@%$sysconfdir%g
10379 s%@sharedstatedir@%$sharedstatedir%g
10380 s%@localstatedir@%$localstatedir%g
10381 s%@libdir@%$libdir%g
10382 s%@includedir@%$includedir%g
10383 s%@oldincludedir@%$oldincludedir%g
10384 s%@infodir@%$infodir%g
10385 s%@mandir@%$mandir%g
10386 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
10387 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
10388 s%@MAINT@%$MAINT%g
10389 s%@CC@%$CC%g
10390 s%@CPP@%$CPP%g
10391 s%@host@%$host%g
10392 s%@host_alias@%$host_alias%g
10393 s%@host_cpu@%$host_cpu%g
10394 s%@host_vendor@%$host_vendor%g
10395 s%@host_os@%$host_os%g
10396 s%@target@%$target%g
10397 s%@target_alias@%$target_alias%g
10398 s%@target_cpu@%$target_cpu%g
10399 s%@target_vendor@%$target_vendor%g
10400 s%@target_os@%$target_os%g
10401 s%@build@%$build%g
10402 s%@build_alias@%$build_alias%g
10403 s%@build_cpu@%$build_cpu%g
10404 s%@build_vendor@%$build_vendor%g
10405 s%@build_os@%$build_os%g
10406 s%@RANLIB@%$RANLIB%g
10407 s%@SET_MAKE@%$SET_MAKE%g
10408 s%@ALLOCA@%$ALLOCA%g
10409 s%@USE_NLS@%$USE_NLS%g
10410 s%@MSGFMT@%$MSGFMT%g
10411 s%@GMSGFMT@%$GMSGFMT%g
10412 s%@XGETTEXT@%$XGETTEXT%g
10413 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
10414 s%@CATALOGS@%$CATALOGS%g
10415 s%@CATOBJEXT@%$CATOBJEXT%g
10416 s%@DATADIRNAME@%$DATADIRNAME%g
10417 s%@GMOFILES@%$GMOFILES%g
10418 s%@INSTOBJEXT@%$INSTOBJEXT%g
10419 s%@INTLDEPS@%$INTLDEPS%g
10420 s%@INTLLIBS@%$INTLLIBS%g
10421 s%@INTLOBJS@%$INTLOBJS%g
10422 s%@POFILES@%$POFILES%g
10423 s%@POSUB@%$POSUB%g
10424 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
10425 s%@GT_NO@%$GT_NO%g
10426 s%@GT_YES@%$GT_YES%g
10427 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
10428 s%@l@%$l%g
10429 s%@AWK@%$AWK%g
10430 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
10431 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
10432 s%@INSTALL_DATA@%$INSTALL_DATA%g
10433 s%@LN_S@%$LN_S%g
10434 s%@YACC@%$YACC%g
10435 s%@AR@%$AR%g
10436 s%@DLLTOOL@%$DLLTOOL%g
10437 s%@WINDRES@%$WINDRES%g
10438 s%@MIG@%$MIG%g
10439 s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
10440 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
10441 s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
10442 s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
10443 s%@MMALLOC@%$MMALLOC%g
10444 s%@SER_HARDWIRE@%$SER_HARDWIRE%g
10445 s%@WIN32LIBS@%$WIN32LIBS%g
10446 s%@LIBGUI@%$LIBGUI%g
10447 s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
10448 s%@WIN32LDAPP@%$WIN32LDAPP%g
10449 s%@TCL_VERSION@%$TCL_VERSION%g
10450 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
10451 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
10452 s%@TCL_CC@%$TCL_CC%g
10453 s%@TCL_DEFS@%$TCL_DEFS%g
10454 s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
10455 s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
10456 s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
10457 s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
10458 s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
10459 s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
10460 s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
10461 s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
10462 s%@TCL_RANLIB@%$TCL_RANLIB%g
10463 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
10464 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
10465 s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
10466 s%@TK_VERSION@%$TK_VERSION%g
10467 s%@TK_DEFS@%$TK_DEFS%g
10468 s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
10469 s%@TK_XINCLUDES@%$TK_XINCLUDES%g
10470 s%@TK_XLIBSW@%$TK_XLIBSW%g
10471 s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
10472 s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
10473 s%@TCLHDIR@%$TCLHDIR%g
10474 s%@TKHDIR@%$TKHDIR%g
10475 s%@ITCLHDIR@%$ITCLHDIR%g
10476 s%@ITKHDIR@%$ITKHDIR%g
10477 s%@ITCL_VERSION@%$ITCL_VERSION%g
10478 s%@ITCL_DEFS@%$ITCL_DEFS%g
10479 s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
10480 s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
10481 s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
10482 s%@ITK_VERSION@%$ITK_VERSION%g
10483 s%@ITK_DEFS@%$ITK_DEFS%g
10484 s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
10485 s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
10486 s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
10487 s%@X_CFLAGS@%$X_CFLAGS%g
10488 s%@X_LDFLAGS@%$X_LDFLAGS%g
10489 s%@X_LIBS@%$X_LIBS%g
10490 s%@TCL_DEPS@%$TCL_DEPS%g
10491 s%@TK_DEPS@%$TK_DEPS%g
10492 s%@ITCLLIB@%$ITCLLIB%g
10493 s%@ITCL_DEPS@%$ITCL_DEPS%g
10494 s%@ITKLIB@%$ITKLIB%g
10495 s%@ITK_DEPS@%$ITK_DEPS%g
10496 s%@GDBTKLIBS@%$GDBTKLIBS%g
10497 s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
10498 s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
10499 s%@IGNORE_SIM@%$IGNORE_SIM%g
10500 s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
10501 s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
10502 s%@CONFIG_OBS@%$CONFIG_OBS%g
10503 s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
10504 s%@CONFIG_DEPS@%$CONFIG_DEPS%g
10505 s%@CONFIG_SRCS@%$CONFIG_SRCS%g
10506 s%@CONFIG_INITS@%$CONFIG_INITS%g
10507 s%@CONFIG_ALL@%$CONFIG_ALL%g
10508 s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
10509 s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
10510 s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
10511 s%@HLDFLAGS@%$HLDFLAGS%g
10512 s%@HLDENV@%$HLDENV%g
10513 s%@target_subdir@%$target_subdir%g
10514 /@host_makefile_frag@/r $host_makefile_frag
10515 s%@host_makefile_frag@%%g
10516 /@target_makefile_frag@/r $target_makefile_frag
10517 s%@target_makefile_frag@%%g
10518 s%@frags@%$frags%g
10519 s%@SUBDIRS@%$SUBDIRS%g
10520 s%@xm_h@%$xm_h%g
10521 s%@tm_h@%$tm_h%g
10522 s%@nm_h@%$nm_h%g
10523 s%@EXEEXT@%$EXEEXT%g
10524 s%@LIBICONV@%$LIBICONV%g
10525 s%@subdirs@%$subdirs%g
10526
10527 CEOF
10528 EOF
10529
10530 cat >> $CONFIG_STATUS <<\EOF
10531
10532 # Split the substitutions into bite-sized pieces for seds with
10533 # small command number limits, like on Digital OSF/1 and HP-UX.
10534 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
10535 ac_file=1 # Number of current file.
10536 ac_beg=1 # First line for current file.
10537 ac_end=$ac_max_sed_cmds # Line after last line for current file.
10538 ac_more_lines=:
10539 ac_sed_cmds=""
10540 while $ac_more_lines; do
10541   if test $ac_beg -gt 1; then
10542     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10543   else
10544     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10545   fi
10546   if test ! -s conftest.s$ac_file; then
10547     ac_more_lines=false
10548     rm -f conftest.s$ac_file
10549   else
10550     if test -z "$ac_sed_cmds"; then
10551       ac_sed_cmds="sed -f conftest.s$ac_file"
10552     else
10553       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10554     fi
10555     ac_file=`expr $ac_file + 1`
10556     ac_beg=$ac_end
10557     ac_end=`expr $ac_end + $ac_max_sed_cmds`
10558   fi
10559 done
10560 if test -z "$ac_sed_cmds"; then
10561   ac_sed_cmds=cat
10562 fi
10563 EOF
10564
10565 cat >> $CONFIG_STATUS <<EOF
10566
10567 CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
10568 EOF
10569 cat >> $CONFIG_STATUS <<\EOF
10570 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10571   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10572   case "$ac_file" in
10573   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10574        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10575   *) ac_file_in="${ac_file}.in" ;;
10576   esac
10577
10578   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10579
10580   # Remove last slash and all that follows it.  Not all systems have dirname.
10581   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10582   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10583     # The file is in a subdirectory.
10584     test ! -d "$ac_dir" && mkdir "$ac_dir"
10585     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10586     # A "../" for each directory in $ac_dir_suffix.
10587     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10588   else
10589     ac_dir_suffix= ac_dots=
10590   fi
10591
10592   case "$ac_given_srcdir" in
10593   .)  srcdir=.
10594       if test -z "$ac_dots"; then top_srcdir=.
10595       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10596   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10597   *) # Relative path.
10598     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10599     top_srcdir="$ac_dots$ac_given_srcdir" ;;
10600   esac
10601
10602   case "$ac_given_INSTALL" in
10603   [/$]*) INSTALL="$ac_given_INSTALL" ;;
10604   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10605   esac
10606
10607   echo creating "$ac_file"
10608   rm -f "$ac_file"
10609   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10610   case "$ac_file" in
10611   *Makefile*) ac_comsub="1i\\
10612 # $configure_input" ;;
10613   *) ac_comsub= ;;
10614   esac
10615
10616   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10617   sed -e "$ac_comsub
10618 s%@configure_input@%$configure_input%g
10619 s%@srcdir@%$srcdir%g
10620 s%@top_srcdir@%$top_srcdir%g
10621 s%@INSTALL@%$INSTALL%g
10622 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10623 fi; done
10624 rm -f conftest.s*
10625
10626 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10627 # NAME is the cpp macro being defined and VALUE is the value it is being given.
10628 #
10629 # ac_d sets the value in "#define NAME VALUE" lines.
10630 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
10631 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
10632 ac_dC='\3'
10633 ac_dD='%g'
10634 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10635 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
10636 ac_uB='\([      ]\)%\1#\2define\3'
10637 ac_uC=' '
10638 ac_uD='\4%g'
10639 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10640 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
10641 ac_eB='$%\1#\2define\3'
10642 ac_eC=' '
10643 ac_eD='%g'
10644
10645 if test "${CONFIG_HEADERS+set}" != set; then
10646 EOF
10647 cat >> $CONFIG_STATUS <<EOF
10648   CONFIG_HEADERS="config.h:config.in"
10649 EOF
10650 cat >> $CONFIG_STATUS <<\EOF
10651 fi
10652 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10653   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10654   case "$ac_file" in
10655   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10656        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10657   *) ac_file_in="${ac_file}.in" ;;
10658   esac
10659
10660   echo creating $ac_file
10661
10662   rm -f conftest.frag conftest.in conftest.out
10663   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10664   cat $ac_file_inputs > conftest.in
10665
10666 EOF
10667
10668 # Transform confdefs.h into a sed script conftest.vals that substitutes
10669 # the proper values into config.h.in to produce config.h.  And first:
10670 # Protect against being on the right side of a sed subst in config.status.
10671 # Protect against being in an unquoted here document in config.status.
10672 rm -f conftest.vals
10673 cat > conftest.hdr <<\EOF
10674 s/[\\&%]/\\&/g
10675 s%[\\$`]%\\&%g
10676 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
10677 s%ac_d%ac_u%gp
10678 s%ac_u%ac_e%gp
10679 EOF
10680 sed -n -f conftest.hdr confdefs.h > conftest.vals
10681 rm -f conftest.hdr
10682
10683 # This sed command replaces #undef with comments.  This is necessary, for
10684 # example, in the case of _POSIX_SOURCE, which is predefined and required
10685 # on some systems where configure will not decide to define it.
10686 cat >> conftest.vals <<\EOF
10687 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
10688 EOF
10689
10690 # Break up conftest.vals because some shells have a limit on
10691 # the size of here documents, and old seds have small limits too.
10692
10693 rm -f conftest.tail
10694 while :
10695 do
10696   ac_lines=`grep -c . conftest.vals`
10697   # grep -c gives empty output for an empty file on some AIX systems.
10698   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10699   # Write a limited-size here document to conftest.frag.
10700   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
10701   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10702   echo 'CEOF
10703   sed -f conftest.frag conftest.in > conftest.out
10704   rm -f conftest.in
10705   mv conftest.out conftest.in
10706 ' >> $CONFIG_STATUS
10707   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10708   rm -f conftest.vals
10709   mv conftest.tail conftest.vals
10710 done
10711 rm -f conftest.vals
10712
10713 cat >> $CONFIG_STATUS <<\EOF
10714   rm -f conftest.frag conftest.h
10715   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
10716   cat conftest.in >> conftest.h
10717   rm -f conftest.in
10718   if cmp -s $ac_file conftest.h 2>/dev/null; then
10719     echo "$ac_file is unchanged"
10720     rm -f conftest.h
10721   else
10722     # Remove last slash and all that follows it.  Not all systems have dirname.
10723       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10724       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10725       # The file is in a subdirectory.
10726       test ! -d "$ac_dir" && mkdir "$ac_dir"
10727     fi
10728     rm -f $ac_file
10729     mv conftest.h $ac_file
10730   fi
10731 fi; done
10732
10733 EOF
10734
10735 cat >> $CONFIG_STATUS <<EOF
10736 ac_sources="$files"
10737 ac_dests="$links"
10738 EOF
10739
10740 cat >> $CONFIG_STATUS <<\EOF
10741 srcdir=$ac_given_srcdir
10742 while test -n "$ac_sources"; do
10743   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
10744   set $ac_sources; ac_source=$1; shift; ac_sources=$*
10745
10746   echo "linking $srcdir/$ac_source to $ac_dest"
10747
10748   if test ! -r $srcdir/$ac_source; then
10749     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
10750   fi
10751   rm -f $ac_dest
10752
10753   # Make relative symlinks.
10754   # Remove last slash and all that follows it.  Not all systems have dirname.
10755   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
10756   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
10757     # The dest file is in a subdirectory.
10758     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
10759     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
10760     # A "../" for each directory in $ac_dest_dir_suffix.
10761     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
10762   else
10763     ac_dest_dir_suffix= ac_dots=
10764   fi
10765
10766   case "$srcdir" in
10767   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
10768   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
10769   esac
10770
10771   # Make a symlink if possible; otherwise try a hard link.
10772   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
10773     ln $srcdir/$ac_source $ac_dest; then :
10774   else
10775     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
10776   fi
10777 done
10778 EOF
10779 cat >> $CONFIG_STATUS <<EOF
10780
10781 gdb_host_cpu=$gdb_host_cpu
10782 gdb_target_cpu=$gdb_target_cpu
10783 nativefile=$nativefile
10784
10785 EOF
10786 cat >> $CONFIG_STATUS <<\EOF
10787
10788 if test "${nativefile}" = ""; then
10789         < Makefile \
10790         sed -e '/^NATDEPFILES[  ]*=.*\\$/,/[^\\]$/s/^/# /' \
10791             -e '/^NATDEPFILES[  ]*=/s/^/# /' \
10792         | sed -e '/^\(NATDEPFILES[      ]*[+]=[         ]*\)/s//# \1/' \
10793         > Makefile.tem
10794 mv -f Makefile.tem Makefile
10795 fi
10796
10797 sed -e '/^TM_FILE[      ]*=/s,^TM_FILE[         ]*=[    ]*,&config/'"${gdb_target_cpu}"'/,
10798 /^XM_FILE[      ]*=/s,^XM_FILE[         ]*=[    ]*,&config/'"${gdb_host_cpu}"'/,
10799 /^NAT_FILE[     ]*=/s,^NAT_FILE[        ]*=[    ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
10800 mv -f Makefile.tmp Makefile
10801
10802
10803 case x$CONFIG_HEADERS in
10804 xconfig.h:config.in)
10805 echo > stamp-h ;;
10806 esac
10807
10808 exit 0
10809 EOF
10810 chmod +x $CONFIG_STATUS
10811 rm -fr confdefs* $ac_clean_files
10812 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
10813
10814 if test "$no_recursion" != yes; then
10815
10816   # Remove --cache-file and --srcdir arguments so they do not pile up.
10817   ac_sub_configure_args=
10818   ac_prev=
10819   for ac_arg in $ac_configure_args; do
10820     if test -n "$ac_prev"; then
10821       ac_prev=
10822       continue
10823     fi
10824     case "$ac_arg" in
10825     -cache-file | --cache-file | --cache-fil | --cache-fi \
10826     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
10827       ac_prev=cache_file ;;
10828     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
10829     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
10830       ;;
10831     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
10832       ac_prev=srcdir ;;
10833     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
10834       ;;
10835     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
10836     esac
10837   done
10838
10839   for ac_config_dir in $configdirs; do
10840
10841     # Do not complain, so a configure script can configure whichever
10842     # parts of a large source tree are present.
10843     if test ! -d $srcdir/$ac_config_dir; then
10844       continue
10845     fi
10846
10847     echo configuring in $ac_config_dir
10848
10849     case "$srcdir" in
10850     .) ;;
10851     *)
10852       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
10853       else
10854         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
10855       fi
10856       ;;
10857     esac
10858
10859     ac_popdir=`pwd`
10860     cd $ac_config_dir
10861
10862       # A "../" for each directory in /$ac_config_dir.
10863       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
10864
10865     case "$srcdir" in
10866     .) # No --srcdir option.  We are building in place.
10867       ac_sub_srcdir=$srcdir ;;
10868     /*) # Absolute path.
10869       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
10870     *) # Relative path.
10871       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
10872     esac
10873
10874     # Check for guested configure; otherwise get Cygnus style configure.
10875     if test -f $ac_sub_srcdir/configure; then
10876       ac_sub_configure=$ac_sub_srcdir/configure
10877     elif test -f $ac_sub_srcdir/configure.in; then
10878       ac_sub_configure=$ac_configure
10879     else
10880       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
10881       ac_sub_configure=
10882     fi
10883
10884     # The recursion is here.
10885     if test -n "$ac_sub_configure"; then
10886
10887       # Make the cache file name correct relative to the subdirectory.
10888       case "$cache_file" in
10889       /*) ac_sub_cache_file=$cache_file ;;
10890       *) # Relative path.
10891         ac_sub_cache_file="$ac_dots$cache_file" ;;
10892       esac
10893   case "$ac_given_INSTALL" in
10894         [/$]*) INSTALL="$ac_given_INSTALL" ;;
10895         *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
10896         esac
10897
10898       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
10899       # The eval makes quoting arguments work.
10900       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
10901       then :
10902       else
10903         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
10904       fi
10905     fi
10906
10907     cd $ac_popdir
10908   done
10909 fi
10910
10911
10912 exit 0
This page took 0.627453 seconds and 4 git commands to generate.