]> Git Repo - binutils.git/blob - gdb/configure
*** empty log message ***
[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   --enable-gdbcli            Enable GDB-CLI interface"
25 ac_help="$ac_help
26   --enable-gdbmi            Enable GDB-MI interface"
27 ac_help="$ac_help
28   --with-uiout          Use new uiout functions instead of *printf's"
29 ac_help="$ac_help
30   --enable-tui            Enable full-screen terminal user interface"
31 ac_help="$ac_help
32   --enable-netrom         Enable NetROM support"
33 ac_help="$ac_help
34   --enable-build-warnings Enable build-time compiler warnings if gcc is used"
35 ac_help="$ac_help
36   --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used"
37 ac_help="$ac_help
38   --with-mmalloc          Use memory mapped malloc package"
39 ac_help="$ac_help
40   --with-included-regex          Use included regex"
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-tixconfig        Directory containing tix configuration (tixConfig.sh)"
59 ac_help="$ac_help
60   --with-x                use the X Window System"
61 ac_help="$ac_help
62   --enable-sim            Link gdb with simulator"
63 ac_help="$ac_help
64   --enable-shared         Use shared libraries"
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 srcdir=
83 target=NONE
84 verbose=
85 x_includes=NONE
86 x_libraries=NONE
87 bindir='${exec_prefix}/bin'
88 sbindir='${exec_prefix}/sbin'
89 libexecdir='${exec_prefix}/libexec'
90 datadir='${prefix}/share'
91 sysconfdir='${prefix}/etc'
92 sharedstatedir='${prefix}/com'
93 localstatedir='${prefix}/var'
94 libdir='${exec_prefix}/lib'
95 includedir='${prefix}/include'
96 oldincludedir='/usr/include'
97 infodir='${prefix}/info'
98 mandir='${prefix}/man'
99
100 # Initialize some other variables.
101 subdirs=
102 MFLAGS= MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104 # Maximum number of lines to put in a shell here document.
105 ac_max_here_lines=12
106
107 ac_prev=
108 for ac_option
109 do
110
111   # If the previous option needs an argument, assign it.
112   if test -n "$ac_prev"; then
113     eval "$ac_prev=\$ac_option"
114     ac_prev=
115     continue
116   fi
117
118   case "$ac_option" in
119   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
120   *) ac_optarg= ;;
121   esac
122
123   # Accept the important Cygnus configure options, so we can diagnose typos.
124
125   case "$ac_option" in
126
127   -bindir | --bindir | --bindi | --bind | --bin | --bi)
128     ac_prev=bindir ;;
129   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
130     bindir="$ac_optarg" ;;
131
132   -build | --build | --buil | --bui | --bu)
133     ac_prev=build ;;
134   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
135     build="$ac_optarg" ;;
136
137   -cache-file | --cache-file | --cache-fil | --cache-fi \
138   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
139     ac_prev=cache_file ;;
140   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
141   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
142     cache_file="$ac_optarg" ;;
143
144   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
145     ac_prev=datadir ;;
146   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
147   | --da=*)
148     datadir="$ac_optarg" ;;
149
150   -disable-* | --disable-*)
151     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
152     # Reject names that are not valid shell variable names.
153     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
154       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
155     fi
156     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
157     eval "enable_${ac_feature}=no" ;;
158
159   -enable-* | --enable-*)
160     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
161     # Reject names that are not valid shell variable names.
162     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
163       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
164     fi
165     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
166     case "$ac_option" in
167       *=*) ;;
168       *) ac_optarg=yes ;;
169     esac
170     eval "enable_${ac_feature}='$ac_optarg'" ;;
171
172   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
173   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
174   | --exec | --exe | --ex)
175     ac_prev=exec_prefix ;;
176   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
177   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
178   | --exec=* | --exe=* | --ex=*)
179     exec_prefix="$ac_optarg" ;;
180
181   -gas | --gas | --ga | --g)
182     # Obsolete; use --with-gas.
183     with_gas=yes ;;
184
185   -help | --help | --hel | --he)
186     # Omit some internal or obsolete options to make the list less imposing.
187     # This message is too long to be a string in the A/UX 3.1 sh.
188     cat << EOF
189 Usage: configure [options] [host]
190 Options: [defaults in brackets after descriptions]
191 Configuration:
192   --cache-file=FILE       cache test results in FILE
193   --help                  print this message
194   --no-create             do not create output files
195   --quiet, --silent       do not print \`checking...' messages
196   --version               print the version of autoconf that created configure
197 Directory and file names:
198   --prefix=PREFIX         install architecture-independent files in PREFIX
199                           [$ac_default_prefix]
200   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
201                           [same as prefix]
202   --bindir=DIR            user executables in DIR [EPREFIX/bin]
203   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
204   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
205   --datadir=DIR           read-only architecture-independent data in DIR
206                           [PREFIX/share]
207   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
208   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
209                           [PREFIX/com]
210   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
211   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
212   --includedir=DIR        C header files in DIR [PREFIX/include]
213   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
214   --infodir=DIR           info documentation in DIR [PREFIX/info]
215   --mandir=DIR            man documentation in DIR [PREFIX/man]
216   --srcdir=DIR            find the sources in DIR [configure dir or ..]
217   --program-prefix=PREFIX prepend PREFIX to installed program names
218   --program-suffix=SUFFIX append SUFFIX to installed program names
219   --program-transform-name=PROGRAM
220                           run sed PROGRAM on installed program names
221 EOF
222     cat << EOF
223 Host type:
224   --build=BUILD           configure for building on BUILD [BUILD=HOST]
225   --host=HOST             configure for HOST [guessed]
226   --target=TARGET         configure for TARGET [TARGET=HOST]
227 Features and packages:
228   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
229   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
230   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
231   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
232   --x-includes=DIR        X include files are in DIR
233   --x-libraries=DIR       X library files are in DIR
234 EOF
235     if test -n "$ac_help"; then
236       echo "--enable and --with options recognized:$ac_help"
237     fi
238     exit 0 ;;
239
240   -host | --host | --hos | --ho)
241     ac_prev=host ;;
242   -host=* | --host=* | --hos=* | --ho=*)
243     host="$ac_optarg" ;;
244
245   -includedir | --includedir | --includedi | --included | --include \
246   | --includ | --inclu | --incl | --inc)
247     ac_prev=includedir ;;
248   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
249   | --includ=* | --inclu=* | --incl=* | --inc=*)
250     includedir="$ac_optarg" ;;
251
252   -infodir | --infodir | --infodi | --infod | --info | --inf)
253     ac_prev=infodir ;;
254   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
255     infodir="$ac_optarg" ;;
256
257   -libdir | --libdir | --libdi | --libd)
258     ac_prev=libdir ;;
259   -libdir=* | --libdir=* | --libdi=* | --libd=*)
260     libdir="$ac_optarg" ;;
261
262   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
263   | --libexe | --libex | --libe)
264     ac_prev=libexecdir ;;
265   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
266   | --libexe=* | --libex=* | --libe=*)
267     libexecdir="$ac_optarg" ;;
268
269   -localstatedir | --localstatedir | --localstatedi | --localstated \
270   | --localstate | --localstat | --localsta | --localst \
271   | --locals | --local | --loca | --loc | --lo)
272     ac_prev=localstatedir ;;
273   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
274   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
275   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
276     localstatedir="$ac_optarg" ;;
277
278   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
279     ac_prev=mandir ;;
280   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
281     mandir="$ac_optarg" ;;
282
283   -nfp | --nfp | --nf)
284     # Obsolete; use --without-fp.
285     with_fp=no ;;
286
287   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
288   | --no-cr | --no-c)
289     no_create=yes ;;
290
291   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
292   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
293     no_recursion=yes ;;
294
295   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
296   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
297   | --oldin | --oldi | --old | --ol | --o)
298     ac_prev=oldincludedir ;;
299   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
300   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
301   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
302     oldincludedir="$ac_optarg" ;;
303
304   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
305     ac_prev=prefix ;;
306   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
307     prefix="$ac_optarg" ;;
308
309   -program-prefix | --program-prefix | --program-prefi | --program-pref \
310   | --program-pre | --program-pr | --program-p)
311     ac_prev=program_prefix ;;
312   -program-prefix=* | --program-prefix=* | --program-prefi=* \
313   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
314     program_prefix="$ac_optarg" ;;
315
316   -program-suffix | --program-suffix | --program-suffi | --program-suff \
317   | --program-suf | --program-su | --program-s)
318     ac_prev=program_suffix ;;
319   -program-suffix=* | --program-suffix=* | --program-suffi=* \
320   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
321     program_suffix="$ac_optarg" ;;
322
323   -program-transform-name | --program-transform-name \
324   | --program-transform-nam | --program-transform-na \
325   | --program-transform-n | --program-transform- \
326   | --program-transform | --program-transfor \
327   | --program-transfo | --program-transf \
328   | --program-trans | --program-tran \
329   | --progr-tra | --program-tr | --program-t)
330     ac_prev=program_transform_name ;;
331   -program-transform-name=* | --program-transform-name=* \
332   | --program-transform-nam=* | --program-transform-na=* \
333   | --program-transform-n=* | --program-transform-=* \
334   | --program-transform=* | --program-transfor=* \
335   | --program-transfo=* | --program-transf=* \
336   | --program-trans=* | --program-tran=* \
337   | --progr-tra=* | --program-tr=* | --program-t=*)
338     program_transform_name="$ac_optarg" ;;
339
340   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
341   | -silent | --silent | --silen | --sile | --sil)
342     silent=yes ;;
343
344   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
345     ac_prev=sbindir ;;
346   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
347   | --sbi=* | --sb=*)
348     sbindir="$ac_optarg" ;;
349
350   -sharedstatedir | --sharedstatedir | --sharedstatedi \
351   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
352   | --sharedst | --shareds | --shared | --share | --shar \
353   | --sha | --sh)
354     ac_prev=sharedstatedir ;;
355   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
356   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
357   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
358   | --sha=* | --sh=*)
359     sharedstatedir="$ac_optarg" ;;
360
361   -site | --site | --sit)
362     ac_prev=site ;;
363   -site=* | --site=* | --sit=*)
364     site="$ac_optarg" ;;
365
366   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
367     ac_prev=srcdir ;;
368   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
369     srcdir="$ac_optarg" ;;
370
371   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
372   | --syscon | --sysco | --sysc | --sys | --sy)
373     ac_prev=sysconfdir ;;
374   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
375   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
376     sysconfdir="$ac_optarg" ;;
377
378   -target | --target | --targe | --targ | --tar | --ta | --t)
379     ac_prev=target ;;
380   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
381     target="$ac_optarg" ;;
382
383   -v | -verbose | --verbose | --verbos | --verbo | --verb)
384     verbose=yes ;;
385
386   -version | --version | --versio | --versi | --vers)
387     echo "configure generated by autoconf version 2.13"
388     exit 0 ;;
389
390   -with-* | --with-*)
391     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
392     # Reject names that are not valid shell variable names.
393     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
394       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
395     fi
396     ac_package=`echo $ac_package| sed 's/-/_/g'`
397     case "$ac_option" in
398       *=*) ;;
399       *) ac_optarg=yes ;;
400     esac
401     eval "with_${ac_package}='$ac_optarg'" ;;
402
403   -without-* | --without-*)
404     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
405     # Reject names that are not valid shell variable names.
406     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
407       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
408     fi
409     ac_package=`echo $ac_package| sed 's/-/_/g'`
410     eval "with_${ac_package}=no" ;;
411
412   --x)
413     # Obsolete; use --with-x.
414     with_x=yes ;;
415
416   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
417   | --x-incl | --x-inc | --x-in | --x-i)
418     ac_prev=x_includes ;;
419   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
420   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
421     x_includes="$ac_optarg" ;;
422
423   -x-libraries | --x-libraries | --x-librarie | --x-librari \
424   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
425     ac_prev=x_libraries ;;
426   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
427   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
428     x_libraries="$ac_optarg" ;;
429
430   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
431     ;;
432
433   *)
434     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
435       echo "configure: warning: $ac_option: invalid host type" 1>&2
436     fi
437     if test "x$nonopt" != xNONE; then
438       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
439     fi
440     nonopt="$ac_option"
441     ;;
442
443   esac
444 done
445
446 if test -n "$ac_prev"; then
447   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
448 fi
449
450 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
451
452 # File descriptor usage:
453 # 0 standard input
454 # 1 file creation
455 # 2 errors and warnings
456 # 3 some systems may open it to /dev/tty
457 # 4 used on the Kubota Titan
458 # 6 checking for... messages and results
459 # 5 compiler messages saved in config.log
460 if test "$silent" = yes; then
461   exec 6>/dev/null
462 else
463   exec 6>&1
464 fi
465 exec 5>./config.log
466
467 echo "\
468 This file contains any messages produced by compilers while
469 running configure, to aid debugging if configure makes a mistake.
470 " 1>&5
471
472 # Strip out --no-create and --no-recursion so they do not pile up.
473 # Also quote any args containing shell metacharacters.
474 ac_configure_args=
475 for ac_arg
476 do
477   case "$ac_arg" in
478   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
479   | --no-cr | --no-c) ;;
480   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
481   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
482   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
483   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
484   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
485   esac
486 done
487
488 # NLS nuisances.
489 # Only set these to C if already set.  These must not be set unconditionally
490 # because not all systems understand e.g. LANG=C (notably SCO).
491 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
492 # Non-C LC_CTYPE values break the ctype check.
493 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
494 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
495 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
496 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
497
498 # confdefs.h avoids OS command line length limits that DEFS can exceed.
499 rm -rf conftest* confdefs.h
500 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
501 echo > confdefs.h
502
503 # A filename unique to this package, relative to the directory that
504 # configure is in, which we can look for to find out if srcdir is correct.
505 ac_unique_file=main.c
506
507 # Find the source files, if location was not specified.
508 if test -z "$srcdir"; then
509   ac_srcdir_defaulted=yes
510   # Try the directory containing this script, then its parent.
511   ac_prog=$0
512   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
513   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
514   srcdir=$ac_confdir
515   if test ! -r $srcdir/$ac_unique_file; then
516     srcdir=..
517   fi
518 else
519   ac_srcdir_defaulted=no
520 fi
521 if test ! -r $srcdir/$ac_unique_file; then
522   if test "$ac_srcdir_defaulted" = yes; then
523     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
524   else
525     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
526   fi
527 fi
528 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
529
530 # Prefer explicitly selected file to automatically selected ones.
531 if test -z "$CONFIG_SITE"; then
532   if test "x$prefix" != xNONE; then
533     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
534   else
535     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
536   fi
537 fi
538 for ac_site_file in $CONFIG_SITE; do
539   if test -r "$ac_site_file"; then
540     echo "loading site script $ac_site_file"
541     . "$ac_site_file"
542   fi
543 done
544
545 if test -r "$cache_file"; then
546   echo "loading cache $cache_file"
547   . $cache_file
548 else
549   echo "creating cache $cache_file"
550   > $cache_file
551 fi
552
553 ac_ext=c
554 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
555 ac_cpp='$CPP $CPPFLAGS'
556 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
557 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
558 cross_compiling=$ac_cv_prog_cc_cross
559
560 ac_exeext=
561 ac_objext=o
562 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
563   # Stardent Vistra SVR4 grep lacks -e, says [email protected].
564   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
565     ac_n= ac_c='
566 ' ac_t='        '
567   else
568     ac_n=-n ac_c= ac_t=
569   fi
570 else
571   ac_n= ac_c='\c' ac_t=
572 fi
573
574
575
576 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
577 echo "configure:578: checking whether to enable maintainer-specific portions of Makefiles" >&5
578     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
579 if test "${enable_maintainer_mode+set}" = set; then
580   enableval="$enable_maintainer_mode"
581   USE_MAINTAINER_MODE=$enableval
582 else
583   USE_MAINTAINER_MODE=no
584 fi
585
586   echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
587   
588
589 if test $USE_MAINTAINER_MODE = yes; then
590   MAINTAINER_MODE_TRUE=
591   MAINTAINER_MODE_FALSE='#'
592 else
593   MAINTAINER_MODE_TRUE='#'
594   MAINTAINER_MODE_FALSE=
595 fi
596   MAINT=$MAINTAINER_MODE_TRUE
597   
598
599
600 # Extract the first word of "gcc", so it can be a program name with args.
601 set dummy gcc; ac_word=$2
602 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
603 echo "configure:604: checking for $ac_word" >&5
604 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
605   echo $ac_n "(cached) $ac_c" 1>&6
606 else
607   if test -n "$CC"; then
608   ac_cv_prog_CC="$CC" # Let the user override the test.
609 else
610   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
611   ac_dummy="$PATH"
612   for ac_dir in $ac_dummy; do
613     test -z "$ac_dir" && ac_dir=.
614     if test -f $ac_dir/$ac_word; then
615       ac_cv_prog_CC="gcc"
616       break
617     fi
618   done
619   IFS="$ac_save_ifs"
620 fi
621 fi
622 CC="$ac_cv_prog_CC"
623 if test -n "$CC"; then
624   echo "$ac_t""$CC" 1>&6
625 else
626   echo "$ac_t""no" 1>&6
627 fi
628
629 if test -z "$CC"; then
630   # Extract the first word of "cc", so it can be a program name with args.
631 set dummy cc; ac_word=$2
632 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
633 echo "configure:634: checking for $ac_word" >&5
634 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
635   echo $ac_n "(cached) $ac_c" 1>&6
636 else
637   if test -n "$CC"; then
638   ac_cv_prog_CC="$CC" # Let the user override the test.
639 else
640   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
641   ac_prog_rejected=no
642   ac_dummy="$PATH"
643   for ac_dir in $ac_dummy; do
644     test -z "$ac_dir" && ac_dir=.
645     if test -f $ac_dir/$ac_word; then
646       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
647         ac_prog_rejected=yes
648         continue
649       fi
650       ac_cv_prog_CC="cc"
651       break
652     fi
653   done
654   IFS="$ac_save_ifs"
655 if test $ac_prog_rejected = yes; then
656   # We found a bogon in the path, so make sure we never use it.
657   set dummy $ac_cv_prog_CC
658   shift
659   if test $# -gt 0; then
660     # We chose a different compiler from the bogus one.
661     # However, it has the same basename, so the bogon will be chosen
662     # first if we set CC to just the basename; use the full file name.
663     shift
664     set dummy "$ac_dir/$ac_word" "$@"
665     shift
666     ac_cv_prog_CC="$@"
667   fi
668 fi
669 fi
670 fi
671 CC="$ac_cv_prog_CC"
672 if test -n "$CC"; then
673   echo "$ac_t""$CC" 1>&6
674 else
675   echo "$ac_t""no" 1>&6
676 fi
677
678   if test -z "$CC"; then
679     case "`uname -s`" in
680     *win32* | *WIN32*)
681       # Extract the first word of "cl", so it can be a program name with args.
682 set dummy cl; ac_word=$2
683 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
684 echo "configure:685: checking for $ac_word" >&5
685 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
686   echo $ac_n "(cached) $ac_c" 1>&6
687 else
688   if test -n "$CC"; then
689   ac_cv_prog_CC="$CC" # Let the user override the test.
690 else
691   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
692   ac_dummy="$PATH"
693   for ac_dir in $ac_dummy; do
694     test -z "$ac_dir" && ac_dir=.
695     if test -f $ac_dir/$ac_word; then
696       ac_cv_prog_CC="cl"
697       break
698     fi
699   done
700   IFS="$ac_save_ifs"
701 fi
702 fi
703 CC="$ac_cv_prog_CC"
704 if test -n "$CC"; then
705   echo "$ac_t""$CC" 1>&6
706 else
707   echo "$ac_t""no" 1>&6
708 fi
709  ;;
710     esac
711   fi
712   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
713 fi
714
715 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
716 echo "configure:717: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
717
718 ac_ext=c
719 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
720 ac_cpp='$CPP $CPPFLAGS'
721 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
722 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
723 cross_compiling=$ac_cv_prog_cc_cross
724
725 cat > conftest.$ac_ext << EOF
726
727 #line 728 "configure"
728 #include "confdefs.h"
729
730 main(){return(0);}
731 EOF
732 if { (eval echo configure:733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
733   ac_cv_prog_cc_works=yes
734   # If we can't run a trivial program, we are probably using a cross compiler.
735   if (./conftest; exit) 2>/dev/null; then
736     ac_cv_prog_cc_cross=no
737   else
738     ac_cv_prog_cc_cross=yes
739   fi
740 else
741   echo "configure: failed program was:" >&5
742   cat conftest.$ac_ext >&5
743   ac_cv_prog_cc_works=no
744 fi
745 rm -fr conftest*
746 ac_ext=c
747 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
748 ac_cpp='$CPP $CPPFLAGS'
749 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
750 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
751 cross_compiling=$ac_cv_prog_cc_cross
752
753 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
754 if test $ac_cv_prog_cc_works = no; then
755   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
756 fi
757 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
758 echo "configure:759: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
759 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
760 cross_compiling=$ac_cv_prog_cc_cross
761
762 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
763 echo "configure:764: checking whether we are using GNU C" >&5
764 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
765   echo $ac_n "(cached) $ac_c" 1>&6
766 else
767   cat > conftest.c <<EOF
768 #ifdef __GNUC__
769   yes;
770 #endif
771 EOF
772 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
773   ac_cv_prog_gcc=yes
774 else
775   ac_cv_prog_gcc=no
776 fi
777 fi
778
779 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
780
781 if test $ac_cv_prog_gcc = yes; then
782   GCC=yes
783 else
784   GCC=
785 fi
786
787 ac_test_CFLAGS="${CFLAGS+set}"
788 ac_save_CFLAGS="$CFLAGS"
789 CFLAGS=
790 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
791 echo "configure:792: checking whether ${CC-cc} accepts -g" >&5
792 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
793   echo $ac_n "(cached) $ac_c" 1>&6
794 else
795   echo 'void f(){}' > conftest.c
796 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
797   ac_cv_prog_cc_g=yes
798 else
799   ac_cv_prog_cc_g=no
800 fi
801 rm -f conftest*
802
803 fi
804
805 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
806 if test "$ac_test_CFLAGS" = set; then
807   CFLAGS="$ac_save_CFLAGS"
808 elif test $ac_cv_prog_cc_g = yes; then
809   if test "$GCC" = yes; then
810     CFLAGS="-g -O2"
811   else
812     CFLAGS="-g"
813   fi
814 else
815   if test "$GCC" = yes; then
816     CFLAGS="-O2"
817   else
818     CFLAGS=
819   fi
820 fi
821
822 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
823 echo "configure:824: checking how to run the C preprocessor" >&5
824 # On Suns, sometimes $CPP names a directory.
825 if test -n "$CPP" && test -d "$CPP"; then
826   CPP=
827 fi
828 if test -z "$CPP"; then
829 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
830   echo $ac_n "(cached) $ac_c" 1>&6
831 else
832     # This must be in double quotes, not single quotes, because CPP may get
833   # substituted into the Makefile and "${CC-cc}" will confuse make.
834   CPP="${CC-cc} -E"
835   # On the NeXT, cc -E runs the code through the compiler's parser,
836   # not just through cpp.
837   cat > conftest.$ac_ext <<EOF
838 #line 839 "configure"
839 #include "confdefs.h"
840 #include <assert.h>
841 Syntax Error
842 EOF
843 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
844 { (eval echo configure:845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
845 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
846 if test -z "$ac_err"; then
847   :
848 else
849   echo "$ac_err" >&5
850   echo "configure: failed program was:" >&5
851   cat conftest.$ac_ext >&5
852   rm -rf conftest*
853   CPP="${CC-cc} -E -traditional-cpp"
854   cat > conftest.$ac_ext <<EOF
855 #line 856 "configure"
856 #include "confdefs.h"
857 #include <assert.h>
858 Syntax Error
859 EOF
860 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
861 { (eval echo configure:862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
862 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
863 if test -z "$ac_err"; then
864   :
865 else
866   echo "$ac_err" >&5
867   echo "configure: failed program was:" >&5
868   cat conftest.$ac_ext >&5
869   rm -rf conftest*
870   CPP="${CC-cc} -nologo -E"
871   cat > conftest.$ac_ext <<EOF
872 #line 873 "configure"
873 #include "confdefs.h"
874 #include <assert.h>
875 Syntax Error
876 EOF
877 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
878 { (eval echo configure:879: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
879 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
880 if test -z "$ac_err"; then
881   :
882 else
883   echo "$ac_err" >&5
884   echo "configure: failed program was:" >&5
885   cat conftest.$ac_ext >&5
886   rm -rf conftest*
887   CPP=/lib/cpp
888 fi
889 rm -f conftest*
890 fi
891 rm -f conftest*
892 fi
893 rm -f conftest*
894   ac_cv_prog_CPP="$CPP"
895 fi
896   CPP="$ac_cv_prog_CPP"
897 else
898   ac_cv_prog_CPP="$CPP"
899 fi
900 echo "$ac_t""$CPP" 1>&6
901
902 echo $ac_n "checking for AIX""... $ac_c" 1>&6
903 echo "configure:904: checking for AIX" >&5
904 cat > conftest.$ac_ext <<EOF
905 #line 906 "configure"
906 #include "confdefs.h"
907 #ifdef _AIX
908   yes
909 #endif
910
911 EOF
912 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
913   egrep "yes" >/dev/null 2>&1; then
914   rm -rf conftest*
915   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
916 #define _ALL_SOURCE 1
917 EOF
918
919 else
920   rm -rf conftest*
921   echo "$ac_t""no" 1>&6
922 fi
923 rm -f conftest*
924
925
926 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
927 echo "configure:928: checking for POSIXized ISC" >&5
928 if test -d /etc/conf/kconfig.d &&
929   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
930 then
931   echo "$ac_t""yes" 1>&6
932   ISC=yes # If later tests want to check for ISC.
933   cat >> confdefs.h <<\EOF
934 #define _POSIX_SOURCE 1
935 EOF
936
937   if test "$GCC" = yes; then
938     CC="$CC -posix"
939   else
940     CC="$CC -Xp"
941   fi
942 else
943   echo "$ac_t""no" 1>&6
944   ISC=
945 fi
946
947
948
949
950 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
951 echo "configure:952: checking for ${CC-cc} option to accept ANSI C" >&5
952 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
953   echo $ac_n "(cached) $ac_c" 1>&6
954 else
955   am_cv_prog_cc_stdc=no
956 ac_save_CC="$CC"
957 # Don't try gcc -ansi; that turns off useful extensions and
958 # breaks some systems' header files.
959 # AIX                   -qlanglvl=ansi
960 # Ultrix and OSF/1      -std1
961 # HP-UX                 -Aa -D_HPUX_SOURCE
962 # SVR4                  -Xc -D__EXTENSIONS__
963 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
964 do
965   CC="$ac_save_CC $ac_arg"
966   cat > conftest.$ac_ext <<EOF
967 #line 968 "configure"
968 #include "confdefs.h"
969 #include <stdarg.h>
970 #include <stdio.h>
971 #include <sys/types.h>
972 #include <sys/stat.h>
973 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
974 struct buf { int x; };
975 FILE * (*rcsopen) (struct buf *, struct stat *, int);
976 static char *e (p, i)
977      char **p;
978      int i;
979 {
980   return p[i];
981 }
982 static char *f (char * (*g) (char **, int), char **p, ...)
983 {
984   char *s;
985   va_list v;
986   va_start (v,p);
987   s = g (p, va_arg (v,int));
988   va_end (v);
989   return s;
990 }
991 int test (int i, double x);
992 struct s1 {int (*f) (int a);};
993 struct s2 {int (*f) (double a);};
994 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
995 int argc;
996 char **argv;
997
998 int main() {
999
1000 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1001
1002 ; return 0; }
1003 EOF
1004 if { (eval echo configure:1005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1005   rm -rf conftest*
1006   am_cv_prog_cc_stdc="$ac_arg"; break
1007 else
1008   echo "configure: failed program was:" >&5
1009   cat conftest.$ac_ext >&5
1010 fi
1011 rm -f conftest*
1012 done
1013 CC="$ac_save_CC"
1014
1015 fi
1016
1017 if test -z "$am_cv_prog_cc_stdc"; then
1018   echo "$ac_t""none needed" 1>&6
1019 else
1020   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
1021 fi
1022 case "x$am_cv_prog_cc_stdc" in
1023   x|xno) ;;
1024   *) CC="$CC $am_cv_prog_cc_stdc" ;;
1025 esac
1026
1027
1028 ac_aux_dir=
1029 for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1030   if test -f $ac_dir/install-sh; then
1031     ac_aux_dir=$ac_dir
1032     ac_install_sh="$ac_aux_dir/install-sh -c"
1033     break
1034   elif test -f $ac_dir/install.sh; then
1035     ac_aux_dir=$ac_dir
1036     ac_install_sh="$ac_aux_dir/install.sh -c"
1037     break
1038   fi
1039 done
1040 if test -z "$ac_aux_dir"; then
1041   { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1042 fi
1043 ac_config_guess=$ac_aux_dir/config.guess
1044 ac_config_sub=$ac_aux_dir/config.sub
1045 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1046
1047
1048 # Do some error checking and defaulting for the host and target type.
1049 # The inputs are:
1050 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1051 #
1052 # The rules are:
1053 # 1. You are not allowed to specify --host, --target, and nonopt at the
1054 #    same time.
1055 # 2. Host defaults to nonopt.
1056 # 3. If nonopt is not specified, then host defaults to the current host,
1057 #    as determined by config.guess.
1058 # 4. Target and build default to nonopt.
1059 # 5. If nonopt is not specified, then target and build default to host.
1060
1061 # The aliases save the names the user supplied, while $host etc.
1062 # will get canonicalized.
1063 case $host---$target---$nonopt in
1064 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1065 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1066 esac
1067
1068
1069 # Make sure we can run config.sub.
1070 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1071 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1072 fi
1073
1074 echo $ac_n "checking host system type""... $ac_c" 1>&6
1075 echo "configure:1076: checking host system type" >&5
1076
1077 host_alias=$host
1078 case "$host_alias" in
1079 NONE)
1080   case $nonopt in
1081   NONE)
1082     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1083     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1084     fi ;;
1085   *) host_alias=$nonopt ;;
1086   esac ;;
1087 esac
1088
1089 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1090 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1091 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1092 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1093 echo "$ac_t""$host" 1>&6
1094
1095 echo $ac_n "checking target system type""... $ac_c" 1>&6
1096 echo "configure:1097: checking target system type" >&5
1097
1098 target_alias=$target
1099 case "$target_alias" in
1100 NONE)
1101   case $nonopt in
1102   NONE) target_alias=$host_alias ;;
1103   *) target_alias=$nonopt ;;
1104   esac ;;
1105 esac
1106
1107 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1108 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1109 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1110 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1111 echo "$ac_t""$target" 1>&6
1112
1113 echo $ac_n "checking build system type""... $ac_c" 1>&6
1114 echo "configure:1115: checking build system type" >&5
1115
1116 build_alias=$build
1117 case "$build_alias" in
1118 NONE)
1119   case $nonopt in
1120   NONE) build_alias=$host_alias ;;
1121   *) build_alias=$nonopt ;;
1122   esac ;;
1123 esac
1124
1125 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1126 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1127 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1128 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1129 echo "$ac_t""$build" 1>&6
1130
1131 test "$host_alias" != "$target_alias" &&
1132   test "$program_prefix$program_suffix$program_transform_name" = \
1133     NONENONEs,x,x, &&
1134   program_prefix=${target_alias}-
1135
1136
1137 ALL_LINGUAS=
1138 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1139 echo "configure:1140: checking whether ${MAKE-make} sets \${MAKE}" >&5
1140 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1141 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1142   echo $ac_n "(cached) $ac_c" 1>&6
1143 else
1144   cat > conftestmake <<\EOF
1145 all:
1146         @echo 'ac_maketemp="${MAKE}"'
1147 EOF
1148 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1149 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1150 if test -n "$ac_maketemp"; then
1151   eval ac_cv_prog_make_${ac_make}_set=yes
1152 else
1153   eval ac_cv_prog_make_${ac_make}_set=no
1154 fi
1155 rm -f conftestmake
1156 fi
1157 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1158   echo "$ac_t""yes" 1>&6
1159   SET_MAKE=
1160 else
1161   echo "$ac_t""no" 1>&6
1162   SET_MAKE="MAKE=${MAKE-make}"
1163 fi
1164
1165 # Extract the first word of "ranlib", so it can be a program name with args.
1166 set dummy ranlib; ac_word=$2
1167 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1168 echo "configure:1169: checking for $ac_word" >&5
1169 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1170   echo $ac_n "(cached) $ac_c" 1>&6
1171 else
1172   if test -n "$RANLIB"; then
1173   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1174 else
1175   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1176   ac_dummy="$PATH"
1177   for ac_dir in $ac_dummy; do
1178     test -z "$ac_dir" && ac_dir=.
1179     if test -f $ac_dir/$ac_word; then
1180       ac_cv_prog_RANLIB="ranlib"
1181       break
1182     fi
1183   done
1184   IFS="$ac_save_ifs"
1185   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1186 fi
1187 fi
1188 RANLIB="$ac_cv_prog_RANLIB"
1189 if test -n "$RANLIB"; then
1190   echo "$ac_t""$RANLIB" 1>&6
1191 else
1192   echo "$ac_t""no" 1>&6
1193 fi
1194
1195 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1196 echo "configure:1197: checking for ANSI C header files" >&5
1197 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1198   echo $ac_n "(cached) $ac_c" 1>&6
1199 else
1200   cat > conftest.$ac_ext <<EOF
1201 #line 1202 "configure"
1202 #include "confdefs.h"
1203 #include <stdlib.h>
1204 #include <stdarg.h>
1205 #include <string.h>
1206 #include <float.h>
1207 EOF
1208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1209 { (eval echo configure:1210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1211 if test -z "$ac_err"; then
1212   rm -rf conftest*
1213   ac_cv_header_stdc=yes
1214 else
1215   echo "$ac_err" >&5
1216   echo "configure: failed program was:" >&5
1217   cat conftest.$ac_ext >&5
1218   rm -rf conftest*
1219   ac_cv_header_stdc=no
1220 fi
1221 rm -f conftest*
1222
1223 if test $ac_cv_header_stdc = yes; then
1224   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1225 cat > conftest.$ac_ext <<EOF
1226 #line 1227 "configure"
1227 #include "confdefs.h"
1228 #include <string.h>
1229 EOF
1230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1231   egrep "memchr" >/dev/null 2>&1; then
1232   :
1233 else
1234   rm -rf conftest*
1235   ac_cv_header_stdc=no
1236 fi
1237 rm -f conftest*
1238
1239 fi
1240
1241 if test $ac_cv_header_stdc = yes; then
1242   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1243 cat > conftest.$ac_ext <<EOF
1244 #line 1245 "configure"
1245 #include "confdefs.h"
1246 #include <stdlib.h>
1247 EOF
1248 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1249   egrep "free" >/dev/null 2>&1; then
1250   :
1251 else
1252   rm -rf conftest*
1253   ac_cv_header_stdc=no
1254 fi
1255 rm -f conftest*
1256
1257 fi
1258
1259 if test $ac_cv_header_stdc = yes; then
1260   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1261 if test "$cross_compiling" = yes; then
1262   :
1263 else
1264   cat > conftest.$ac_ext <<EOF
1265 #line 1266 "configure"
1266 #include "confdefs.h"
1267 #include <ctype.h>
1268 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1269 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1270 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1271 int main () { int i; for (i = 0; i < 256; i++)
1272 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1273 exit (0); }
1274
1275 EOF
1276 if { (eval echo configure:1277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1277 then
1278   :
1279 else
1280   echo "configure: failed program was:" >&5
1281   cat conftest.$ac_ext >&5
1282   rm -fr conftest*
1283   ac_cv_header_stdc=no
1284 fi
1285 rm -fr conftest*
1286 fi
1287
1288 fi
1289 fi
1290
1291 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1292 if test $ac_cv_header_stdc = yes; then
1293   cat >> confdefs.h <<\EOF
1294 #define STDC_HEADERS 1
1295 EOF
1296
1297 fi
1298
1299 echo $ac_n "checking for working const""... $ac_c" 1>&6
1300 echo "configure:1301: checking for working const" >&5
1301 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1302   echo $ac_n "(cached) $ac_c" 1>&6
1303 else
1304   cat > conftest.$ac_ext <<EOF
1305 #line 1306 "configure"
1306 #include "confdefs.h"
1307
1308 int main() {
1309
1310 /* Ultrix mips cc rejects this.  */
1311 typedef int charset[2]; const charset x;
1312 /* SunOS 4.1.1 cc rejects this.  */
1313 char const *const *ccp;
1314 char **p;
1315 /* NEC SVR4.0.2 mips cc rejects this.  */
1316 struct point {int x, y;};
1317 static struct point const zero = {0,0};
1318 /* AIX XL C 1.02.0.0 rejects this.
1319    It does not let you subtract one const X* pointer from another in an arm
1320    of an if-expression whose if-part is not a constant expression */
1321 const char *g = "string";
1322 ccp = &g + (g ? g-g : 0);
1323 /* HPUX 7.0 cc rejects these. */
1324 ++ccp;
1325 p = (char**) ccp;
1326 ccp = (char const *const *) p;
1327 { /* SCO 3.2v4 cc rejects this.  */
1328   char *t;
1329   char const *s = 0 ? (char *) 0 : (char const *) 0;
1330
1331   *t++ = 0;
1332 }
1333 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1334   int x[] = {25, 17};
1335   const int *foo = &x[0];
1336   ++foo;
1337 }
1338 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1339   typedef const int *iptr;
1340   iptr p = 0;
1341   ++p;
1342 }
1343 { /* AIX XL C 1.02.0.0 rejects this saying
1344      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1345   struct s { int j; const int *ap[3]; };
1346   struct s *b; b->j = 5;
1347 }
1348 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1349   const int foo = 10;
1350 }
1351
1352 ; return 0; }
1353 EOF
1354 if { (eval echo configure:1355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1355   rm -rf conftest*
1356   ac_cv_c_const=yes
1357 else
1358   echo "configure: failed program was:" >&5
1359   cat conftest.$ac_ext >&5
1360   rm -rf conftest*
1361   ac_cv_c_const=no
1362 fi
1363 rm -f conftest*
1364 fi
1365
1366 echo "$ac_t""$ac_cv_c_const" 1>&6
1367 if test $ac_cv_c_const = no; then
1368   cat >> confdefs.h <<\EOF
1369 #define const 
1370 EOF
1371
1372 fi
1373
1374 echo $ac_n "checking for inline""... $ac_c" 1>&6
1375 echo "configure:1376: checking for inline" >&5
1376 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1377   echo $ac_n "(cached) $ac_c" 1>&6
1378 else
1379   ac_cv_c_inline=no
1380 for ac_kw in inline __inline__ __inline; do
1381   cat > conftest.$ac_ext <<EOF
1382 #line 1383 "configure"
1383 #include "confdefs.h"
1384
1385 int main() {
1386 } $ac_kw foo() {
1387 ; return 0; }
1388 EOF
1389 if { (eval echo configure:1390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1390   rm -rf conftest*
1391   ac_cv_c_inline=$ac_kw; break
1392 else
1393   echo "configure: failed program was:" >&5
1394   cat conftest.$ac_ext >&5
1395 fi
1396 rm -f conftest*
1397 done
1398
1399 fi
1400
1401 echo "$ac_t""$ac_cv_c_inline" 1>&6
1402 case "$ac_cv_c_inline" in
1403   inline | yes) ;;
1404   no) cat >> confdefs.h <<\EOF
1405 #define inline 
1406 EOF
1407  ;;
1408   *)  cat >> confdefs.h <<EOF
1409 #define inline $ac_cv_c_inline
1410 EOF
1411  ;;
1412 esac
1413
1414 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1415 echo "configure:1416: checking for off_t" >&5
1416 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1417   echo $ac_n "(cached) $ac_c" 1>&6
1418 else
1419   cat > conftest.$ac_ext <<EOF
1420 #line 1421 "configure"
1421 #include "confdefs.h"
1422 #include <sys/types.h>
1423 #if STDC_HEADERS
1424 #include <stdlib.h>
1425 #include <stddef.h>
1426 #endif
1427 EOF
1428 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1429   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1430   rm -rf conftest*
1431   ac_cv_type_off_t=yes
1432 else
1433   rm -rf conftest*
1434   ac_cv_type_off_t=no
1435 fi
1436 rm -f conftest*
1437
1438 fi
1439 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1440 if test $ac_cv_type_off_t = no; then
1441   cat >> confdefs.h <<\EOF
1442 #define off_t long
1443 EOF
1444
1445 fi
1446
1447 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1448 echo "configure:1449: checking for size_t" >&5
1449 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1450   echo $ac_n "(cached) $ac_c" 1>&6
1451 else
1452   cat > conftest.$ac_ext <<EOF
1453 #line 1454 "configure"
1454 #include "confdefs.h"
1455 #include <sys/types.h>
1456 #if STDC_HEADERS
1457 #include <stdlib.h>
1458 #include <stddef.h>
1459 #endif
1460 EOF
1461 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1462   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1463   rm -rf conftest*
1464   ac_cv_type_size_t=yes
1465 else
1466   rm -rf conftest*
1467   ac_cv_type_size_t=no
1468 fi
1469 rm -f conftest*
1470
1471 fi
1472 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1473 if test $ac_cv_type_size_t = no; then
1474   cat >> confdefs.h <<\EOF
1475 #define size_t unsigned
1476 EOF
1477
1478 fi
1479
1480 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1481 # for constant arguments.  Useless!
1482 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1483 echo "configure:1484: checking for working alloca.h" >&5
1484 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1485   echo $ac_n "(cached) $ac_c" 1>&6
1486 else
1487   cat > conftest.$ac_ext <<EOF
1488 #line 1489 "configure"
1489 #include "confdefs.h"
1490 #include <alloca.h>
1491 int main() {
1492 char *p = alloca(2 * sizeof(int));
1493 ; return 0; }
1494 EOF
1495 if { (eval echo configure:1496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1496   rm -rf conftest*
1497   ac_cv_header_alloca_h=yes
1498 else
1499   echo "configure: failed program was:" >&5
1500   cat conftest.$ac_ext >&5
1501   rm -rf conftest*
1502   ac_cv_header_alloca_h=no
1503 fi
1504 rm -f conftest*
1505 fi
1506
1507 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1508 if test $ac_cv_header_alloca_h = yes; then
1509   cat >> confdefs.h <<\EOF
1510 #define HAVE_ALLOCA_H 1
1511 EOF
1512
1513 fi
1514
1515 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1516 echo "configure:1517: checking for alloca" >&5
1517 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1518   echo $ac_n "(cached) $ac_c" 1>&6
1519 else
1520   cat > conftest.$ac_ext <<EOF
1521 #line 1522 "configure"
1522 #include "confdefs.h"
1523
1524 #ifdef __GNUC__
1525 # define alloca __builtin_alloca
1526 #else
1527 # ifdef _MSC_VER
1528 #  include <malloc.h>
1529 #  define alloca _alloca
1530 # else
1531 #  if HAVE_ALLOCA_H
1532 #   include <alloca.h>
1533 #  else
1534 #   ifdef _AIX
1535  #pragma alloca
1536 #   else
1537 #    ifndef alloca /* predefined by HP cc +Olibcalls */
1538 char *alloca ();
1539 #    endif
1540 #   endif
1541 #  endif
1542 # endif
1543 #endif
1544
1545 int main() {
1546 char *p = (char *) alloca(1);
1547 ; return 0; }
1548 EOF
1549 if { (eval echo configure:1550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1550   rm -rf conftest*
1551   ac_cv_func_alloca_works=yes
1552 else
1553   echo "configure: failed program was:" >&5
1554   cat conftest.$ac_ext >&5
1555   rm -rf conftest*
1556   ac_cv_func_alloca_works=no
1557 fi
1558 rm -f conftest*
1559 fi
1560
1561 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1562 if test $ac_cv_func_alloca_works = yes; then
1563   cat >> confdefs.h <<\EOF
1564 #define HAVE_ALLOCA 1
1565 EOF
1566
1567 fi
1568
1569 if test $ac_cv_func_alloca_works = no; then
1570   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1571   # that cause trouble.  Some versions do not even contain alloca or
1572   # contain a buggy version.  If you still want to use their alloca,
1573   # use ar to extract alloca.o from them instead of compiling alloca.c.
1574   ALLOCA=alloca.${ac_objext}
1575   cat >> confdefs.h <<\EOF
1576 #define C_ALLOCA 1
1577 EOF
1578
1579
1580 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1581 echo "configure:1582: checking whether alloca needs Cray hooks" >&5
1582 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1583   echo $ac_n "(cached) $ac_c" 1>&6
1584 else
1585   cat > conftest.$ac_ext <<EOF
1586 #line 1587 "configure"
1587 #include "confdefs.h"
1588 #if defined(CRAY) && ! defined(CRAY2)
1589 webecray
1590 #else
1591 wenotbecray
1592 #endif
1593
1594 EOF
1595 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1596   egrep "webecray" >/dev/null 2>&1; then
1597   rm -rf conftest*
1598   ac_cv_os_cray=yes
1599 else
1600   rm -rf conftest*
1601   ac_cv_os_cray=no
1602 fi
1603 rm -f conftest*
1604
1605 fi
1606
1607 echo "$ac_t""$ac_cv_os_cray" 1>&6
1608 if test $ac_cv_os_cray = yes; then
1609 for ac_func in _getb67 GETB67 getb67; do
1610   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1611 echo "configure:1612: checking for $ac_func" >&5
1612 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1613   echo $ac_n "(cached) $ac_c" 1>&6
1614 else
1615   cat > conftest.$ac_ext <<EOF
1616 #line 1617 "configure"
1617 #include "confdefs.h"
1618 /* System header to define __stub macros and hopefully few prototypes,
1619     which can conflict with char $ac_func(); below.  */
1620 #include <assert.h>
1621 /* Override any gcc2 internal prototype to avoid an error.  */
1622 /* We use char because int might match the return type of a gcc2
1623     builtin and then its argument prototype would still apply.  */
1624 char $ac_func();
1625
1626 int main() {
1627
1628 /* The GNU C library defines this for functions which it implements
1629     to always fail with ENOSYS.  Some functions are actually named
1630     something starting with __ and the normal name is an alias.  */
1631 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1632 choke me
1633 #else
1634 $ac_func();
1635 #endif
1636
1637 ; return 0; }
1638 EOF
1639 if { (eval echo configure:1640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1640   rm -rf conftest*
1641   eval "ac_cv_func_$ac_func=yes"
1642 else
1643   echo "configure: failed program was:" >&5
1644   cat conftest.$ac_ext >&5
1645   rm -rf conftest*
1646   eval "ac_cv_func_$ac_func=no"
1647 fi
1648 rm -f conftest*
1649 fi
1650
1651 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1652   echo "$ac_t""yes" 1>&6
1653   cat >> confdefs.h <<EOF
1654 #define CRAY_STACKSEG_END $ac_func
1655 EOF
1656
1657   break
1658 else
1659   echo "$ac_t""no" 1>&6
1660 fi
1661
1662 done
1663 fi
1664
1665 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1666 echo "configure:1667: checking stack direction for C alloca" >&5
1667 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1668   echo $ac_n "(cached) $ac_c" 1>&6
1669 else
1670   if test "$cross_compiling" = yes; then
1671   ac_cv_c_stack_direction=0
1672 else
1673   cat > conftest.$ac_ext <<EOF
1674 #line 1675 "configure"
1675 #include "confdefs.h"
1676 find_stack_direction ()
1677 {
1678   static char *addr = 0;
1679   auto char dummy;
1680   if (addr == 0)
1681     {
1682       addr = &dummy;
1683       return find_stack_direction ();
1684     }
1685   else
1686     return (&dummy > addr) ? 1 : -1;
1687 }
1688 main ()
1689 {
1690   exit (find_stack_direction() < 0);
1691 }
1692 EOF
1693 if { (eval echo configure:1694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1694 then
1695   ac_cv_c_stack_direction=1
1696 else
1697   echo "configure: failed program was:" >&5
1698   cat conftest.$ac_ext >&5
1699   rm -fr conftest*
1700   ac_cv_c_stack_direction=-1
1701 fi
1702 rm -fr conftest*
1703 fi
1704
1705 fi
1706
1707 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1708 cat >> confdefs.h <<EOF
1709 #define STACK_DIRECTION $ac_cv_c_stack_direction
1710 EOF
1711
1712 fi
1713
1714 for ac_hdr in unistd.h
1715 do
1716 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1717 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1718 echo "configure:1719: checking for $ac_hdr" >&5
1719 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1720   echo $ac_n "(cached) $ac_c" 1>&6
1721 else
1722   cat > conftest.$ac_ext <<EOF
1723 #line 1724 "configure"
1724 #include "confdefs.h"
1725 #include <$ac_hdr>
1726 EOF
1727 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1728 { (eval echo configure:1729: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1729 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1730 if test -z "$ac_err"; then
1731   rm -rf conftest*
1732   eval "ac_cv_header_$ac_safe=yes"
1733 else
1734   echo "$ac_err" >&5
1735   echo "configure: failed program was:" >&5
1736   cat conftest.$ac_ext >&5
1737   rm -rf conftest*
1738   eval "ac_cv_header_$ac_safe=no"
1739 fi
1740 rm -f conftest*
1741 fi
1742 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1743   echo "$ac_t""yes" 1>&6
1744     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1745   cat >> confdefs.h <<EOF
1746 #define $ac_tr_hdr 1
1747 EOF
1748  
1749 else
1750   echo "$ac_t""no" 1>&6
1751 fi
1752 done
1753
1754 for ac_func in getpagesize
1755 do
1756 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1757 echo "configure:1758: checking for $ac_func" >&5
1758 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1759   echo $ac_n "(cached) $ac_c" 1>&6
1760 else
1761   cat > conftest.$ac_ext <<EOF
1762 #line 1763 "configure"
1763 #include "confdefs.h"
1764 /* System header to define __stub macros and hopefully few prototypes,
1765     which can conflict with char $ac_func(); below.  */
1766 #include <assert.h>
1767 /* Override any gcc2 internal prototype to avoid an error.  */
1768 /* We use char because int might match the return type of a gcc2
1769     builtin and then its argument prototype would still apply.  */
1770 char $ac_func();
1771
1772 int main() {
1773
1774 /* The GNU C library defines this for functions which it implements
1775     to always fail with ENOSYS.  Some functions are actually named
1776     something starting with __ and the normal name is an alias.  */
1777 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1778 choke me
1779 #else
1780 $ac_func();
1781 #endif
1782
1783 ; return 0; }
1784 EOF
1785 if { (eval echo configure:1786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1786   rm -rf conftest*
1787   eval "ac_cv_func_$ac_func=yes"
1788 else
1789   echo "configure: failed program was:" >&5
1790   cat conftest.$ac_ext >&5
1791   rm -rf conftest*
1792   eval "ac_cv_func_$ac_func=no"
1793 fi
1794 rm -f conftest*
1795 fi
1796
1797 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1798   echo "$ac_t""yes" 1>&6
1799     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1800   cat >> confdefs.h <<EOF
1801 #define $ac_tr_func 1
1802 EOF
1803  
1804 else
1805   echo "$ac_t""no" 1>&6
1806 fi
1807 done
1808
1809 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1810 echo "configure:1811: checking for working mmap" >&5
1811 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1812   echo $ac_n "(cached) $ac_c" 1>&6
1813 else
1814   if test "$cross_compiling" = yes; then
1815   ac_cv_func_mmap_fixed_mapped=no
1816 else
1817   cat > conftest.$ac_ext <<EOF
1818 #line 1819 "configure"
1819 #include "confdefs.h"
1820
1821 /* Thanks to Mike Haertel and Jim Avera for this test.
1822    Here is a matrix of mmap possibilities:
1823         mmap private not fixed
1824         mmap private fixed at somewhere currently unmapped
1825         mmap private fixed at somewhere already mapped
1826         mmap shared not fixed
1827         mmap shared fixed at somewhere currently unmapped
1828         mmap shared fixed at somewhere already mapped
1829    For private mappings, we should verify that changes cannot be read()
1830    back from the file, nor mmap's back from the file at a different
1831    address.  (There have been systems where private was not correctly
1832    implemented like the infamous i386 svr4.0, and systems where the
1833    VM page cache was not coherent with the filesystem buffer cache
1834    like early versions of FreeBSD and possibly contemporary NetBSD.)
1835    For shared mappings, we should conversely verify that changes get
1836    propogated back to all the places they're supposed to be.
1837
1838    Grep wants private fixed already mapped.
1839    The main things grep needs to know about mmap are:
1840    * does it exist and is it safe to write into the mmap'd area
1841    * how to use it (BSD variants)  */
1842 #include <sys/types.h>
1843 #include <fcntl.h>
1844 #include <sys/mman.h>
1845
1846 /* This mess was copied from the GNU getpagesize.h.  */
1847 #ifndef HAVE_GETPAGESIZE
1848 # ifdef HAVE_UNISTD_H
1849 #  include <unistd.h>
1850 # endif
1851
1852 /* Assume that all systems that can run configure have sys/param.h.  */
1853 # ifndef HAVE_SYS_PARAM_H
1854 #  define HAVE_SYS_PARAM_H 1
1855 # endif
1856
1857 # ifdef _SC_PAGESIZE
1858 #  define getpagesize() sysconf(_SC_PAGESIZE)
1859 # else /* no _SC_PAGESIZE */
1860 #  ifdef HAVE_SYS_PARAM_H
1861 #   include <sys/param.h>
1862 #   ifdef EXEC_PAGESIZE
1863 #    define getpagesize() EXEC_PAGESIZE
1864 #   else /* no EXEC_PAGESIZE */
1865 #    ifdef NBPG
1866 #     define getpagesize() NBPG * CLSIZE
1867 #     ifndef CLSIZE
1868 #      define CLSIZE 1
1869 #     endif /* no CLSIZE */
1870 #    else /* no NBPG */
1871 #     ifdef NBPC
1872 #      define getpagesize() NBPC
1873 #     else /* no NBPC */
1874 #      ifdef PAGESIZE
1875 #       define getpagesize() PAGESIZE
1876 #      endif /* PAGESIZE */
1877 #     endif /* no NBPC */
1878 #    endif /* no NBPG */
1879 #   endif /* no EXEC_PAGESIZE */
1880 #  else /* no HAVE_SYS_PARAM_H */
1881 #   define getpagesize() 8192   /* punt totally */
1882 #  endif /* no HAVE_SYS_PARAM_H */
1883 # endif /* no _SC_PAGESIZE */
1884
1885 #endif /* no HAVE_GETPAGESIZE */
1886
1887 #ifdef __cplusplus
1888 extern "C" { void *malloc(unsigned); }
1889 #else
1890 char *malloc();
1891 #endif
1892
1893 int
1894 main()
1895 {
1896         char *data, *data2, *data3;
1897         int i, pagesize;
1898         int fd;
1899
1900         pagesize = getpagesize();
1901
1902         /*
1903          * First, make a file with some known garbage in it.
1904          */
1905         data = malloc(pagesize);
1906         if (!data)
1907                 exit(1);
1908         for (i = 0; i < pagesize; ++i)
1909                 *(data + i) = rand();
1910         umask(0);
1911         fd = creat("conftestmmap", 0600);
1912         if (fd < 0)
1913                 exit(1);
1914         if (write(fd, data, pagesize) != pagesize)
1915                 exit(1);
1916         close(fd);
1917
1918         /*
1919          * Next, try to mmap the file at a fixed address which
1920          * already has something else allocated at it.  If we can,
1921          * also make sure that we see the same garbage.
1922          */
1923         fd = open("conftestmmap", O_RDWR);
1924         if (fd < 0)
1925                 exit(1);
1926         data2 = malloc(2 * pagesize);
1927         if (!data2)
1928                 exit(1);
1929         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
1930         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
1931             MAP_PRIVATE | MAP_FIXED, fd, 0L))
1932                 exit(1);
1933         for (i = 0; i < pagesize; ++i)
1934                 if (*(data + i) != *(data2 + i))
1935                         exit(1);
1936
1937         /*
1938          * Finally, make sure that changes to the mapped area
1939          * do not percolate back to the file as seen by read().
1940          * (This is a bug on some variants of i386 svr4.0.)
1941          */
1942         for (i = 0; i < pagesize; ++i)
1943                 *(data2 + i) = *(data2 + i) + 1;
1944         data3 = malloc(pagesize);
1945         if (!data3)
1946                 exit(1);
1947         if (read(fd, data3, pagesize) != pagesize)
1948                 exit(1);
1949         for (i = 0; i < pagesize; ++i)
1950                 if (*(data + i) != *(data3 + i))
1951                         exit(1);
1952         close(fd);
1953         unlink("conftestmmap");
1954         exit(0);
1955 }
1956
1957 EOF
1958 if { (eval echo configure:1959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1959 then
1960   ac_cv_func_mmap_fixed_mapped=yes
1961 else
1962   echo "configure: failed program was:" >&5
1963   cat conftest.$ac_ext >&5
1964   rm -fr conftest*
1965   ac_cv_func_mmap_fixed_mapped=no
1966 fi
1967 rm -fr conftest*
1968 fi
1969
1970 fi
1971
1972 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
1973 if test $ac_cv_func_mmap_fixed_mapped = yes; then
1974   cat >> confdefs.h <<\EOF
1975 #define HAVE_MMAP 1
1976 EOF
1977
1978 fi
1979
1980                               
1981    for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
1982 unistd.h values.h sys/param.h
1983 do
1984 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1985 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1986 echo "configure:1987: checking for $ac_hdr" >&5
1987 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1988   echo $ac_n "(cached) $ac_c" 1>&6
1989 else
1990   cat > conftest.$ac_ext <<EOF
1991 #line 1992 "configure"
1992 #include "confdefs.h"
1993 #include <$ac_hdr>
1994 EOF
1995 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1996 { (eval echo configure:1997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1997 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1998 if test -z "$ac_err"; then
1999   rm -rf conftest*
2000   eval "ac_cv_header_$ac_safe=yes"
2001 else
2002   echo "$ac_err" >&5
2003   echo "configure: failed program was:" >&5
2004   cat conftest.$ac_ext >&5
2005   rm -rf conftest*
2006   eval "ac_cv_header_$ac_safe=no"
2007 fi
2008 rm -f conftest*
2009 fi
2010 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2011   echo "$ac_t""yes" 1>&6
2012     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2013   cat >> confdefs.h <<EOF
2014 #define $ac_tr_hdr 1
2015 EOF
2016  
2017 else
2018   echo "$ac_t""no" 1>&6
2019 fi
2020 done
2021
2022    for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
2023 __argz_count __argz_stringify __argz_next
2024 do
2025 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2026 echo "configure:2027: checking for $ac_func" >&5
2027 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2028   echo $ac_n "(cached) $ac_c" 1>&6
2029 else
2030   cat > conftest.$ac_ext <<EOF
2031 #line 2032 "configure"
2032 #include "confdefs.h"
2033 /* System header to define __stub macros and hopefully few prototypes,
2034     which can conflict with char $ac_func(); below.  */
2035 #include <assert.h>
2036 /* Override any gcc2 internal prototype to avoid an error.  */
2037 /* We use char because int might match the return type of a gcc2
2038     builtin and then its argument prototype would still apply.  */
2039 char $ac_func();
2040
2041 int main() {
2042
2043 /* The GNU C library defines this for functions which it implements
2044     to always fail with ENOSYS.  Some functions are actually named
2045     something starting with __ and the normal name is an alias.  */
2046 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2047 choke me
2048 #else
2049 $ac_func();
2050 #endif
2051
2052 ; return 0; }
2053 EOF
2054 if { (eval echo configure:2055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2055   rm -rf conftest*
2056   eval "ac_cv_func_$ac_func=yes"
2057 else
2058   echo "configure: failed program was:" >&5
2059   cat conftest.$ac_ext >&5
2060   rm -rf conftest*
2061   eval "ac_cv_func_$ac_func=no"
2062 fi
2063 rm -f conftest*
2064 fi
2065
2066 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2067   echo "$ac_t""yes" 1>&6
2068     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2069   cat >> confdefs.h <<EOF
2070 #define $ac_tr_func 1
2071 EOF
2072  
2073 else
2074   echo "$ac_t""no" 1>&6
2075 fi
2076 done
2077
2078
2079    if test "${ac_cv_func_stpcpy+set}" != "set"; then
2080      for ac_func in stpcpy
2081 do
2082 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2083 echo "configure:2084: checking for $ac_func" >&5
2084 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2085   echo $ac_n "(cached) $ac_c" 1>&6
2086 else
2087   cat > conftest.$ac_ext <<EOF
2088 #line 2089 "configure"
2089 #include "confdefs.h"
2090 /* System header to define __stub macros and hopefully few prototypes,
2091     which can conflict with char $ac_func(); below.  */
2092 #include <assert.h>
2093 /* Override any gcc2 internal prototype to avoid an error.  */
2094 /* We use char because int might match the return type of a gcc2
2095     builtin and then its argument prototype would still apply.  */
2096 char $ac_func();
2097
2098 int main() {
2099
2100 /* The GNU C library defines this for functions which it implements
2101     to always fail with ENOSYS.  Some functions are actually named
2102     something starting with __ and the normal name is an alias.  */
2103 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2104 choke me
2105 #else
2106 $ac_func();
2107 #endif
2108
2109 ; return 0; }
2110 EOF
2111 if { (eval echo configure:2112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2112   rm -rf conftest*
2113   eval "ac_cv_func_$ac_func=yes"
2114 else
2115   echo "configure: failed program was:" >&5
2116   cat conftest.$ac_ext >&5
2117   rm -rf conftest*
2118   eval "ac_cv_func_$ac_func=no"
2119 fi
2120 rm -f conftest*
2121 fi
2122
2123 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2124   echo "$ac_t""yes" 1>&6
2125     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2126   cat >> confdefs.h <<EOF
2127 #define $ac_tr_func 1
2128 EOF
2129  
2130 else
2131   echo "$ac_t""no" 1>&6
2132 fi
2133 done
2134
2135    fi
2136    if test "${ac_cv_func_stpcpy}" = "yes"; then
2137      cat >> confdefs.h <<\EOF
2138 #define HAVE_STPCPY 1
2139 EOF
2140
2141    fi
2142
2143    if test $ac_cv_header_locale_h = yes; then
2144     echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2145 echo "configure:2146: checking for LC_MESSAGES" >&5
2146 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2147   echo $ac_n "(cached) $ac_c" 1>&6
2148 else
2149   cat > conftest.$ac_ext <<EOF
2150 #line 2151 "configure"
2151 #include "confdefs.h"
2152 #include <locale.h>
2153 int main() {
2154 return LC_MESSAGES
2155 ; return 0; }
2156 EOF
2157 if { (eval echo configure:2158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2158   rm -rf conftest*
2159   am_cv_val_LC_MESSAGES=yes
2160 else
2161   echo "configure: failed program was:" >&5
2162   cat conftest.$ac_ext >&5
2163   rm -rf conftest*
2164   am_cv_val_LC_MESSAGES=no
2165 fi
2166 rm -f conftest*
2167 fi
2168
2169 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2170     if test $am_cv_val_LC_MESSAGES = yes; then
2171       cat >> confdefs.h <<\EOF
2172 #define HAVE_LC_MESSAGES 1
2173 EOF
2174
2175     fi
2176   fi
2177    echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2178 echo "configure:2179: checking whether NLS is requested" >&5
2179         # Check whether --enable-nls or --disable-nls was given.
2180 if test "${enable_nls+set}" = set; then
2181   enableval="$enable_nls"
2182   USE_NLS=$enableval
2183 else
2184   USE_NLS=yes
2185 fi
2186
2187     echo "$ac_t""$USE_NLS" 1>&6
2188     
2189
2190     USE_INCLUDED_LIBINTL=no
2191
2192         if test "$USE_NLS" = "yes"; then
2193       cat >> confdefs.h <<\EOF
2194 #define ENABLE_NLS 1
2195 EOF
2196
2197       echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2198 echo "configure:2199: checking whether included gettext is requested" >&5
2199       # Check whether --with-included-gettext or --without-included-gettext was given.
2200 if test "${with_included_gettext+set}" = set; then
2201   withval="$with_included_gettext"
2202   nls_cv_force_use_gnu_gettext=$withval
2203 else
2204   nls_cv_force_use_gnu_gettext=no
2205 fi
2206
2207       echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2208
2209       nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2210       if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2211                                         nls_cv_header_intl=
2212         nls_cv_header_libgt=
2213         CATOBJEXT=NONE
2214
2215         ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2216 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2217 echo "configure:2218: checking for libintl.h" >&5
2218 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2219   echo $ac_n "(cached) $ac_c" 1>&6
2220 else
2221   cat > conftest.$ac_ext <<EOF
2222 #line 2223 "configure"
2223 #include "confdefs.h"
2224 #include <libintl.h>
2225 EOF
2226 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2227 { (eval echo configure:2228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2228 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2229 if test -z "$ac_err"; then
2230   rm -rf conftest*
2231   eval "ac_cv_header_$ac_safe=yes"
2232 else
2233   echo "$ac_err" >&5
2234   echo "configure: failed program was:" >&5
2235   cat conftest.$ac_ext >&5
2236   rm -rf conftest*
2237   eval "ac_cv_header_$ac_safe=no"
2238 fi
2239 rm -f conftest*
2240 fi
2241 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2242   echo "$ac_t""yes" 1>&6
2243   echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
2244 echo "configure:2245: checking for gettext in libc" >&5
2245 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2246   echo $ac_n "(cached) $ac_c" 1>&6
2247 else
2248   cat > conftest.$ac_ext <<EOF
2249 #line 2250 "configure"
2250 #include "confdefs.h"
2251 #include <libintl.h>
2252 int main() {
2253 return (int) gettext ("")
2254 ; return 0; }
2255 EOF
2256 if { (eval echo configure:2257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2257   rm -rf conftest*
2258   gt_cv_func_gettext_libc=yes
2259 else
2260   echo "configure: failed program was:" >&5
2261   cat conftest.$ac_ext >&5
2262   rm -rf conftest*
2263   gt_cv_func_gettext_libc=no
2264 fi
2265 rm -f conftest*
2266 fi
2267
2268 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2269
2270            if test "$gt_cv_func_gettext_libc" != "yes"; then
2271              echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
2272 echo "configure:2273: checking for bindtextdomain in -lintl" >&5
2273 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2274 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2275   echo $ac_n "(cached) $ac_c" 1>&6
2276 else
2277   ac_save_LIBS="$LIBS"
2278 LIBS="-lintl  $LIBS"
2279 cat > conftest.$ac_ext <<EOF
2280 #line 2281 "configure"
2281 #include "confdefs.h"
2282 /* Override any gcc2 internal prototype to avoid an error.  */
2283 /* We use char because int might match the return type of a gcc2
2284     builtin and then its argument prototype would still apply.  */
2285 char bindtextdomain();
2286
2287 int main() {
2288 bindtextdomain()
2289 ; return 0; }
2290 EOF
2291 if { (eval echo configure:2292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2292   rm -rf conftest*
2293   eval "ac_cv_lib_$ac_lib_var=yes"
2294 else
2295   echo "configure: failed program was:" >&5
2296   cat conftest.$ac_ext >&5
2297   rm -rf conftest*
2298   eval "ac_cv_lib_$ac_lib_var=no"
2299 fi
2300 rm -f conftest*
2301 LIBS="$ac_save_LIBS"
2302
2303 fi
2304 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2305   echo "$ac_t""yes" 1>&6
2306   echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
2307 echo "configure:2308: checking for gettext in libintl" >&5
2308 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2309   echo $ac_n "(cached) $ac_c" 1>&6
2310 else
2311   cat > conftest.$ac_ext <<EOF
2312 #line 2313 "configure"
2313 #include "confdefs.h"
2314
2315 int main() {
2316 return (int) gettext ("")
2317 ; return 0; }
2318 EOF
2319 if { (eval echo configure:2320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2320   rm -rf conftest*
2321   gt_cv_func_gettext_libintl=yes
2322 else
2323   echo "configure: failed program was:" >&5
2324   cat conftest.$ac_ext >&5
2325   rm -rf conftest*
2326   gt_cv_func_gettext_libintl=no
2327 fi
2328 rm -f conftest*
2329 fi
2330
2331 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2332 else
2333   echo "$ac_t""no" 1>&6
2334 fi
2335
2336            fi
2337
2338            if test "$gt_cv_func_gettext_libc" = "yes" \
2339               || test "$gt_cv_func_gettext_libintl" = "yes"; then
2340               cat >> confdefs.h <<\EOF
2341 #define HAVE_GETTEXT 1
2342 EOF
2343
2344               # Extract the first word of "msgfmt", so it can be a program name with args.
2345 set dummy msgfmt; ac_word=$2
2346 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2347 echo "configure:2348: checking for $ac_word" >&5
2348 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2349   echo $ac_n "(cached) $ac_c" 1>&6
2350 else
2351   case "$MSGFMT" in
2352   /*)
2353   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2354   ;;
2355   *)
2356   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2357   for ac_dir in $PATH; do
2358     test -z "$ac_dir" && ac_dir=.
2359     if test -f $ac_dir/$ac_word; then
2360       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2361         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2362         break
2363       fi
2364     fi
2365   done
2366   IFS="$ac_save_ifs"
2367   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2368   ;;
2369 esac
2370 fi
2371 MSGFMT="$ac_cv_path_MSGFMT"
2372 if test -n "$MSGFMT"; then
2373   echo "$ac_t""$MSGFMT" 1>&6
2374 else
2375   echo "$ac_t""no" 1>&6
2376 fi
2377               if test "$MSGFMT" != "no"; then
2378                 for ac_func in dcgettext
2379 do
2380 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2381 echo "configure:2382: checking for $ac_func" >&5
2382 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2383   echo $ac_n "(cached) $ac_c" 1>&6
2384 else
2385   cat > conftest.$ac_ext <<EOF
2386 #line 2387 "configure"
2387 #include "confdefs.h"
2388 /* System header to define __stub macros and hopefully few prototypes,
2389     which can conflict with char $ac_func(); below.  */
2390 #include <assert.h>
2391 /* Override any gcc2 internal prototype to avoid an error.  */
2392 /* We use char because int might match the return type of a gcc2
2393     builtin and then its argument prototype would still apply.  */
2394 char $ac_func();
2395
2396 int main() {
2397
2398 /* The GNU C library defines this for functions which it implements
2399     to always fail with ENOSYS.  Some functions are actually named
2400     something starting with __ and the normal name is an alias.  */
2401 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2402 choke me
2403 #else
2404 $ac_func();
2405 #endif
2406
2407 ; return 0; }
2408 EOF
2409 if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2410   rm -rf conftest*
2411   eval "ac_cv_func_$ac_func=yes"
2412 else
2413   echo "configure: failed program was:" >&5
2414   cat conftest.$ac_ext >&5
2415   rm -rf conftest*
2416   eval "ac_cv_func_$ac_func=no"
2417 fi
2418 rm -f conftest*
2419 fi
2420
2421 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2422   echo "$ac_t""yes" 1>&6
2423     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2424   cat >> confdefs.h <<EOF
2425 #define $ac_tr_func 1
2426 EOF
2427  
2428 else
2429   echo "$ac_t""no" 1>&6
2430 fi
2431 done
2432
2433                 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2434 set dummy gmsgfmt; ac_word=$2
2435 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2436 echo "configure:2437: checking for $ac_word" >&5
2437 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2438   echo $ac_n "(cached) $ac_c" 1>&6
2439 else
2440   case "$GMSGFMT" in
2441   /*)
2442   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2443   ;;
2444   ?:/*)                  
2445   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2446   ;;
2447   *)
2448   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2449   ac_dummy="$PATH"
2450   for ac_dir in $ac_dummy; do 
2451     test -z "$ac_dir" && ac_dir=.
2452     if test -f $ac_dir/$ac_word; then
2453       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2454       break
2455     fi
2456   done
2457   IFS="$ac_save_ifs"
2458   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2459   ;;
2460 esac
2461 fi
2462 GMSGFMT="$ac_cv_path_GMSGFMT"
2463 if test -n "$GMSGFMT"; then
2464   echo "$ac_t""$GMSGFMT" 1>&6
2465 else
2466   echo "$ac_t""no" 1>&6
2467 fi
2468
2469                 # Extract the first word of "xgettext", so it can be a program name with args.
2470 set dummy xgettext; ac_word=$2
2471 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2472 echo "configure:2473: checking for $ac_word" >&5
2473 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2474   echo $ac_n "(cached) $ac_c" 1>&6
2475 else
2476   case "$XGETTEXT" in
2477   /*)
2478   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2479   ;;
2480   *)
2481   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2482   for ac_dir in $PATH; do
2483     test -z "$ac_dir" && ac_dir=.
2484     if test -f $ac_dir/$ac_word; then
2485       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2486         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2487         break
2488       fi
2489     fi
2490   done
2491   IFS="$ac_save_ifs"
2492   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2493   ;;
2494 esac
2495 fi
2496 XGETTEXT="$ac_cv_path_XGETTEXT"
2497 if test -n "$XGETTEXT"; then
2498   echo "$ac_t""$XGETTEXT" 1>&6
2499 else
2500   echo "$ac_t""no" 1>&6
2501 fi
2502
2503                 cat > conftest.$ac_ext <<EOF
2504 #line 2505 "configure"
2505 #include "confdefs.h"
2506
2507 int main() {
2508 extern int _nl_msg_cat_cntr;
2509                                return _nl_msg_cat_cntr
2510 ; return 0; }
2511 EOF
2512 if { (eval echo configure:2513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2513   rm -rf conftest*
2514   CATOBJEXT=.gmo
2515                    DATADIRNAME=share
2516 else
2517   echo "configure: failed program was:" >&5
2518   cat conftest.$ac_ext >&5
2519   rm -rf conftest*
2520   CATOBJEXT=.mo
2521                    DATADIRNAME=lib
2522 fi
2523 rm -f conftest*
2524                 INSTOBJEXT=.mo
2525               fi
2526             fi
2527         
2528 else
2529   echo "$ac_t""no" 1>&6
2530 fi
2531
2532
2533                 
2534         if test "$CATOBJEXT" = "NONE"; then
2535                           nls_cv_use_gnu_gettext=yes
2536         fi
2537       fi
2538
2539       if test "$nls_cv_use_gnu_gettext" = "yes"; then
2540                 INTLOBJS="\$(GETTOBJS)"
2541         # Extract the first word of "msgfmt", so it can be a program name with args.
2542 set dummy msgfmt; ac_word=$2
2543 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2544 echo "configure:2545: checking for $ac_word" >&5
2545 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2546   echo $ac_n "(cached) $ac_c" 1>&6
2547 else
2548   case "$MSGFMT" in
2549   /*)
2550   ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2551   ;;
2552   *)
2553   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2554   for ac_dir in $PATH; do
2555     test -z "$ac_dir" && ac_dir=.
2556     if test -f $ac_dir/$ac_word; then
2557       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2558         ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2559         break
2560       fi
2561     fi
2562   done
2563   IFS="$ac_save_ifs"
2564   test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2565   ;;
2566 esac
2567 fi
2568 MSGFMT="$ac_cv_path_MSGFMT"
2569 if test -n "$MSGFMT"; then
2570   echo "$ac_t""$MSGFMT" 1>&6
2571 else
2572   echo "$ac_t""no" 1>&6
2573 fi
2574
2575         # Extract the first word of "gmsgfmt", so it can be a program name with args.
2576 set dummy gmsgfmt; ac_word=$2
2577 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2578 echo "configure:2579: checking for $ac_word" >&5
2579 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2580   echo $ac_n "(cached) $ac_c" 1>&6
2581 else
2582   case "$GMSGFMT" in
2583   /*)
2584   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2585   ;;
2586   ?:/*)                  
2587   ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2588   ;;
2589   *)
2590   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2591   ac_dummy="$PATH"
2592   for ac_dir in $ac_dummy; do 
2593     test -z "$ac_dir" && ac_dir=.
2594     if test -f $ac_dir/$ac_word; then
2595       ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2596       break
2597     fi
2598   done
2599   IFS="$ac_save_ifs"
2600   test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2601   ;;
2602 esac
2603 fi
2604 GMSGFMT="$ac_cv_path_GMSGFMT"
2605 if test -n "$GMSGFMT"; then
2606   echo "$ac_t""$GMSGFMT" 1>&6
2607 else
2608   echo "$ac_t""no" 1>&6
2609 fi
2610
2611         # Extract the first word of "xgettext", so it can be a program name with args.
2612 set dummy xgettext; ac_word=$2
2613 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2614 echo "configure:2615: checking for $ac_word" >&5
2615 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2616   echo $ac_n "(cached) $ac_c" 1>&6
2617 else
2618   case "$XGETTEXT" in
2619   /*)
2620   ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2621   ;;
2622   *)
2623   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2624   for ac_dir in $PATH; do
2625     test -z "$ac_dir" && ac_dir=.
2626     if test -f $ac_dir/$ac_word; then
2627       if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2628         ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2629         break
2630       fi
2631     fi
2632   done
2633   IFS="$ac_save_ifs"
2634   test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2635   ;;
2636 esac
2637 fi
2638 XGETTEXT="$ac_cv_path_XGETTEXT"
2639 if test -n "$XGETTEXT"; then
2640   echo "$ac_t""$XGETTEXT" 1>&6
2641 else
2642   echo "$ac_t""no" 1>&6
2643 fi
2644
2645         
2646         USE_INCLUDED_LIBINTL=yes
2647         CATOBJEXT=.gmo
2648         INSTOBJEXT=.mo
2649         DATADIRNAME=share
2650         INTLDEPS='$(top_builddir)/../intl/libintl.a'
2651         INTLLIBS=$INTLDEPS
2652         LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2653         nls_cv_header_intl=libintl.h
2654         nls_cv_header_libgt=libgettext.h
2655       fi
2656
2657             if test "$XGETTEXT" != ":"; then
2658                         if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2659           : ;
2660         else
2661           echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2662           XGETTEXT=":"
2663         fi
2664       fi
2665
2666       # We need to process the po/ directory.
2667       POSUB=po
2668     else
2669       DATADIRNAME=share
2670       nls_cv_header_intl=libintl.h
2671       nls_cv_header_libgt=libgettext.h
2672     fi
2673
2674     # If this is used in GNU gettext we have to set USE_NLS to `yes'
2675     # because some of the sources are only built for this goal.
2676     if test "$PACKAGE" = gettext; then
2677       USE_NLS=yes
2678       USE_INCLUDED_LIBINTL=yes
2679     fi
2680
2681                 for lang in $ALL_LINGUAS; do
2682       GMOFILES="$GMOFILES $lang.gmo"
2683       POFILES="$POFILES $lang.po"
2684     done
2685
2686         
2687     
2688     
2689     
2690     
2691     
2692     
2693     
2694     
2695     
2696     
2697   
2698
2699    if test "x$CATOBJEXT" != "x"; then
2700      if test "x$ALL_LINGUAS" = "x"; then
2701        LINGUAS=
2702      else
2703        echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2704 echo "configure:2705: checking for catalogs to be installed" >&5
2705        NEW_LINGUAS=
2706        for lang in ${LINGUAS=$ALL_LINGUAS}; do
2707          case "$ALL_LINGUAS" in
2708           *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2709          esac
2710        done
2711        LINGUAS=$NEW_LINGUAS
2712        echo "$ac_t""$LINGUAS" 1>&6
2713      fi
2714
2715           if test -n "$LINGUAS"; then
2716        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2717      fi
2718    fi
2719
2720             if test $ac_cv_header_locale_h = yes; then
2721      INCLUDE_LOCALE_H="#include <locale.h>"
2722    else
2723      INCLUDE_LOCALE_H="\
2724 /* The system does not provide the header <locale.h>.  Take care yourself.  */"
2725    fi
2726    
2727
2728             if test -f $srcdir/po2tbl.sed.in; then
2729       if test "$CATOBJEXT" = ".cat"; then
2730          ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2731 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
2732 echo "configure:2733: checking for linux/version.h" >&5
2733 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2734   echo $ac_n "(cached) $ac_c" 1>&6
2735 else
2736   cat > conftest.$ac_ext <<EOF
2737 #line 2738 "configure"
2738 #include "confdefs.h"
2739 #include <linux/version.h>
2740 EOF
2741 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2742 { (eval echo configure:2743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2743 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2744 if test -z "$ac_err"; then
2745   rm -rf conftest*
2746   eval "ac_cv_header_$ac_safe=yes"
2747 else
2748   echo "$ac_err" >&5
2749   echo "configure: failed program was:" >&5
2750   cat conftest.$ac_ext >&5
2751   rm -rf conftest*
2752   eval "ac_cv_header_$ac_safe=no"
2753 fi
2754 rm -f conftest*
2755 fi
2756 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2757   echo "$ac_t""yes" 1>&6
2758   msgformat=linux
2759 else
2760   echo "$ac_t""no" 1>&6
2761 msgformat=xopen
2762 fi
2763
2764
2765                          sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2766       fi
2767             sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2768          $srcdir/po2tbl.sed.in > po2tbl.sed
2769    fi
2770
2771             if test "$PACKAGE" = "gettext"; then
2772      GT_NO="#NO#"
2773      GT_YES=
2774    else
2775      GT_NO=
2776      GT_YES="#YES#"
2777    fi
2778    
2779    
2780
2781    MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2782    
2783
2784       l=
2785    
2786
2787             if test -d $srcdir/po; then
2788       test -d po || mkdir po
2789       if test "x$srcdir" != "x."; then
2790          if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2791             posrcprefix="$srcdir/"
2792          else
2793             posrcprefix="../$srcdir/"
2794          fi
2795       else
2796          posrcprefix="../"
2797       fi
2798       rm -f po/POTFILES
2799       sed -e "/^#/d" -e "/^\$/d" -e "s,.*,      $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2800          < $srcdir/po/POTFILES.in > po/POTFILES
2801    fi
2802   
2803
2804
2805 CONFIG_OBS=
2806 CONFIG_LIB_OBS=
2807 CONFIG_DEPS=
2808 CONFIG_SRCS=
2809 CONFIG_INITS=
2810 ENABLE_CFLAGS=
2811 CONFIG_ALL=
2812 CONFIG_CLEAN=
2813 CONFIG_INSTALL=
2814 CONFIG_UNINSTALL=
2815
2816 configdirs="doc testsuite"
2817
2818 # Check whether --enable-multi-ice or --disable-multi-ice was given.
2819 if test "${enable_multi_ice+set}" = set; then
2820   enableval="$enable_multi_ice"
2821   case "${enableval}" in
2822     yes ) enable_multi_ice="yes" ;;
2823     no)  enable_multi_ice="no" ;;
2824     *) { echo "configure: error: Bad value for --enable-multi-ice: ${enableval}" 1>&2; exit 1; } ;;
2825   esac
2826
2827 fi
2828
2829
2830 if test "${enable_multi_ice}" = "yes"; then
2831   configdirs="${configdirs} multi-ice"
2832 fi
2833
2834
2835 . ${srcdir}/configure.host
2836
2837 . ${srcdir}/configure.tgt
2838
2839 targ=${target} ; . ${srcdir}/../bfd/config.bfd
2840
2841
2842 targ=${target}
2843 . ${srcdir}/../bfd/config.bfd
2844
2845 targ_archs=`echo ${targ_archs} | sed -e 's/ .*//;'`
2846
2847 if test x"${targ_archs}" != x ; then
2848     cat >> confdefs.h <<EOF
2849 #define DEFAULT_BFD_ARCH ${targ_archs}
2850 EOF
2851
2852 fi
2853 if test x"${targ_defvec}" != x ; then
2854     cat >> confdefs.h <<EOF
2855 #define DEFAULT_BFD_VEC ${targ_defvec}
2856 EOF
2857
2858 fi
2859
2860 for ac_prog in gawk mawk nawk awk
2861 do
2862 # Extract the first word of "$ac_prog", so it can be a program name with args.
2863 set dummy $ac_prog; ac_word=$2
2864 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2865 echo "configure:2866: checking for $ac_word" >&5
2866 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
2867   echo $ac_n "(cached) $ac_c" 1>&6
2868 else
2869   if test -n "$AWK"; then
2870   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2871 else
2872   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2873   ac_dummy="$PATH"
2874   for ac_dir in $ac_dummy; do
2875     test -z "$ac_dir" && ac_dir=.
2876     if test -f $ac_dir/$ac_word; then
2877       ac_cv_prog_AWK="$ac_prog"
2878       break
2879     fi
2880   done
2881   IFS="$ac_save_ifs"
2882 fi
2883 fi
2884 AWK="$ac_cv_prog_AWK"
2885 if test -n "$AWK"; then
2886   echo "$ac_t""$AWK" 1>&6
2887 else
2888   echo "$ac_t""no" 1>&6
2889 fi
2890
2891 test -n "$AWK" && break
2892 done
2893
2894 # Find a good install program.  We prefer a C program (faster),
2895 # so one script is as good as another.  But avoid the broken or
2896 # incompatible versions:
2897 # SysV /etc/install, /usr/sbin/install
2898 # SunOS /usr/etc/install
2899 # IRIX /sbin/install
2900 # AIX /bin/install
2901 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2902 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2903 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2904 # ./install, which can be erroneously created by make from ./install.sh.
2905 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2906 echo "configure:2907: checking for a BSD compatible install" >&5
2907 if test -z "$INSTALL"; then
2908 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2909   echo $ac_n "(cached) $ac_c" 1>&6
2910 else
2911     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2912   for ac_dir in $PATH; do
2913     # Account for people who put trailing slashes in PATH elements.
2914     case "$ac_dir/" in
2915     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2916     *)
2917       # OSF1 and SCO ODT 3.0 have their own names for install.
2918       # Don't use installbsd from OSF since it installs stuff as root
2919       # by default.
2920       for ac_prog in ginstall scoinst install; do
2921         if test -f $ac_dir/$ac_prog; then
2922           if test $ac_prog = install &&
2923             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2924             # AIX install.  It has an incompatible calling convention.
2925             :
2926           else
2927             ac_cv_path_install="$ac_dir/$ac_prog -c"
2928             break 2
2929           fi
2930         fi
2931       done
2932       ;;
2933     esac
2934   done
2935   IFS="$ac_save_IFS"
2936
2937 fi
2938   if test "${ac_cv_path_install+set}" = set; then
2939     INSTALL="$ac_cv_path_install"
2940   else
2941     # As a last resort, use the slow shell script.  We don't cache a
2942     # path for INSTALL within a source directory, because that will
2943     # break other packages using the cache if that directory is
2944     # removed, or if the path is relative.
2945     INSTALL="$ac_install_sh"
2946   fi
2947 fi
2948 echo "$ac_t""$INSTALL" 1>&6
2949
2950 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2951 # It thinks the first close brace ends the variable substitution.
2952 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2953
2954 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2955
2956 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2957
2958 if test $host != $build; then
2959   ac_tool_prefix=${host_alias}-
2960 else
2961   ac_tool_prefix=
2962 fi
2963
2964 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
2965 set dummy ${ac_tool_prefix}ar; ac_word=$2
2966 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2967 echo "configure:2968: checking for $ac_word" >&5
2968 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
2969   echo $ac_n "(cached) $ac_c" 1>&6
2970 else
2971   if test -n "$AR"; then
2972   ac_cv_prog_AR="$AR" # Let the user override the test.
2973 else
2974   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2975   ac_dummy="$PATH"
2976   for ac_dir in $ac_dummy; do
2977     test -z "$ac_dir" && ac_dir=.
2978     if test -f $ac_dir/$ac_word; then
2979       ac_cv_prog_AR="${ac_tool_prefix}ar"
2980       break
2981     fi
2982   done
2983   IFS="$ac_save_ifs"
2984   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
2985 fi
2986 fi
2987 AR="$ac_cv_prog_AR"
2988 if test -n "$AR"; then
2989   echo "$ac_t""$AR" 1>&6
2990 else
2991   echo "$ac_t""no" 1>&6
2992 fi
2993
2994
2995
2996 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2997 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2998 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2999 echo "configure:3000: checking for $ac_word" >&5
3000 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3001   echo $ac_n "(cached) $ac_c" 1>&6
3002 else
3003   if test -n "$RANLIB"; then
3004   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3005 else
3006   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3007   ac_dummy="$PATH"
3008   for ac_dir in $ac_dummy; do
3009     test -z "$ac_dir" && ac_dir=.
3010     if test -f $ac_dir/$ac_word; then
3011       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3012       break
3013     fi
3014   done
3015   IFS="$ac_save_ifs"
3016 fi
3017 fi
3018 RANLIB="$ac_cv_prog_RANLIB"
3019 if test -n "$RANLIB"; then
3020   echo "$ac_t""$RANLIB" 1>&6
3021 else
3022   echo "$ac_t""no" 1>&6
3023 fi
3024
3025
3026 if test -z "$ac_cv_prog_RANLIB"; then
3027 if test -n "$ac_tool_prefix"; then
3028   # Extract the first word of "ranlib", so it can be a program name with args.
3029 set dummy ranlib; ac_word=$2
3030 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3031 echo "configure:3032: checking for $ac_word" >&5
3032 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
3033   echo $ac_n "(cached) $ac_c" 1>&6
3034 else
3035   if test -n "$RANLIB"; then
3036   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3037 else
3038   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3039   ac_dummy="$PATH"
3040   for ac_dir in $ac_dummy; do
3041     test -z "$ac_dir" && ac_dir=.
3042     if test -f $ac_dir/$ac_word; then
3043       ac_cv_prog_RANLIB="ranlib"
3044       break
3045     fi
3046   done
3047   IFS="$ac_save_ifs"
3048   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3049 fi
3050 fi
3051 RANLIB="$ac_cv_prog_RANLIB"
3052 if test -n "$RANLIB"; then
3053   echo "$ac_t""$RANLIB" 1>&6
3054 else
3055   echo "$ac_t""no" 1>&6
3056 fi
3057
3058 else
3059   RANLIB=":"
3060 fi
3061 fi
3062
3063 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
3064 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
3065 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3066 echo "configure:3067: checking for $ac_word" >&5
3067 if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
3068   echo $ac_n "(cached) $ac_c" 1>&6
3069 else
3070   if test -n "$DLLTOOL"; then
3071   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
3072 else
3073   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3074   ac_dummy="$PATH"
3075   for ac_dir in $ac_dummy; do
3076     test -z "$ac_dir" && ac_dir=.
3077     if test -f $ac_dir/$ac_word; then
3078       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
3079       break
3080     fi
3081   done
3082   IFS="$ac_save_ifs"
3083   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="dlltool"
3084 fi
3085 fi
3086 DLLTOOL="$ac_cv_prog_DLLTOOL"
3087 if test -n "$DLLTOOL"; then
3088   echo "$ac_t""$DLLTOOL" 1>&6
3089 else
3090   echo "$ac_t""no" 1>&6
3091 fi
3092
3093
3094
3095 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3096 set dummy ${ac_tool_prefix}windres; ac_word=$2
3097 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3098 echo "configure:3099: checking for $ac_word" >&5
3099 if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
3100   echo $ac_n "(cached) $ac_c" 1>&6
3101 else
3102   if test -n "$WINDRES"; then
3103   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
3104 else
3105   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3106   ac_dummy="$PATH"
3107   for ac_dir in $ac_dummy; do
3108     test -z "$ac_dir" && ac_dir=.
3109     if test -f $ac_dir/$ac_word; then
3110       ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
3111       break
3112     fi
3113   done
3114   IFS="$ac_save_ifs"
3115   test -z "$ac_cv_prog_WINDRES" && ac_cv_prog_WINDRES="windres"
3116 fi
3117 fi
3118 WINDRES="$ac_cv_prog_WINDRES"
3119 if test -n "$WINDRES"; then
3120   echo "$ac_t""$WINDRES" 1>&6
3121 else
3122   echo "$ac_t""no" 1>&6
3123 fi
3124
3125
3126
3127 for ac_prog in 'bison -y' byacc
3128 do
3129 # Extract the first word of "$ac_prog", so it can be a program name with args.
3130 set dummy $ac_prog; ac_word=$2
3131 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3132 echo "configure:3133: checking for $ac_word" >&5
3133 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
3134   echo $ac_n "(cached) $ac_c" 1>&6
3135 else
3136   if test -n "$YACC"; then
3137   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3138 else
3139   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3140   ac_dummy="$PATH"
3141   for ac_dir in $ac_dummy; do
3142     test -z "$ac_dir" && ac_dir=.
3143     if test -f $ac_dir/$ac_word; then
3144       ac_cv_prog_YACC="$ac_prog"
3145       break
3146     fi
3147   done
3148   IFS="$ac_save_ifs"
3149 fi
3150 fi
3151 YACC="$ac_cv_prog_YACC"
3152 if test -n "$YACC"; then
3153   echo "$ac_t""$YACC" 1>&6
3154 else
3155   echo "$ac_t""no" 1>&6
3156 fi
3157
3158 test -n "$YACC" && break
3159 done
3160 test -n "$YACC" || YACC="yacc"
3161
3162
3163 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
3164 set dummy ${ac_tool_prefix}mig; ac_word=$2
3165 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3166 echo "configure:3167: checking for $ac_word" >&5
3167 if eval "test \"`echo '$''{'ac_cv_prog_MIG'+set}'`\" = set"; then
3168   echo $ac_n "(cached) $ac_c" 1>&6
3169 else
3170   if test -n "$MIG"; then
3171   ac_cv_prog_MIG="$MIG" # Let the user override the test.
3172 else
3173   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3174   ac_dummy="$PATH"
3175   for ac_dir in $ac_dummy; do
3176     test -z "$ac_dir" && ac_dir=.
3177     if test -f $ac_dir/$ac_word; then
3178       ac_cv_prog_MIG="${ac_tool_prefix}mig"
3179       break
3180     fi
3181   done
3182   IFS="$ac_save_ifs"
3183   test -z "$ac_cv_prog_MIG" && ac_cv_prog_MIG="mig"
3184 fi
3185 fi
3186 MIG="$ac_cv_prog_MIG"
3187 if test -n "$MIG"; then
3188   echo "$ac_t""$MIG" 1>&6
3189 else
3190   echo "$ac_t""no" 1>&6
3191 fi
3192
3193
3194
3195
3196 if test "$program_transform_name" = s,x,x,; then
3197   program_transform_name=
3198 else
3199   # Double any \ or $.  echo might interpret backslashes.
3200   cat <<\EOF_SED > conftestsed
3201 s,\\,\\\\,g; s,\$,$$,g
3202 EOF_SED
3203   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
3204   rm -f conftestsed
3205 fi
3206 test "$program_prefix" != NONE &&
3207   program_transform_name="s,^,${program_prefix},; $program_transform_name"
3208 # Use a double $ so make ignores it.
3209 test "$program_suffix" != NONE &&
3210   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
3211
3212 # sed with no file args requires a program.
3213 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
3214
3215
3216 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3217 echo "configure:3218: checking return type of signal handlers" >&5
3218 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3219   echo $ac_n "(cached) $ac_c" 1>&6
3220 else
3221   cat > conftest.$ac_ext <<EOF
3222 #line 3223 "configure"
3223 #include "confdefs.h"
3224 #include <sys/types.h>
3225 #include <signal.h>
3226 #ifdef signal
3227 #undef signal
3228 #endif
3229 #ifdef __cplusplus
3230 extern "C" void (*signal (int, void (*)(int)))(int);
3231 #else
3232 void (*signal ()) ();
3233 #endif
3234
3235 int main() {
3236 int i;
3237 ; return 0; }
3238 EOF
3239 if { (eval echo configure:3240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3240   rm -rf conftest*
3241   ac_cv_type_signal=void
3242 else
3243   echo "configure: failed program was:" >&5
3244   cat conftest.$ac_ext >&5
3245   rm -rf conftest*
3246   ac_cv_type_signal=int
3247 fi
3248 rm -f conftest*
3249 fi
3250
3251 echo "$ac_t""$ac_cv_type_signal" 1>&6
3252 cat >> confdefs.h <<EOF
3253 #define RETSIGTYPE $ac_cv_type_signal
3254 EOF
3255
3256
3257
3258 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3259 echo "configure:3260: checking for ANSI C header files" >&5
3260 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3261   echo $ac_n "(cached) $ac_c" 1>&6
3262 else
3263   cat > conftest.$ac_ext <<EOF
3264 #line 3265 "configure"
3265 #include "confdefs.h"
3266 #include <stdlib.h>
3267 #include <stdarg.h>
3268 #include <string.h>
3269 #include <float.h>
3270 EOF
3271 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3272 { (eval echo configure:3273: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3273 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3274 if test -z "$ac_err"; then
3275   rm -rf conftest*
3276   ac_cv_header_stdc=yes
3277 else
3278   echo "$ac_err" >&5
3279   echo "configure: failed program was:" >&5
3280   cat conftest.$ac_ext >&5
3281   rm -rf conftest*
3282   ac_cv_header_stdc=no
3283 fi
3284 rm -f conftest*
3285
3286 if test $ac_cv_header_stdc = yes; then
3287   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3288 cat > conftest.$ac_ext <<EOF
3289 #line 3290 "configure"
3290 #include "confdefs.h"
3291 #include <string.h>
3292 EOF
3293 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3294   egrep "memchr" >/dev/null 2>&1; then
3295   :
3296 else
3297   rm -rf conftest*
3298   ac_cv_header_stdc=no
3299 fi
3300 rm -f conftest*
3301
3302 fi
3303
3304 if test $ac_cv_header_stdc = yes; then
3305   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3306 cat > conftest.$ac_ext <<EOF
3307 #line 3308 "configure"
3308 #include "confdefs.h"
3309 #include <stdlib.h>
3310 EOF
3311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3312   egrep "free" >/dev/null 2>&1; then
3313   :
3314 else
3315   rm -rf conftest*
3316   ac_cv_header_stdc=no
3317 fi
3318 rm -f conftest*
3319
3320 fi
3321
3322 if test $ac_cv_header_stdc = yes; then
3323   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3324 if test "$cross_compiling" = yes; then
3325   :
3326 else
3327   cat > conftest.$ac_ext <<EOF
3328 #line 3329 "configure"
3329 #include "confdefs.h"
3330 #include <ctype.h>
3331 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3332 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3333 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3334 int main () { int i; for (i = 0; i < 256; i++)
3335 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3336 exit (0); }
3337
3338 EOF
3339 if { (eval echo configure:3340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3340 then
3341   :
3342 else
3343   echo "configure: failed program was:" >&5
3344   cat conftest.$ac_ext >&5
3345   rm -fr conftest*
3346   ac_cv_header_stdc=no
3347 fi
3348 rm -fr conftest*
3349 fi
3350
3351 fi
3352 fi
3353
3354 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3355 if test $ac_cv_header_stdc = yes; then
3356   cat >> confdefs.h <<\EOF
3357 #define STDC_HEADERS 1
3358 EOF
3359
3360 fi
3361
3362
3363
3364 case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes)
3365     cat >> confdefs.h <<\EOF
3366 #define _MSE_INT_H 1
3367 EOF
3368
3369 esac; esac
3370
3371 for ac_hdr in ctype.h endian.h nlist.h link.h thread_db.h proc_service.h \
3372         memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
3373         string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \
3374         term.h termio.h termios.h unistd.h wait.h sys/wait.h \
3375         wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \
3376         time.h sys/file.h sys/ioctl.h sys/user.h sys/fault.h sys/syscall.h \
3377         dirent.h sys/ndir.h sys/dir.h ndir.h \
3378         curses.h ncurses.h \
3379         poll.h sys/poll.h
3380 do
3381 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3382 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3383 echo "configure:3384: checking for $ac_hdr" >&5
3384 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3385   echo $ac_n "(cached) $ac_c" 1>&6
3386 else
3387   cat > conftest.$ac_ext <<EOF
3388 #line 3389 "configure"
3389 #include "confdefs.h"
3390 #include <$ac_hdr>
3391 EOF
3392 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3393 { (eval echo configure:3394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3394 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3395 if test -z "$ac_err"; then
3396   rm -rf conftest*
3397   eval "ac_cv_header_$ac_safe=yes"
3398 else
3399   echo "$ac_err" >&5
3400   echo "configure: failed program was:" >&5
3401   cat conftest.$ac_ext >&5
3402   rm -rf conftest*
3403   eval "ac_cv_header_$ac_safe=no"
3404 fi
3405 rm -f conftest*
3406 fi
3407 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3408   echo "$ac_t""yes" 1>&6
3409     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3410   cat >> confdefs.h <<EOF
3411 #define $ac_tr_hdr 1
3412 EOF
3413  
3414 else
3415   echo "$ac_t""no" 1>&6
3416 fi
3417 done
3418
3419 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
3420 echo "configure:3421: checking whether stat file-mode macros are broken" >&5
3421 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
3422   echo $ac_n "(cached) $ac_c" 1>&6
3423 else
3424   cat > conftest.$ac_ext <<EOF
3425 #line 3426 "configure"
3426 #include "confdefs.h"
3427 #include <sys/types.h>
3428 #include <sys/stat.h>
3429
3430 #if defined(S_ISBLK) && defined(S_IFDIR)
3431 # if S_ISBLK (S_IFDIR)
3432 You lose.
3433 # endif
3434 #endif
3435
3436 #if defined(S_ISBLK) && defined(S_IFCHR)
3437 # if S_ISBLK (S_IFCHR)
3438 You lose.
3439 # endif
3440 #endif
3441
3442 #if defined(S_ISLNK) && defined(S_IFREG)
3443 # if S_ISLNK (S_IFREG)
3444 You lose.
3445 # endif
3446 #endif
3447
3448 #if defined(S_ISSOCK) && defined(S_IFREG)
3449 # if S_ISSOCK (S_IFREG)
3450 You lose.
3451 # endif
3452 #endif
3453
3454 EOF
3455 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3456   egrep "You lose" >/dev/null 2>&1; then
3457   rm -rf conftest*
3458   ac_cv_header_stat_broken=yes
3459 else
3460   rm -rf conftest*
3461   ac_cv_header_stat_broken=no
3462 fi
3463 rm -f conftest*
3464
3465 fi
3466
3467 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3468 if test $ac_cv_header_stat_broken = yes; then
3469   cat >> confdefs.h <<\EOF
3470 #define STAT_MACROS_BROKEN 1
3471 EOF
3472
3473 fi
3474
3475
3476 echo $ac_n "checking for working const""... $ac_c" 1>&6
3477 echo "configure:3478: checking for working const" >&5
3478 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3479   echo $ac_n "(cached) $ac_c" 1>&6
3480 else
3481   cat > conftest.$ac_ext <<EOF
3482 #line 3483 "configure"
3483 #include "confdefs.h"
3484
3485 int main() {
3486
3487 /* Ultrix mips cc rejects this.  */
3488 typedef int charset[2]; const charset x;
3489 /* SunOS 4.1.1 cc rejects this.  */
3490 char const *const *ccp;
3491 char **p;
3492 /* NEC SVR4.0.2 mips cc rejects this.  */
3493 struct point {int x, y;};
3494 static struct point const zero = {0,0};
3495 /* AIX XL C 1.02.0.0 rejects this.
3496    It does not let you subtract one const X* pointer from another in an arm
3497    of an if-expression whose if-part is not a constant expression */
3498 const char *g = "string";
3499 ccp = &g + (g ? g-g : 0);
3500 /* HPUX 7.0 cc rejects these. */
3501 ++ccp;
3502 p = (char**) ccp;
3503 ccp = (char const *const *) p;
3504 { /* SCO 3.2v4 cc rejects this.  */
3505   char *t;
3506   char const *s = 0 ? (char *) 0 : (char const *) 0;
3507
3508   *t++ = 0;
3509 }
3510 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3511   int x[] = {25, 17};
3512   const int *foo = &x[0];
3513   ++foo;
3514 }
3515 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3516   typedef const int *iptr;
3517   iptr p = 0;
3518   ++p;
3519 }
3520 { /* AIX XL C 1.02.0.0 rejects this saying
3521      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3522   struct s { int j; const int *ap[3]; };
3523   struct s *b; b->j = 5;
3524 }
3525 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3526   const int foo = 10;
3527 }
3528
3529 ; return 0; }
3530 EOF
3531 if { (eval echo configure:3532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3532   rm -rf conftest*
3533   ac_cv_c_const=yes
3534 else
3535   echo "configure: failed program was:" >&5
3536   cat conftest.$ac_ext >&5
3537   rm -rf conftest*
3538   ac_cv_c_const=no
3539 fi
3540 rm -f conftest*
3541 fi
3542
3543 echo "$ac_t""$ac_cv_c_const" 1>&6
3544 if test $ac_cv_c_const = no; then
3545   cat >> confdefs.h <<\EOF
3546 #define const 
3547 EOF
3548
3549 fi
3550
3551
3552 for ac_func in setpgid setpgrp sbrk sigaction isascii bzero bcopy btowc poll sigprocmask
3553 do
3554 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3555 echo "configure:3556: checking for $ac_func" >&5
3556 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3557   echo $ac_n "(cached) $ac_c" 1>&6
3558 else
3559   cat > conftest.$ac_ext <<EOF
3560 #line 3561 "configure"
3561 #include "confdefs.h"
3562 /* System header to define __stub macros and hopefully few prototypes,
3563     which can conflict with char $ac_func(); below.  */
3564 #include <assert.h>
3565 /* Override any gcc2 internal prototype to avoid an error.  */
3566 /* We use char because int might match the return type of a gcc2
3567     builtin and then its argument prototype would still apply.  */
3568 char $ac_func();
3569
3570 int main() {
3571
3572 /* The GNU C library defines this for functions which it implements
3573     to always fail with ENOSYS.  Some functions are actually named
3574     something starting with __ and the normal name is an alias.  */
3575 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3576 choke me
3577 #else
3578 $ac_func();
3579 #endif
3580
3581 ; return 0; }
3582 EOF
3583 if { (eval echo configure:3584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3584   rm -rf conftest*
3585   eval "ac_cv_func_$ac_func=yes"
3586 else
3587   echo "configure: failed program was:" >&5
3588   cat conftest.$ac_ext >&5
3589   rm -rf conftest*
3590   eval "ac_cv_func_$ac_func=no"
3591 fi
3592 rm -f conftest*
3593 fi
3594
3595 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3596   echo "$ac_t""yes" 1>&6
3597     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3598   cat >> confdefs.h <<EOF
3599 #define $ac_tr_func 1
3600 EOF
3601  
3602 else
3603   echo "$ac_t""no" 1>&6
3604 fi
3605 done
3606
3607 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3608 echo "configure:3609: checking for pid_t" >&5
3609 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
3610   echo $ac_n "(cached) $ac_c" 1>&6
3611 else
3612   cat > conftest.$ac_ext <<EOF
3613 #line 3614 "configure"
3614 #include "confdefs.h"
3615 #include <sys/types.h>
3616 #if STDC_HEADERS
3617 #include <stdlib.h>
3618 #include <stddef.h>
3619 #endif
3620 EOF
3621 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3622   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3623   rm -rf conftest*
3624   ac_cv_type_pid_t=yes
3625 else
3626   rm -rf conftest*
3627   ac_cv_type_pid_t=no
3628 fi
3629 rm -f conftest*
3630
3631 fi
3632 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3633 if test $ac_cv_type_pid_t = no; then
3634   cat >> confdefs.h <<\EOF
3635 #define pid_t int
3636 EOF
3637
3638 fi
3639
3640 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
3641 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
3642 echo "configure:3643: checking for vfork.h" >&5
3643 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3644   echo $ac_n "(cached) $ac_c" 1>&6
3645 else
3646   cat > conftest.$ac_ext <<EOF
3647 #line 3648 "configure"
3648 #include "confdefs.h"
3649 #include <vfork.h>
3650 EOF
3651 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3652 { (eval echo configure:3653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3653 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3654 if test -z "$ac_err"; then
3655   rm -rf conftest*
3656   eval "ac_cv_header_$ac_safe=yes"
3657 else
3658   echo "$ac_err" >&5
3659   echo "configure: failed program was:" >&5
3660   cat conftest.$ac_ext >&5
3661   rm -rf conftest*
3662   eval "ac_cv_header_$ac_safe=no"
3663 fi
3664 rm -f conftest*
3665 fi
3666 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3667   echo "$ac_t""yes" 1>&6
3668   cat >> confdefs.h <<\EOF
3669 #define HAVE_VFORK_H 1
3670 EOF
3671
3672 else
3673   echo "$ac_t""no" 1>&6
3674 fi
3675
3676 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
3677 echo "configure:3678: checking for working vfork" >&5
3678 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
3679   echo $ac_n "(cached) $ac_c" 1>&6
3680 else
3681   if test "$cross_compiling" = yes; then
3682   echo $ac_n "checking for vfork""... $ac_c" 1>&6
3683 echo "configure:3684: checking for vfork" >&5
3684 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
3685   echo $ac_n "(cached) $ac_c" 1>&6
3686 else
3687   cat > conftest.$ac_ext <<EOF
3688 #line 3689 "configure"
3689 #include "confdefs.h"
3690 /* System header to define __stub macros and hopefully few prototypes,
3691     which can conflict with char vfork(); below.  */
3692 #include <assert.h>
3693 /* Override any gcc2 internal prototype to avoid an error.  */
3694 /* We use char because int might match the return type of a gcc2
3695     builtin and then its argument prototype would still apply.  */
3696 char vfork();
3697
3698 int main() {
3699
3700 /* The GNU C library defines this for functions which it implements
3701     to always fail with ENOSYS.  Some functions are actually named
3702     something starting with __ and the normal name is an alias.  */
3703 #if defined (__stub_vfork) || defined (__stub___vfork)
3704 choke me
3705 #else
3706 vfork();
3707 #endif
3708
3709 ; return 0; }
3710 EOF
3711 if { (eval echo configure:3712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3712   rm -rf conftest*
3713   eval "ac_cv_func_vfork=yes"
3714 else
3715   echo "configure: failed program was:" >&5
3716   cat conftest.$ac_ext >&5
3717   rm -rf conftest*
3718   eval "ac_cv_func_vfork=no"
3719 fi
3720 rm -f conftest*
3721 fi
3722
3723 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
3724   echo "$ac_t""yes" 1>&6
3725   :
3726 else
3727   echo "$ac_t""no" 1>&6
3728 fi
3729
3730 ac_cv_func_vfork_works=$ac_cv_func_vfork
3731 else
3732   cat > conftest.$ac_ext <<EOF
3733 #line 3734 "configure"
3734 #include "confdefs.h"
3735 /* Thanks to Paul Eggert for this test.  */
3736 #include <stdio.h>
3737 #include <sys/types.h>
3738 #include <sys/stat.h>
3739 #ifdef HAVE_UNISTD_H
3740 #include <unistd.h>
3741 #endif
3742 #ifdef HAVE_VFORK_H
3743 #include <vfork.h>
3744 #endif
3745 /* On some sparc systems, changes by the child to local and incoming
3746    argument registers are propagated back to the parent.
3747    The compiler is told about this with #include <vfork.h>,
3748    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
3749    Test for this by using a static variable whose address
3750    is put into a register that is clobbered by the vfork.  */
3751 static
3752 #ifdef __cplusplus
3753 sparc_address_test (int arg)
3754 #else
3755 sparc_address_test (arg) int arg;
3756 #endif
3757 {
3758   static pid_t child;
3759   if (!child) {
3760     child = vfork ();
3761     if (child < 0) {
3762       perror ("vfork");
3763       _exit(2);
3764     }
3765     if (!child) {
3766       arg = getpid();
3767       write(-1, "", 0);
3768       _exit (arg);
3769     }
3770   }
3771 }
3772 main() {
3773   pid_t parent = getpid ();
3774   pid_t child;
3775
3776   sparc_address_test ();
3777
3778   child = vfork ();
3779
3780   if (child == 0) {
3781     /* Here is another test for sparc vfork register problems.
3782        This test uses lots of local variables, at least
3783        as many local variables as main has allocated so far
3784        including compiler temporaries.  4 locals are enough for
3785        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
3786        A buggy compiler should reuse the register of parent
3787        for one of the local variables, since it will think that
3788        parent can't possibly be used any more in this routine.
3789        Assigning to the local variable will thus munge parent
3790        in the parent process.  */
3791     pid_t
3792       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
3793       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
3794     /* Convince the compiler that p..p7 are live; otherwise, it might
3795        use the same hardware register for all 8 local variables.  */
3796     if (p != p1 || p != p2 || p != p3 || p != p4
3797         || p != p5 || p != p6 || p != p7)
3798       _exit(1);
3799
3800     /* On some systems (e.g. IRIX 3.3),
3801        vfork doesn't separate parent from child file descriptors.
3802        If the child closes a descriptor before it execs or exits,
3803        this munges the parent's descriptor as well.
3804        Test for this by closing stdout in the child.  */
3805     _exit(close(fileno(stdout)) != 0);
3806   } else {
3807     int status;
3808     struct stat st;
3809
3810     while (wait(&status) != child)
3811       ;
3812     exit(
3813          /* Was there some problem with vforking?  */
3814          child < 0
3815
3816          /* Did the child fail?  (This shouldn't happen.)  */
3817          || status
3818
3819          /* Did the vfork/compiler bug occur?  */
3820          || parent != getpid()
3821
3822          /* Did the file descriptor bug occur?  */
3823          || fstat(fileno(stdout), &st) != 0
3824          );
3825   }
3826 }
3827 EOF
3828 if { (eval echo configure:3829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3829 then
3830   ac_cv_func_vfork_works=yes
3831 else
3832   echo "configure: failed program was:" >&5
3833   cat conftest.$ac_ext >&5
3834   rm -fr conftest*
3835   ac_cv_func_vfork_works=no
3836 fi
3837 rm -fr conftest*
3838 fi
3839
3840 fi
3841
3842 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
3843 if test $ac_cv_func_vfork_works = no; then
3844   cat >> confdefs.h <<\EOF
3845 #define vfork fork
3846 EOF
3847
3848 fi
3849
3850 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3851 # for constant arguments.  Useless!
3852 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3853 echo "configure:3854: checking for working alloca.h" >&5
3854 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3855   echo $ac_n "(cached) $ac_c" 1>&6
3856 else
3857   cat > conftest.$ac_ext <<EOF
3858 #line 3859 "configure"
3859 #include "confdefs.h"
3860 #include <alloca.h>
3861 int main() {
3862 char *p = alloca(2 * sizeof(int));
3863 ; return 0; }
3864 EOF
3865 if { (eval echo configure:3866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3866   rm -rf conftest*
3867   ac_cv_header_alloca_h=yes
3868 else
3869   echo "configure: failed program was:" >&5
3870   cat conftest.$ac_ext >&5
3871   rm -rf conftest*
3872   ac_cv_header_alloca_h=no
3873 fi
3874 rm -f conftest*
3875 fi
3876
3877 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3878 if test $ac_cv_header_alloca_h = yes; then
3879   cat >> confdefs.h <<\EOF
3880 #define HAVE_ALLOCA_H 1
3881 EOF
3882
3883 fi
3884
3885 echo $ac_n "checking for alloca""... $ac_c" 1>&6
3886 echo "configure:3887: checking for alloca" >&5
3887 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3888   echo $ac_n "(cached) $ac_c" 1>&6
3889 else
3890   cat > conftest.$ac_ext <<EOF
3891 #line 3892 "configure"
3892 #include "confdefs.h"
3893
3894 #ifdef __GNUC__
3895 # define alloca __builtin_alloca
3896 #else
3897 # ifdef _MSC_VER
3898 #  include <malloc.h>
3899 #  define alloca _alloca
3900 # else
3901 #  if HAVE_ALLOCA_H
3902 #   include <alloca.h>
3903 #  else
3904 #   ifdef _AIX
3905  #pragma alloca
3906 #   else
3907 #    ifndef alloca /* predefined by HP cc +Olibcalls */
3908 char *alloca ();
3909 #    endif
3910 #   endif
3911 #  endif
3912 # endif
3913 #endif
3914
3915 int main() {
3916 char *p = (char *) alloca(1);
3917 ; return 0; }
3918 EOF
3919 if { (eval echo configure:3920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3920   rm -rf conftest*
3921   ac_cv_func_alloca_works=yes
3922 else
3923   echo "configure: failed program was:" >&5
3924   cat conftest.$ac_ext >&5
3925   rm -rf conftest*
3926   ac_cv_func_alloca_works=no
3927 fi
3928 rm -f conftest*
3929 fi
3930
3931 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3932 if test $ac_cv_func_alloca_works = yes; then
3933   cat >> confdefs.h <<\EOF
3934 #define HAVE_ALLOCA 1
3935 EOF
3936
3937 fi
3938
3939 if test $ac_cv_func_alloca_works = no; then
3940   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3941   # that cause trouble.  Some versions do not even contain alloca or
3942   # contain a buggy version.  If you still want to use their alloca,
3943   # use ar to extract alloca.o from them instead of compiling alloca.c.
3944   ALLOCA=alloca.${ac_objext}
3945   cat >> confdefs.h <<\EOF
3946 #define C_ALLOCA 1
3947 EOF
3948
3949
3950 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3951 echo "configure:3952: checking whether alloca needs Cray hooks" >&5
3952 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3953   echo $ac_n "(cached) $ac_c" 1>&6
3954 else
3955   cat > conftest.$ac_ext <<EOF
3956 #line 3957 "configure"
3957 #include "confdefs.h"
3958 #if defined(CRAY) && ! defined(CRAY2)
3959 webecray
3960 #else
3961 wenotbecray
3962 #endif
3963
3964 EOF
3965 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3966   egrep "webecray" >/dev/null 2>&1; then
3967   rm -rf conftest*
3968   ac_cv_os_cray=yes
3969 else
3970   rm -rf conftest*
3971   ac_cv_os_cray=no
3972 fi
3973 rm -f conftest*
3974
3975 fi
3976
3977 echo "$ac_t""$ac_cv_os_cray" 1>&6
3978 if test $ac_cv_os_cray = yes; then
3979 for ac_func in _getb67 GETB67 getb67; do
3980   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3981 echo "configure:3982: checking for $ac_func" >&5
3982 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3983   echo $ac_n "(cached) $ac_c" 1>&6
3984 else
3985   cat > conftest.$ac_ext <<EOF
3986 #line 3987 "configure"
3987 #include "confdefs.h"
3988 /* System header to define __stub macros and hopefully few prototypes,
3989     which can conflict with char $ac_func(); below.  */
3990 #include <assert.h>
3991 /* Override any gcc2 internal prototype to avoid an error.  */
3992 /* We use char because int might match the return type of a gcc2
3993     builtin and then its argument prototype would still apply.  */
3994 char $ac_func();
3995
3996 int main() {
3997
3998 /* The GNU C library defines this for functions which it implements
3999     to always fail with ENOSYS.  Some functions are actually named
4000     something starting with __ and the normal name is an alias.  */
4001 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4002 choke me
4003 #else
4004 $ac_func();
4005 #endif
4006
4007 ; return 0; }
4008 EOF
4009 if { (eval echo configure:4010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4010   rm -rf conftest*
4011   eval "ac_cv_func_$ac_func=yes"
4012 else
4013   echo "configure: failed program was:" >&5
4014   cat conftest.$ac_ext >&5
4015   rm -rf conftest*
4016   eval "ac_cv_func_$ac_func=no"
4017 fi
4018 rm -f conftest*
4019 fi
4020
4021 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4022   echo "$ac_t""yes" 1>&6
4023   cat >> confdefs.h <<EOF
4024 #define CRAY_STACKSEG_END $ac_func
4025 EOF
4026
4027   break
4028 else
4029   echo "$ac_t""no" 1>&6
4030 fi
4031
4032 done
4033 fi
4034
4035 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
4036 echo "configure:4037: checking stack direction for C alloca" >&5
4037 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
4038   echo $ac_n "(cached) $ac_c" 1>&6
4039 else
4040   if test "$cross_compiling" = yes; then
4041   ac_cv_c_stack_direction=0
4042 else
4043   cat > conftest.$ac_ext <<EOF
4044 #line 4045 "configure"
4045 #include "confdefs.h"
4046 find_stack_direction ()
4047 {
4048   static char *addr = 0;
4049   auto char dummy;
4050   if (addr == 0)
4051     {
4052       addr = &dummy;
4053       return find_stack_direction ();
4054     }
4055   else
4056     return (&dummy > addr) ? 1 : -1;
4057 }
4058 main ()
4059 {
4060   exit (find_stack_direction() < 0);
4061 }
4062 EOF
4063 if { (eval echo configure:4064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4064 then
4065   ac_cv_c_stack_direction=1
4066 else
4067   echo "configure: failed program was:" >&5
4068   cat conftest.$ac_ext >&5
4069   rm -fr conftest*
4070   ac_cv_c_stack_direction=-1
4071 fi
4072 rm -fr conftest*
4073 fi
4074
4075 fi
4076
4077 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
4078 cat >> confdefs.h <<EOF
4079 #define STACK_DIRECTION $ac_cv_c_stack_direction
4080 EOF
4081
4082 fi
4083
4084 if test "$cross_compiling" = no; then
4085   echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
4086 echo "configure:4087: checking whether setpgrp takes no argument" >&5
4087 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
4088   echo $ac_n "(cached) $ac_c" 1>&6
4089 else
4090   if test "$cross_compiling" = yes; then
4091   { echo "configure: error: cannot check setpgrp if cross compiling" 1>&2; exit 1; }
4092 else
4093   cat > conftest.$ac_ext <<EOF
4094 #line 4095 "configure"
4095 #include "confdefs.h"
4096
4097 #ifdef HAVE_UNISTD_H
4098 #include <unistd.h>
4099 #endif
4100
4101 /*
4102  * If this system has a BSD-style setpgrp, which takes arguments, exit
4103  * successfully.
4104  */
4105 main()
4106 {
4107     if (setpgrp(1,1) == -1)
4108         exit(0);
4109     else
4110         exit(1);
4111 }
4112
4113 EOF
4114 if { (eval echo configure:4115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4115 then
4116   ac_cv_func_setpgrp_void=no
4117 else
4118   echo "configure: failed program was:" >&5
4119   cat conftest.$ac_ext >&5
4120   rm -fr conftest*
4121   ac_cv_func_setpgrp_void=yes
4122 fi
4123 rm -fr conftest*
4124 fi
4125
4126
4127 fi
4128
4129 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
4130 if test $ac_cv_func_setpgrp_void = yes; then
4131   cat >> confdefs.h <<\EOF
4132 #define SETPGRP_VOID 1
4133 EOF
4134
4135 fi
4136
4137 else
4138   echo $ac_n "checking whether setpgrp takes no argument""... $ac_c" 1>&6
4139 echo "configure:4140: checking whether setpgrp takes no argument" >&5
4140 if eval "test \"`echo '$''{'ac_cv_func_setpgrp_void'+set}'`\" = set"; then
4141   echo $ac_n "(cached) $ac_c" 1>&6
4142 else
4143   cat > conftest.$ac_ext <<EOF
4144 #line 4145 "configure"
4145 #include "confdefs.h"
4146
4147 #include <unistd.h>
4148
4149 int main() {
4150
4151   if (setpgrp(1,1) == -1)
4152     exit (0);
4153   else
4154     exit (1);
4155
4156 ; return 0; }
4157 EOF
4158 if { (eval echo configure:4159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4159   rm -rf conftest*
4160   ac_cv_func_setpgrp_void=no
4161 else
4162   echo "configure: failed program was:" >&5
4163   cat conftest.$ac_ext >&5
4164   rm -rf conftest*
4165   ac_cv_func_setpgrp_void=yes
4166 fi
4167 rm -f conftest*
4168 fi
4169
4170 echo "$ac_t""$ac_cv_func_setpgrp_void" 1>&6
4171 if test $ac_cv_func_setpgrp_void = yes; then
4172   cat >> confdefs.h <<\EOF
4173 #define SETPGRP_VOID 1
4174 EOF
4175
4176 fi
4177 fi
4178
4179 # Check if sigsetjmp is available.  Using AC_CHECK_FUNCS won't do
4180 # since sigsetjmp might only be defined as a macro.
4181 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
4182 echo "configure:4183: checking for sigsetjmp" >&5
4183 if eval "test \"`echo '$''{'gdb_cv_func_sigsetjmp'+set}'`\" = set"; then
4184   echo $ac_n "(cached) $ac_c" 1>&6
4185 else
4186   cat > conftest.$ac_ext <<EOF
4187 #line 4188 "configure"
4188 #include "confdefs.h"
4189
4190 #include <setjmp.h>
4191
4192 int main() {
4193 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
4194 ; return 0; }
4195 EOF
4196 if { (eval echo configure:4197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4197   rm -rf conftest*
4198   gdb_cv_func_sigsetjmp=yes
4199 else
4200   echo "configure: failed program was:" >&5
4201   cat conftest.$ac_ext >&5
4202   rm -rf conftest*
4203   gdb_cv_func_sigsetjmp=no
4204 fi
4205 rm -f conftest*
4206 fi
4207
4208 echo "$ac_t""$gdb_cv_func_sigsetjmp" 1>&6
4209 if test $gdb_cv_func_sigsetjmp = yes; then
4210   cat >> confdefs.h <<\EOF
4211 #define HAVE_SIGSETJMP 1
4212 EOF
4213
4214 fi
4215
4216 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
4217 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
4218 echo $ac_n "checking for r_fs in struct reg""... $ac_c" 1>&6
4219 echo "configure:4220: checking for r_fs in struct reg" >&5
4220 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_fs'+set}'`\" = set"; then
4221   echo $ac_n "(cached) $ac_c" 1>&6
4222 else
4223   cat > conftest.$ac_ext <<EOF
4224 #line 4225 "configure"
4225 #include "confdefs.h"
4226 #include <machine/reg.h>
4227 int main() {
4228 struct reg r; r.r_fs;
4229 ; return 0; }
4230 EOF
4231 if { (eval echo configure:4232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4232   rm -rf conftest*
4233   gdb_cv_struct_reg_r_fs=yes
4234 else
4235   echo "configure: failed program was:" >&5
4236   cat conftest.$ac_ext >&5
4237   rm -rf conftest*
4238   gdb_cv_struct_reg_r_fs=no
4239 fi
4240 rm -f conftest*
4241 fi
4242
4243 echo "$ac_t""$gdb_cv_struct_reg_r_fs" 1>&6
4244 if test $gdb_cv_struct_reg_r_fs = yes; then
4245   cat >> confdefs.h <<\EOF
4246 #define HAVE_STRUCT_REG_R_FS 1
4247 EOF
4248
4249 fi
4250 echo $ac_n "checking for r_gs in struct reg""... $ac_c" 1>&6
4251 echo "configure:4252: checking for r_gs in struct reg" >&5
4252 if eval "test \"`echo '$''{'gdb_cv_struct_reg_r_gs'+set}'`\" = set"; then
4253   echo $ac_n "(cached) $ac_c" 1>&6
4254 else
4255   cat > conftest.$ac_ext <<EOF
4256 #line 4257 "configure"
4257 #include "confdefs.h"
4258 #include <machine/reg.h>
4259 int main() {
4260 struct reg r; r.r_gs;
4261 ; return 0; }
4262 EOF
4263 if { (eval echo configure:4264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4264   rm -rf conftest*
4265   gdb_cv_struct_reg_r_gs=yes
4266 else
4267   echo "configure: failed program was:" >&5
4268   cat conftest.$ac_ext >&5
4269   rm -rf conftest*
4270   gdb_cv_struct_reg_r_gs=no
4271 fi
4272 rm -f conftest*
4273 fi
4274
4275 echo "$ac_t""$gdb_cv_struct_reg_r_gs" 1>&6
4276 if test $gdb_cv_struct_reg_r_gs = yes; then
4277   cat >> confdefs.h <<\EOF
4278 #define HAVE_STRUCT_REG_R_GS 1
4279 EOF
4280
4281 fi
4282
4283 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
4284 echo $ac_n "checking for PTRACE_GETREGS""... $ac_c" 1>&6
4285 echo "configure:4286: checking for PTRACE_GETREGS" >&5
4286 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getregs'+set}'`\" = set"; then
4287   echo $ac_n "(cached) $ac_c" 1>&6
4288 else
4289   cat > conftest.$ac_ext <<EOF
4290 #line 4291 "configure"
4291 #include "confdefs.h"
4292 #include <sys/ptrace.h>
4293 int main() {
4294 PTRACE_GETREGS;
4295 ; return 0; }
4296 EOF
4297 if { (eval echo configure:4298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4298   rm -rf conftest*
4299   gdb_cv_have_ptrace_getregs=yes
4300 else
4301   echo "configure: failed program was:" >&5
4302   cat conftest.$ac_ext >&5
4303   rm -rf conftest*
4304   gdb_cv_have_ptrace_getregs=no
4305 fi
4306 rm -f conftest*
4307 fi
4308
4309 echo "$ac_t""$gdb_cv_have_ptrace_getregs" 1>&6
4310 if test $gdb_cv_have_ptrace_getregs = yes; then
4311   cat >> confdefs.h <<\EOF
4312 #define HAVE_PTRACE_GETREGS 1
4313 EOF
4314
4315 fi
4316
4317 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
4318 echo $ac_n "checking for PTRACE_GETFPXREGS""... $ac_c" 1>&6
4319 echo "configure:4320: checking for PTRACE_GETFPXREGS" >&5
4320 if eval "test \"`echo '$''{'gdb_cv_have_ptrace_getfpxregs'+set}'`\" = set"; then
4321   echo $ac_n "(cached) $ac_c" 1>&6
4322 else
4323   cat > conftest.$ac_ext <<EOF
4324 #line 4325 "configure"
4325 #include "confdefs.h"
4326 #include <sys/ptrace.h>
4327 int main() {
4328 PTRACE_GETFPXREGS;
4329 ; return 0; }
4330 EOF
4331 if { (eval echo configure:4332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4332   rm -rf conftest*
4333   gdb_cv_have_ptrace_getfpxregs=yes
4334 else
4335   echo "configure: failed program was:" >&5
4336   cat conftest.$ac_ext >&5
4337   rm -rf conftest*
4338   gdb_cv_have_ptrace_getfpxregs=no
4339 fi
4340 rm -f conftest*
4341 fi
4342
4343 echo "$ac_t""$gdb_cv_have_ptrace_getfpxregs" 1>&6
4344 if test $gdb_cv_have_ptrace_getfpxregs = yes; then
4345   cat >> confdefs.h <<\EOF
4346 #define HAVE_PTRACE_GETFPXREGS 1
4347 EOF
4348
4349 fi
4350
4351 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
4352 echo $ac_n "checking for PT_GETDBREGS""... $ac_c" 1>&6
4353 echo "configure:4354: checking for PT_GETDBREGS" >&5
4354 if eval "test \"`echo '$''{'gdb_cv_have_pt_getdbregs'+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 <sys/types.h>
4361 #include <sys/ptrace.h>
4362 int main() {
4363 PT_GETDBREGS;
4364 ; return 0; }
4365 EOF
4366 if { (eval echo configure:4367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4367   rm -rf conftest*
4368   gdb_cv_have_pt_getdbregs=yes
4369 else
4370   echo "configure: failed program was:" >&5
4371   cat conftest.$ac_ext >&5
4372   rm -rf conftest*
4373   gdb_cv_have_pt_getdbregs=no
4374 fi
4375 rm -f conftest*
4376 fi
4377
4378 echo "$ac_t""$gdb_cv_have_pt_getdbregs" 1>&6
4379 if test $gdb_cv_have_pt_getdbregs = yes; then
4380   cat >> confdefs.h <<\EOF
4381 #define HAVE_PT_GETDBREGS 1
4382 EOF
4383
4384 fi
4385
4386
4387 echo $ac_n "checking for socketpair in -lsocket""... $ac_c" 1>&6
4388 echo "configure:4389: checking for socketpair in -lsocket" >&5
4389 ac_lib_var=`echo socket'_'socketpair | sed 'y%./+-%__p_%'`
4390 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4391   echo $ac_n "(cached) $ac_c" 1>&6
4392 else
4393   ac_save_LIBS="$LIBS"
4394 LIBS="-lsocket  $LIBS"
4395 cat > conftest.$ac_ext <<EOF
4396 #line 4397 "configure"
4397 #include "confdefs.h"
4398 /* Override any gcc2 internal prototype to avoid an error.  */
4399 /* We use char because int might match the return type of a gcc2
4400     builtin and then its argument prototype would still apply.  */
4401 char socketpair();
4402
4403 int main() {
4404 socketpair()
4405 ; return 0; }
4406 EOF
4407 if { (eval echo configure:4408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4408   rm -rf conftest*
4409   eval "ac_cv_lib_$ac_lib_var=yes"
4410 else
4411   echo "configure: failed program was:" >&5
4412   cat conftest.$ac_ext >&5
4413   rm -rf conftest*
4414   eval "ac_cv_lib_$ac_lib_var=no"
4415 fi
4416 rm -f conftest*
4417 LIBS="$ac_save_LIBS"
4418
4419 fi
4420 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4421   echo "$ac_t""yes" 1>&6
4422     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4423     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4424   cat >> confdefs.h <<EOF
4425 #define $ac_tr_lib 1
4426 EOF
4427
4428   LIBS="-lsocket $LIBS"
4429
4430 else
4431   echo "$ac_t""no" 1>&6
4432 fi
4433
4434 for ac_func in socketpair
4435 do
4436 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4437 echo "configure:4438: checking for $ac_func" >&5
4438 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4439   echo $ac_n "(cached) $ac_c" 1>&6
4440 else
4441   cat > conftest.$ac_ext <<EOF
4442 #line 4443 "configure"
4443 #include "confdefs.h"
4444 /* System header to define __stub macros and hopefully few prototypes,
4445     which can conflict with char $ac_func(); below.  */
4446 #include <assert.h>
4447 /* Override any gcc2 internal prototype to avoid an error.  */
4448 /* We use char because int might match the return type of a gcc2
4449     builtin and then its argument prototype would still apply.  */
4450 char $ac_func();
4451
4452 int main() {
4453
4454 /* The GNU C library defines this for functions which it implements
4455     to always fail with ENOSYS.  Some functions are actually named
4456     something starting with __ and the normal name is an alias.  */
4457 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4458 choke me
4459 #else
4460 $ac_func();
4461 #endif
4462
4463 ; return 0; }
4464 EOF
4465 if { (eval echo configure:4466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4466   rm -rf conftest*
4467   eval "ac_cv_func_$ac_func=yes"
4468 else
4469   echo "configure: failed program was:" >&5
4470   cat conftest.$ac_ext >&5
4471   rm -rf conftest*
4472   eval "ac_cv_func_$ac_func=no"
4473 fi
4474 rm -f conftest*
4475 fi
4476
4477 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4478   echo "$ac_t""yes" 1>&6
4479     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4480   cat >> confdefs.h <<EOF
4481 #define $ac_tr_func 1
4482 EOF
4483  
4484 else
4485   echo "$ac_t""no" 1>&6
4486 fi
4487 done
4488
4489
4490
4491 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
4492 echo "configure:4493: checking whether malloc must be declared" >&5
4493 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
4494   echo $ac_n "(cached) $ac_c" 1>&6
4495 else
4496   cat > conftest.$ac_ext <<EOF
4497 #line 4498 "configure"
4498 #include "confdefs.h"
4499
4500 #include <stdio.h>
4501 #ifdef HAVE_STRING_H
4502 #include <string.h>
4503 #else
4504 #ifdef HAVE_STRINGS_H
4505 #include <strings.h>
4506 #endif
4507 #endif
4508 #ifdef HAVE_STDLIB_H
4509 #include <stdlib.h>
4510 #endif
4511 #ifdef HAVE_UNISTD_H
4512 #include <unistd.h>
4513 #endif
4514 int main() {
4515 char *(*pfn) = (char *(*)) malloc
4516 ; return 0; }
4517 EOF
4518 if { (eval echo configure:4519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4519   rm -rf conftest*
4520   bfd_cv_decl_needed_malloc=no
4521 else
4522   echo "configure: failed program was:" >&5
4523   cat conftest.$ac_ext >&5
4524   rm -rf conftest*
4525   bfd_cv_decl_needed_malloc=yes
4526 fi
4527 rm -f conftest*
4528 fi
4529
4530 echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
4531 if test $bfd_cv_decl_needed_malloc = yes; then
4532   cat >> confdefs.h <<\EOF
4533 #define NEED_DECLARATION_MALLOC 1
4534 EOF
4535
4536 fi
4537
4538 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
4539 echo "configure:4540: checking whether realloc must be declared" >&5
4540 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
4541   echo $ac_n "(cached) $ac_c" 1>&6
4542 else
4543   cat > conftest.$ac_ext <<EOF
4544 #line 4545 "configure"
4545 #include "confdefs.h"
4546
4547 #include <stdio.h>
4548 #ifdef HAVE_STRING_H
4549 #include <string.h>
4550 #else
4551 #ifdef HAVE_STRINGS_H
4552 #include <strings.h>
4553 #endif
4554 #endif
4555 #ifdef HAVE_STDLIB_H
4556 #include <stdlib.h>
4557 #endif
4558 #ifdef HAVE_UNISTD_H
4559 #include <unistd.h>
4560 #endif
4561 int main() {
4562 char *(*pfn) = (char *(*)) realloc
4563 ; return 0; }
4564 EOF
4565 if { (eval echo configure:4566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4566   rm -rf conftest*
4567   bfd_cv_decl_needed_realloc=no
4568 else
4569   echo "configure: failed program was:" >&5
4570   cat conftest.$ac_ext >&5
4571   rm -rf conftest*
4572   bfd_cv_decl_needed_realloc=yes
4573 fi
4574 rm -f conftest*
4575 fi
4576
4577 echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
4578 if test $bfd_cv_decl_needed_realloc = yes; then
4579   cat >> confdefs.h <<\EOF
4580 #define NEED_DECLARATION_REALLOC 1
4581 EOF
4582
4583 fi
4584
4585 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
4586 echo "configure:4587: checking whether free must be declared" >&5
4587 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
4588   echo $ac_n "(cached) $ac_c" 1>&6
4589 else
4590   cat > conftest.$ac_ext <<EOF
4591 #line 4592 "configure"
4592 #include "confdefs.h"
4593
4594 #include <stdio.h>
4595 #ifdef HAVE_STRING_H
4596 #include <string.h>
4597 #else
4598 #ifdef HAVE_STRINGS_H
4599 #include <strings.h>
4600 #endif
4601 #endif
4602 #ifdef HAVE_STDLIB_H
4603 #include <stdlib.h>
4604 #endif
4605 #ifdef HAVE_UNISTD_H
4606 #include <unistd.h>
4607 #endif
4608 int main() {
4609 char *(*pfn) = (char *(*)) free
4610 ; return 0; }
4611 EOF
4612 if { (eval echo configure:4613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4613   rm -rf conftest*
4614   bfd_cv_decl_needed_free=no
4615 else
4616   echo "configure: failed program was:" >&5
4617   cat conftest.$ac_ext >&5
4618   rm -rf conftest*
4619   bfd_cv_decl_needed_free=yes
4620 fi
4621 rm -f conftest*
4622 fi
4623
4624 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
4625 if test $bfd_cv_decl_needed_free = yes; then
4626   cat >> confdefs.h <<\EOF
4627 #define NEED_DECLARATION_FREE 1
4628 EOF
4629
4630 fi
4631
4632 echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
4633 echo "configure:4634: checking whether strerror must be declared" >&5
4634 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+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
4641 #include <stdio.h>
4642 #ifdef HAVE_STRING_H
4643 #include <string.h>
4644 #else
4645 #ifdef HAVE_STRINGS_H
4646 #include <strings.h>
4647 #endif
4648 #endif
4649 #ifdef HAVE_STDLIB_H
4650 #include <stdlib.h>
4651 #endif
4652 #ifdef HAVE_UNISTD_H
4653 #include <unistd.h>
4654 #endif
4655 int main() {
4656 char *(*pfn) = (char *(*)) strerror
4657 ; return 0; }
4658 EOF
4659 if { (eval echo configure:4660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4660   rm -rf conftest*
4661   bfd_cv_decl_needed_strerror=no
4662 else
4663   echo "configure: failed program was:" >&5
4664   cat conftest.$ac_ext >&5
4665   rm -rf conftest*
4666   bfd_cv_decl_needed_strerror=yes
4667 fi
4668 rm -f conftest*
4669 fi
4670
4671 echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
4672 if test $bfd_cv_decl_needed_strerror = yes; then
4673   cat >> confdefs.h <<\EOF
4674 #define NEED_DECLARATION_STRERROR 1
4675 EOF
4676
4677 fi
4678
4679 echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
4680 echo "configure:4681: checking whether strdup must be declared" >&5
4681 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
4682   echo $ac_n "(cached) $ac_c" 1>&6
4683 else
4684   cat > conftest.$ac_ext <<EOF
4685 #line 4686 "configure"
4686 #include "confdefs.h"
4687
4688 #include <stdio.h>
4689 #ifdef HAVE_STRING_H
4690 #include <string.h>
4691 #else
4692 #ifdef HAVE_STRINGS_H
4693 #include <strings.h>
4694 #endif
4695 #endif
4696 #ifdef HAVE_STDLIB_H
4697 #include <stdlib.h>
4698 #endif
4699 #ifdef HAVE_UNISTD_H
4700 #include <unistd.h>
4701 #endif
4702 int main() {
4703 char *(*pfn) = (char *(*)) strdup
4704 ; return 0; }
4705 EOF
4706 if { (eval echo configure:4707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4707   rm -rf conftest*
4708   bfd_cv_decl_needed_strdup=no
4709 else
4710   echo "configure: failed program was:" >&5
4711   cat conftest.$ac_ext >&5
4712   rm -rf conftest*
4713   bfd_cv_decl_needed_strdup=yes
4714 fi
4715 rm -f conftest*
4716 fi
4717
4718 echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
4719 if test $bfd_cv_decl_needed_strdup = yes; then
4720   cat >> confdefs.h <<\EOF
4721 #define NEED_DECLARATION_STRDUP 1
4722 EOF
4723
4724 fi
4725
4726 echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
4727 echo "configure:4728: checking whether strstr must be declared" >&5
4728 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then
4729   echo $ac_n "(cached) $ac_c" 1>&6
4730 else
4731   cat > conftest.$ac_ext <<EOF
4732 #line 4733 "configure"
4733 #include "confdefs.h"
4734
4735 #include <stdio.h>
4736 #ifdef HAVE_STRING_H
4737 #include <string.h>
4738 #else
4739 #ifdef HAVE_STRINGS_H
4740 #include <strings.h>
4741 #endif
4742 #endif
4743 #ifdef HAVE_STDLIB_H
4744 #include <stdlib.h>
4745 #endif
4746 #ifdef HAVE_UNISTD_H
4747 #include <unistd.h>
4748 #endif
4749 int main() {
4750 char *(*pfn) = (char *(*)) strstr
4751 ; return 0; }
4752 EOF
4753 if { (eval echo configure:4754: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4754   rm -rf conftest*
4755   bfd_cv_decl_needed_strstr=no
4756 else
4757   echo "configure: failed program was:" >&5
4758   cat conftest.$ac_ext >&5
4759   rm -rf conftest*
4760   bfd_cv_decl_needed_strstr=yes
4761 fi
4762 rm -f conftest*
4763 fi
4764
4765 echo "$ac_t""$bfd_cv_decl_needed_strstr" 1>&6
4766 if test $bfd_cv_decl_needed_strstr = yes; then
4767   cat >> confdefs.h <<\EOF
4768 #define NEED_DECLARATION_STRSTR 1
4769 EOF
4770
4771 fi
4772
4773
4774
4775 # The following save_state_t checkery is only necessary for HPUX 
4776 # versions earlier than 10.20.  When those fade from memory, this 
4777 # could be expunged. --jsm 1999-03-22
4778
4779 echo $ac_n "checking for HPUX save_state structure""... $ac_c" 1>&6
4780 echo "configure:4781: checking for HPUX save_state structure" >&5
4781 cat > conftest.$ac_ext <<EOF
4782 #line 4783 "configure"
4783 #include "confdefs.h"
4784 #include <machine/save_state.h>
4785 EOF
4786 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4787   egrep "save_state_t" >/dev/null 2>&1; then
4788   rm -rf conftest*
4789   gdb_cv_hpux_savestate=yes
4790 else
4791   rm -rf conftest*
4792   gdb_cv_hpux_savestate=no
4793 fi
4794 rm -f conftest*
4795
4796 cat > conftest.$ac_ext <<EOF
4797 #line 4798 "configure"
4798 #include "confdefs.h"
4799 #include <machine/save_state.h>
4800 EOF
4801 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4802   egrep "ss_wide" >/dev/null 2>&1; then
4803   rm -rf conftest*
4804   gdb_cv_hpux_sswide=yes
4805 else
4806   rm -rf conftest*
4807   gdb_cv_hpux_sswide=no
4808 fi
4809 rm -f conftest*
4810
4811 if test $gdb_cv_hpux_savestate = yes
4812 then
4813   cat >> confdefs.h <<\EOF
4814 #define HAVE_STRUCT_SAVE_STATE_T 1
4815 EOF
4816
4817 fi
4818 if test $gdb_cv_hpux_sswide = yes
4819 then
4820   cat >> confdefs.h <<\EOF
4821 #define HAVE_STRUCT_MEMBER_SS_WIDE 1
4822 EOF
4823
4824 fi
4825 echo "$ac_t""$gdb_cv_hpux_sswide" 1>&6
4826
4827
4828 # If we are configured native on GNU/Linux, work around problems with
4829 # sys/procfs.h
4830 # Also detect which type of /proc is in use, such as for Unixware or Solaris.
4831
4832 if test "${target}" = "${host}"; then
4833   case "${host}" in
4834   i[3456]86-*-linux*)
4835         cat >> confdefs.h <<\EOF
4836 #define START_INFERIOR_TRAPS_EXPECTED 2
4837 EOF
4838
4839         cat >> confdefs.h <<\EOF
4840 #define sys_quotactl 1
4841 EOF
4842
4843         ;;
4844   ia64-*-aix*)
4845       cat >> confdefs.h <<\EOF
4846 #define NEW_PROC_API 1
4847 EOF
4848
4849       ;;
4850   *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*)
4851       cat >> confdefs.h <<\EOF
4852 #define NEW_PROC_API 1
4853 EOF
4854
4855       ;;
4856   *-*-solaris2.[678])
4857       cat >> confdefs.h <<\EOF
4858 #define NEW_PROC_API 1
4859 EOF
4860
4861       ;;
4862   esac
4863 fi
4864
4865 if test "$ac_cv_header_sys_procfs_h" = yes; then
4866   echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
4867 echo "configure:4868: checking for pstatus_t in sys/procfs.h" >&5
4868  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus_t'+set}'`\" = set"; then
4869   echo $ac_n "(cached) $ac_c" 1>&6
4870 else
4871   cat > conftest.$ac_ext <<EOF
4872 #line 4873 "configure"
4873 #include "confdefs.h"
4874
4875 #define _SYSCALL32
4876 #include <sys/procfs.h>
4877 int main() {
4878 pstatus_t avar
4879 ; return 0; }
4880 EOF
4881 if { (eval echo configure:4882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4882   rm -rf conftest*
4883   bfd_cv_have_sys_procfs_type_pstatus_t=yes
4884 else
4885   echo "configure: failed program was:" >&5
4886   cat conftest.$ac_ext >&5
4887   rm -rf conftest*
4888   bfd_cv_have_sys_procfs_type_pstatus_t=no
4889    
4890 fi
4891 rm -f conftest*
4892 fi
4893
4894  if test $bfd_cv_have_sys_procfs_type_pstatus_t = yes; then
4895    cat >> confdefs.h <<\EOF
4896 #define HAVE_PSTATUS_T 1
4897 EOF
4898
4899  fi
4900  echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
4901
4902   echo $ac_n "checking for prrun_t in sys/procfs.h""... $ac_c" 1>&6
4903 echo "configure:4904: checking for prrun_t in sys/procfs.h" >&5
4904  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prrun_t'+set}'`\" = set"; then
4905   echo $ac_n "(cached) $ac_c" 1>&6
4906 else
4907   cat > conftest.$ac_ext <<EOF
4908 #line 4909 "configure"
4909 #include "confdefs.h"
4910
4911 #define _SYSCALL32
4912 #include <sys/procfs.h>
4913 int main() {
4914 prrun_t avar
4915 ; return 0; }
4916 EOF
4917 if { (eval echo configure:4918: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4918   rm -rf conftest*
4919   bfd_cv_have_sys_procfs_type_prrun_t=yes
4920 else
4921   echo "configure: failed program was:" >&5
4922   cat conftest.$ac_ext >&5
4923   rm -rf conftest*
4924   bfd_cv_have_sys_procfs_type_prrun_t=no
4925    
4926 fi
4927 rm -f conftest*
4928 fi
4929
4930  if test $bfd_cv_have_sys_procfs_type_prrun_t = yes; then
4931    cat >> confdefs.h <<\EOF
4932 #define HAVE_PRRUN_T 1
4933 EOF
4934
4935  fi
4936  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prrun_t" 1>&6
4937
4938   echo $ac_n "checking for gregset_t in sys/procfs.h""... $ac_c" 1>&6
4939 echo "configure:4940: checking for gregset_t in sys/procfs.h" >&5
4940  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_gregset_t'+set}'`\" = set"; then
4941   echo $ac_n "(cached) $ac_c" 1>&6
4942 else
4943   cat > conftest.$ac_ext <<EOF
4944 #line 4945 "configure"
4945 #include "confdefs.h"
4946
4947 #define _SYSCALL32
4948 #include <sys/procfs.h>
4949 int main() {
4950 gregset_t avar
4951 ; return 0; }
4952 EOF
4953 if { (eval echo configure:4954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4954   rm -rf conftest*
4955   bfd_cv_have_sys_procfs_type_gregset_t=yes
4956 else
4957   echo "configure: failed program was:" >&5
4958   cat conftest.$ac_ext >&5
4959   rm -rf conftest*
4960   bfd_cv_have_sys_procfs_type_gregset_t=no
4961    
4962 fi
4963 rm -f conftest*
4964 fi
4965
4966  if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
4967    cat >> confdefs.h <<\EOF
4968 #define HAVE_GREGSET_T 1
4969 EOF
4970
4971  fi
4972  echo "$ac_t""$bfd_cv_have_sys_procfs_type_gregset_t" 1>&6
4973
4974   echo $ac_n "checking for fpregset_t in sys/procfs.h""... $ac_c" 1>&6
4975 echo "configure:4976: checking for fpregset_t in sys/procfs.h" >&5
4976  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_fpregset_t'+set}'`\" = set"; then
4977   echo $ac_n "(cached) $ac_c" 1>&6
4978 else
4979   cat > conftest.$ac_ext <<EOF
4980 #line 4981 "configure"
4981 #include "confdefs.h"
4982
4983 #define _SYSCALL32
4984 #include <sys/procfs.h>
4985 int main() {
4986 fpregset_t avar
4987 ; return 0; }
4988 EOF
4989 if { (eval echo configure:4990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4990   rm -rf conftest*
4991   bfd_cv_have_sys_procfs_type_fpregset_t=yes
4992 else
4993   echo "configure: failed program was:" >&5
4994   cat conftest.$ac_ext >&5
4995   rm -rf conftest*
4996   bfd_cv_have_sys_procfs_type_fpregset_t=no
4997    
4998 fi
4999 rm -f conftest*
5000 fi
5001
5002  if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
5003    cat >> confdefs.h <<\EOF
5004 #define HAVE_FPREGSET_T 1
5005 EOF
5006
5007  fi
5008  echo "$ac_t""$bfd_cv_have_sys_procfs_type_fpregset_t" 1>&6
5009
5010   echo $ac_n "checking for prgregset_t in sys/procfs.h""... $ac_c" 1>&6
5011 echo "configure:5012: checking for prgregset_t in sys/procfs.h" >&5
5012  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset_t'+set}'`\" = set"; then
5013   echo $ac_n "(cached) $ac_c" 1>&6
5014 else
5015   cat > conftest.$ac_ext <<EOF
5016 #line 5017 "configure"
5017 #include "confdefs.h"
5018
5019 #define _SYSCALL32
5020 #include <sys/procfs.h>
5021 int main() {
5022 prgregset_t avar
5023 ; return 0; }
5024 EOF
5025 if { (eval echo configure:5026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5026   rm -rf conftest*
5027   bfd_cv_have_sys_procfs_type_prgregset_t=yes
5028 else
5029   echo "configure: failed program was:" >&5
5030   cat conftest.$ac_ext >&5
5031   rm -rf conftest*
5032   bfd_cv_have_sys_procfs_type_prgregset_t=no
5033    
5034 fi
5035 rm -f conftest*
5036 fi
5037
5038  if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
5039    cat >> confdefs.h <<\EOF
5040 #define HAVE_PRGREGSET_T 1
5041 EOF
5042
5043  fi
5044  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset_t" 1>&6
5045
5046   echo $ac_n "checking for prfpregset_t in sys/procfs.h""... $ac_c" 1>&6
5047 echo "configure:5048: checking for prfpregset_t in sys/procfs.h" >&5
5048  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset_t'+set}'`\" = set"; then
5049   echo $ac_n "(cached) $ac_c" 1>&6
5050 else
5051   cat > conftest.$ac_ext <<EOF
5052 #line 5053 "configure"
5053 #include "confdefs.h"
5054
5055 #define _SYSCALL32
5056 #include <sys/procfs.h>
5057 int main() {
5058 prfpregset_t avar
5059 ; return 0; }
5060 EOF
5061 if { (eval echo configure:5062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5062   rm -rf conftest*
5063   bfd_cv_have_sys_procfs_type_prfpregset_t=yes
5064 else
5065   echo "configure: failed program was:" >&5
5066   cat conftest.$ac_ext >&5
5067   rm -rf conftest*
5068   bfd_cv_have_sys_procfs_type_prfpregset_t=no
5069    
5070 fi
5071 rm -f conftest*
5072 fi
5073
5074  if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
5075    cat >> confdefs.h <<\EOF
5076 #define HAVE_PRFPREGSET_T 1
5077 EOF
5078
5079  fi
5080  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset_t" 1>&6
5081
5082   echo $ac_n "checking for prgregset32_t in sys/procfs.h""... $ac_c" 1>&6
5083 echo "configure:5084: checking for prgregset32_t in sys/procfs.h" >&5
5084  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prgregset32_t'+set}'`\" = set"; then
5085   echo $ac_n "(cached) $ac_c" 1>&6
5086 else
5087   cat > conftest.$ac_ext <<EOF
5088 #line 5089 "configure"
5089 #include "confdefs.h"
5090
5091 #define _SYSCALL32
5092 #include <sys/procfs.h>
5093 int main() {
5094 prgregset32_t avar
5095 ; return 0; }
5096 EOF
5097 if { (eval echo configure:5098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5098   rm -rf conftest*
5099   bfd_cv_have_sys_procfs_type_prgregset32_t=yes
5100 else
5101   echo "configure: failed program was:" >&5
5102   cat conftest.$ac_ext >&5
5103   rm -rf conftest*
5104   bfd_cv_have_sys_procfs_type_prgregset32_t=no
5105    
5106 fi
5107 rm -f conftest*
5108 fi
5109
5110  if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
5111    cat >> confdefs.h <<\EOF
5112 #define HAVE_PRGREGSET32_T 1
5113 EOF
5114
5115  fi
5116  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prgregset32_t" 1>&6
5117
5118   echo $ac_n "checking for prfpregset32_t in sys/procfs.h""... $ac_c" 1>&6
5119 echo "configure:5120: checking for prfpregset32_t in sys/procfs.h" >&5
5120  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prfpregset32_t'+set}'`\" = set"; then
5121   echo $ac_n "(cached) $ac_c" 1>&6
5122 else
5123   cat > conftest.$ac_ext <<EOF
5124 #line 5125 "configure"
5125 #include "confdefs.h"
5126
5127 #define _SYSCALL32
5128 #include <sys/procfs.h>
5129 int main() {
5130 prfpregset32_t avar
5131 ; return 0; }
5132 EOF
5133 if { (eval echo configure:5134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5134   rm -rf conftest*
5135   bfd_cv_have_sys_procfs_type_prfpregset32_t=yes
5136 else
5137   echo "configure: failed program was:" >&5
5138   cat conftest.$ac_ext >&5
5139   rm -rf conftest*
5140   bfd_cv_have_sys_procfs_type_prfpregset32_t=no
5141    
5142 fi
5143 rm -f conftest*
5144 fi
5145
5146  if test $bfd_cv_have_sys_procfs_type_prfpregset32_t = yes; then
5147    cat >> confdefs.h <<\EOF
5148 #define HAVE_PRFPREGSET32_T 1
5149 EOF
5150
5151  fi
5152  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prfpregset32_t" 1>&6
5153
5154   echo $ac_n "checking for lwpid_t in sys/procfs.h""... $ac_c" 1>&6
5155 echo "configure:5156: checking for lwpid_t in sys/procfs.h" >&5
5156  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpid_t'+set}'`\" = set"; then
5157   echo $ac_n "(cached) $ac_c" 1>&6
5158 else
5159   cat > conftest.$ac_ext <<EOF
5160 #line 5161 "configure"
5161 #include "confdefs.h"
5162
5163 #define _SYSCALL32
5164 #include <sys/procfs.h>
5165 int main() {
5166 lwpid_t avar
5167 ; return 0; }
5168 EOF
5169 if { (eval echo configure:5170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5170   rm -rf conftest*
5171   bfd_cv_have_sys_procfs_type_lwpid_t=yes
5172 else
5173   echo "configure: failed program was:" >&5
5174   cat conftest.$ac_ext >&5
5175   rm -rf conftest*
5176   bfd_cv_have_sys_procfs_type_lwpid_t=no
5177    
5178 fi
5179 rm -f conftest*
5180 fi
5181
5182  if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
5183    cat >> confdefs.h <<\EOF
5184 #define HAVE_LWPID_T 1
5185 EOF
5186
5187  fi
5188  echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpid_t" 1>&6
5189
5190   echo $ac_n "checking for psaddr_t in sys/procfs.h""... $ac_c" 1>&6
5191 echo "configure:5192: checking for psaddr_t in sys/procfs.h" >&5
5192  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psaddr_t'+set}'`\" = set"; then
5193   echo $ac_n "(cached) $ac_c" 1>&6
5194 else
5195   cat > conftest.$ac_ext <<EOF
5196 #line 5197 "configure"
5197 #include "confdefs.h"
5198
5199 #define _SYSCALL32
5200 #include <sys/procfs.h>
5201 int main() {
5202 psaddr_t avar
5203 ; return 0; }
5204 EOF
5205 if { (eval echo configure:5206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5206   rm -rf conftest*
5207   bfd_cv_have_sys_procfs_type_psaddr_t=yes
5208 else
5209   echo "configure: failed program was:" >&5
5210   cat conftest.$ac_ext >&5
5211   rm -rf conftest*
5212   bfd_cv_have_sys_procfs_type_psaddr_t=no
5213    
5214 fi
5215 rm -f conftest*
5216 fi
5217
5218  if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
5219    cat >> confdefs.h <<\EOF
5220 #define HAVE_PSADDR_T 1
5221 EOF
5222
5223  fi
5224  echo "$ac_t""$bfd_cv_have_sys_procfs_type_psaddr_t" 1>&6
5225
5226   echo $ac_n "checking for prsysent_t in sys/procfs.h""... $ac_c" 1>&6
5227 echo "configure:5228: checking for prsysent_t in sys/procfs.h" >&5
5228  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prsysent_t'+set}'`\" = set"; then
5229   echo $ac_n "(cached) $ac_c" 1>&6
5230 else
5231   cat > conftest.$ac_ext <<EOF
5232 #line 5233 "configure"
5233 #include "confdefs.h"
5234
5235 #define _SYSCALL32
5236 #include <sys/procfs.h>
5237 int main() {
5238 prsysent_t avar
5239 ; return 0; }
5240 EOF
5241 if { (eval echo configure:5242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5242   rm -rf conftest*
5243   bfd_cv_have_sys_procfs_type_prsysent_t=yes
5244 else
5245   echo "configure: failed program was:" >&5
5246   cat conftest.$ac_ext >&5
5247   rm -rf conftest*
5248   bfd_cv_have_sys_procfs_type_prsysent_t=no
5249    
5250 fi
5251 rm -f conftest*
5252 fi
5253
5254  if test $bfd_cv_have_sys_procfs_type_prsysent_t = yes; then
5255    cat >> confdefs.h <<\EOF
5256 #define HAVE_PRSYSENT_T 1
5257 EOF
5258
5259  fi
5260  echo "$ac_t""$bfd_cv_have_sys_procfs_type_prsysent_t" 1>&6
5261
5262   echo $ac_n "checking for pr_sigset_t in sys/procfs.h""... $ac_c" 1>&6
5263 echo "configure:5264: checking for pr_sigset_t in sys/procfs.h" >&5
5264  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigset_t'+set}'`\" = set"; then
5265   echo $ac_n "(cached) $ac_c" 1>&6
5266 else
5267   cat > conftest.$ac_ext <<EOF
5268 #line 5269 "configure"
5269 #include "confdefs.h"
5270
5271 #define _SYSCALL32
5272 #include <sys/procfs.h>
5273 int main() {
5274 pr_sigset_t avar
5275 ; return 0; }
5276 EOF
5277 if { (eval echo configure:5278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5278   rm -rf conftest*
5279   bfd_cv_have_sys_procfs_type_pr_sigset_t=yes
5280 else
5281   echo "configure: failed program was:" >&5
5282   cat conftest.$ac_ext >&5
5283   rm -rf conftest*
5284   bfd_cv_have_sys_procfs_type_pr_sigset_t=no
5285    
5286 fi
5287 rm -f conftest*
5288 fi
5289
5290  if test $bfd_cv_have_sys_procfs_type_pr_sigset_t = yes; then
5291    cat >> confdefs.h <<\EOF
5292 #define HAVE_PR_SIGSET_T 1
5293 EOF
5294
5295  fi
5296  echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigset_t" 1>&6
5297
5298   echo $ac_n "checking for pr_sigaction64_t in sys/procfs.h""... $ac_c" 1>&6
5299 echo "configure:5300: checking for pr_sigaction64_t in sys/procfs.h" >&5
5300  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_sigaction64_t'+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
5307 #define _SYSCALL32
5308 #include <sys/procfs.h>
5309 int main() {
5310 pr_sigaction64_t avar
5311 ; return 0; }
5312 EOF
5313 if { (eval echo configure:5314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5314   rm -rf conftest*
5315   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=yes
5316 else
5317   echo "configure: failed program was:" >&5
5318   cat conftest.$ac_ext >&5
5319   rm -rf conftest*
5320   bfd_cv_have_sys_procfs_type_pr_sigaction64_t=no
5321    
5322 fi
5323 rm -f conftest*
5324 fi
5325
5326  if test $bfd_cv_have_sys_procfs_type_pr_sigaction64_t = yes; then
5327    cat >> confdefs.h <<\EOF
5328 #define HAVE_PR_SIGACTION64_T 1
5329 EOF
5330
5331  fi
5332  echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_sigaction64_t" 1>&6
5333
5334   echo $ac_n "checking for pr_siginfo64_t in sys/procfs.h""... $ac_c" 1>&6
5335 echo "configure:5336: checking for pr_siginfo64_t in sys/procfs.h" >&5
5336  if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pr_siginfo64_t'+set}'`\" = set"; then
5337   echo $ac_n "(cached) $ac_c" 1>&6
5338 else
5339   cat > conftest.$ac_ext <<EOF
5340 #line 5341 "configure"
5341 #include "confdefs.h"
5342
5343 #define _SYSCALL32
5344 #include <sys/procfs.h>
5345 int main() {
5346 pr_siginfo64_t avar
5347 ; return 0; }
5348 EOF
5349 if { (eval echo configure:5350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5350   rm -rf conftest*
5351   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=yes
5352 else
5353   echo "configure: failed program was:" >&5
5354   cat conftest.$ac_ext >&5
5355   rm -rf conftest*
5356   bfd_cv_have_sys_procfs_type_pr_siginfo64_t=no
5357    
5358 fi
5359 rm -f conftest*
5360 fi
5361
5362  if test $bfd_cv_have_sys_procfs_type_pr_siginfo64_t = yes; then
5363    cat >> confdefs.h <<\EOF
5364 #define HAVE_PR_SIGINFO64_T 1
5365 EOF
5366
5367  fi
5368  echo "$ac_t""$bfd_cv_have_sys_procfs_type_pr_siginfo64_t" 1>&6
5369
5370
5371
5372   
5373         
5374   if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
5375     echo $ac_n "checking whether prfpregset_t type is broken""... $ac_c" 1>&6
5376 echo "configure:5377: checking whether prfpregset_t type is broken" >&5
5377     if eval "test \"`echo '$''{'gdb_cv_prfpregset_t_broken'+set}'`\" = set"; then
5378   echo $ac_n "(cached) $ac_c" 1>&6
5379 else
5380   if test "$cross_compiling" = yes; then
5381   gdb_cv_prfpregset_t_broken=yes
5382 else
5383   cat > conftest.$ac_ext <<EOF
5384 #line 5385 "configure"
5385 #include "confdefs.h"
5386 #include <sys/procfs.h>
5387        int main ()
5388        {
5389          if (sizeof (prfpregset_t) == sizeof (void *))
5390            return 1;
5391          return 0;
5392        }
5393 EOF
5394 if { (eval echo configure:5395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5395 then
5396   gdb_cv_prfpregset_t_broken=no
5397 else
5398   echo "configure: failed program was:" >&5
5399   cat conftest.$ac_ext >&5
5400   rm -fr conftest*
5401   gdb_cv_prfpregset_t_broken=yes
5402 fi
5403 rm -fr conftest*
5404 fi
5405
5406 fi
5407
5408     echo "$ac_t""$gdb_cv_prfpregset_t_broken" 1>&6
5409     if test $gdb_cv_prfpregset_t_broken = yes; then
5410       cat >> confdefs.h <<\EOF
5411 #define PRFPREGSET_T_BROKEN 1
5412 EOF
5413
5414     fi
5415   fi
5416
5417   
5418   echo $ac_n "checking for PIOCSET ioctl entry in sys/procfs.h""... $ac_c" 1>&6
5419 echo "configure:5420: checking for PIOCSET ioctl entry in sys/procfs.h" >&5
5420   if eval "test \"`echo '$''{'gdb_cv_have_procfs_piocset'+set}'`\" = set"; then
5421   echo $ac_n "(cached) $ac_c" 1>&6
5422 else
5423   cat > conftest.$ac_ext <<EOF
5424 #line 5425 "configure"
5425 #include "confdefs.h"
5426 #include <unistd.h>
5427 #include <sys/types.h>
5428 #include <sys/procfs.h>
5429
5430 int main() {
5431
5432     int dummy;;
5433     dummy = ioctl(0, PIOCSET, &dummy);
5434   
5435 ; return 0; }
5436 EOF
5437 if { (eval echo configure:5438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5438   rm -rf conftest*
5439   gdb_cv_have_procfs_piocset=yes
5440 else
5441   echo "configure: failed program was:" >&5
5442   cat conftest.$ac_ext >&5
5443   rm -rf conftest*
5444   gdb_cv_have_procfs_piocset=no
5445 fi
5446 rm -f conftest*
5447 fi
5448
5449   echo "$ac_t""$gdb_cv_have_procfs_piocset" 1>&6
5450   if test $gdb_cv_have_procfs_piocset = yes; then
5451     cat >> confdefs.h <<\EOF
5452 #define HAVE_PROCFS_PIOCSET 1
5453 EOF
5454
5455   fi
5456 fi
5457
5458 if test ${host} = ${target} ; then
5459     
5460   echo $ac_n "checking for member l_addr in struct link_map""... $ac_c" 1>&6
5461 echo "configure:5462: checking for member l_addr in struct link_map" >&5
5462   if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_l_members'+set}'`\" = set"; then
5463   echo $ac_n "(cached) $ac_c" 1>&6
5464 else
5465   cat > conftest.$ac_ext <<EOF
5466 #line 5467 "configure"
5467 #include "confdefs.h"
5468 #include <link.h>
5469 int main() {
5470 struct link_map lm; (void) lm.l_addr;
5471 ; return 0; }
5472 EOF
5473 if { (eval echo configure:5474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5474   rm -rf conftest*
5475   gdb_cv_have_struct_link_map_with_l_members=yes
5476 else
5477   echo "configure: failed program was:" >&5
5478   cat conftest.$ac_ext >&5
5479   rm -rf conftest*
5480   gdb_cv_have_struct_link_map_with_l_members=no
5481 fi
5482 rm -f conftest*
5483 fi
5484
5485   echo "$ac_t""$gdb_cv_have_struct_link_map_with_l_members" 1>&6
5486   if test $gdb_cv_have_struct_link_map_with_l_members = yes; then
5487     cat >> confdefs.h <<\EOF
5488 #define HAVE_STRUCT_LINK_MAP_WITH_L_MEMBERS 1
5489 EOF
5490
5491   fi
5492
5493     
5494   echo $ac_n "checking for member lm_addr in struct link_map""... $ac_c" 1>&6
5495 echo "configure:5496: checking for member lm_addr in struct link_map" >&5
5496   if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map_with_lm_members'+set}'`\" = set"; then
5497   echo $ac_n "(cached) $ac_c" 1>&6
5498 else
5499   cat > conftest.$ac_ext <<EOF
5500 #line 5501 "configure"
5501 #include "confdefs.h"
5502 #include <sys/types.h>
5503 #include <link.h>
5504 int main() {
5505 struct link_map lm; (void) lm.lm_addr;
5506 ; return 0; }
5507 EOF
5508 if { (eval echo configure:5509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5509   rm -rf conftest*
5510   gdb_cv_have_struct_link_map_with_lm_members=yes
5511 else
5512   echo "configure: failed program was:" >&5
5513   cat conftest.$ac_ext >&5
5514   rm -rf conftest*
5515   gdb_cv_have_struct_link_map_with_lm_members=no
5516 fi
5517 rm -f conftest*
5518 fi
5519
5520   echo "$ac_t""$gdb_cv_have_struct_link_map_with_lm_members" 1>&6
5521   if test $gdb_cv_have_struct_link_map_with_lm_members = yes; then
5522     cat >> confdefs.h <<\EOF
5523 #define HAVE_STRUCT_LINK_MAP_WITH_LM_MEMBERS 1
5524 EOF
5525
5526   fi
5527
5528     
5529   echo $ac_n "checking for member som_addr in struct so_map""... $ac_c" 1>&6
5530 echo "configure:5531: checking for member som_addr in struct so_map" >&5
5531   if eval "test \"`echo '$''{'gdb_cv_have_struct_so_map_with_som_members'+set}'`\" = set"; then
5532   echo $ac_n "(cached) $ac_c" 1>&6
5533 else
5534   cat > conftest.$ac_ext <<EOF
5535 #line 5536 "configure"
5536 #include "confdefs.h"
5537 #include <sys/types.h>
5538 #ifdef HAVE_NLIST_H
5539 #include <nlist.h>
5540 #endif
5541 #include <link.h>
5542 int main() {
5543 struct so_map lm; (void) lm.som_addr;
5544 ; return 0; }
5545 EOF
5546 if { (eval echo configure:5547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5547   rm -rf conftest*
5548   gdb_cv_have_struct_so_map_with_som_members=yes
5549 else
5550   echo "configure: failed program was:" >&5
5551   cat conftest.$ac_ext >&5
5552   rm -rf conftest*
5553   gdb_cv_have_struct_so_map_with_som_members=no
5554 fi
5555 rm -f conftest*
5556 fi
5557
5558   echo "$ac_t""$gdb_cv_have_struct_so_map_with_som_members" 1>&6
5559   if test $gdb_cv_have_struct_so_map_with_som_members = yes; then
5560     cat >> confdefs.h <<\EOF
5561 #define HAVE_STRUCT_SO_MAP_WITH_SOM_MEMBERS 1
5562 EOF
5563
5564   fi
5565
5566     
5567   echo $ac_n "checking for struct link_map32 in sys/link.h""... $ac_c" 1>&6
5568 echo "configure:5569: checking for struct link_map32 in sys/link.h" >&5
5569   if eval "test \"`echo '$''{'gdb_cv_have_struct_link_map32'+set}'`\" = set"; then
5570   echo $ac_n "(cached) $ac_c" 1>&6
5571 else
5572   cat > conftest.$ac_ext <<EOF
5573 #line 5574 "configure"
5574 #include "confdefs.h"
5575 #define _SYSCALL32
5576 #include <sys/link.h>
5577 int main() {
5578 struct link_map32 l;
5579 ; return 0; }
5580 EOF
5581 if { (eval echo configure:5582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5582   rm -rf conftest*
5583   gdb_cv_have_struct_link_map32=yes
5584 else
5585   echo "configure: failed program was:" >&5
5586   cat conftest.$ac_ext >&5
5587   rm -rf conftest*
5588   gdb_cv_have_struct_link_map32=no
5589 fi
5590 rm -f conftest*
5591 fi
5592
5593   echo "$ac_t""$gdb_cv_have_struct_link_map32" 1>&6
5594   if test $gdb_cv_have_struct_link_map32 = yes; then
5595     cat >> confdefs.h <<\EOF
5596 #define HAVE_STRUCT_LINK_MAP32 1
5597 EOF
5598
5599   fi
5600 fi
5601
5602 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
5603 echo "configure:5604: checking for main in -lm" >&5
5604 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
5605 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5606   echo $ac_n "(cached) $ac_c" 1>&6
5607 else
5608   ac_save_LIBS="$LIBS"
5609 LIBS="-lm  $LIBS"
5610 cat > conftest.$ac_ext <<EOF
5611 #line 5612 "configure"
5612 #include "confdefs.h"
5613
5614 int main() {
5615 main()
5616 ; return 0; }
5617 EOF
5618 if { (eval echo configure:5619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5619   rm -rf conftest*
5620   eval "ac_cv_lib_$ac_lib_var=yes"
5621 else
5622   echo "configure: failed program was:" >&5
5623   cat conftest.$ac_ext >&5
5624   rm -rf conftest*
5625   eval "ac_cv_lib_$ac_lib_var=no"
5626 fi
5627 rm -f conftest*
5628 LIBS="$ac_save_LIBS"
5629
5630 fi
5631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5632   echo "$ac_t""yes" 1>&6
5633     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5634     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5635   cat >> confdefs.h <<EOF
5636 #define $ac_tr_lib 1
5637 EOF
5638
5639   LIBS="-lm $LIBS"
5640
5641 else
5642   echo "$ac_t""no" 1>&6
5643 fi
5644
5645
5646 echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
5647 echo "configure:5648: checking for wctype in -lc" >&5
5648 ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
5649 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5650   echo $ac_n "(cached) $ac_c" 1>&6
5651 else
5652   ac_save_LIBS="$LIBS"
5653 LIBS="-lc  $LIBS"
5654 cat > conftest.$ac_ext <<EOF
5655 #line 5656 "configure"
5656 #include "confdefs.h"
5657 /* Override any gcc2 internal prototype to avoid an error.  */
5658 /* We use char because int might match the return type of a gcc2
5659     builtin and then its argument prototype would still apply.  */
5660 char wctype();
5661
5662 int main() {
5663 wctype()
5664 ; return 0; }
5665 EOF
5666 if { (eval echo configure:5667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5667   rm -rf conftest*
5668   eval "ac_cv_lib_$ac_lib_var=yes"
5669 else
5670   echo "configure: failed program was:" >&5
5671   cat conftest.$ac_ext >&5
5672   rm -rf conftest*
5673   eval "ac_cv_lib_$ac_lib_var=no"
5674 fi
5675 rm -f conftest*
5676 LIBS="$ac_save_LIBS"
5677
5678 fi
5679 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5680   echo "$ac_t""yes" 1>&6
5681   : 
5682 else
5683   echo "$ac_t""no" 1>&6
5684 echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
5685 echo "configure:5686: checking for wctype in -lw" >&5
5686 ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
5687 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5688   echo $ac_n "(cached) $ac_c" 1>&6
5689 else
5690   ac_save_LIBS="$LIBS"
5691 LIBS="-lw  $LIBS"
5692 cat > conftest.$ac_ext <<EOF
5693 #line 5694 "configure"
5694 #include "confdefs.h"
5695 /* Override any gcc2 internal prototype to avoid an error.  */
5696 /* We use char because int might match the return type of a gcc2
5697     builtin and then its argument prototype would still apply.  */
5698 char wctype();
5699
5700 int main() {
5701 wctype()
5702 ; return 0; }
5703 EOF
5704 if { (eval echo configure:5705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5705   rm -rf conftest*
5706   eval "ac_cv_lib_$ac_lib_var=yes"
5707 else
5708   echo "configure: failed program was:" >&5
5709   cat conftest.$ac_ext >&5
5710   rm -rf conftest*
5711   eval "ac_cv_lib_$ac_lib_var=no"
5712 fi
5713 rm -f conftest*
5714 LIBS="$ac_save_LIBS"
5715
5716 fi
5717 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5718   echo "$ac_t""yes" 1>&6
5719     ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \
5720     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5721   cat >> confdefs.h <<EOF
5722 #define $ac_tr_lib 1
5723 EOF
5724
5725   LIBS="-lw $LIBS"
5726
5727 else
5728   echo "$ac_t""no" 1>&6
5729 fi
5730
5731 fi
5732
5733
5734
5735 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
5736 echo "configure:5737: checking for long long support in compiler" >&5
5737 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
5738   echo $ac_n "(cached) $ac_c" 1>&6
5739 else
5740   cat > conftest.$ac_ext <<EOF
5741 #line 5742 "configure"
5742 #include "confdefs.h"
5743
5744 int main() {
5745
5746   extern long long foo;
5747   switch (foo & 2) { case 0: return 1; }
5748
5749 ; return 0; }
5750 EOF
5751 if { (eval echo configure:5752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5752   rm -rf conftest*
5753   gdb_cv_c_long_long=yes
5754 else
5755   echo "configure: failed program was:" >&5
5756   cat conftest.$ac_ext >&5
5757   rm -rf conftest*
5758   gdb_cv_c_long_long=no
5759 fi
5760 rm -f conftest*
5761 fi
5762
5763 echo "$ac_t""$gdb_cv_c_long_long" 1>&6
5764 if test $gdb_cv_c_long_long = yes; then
5765   cat >> confdefs.h <<\EOF
5766 #define CC_HAS_LONG_LONG 1
5767 EOF
5768
5769 fi
5770
5771
5772 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
5773 echo "configure:5774: checking for long long support in printf" >&5
5774 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
5775   echo $ac_n "(cached) $ac_c" 1>&6
5776 else
5777   if test "$cross_compiling" = yes; then
5778   gdb_cv_printf_has_long_long=no
5779 else
5780   cat > conftest.$ac_ext <<EOF
5781 #line 5782 "configure"
5782 #include "confdefs.h"
5783
5784 int main () {
5785   char buf[32];
5786   long long l = 0;
5787   l = (l << 16) + 0x0123;
5788   l = (l << 16) + 0x4567;
5789   l = (l << 16) + 0x89ab;
5790   l = (l << 16) + 0xcdef;
5791   sprintf (buf, "0x%016llx", l);
5792   return (strcmp ("0x0123456789abcdef", buf));
5793 }
5794 EOF
5795 if { (eval echo configure:5796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5796 then
5797   gdb_cv_printf_has_long_long=yes
5798 else
5799   echo "configure: failed program was:" >&5
5800   cat conftest.$ac_ext >&5
5801   rm -fr conftest*
5802   gdb_cv_printf_has_long_long=no
5803 fi
5804 rm -fr conftest*
5805 fi
5806
5807 fi
5808
5809 if test $gdb_cv_printf_has_long_long = yes; then
5810   cat >> confdefs.h <<\EOF
5811 #define PRINTF_HAS_LONG_LONG 1
5812 EOF
5813
5814 fi
5815 echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
5816
5817
5818 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
5819 echo "configure:5820: checking for long double support in compiler" >&5
5820 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
5821   echo $ac_n "(cached) $ac_c" 1>&6
5822 else
5823   cat > conftest.$ac_ext <<EOF
5824 #line 5825 "configure"
5825 #include "confdefs.h"
5826
5827 int main() {
5828 long double foo;
5829 ; return 0; }
5830 EOF
5831 if { (eval echo configure:5832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5832   rm -rf conftest*
5833   ac_cv_c_long_double=yes
5834 else
5835   echo "configure: failed program was:" >&5
5836   cat conftest.$ac_ext >&5
5837   rm -rf conftest*
5838   ac_cv_c_long_double=no
5839 fi
5840 rm -f conftest*
5841 fi
5842
5843 echo "$ac_t""$ac_cv_c_long_double" 1>&6
5844 if test $ac_cv_c_long_double = yes; then
5845   cat >> confdefs.h <<\EOF
5846 #define HAVE_LONG_DOUBLE 1
5847 EOF
5848
5849 fi
5850
5851
5852 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
5853 echo "configure:5854: checking for long double support in printf" >&5
5854 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
5855   echo $ac_n "(cached) $ac_c" 1>&6
5856 else
5857   if test "$cross_compiling" = yes; then
5858   gdb_cv_printf_has_long_double=no
5859 else
5860   cat > conftest.$ac_ext <<EOF
5861 #line 5862 "configure"
5862 #include "confdefs.h"
5863
5864 int main () {
5865   char buf[16];
5866   long double f = 3.141592653;
5867   sprintf (buf, "%Lg", f);
5868   return (strncmp ("3.14159", buf, 7));
5869 }
5870 EOF
5871 if { (eval echo configure:5872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5872 then
5873   gdb_cv_printf_has_long_double=yes
5874 else
5875   echo "configure: failed program was:" >&5
5876   cat conftest.$ac_ext >&5
5877   rm -fr conftest*
5878   gdb_cv_printf_has_long_double=no
5879 fi
5880 rm -fr conftest*
5881 fi
5882
5883 fi
5884
5885 if test $gdb_cv_printf_has_long_double = yes; then
5886   cat >> confdefs.h <<\EOF
5887 #define PRINTF_HAS_LONG_DOUBLE 1
5888 EOF
5889
5890 fi
5891 echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
5892
5893
5894 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
5895 echo "configure:5896: checking for long double support in scanf" >&5
5896 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
5897   echo $ac_n "(cached) $ac_c" 1>&6
5898 else
5899   if test "$cross_compiling" = yes; then
5900   gdb_cv_scanf_has_long_double=no
5901 else
5902   cat > conftest.$ac_ext <<EOF
5903 #line 5904 "configure"
5904 #include "confdefs.h"
5905
5906 int main () {
5907   char *buf = "3.141592653";
5908   long double f = 0;
5909   sscanf (buf, "%Lg", &f);
5910   return !(f > 3.14159 && f < 3.14160);
5911 }
5912 EOF
5913 if { (eval echo configure:5914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5914 then
5915   gdb_cv_scanf_has_long_double=yes
5916 else
5917   echo "configure: failed program was:" >&5
5918   cat conftest.$ac_ext >&5
5919   rm -fr conftest*
5920   gdb_cv_scanf_has_long_double=no
5921 fi
5922 rm -fr conftest*
5923 fi
5924
5925 fi
5926
5927 if test $gdb_cv_scanf_has_long_double = yes; then
5928   cat >> confdefs.h <<\EOF
5929 #define SCANF_HAS_LONG_DOUBLE 1
5930 EOF
5931
5932 fi
5933 echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
5934
5935 for ac_hdr in unistd.h
5936 do
5937 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5938 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5939 echo "configure:5940: checking for $ac_hdr" >&5
5940 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5941   echo $ac_n "(cached) $ac_c" 1>&6
5942 else
5943   cat > conftest.$ac_ext <<EOF
5944 #line 5945 "configure"
5945 #include "confdefs.h"
5946 #include <$ac_hdr>
5947 EOF
5948 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5949 { (eval echo configure:5950: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5950 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5951 if test -z "$ac_err"; then
5952   rm -rf conftest*
5953   eval "ac_cv_header_$ac_safe=yes"
5954 else
5955   echo "$ac_err" >&5
5956   echo "configure: failed program was:" >&5
5957   cat conftest.$ac_ext >&5
5958   rm -rf conftest*
5959   eval "ac_cv_header_$ac_safe=no"
5960 fi
5961 rm -f conftest*
5962 fi
5963 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5964   echo "$ac_t""yes" 1>&6
5965     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5966   cat >> confdefs.h <<EOF
5967 #define $ac_tr_hdr 1
5968 EOF
5969  
5970 else
5971   echo "$ac_t""no" 1>&6
5972 fi
5973 done
5974
5975 for ac_func in getpagesize
5976 do
5977 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5978 echo "configure:5979: checking for $ac_func" >&5
5979 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5980   echo $ac_n "(cached) $ac_c" 1>&6
5981 else
5982   cat > conftest.$ac_ext <<EOF
5983 #line 5984 "configure"
5984 #include "confdefs.h"
5985 /* System header to define __stub macros and hopefully few prototypes,
5986     which can conflict with char $ac_func(); below.  */
5987 #include <assert.h>
5988 /* Override any gcc2 internal prototype to avoid an error.  */
5989 /* We use char because int might match the return type of a gcc2
5990     builtin and then its argument prototype would still apply.  */
5991 char $ac_func();
5992
5993 int main() {
5994
5995 /* The GNU C library defines this for functions which it implements
5996     to always fail with ENOSYS.  Some functions are actually named
5997     something starting with __ and the normal name is an alias.  */
5998 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5999 choke me
6000 #else
6001 $ac_func();
6002 #endif
6003
6004 ; return 0; }
6005 EOF
6006 if { (eval echo configure:6007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6007   rm -rf conftest*
6008   eval "ac_cv_func_$ac_func=yes"
6009 else
6010   echo "configure: failed program was:" >&5
6011   cat conftest.$ac_ext >&5
6012   rm -rf conftest*
6013   eval "ac_cv_func_$ac_func=no"
6014 fi
6015 rm -f conftest*
6016 fi
6017
6018 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6019   echo "$ac_t""yes" 1>&6
6020     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6021   cat >> confdefs.h <<EOF
6022 #define $ac_tr_func 1
6023 EOF
6024  
6025 else
6026   echo "$ac_t""no" 1>&6
6027 fi
6028 done
6029
6030 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
6031 echo "configure:6032: checking for working mmap" >&5
6032 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
6033   echo $ac_n "(cached) $ac_c" 1>&6
6034 else
6035   if test "$cross_compiling" = yes; then
6036   ac_cv_func_mmap_fixed_mapped=no
6037 else
6038   cat > conftest.$ac_ext <<EOF
6039 #line 6040 "configure"
6040 #include "confdefs.h"
6041
6042 /* Thanks to Mike Haertel and Jim Avera for this test.
6043    Here is a matrix of mmap possibilities:
6044         mmap private not fixed
6045         mmap private fixed at somewhere currently unmapped
6046         mmap private fixed at somewhere already mapped
6047         mmap shared not fixed
6048         mmap shared fixed at somewhere currently unmapped
6049         mmap shared fixed at somewhere already mapped
6050    For private mappings, we should verify that changes cannot be read()
6051    back from the file, nor mmap's back from the file at a different
6052    address.  (There have been systems where private was not correctly
6053    implemented like the infamous i386 svr4.0, and systems where the
6054    VM page cache was not coherent with the filesystem buffer cache
6055    like early versions of FreeBSD and possibly contemporary NetBSD.)
6056    For shared mappings, we should conversely verify that changes get
6057    propogated back to all the places they're supposed to be.
6058
6059    Grep wants private fixed already mapped.
6060    The main things grep needs to know about mmap are:
6061    * does it exist and is it safe to write into the mmap'd area
6062    * how to use it (BSD variants)  */
6063 #include <sys/types.h>
6064 #include <fcntl.h>
6065 #include <sys/mman.h>
6066
6067 /* This mess was copied from the GNU getpagesize.h.  */
6068 #ifndef HAVE_GETPAGESIZE
6069 # ifdef HAVE_UNISTD_H
6070 #  include <unistd.h>
6071 # endif
6072
6073 /* Assume that all systems that can run configure have sys/param.h.  */
6074 # ifndef HAVE_SYS_PARAM_H
6075 #  define HAVE_SYS_PARAM_H 1
6076 # endif
6077
6078 # ifdef _SC_PAGESIZE
6079 #  define getpagesize() sysconf(_SC_PAGESIZE)
6080 # else /* no _SC_PAGESIZE */
6081 #  ifdef HAVE_SYS_PARAM_H
6082 #   include <sys/param.h>
6083 #   ifdef EXEC_PAGESIZE
6084 #    define getpagesize() EXEC_PAGESIZE
6085 #   else /* no EXEC_PAGESIZE */
6086 #    ifdef NBPG
6087 #     define getpagesize() NBPG * CLSIZE
6088 #     ifndef CLSIZE
6089 #      define CLSIZE 1
6090 #     endif /* no CLSIZE */
6091 #    else /* no NBPG */
6092 #     ifdef NBPC
6093 #      define getpagesize() NBPC
6094 #     else /* no NBPC */
6095 #      ifdef PAGESIZE
6096 #       define getpagesize() PAGESIZE
6097 #      endif /* PAGESIZE */
6098 #     endif /* no NBPC */
6099 #    endif /* no NBPG */
6100 #   endif /* no EXEC_PAGESIZE */
6101 #  else /* no HAVE_SYS_PARAM_H */
6102 #   define getpagesize() 8192   /* punt totally */
6103 #  endif /* no HAVE_SYS_PARAM_H */
6104 # endif /* no _SC_PAGESIZE */
6105
6106 #endif /* no HAVE_GETPAGESIZE */
6107
6108 #ifdef __cplusplus
6109 extern "C" { void *malloc(unsigned); }
6110 #else
6111 char *malloc();
6112 #endif
6113
6114 int
6115 main()
6116 {
6117         char *data, *data2, *data3;
6118         int i, pagesize;
6119         int fd;
6120
6121         pagesize = getpagesize();
6122
6123         /*
6124          * First, make a file with some known garbage in it.
6125          */
6126         data = malloc(pagesize);
6127         if (!data)
6128                 exit(1);
6129         for (i = 0; i < pagesize; ++i)
6130                 *(data + i) = rand();
6131         umask(0);
6132         fd = creat("conftestmmap", 0600);
6133         if (fd < 0)
6134                 exit(1);
6135         if (write(fd, data, pagesize) != pagesize)
6136                 exit(1);
6137         close(fd);
6138
6139         /*
6140          * Next, try to mmap the file at a fixed address which
6141          * already has something else allocated at it.  If we can,
6142          * also make sure that we see the same garbage.
6143          */
6144         fd = open("conftestmmap", O_RDWR);
6145         if (fd < 0)
6146                 exit(1);
6147         data2 = malloc(2 * pagesize);
6148         if (!data2)
6149                 exit(1);
6150         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
6151         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
6152             MAP_PRIVATE | MAP_FIXED, fd, 0L))
6153                 exit(1);
6154         for (i = 0; i < pagesize; ++i)
6155                 if (*(data + i) != *(data2 + i))
6156                         exit(1);
6157
6158         /*
6159          * Finally, make sure that changes to the mapped area
6160          * do not percolate back to the file as seen by read().
6161          * (This is a bug on some variants of i386 svr4.0.)
6162          */
6163         for (i = 0; i < pagesize; ++i)
6164                 *(data2 + i) = *(data2 + i) + 1;
6165         data3 = malloc(pagesize);
6166         if (!data3)
6167                 exit(1);
6168         if (read(fd, data3, pagesize) != pagesize)
6169                 exit(1);
6170         for (i = 0; i < pagesize; ++i)
6171                 if (*(data + i) != *(data3 + i))
6172                         exit(1);
6173         close(fd);
6174         unlink("conftestmmap");
6175         exit(0);
6176 }
6177
6178 EOF
6179 if { (eval echo configure:6180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6180 then
6181   ac_cv_func_mmap_fixed_mapped=yes
6182 else
6183   echo "configure: failed program was:" >&5
6184   cat conftest.$ac_ext >&5
6185   rm -fr conftest*
6186   ac_cv_func_mmap_fixed_mapped=no
6187 fi
6188 rm -fr conftest*
6189 fi
6190
6191 fi
6192
6193 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
6194 if test $ac_cv_func_mmap_fixed_mapped = yes; then
6195   cat >> confdefs.h <<\EOF
6196 #define HAVE_MMAP 1
6197 EOF
6198
6199 fi
6200
6201
6202
6203
6204 if test ${build} = ${host} -a ${host} = ${target} ; then
6205    case ${host_os} in
6206    hpux*)
6207       echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
6208 echo "configure:6209: checking for HPUX/OSF thread support" >&5
6209       if test -f /usr/include/dce/cma_config.h ; then
6210          if test "$GCC" = "yes" ; then
6211             echo "$ac_t""yes" 1>&6
6212             cat >> confdefs.h <<\EOF
6213 #define HAVE_HPUX_THREAD_SUPPORT 1
6214 EOF
6215
6216             CONFIG_LIB_OBS="${CONFIG_LIB_OBS} hpux-thread.o"
6217             CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
6218          else
6219             echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
6220          fi
6221       else
6222          echo "$ac_t""no" 1>&6
6223       fi
6224       ;;
6225    solaris*)
6226       echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
6227 echo "configure:6228: checking for Solaris thread debugging library" >&5
6228       if test -f /usr/lib/libthread_db.so.1 ; then
6229          echo "$ac_t""yes" 1>&6
6230          cat >> confdefs.h <<\EOF
6231 #define HAVE_THREAD_DB_LIB 1
6232 EOF
6233
6234          CONFIG_LIB_OBS="${CONFIG_LIB_OBS} sol-thread.o"
6235          CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
6236          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6237 echo "configure:6238: checking for dlopen in -ldl" >&5
6238 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
6239 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6240   echo $ac_n "(cached) $ac_c" 1>&6
6241 else
6242   ac_save_LIBS="$LIBS"
6243 LIBS="-ldl  $LIBS"
6244 cat > conftest.$ac_ext <<EOF
6245 #line 6246 "configure"
6246 #include "confdefs.h"
6247 /* Override any gcc2 internal prototype to avoid an error.  */
6248 /* We use char because int might match the return type of a gcc2
6249     builtin and then its argument prototype would still apply.  */
6250 char dlopen();
6251
6252 int main() {
6253 dlopen()
6254 ; return 0; }
6255 EOF
6256 if { (eval echo configure:6257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6257   rm -rf conftest*
6258   eval "ac_cv_lib_$ac_lib_var=yes"
6259 else
6260   echo "configure: failed program was:" >&5
6261   cat conftest.$ac_ext >&5
6262   rm -rf conftest*
6263   eval "ac_cv_lib_$ac_lib_var=no"
6264 fi
6265 rm -f conftest*
6266 LIBS="$ac_save_LIBS"
6267
6268 fi
6269 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6270   echo "$ac_t""yes" 1>&6
6271     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6272     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6273   cat >> confdefs.h <<EOF
6274 #define $ac_tr_lib 1
6275 EOF
6276
6277   LIBS="-ldl $LIBS"
6278
6279 else
6280   echo "$ac_t""no" 1>&6
6281 fi
6282
6283          if test "$GCC" = "yes" ; then
6284             # The GNU linker requires the -export-dynamic option to make
6285             # all symbols visible in the dynamic symbol table.
6286             hold_ldflags=$LDFLAGS
6287             echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
6288 echo "configure:6289: checking for the ld -export-dynamic flag" >&5
6289             LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
6290             cat > conftest.$ac_ext <<EOF
6291 #line 6292 "configure"
6292 #include "confdefs.h"
6293
6294 int main() {
6295 int i;
6296 ; return 0; }
6297 EOF
6298 if { (eval echo configure:6299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6299   rm -rf conftest*
6300   found=yes
6301 else
6302   echo "configure: failed program was:" >&5
6303   cat conftest.$ac_ext >&5
6304   rm -rf conftest*
6305   found=no
6306 fi
6307 rm -f conftest*
6308             LDFLAGS=$hold_ldflags
6309             echo "$ac_t""$found" 1>&6
6310             if test $found = yes; then
6311                CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
6312             fi
6313          fi
6314          # Sun randomly tweaked the prototypes in <proc_service.h>
6315          # at one point.
6316          echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
6317 echo "configure:6318: checking if <proc_service.h> is old" >&5
6318          if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
6319   echo $ac_n "(cached) $ac_c" 1>&6
6320 else
6321   
6322             cat > conftest.$ac_ext <<EOF
6323 #line 6324 "configure"
6324 #include "confdefs.h"
6325
6326                 #include <proc_service.h>
6327                 ps_err_e ps_pdwrite
6328                     (struct ps_prochandle*, psaddr_t, const void*, size_t);
6329             
6330 int main() {
6331
6332 ; return 0; }
6333 EOF
6334 if { (eval echo configure:6335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6335   rm -rf conftest*
6336   gdb_cv_proc_service_is_old=no
6337 else
6338   echo "configure: failed program was:" >&5
6339   cat conftest.$ac_ext >&5
6340   rm -rf conftest*
6341   gdb_cv_proc_service_is_old=yes
6342 fi
6343 rm -f conftest*
6344          
6345 fi
6346
6347          echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
6348          if test $gdb_cv_proc_service_is_old = yes; then
6349             cat >> confdefs.h <<\EOF
6350 #define PROC_SERVICE_IS_OLD 1
6351 EOF
6352
6353          fi
6354       else
6355          echo "$ac_t""no" 1>&6
6356       fi
6357       ;;
6358    esac
6359    
6360 fi
6361
6362
6363 # Check whether --enable-gdbcli or --disable-gdbcli was given.
6364 if test "${enable_gdbcli+set}" = set; then
6365   enableval="$enable_gdbcli"
6366   
6367   case "${enableval}" in
6368     yes) enable_gdbcli=yes ;;
6369     "") enable_gdbcli=yes ;;
6370     no) 
6371       { echo "configure: error: The CLI cannot be disabled yet" 1>&2; exit 1; }
6372     ;;
6373     *)
6374       { echo "configure: error: Bad value for --enable-gdbcli: ${enableval}" 1>&2; exit 1; }
6375     ;;
6376   esac
6377
6378 else
6379   enable_gdbcli=yes
6380 fi
6381
6382 case ${enable_gdbcli} in
6383   "yes" )
6384     if test -d "${srcdir}/cli" ; then
6385       CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_CLI_OBS)"
6386       CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_CLI_DEPS)"
6387       CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_CLI_SRCS)"
6388       CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_CLI_INITS)"
6389       ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_CLI_CFLAGS)"
6390       CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_CLI_ALL)"
6391       CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_CLI_CLEAN)"
6392       CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_CLI_INSTALL)"
6393       CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_CLI_UNINSTALL)"
6394     fi
6395     ;;
6396 esac
6397
6398
6399 # Check whether --enable-gdbmi or --disable-gdbmi was given.
6400 if test "${enable_gdbmi+set}" = set; then
6401   enableval="$enable_gdbmi"
6402   
6403   case "${enable_gdbmi}" in
6404     yes | no) ;;
6405     "")  enable_gdbmi=yes ;;
6406     *)
6407       { echo "configure: error: Bad value for --enable-gdbmi: ${enableval}" 1>&2; exit 1; }
6408     ;;
6409   esac
6410
6411 else
6412   enable_gdbmi=yes
6413 fi
6414
6415 case ${enable_gdbmi} in
6416   "yes" )
6417     if test -d "${srcdir}/mi" ; then
6418       CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)"
6419       CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)"
6420       CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_MI_SRCS)"
6421       CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)"
6422       ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)"
6423       CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_MI_ALL)"
6424       CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_MI_CLEAN)"
6425       CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)"
6426       CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)"
6427     fi
6428     ;;
6429 esac
6430
6431 # Configure UI_OUT by default (before 5.2 it can be disabled)
6432 # It must be configured if gdbmi is configured
6433
6434 UIOUT_CFLAGS=
6435
6436
6437 # Check whether --with-uiout or --without-uiout was given.
6438 if test "${with_uiout+set}" = set; then
6439   withval="$with_uiout"
6440   case "${withval}" in
6441   yes)  want_uiout=true ;;
6442   no)   if test $enable_gdbmi = yes; then
6443           { echo "configure: error: uiout is needed for MI and cannot be disabled" 1>&2; exit 1; }
6444         else
6445            want_uiout=false
6446         fi ;;
6447   *)    { echo "configure: error: bad value ${withval} for GDB with-uiout option" 1>&2; exit 1; } ;;
6448 esac
6449 else
6450   want_uiout=true
6451 fi
6452
6453 if test $want_uiout = true; then
6454    UIOUT_CFLAGS="-DUI_OUT=1"
6455 fi
6456
6457 # Check whether --enable-tui or --disable-tui was given.
6458 if test "${enable_tui+set}" = set; then
6459   enableval="$enable_tui"
6460   
6461   case "${enable_tui}" in
6462     yes | no) ;;
6463     "")  enable_tui=yes ;;
6464     *)
6465       { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; }
6466     ;;
6467   esac
6468
6469 fi
6470
6471 case ${enable_tui} in
6472   "yes" )
6473     if test -d "${srcdir}/tui" ; then
6474       CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_TUI_OBS)"
6475       CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_TUI_DEPS)"
6476       CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_TUI_SRCS)"
6477       CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_TUI_INITS)"
6478       ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_TUI_CFLAGS)"
6479       CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_TUI_ALL)"
6480       CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_TUI_CLEAN)"
6481       CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_TUI_INSTALL)"
6482       CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_TUI_UNINSTALL)"
6483     fi
6484     ;;
6485 esac
6486
6487 # Check whether --enable-netrom or --disable-netrom was given.
6488 if test "${enable_netrom+set}" = set; then
6489   enableval="$enable_netrom"
6490   case "${enableval}" in
6491 yes)    enable_netrom=yes ;;
6492 no)     enable_netrom=no ;;
6493 *)      { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
6494 esac
6495 fi
6496
6497
6498 if test "${enable_netrom}" = "yes"; then
6499         CONFIG_LIB_OBS="${CONFIG_LIB_OBS} remote-nrom.o" 
6500         CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
6501 fi
6502
6503
6504 # NOTE: Don't add -Wall or -Wunused, they both include
6505 # -Wunused-parameter which reports bogus warnings.
6506 # NOTE: If you add to this list, remember to update
6507 # gdb/doc/gdbint.texinfo.
6508 build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
6509 -Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
6510 # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
6511 # -Wunused-function -Wunused-label -Wunused-variable -Wunused-value
6512 # -Wchar-subscripts -Wtraditional -Wshadow -Wcast-qual
6513 # -Wcast-align -Wwrite-strings -Wconversion -Wstrict-prototypes
6514 # -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls
6515 # -Woverloaded-virtual -Winline -Werror"
6516 # Check whether --enable-build-warnings or --disable-build-warnings was given.
6517 if test "${enable_build_warnings+set}" = set; then
6518   enableval="$enable_build_warnings"
6519   case "${enableval}" in
6520   yes)  ;;
6521   no)   build_warnings="-w";;
6522   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
6523         build_warnings="${build_warnings} ${t}";;
6524   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
6525         build_warnings="${t} ${build_warnings}";;
6526   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
6527 esac
6528 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
6529   echo "Setting compiler warning flags = $build_warnings" 6>&1
6530 fi
6531 fi
6532 # Check whether --enable-gdb-build-warnings or --disable-gdb-build-warnings was given.
6533 if test "${enable_gdb_build_warnings+set}" = set; then
6534   enableval="$enable_gdb_build_warnings"
6535   case "${enableval}" in
6536   yes)  ;;
6537   no)   build_warnings="-w";;
6538   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
6539         build_warnings="${build_warnings} ${t}";;
6540   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
6541         build_warnings="${t} ${build_warnings}";;
6542   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
6543 esac
6544 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
6545   echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
6546 fi
6547 fi
6548 WARN_CFLAGS=""
6549 WERROR_CFLAGS=""
6550 if test "x${build_warnings}" != x -a "x$GCC" = xyes
6551 then
6552     echo $ac_n "checking compiler warning flags""... $ac_c" 1>&6
6553 echo "configure:6554: checking compiler warning flags" >&5
6554     # Separate out the -Werror flag as some files just cannot be
6555     # compiled with it enabled.
6556     for w in ${build_warnings}; do
6557         case $w in
6558         -Werr*) WERROR_CFLAGS=-Werror ;;
6559         *) # Check that GCC accepts it
6560             if $CC $w 2>&1 | grep 'unrecognized option' > /dev/null; then
6561                 :
6562             else
6563                 WARN_CFLAGS="${WARN_CFLAGS} $w"
6564             fi
6565         esac
6566     done
6567     echo "$ac_t""${WARN_CFLAGS}${WERROR_CFLAGS}" 1>&6
6568 fi
6569
6570
6571
6572 MMALLOC_CFLAGS=
6573 MMALLOC=
6574
6575
6576
6577 # Check whether --with-mmalloc or --without-mmalloc was given.
6578 if test "${with_mmalloc+set}" = set; then
6579   withval="$with_mmalloc"
6580   case "${withval}" in
6581   yes)  want_mmalloc=true ;;
6582   no)   want_mmalloc=false;;
6583   *)    { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
6584 esac
6585 else
6586   want_mmalloc=false
6587 fi
6588
6589 if test x$want_mmalloc = xtrue; then
6590    cat >> confdefs.h <<\EOF
6591 #define USE_MMALLOC 1
6592 EOF
6593
6594    cat >> confdefs.h <<\EOF
6595 #define MMCHECK_FORCE 1
6596 EOF
6597
6598    MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
6599    MMALLOC='../mmalloc/libmmalloc.a'
6600 fi
6601
6602 # Check whether --with-included-regex or --without-included-regex was given.
6603 if test "${with_included_regex+set}" = set; then
6604   withval="$with_included_regex"
6605   case "${withval}" in
6606   yes)  want_included_regex=true ;;
6607   no)   want_included_regex=false;;
6608   *)    { echo "configure: error: bad value ${withval} for GDB with-included-regex option" 1>&2; exit 1; } ;;
6609 esac
6610 else
6611   want_included_regex=true
6612 fi
6613
6614 if test $want_included_regex = false; then
6615   echo $ac_n "checking for GNU regex""... $ac_c" 1>&6
6616 echo "configure:6617: checking for GNU regex" >&5
6617   if eval "test \"`echo '$''{'gdb_cv_have_gnu_regex'+set}'`\" = set"; then
6618   echo $ac_n "(cached) $ac_c" 1>&6
6619 else
6620   cat > conftest.$ac_ext <<EOF
6621 #line 6622 "configure"
6622 #include "confdefs.h"
6623 #include <gnu-versions.h>
6624 #include <sys/types.h>
6625 #include <regex.h>
6626 int main() {
6627 #if !defined _GNU_REGEX_INTERFACE_VERSION || !defined __GLIBC__ || __GLIBC__ < 2
6628 #error No valid GNU regex.
6629 #endif
6630
6631 ; return 0; }
6632 EOF
6633 if { (eval echo configure:6634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6634   rm -rf conftest*
6635   gdb_cv_have_gnu_regex=yes
6636 else
6637   echo "configure: failed program was:" >&5
6638   cat conftest.$ac_ext >&5
6639   rm -rf conftest*
6640   gdb_cv_have_gnu_regex=no
6641 fi
6642 rm -f conftest*
6643 fi
6644
6645   echo "$ac_t""$gdb_cv_have_gnu_regex" 1>&6
6646   if test $gdb_cv_have_gnu_regex = no; then
6647         want_included_regex=true
6648   fi
6649 fi
6650
6651 if test x${want_included_regex} = xtrue; then
6652     REGEX="gnu-regex.o"
6653     cat >> confdefs.h <<\EOF
6654 #define USE_INCLUDED_REGEX 1
6655 EOF
6656
6657 fi
6658
6659
6660 # In the Cygwin environment, we need some additional flags.
6661 echo $ac_n "checking for cygwin""... $ac_c" 1>&6
6662 echo "configure:6663: checking for cygwin" >&5
6663 if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
6664   echo $ac_n "(cached) $ac_c" 1>&6
6665 else
6666   cat > conftest.$ac_ext <<EOF
6667 #line 6668 "configure"
6668 #include "confdefs.h"
6669
6670 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
6671 lose
6672 #endif
6673 EOF
6674 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6675   egrep "lose" >/dev/null 2>&1; then
6676   rm -rf conftest*
6677   gdb_cv_os_cygwin=yes
6678 else
6679   rm -rf conftest*
6680   gdb_cv_os_cygwin=no
6681 fi
6682 rm -f conftest*
6683
6684 fi
6685
6686 echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
6687
6688
6689 SER_HARDWIRE="ser-unix.o ser-pipe.o ser-tcp.o"
6690 case ${host} in
6691   *go32* ) SER_HARDWIRE=ser-go32.o ;;
6692   *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
6693 esac
6694
6695
6696
6697 if test x$gdb_host = xgo32; then
6698   TERM_LIB=
6699 else
6700 if test x$gdb_cv_os_cygwin = xyes; then
6701   TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
6702 else
6703   TERM_LIB=
6704   echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
6705 echo "configure:6706: checking for tgetent in -lncurses" >&5
6706 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
6707 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6708   echo $ac_n "(cached) $ac_c" 1>&6
6709 else
6710   ac_save_LIBS="$LIBS"
6711 LIBS="-lncurses  $LIBS"
6712 cat > conftest.$ac_ext <<EOF
6713 #line 6714 "configure"
6714 #include "confdefs.h"
6715 /* Override any gcc2 internal prototype to avoid an error.  */
6716 /* We use char because int might match the return type of a gcc2
6717     builtin and then its argument prototype would still apply.  */
6718 char tgetent();
6719
6720 int main() {
6721 tgetent()
6722 ; return 0; }
6723 EOF
6724 if { (eval echo configure:6725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6725   rm -rf conftest*
6726   eval "ac_cv_lib_$ac_lib_var=yes"
6727 else
6728   echo "configure: failed program was:" >&5
6729   cat conftest.$ac_ext >&5
6730   rm -rf conftest*
6731   eval "ac_cv_lib_$ac_lib_var=no"
6732 fi
6733 rm -f conftest*
6734 LIBS="$ac_save_LIBS"
6735
6736 fi
6737 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6738   echo "$ac_t""yes" 1>&6
6739   TERM_LIB=-lncurses
6740 else
6741   echo "$ac_t""no" 1>&6
6742 echo $ac_n "checking for tgetent in -lHcurses""... $ac_c" 1>&6
6743 echo "configure:6744: checking for tgetent in -lHcurses" >&5
6744 ac_lib_var=`echo Hcurses'_'tgetent | sed 'y%./+-%__p_%'`
6745 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6746   echo $ac_n "(cached) $ac_c" 1>&6
6747 else
6748   ac_save_LIBS="$LIBS"
6749 LIBS="-lHcurses  $LIBS"
6750 cat > conftest.$ac_ext <<EOF
6751 #line 6752 "configure"
6752 #include "confdefs.h"
6753 /* Override any gcc2 internal prototype to avoid an error.  */
6754 /* We use char because int might match the return type of a gcc2
6755     builtin and then its argument prototype would still apply.  */
6756 char tgetent();
6757
6758 int main() {
6759 tgetent()
6760 ; return 0; }
6761 EOF
6762 if { (eval echo configure:6763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6763   rm -rf conftest*
6764   eval "ac_cv_lib_$ac_lib_var=yes"
6765 else
6766   echo "configure: failed program was:" >&5
6767   cat conftest.$ac_ext >&5
6768   rm -rf conftest*
6769   eval "ac_cv_lib_$ac_lib_var=no"
6770 fi
6771 rm -f conftest*
6772 LIBS="$ac_save_LIBS"
6773
6774 fi
6775 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6776   echo "$ac_t""yes" 1>&6
6777   TERM_LIB=-lHcurses
6778 else
6779   echo "$ac_t""no" 1>&6
6780 echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
6781 echo "configure:6782: checking for tgetent in -ltermlib" >&5
6782 ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
6783 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6784   echo $ac_n "(cached) $ac_c" 1>&6
6785 else
6786   ac_save_LIBS="$LIBS"
6787 LIBS="-ltermlib  $LIBS"
6788 cat > conftest.$ac_ext <<EOF
6789 #line 6790 "configure"
6790 #include "confdefs.h"
6791 /* Override any gcc2 internal prototype to avoid an error.  */
6792 /* We use char because int might match the return type of a gcc2
6793     builtin and then its argument prototype would still apply.  */
6794 char tgetent();
6795
6796 int main() {
6797 tgetent()
6798 ; return 0; }
6799 EOF
6800 if { (eval echo configure:6801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6801   rm -rf conftest*
6802   eval "ac_cv_lib_$ac_lib_var=yes"
6803 else
6804   echo "configure: failed program was:" >&5
6805   cat conftest.$ac_ext >&5
6806   rm -rf conftest*
6807   eval "ac_cv_lib_$ac_lib_var=no"
6808 fi
6809 rm -f conftest*
6810 LIBS="$ac_save_LIBS"
6811
6812 fi
6813 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6814   echo "$ac_t""yes" 1>&6
6815   TERM_LIB=-ltermlib
6816 else
6817   echo "$ac_t""no" 1>&6
6818 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
6819 echo "configure:6820: checking for tgetent in -ltermcap" >&5
6820 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
6821 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6822   echo $ac_n "(cached) $ac_c" 1>&6
6823 else
6824   ac_save_LIBS="$LIBS"
6825 LIBS="-ltermcap  $LIBS"
6826 cat > conftest.$ac_ext <<EOF
6827 #line 6828 "configure"
6828 #include "confdefs.h"
6829 /* Override any gcc2 internal prototype to avoid an error.  */
6830 /* We use char because int might match the return type of a gcc2
6831     builtin and then its argument prototype would still apply.  */
6832 char tgetent();
6833
6834 int main() {
6835 tgetent()
6836 ; return 0; }
6837 EOF
6838 if { (eval echo configure:6839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6839   rm -rf conftest*
6840   eval "ac_cv_lib_$ac_lib_var=yes"
6841 else
6842   echo "configure: failed program was:" >&5
6843   cat conftest.$ac_ext >&5
6844   rm -rf conftest*
6845   eval "ac_cv_lib_$ac_lib_var=no"
6846 fi
6847 rm -f conftest*
6848 LIBS="$ac_save_LIBS"
6849
6850 fi
6851 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6852   echo "$ac_t""yes" 1>&6
6853   TERM_LIB=-ltermcap
6854 else
6855   echo "$ac_t""no" 1>&6
6856 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
6857 echo "configure:6858: checking for tgetent in -lcurses" >&5
6858 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
6859 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6860   echo $ac_n "(cached) $ac_c" 1>&6
6861 else
6862   ac_save_LIBS="$LIBS"
6863 LIBS="-lcurses  $LIBS"
6864 cat > conftest.$ac_ext <<EOF
6865 #line 6866 "configure"
6866 #include "confdefs.h"
6867 /* Override any gcc2 internal prototype to avoid an error.  */
6868 /* We use char because int might match the return type of a gcc2
6869     builtin and then its argument prototype would still apply.  */
6870 char tgetent();
6871
6872 int main() {
6873 tgetent()
6874 ; return 0; }
6875 EOF
6876 if { (eval echo configure:6877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6877   rm -rf conftest*
6878   eval "ac_cv_lib_$ac_lib_var=yes"
6879 else
6880   echo "configure: failed program was:" >&5
6881   cat conftest.$ac_ext >&5
6882   rm -rf conftest*
6883   eval "ac_cv_lib_$ac_lib_var=no"
6884 fi
6885 rm -f conftest*
6886 LIBS="$ac_save_LIBS"
6887
6888 fi
6889 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6890   echo "$ac_t""yes" 1>&6
6891   TERM_LIB=-lcurses
6892 else
6893   echo "$ac_t""no" 1>&6
6894 echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
6895 echo "configure:6896: checking for tgetent in -lterminfo" >&5
6896 ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
6897 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6898   echo $ac_n "(cached) $ac_c" 1>&6
6899 else
6900   ac_save_LIBS="$LIBS"
6901 LIBS="-lterminfo  $LIBS"
6902 cat > conftest.$ac_ext <<EOF
6903 #line 6904 "configure"
6904 #include "confdefs.h"
6905 /* Override any gcc2 internal prototype to avoid an error.  */
6906 /* We use char because int might match the return type of a gcc2
6907     builtin and then its argument prototype would still apply.  */
6908 char tgetent();
6909
6910 int main() {
6911 tgetent()
6912 ; return 0; }
6913 EOF
6914 if { (eval echo configure:6915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6915   rm -rf conftest*
6916   eval "ac_cv_lib_$ac_lib_var=yes"
6917 else
6918   echo "configure: failed program was:" >&5
6919   cat conftest.$ac_ext >&5
6920   rm -rf conftest*
6921   eval "ac_cv_lib_$ac_lib_var=no"
6922 fi
6923 rm -f conftest*
6924 LIBS="$ac_save_LIBS"
6925
6926 fi
6927 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6928   echo "$ac_t""yes" 1>&6
6929   TERM_LIB=-lterminfo
6930 else
6931   echo "$ac_t""no" 1>&6
6932 fi
6933
6934 fi
6935
6936 fi
6937
6938 fi
6939
6940 fi
6941
6942 fi
6943
6944
6945   if test "x$TERM_LIB" = x
6946   then
6947     { echo "configure: error: Could not find a term library" 1>&2; exit 1; }
6948   fi
6949 fi
6950 fi
6951
6952
6953 # libreadline needs libuser32.a in a cygwin environment
6954 WIN32LIBS=
6955 if test x$gdb_cv_os_cygwin = xyes; then
6956     WIN32LIBS="-luser32"
6957     case "${target}" in
6958         *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
6959         ;;
6960     esac
6961 fi
6962
6963
6964 LIBGUI="../libgui/src/libgui.a"
6965 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
6966
6967
6968
6969 # Check whether --with-cpu or --without-cpu was given.
6970 if test "${with_cpu+set}" = set; then
6971   withval="$with_cpu"
6972   case "${target}" in
6973   powerpc-* | powerpcle-* )
6974     ## It would be nice to keep this table in sync with the one in
6975     ## gcc/configure.
6976     case "${with_cpu}" in
6977       ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
6978       | 604 | 750 )
6979         ## Those are all handled in variants in rs6000-tdep.c, so they're fine.
6980       ;;
6981       common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 ) 
6982         ## These are all RS6000 variants, as far as GDB is concerned.
6983         with_cpu=rs6000
6984       ;;
6985       603e | ec603e )
6986         with_cpu=603
6987       ;;
6988       604e )
6989         with_cpu=604
6990       ;;
6991       * )
6992         echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2
6993         with_cpu=ppc-uisa
6994       ;;
6995     esac
6996   ;;
6997   * )
6998     echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2
6999   ;;
7000 esac
7001 cat >> confdefs.h <<EOF
7002 #define TARGET_CPU_DEFAULT "${with_cpu}"
7003 EOF
7004
7005
7006 fi
7007
7008
7009
7010 # Check whether --enable-gdbtk or --disable-gdbtk was given.
7011 if test "${enable_gdbtk+set}" = set; then
7012   enableval="$enable_gdbtk"
7013   case "${enableval}" in
7014     yes)
7015         case "$host" in
7016         *go32*)
7017             echo "configure: warning: GDB does not support GDBtk on host ${host}.  GDBtk will be disabled." 1>&2
7018             enable_gdbtk=no ;;
7019         *windows*)
7020             echo "configure: warning: GDB does not support GDBtk on host ${host}.  GDBtk will be disabled." 1>&2
7021             enable_gdbtk=no ;;
7022         *)
7023             enable_gdbtk=yes ;;
7024         esac ;;
7025     no)
7026         enable_gdbtk=no  ;;
7027     *)
7028         { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
7029 esac
7030 else
7031   
7032 # Default is on for everything but go32 and Cygwin
7033 case "$host" in
7034     *go32* | *windows*)
7035         ;;
7036     *)
7037         if test -d "${srcdir}/gdbtk" ; then
7038             enable_gdbtk=yes
7039         fi
7040         ;;
7041 esac
7042
7043 fi
7044
7045
7046 WIN32LDAPP=
7047
7048
7049
7050 configdir="unix"
7051
7052 GDBTKLIBS=
7053 if test "${enable_gdbtk}" = "yes"; then
7054
7055     # Gdbtk must have an absolute path to srcdir in order to run
7056     # properly when not installed.
7057     here=`pwd`
7058     cd ${srcdir}
7059     GDBTK_SRC_DIR=`pwd`
7060     cd $here
7061
7062     
7063 #
7064 # Ok, lets find the tcl configuration
7065 # First, look for one uninstalled.  
7066 # the alternative search directory is invoked by --with-tclconfig
7067 #
7068
7069 if test x"${no_tcl}" = x ; then
7070   # we reset no_tcl in case something fails here
7071   no_tcl=true
7072   # Check whether --with-tclconfig or --without-tclconfig was given.
7073 if test "${with_tclconfig+set}" = set; then
7074   withval="$with_tclconfig"
7075   with_tclconfig=${withval}
7076 fi
7077
7078   echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
7079 echo "configure:7080: checking for Tcl configuration" >&5
7080   if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
7081   echo $ac_n "(cached) $ac_c" 1>&6
7082 else
7083   
7084
7085   # First check to see if --with-tclconfig was specified.
7086   if test x"${with_tclconfig}" != x ; then
7087     if test -f "${with_tclconfig}/tclConfig.sh" ; then
7088       ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
7089     else
7090       { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
7091     fi
7092   fi
7093
7094   # then check for a private Tcl installation
7095   if test x"${ac_cv_c_tclconfig}" = x ; then
7096     for i in \
7097                 ../tcl \
7098                 `ls -dr ../tcl[7-9]* 2>/dev/null` \
7099                 ../../tcl \
7100                 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
7101                 ../../../tcl \
7102                 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
7103       if test -f "$i/${configdir}/tclConfig.sh" ; then
7104         ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
7105         break
7106       fi
7107     done
7108   fi
7109   # check in a few common install locations
7110   if test x"${ac_cv_c_tclconfig}" = x ; then
7111     for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7112       if test -f "$i/tclConfig.sh" ; then
7113         ac_cv_c_tclconfig=`(cd $i; pwd)`
7114         break
7115       fi
7116     done
7117   fi
7118   # check in a few other private locations
7119   if test x"${ac_cv_c_tclconfig}" = x ; then
7120     for i in \
7121                 ${srcdir}/../tcl \
7122                 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
7123       if test -f "$i/${configdir}/tclConfig.sh" ; then
7124         ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
7125         break
7126       fi
7127     done
7128   fi
7129   
7130 fi
7131
7132   if test x"${ac_cv_c_tclconfig}" = x ; then
7133     TCLCONFIG="# no Tcl configs found"
7134     echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
7135   else
7136     no_tcl=
7137     TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
7138     echo "$ac_t""found $TCLCONFIG" 1>&6
7139   fi
7140 fi
7141
7142     if test -z "${no_tcl}"; then
7143         
7144     . $TCLCONFIG
7145
7146     
7147     
7148     
7149     
7150     
7151
7152
7153
7154
7155     
7156     
7157     
7158     
7159     
7160     
7161     
7162     
7163     
7164     
7165     
7166     
7167
7168
7169
7170         
7171 #
7172 # Ok, lets find the tk configuration
7173 # First, look for one uninstalled.  
7174 # the alternative search directory is invoked by --with-tkconfig
7175 #
7176
7177 if test x"${no_tk}" = x ; then
7178   # we reset no_tk in case something fails here
7179   no_tk=true
7180   # Check whether --with-tkconfig or --without-tkconfig was given.
7181 if test "${with_tkconfig+set}" = set; then
7182   withval="$with_tkconfig"
7183   with_tkconfig=${withval}
7184 fi
7185
7186   echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
7187 echo "configure:7188: checking for Tk configuration" >&5
7188   if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
7189   echo $ac_n "(cached) $ac_c" 1>&6
7190 else
7191   
7192
7193   # First check to see if --with-tkconfig was specified.
7194   if test x"${with_tkconfig}" != x ; then
7195     if test -f "${with_tkconfig}/tkConfig.sh" ; then
7196       ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
7197     else
7198       { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
7199     fi
7200   fi
7201
7202   # then check for a private Tk library
7203   if test x"${ac_cv_c_tkconfig}" = x ; then
7204     for i in \
7205                 ../tk \
7206                 `ls -dr ../tk[4-9]* 2>/dev/null` \
7207                 ../../tk \
7208                 `ls -dr ../../tk[4-9]* 2>/dev/null` \
7209                 ../../../tk \
7210                 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
7211       if test -f "$i/${configdir}/tkConfig.sh" ; then
7212         ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
7213         break
7214       fi
7215     done
7216   fi
7217   # check in a few common install locations
7218   if test x"${ac_cv_c_tkconfig}" = x ; then
7219     for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7220       if test -f "$i/tkConfig.sh" ; then
7221         ac_cv_c_tkconfig=`(cd $i; pwd)`
7222         break
7223       fi
7224     done
7225   fi
7226   # check in a few other private locations
7227   if test x"${ac_cv_c_tkconfig}" = x ; then
7228     for i in \
7229                 ${srcdir}/../tk \
7230                 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
7231       if test -f "$i/${configdir}/tkConfig.sh" ; then
7232         ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
7233         break
7234       fi
7235     done
7236   fi
7237   
7238 fi
7239
7240   if test x"${ac_cv_c_tkconfig}" = x ; then
7241     TKCONFIG="# no Tk configs found"
7242     echo "configure: warning: Can't find Tk configuration definitions" 1>&2
7243   else
7244     no_tk=
7245     TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
7246     echo "$ac_t""found $TKCONFIG" 1>&6
7247   fi
7248 fi
7249
7250
7251
7252         # now look for Tcl library stuff
7253
7254         case "${host}" in
7255         *-*-cygwin*)
7256             tcldir=../tcl/win/
7257             ;;
7258         *)
7259             tcldir=../tcl/unix/
7260             ;;
7261         esac
7262
7263         TCL_DEPS="${tcldir}${TCL_LIB_FILE}"
7264
7265         # If $no_tk is nonempty, then we can't do Tk, and there is no
7266         # point to doing Tcl.
7267         if test -z "${no_tk}"; then
7268            
7269     if test -f "$TKCONFIG" ; then
7270       . $TKCONFIG
7271     fi
7272
7273     
7274     
7275
7276     
7277
7278
7279     
7280     
7281     
7282     
7283     
7284
7285            
7286 #
7287 # Ok, lets find the tcl source trees so we can use the headers
7288 # Warning: transition of version 9 to 10 will break this algorithm
7289 # because 10 sorts before 9. We also look for just tcl. We have to
7290 # be careful that we don't match stuff like tclX by accident.
7291 # the alternative search directory is involked by --with-tclinclude
7292 #
7293
7294 no_tcl=true
7295 echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
7296 echo "configure:7297: checking for Tcl private headers. dir=${configdir}" >&5
7297 # Check whether --with-tclinclude or --without-tclinclude was given.
7298 if test "${with_tclinclude+set}" = set; then
7299   withval="$with_tclinclude"
7300   with_tclinclude=${withval}
7301 fi
7302
7303 if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
7304   echo $ac_n "(cached) $ac_c" 1>&6
7305 else
7306   
7307 # first check to see if --with-tclinclude was specified
7308 if test x"${with_tclinclude}" != x ; then
7309   if test -f ${with_tclinclude}/tclInt.h ; then
7310     ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
7311   elif test -f ${with_tclinclude}/generic/tclInt.h ; then
7312     ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
7313   else
7314     { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
7315   fi
7316 fi
7317
7318 # next check if it came with Tcl configuration file
7319 if test x"${ac_cv_c_tclconfig}" = x ; then
7320   if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
7321     ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
7322   fi
7323 fi
7324
7325 # next check in private source directory
7326 #
7327 # since ls returns lowest version numbers first, reverse its output
7328 if test x"${ac_cv_c_tclh}" = x ; then
7329   for i in \
7330                 ${srcdir}/../tcl \
7331                 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
7332                 ${srcdir}/../../tcl \
7333                 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
7334                 ${srcdir}/../../../tcl \
7335                 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
7336     if test -f $i/generic/tclInt.h ; then
7337       ac_cv_c_tclh=`(cd $i/generic; pwd)`
7338       break
7339     fi
7340   done
7341 fi
7342 # finally check in a few common install locations
7343 #
7344 # since ls returns lowest version numbers first, reverse its output
7345 if test x"${ac_cv_c_tclh}" = x ; then
7346   for i in \
7347                 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
7348                 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
7349                 /usr/local/src/tcl \
7350                 /usr/local/lib/tcl \
7351                 ${prefix}/include ; do
7352     if test -f $i/generic/tclInt.h ; then
7353       ac_cv_c_tclh=`(cd $i/generic; pwd)`
7354       break
7355     fi
7356   done
7357 fi
7358 # see if one is installed
7359 if test x"${ac_cv_c_tclh}" = x ; then
7360    ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
7361 echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
7362 echo "configure:7363: checking for tclInt.h" >&5
7363 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7364   echo $ac_n "(cached) $ac_c" 1>&6
7365 else
7366   cat > conftest.$ac_ext <<EOF
7367 #line 7368 "configure"
7368 #include "confdefs.h"
7369 #include <tclInt.h>
7370 EOF
7371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7372 { (eval echo configure:7373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7373 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7374 if test -z "$ac_err"; then
7375   rm -rf conftest*
7376   eval "ac_cv_header_$ac_safe=yes"
7377 else
7378   echo "$ac_err" >&5
7379   echo "configure: failed program was:" >&5
7380   cat conftest.$ac_ext >&5
7381   rm -rf conftest*
7382   eval "ac_cv_header_$ac_safe=no"
7383 fi
7384 rm -f conftest*
7385 fi
7386 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7387   echo "$ac_t""yes" 1>&6
7388   ac_cv_c_tclh=installed
7389 else
7390   echo "$ac_t""no" 1>&6
7391 ac_cv_c_tclh=""
7392 fi
7393
7394 fi
7395
7396 fi
7397
7398 if test x"${ac_cv_c_tclh}" = x ; then
7399   TCLHDIR="# no Tcl private headers found"
7400   { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
7401 fi
7402 if test x"${ac_cv_c_tclh}" != x ; then
7403   no_tcl=""
7404   if test x"${ac_cv_c_tclh}" = x"installed" ; then
7405     echo "$ac_t""is installed" 1>&6
7406     TCLHDIR=""
7407   else
7408     echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
7409     # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
7410     TCLHDIR="-I${ac_cv_c_tclh}"
7411   fi
7412 fi
7413
7414
7415
7416            
7417 #
7418 # Ok, lets find the tk source trees so we can use the headers
7419 # If the directory (presumably symlink) named "tk" exists, use that one
7420 # in preference to any others.  Same logic is used when choosing library
7421 # and again with Tcl. The search order is the best place to look first, then in
7422 # decreasing significance. The loop breaks if the trigger file is found.
7423 # Note the gross little conversion here of srcdir by cd'ing to the found
7424 # directory. This converts the path from a relative to an absolute, so
7425 # recursive cache variables for the path will work right. We check all
7426 # the possible paths in one loop rather than many seperate loops to speed
7427 # things up.
7428 # the alternative search directory is involked by --with-tkinclude
7429 #
7430 no_tk=true
7431 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
7432 echo "configure:7433: checking for Tk private headers" >&5
7433 # Check whether --with-tkinclude or --without-tkinclude was given.
7434 if test "${with_tkinclude+set}" = set; then
7435   withval="$with_tkinclude"
7436   with_tkinclude=${withval}
7437 fi
7438
7439 if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
7440   echo $ac_n "(cached) $ac_c" 1>&6
7441 else
7442   
7443 # first check to see if --with-tkinclude was specified
7444 if test x"${with_tkinclude}" != x ; then
7445   if test -f ${with_tkinclude}/tk.h ; then
7446     ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
7447   elif test -f ${with_tkinclude}/generic/tk.h ; then
7448     ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
7449   else
7450     { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
7451   fi
7452 fi
7453
7454 # next check if it came with Tk configuration file
7455 if test x"${ac_cv_c_tkconfig}" = x ; then
7456   if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
7457     ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
7458   fi
7459 fi
7460
7461 # next check in private source directory
7462 #
7463 # since ls returns lowest version numbers first, reverse its output
7464 if test x"${ac_cv_c_tkh}" = x ; then
7465   for i in \
7466                 ${srcdir}/../tk \
7467                 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
7468                 ${srcdir}/../../tk \
7469                 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
7470                 ${srcdir}/../../../tk \
7471                 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
7472     if test -f $i/generic/tk.h ; then
7473       ac_cv_c_tkh=`(cd $i/generic; pwd)`
7474       break
7475     fi
7476   done
7477 fi
7478 # finally check in a few common install locations
7479 #
7480 # since ls returns lowest version numbers first, reverse its output
7481 if test x"${ac_cv_c_tkh}" = x ; then
7482   for i in \
7483                 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
7484                 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
7485                 /usr/local/src/tk \
7486                 /usr/local/lib/tk \
7487                 ${prefix}/include ; do
7488     if test -f $i/generic/tk.h ; then
7489       ac_cv_c_tkh=`(cd $i/generic; pwd)`
7490       break
7491     fi
7492   done
7493 fi
7494 # see if one is installed
7495 if test x"${ac_cv_c_tkh}" = x ; then
7496    ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
7497 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
7498 echo "configure:7499: checking for tk.h" >&5
7499 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7500   echo $ac_n "(cached) $ac_c" 1>&6
7501 else
7502   cat > conftest.$ac_ext <<EOF
7503 #line 7504 "configure"
7504 #include "confdefs.h"
7505 #include <tk.h>
7506 EOF
7507 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7508 { (eval echo configure:7509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7509 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7510 if test -z "$ac_err"; then
7511   rm -rf conftest*
7512   eval "ac_cv_header_$ac_safe=yes"
7513 else
7514   echo "$ac_err" >&5
7515   echo "configure: failed program was:" >&5
7516   cat conftest.$ac_ext >&5
7517   rm -rf conftest*
7518   eval "ac_cv_header_$ac_safe=no"
7519 fi
7520 rm -f conftest*
7521 fi
7522 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7523   echo "$ac_t""yes" 1>&6
7524   ac_cv_c_tkh=installed
7525 else
7526   echo "$ac_t""no" 1>&6
7527 ac_cv_c_tkh=""
7528 fi
7529
7530 fi
7531
7532 fi
7533
7534 if test x"${ac_cv_c_tkh}" != x ; then
7535   no_tk=""
7536   if test x"${ac_cv_c_tkh}" = x"installed" ; then
7537     echo "$ac_t""is installed" 1>&6
7538     TKHDIR=""
7539   else
7540     echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
7541     # this hack is cause the TKHDIR won't print if there is a "-I" in it.
7542     TKHDIR="-I${ac_cv_c_tkh}"
7543   fi
7544 else
7545   TKHDIR="# no Tk directory found"
7546   echo "configure: warning: Can't find Tk private headers" 1>&2
7547   no_tk=true
7548 fi
7549
7550
7551
7552            
7553 echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
7554 echo "configure:7555: checking for Itcl private headers. srcdir=${srcdir}" >&5
7555 if test x"${ac_cv_c_itclh}" = x ; then
7556   for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
7557     if test -f $i/generic/itcl.h ; then
7558       ac_cv_c_itclh=`(cd $i/generic; pwd)`
7559       break
7560     fi
7561   done
7562 fi
7563 if test x"${ac_cv_c_itclh}" = x ; then
7564   ITCLHDIR="# no Itcl private headers found"
7565   { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
7566 fi
7567 if test x"${ac_cv_c_itclh}" != x ; then
7568      ITCLHDIR="-I${ac_cv_c_itclh}"
7569 fi
7570 # should always be here
7571 #     ITCLLIB="../itcl/itcl/unix/libitcl.a"
7572
7573 #AC_SUBST(ITCLLIB)
7574
7575            
7576 echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
7577 echo "configure:7578: checking for Itk private headers. srcdir=${srcdir}" >&5
7578 if test x"${ac_cv_c_itkh}" = x ; then
7579   for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
7580     if test -f $i/generic/itk.h ; then
7581       ac_cv_c_itkh=`(cd $i/generic; pwd)`
7582       break
7583     fi
7584   done
7585 fi
7586 if test x"${ac_cv_c_itkh}" = x ; then
7587   ITKHDIR="# no Itk private headers found"
7588   { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
7589 fi
7590 if test x"${ac_cv_c_itkh}" != x ; then
7591      ITKHDIR="-I${ac_cv_c_itkh}"
7592 fi
7593 # should always be here
7594 #     ITKLIB="../itcl/itk/unix/libitk.a"
7595
7596 #AC_SUBST(ITKLIB)
7597
7598            
7599 echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
7600 echo "configure:7601: checking for Tix private headers. srcdir=${srcdir}" >&5
7601 if test x"${ac_cv_c_tixh}" = x ; then
7602   for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
7603     if test -f $i/generic/tix.h ; then
7604       ac_cv_c_tixh=`(cd $i/generic; pwd)`
7605       break
7606     fi
7607   done
7608 fi
7609 if test x"${ac_cv_c_tixh}" = x ; then
7610   TIXHDIR="# no Tix private headers found"
7611   { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; }
7612 fi
7613 if test x"${ac_cv_c_tixh}" != x ; then
7614      TIXHDIR="-I${ac_cv_c_tixh}"
7615 fi
7616
7617
7618
7619
7620            # now look for Tk library stuff
7621
7622            case "${host}" in
7623            *-*-cygwin*)
7624                tkdir=../tk/win/
7625                ;;
7626            *)
7627                tkdir=../tk/unix/
7628                ;;
7629            esac
7630
7631            TK_DEPS="${tkdir}${TK_LIB_FILE}"
7632
7633            # now look for Itcl library stuff
7634
7635            
7636 #
7637 # Ok, lets find the itcl configuration
7638 # First, look for one uninstalled.  
7639 # the alternative search directory is invoked by --with-itclconfig
7640 #
7641
7642 if test x"${no_itcl}" = x ; then
7643   # we reset no_itcl in case something fails here
7644   no_itcl=true
7645   # Check whether --with-itclconfig or --without-itclconfig was given.
7646 if test "${with_itclconfig+set}" = set; then
7647   withval="$with_itclconfig"
7648   with_itclconfig=${withval}
7649 fi
7650
7651   echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
7652 echo "configure:7653: checking for Itcl configuration" >&5
7653   if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
7654   echo $ac_n "(cached) $ac_c" 1>&6
7655 else
7656   
7657
7658   # First check to see if --with-itclconfig was specified.
7659   if test x"${with_itclconfig}" != x ; then
7660     if test -f "${with_itclconfig}/itclConfig.sh" ; then
7661       ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
7662     else
7663       { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
7664     fi
7665   fi
7666
7667   # then check for a private Itcl library
7668   if test x"${ac_cv_c_itclconfig}" = x ; then
7669     for i in \
7670                 ../itcl/itcl \
7671                 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
7672                 ../../itcl \
7673                 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
7674                 ../../../itcl \
7675                 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
7676       if test -f "$i/itclConfig.sh" ; then
7677         ac_cv_c_itclconfig=`(cd $i; pwd)`
7678         break
7679       fi
7680     done
7681   fi
7682   # check in a few common install locations
7683   if test x"${ac_cv_c_itclconfig}" = x ; then
7684     for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7685       if test -f "$i/itclConfig.sh" ; then
7686         ac_cv_c_itclconfig=`(cd $i; pwd)`
7687         break
7688       fi
7689     done
7690   fi
7691   # check in a few other private locations
7692   if test x"${ac_cv_c_itclconfig}" = x ; then
7693     for i in \
7694                 ${srcdir}/../itcl/itcl \
7695                 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
7696       if test -f "$i/itclConfig.sh" ; then
7697         ac_cv_c_itclconfig=`(cd $i; pwd)`
7698         break
7699       fi
7700     done
7701   fi
7702   
7703 fi
7704
7705   if test x"${ac_cv_c_itclconfig}" = x ; then
7706     ITCLCONFIG="# no Itcl configs found"
7707     echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
7708   else
7709     no_itcl=
7710     ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
7711     echo "$ac_t""found $ITCLCONFIG" 1>&6
7712   fi
7713 fi
7714
7715            if test -z "${no_itcl}"; then
7716              
7717     if test -f "$ITCLCONFIG" ; then
7718       . $ITCLCONFIG
7719     fi
7720
7721     
7722     
7723
7724     
7725
7726
7727     
7728     
7729     
7730
7731              case "${host}" in
7732              *-*-cygwin*)
7733                 itcldir=../itcl/itcl/win/
7734                 ;;
7735              *)
7736                 itcldir=../itcl/itcl/unix/
7737                 ;;
7738              esac
7739  
7740
7741              ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
7742              ITCL_DEPS="${itcldir}${ITCL_LIB_FILE}"
7743            fi
7744
7745            
7746            # now look for Itk library stuff
7747            
7748 #
7749 # Ok, lets find the itk configuration
7750 # First, look for one uninstalled.  
7751 # the alternative search directory is invoked by --with-itkconfig
7752 #
7753
7754 if test x"${no_itk}" = x ; then
7755   # we reset no_itk in case something fails here
7756   no_itk=true
7757   # Check whether --with-itkconfig or --without-itkconfig was given.
7758 if test "${with_itkconfig+set}" = set; then
7759   withval="$with_itkconfig"
7760   with_itkconfig=${withval}
7761 fi
7762
7763   echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
7764 echo "configure:7765: checking for Itk configuration" >&5
7765   if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
7766   echo $ac_n "(cached) $ac_c" 1>&6
7767 else
7768   
7769
7770   # First check to see if --with-itkconfig was specified.
7771   if test x"${with_itkconfig}" != x ; then
7772     if test -f "${with_itkconfig}/itkConfig.sh" ; then
7773       ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
7774     else
7775       { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
7776     fi
7777   fi
7778
7779   # then check for a private Itk library
7780   if test x"${ac_cv_c_itkconfig}" = x ; then
7781     for i in \
7782                 ../itcl/itk \
7783                 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
7784                 ../../itk \
7785                 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
7786                 ../../../itk \
7787                 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
7788       if test -f "$i/itkConfig.sh" ; then
7789         ac_cv_c_itkconfig=`(cd $i; pwd)`
7790         break
7791       fi
7792     done
7793   fi
7794   # check in a few common install locations
7795   if test x"${ac_cv_c_itkconfig}" = x ; then
7796     for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7797       if test -f "$i/itkConfig.sh" ; then
7798         ac_cv_c_itkconfig=`(cd $i; pwd)`
7799         break
7800       fi
7801     done
7802   fi
7803   # check in a few other private locations
7804   if test x"${ac_cv_c_itkconfig}" = x ; then
7805     for i in \
7806                 ${srcdir}/../itcl/itk \
7807                 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
7808       if test -f "$i/itkConfig.sh" ; then
7809         ac_cv_c_itkconfig=`(cd $i; pwd)`
7810         break
7811       fi
7812     done
7813   fi
7814   
7815 fi
7816
7817   if test x"${ac_cv_c_itkconfig}" = x ; then
7818     ITKCONFIG="# no Itk configs found"
7819     echo "configure: warning: Can't find Itk configuration definitions" 1>&2
7820   else
7821     no_itk=
7822     ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
7823     echo "$ac_t""found $ITKCONFIG" 1>&6
7824   fi
7825 fi
7826
7827
7828            if test -z "${no_itcl}"; then
7829              
7830     if test -f "$ITKCONFIG" ; then
7831       . $ITKCONFIG
7832     fi
7833
7834     
7835     
7836
7837     
7838
7839
7840     
7841     
7842     
7843
7844
7845              case "${host}" in
7846                *-*-cygwin*)
7847                  itkdir=../itcl/itk/win/
7848                  ;;
7849                *)
7850                  itkdir=../itcl/itk/unix/
7851                  ;;
7852                esac 
7853
7854              ITKLIB="${ITK_BUILD_LIB_SPEC}"
7855              ITK_DEPS="${itkdir}${ITK_LIB_FILE}"
7856            fi
7857
7858            # now look for Tix library stuff
7859            
7860 #
7861 # Ok, lets find the tix configuration
7862 # First, look for one uninstalled.  
7863 # the alternative search directory is invoked by --with-itkconfig
7864 #
7865
7866 if test x"${no_tix}" = x ; then
7867   # we reset no_tix in case something fails here
7868   no_tix=true
7869   # Check whether --with-tixconfig or --without-tixconfig was given.
7870 if test "${with_tixconfig+set}" = set; then
7871   withval="$with_tixconfig"
7872   with_tixconfig=${withval}
7873 fi
7874
7875   echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6
7876 echo "configure:7877: checking for Tix configuration" >&5
7877   if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then
7878   echo $ac_n "(cached) $ac_c" 1>&6
7879 else
7880   
7881
7882   # First check to see if --with-tixconfig was specified.
7883   if test x"${with_tixconfig}" != x ; then
7884     if test -f "${with_tixconfig}/tixConfig.sh" ; then
7885       ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)`
7886     else
7887       { echo "configure: error: ${with_tixconfig} directory doesn't contain tixConfig.sh" 1>&2; exit 1; }
7888     fi
7889   fi
7890
7891   # then check for a private Tix library
7892   if test x"${ac_cv_c_tixconfig}" = x ; then
7893     for i in \
7894                 ../tix \
7895                 `ls -dr ../tix 2>/dev/null` \
7896                 ../../tix \
7897                 `ls -dr ../../tix 2>/dev/null` \
7898                 ../../../tix \
7899                 `ls -dr ../../../tix 2>/dev/null` ; do
7900       echo "**** Looking at $i - with ${configdir}"
7901       if test -f "$i/tixConfig.sh" ; then
7902         ac_cv_c_tixconfig=`(cd $i; pwd)`
7903         break
7904       fi
7905     done
7906   fi
7907   # check in a few common install locations
7908   if test x"${ac_cv_c_tixconfig}" = x ; then
7909     for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
7910       echo "**** Looking at $i"
7911       if test -f "$i/tixConfig.sh" ; then
7912         ac_cv_c_tixconfig=`(cd $i; pwd)`
7913         break
7914       fi
7915     done
7916   fi
7917   # check in a few other private locations
7918   echo "**** Other private locations"
7919   if test x"${ac_cv_c_tixconfig}" = x ; then
7920     for i in \
7921                 ${srcdir}/../tix \
7922                 `ls -dr ${srcdir}/../tix 2>/dev/null` ; do
7923       echo "**** Looking at $i - with ${configdir}"
7924       if test -f "$i/${configdir}/tixConfig.sh" ; then
7925         ac_cv_c_tixconfig=`(cd $i/${configdir}; pwd)`
7926         break
7927       fi
7928     done
7929   fi
7930   
7931 fi
7932
7933   if test x"${ac_cv_c_tixconfig}" = x ; then
7934     TIXCONFIG="# no Tix configs found"
7935     echo "configure: warning: Can't find Tix configuration definitions" 1>&2
7936   else
7937     no_tix=
7938     TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh
7939     echo "$ac_t""found $TIXCONFIG" 1>&6
7940   fi
7941 fi
7942
7943
7944            if test -z "${no_tix}"; then
7945              
7946     if test -f "$TIXCONFIG" ; then
7947       . $TIXCONFIG
7948     fi
7949
7950     
7951
7952
7953
7954
7955     
7956
7957              TIXLIB="${TIX_BUILD_LIB_SPEC}"
7958              TIX_DEPS="${TIX_BUILD_LOCATION}/${TIX_LIB_FILE}"
7959            fi
7960
7961            ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
7962            # Tcl/Tk 8.1 require -fwritable strings.  I don't
7963            # know whether 8.2 will or not, but I bet it will.
7964            # I don't have to worry about 7.x since we don't support it.
7965            GDBTK_CFLAGS=""
7966            if test "$GCC" = "yes"; then
7967                if test "$TCL_VERSION" != "8.0" ; then
7968                    GDBTK_CFLAGS="-fwritable-strings"
7969                fi
7970            fi
7971
7972            # Include some libraries that Tcl and Tk want.
7973            TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
7974            # Yes, the ordering seems wrong here.  But it isn't.
7975            # TK_LIBS is the list of libraries that need to be linked
7976            # after Tcl/Tk.  Note that this isn't put into LIBS.  If it
7977            # were in LIBS then any link tests after this point would
7978            # try to include things like `$(LIBGUI)', which wouldn't work.
7979            GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
7980
7981            CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
7982            CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
7983            CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
7984            CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_GDBTK_INITS)"
7985            CONFIG_ALL="${CONFIG_ALL} \$(SUBDIR_GDBTK_ALL)"
7986            CONFIG_CLEAN="${CONFIG_CLEAN} \$(SUBDIR_GDBTK_CLEAN)"
7987            CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)"
7988            CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)"
7989
7990            if test x$gdb_cv_os_cygwin = xyes; then
7991               WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
7992               WIN32LDAPP="-Wl,--subsystem,console"
7993               CONFIG_OBS="${CONFIG_OBS} gdbres.o"
7994            fi
7995         fi
7996     fi
7997 fi
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014 # If we find X, set shell vars x_includes and x_libraries to the
8015 # paths, otherwise set no_x=yes.
8016 # Uses ac_ vars as temps to allow command line to override cache and checks.
8017 # --without-x overrides everything else, but does not touch the cache.
8018 echo $ac_n "checking for X""... $ac_c" 1>&6
8019 echo "configure:8020: checking for X" >&5
8020
8021 # Check whether --with-x or --without-x was given.
8022 if test "${with_x+set}" = set; then
8023   withval="$with_x"
8024   :
8025 fi
8026
8027 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8028 if test "x$with_x" = xno; then
8029   # The user explicitly disabled X.
8030   have_x=disabled
8031 else
8032   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8033     # Both variables are already set.
8034     have_x=yes
8035   else
8036 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
8037   echo $ac_n "(cached) $ac_c" 1>&6
8038 else
8039   # One or both of the vars are not set, and there is no cached value.
8040 ac_x_includes=NO ac_x_libraries=NO
8041 rm -fr conftestdir
8042 if mkdir conftestdir; then
8043   cd conftestdir
8044   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
8045   cat > Imakefile <<'EOF'
8046 acfindx:
8047         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
8048 EOF
8049   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8050     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8051     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
8052     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8053     for ac_extension in a so sl; do
8054       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
8055         test -f $ac_im_libdir/libX11.$ac_extension; then
8056         ac_im_usrlibdir=$ac_im_libdir; break
8057       fi
8058     done
8059     # Screen out bogus values from the imake configuration.  They are
8060     # bogus both because they are the default anyway, and because
8061     # using them would break gcc on systems where it needs fixed includes.
8062     case "$ac_im_incroot" in
8063         /usr/include) ;;
8064         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
8065     esac
8066     case "$ac_im_usrlibdir" in
8067         /usr/lib | /lib) ;;
8068         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
8069     esac
8070   fi
8071   cd ..
8072   rm -fr conftestdir
8073 fi
8074
8075 if test "$ac_x_includes" = NO; then
8076   # Guess where to find include files, by looking for this one X11 .h file.
8077   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
8078
8079   # First, try using that file with no special directory specified.
8080 cat > conftest.$ac_ext <<EOF
8081 #line 8082 "configure"
8082 #include "confdefs.h"
8083 #include <$x_direct_test_include>
8084 EOF
8085 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8086 { (eval echo configure:8087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8087 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8088 if test -z "$ac_err"; then
8089   rm -rf conftest*
8090   # We can compile using X headers with no special include directory.
8091 ac_x_includes=
8092 else
8093   echo "$ac_err" >&5
8094   echo "configure: failed program was:" >&5
8095   cat conftest.$ac_ext >&5
8096   rm -rf conftest*
8097   # Look for the header file in a standard set of common directories.
8098 # Check X11 before X11Rn because it is often a symlink to the current release.
8099   for ac_dir in               \
8100     /usr/X11/include          \
8101     /usr/X11R6/include        \
8102     /usr/X11R5/include        \
8103     /usr/X11R4/include        \
8104                               \
8105     /usr/include/X11          \
8106     /usr/include/X11R6        \
8107     /usr/include/X11R5        \
8108     /usr/include/X11R4        \
8109                               \
8110     /usr/local/X11/include    \
8111     /usr/local/X11R6/include  \
8112     /usr/local/X11R5/include  \
8113     /usr/local/X11R4/include  \
8114                               \
8115     /usr/local/include/X11    \
8116     /usr/local/include/X11R6  \
8117     /usr/local/include/X11R5  \
8118     /usr/local/include/X11R4  \
8119                               \
8120     /usr/X386/include         \
8121     /usr/x386/include         \
8122     /usr/XFree86/include/X11  \
8123                               \
8124     /usr/include              \
8125     /usr/local/include        \
8126     /usr/unsupported/include  \
8127     /usr/athena/include       \
8128     /usr/local/x11r5/include  \
8129     /usr/lpp/Xamples/include  \
8130                               \
8131     /usr/openwin/include      \
8132     /usr/openwin/share/include \
8133     ; \
8134   do
8135     if test -r "$ac_dir/$x_direct_test_include"; then
8136       ac_x_includes=$ac_dir
8137       break
8138     fi
8139   done
8140 fi
8141 rm -f conftest*
8142 fi # $ac_x_includes = NO
8143
8144 if test "$ac_x_libraries" = NO; then
8145   # Check for the libraries.
8146
8147   test -z "$x_direct_test_library" && x_direct_test_library=Xt
8148   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
8149
8150   # See if we find them without any special options.
8151   # Don't add to $LIBS permanently.
8152   ac_save_LIBS="$LIBS"
8153   LIBS="-l$x_direct_test_library $LIBS"
8154 cat > conftest.$ac_ext <<EOF
8155 #line 8156 "configure"
8156 #include "confdefs.h"
8157
8158 int main() {
8159 ${x_direct_test_function}()
8160 ; return 0; }
8161 EOF
8162 if { (eval echo configure:8163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8163   rm -rf conftest*
8164   LIBS="$ac_save_LIBS"
8165 # We can link X programs with no special library path.
8166 ac_x_libraries=
8167 else
8168   echo "configure: failed program was:" >&5
8169   cat conftest.$ac_ext >&5
8170   rm -rf conftest*
8171   LIBS="$ac_save_LIBS"
8172 # First see if replacing the include by lib works.
8173 # Check X11 before X11Rn because it is often a symlink to the current release.
8174 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
8175     /usr/X11/lib          \
8176     /usr/X11R6/lib        \
8177     /usr/X11R5/lib        \
8178     /usr/X11R4/lib        \
8179                           \
8180     /usr/lib/X11          \
8181     /usr/lib/X11R6        \
8182     /usr/lib/X11R5        \
8183     /usr/lib/X11R4        \
8184                           \
8185     /usr/local/X11/lib    \
8186     /usr/local/X11R6/lib  \
8187     /usr/local/X11R5/lib  \
8188     /usr/local/X11R4/lib  \
8189                           \
8190     /usr/local/lib/X11    \
8191     /usr/local/lib/X11R6  \
8192     /usr/local/lib/X11R5  \
8193     /usr/local/lib/X11R4  \
8194                           \
8195     /usr/X386/lib         \
8196     /usr/x386/lib         \
8197     /usr/XFree86/lib/X11  \
8198                           \
8199     /usr/lib              \
8200     /usr/local/lib        \
8201     /usr/unsupported/lib  \
8202     /usr/athena/lib       \
8203     /usr/local/x11r5/lib  \
8204     /usr/lpp/Xamples/lib  \
8205     /lib/usr/lib/X11      \
8206                           \
8207     /usr/openwin/lib      \
8208     /usr/openwin/share/lib \
8209     ; \
8210 do
8211   for ac_extension in a so sl; do
8212     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
8213       ac_x_libraries=$ac_dir
8214       break 2
8215     fi
8216   done
8217 done
8218 fi
8219 rm -f conftest*
8220 fi # $ac_x_libraries = NO
8221
8222 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
8223   # Didn't find X anywhere.  Cache the known absence of X.
8224   ac_cv_have_x="have_x=no"
8225 else
8226   # Record where we found X for the cache.
8227   ac_cv_have_x="have_x=yes \
8228                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
8229 fi
8230 fi
8231   fi
8232   eval "$ac_cv_have_x"
8233 fi # $with_x != no
8234
8235 if test "$have_x" != yes; then
8236   echo "$ac_t""$have_x" 1>&6
8237   no_x=yes
8238 else
8239   # If each of the values was on the command line, it overrides each guess.
8240   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8241   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8242   # Update the cache value to reflect the command line values.
8243   ac_cv_have_x="have_x=yes \
8244                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
8245   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
8246 fi
8247
8248
8249  
8250 # Unlike the sim directory, whether a simulator is linked is controlled by 
8251 # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file.  
8252 # This code just checks for a few cases where we'd like to ignore those
8253 # definitions, even when they're present in the '.mt' file.  These cases
8254 # are when --disable-sim is specified, or if the simulator directory is
8255 # not part of the source tree.
8256 #
8257 # Check whether --enable-sim or --disable-sim was given.
8258 if test "${enable_sim+set}" = set; then
8259   enableval="$enable_sim"
8260   echo "enable_sim = $enable_sim";
8261  echo "enableval = ${enableval}";
8262  case "${enableval}" in
8263   yes) ignore_sim=false ;;
8264   no)  ignore_sim=true ;;
8265   *)   ignore_sim=false ;;
8266  esac
8267 else
8268   ignore_sim=false
8269 fi
8270
8271
8272 if test ! -d "${srcdir}/../sim"; then
8273   ignore_sim=true
8274 fi
8275
8276 if test "${ignore_sim}" = "true"; then
8277     IGNORE_SIM="SIM="
8278     IGNORE_SIM_OBS="SIM_OBS="
8279 else
8280     IGNORE_SIM=""
8281     IGNORE_SIM_OBS=""
8282     cat >> confdefs.h <<\EOF
8283 #define WITH_SIM 1
8284 EOF
8285
8286 fi
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302 # Begin stuff to support --enable-shared
8303 # Check whether --enable-shared or --disable-shared was given.
8304 if test "${enable_shared+set}" = set; then
8305   enableval="$enable_shared"
8306   case "${enableval}" in
8307   yes) shared=true ;;
8308   no)  shared=false ;;
8309   *) shared=true ;;
8310 esac
8311 fi
8312
8313 HLDFLAGS=
8314 HLDENV=
8315 # If we have shared libraries, try to set rpath reasonably.
8316 if test "${shared}" = "true"; then
8317   case "${host}" in
8318   *-*-hpux*)
8319     HLDFLAGS='-Wl,+s,+b,$(libdir)'
8320     ;;
8321   *-*-irix5* | *-*-irix6*)
8322     HLDFLAGS='-Wl,-rpath,$(libdir)'
8323     ;;
8324   *-*-linux*aout*)
8325     ;;
8326   *-*-linux* | *-pc-linux-gnu*)
8327     HLDFLAGS='-Wl,-rpath,$(libdir)'
8328     ;;
8329   *-*-solaris*)
8330     HLDFLAGS='-R $(libdir)'
8331     ;;
8332   *-*-sysv4*)
8333     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;'
8334     ;;
8335   esac
8336 fi
8337
8338 # On SunOS, if the linker supports the -rpath option, use it to
8339 # prevent ../bfd and ../opcodes from being included in the run time
8340 # search path.
8341 case "${host}" in
8342   *-*-sunos*)
8343     echo 'main () { }' > conftest.c
8344     ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
8345     if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
8346       :
8347     elif grep 'No such file' conftest.t >/dev/null 2>&1; then
8348       :
8349     elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
8350       :
8351     elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
8352       :
8353     elif test "${shared}" = "true"; then
8354       HLDFLAGS='-Wl,-rpath=$(libdir)'
8355     else
8356       HLDFLAGS='-Wl,-rpath='
8357     fi
8358     rm -f conftest.t conftest.c conftest
8359     ;;
8360 esac
8361
8362
8363 # End stuff to support --enable-shared
8364
8365 # target_subdir is used by the testsuite to find the target libraries.
8366 target_subdir=
8367 if test "${host}" != "${target}"; then
8368     target_subdir="${target_alias}/"
8369 fi
8370
8371
8372 frags=
8373 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
8374 if test ! -f ${host_makefile_frag}; then
8375 { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
8376 fi
8377 frags="$frags $host_makefile_frag"
8378
8379 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
8380 if test ! -f ${target_makefile_frag}; then
8381 { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
8382 fi
8383 frags="$frags $target_makefile_frag"
8384
8385
8386
8387
8388
8389 hostfile=`sed -n '
8390 s/XM_FILE[      ]*=[    ]*\([^  ]*\)/\1/p
8391 ' ${host_makefile_frag}`
8392
8393 targetfile=`sed -n '
8394 s/TM_FILE[      ]*=[    ]*\([^  ]*\)/\1/p
8395 ' ${target_makefile_frag}`
8396
8397 GDB_MULTI_ARCH=`sed -n '
8398 s/GDB_MULTI_ARCH[       ]*=[    ]*\([^  ]*\)[   ]*/\1/p
8399 ' ${target_makefile_frag}`
8400
8401 # these really aren't orthogonal true/false values of the same condition,
8402 # but shells are slow enough that I like to reuse the test conditions
8403 # whenever possible
8404 if test "${target}" = "${host}"; then
8405 nativefile=`sed -n '
8406 s/NAT_FILE[     ]*=[    ]*\([^  ]*\)/\1/p
8407 ' ${host_makefile_frag}`
8408 # else
8409 # GDBserver is only useful in a "native" environment
8410 # configdirs=`echo $configdirs | sed 's/gdbserver//'`
8411 fi
8412
8413
8414 # New targets should just set gdb_multi_arch=yes in configure.tgt.
8415 # Old targets being converted can either do that or set GDB_MULTI_ARCH
8416 # in the target specific makefile frag.  Eventually gdb_multi_arch=yes
8417 # will be the default.
8418 if test x"${GDB_MULTI_ARCH}" = x ; then
8419     case "${gdb_multi_arch}" in
8420     yes ) GDB_MULTI_ARCH=GDB_MULTI_ARCH_PURE ;;
8421     no ) GDB_MULTI_ARCH=0 ;;
8422     0|1|2 ) GDB_MULTI_ARCH=${gdb_multi_arch} ;;
8423     esac
8424 fi
8425 if test x"${GDB_MULTI_ARCH}" != x ; then
8426     cat >> confdefs.h <<EOF
8427 #define GDB_MULTI_ARCH ${GDB_MULTI_ARCH}
8428 EOF
8429
8430 fi
8431 # Warn the user when they use an old practice
8432 case "${GDB_MULTI_ARCH}" in
8433     "" ) ;;
8434     0 | GDB_MULTI_ARCH_PARTIAL | 1 | GDB_MULTI_ARCH_TM | 2 )
8435         echo "configure: warning: "GDB: Target is not pure multi-arch"" 1>&2 ;;
8436     GDB_MULTI_ARCH_PURE )
8437         if test x"${targetfile}" != x ; then
8438             echo "configure: warning: "GDB: Ignoring TM_FILE in ${target_makefile_frag}"" 1>&2
8439             targetfile=""
8440         fi ;;
8441     *)  { echo "configure: error: "GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}"" 1>&2; exit 1; };;
8442 esac
8443
8444
8445 SUBDIRS="doc testsuite nlm"
8446 if test "${enable_multi_ice}" = "yes"; then
8447   SUBDIRS="${SUBDIRS} multi-ice"
8448 fi
8449
8450
8451
8452 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
8453 # (NAT_FILE) is not set in config/*/*.m[ht] files, we link to an empty
8454 # version.
8455
8456 files=
8457 links=
8458
8459 rm -f xm.h
8460 xm_h=""
8461 if test "${hostfile}" != ""; then
8462     xm_h=xm.h
8463     GDB_XM_FILE="config/${gdb_host_cpu}/${hostfile}"
8464     files="${files} ${GDB_XM_FILE}"
8465     links="${links} xm.h"
8466     cat >> confdefs.h <<EOF
8467 #define GDB_XM_FILE ${GDB_XM_FILE}
8468 EOF
8469
8470 fi
8471
8472
8473 rm -f tm.h
8474 tm_h=""
8475 if test "${targetfile}" != ""; then
8476     tm_h=tm.h
8477     GDB_TM_FILE="config/${gdb_target_cpu}/${targetfile}"
8478     files="${files} ${GDB_TM_FILE}"
8479     links="${links} tm.h"
8480     cat >> confdefs.h <<EOF
8481 #define GDB_TM_FILE ${GDB_TM_FILE}
8482 EOF
8483
8484 fi
8485
8486
8487 rm -f nm.h
8488 nm_h=""
8489 if test "${nativefile}" != ""; then
8490     nm_h=nm.h
8491     GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}"
8492     files="${files} ${GDB_NM_FILE}"
8493     links="${links} nm.h"
8494     cat >> confdefs.h <<EOF
8495 #define GDB_NM_FILE ${GDB_NM_FILE}
8496 EOF
8497
8498 fi
8499
8500
8501 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
8502 echo "configure:8503: checking whether ln -s works" >&5
8503 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
8504   echo $ac_n "(cached) $ac_c" 1>&6
8505 else
8506   rm -f conftestdata
8507 if ln -s X conftestdata 2>/dev/null
8508 then
8509   rm -f conftestdata
8510   ac_cv_prog_LN_S="ln -s"
8511 else
8512   ac_cv_prog_LN_S=ln
8513 fi
8514 fi
8515 LN_S="$ac_cv_prog_LN_S"
8516 if test "$ac_cv_prog_LN_S" = "ln -s"; then
8517   echo "$ac_t""yes" 1>&6
8518 else
8519   echo "$ac_t""no" 1>&6
8520 fi
8521
8522
8523
8524
8525 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
8526 echo "configure:8527: checking for Cygwin environment" >&5
8527 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
8528   echo $ac_n "(cached) $ac_c" 1>&6
8529 else
8530   cat > conftest.$ac_ext <<EOF
8531 #line 8532 "configure"
8532 #include "confdefs.h"
8533
8534 int main() {
8535
8536 #ifndef __CYGWIN__
8537 #define __CYGWIN__ __CYGWIN32__
8538 #endif
8539 return __CYGWIN__;
8540 ; return 0; }
8541 EOF
8542 if { (eval echo configure:8543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8543   rm -rf conftest*
8544   ac_cv_cygwin=yes
8545 else
8546   echo "configure: failed program was:" >&5
8547   cat conftest.$ac_ext >&5
8548   rm -rf conftest*
8549   ac_cv_cygwin=no
8550 fi
8551 rm -f conftest*
8552 rm -f conftest*
8553 fi
8554
8555 echo "$ac_t""$ac_cv_cygwin" 1>&6
8556 CYGWIN=
8557 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8558 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8559 echo "configure:8560: checking for mingw32 environment" >&5
8560 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
8561   echo $ac_n "(cached) $ac_c" 1>&6
8562 else
8563   cat > conftest.$ac_ext <<EOF
8564 #line 8565 "configure"
8565 #include "confdefs.h"
8566
8567 int main() {
8568 return __MINGW32__;
8569 ; return 0; }
8570 EOF
8571 if { (eval echo configure:8572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8572   rm -rf conftest*
8573   ac_cv_mingw32=yes
8574 else
8575   echo "configure: failed program was:" >&5
8576   cat conftest.$ac_ext >&5
8577   rm -rf conftest*
8578   ac_cv_mingw32=no
8579 fi
8580 rm -f conftest*
8581 rm -f conftest*
8582 fi
8583
8584 echo "$ac_t""$ac_cv_mingw32" 1>&6
8585 MINGW32=
8586 test "$ac_cv_mingw32" = yes && MINGW32=yes
8587
8588
8589 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8590 echo "configure:8591: checking for executable suffix" >&5
8591 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
8592   echo $ac_n "(cached) $ac_c" 1>&6
8593 else
8594   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
8595   ac_cv_exeext=.exe
8596 else
8597   rm -f conftest*
8598   echo 'int main () { return 0; }' > conftest.$ac_ext
8599   ac_cv_exeext=
8600   if { (eval echo configure:8601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8601     for file in conftest.*; do
8602       case $file in
8603       *.c | *.o | *.obj) ;;
8604       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8605       esac
8606     done
8607   else
8608     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8609   fi
8610   rm -f conftest*
8611   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8612 fi
8613 fi
8614
8615 EXEEXT=""
8616 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8617 echo "$ac_t""${ac_cv_exeext}" 1>&6
8618 ac_exeext=$EXEEXT
8619
8620
8621 subdirs="$configdirs"
8622
8623 trap '' 1 2 15
8624 cat > confcache <<\EOF
8625 # This file is a shell script that caches the results of configure
8626 # tests run on this system so they can be shared between configure
8627 # scripts and configure runs.  It is not useful on other systems.
8628 # If it contains results you don't want to keep, you may remove or edit it.
8629 #
8630 # By default, configure uses ./config.cache as the cache file,
8631 # creating it if it does not exist already.  You can give configure
8632 # the --cache-file=FILE option to use a different cache file; that is
8633 # what configure does when it calls configure scripts in
8634 # subdirectories, so they share the cache.
8635 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8636 # config.status only pays attention to the cache file if you give it the
8637 # --recheck option to rerun configure.
8638 #
8639 EOF
8640 # The following way of writing the cache mishandles newlines in values,
8641 # but we know of no workaround that is simple, portable, and efficient.
8642 # So, don't put newlines in cache variables' values.
8643 # Ultrix sh set writes to stderr and can't be redirected directly,
8644 # and sets the high bit in the cache file unless we assign to the vars.
8645 (set) 2>&1 |
8646   case `(ac_space=' '; set | grep ac_space) 2>&1` in
8647   *ac_space=\ *)
8648     # `set' does not quote correctly, so add quotes (double-quote substitution
8649     # turns \\\\ into \\, and sed turns \\ into \).
8650     sed -n \
8651       -e "s/'/'\\\\''/g" \
8652       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8653     ;;
8654   *)
8655     # `set' quotes correctly as required by POSIX, so do not add quotes.
8656     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8657     ;;
8658   esac >> confcache
8659 if cmp -s $cache_file confcache; then
8660   :
8661 else
8662   if test -w $cache_file; then
8663     echo "updating cache $cache_file"
8664     cat confcache > $cache_file
8665   else
8666     echo "not updating unwritable cache $cache_file"
8667   fi
8668 fi
8669 rm -f confcache
8670
8671 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8672
8673 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8674 # Let make expand exec_prefix.
8675 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8676
8677 # Any assignment to VPATH causes Sun make to only execute
8678 # the first set of double-colon rules, so remove it if not needed.
8679 # If there is a colon in the path, we need to keep it.
8680 if test "x$srcdir" = x.; then
8681   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
8682 fi
8683
8684 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8685
8686 DEFS=-DHAVE_CONFIG_H
8687
8688 # Without the "./", some shells look in PATH for config.status.
8689 : ${CONFIG_STATUS=./config.status}
8690
8691 echo creating $CONFIG_STATUS
8692 rm -f $CONFIG_STATUS
8693 cat > $CONFIG_STATUS <<EOF
8694 #! /bin/sh
8695 # Generated automatically by configure.
8696 # Run this file to recreate the current configuration.
8697 # This directory was configured as follows,
8698 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8699 #
8700 # $0 $ac_configure_args
8701 #
8702 # Compiler output produced by configure, useful for debugging
8703 # configure, is in ./config.log if it exists.
8704
8705 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8706 for ac_option
8707 do
8708   case "\$ac_option" in
8709   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8710     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8711     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8712   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8713     echo "$CONFIG_STATUS generated by autoconf version 2.13"
8714     exit 0 ;;
8715   -help | --help | --hel | --he | --h)
8716     echo "\$ac_cs_usage"; exit 0 ;;
8717   *) echo "\$ac_cs_usage"; exit 1 ;;
8718   esac
8719 done
8720
8721 ac_given_srcdir=$srcdir
8722 ac_given_INSTALL="$INSTALL"
8723
8724 trap 'rm -fr `echo "Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8725 EOF
8726 cat >> $CONFIG_STATUS <<EOF
8727
8728 # Protect against being on the right side of a sed subst in config.status.
8729 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8730  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8731 $ac_vpsub
8732 $extrasub
8733 s%@SHELL@%$SHELL%g
8734 s%@CFLAGS@%$CFLAGS%g
8735 s%@CPPFLAGS@%$CPPFLAGS%g
8736 s%@CXXFLAGS@%$CXXFLAGS%g
8737 s%@FFLAGS@%$FFLAGS%g
8738 s%@DEFS@%$DEFS%g
8739 s%@LDFLAGS@%$LDFLAGS%g
8740 s%@LIBS@%$LIBS%g
8741 s%@exec_prefix@%$exec_prefix%g
8742 s%@prefix@%$prefix%g
8743 s%@program_transform_name@%$program_transform_name%g
8744 s%@bindir@%$bindir%g
8745 s%@sbindir@%$sbindir%g
8746 s%@libexecdir@%$libexecdir%g
8747 s%@datadir@%$datadir%g
8748 s%@sysconfdir@%$sysconfdir%g
8749 s%@sharedstatedir@%$sharedstatedir%g
8750 s%@localstatedir@%$localstatedir%g
8751 s%@libdir@%$libdir%g
8752 s%@includedir@%$includedir%g
8753 s%@oldincludedir@%$oldincludedir%g
8754 s%@infodir@%$infodir%g
8755 s%@mandir@%$mandir%g
8756 s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
8757 s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
8758 s%@MAINT@%$MAINT%g
8759 s%@CC@%$CC%g
8760 s%@CPP@%$CPP%g
8761 s%@host@%$host%g
8762 s%@host_alias@%$host_alias%g
8763 s%@host_cpu@%$host_cpu%g
8764 s%@host_vendor@%$host_vendor%g
8765 s%@host_os@%$host_os%g
8766 s%@target@%$target%g
8767 s%@target_alias@%$target_alias%g
8768 s%@target_cpu@%$target_cpu%g
8769 s%@target_vendor@%$target_vendor%g
8770 s%@target_os@%$target_os%g
8771 s%@build@%$build%g
8772 s%@build_alias@%$build_alias%g
8773 s%@build_cpu@%$build_cpu%g
8774 s%@build_vendor@%$build_vendor%g
8775 s%@build_os@%$build_os%g
8776 s%@SET_MAKE@%$SET_MAKE%g
8777 s%@RANLIB@%$RANLIB%g
8778 s%@ALLOCA@%$ALLOCA%g
8779 s%@USE_NLS@%$USE_NLS%g
8780 s%@MSGFMT@%$MSGFMT%g
8781 s%@GMSGFMT@%$GMSGFMT%g
8782 s%@XGETTEXT@%$XGETTEXT%g
8783 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
8784 s%@CATALOGS@%$CATALOGS%g
8785 s%@CATOBJEXT@%$CATOBJEXT%g
8786 s%@DATADIRNAME@%$DATADIRNAME%g
8787 s%@GMOFILES@%$GMOFILES%g
8788 s%@INSTOBJEXT@%$INSTOBJEXT%g
8789 s%@INTLDEPS@%$INTLDEPS%g
8790 s%@INTLLIBS@%$INTLLIBS%g
8791 s%@INTLOBJS@%$INTLOBJS%g
8792 s%@POFILES@%$POFILES%g
8793 s%@POSUB@%$POSUB%g
8794 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
8795 s%@GT_NO@%$GT_NO%g
8796 s%@GT_YES@%$GT_YES%g
8797 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
8798 s%@l@%$l%g
8799 s%@AWK@%$AWK%g
8800 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8801 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
8802 s%@INSTALL_DATA@%$INSTALL_DATA%g
8803 s%@AR@%$AR%g
8804 s%@DLLTOOL@%$DLLTOOL%g
8805 s%@WINDRES@%$WINDRES%g
8806 s%@YACC@%$YACC%g
8807 s%@MIG@%$MIG%g
8808 s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
8809 s%@UIOUT_CFLAGS@%$UIOUT_CFLAGS%g
8810 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
8811 s%@WERROR_CFLAGS@%$WERROR_CFLAGS%g
8812 s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
8813 s%@MMALLOC@%$MMALLOC%g
8814 s%@REGEX@%$REGEX%g
8815 s%@SER_HARDWIRE@%$SER_HARDWIRE%g
8816 s%@TERM_LIB@%$TERM_LIB%g
8817 s%@WIN32LIBS@%$WIN32LIBS%g
8818 s%@LIBGUI@%$LIBGUI%g
8819 s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
8820 s%@WIN32LDAPP@%$WIN32LDAPP%g
8821 s%@TCL_VERSION@%$TCL_VERSION%g
8822 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
8823 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
8824 s%@TCL_CC@%$TCL_CC%g
8825 s%@TCL_DEFS@%$TCL_DEFS%g
8826 s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
8827 s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
8828 s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
8829 s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
8830 s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
8831 s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
8832 s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
8833 s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
8834 s%@TCL_RANLIB@%$TCL_RANLIB%g
8835 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
8836 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
8837 s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
8838 s%@TK_VERSION@%$TK_VERSION%g
8839 s%@TK_DEFS@%$TK_DEFS%g
8840 s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
8841 s%@TK_XINCLUDES@%$TK_XINCLUDES%g
8842 s%@TK_XLIBSW@%$TK_XLIBSW%g
8843 s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
8844 s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
8845 s%@TCLHDIR@%$TCLHDIR%g
8846 s%@TKHDIR@%$TKHDIR%g
8847 s%@ITCLHDIR@%$ITCLHDIR%g
8848 s%@ITKHDIR@%$ITKHDIR%g
8849 s%@TIXHDIR@%$TIXHDIR%g
8850 s%@ITCL_VERSION@%$ITCL_VERSION%g
8851 s%@ITCL_DEFS@%$ITCL_DEFS%g
8852 s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
8853 s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
8854 s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
8855 s%@ITK_VERSION@%$ITK_VERSION%g
8856 s%@ITK_DEFS@%$ITK_DEFS%g
8857 s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
8858 s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
8859 s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
8860 s%@TIX_VERSION@%$TIX_VERSION%g
8861 s%@TIX_BUILD_LIB_SPEC@%$TIX_BUILD_LIB_SPEC%g
8862 s%@X_CFLAGS@%$X_CFLAGS%g
8863 s%@X_LDFLAGS@%$X_LDFLAGS%g
8864 s%@X_LIBS@%$X_LIBS%g
8865 s%@TCL_DEPS@%$TCL_DEPS%g
8866 s%@TK_DEPS@%$TK_DEPS%g
8867 s%@ITCLLIB@%$ITCLLIB%g
8868 s%@ITCL_DEPS@%$ITCL_DEPS%g
8869 s%@ITKLIB@%$ITKLIB%g
8870 s%@ITK_DEPS@%$ITK_DEPS%g
8871 s%@TIXLIB@%$TIXLIB%g
8872 s%@TIX_DEPS@%$TIX_DEPS%g
8873 s%@GDBTKLIBS@%$GDBTKLIBS%g
8874 s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
8875 s%@GDBTK_SRC_DIR@%$GDBTK_SRC_DIR%g
8876 s%@IGNORE_SIM@%$IGNORE_SIM%g
8877 s%@IGNORE_SIM_OBS@%$IGNORE_SIM_OBS%g
8878 s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
8879 s%@CONFIG_OBS@%$CONFIG_OBS%g
8880 s%@CONFIG_LIB_OBS@%$CONFIG_LIB_OBS%g
8881 s%@CONFIG_DEPS@%$CONFIG_DEPS%g
8882 s%@CONFIG_SRCS@%$CONFIG_SRCS%g
8883 s%@CONFIG_INITS@%$CONFIG_INITS%g
8884 s%@CONFIG_ALL@%$CONFIG_ALL%g
8885 s%@CONFIG_CLEAN@%$CONFIG_CLEAN%g
8886 s%@CONFIG_INSTALL@%$CONFIG_INSTALL%g
8887 s%@CONFIG_UNINSTALL@%$CONFIG_UNINSTALL%g
8888 s%@HLDFLAGS@%$HLDFLAGS%g
8889 s%@HLDENV@%$HLDENV%g
8890 s%@target_subdir@%$target_subdir%g
8891 /@host_makefile_frag@/r $host_makefile_frag
8892 s%@host_makefile_frag@%%g
8893 /@target_makefile_frag@/r $target_makefile_frag
8894 s%@target_makefile_frag@%%g
8895 s%@frags@%$frags%g
8896 s%@SUBDIRS@%$SUBDIRS%g
8897 s%@xm_h@%$xm_h%g
8898 s%@tm_h@%$tm_h%g
8899 s%@nm_h@%$nm_h%g
8900 s%@LN_S@%$LN_S%g
8901 s%@EXEEXT@%$EXEEXT%g
8902 s%@subdirs@%$subdirs%g
8903
8904 CEOF
8905 EOF
8906
8907 cat >> $CONFIG_STATUS <<\EOF
8908
8909 # Split the substitutions into bite-sized pieces for seds with
8910 # small command number limits, like on Digital OSF/1 and HP-UX.
8911 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8912 ac_file=1 # Number of current file.
8913 ac_beg=1 # First line for current file.
8914 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8915 ac_more_lines=:
8916 ac_sed_cmds=""
8917 while $ac_more_lines; do
8918   if test $ac_beg -gt 1; then
8919     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8920   else
8921     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8922   fi
8923   if test ! -s conftest.s$ac_file; then
8924     ac_more_lines=false
8925     rm -f conftest.s$ac_file
8926   else
8927     if test -z "$ac_sed_cmds"; then
8928       ac_sed_cmds="sed -f conftest.s$ac_file"
8929     else
8930       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8931     fi
8932     ac_file=`expr $ac_file + 1`
8933     ac_beg=$ac_end
8934     ac_end=`expr $ac_end + $ac_max_sed_cmds`
8935   fi
8936 done
8937 if test -z "$ac_sed_cmds"; then
8938   ac_sed_cmds=cat
8939 fi
8940 EOF
8941
8942 cat >> $CONFIG_STATUS <<EOF
8943
8944 CONFIG_FILES=\${CONFIG_FILES-"Makefile .gdbinit:gdbinit.in"}
8945 EOF
8946 cat >> $CONFIG_STATUS <<\EOF
8947 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8948   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8949   case "$ac_file" in
8950   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8951        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8952   *) ac_file_in="${ac_file}.in" ;;
8953   esac
8954
8955   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8956
8957   # Remove last slash and all that follows it.  Not all systems have dirname.
8958   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8959   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8960     # The file is in a subdirectory.
8961     test ! -d "$ac_dir" && mkdir "$ac_dir"
8962     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8963     # A "../" for each directory in $ac_dir_suffix.
8964     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8965   else
8966     ac_dir_suffix= ac_dots=
8967   fi
8968
8969   case "$ac_given_srcdir" in
8970   .)  srcdir=.
8971       if test -z "$ac_dots"; then top_srcdir=.
8972       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8973   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8974   *) # Relative path.
8975     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8976     top_srcdir="$ac_dots$ac_given_srcdir" ;;
8977   esac
8978
8979   case "$ac_given_INSTALL" in
8980   [/$]*) INSTALL="$ac_given_INSTALL" ;;
8981   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
8982   esac
8983
8984   echo creating "$ac_file"
8985   rm -f "$ac_file"
8986   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8987   case "$ac_file" in
8988   *Makefile*) ac_comsub="1i\\
8989 # $configure_input" ;;
8990   *) ac_comsub= ;;
8991   esac
8992
8993   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8994   sed -e "$ac_comsub
8995 s%@configure_input@%$configure_input%g
8996 s%@srcdir@%$srcdir%g
8997 s%@top_srcdir@%$top_srcdir%g
8998 s%@INSTALL@%$INSTALL%g
8999 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9000 fi; done
9001 rm -f conftest.s*
9002
9003 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9004 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9005 #
9006 # ac_d sets the value in "#define NAME VALUE" lines.
9007 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
9008 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
9009 ac_dC='\3'
9010 ac_dD='%g'
9011 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9012 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9013 ac_uB='\([      ]\)%\1#\2define\3'
9014 ac_uC=' '
9015 ac_uD='\4%g'
9016 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9017 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
9018 ac_eB='$%\1#\2define\3'
9019 ac_eC=' '
9020 ac_eD='%g'
9021
9022 if test "${CONFIG_HEADERS+set}" != set; then
9023 EOF
9024 cat >> $CONFIG_STATUS <<EOF
9025   CONFIG_HEADERS="config.h:config.in"
9026 EOF
9027 cat >> $CONFIG_STATUS <<\EOF
9028 fi
9029 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9030   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9031   case "$ac_file" in
9032   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9033        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9034   *) ac_file_in="${ac_file}.in" ;;
9035   esac
9036
9037   echo creating $ac_file
9038
9039   rm -f conftest.frag conftest.in conftest.out
9040   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9041   cat $ac_file_inputs > conftest.in
9042
9043 EOF
9044
9045 # Transform confdefs.h into a sed script conftest.vals that substitutes
9046 # the proper values into config.h.in to produce config.h.  And first:
9047 # Protect against being on the right side of a sed subst in config.status.
9048 # Protect against being in an unquoted here document in config.status.
9049 rm -f conftest.vals
9050 cat > conftest.hdr <<\EOF
9051 s/[\\&%]/\\&/g
9052 s%[\\$`]%\\&%g
9053 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
9054 s%ac_d%ac_u%gp
9055 s%ac_u%ac_e%gp
9056 EOF
9057 sed -n -f conftest.hdr confdefs.h > conftest.vals
9058 rm -f conftest.hdr
9059
9060 # This sed command replaces #undef with comments.  This is necessary, for
9061 # example, in the case of _POSIX_SOURCE, which is predefined and required
9062 # on some systems where configure will not decide to define it.
9063 cat >> conftest.vals <<\EOF
9064 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
9065 EOF
9066
9067 # Break up conftest.vals because some shells have a limit on
9068 # the size of here documents, and old seds have small limits too.
9069
9070 rm -f conftest.tail
9071 while :
9072 do
9073   ac_lines=`grep -c . conftest.vals`
9074   # grep -c gives empty output for an empty file on some AIX systems.
9075   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9076   # Write a limited-size here document to conftest.frag.
9077   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
9078   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9079   echo 'CEOF
9080   sed -f conftest.frag conftest.in > conftest.out
9081   rm -f conftest.in
9082   mv conftest.out conftest.in
9083 ' >> $CONFIG_STATUS
9084   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9085   rm -f conftest.vals
9086   mv conftest.tail conftest.vals
9087 done
9088 rm -f conftest.vals
9089
9090 cat >> $CONFIG_STATUS <<\EOF
9091   rm -f conftest.frag conftest.h
9092   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
9093   cat conftest.in >> conftest.h
9094   rm -f conftest.in
9095   if cmp -s $ac_file conftest.h 2>/dev/null; then
9096     echo "$ac_file is unchanged"
9097     rm -f conftest.h
9098   else
9099     # Remove last slash and all that follows it.  Not all systems have dirname.
9100       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9101       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9102       # The file is in a subdirectory.
9103       test ! -d "$ac_dir" && mkdir "$ac_dir"
9104     fi
9105     rm -f $ac_file
9106     mv conftest.h $ac_file
9107   fi
9108 fi; done
9109
9110 EOF
9111
9112 cat >> $CONFIG_STATUS <<EOF
9113 ac_sources="$files"
9114 ac_dests="$links"
9115 EOF
9116
9117 cat >> $CONFIG_STATUS <<\EOF
9118 srcdir=$ac_given_srcdir
9119 while test -n "$ac_sources"; do
9120   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
9121   set $ac_sources; ac_source=$1; shift; ac_sources=$*
9122
9123   echo "linking $srcdir/$ac_source to $ac_dest"
9124
9125   if test ! -r $srcdir/$ac_source; then
9126     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
9127   fi
9128   rm -f $ac_dest
9129
9130   # Make relative symlinks.
9131   # Remove last slash and all that follows it.  Not all systems have dirname.
9132   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
9133   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
9134     # The dest file is in a subdirectory.
9135     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
9136     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
9137     # A "../" for each directory in $ac_dest_dir_suffix.
9138     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
9139   else
9140     ac_dest_dir_suffix= ac_dots=
9141   fi
9142
9143   case "$srcdir" in
9144   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
9145   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
9146   esac
9147
9148   # Make a symlink if possible; otherwise try a hard link.
9149   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
9150     ln $srcdir/$ac_source $ac_dest; then :
9151   else
9152     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
9153   fi
9154 done
9155 EOF
9156 cat >> $CONFIG_STATUS <<EOF
9157
9158 gdb_host_cpu=$gdb_host_cpu
9159 gdb_target_cpu=$gdb_target_cpu
9160 nativefile=$nativefile
9161
9162 EOF
9163 cat >> $CONFIG_STATUS <<\EOF
9164
9165 if test "${nativefile}" = ""; then
9166 sed -e '/^NATDEPFILES[  ]*=[    ]*/s//# NATDEPFILES=/' \
9167         < Makefile > Makefile.tem
9168 mv -f Makefile.tem Makefile
9169 fi
9170
9171 sed -e '/^TM_FILE[      ]*=/s,^TM_FILE[         ]*=[    ]*,&config/'"${gdb_target_cpu}"'/,
9172 /^XM_FILE[      ]*=/s,^XM_FILE[         ]*=[    ]*,&config/'"${gdb_host_cpu}"'/,
9173 /^NAT_FILE[     ]*=/s,^NAT_FILE[        ]*=[    ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
9174 mv -f Makefile.tmp Makefile
9175
9176
9177 case x$CONFIG_HEADERS in
9178 xconfig.h:config.in)
9179 echo > stamp-h ;;
9180 esac
9181
9182 exit 0
9183 EOF
9184 chmod +x $CONFIG_STATUS
9185 rm -fr confdefs* $ac_clean_files
9186 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9187
9188 if test "$no_recursion" != yes; then
9189
9190   # Remove --cache-file and --srcdir arguments so they do not pile up.
9191   ac_sub_configure_args=
9192   ac_prev=
9193   for ac_arg in $ac_configure_args; do
9194     if test -n "$ac_prev"; then
9195       ac_prev=
9196       continue
9197     fi
9198     case "$ac_arg" in
9199     -cache-file | --cache-file | --cache-fil | --cache-fi \
9200     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
9201       ac_prev=cache_file ;;
9202     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
9203     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
9204       ;;
9205     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
9206       ac_prev=srcdir ;;
9207     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
9208       ;;
9209     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
9210     esac
9211   done
9212
9213   for ac_config_dir in $configdirs; do
9214
9215     # Do not complain, so a configure script can configure whichever
9216     # parts of a large source tree are present.
9217     if test ! -d $srcdir/$ac_config_dir; then
9218       continue
9219     fi
9220
9221     echo configuring in $ac_config_dir
9222
9223     case "$srcdir" in
9224     .) ;;
9225     *)
9226       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
9227       else
9228         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
9229       fi
9230       ;;
9231     esac
9232
9233     ac_popdir=`pwd`
9234     cd $ac_config_dir
9235
9236       # A "../" for each directory in /$ac_config_dir.
9237       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
9238
9239     case "$srcdir" in
9240     .) # No --srcdir option.  We are building in place.
9241       ac_sub_srcdir=$srcdir ;;
9242     /*) # Absolute path.
9243       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
9244     *) # Relative path.
9245       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
9246     esac
9247
9248     # Check for guested configure; otherwise get Cygnus style configure.
9249     if test -f $ac_sub_srcdir/configure; then
9250       ac_sub_configure=$ac_sub_srcdir/configure
9251     elif test -f $ac_sub_srcdir/configure.in; then
9252       ac_sub_configure=$ac_configure
9253     else
9254       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
9255       ac_sub_configure=
9256     fi
9257
9258     # The recursion is here.
9259     if test -n "$ac_sub_configure"; then
9260
9261       # Make the cache file name correct relative to the subdirectory.
9262       case "$cache_file" in
9263       /*) ac_sub_cache_file=$cache_file ;;
9264       *) # Relative path.
9265         ac_sub_cache_file="$ac_dots$cache_file" ;;
9266       esac
9267   case "$ac_given_INSTALL" in
9268         [/$]*) INSTALL="$ac_given_INSTALL" ;;
9269         *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
9270         esac
9271
9272       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
9273       # The eval makes quoting arguments work.
9274       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
9275       then :
9276       else
9277         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
9278       fi
9279     fi
9280
9281     cd $ac_popdir
9282   done
9283 fi
9284
9285
9286 exit 0
This page took 0.531318 seconds and 4 git commands to generate.