1999-02-10 Syd Polk <spolk@cygnus.com>
[external/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-tui            Enable full-screen terminal user interface"
16 ac_help="$ac_help
17   --enable-netrom         Enable NetROM support"
18 ac_help="$ac_help
19   --enable-build-warnings Enable build-time compiler warnings if gcc is used"
20 ac_help="$ac_help
21   --with-mmalloc          Use memory mapped malloc package"
22 ac_help="$ac_help
23   --enable-carp           Configure alternative readaptive paradigm "
24 ac_help="$ac_help
25   --enable-targets        alternative target configurations"
26 ac_help="$ac_help
27   --enable-ide            Enable IDE support"
28 ac_help="$ac_help
29   --with-foundry-libs=DIR Use the Foundry SDK in DIR"
30 ac_help="$ac_help
31   --with-cpu=CPU          set the default CPU variant to debug"
32 ac_help="$ac_help
33   --enable-gdbtk          Enable GDBTK GUI front end"
34 ac_help="$ac_help
35   --with-tclconfig=DIR    Directory containing tcl configuration (tclConfig.sh)"
36 ac_help="$ac_help
37   --with-tkconfig=DIR     Directory containing tk configuration (tkConfig.sh)"
38 ac_help="$ac_help
39   --with-tclinclude=DIR   Directory where tcl private headers are"
40 ac_help="$ac_help
41   --with-tkinclude=DIR    Directory where tk private headers are"
42 ac_help="$ac_help
43   --with-itclconfig           directory containing itcl configuration (itclConfig.sh)"
44 ac_help="$ac_help
45   --with-itkconfig           directory containing itk configuration (itkConfig.sh)"
46 ac_help="$ac_help
47   --with-tixconfig           directory containing tix configuration (tixConfig.sh)"
48 ac_help="$ac_help
49   --with-x                use the X Window System"
50 ac_help="$ac_help
51   --with-sim-gpu2=DIR     Use GPU2 library under given DIR"
52 ac_help="$ac_help
53   --with-sim-funit=DIR    Use target FP lib under given DIR"
54 ac_help="$ac_help
55   --enable-shared         Use shared libraries"
56
57 # Initialize some variables set by options.
58 # The variables have the same names as the options, with
59 # dashes changed to underlines.
60 build=NONE
61 cache_file=./config.cache
62 exec_prefix=NONE
63 host=NONE
64 no_create=
65 nonopt=NONE
66 no_recursion=
67 prefix=NONE
68 program_prefix=NONE
69 program_suffix=NONE
70 program_transform_name=s,x,x,
71 silent=
72 site=
73 srcdir=
74 target=NONE
75 verbose=
76 x_includes=NONE
77 x_libraries=NONE
78 bindir='${exec_prefix}/bin'
79 sbindir='${exec_prefix}/sbin'
80 libexecdir='${exec_prefix}/libexec'
81 datadir='${prefix}/share'
82 sysconfdir='${prefix}/etc'
83 sharedstatedir='${prefix}/com'
84 localstatedir='${prefix}/var'
85 libdir='${exec_prefix}/lib'
86 includedir='${prefix}/include'
87 oldincludedir='/usr/include'
88 infodir='${prefix}/info'
89 mandir='${prefix}/man'
90
91 # Initialize some other variables.
92 subdirs=
93 MFLAGS= MAKEFLAGS=
94 SHELL=${CONFIG_SHELL-/bin/sh}
95 # Maximum number of lines to put in a shell here document.
96 ac_max_here_lines=12
97
98 ac_prev=
99 for ac_option
100 do
101
102   # If the previous option needs an argument, assign it.
103   if test -n "$ac_prev"; then
104     eval "$ac_prev=\$ac_option"
105     ac_prev=
106     continue
107   fi
108
109   case "$ac_option" in
110   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
111   *) ac_optarg= ;;
112   esac
113
114   # Accept the important Cygnus configure options, so we can diagnose typos.
115
116   case "$ac_option" in
117
118   -bindir | --bindir | --bindi | --bind | --bin | --bi)
119     ac_prev=bindir ;;
120   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
121     bindir="$ac_optarg" ;;
122
123   -build | --build | --buil | --bui | --bu)
124     ac_prev=build ;;
125   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
126     build="$ac_optarg" ;;
127
128   -cache-file | --cache-file | --cache-fil | --cache-fi \
129   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
130     ac_prev=cache_file ;;
131   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
132   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
133     cache_file="$ac_optarg" ;;
134
135   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
136     ac_prev=datadir ;;
137   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
138   | --da=*)
139     datadir="$ac_optarg" ;;
140
141   -disable-* | --disable-*)
142     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
143     # Reject names that are not valid shell variable names.
144     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
145       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
146     fi
147     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
148     eval "enable_${ac_feature}=no" ;;
149
150   -enable-* | --enable-*)
151     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
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     case "$ac_option" in
158       *=*) ;;
159       *) ac_optarg=yes ;;
160     esac
161     eval "enable_${ac_feature}='$ac_optarg'" ;;
162
163   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
164   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
165   | --exec | --exe | --ex)
166     ac_prev=exec_prefix ;;
167   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
168   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
169   | --exec=* | --exe=* | --ex=*)
170     exec_prefix="$ac_optarg" ;;
171
172   -gas | --gas | --ga | --g)
173     # Obsolete; use --with-gas.
174     with_gas=yes ;;
175
176   -help | --help | --hel | --he)
177     # Omit some internal or obsolete options to make the list less imposing.
178     # This message is too long to be a string in the A/UX 3.1 sh.
179     cat << EOF
180 Usage: configure [options] [host]
181 Options: [defaults in brackets after descriptions]
182 Configuration:
183   --cache-file=FILE       cache test results in FILE
184   --help                  print this message
185   --no-create             do not create output files
186   --quiet, --silent       do not print \`checking...' messages
187   --version               print the version of autoconf that created configure
188 Directory and file names:
189   --prefix=PREFIX         install architecture-independent files in PREFIX
190                           [$ac_default_prefix]
191   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
192                           [same as prefix]
193   --bindir=DIR            user executables in DIR [EPREFIX/bin]
194   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
195   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
196   --datadir=DIR           read-only architecture-independent data in DIR
197                           [PREFIX/share]
198   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
199   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
200                           [PREFIX/com]
201   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
202   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
203   --includedir=DIR        C header files in DIR [PREFIX/include]
204   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
205   --infodir=DIR           info documentation in DIR [PREFIX/info]
206   --mandir=DIR            man documentation in DIR [PREFIX/man]
207   --srcdir=DIR            find the sources in DIR [configure dir or ..]
208   --program-prefix=PREFIX prepend PREFIX to installed program names
209   --program-suffix=SUFFIX append SUFFIX to installed program names
210   --program-transform-name=PROGRAM
211                           run sed PROGRAM on installed program names
212 EOF
213     cat << EOF
214 Host type:
215   --build=BUILD           configure for building on BUILD [BUILD=HOST]
216   --host=HOST             configure for HOST [guessed]
217   --target=TARGET         configure for TARGET [TARGET=HOST]
218 Features and packages:
219   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
220   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
221   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
222   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
223   --x-includes=DIR        X include files are in DIR
224   --x-libraries=DIR       X library files are in DIR
225 EOF
226     if test -n "$ac_help"; then
227       echo "--enable and --with options recognized:$ac_help"
228     fi
229     exit 0 ;;
230
231   -host | --host | --hos | --ho)
232     ac_prev=host ;;
233   -host=* | --host=* | --hos=* | --ho=*)
234     host="$ac_optarg" ;;
235
236   -includedir | --includedir | --includedi | --included | --include \
237   | --includ | --inclu | --incl | --inc)
238     ac_prev=includedir ;;
239   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
240   | --includ=* | --inclu=* | --incl=* | --inc=*)
241     includedir="$ac_optarg" ;;
242
243   -infodir | --infodir | --infodi | --infod | --info | --inf)
244     ac_prev=infodir ;;
245   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
246     infodir="$ac_optarg" ;;
247
248   -libdir | --libdir | --libdi | --libd)
249     ac_prev=libdir ;;
250   -libdir=* | --libdir=* | --libdi=* | --libd=*)
251     libdir="$ac_optarg" ;;
252
253   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
254   | --libexe | --libex | --libe)
255     ac_prev=libexecdir ;;
256   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
257   | --libexe=* | --libex=* | --libe=*)
258     libexecdir="$ac_optarg" ;;
259
260   -localstatedir | --localstatedir | --localstatedi | --localstated \
261   | --localstate | --localstat | --localsta | --localst \
262   | --locals | --local | --loca | --loc | --lo)
263     ac_prev=localstatedir ;;
264   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
265   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
266   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
267     localstatedir="$ac_optarg" ;;
268
269   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
270     ac_prev=mandir ;;
271   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
272     mandir="$ac_optarg" ;;
273
274   -nfp | --nfp | --nf)
275     # Obsolete; use --without-fp.
276     with_fp=no ;;
277
278   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
279   | --no-cr | --no-c)
280     no_create=yes ;;
281
282   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
283   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
284     no_recursion=yes ;;
285
286   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
287   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
288   | --oldin | --oldi | --old | --ol | --o)
289     ac_prev=oldincludedir ;;
290   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
291   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
292   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
293     oldincludedir="$ac_optarg" ;;
294
295   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
296     ac_prev=prefix ;;
297   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
298     prefix="$ac_optarg" ;;
299
300   -program-prefix | --program-prefix | --program-prefi | --program-pref \
301   | --program-pre | --program-pr | --program-p)
302     ac_prev=program_prefix ;;
303   -program-prefix=* | --program-prefix=* | --program-prefi=* \
304   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
305     program_prefix="$ac_optarg" ;;
306
307   -program-suffix | --program-suffix | --program-suffi | --program-suff \
308   | --program-suf | --program-su | --program-s)
309     ac_prev=program_suffix ;;
310   -program-suffix=* | --program-suffix=* | --program-suffi=* \
311   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
312     program_suffix="$ac_optarg" ;;
313
314   -program-transform-name | --program-transform-name \
315   | --program-transform-nam | --program-transform-na \
316   | --program-transform-n | --program-transform- \
317   | --program-transform | --program-transfor \
318   | --program-transfo | --program-transf \
319   | --program-trans | --program-tran \
320   | --progr-tra | --program-tr | --program-t)
321     ac_prev=program_transform_name ;;
322   -program-transform-name=* | --program-transform-name=* \
323   | --program-transform-nam=* | --program-transform-na=* \
324   | --program-transform-n=* | --program-transform-=* \
325   | --program-transform=* | --program-transfor=* \
326   | --program-transfo=* | --program-transf=* \
327   | --program-trans=* | --program-tran=* \
328   | --progr-tra=* | --program-tr=* | --program-t=*)
329     program_transform_name="$ac_optarg" ;;
330
331   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
332   | -silent | --silent | --silen | --sile | --sil)
333     silent=yes ;;
334
335   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
336     ac_prev=sbindir ;;
337   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
338   | --sbi=* | --sb=*)
339     sbindir="$ac_optarg" ;;
340
341   -sharedstatedir | --sharedstatedir | --sharedstatedi \
342   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
343   | --sharedst | --shareds | --shared | --share | --shar \
344   | --sha | --sh)
345     ac_prev=sharedstatedir ;;
346   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
347   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
348   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
349   | --sha=* | --sh=*)
350     sharedstatedir="$ac_optarg" ;;
351
352   -site | --site | --sit)
353     ac_prev=site ;;
354   -site=* | --site=* | --sit=*)
355     site="$ac_optarg" ;;
356
357   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
358     ac_prev=srcdir ;;
359   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
360     srcdir="$ac_optarg" ;;
361
362   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
363   | --syscon | --sysco | --sysc | --sys | --sy)
364     ac_prev=sysconfdir ;;
365   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
366   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
367     sysconfdir="$ac_optarg" ;;
368
369   -target | --target | --targe | --targ | --tar | --ta | --t)
370     ac_prev=target ;;
371   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
372     target="$ac_optarg" ;;
373
374   -v | -verbose | --verbose | --verbos | --verbo | --verb)
375     verbose=yes ;;
376
377   -version | --version | --versio | --versi | --vers)
378     echo "configure generated by autoconf version 2.13"
379     exit 0 ;;
380
381   -with-* | --with-*)
382     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
383     # Reject names that are not valid shell variable names.
384     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
385       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
386     fi
387     ac_package=`echo $ac_package| sed 's/-/_/g'`
388     case "$ac_option" in
389       *=*) ;;
390       *) ac_optarg=yes ;;
391     esac
392     eval "with_${ac_package}='$ac_optarg'" ;;
393
394   -without-* | --without-*)
395     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
396     # Reject names that are not valid shell variable names.
397     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
398       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
399     fi
400     ac_package=`echo $ac_package| sed 's/-/_/g'`
401     eval "with_${ac_package}=no" ;;
402
403   --x)
404     # Obsolete; use --with-x.
405     with_x=yes ;;
406
407   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
408   | --x-incl | --x-inc | --x-in | --x-i)
409     ac_prev=x_includes ;;
410   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
411   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
412     x_includes="$ac_optarg" ;;
413
414   -x-libraries | --x-libraries | --x-librarie | --x-librari \
415   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
416     ac_prev=x_libraries ;;
417   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
418   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
419     x_libraries="$ac_optarg" ;;
420
421   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
422     ;;
423
424   *)
425     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
426       echo "configure: warning: $ac_option: invalid host type" 1>&2
427     fi
428     if test "x$nonopt" != xNONE; then
429       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
430     fi
431     nonopt="$ac_option"
432     ;;
433
434   esac
435 done
436
437 if test -n "$ac_prev"; then
438   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
439 fi
440
441 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
442
443 # File descriptor usage:
444 # 0 standard input
445 # 1 file creation
446 # 2 errors and warnings
447 # 3 some systems may open it to /dev/tty
448 # 4 used on the Kubota Titan
449 # 6 checking for... messages and results
450 # 5 compiler messages saved in config.log
451 if test "$silent" = yes; then
452   exec 6>/dev/null
453 else
454   exec 6>&1
455 fi
456 exec 5>./config.log
457
458 echo "\
459 This file contains any messages produced by compilers while
460 running configure, to aid debugging if configure makes a mistake.
461 " 1>&5
462
463 # Strip out --no-create and --no-recursion so they do not pile up.
464 # Also quote any args containing shell metacharacters.
465 ac_configure_args=
466 for ac_arg
467 do
468   case "$ac_arg" in
469   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
470   | --no-cr | --no-c) ;;
471   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
472   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
473   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
474   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
475   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
476   esac
477 done
478
479 # NLS nuisances.
480 # Only set these to C if already set.  These must not be set unconditionally
481 # because not all systems understand e.g. LANG=C (notably SCO).
482 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
483 # Non-C LC_CTYPE values break the ctype check.
484 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
485 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
486 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
487 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
488
489 # confdefs.h avoids OS command line length limits that DEFS can exceed.
490 rm -rf conftest* confdefs.h
491 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
492 echo > confdefs.h
493
494 # A filename unique to this package, relative to the directory that
495 # configure is in, which we can look for to find out if srcdir is correct.
496 ac_unique_file=main.c
497
498 # Find the source files, if location was not specified.
499 if test -z "$srcdir"; then
500   ac_srcdir_defaulted=yes
501   # Try the directory containing this script, then its parent.
502   ac_prog=$0
503   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
504   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
505   srcdir=$ac_confdir
506   if test ! -r $srcdir/$ac_unique_file; then
507     srcdir=..
508   fi
509 else
510   ac_srcdir_defaulted=no
511 fi
512 if test ! -r $srcdir/$ac_unique_file; then
513   if test "$ac_srcdir_defaulted" = yes; then
514     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
515   else
516     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
517   fi
518 fi
519 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
520
521 # Prefer explicitly selected file to automatically selected ones.
522 if test -z "$CONFIG_SITE"; then
523   if test "x$prefix" != xNONE; then
524     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
525   else
526     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
527   fi
528 fi
529 for ac_site_file in $CONFIG_SITE; do
530   if test -r "$ac_site_file"; then
531     echo "loading site script $ac_site_file"
532     . "$ac_site_file"
533   fi
534 done
535
536 if test -r "$cache_file"; then
537   echo "loading cache $cache_file"
538   . $cache_file
539 else
540   echo "creating cache $cache_file"
541   > $cache_file
542 fi
543
544 ac_ext=c
545 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
546 ac_cpp='$CPP $CPPFLAGS'
547 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
548 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
549 cross_compiling=$ac_cv_prog_cc_cross
550
551 ac_exeext=
552 ac_objext=o
553 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
554   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
555   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
556     ac_n= ac_c='
557 ' ac_t='        '
558   else
559     ac_n=-n ac_c= ac_t=
560   fi
561 else
562   ac_n= ac_c='\c' ac_t=
563 fi
564
565
566
567
568 # Extract the first word of "gcc", so it can be a program name with args.
569 set dummy gcc; ac_word=$2
570 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
571 echo "configure:572: checking for $ac_word" >&5
572 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
573   echo $ac_n "(cached) $ac_c" 1>&6
574 else
575   if test -n "$CC"; then
576   ac_cv_prog_CC="$CC" # Let the user override the test.
577 else
578   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
579   ac_dummy="$PATH"
580   for ac_dir in $ac_dummy; do
581     test -z "$ac_dir" && ac_dir=.
582     if test -f $ac_dir/$ac_word; then
583       ac_cv_prog_CC="gcc"
584       break
585     fi
586   done
587   IFS="$ac_save_ifs"
588 fi
589 fi
590 CC="$ac_cv_prog_CC"
591 if test -n "$CC"; then
592   echo "$ac_t""$CC" 1>&6
593 else
594   echo "$ac_t""no" 1>&6
595 fi
596
597 if test -z "$CC"; then
598   # Extract the first word of "cc", so it can be a program name with args.
599 set dummy cc; ac_word=$2
600 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
601 echo "configure:602: checking for $ac_word" >&5
602 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
603   echo $ac_n "(cached) $ac_c" 1>&6
604 else
605   if test -n "$CC"; then
606   ac_cv_prog_CC="$CC" # Let the user override the test.
607 else
608   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
609   ac_prog_rejected=no
610   ac_dummy="$PATH"
611   for ac_dir in $ac_dummy; do
612     test -z "$ac_dir" && ac_dir=.
613     if test -f $ac_dir/$ac_word; then
614       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
615         ac_prog_rejected=yes
616         continue
617       fi
618       ac_cv_prog_CC="cc"
619       break
620     fi
621   done
622   IFS="$ac_save_ifs"
623 if test $ac_prog_rejected = yes; then
624   # We found a bogon in the path, so make sure we never use it.
625   set dummy $ac_cv_prog_CC
626   shift
627   if test $# -gt 0; then
628     # We chose a different compiler from the bogus one.
629     # However, it has the same basename, so the bogon will be chosen
630     # first if we set CC to just the basename; use the full file name.
631     shift
632     set dummy "$ac_dir/$ac_word" "$@"
633     shift
634     ac_cv_prog_CC="$@"
635   fi
636 fi
637 fi
638 fi
639 CC="$ac_cv_prog_CC"
640 if test -n "$CC"; then
641   echo "$ac_t""$CC" 1>&6
642 else
643   echo "$ac_t""no" 1>&6
644 fi
645
646   if test -z "$CC"; then
647     case "`uname -s`" in
648     *win32* | *WIN32*)
649       # Extract the first word of "cl", so it can be a program name with args.
650 set dummy cl; ac_word=$2
651 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
652 echo "configure:653: checking for $ac_word" >&5
653 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
654   echo $ac_n "(cached) $ac_c" 1>&6
655 else
656   if test -n "$CC"; then
657   ac_cv_prog_CC="$CC" # Let the user override the test.
658 else
659   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
660   ac_dummy="$PATH"
661   for ac_dir in $ac_dummy; do
662     test -z "$ac_dir" && ac_dir=.
663     if test -f $ac_dir/$ac_word; then
664       ac_cv_prog_CC="cl"
665       break
666     fi
667   done
668   IFS="$ac_save_ifs"
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     esac
679   fi
680   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
681 fi
682
683 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
684 echo "configure:685: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
685
686 ac_ext=c
687 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
688 ac_cpp='$CPP $CPPFLAGS'
689 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
690 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
691 cross_compiling=$ac_cv_prog_cc_cross
692
693 cat > conftest.$ac_ext << EOF
694
695 #line 696 "configure"
696 #include "confdefs.h"
697
698 main(){return(0);}
699 EOF
700 if { (eval echo configure:701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
701   ac_cv_prog_cc_works=yes
702   # If we can't run a trivial program, we are probably using a cross compiler.
703   if (./conftest; exit) 2>/dev/null; then
704     ac_cv_prog_cc_cross=no
705   else
706     ac_cv_prog_cc_cross=yes
707   fi
708 else
709   echo "configure: failed program was:" >&5
710   cat conftest.$ac_ext >&5
711   ac_cv_prog_cc_works=no
712 fi
713 rm -fr conftest*
714 ac_ext=c
715 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
716 ac_cpp='$CPP $CPPFLAGS'
717 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
718 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
719 cross_compiling=$ac_cv_prog_cc_cross
720
721 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
722 if test $ac_cv_prog_cc_works = no; then
723   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
724 fi
725 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
726 echo "configure:727: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
727 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
728 cross_compiling=$ac_cv_prog_cc_cross
729
730 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
731 echo "configure:732: checking whether we are using GNU C" >&5
732 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
733   echo $ac_n "(cached) $ac_c" 1>&6
734 else
735   cat > conftest.c <<EOF
736 #ifdef __GNUC__
737   yes;
738 #endif
739 EOF
740 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
741   ac_cv_prog_gcc=yes
742 else
743   ac_cv_prog_gcc=no
744 fi
745 fi
746
747 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
748
749 if test $ac_cv_prog_gcc = yes; then
750   GCC=yes
751 else
752   GCC=
753 fi
754
755 ac_test_CFLAGS="${CFLAGS+set}"
756 ac_save_CFLAGS="$CFLAGS"
757 CFLAGS=
758 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
759 echo "configure:760: checking whether ${CC-cc} accepts -g" >&5
760 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
761   echo $ac_n "(cached) $ac_c" 1>&6
762 else
763   echo 'void f(){}' > conftest.c
764 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
765   ac_cv_prog_cc_g=yes
766 else
767   ac_cv_prog_cc_g=no
768 fi
769 rm -f conftest*
770
771 fi
772
773 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
774 if test "$ac_test_CFLAGS" = set; then
775   CFLAGS="$ac_save_CFLAGS"
776 elif test $ac_cv_prog_cc_g = yes; then
777   if test "$GCC" = yes; then
778     CFLAGS="-g -O2"
779   else
780     CFLAGS="-g"
781   fi
782 else
783   if test "$GCC" = yes; then
784     CFLAGS="-O2"
785   else
786     CFLAGS=
787   fi
788 fi
789
790 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
791 echo "configure:792: checking how to run the C preprocessor" >&5
792 # On Suns, sometimes $CPP names a directory.
793 if test -n "$CPP" && test -d "$CPP"; then
794   CPP=
795 fi
796 if test -z "$CPP"; then
797 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
798   echo $ac_n "(cached) $ac_c" 1>&6
799 else
800     # This must be in double quotes, not single quotes, because CPP may get
801   # substituted into the Makefile and "${CC-cc}" will confuse make.
802   CPP="${CC-cc} -E"
803   # On the NeXT, cc -E runs the code through the compiler's parser,
804   # not just through cpp.
805   cat > conftest.$ac_ext <<EOF
806 #line 807 "configure"
807 #include "confdefs.h"
808 #include <assert.h>
809 Syntax Error
810 EOF
811 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
812 { (eval echo configure:813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
813 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
814 if test -z "$ac_err"; then
815   :
816 else
817   echo "$ac_err" >&5
818   echo "configure: failed program was:" >&5
819   cat conftest.$ac_ext >&5
820   rm -rf conftest*
821   CPP="${CC-cc} -E -traditional-cpp"
822   cat > conftest.$ac_ext <<EOF
823 #line 824 "configure"
824 #include "confdefs.h"
825 #include <assert.h>
826 Syntax Error
827 EOF
828 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
829 { (eval echo configure:830: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
830 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
831 if test -z "$ac_err"; then
832   :
833 else
834   echo "$ac_err" >&5
835   echo "configure: failed program was:" >&5
836   cat conftest.$ac_ext >&5
837   rm -rf conftest*
838   CPP="${CC-cc} -nologo -E"
839   cat > conftest.$ac_ext <<EOF
840 #line 841 "configure"
841 #include "confdefs.h"
842 #include <assert.h>
843 Syntax Error
844 EOF
845 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
846 { (eval echo configure:847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
847 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
848 if test -z "$ac_err"; then
849   :
850 else
851   echo "$ac_err" >&5
852   echo "configure: failed program was:" >&5
853   cat conftest.$ac_ext >&5
854   rm -rf conftest*
855   CPP=/lib/cpp
856 fi
857 rm -f conftest*
858 fi
859 rm -f conftest*
860 fi
861 rm -f conftest*
862   ac_cv_prog_CPP="$CPP"
863 fi
864   CPP="$ac_cv_prog_CPP"
865 else
866   ac_cv_prog_CPP="$CPP"
867 fi
868 echo "$ac_t""$CPP" 1>&6
869
870 echo $ac_n "checking for AIX""... $ac_c" 1>&6
871 echo "configure:872: checking for AIX" >&5
872 cat > conftest.$ac_ext <<EOF
873 #line 874 "configure"
874 #include "confdefs.h"
875 #ifdef _AIX
876   yes
877 #endif
878
879 EOF
880 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
881   egrep "yes" >/dev/null 2>&1; then
882   rm -rf conftest*
883   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
884 #define _ALL_SOURCE 1
885 EOF
886
887 else
888   rm -rf conftest*
889   echo "$ac_t""no" 1>&6
890 fi
891 rm -f conftest*
892
893
894 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
895 echo "configure:896: checking for POSIXized ISC" >&5
896 if test -d /etc/conf/kconfig.d &&
897   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
898 then
899   echo "$ac_t""yes" 1>&6
900   ISC=yes # If later tests want to check for ISC.
901   cat >> confdefs.h <<\EOF
902 #define _POSIX_SOURCE 1
903 EOF
904
905   if test "$GCC" = yes; then
906     CC="$CC -posix"
907   else
908     CC="$CC -Xp"
909   fi
910 else
911   echo "$ac_t""no" 1>&6
912   ISC=
913 fi
914
915
916
917
918 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
919 echo "configure:920: checking for ${CC-cc} option to accept ANSI C" >&5
920 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
921   echo $ac_n "(cached) $ac_c" 1>&6
922 else
923   am_cv_prog_cc_stdc=no
924 ac_save_CC="$CC"
925 # Don't try gcc -ansi; that turns off useful extensions and
926 # breaks some systems' header files.
927 # AIX                   -qlanglvl=ansi
928 # Ultrix and OSF/1      -std1
929 # HP-UX                 -Aa -D_HPUX_SOURCE
930 # SVR4                  -Xc -D__EXTENSIONS__
931 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
932 do
933   CC="$ac_save_CC $ac_arg"
934   cat > conftest.$ac_ext <<EOF
935 #line 936 "configure"
936 #include "confdefs.h"
937 #include <stdarg.h>
938 #include <stdio.h>
939 #include <sys/types.h>
940 #include <sys/stat.h>
941 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
942 struct buf { int x; };
943 FILE * (*rcsopen) (struct buf *, struct stat *, int);
944 static char *e (p, i)
945      char **p;
946      int i;
947 {
948   return p[i];
949 }
950 static char *f (char * (*g) (char **, int), char **p, ...)
951 {
952   char *s;
953   va_list v;
954   va_start (v,p);
955   s = g (p, va_arg (v,int));
956   va_end (v);
957   return s;
958 }
959 int test (int i, double x);
960 struct s1 {int (*f) (int a);};
961 struct s2 {int (*f) (double a);};
962 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
963 int argc;
964 char **argv;
965
966 int main() {
967
968 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
969
970 ; return 0; }
971 EOF
972 if { (eval echo configure:973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
973   rm -rf conftest*
974   am_cv_prog_cc_stdc="$ac_arg"; break
975 else
976   echo "configure: failed program was:" >&5
977   cat conftest.$ac_ext >&5
978 fi
979 rm -f conftest*
980 done
981 CC="$ac_save_CC"
982
983 fi
984
985 if test -z "$am_cv_prog_cc_stdc"; then
986   echo "$ac_t""none needed" 1>&6
987 else
988   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
989 fi
990 case "x$am_cv_prog_cc_stdc" in
991   x|xno) ;;
992   *) CC="$CC $am_cv_prog_cc_stdc" ;;
993 esac
994
995
996 ac_aux_dir=
997 for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
998   if test -f $ac_dir/install-sh; then
999     ac_aux_dir=$ac_dir
1000     ac_install_sh="$ac_aux_dir/install-sh -c"
1001     break
1002   elif test -f $ac_dir/install.sh; then
1003     ac_aux_dir=$ac_dir
1004     ac_install_sh="$ac_aux_dir/install.sh -c"
1005     break
1006   fi
1007 done
1008 if test -z "$ac_aux_dir"; then
1009   { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1010 fi
1011 ac_config_guess=$ac_aux_dir/config.guess
1012 ac_config_sub=$ac_aux_dir/config.sub
1013 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1014
1015
1016 # Do some error checking and defaulting for the host and target type.
1017 # The inputs are:
1018 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1019 #
1020 # The rules are:
1021 # 1. You are not allowed to specify --host, --target, and nonopt at the
1022 #    same time.
1023 # 2. Host defaults to nonopt.
1024 # 3. If nonopt is not specified, then host defaults to the current host,
1025 #    as determined by config.guess.
1026 # 4. Target and build default to nonopt.
1027 # 5. If nonopt is not specified, then target and build default to host.
1028
1029 # The aliases save the names the user supplied, while $host etc.
1030 # will get canonicalized.
1031 case $host---$target---$nonopt in
1032 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1033 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1034 esac
1035
1036
1037 # Make sure we can run config.sub.
1038 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1039 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1040 fi
1041
1042 echo $ac_n "checking host system type""... $ac_c" 1>&6
1043 echo "configure:1044: checking host system type" >&5
1044
1045 host_alias=$host
1046 case "$host_alias" in
1047 NONE)
1048   case $nonopt in
1049   NONE)
1050     if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1051     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1052     fi ;;
1053   *) host_alias=$nonopt ;;
1054   esac ;;
1055 esac
1056
1057 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1058 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1059 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1060 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1061 echo "$ac_t""$host" 1>&6
1062
1063 echo $ac_n "checking target system type""... $ac_c" 1>&6
1064 echo "configure:1065: checking target system type" >&5
1065
1066 target_alias=$target
1067 case "$target_alias" in
1068 NONE)
1069   case $nonopt in
1070   NONE) target_alias=$host_alias ;;
1071   *) target_alias=$nonopt ;;
1072   esac ;;
1073 esac
1074
1075 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1076 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1077 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1078 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1079 echo "$ac_t""$target" 1>&6
1080
1081 echo $ac_n "checking build system type""... $ac_c" 1>&6
1082 echo "configure:1083: checking build system type" >&5
1083
1084 build_alias=$build
1085 case "$build_alias" in
1086 NONE)
1087   case $nonopt in
1088   NONE) build_alias=$host_alias ;;
1089   *) build_alias=$nonopt ;;
1090   esac ;;
1091 esac
1092
1093 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1094 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1095 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1096 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1097 echo "$ac_t""$build" 1>&6
1098
1099 test "$host_alias" != "$target_alias" &&
1100   test "$program_prefix$program_suffix$program_transform_name" = \
1101     NONENONEs,x,x, &&
1102   program_prefix=${target_alias}-
1103
1104
1105 ALL_LINGUAS=
1106 CY_GNU_GETTEXT
1107
1108
1109 CONFIG_OBS=
1110 CONFIG_DEPS=
1111 CONFIG_SRCS=
1112
1113 configdirs="doc testsuite"
1114
1115
1116 . ${srcdir}/configure.host
1117
1118 . ${srcdir}/configure.tgt
1119
1120
1121 # Find a good install program.  We prefer a C program (faster),
1122 # so one script is as good as another.  But avoid the broken or
1123 # incompatible versions:
1124 # SysV /etc/install, /usr/sbin/install
1125 # SunOS /usr/etc/install
1126 # IRIX /sbin/install
1127 # AIX /bin/install
1128 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1129 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1130 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1131 # ./install, which can be erroneously created by make from ./install.sh.
1132 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1133 echo "configure:1134: checking for a BSD compatible install" >&5
1134 if test -z "$INSTALL"; then
1135 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1136   echo $ac_n "(cached) $ac_c" 1>&6
1137 else
1138     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1139   for ac_dir in $PATH; do
1140     # Account for people who put trailing slashes in PATH elements.
1141     case "$ac_dir/" in
1142     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1143     *)
1144       # OSF1 and SCO ODT 3.0 have their own names for install.
1145       # Don't use installbsd from OSF since it installs stuff as root
1146       # by default.
1147       for ac_prog in ginstall scoinst install; do
1148         if test -f $ac_dir/$ac_prog; then
1149           if test $ac_prog = install &&
1150             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1151             # AIX install.  It has an incompatible calling convention.
1152             :
1153           else
1154             ac_cv_path_install="$ac_dir/$ac_prog -c"
1155             break 2
1156           fi
1157         fi
1158       done
1159       ;;
1160     esac
1161   done
1162   IFS="$ac_save_IFS"
1163
1164 fi
1165   if test "${ac_cv_path_install+set}" = set; then
1166     INSTALL="$ac_cv_path_install"
1167   else
1168     # As a last resort, use the slow shell script.  We don't cache a
1169     # path for INSTALL within a source directory, because that will
1170     # break other packages using the cache if that directory is
1171     # removed, or if the path is relative.
1172     INSTALL="$ac_install_sh"
1173   fi
1174 fi
1175 echo "$ac_t""$INSTALL" 1>&6
1176
1177 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1178 # It thinks the first close brace ends the variable substitution.
1179 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1180
1181 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1182
1183 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1184
1185 if test $host != $build; then
1186   ac_tool_prefix=${host_alias}-
1187 else
1188   ac_tool_prefix=
1189 fi
1190
1191 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
1192 set dummy ${ac_tool_prefix}ar; ac_word=$2
1193 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1194 echo "configure:1195: checking for $ac_word" >&5
1195 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1196   echo $ac_n "(cached) $ac_c" 1>&6
1197 else
1198   if test -n "$AR"; then
1199   ac_cv_prog_AR="$AR" # Let the user override the test.
1200 else
1201   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1202   ac_dummy="$PATH"
1203   for ac_dir in $ac_dummy; do
1204     test -z "$ac_dir" && ac_dir=.
1205     if test -f $ac_dir/$ac_word; then
1206       ac_cv_prog_AR="${ac_tool_prefix}ar"
1207       break
1208     fi
1209   done
1210   IFS="$ac_save_ifs"
1211   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
1212 fi
1213 fi
1214 AR="$ac_cv_prog_AR"
1215 if test -n "$AR"; then
1216   echo "$ac_t""$AR" 1>&6
1217 else
1218   echo "$ac_t""no" 1>&6
1219 fi
1220
1221
1222
1223 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
1224 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
1225 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1226 echo "configure:1227: checking for $ac_word" >&5
1227 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1228   echo $ac_n "(cached) $ac_c" 1>&6
1229 else
1230   if test -n "$RANLIB"; then
1231   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1232 else
1233   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1234   ac_dummy="$PATH"
1235   for ac_dir in $ac_dummy; do
1236     test -z "$ac_dir" && ac_dir=.
1237     if test -f $ac_dir/$ac_word; then
1238       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
1239       break
1240     fi
1241   done
1242   IFS="$ac_save_ifs"
1243 fi
1244 fi
1245 RANLIB="$ac_cv_prog_RANLIB"
1246 if test -n "$RANLIB"; then
1247   echo "$ac_t""$RANLIB" 1>&6
1248 else
1249   echo "$ac_t""no" 1>&6
1250 fi
1251
1252
1253 if test -z "$ac_cv_prog_RANLIB"; then
1254 if test -n "$ac_tool_prefix"; then
1255   # Extract the first word of "ranlib", so it can be a program name with args.
1256 set dummy ranlib; ac_word=$2
1257 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1258 echo "configure:1259: checking for $ac_word" >&5
1259 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1260   echo $ac_n "(cached) $ac_c" 1>&6
1261 else
1262   if test -n "$RANLIB"; then
1263   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1264 else
1265   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1266   ac_dummy="$PATH"
1267   for ac_dir in $ac_dummy; do
1268     test -z "$ac_dir" && ac_dir=.
1269     if test -f $ac_dir/$ac_word; then
1270       ac_cv_prog_RANLIB="ranlib"
1271       break
1272     fi
1273   done
1274   IFS="$ac_save_ifs"
1275   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1276 fi
1277 fi
1278 RANLIB="$ac_cv_prog_RANLIB"
1279 if test -n "$RANLIB"; then
1280   echo "$ac_t""$RANLIB" 1>&6
1281 else
1282   echo "$ac_t""no" 1>&6
1283 fi
1284
1285 else
1286   RANLIB=":"
1287 fi
1288 fi
1289
1290 for ac_prog in 'bison -y' byacc
1291 do
1292 # Extract the first word of "$ac_prog", so it can be a program name with args.
1293 set dummy $ac_prog; ac_word=$2
1294 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1295 echo "configure:1296: checking for $ac_word" >&5
1296 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1297   echo $ac_n "(cached) $ac_c" 1>&6
1298 else
1299   if test -n "$YACC"; then
1300   ac_cv_prog_YACC="$YACC" # Let the user override the test.
1301 else
1302   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1303   ac_dummy="$PATH"
1304   for ac_dir in $ac_dummy; do
1305     test -z "$ac_dir" && ac_dir=.
1306     if test -f $ac_dir/$ac_word; then
1307       ac_cv_prog_YACC="$ac_prog"
1308       break
1309     fi
1310   done
1311   IFS="$ac_save_ifs"
1312 fi
1313 fi
1314 YACC="$ac_cv_prog_YACC"
1315 if test -n "$YACC"; then
1316   echo "$ac_t""$YACC" 1>&6
1317 else
1318   echo "$ac_t""no" 1>&6
1319 fi
1320
1321 test -n "$YACC" && break
1322 done
1323 test -n "$YACC" || YACC="yacc"
1324
1325
1326 if test "$program_transform_name" = s,x,x,; then
1327   program_transform_name=
1328 else
1329   # Double any \ or $.  echo might interpret backslashes.
1330   cat <<\EOF_SED > conftestsed
1331 s,\\,\\\\,g; s,\$,$$,g
1332 EOF_SED
1333   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1334   rm -f conftestsed
1335 fi
1336 test "$program_prefix" != NONE &&
1337   program_transform_name="s,^,${program_prefix},; $program_transform_name"
1338 # Use a double $ so make ignores it.
1339 test "$program_suffix" != NONE &&
1340   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1341
1342 # sed with no file args requires a program.
1343 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1344
1345
1346 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
1347 echo "configure:1348: checking return type of signal handlers" >&5
1348 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
1349   echo $ac_n "(cached) $ac_c" 1>&6
1350 else
1351   cat > conftest.$ac_ext <<EOF
1352 #line 1353 "configure"
1353 #include "confdefs.h"
1354 #include <sys/types.h>
1355 #include <signal.h>
1356 #ifdef signal
1357 #undef signal
1358 #endif
1359 #ifdef __cplusplus
1360 extern "C" void (*signal (int, void (*)(int)))(int);
1361 #else
1362 void (*signal ()) ();
1363 #endif
1364
1365 int main() {
1366 int i;
1367 ; return 0; }
1368 EOF
1369 if { (eval echo configure:1370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1370   rm -rf conftest*
1371   ac_cv_type_signal=void
1372 else
1373   echo "configure: failed program was:" >&5
1374   cat conftest.$ac_ext >&5
1375   rm -rf conftest*
1376   ac_cv_type_signal=int
1377 fi
1378 rm -f conftest*
1379 fi
1380
1381 echo "$ac_t""$ac_cv_type_signal" 1>&6
1382 cat >> confdefs.h <<EOF
1383 #define RETSIGTYPE $ac_cv_type_signal
1384 EOF
1385
1386
1387
1388 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1389 echo "configure:1390: checking for ANSI C header files" >&5
1390 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1391   echo $ac_n "(cached) $ac_c" 1>&6
1392 else
1393   cat > conftest.$ac_ext <<EOF
1394 #line 1395 "configure"
1395 #include "confdefs.h"
1396 #include <stdlib.h>
1397 #include <stdarg.h>
1398 #include <string.h>
1399 #include <float.h>
1400 EOF
1401 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1402 { (eval echo configure:1403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1403 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1404 if test -z "$ac_err"; then
1405   rm -rf conftest*
1406   ac_cv_header_stdc=yes
1407 else
1408   echo "$ac_err" >&5
1409   echo "configure: failed program was:" >&5
1410   cat conftest.$ac_ext >&5
1411   rm -rf conftest*
1412   ac_cv_header_stdc=no
1413 fi
1414 rm -f conftest*
1415
1416 if test $ac_cv_header_stdc = yes; then
1417   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1418 cat > conftest.$ac_ext <<EOF
1419 #line 1420 "configure"
1420 #include "confdefs.h"
1421 #include <string.h>
1422 EOF
1423 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1424   egrep "memchr" >/dev/null 2>&1; then
1425   :
1426 else
1427   rm -rf conftest*
1428   ac_cv_header_stdc=no
1429 fi
1430 rm -f conftest*
1431
1432 fi
1433
1434 if test $ac_cv_header_stdc = yes; then
1435   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1436 cat > conftest.$ac_ext <<EOF
1437 #line 1438 "configure"
1438 #include "confdefs.h"
1439 #include <stdlib.h>
1440 EOF
1441 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1442   egrep "free" >/dev/null 2>&1; then
1443   :
1444 else
1445   rm -rf conftest*
1446   ac_cv_header_stdc=no
1447 fi
1448 rm -f conftest*
1449
1450 fi
1451
1452 if test $ac_cv_header_stdc = yes; then
1453   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1454 if test "$cross_compiling" = yes; then
1455   :
1456 else
1457   cat > conftest.$ac_ext <<EOF
1458 #line 1459 "configure"
1459 #include "confdefs.h"
1460 #include <ctype.h>
1461 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1462 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1463 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1464 int main () { int i; for (i = 0; i < 256; i++)
1465 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1466 exit (0); }
1467
1468 EOF
1469 if { (eval echo configure:1470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1470 then
1471   :
1472 else
1473   echo "configure: failed program was:" >&5
1474   cat conftest.$ac_ext >&5
1475   rm -fr conftest*
1476   ac_cv_header_stdc=no
1477 fi
1478 rm -fr conftest*
1479 fi
1480
1481 fi
1482 fi
1483
1484 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1485 if test $ac_cv_header_stdc = yes; then
1486   cat >> confdefs.h <<\EOF
1487 #define STDC_HEADERS 1
1488 EOF
1489
1490 fi
1491
1492
1493 for ac_hdr in ctype.h curses.h endian.h link.h \
1494         memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
1495         string.h sys/procfs.h sys/ptrace.h sys/reg.h \
1496         term.h termio.h termios.h unistd.h wait.h sys/wait.h \
1497         wchar.h wctype.h asm/debugreg.h
1498 do
1499 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1500 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1501 echo "configure:1502: checking for $ac_hdr" >&5
1502 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1503   echo $ac_n "(cached) $ac_c" 1>&6
1504 else
1505   cat > conftest.$ac_ext <<EOF
1506 #line 1507 "configure"
1507 #include "confdefs.h"
1508 #include <$ac_hdr>
1509 EOF
1510 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1511 { (eval echo configure:1512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1512 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1513 if test -z "$ac_err"; then
1514   rm -rf conftest*
1515   eval "ac_cv_header_$ac_safe=yes"
1516 else
1517   echo "$ac_err" >&5
1518   echo "configure: failed program was:" >&5
1519   cat conftest.$ac_ext >&5
1520   rm -rf conftest*
1521   eval "ac_cv_header_$ac_safe=no"
1522 fi
1523 rm -f conftest*
1524 fi
1525 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1526   echo "$ac_t""yes" 1>&6
1527     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1528   cat >> confdefs.h <<EOF
1529 #define $ac_tr_hdr 1
1530 EOF
1531  
1532 else
1533   echo "$ac_t""no" 1>&6
1534 fi
1535 done
1536
1537 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1538 echo "configure:1539: checking whether stat file-mode macros are broken" >&5
1539 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1540   echo $ac_n "(cached) $ac_c" 1>&6
1541 else
1542   cat > conftest.$ac_ext <<EOF
1543 #line 1544 "configure"
1544 #include "confdefs.h"
1545 #include <sys/types.h>
1546 #include <sys/stat.h>
1547
1548 #if defined(S_ISBLK) && defined(S_IFDIR)
1549 # if S_ISBLK (S_IFDIR)
1550 You lose.
1551 # endif
1552 #endif
1553
1554 #if defined(S_ISBLK) && defined(S_IFCHR)
1555 # if S_ISBLK (S_IFCHR)
1556 You lose.
1557 # endif
1558 #endif
1559
1560 #if defined(S_ISLNK) && defined(S_IFREG)
1561 # if S_ISLNK (S_IFREG)
1562 You lose.
1563 # endif
1564 #endif
1565
1566 #if defined(S_ISSOCK) && defined(S_IFREG)
1567 # if S_ISSOCK (S_IFREG)
1568 You lose.
1569 # endif
1570 #endif
1571
1572 EOF
1573 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1574   egrep "You lose" >/dev/null 2>&1; then
1575   rm -rf conftest*
1576   ac_cv_header_stat_broken=yes
1577 else
1578   rm -rf conftest*
1579   ac_cv_header_stat_broken=no
1580 fi
1581 rm -f conftest*
1582
1583 fi
1584
1585 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1586 if test $ac_cv_header_stat_broken = yes; then
1587   cat >> confdefs.h <<\EOF
1588 #define STAT_MACROS_BROKEN 1
1589 EOF
1590
1591 fi
1592
1593
1594 echo $ac_n "checking for working const""... $ac_c" 1>&6
1595 echo "configure:1596: checking for working const" >&5
1596 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1597   echo $ac_n "(cached) $ac_c" 1>&6
1598 else
1599   cat > conftest.$ac_ext <<EOF
1600 #line 1601 "configure"
1601 #include "confdefs.h"
1602
1603 int main() {
1604
1605 /* Ultrix mips cc rejects this.  */
1606 typedef int charset[2]; const charset x;
1607 /* SunOS 4.1.1 cc rejects this.  */
1608 char const *const *ccp;
1609 char **p;
1610 /* NEC SVR4.0.2 mips cc rejects this.  */
1611 struct point {int x, y;};
1612 static struct point const zero = {0,0};
1613 /* AIX XL C 1.02.0.0 rejects this.
1614    It does not let you subtract one const X* pointer from another in an arm
1615    of an if-expression whose if-part is not a constant expression */
1616 const char *g = "string";
1617 ccp = &g + (g ? g-g : 0);
1618 /* HPUX 7.0 cc rejects these. */
1619 ++ccp;
1620 p = (char**) ccp;
1621 ccp = (char const *const *) p;
1622 { /* SCO 3.2v4 cc rejects this.  */
1623   char *t;
1624   char const *s = 0 ? (char *) 0 : (char const *) 0;
1625
1626   *t++ = 0;
1627 }
1628 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
1629   int x[] = {25, 17};
1630   const int *foo = &x[0];
1631   ++foo;
1632 }
1633 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1634   typedef const int *iptr;
1635   iptr p = 0;
1636   ++p;
1637 }
1638 { /* AIX XL C 1.02.0.0 rejects this saying
1639      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1640   struct s { int j; const int *ap[3]; };
1641   struct s *b; b->j = 5;
1642 }
1643 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1644   const int foo = 10;
1645 }
1646
1647 ; return 0; }
1648 EOF
1649 if { (eval echo configure:1650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1650   rm -rf conftest*
1651   ac_cv_c_const=yes
1652 else
1653   echo "configure: failed program was:" >&5
1654   cat conftest.$ac_ext >&5
1655   rm -rf conftest*
1656   ac_cv_c_const=no
1657 fi
1658 rm -f conftest*
1659 fi
1660
1661 echo "$ac_t""$ac_cv_c_const" 1>&6
1662 if test $ac_cv_c_const = no; then
1663   cat >> confdefs.h <<\EOF
1664 #define const 
1665 EOF
1666
1667 fi
1668
1669
1670 for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc
1671 do
1672 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1673 echo "configure:1674: checking for $ac_func" >&5
1674 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1675   echo $ac_n "(cached) $ac_c" 1>&6
1676 else
1677   cat > conftest.$ac_ext <<EOF
1678 #line 1679 "configure"
1679 #include "confdefs.h"
1680 /* System header to define __stub macros and hopefully few prototypes,
1681     which can conflict with char $ac_func(); below.  */
1682 #include <assert.h>
1683 /* Override any gcc2 internal prototype to avoid an error.  */
1684 /* We use char because int might match the return type of a gcc2
1685     builtin and then its argument prototype would still apply.  */
1686 char $ac_func();
1687
1688 int main() {
1689
1690 /* The GNU C library defines this for functions which it implements
1691     to always fail with ENOSYS.  Some functions are actually named
1692     something starting with __ and the normal name is an alias.  */
1693 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1694 choke me
1695 #else
1696 $ac_func();
1697 #endif
1698
1699 ; return 0; }
1700 EOF
1701 if { (eval echo configure:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1702   rm -rf conftest*
1703   eval "ac_cv_func_$ac_func=yes"
1704 else
1705   echo "configure: failed program was:" >&5
1706   cat conftest.$ac_ext >&5
1707   rm -rf conftest*
1708   eval "ac_cv_func_$ac_func=no"
1709 fi
1710 rm -f conftest*
1711 fi
1712
1713 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1714   echo "$ac_t""yes" 1>&6
1715     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1716   cat >> confdefs.h <<EOF
1717 #define $ac_tr_func 1
1718 EOF
1719  
1720 else
1721   echo "$ac_t""no" 1>&6
1722 fi
1723 done
1724
1725 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1726 # for constant arguments.  Useless!
1727 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1728 echo "configure:1729: checking for working alloca.h" >&5
1729 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1730   echo $ac_n "(cached) $ac_c" 1>&6
1731 else
1732   cat > conftest.$ac_ext <<EOF
1733 #line 1734 "configure"
1734 #include "confdefs.h"
1735 #include <alloca.h>
1736 int main() {
1737 char *p = alloca(2 * sizeof(int));
1738 ; return 0; }
1739 EOF
1740 if { (eval echo configure:1741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1741   rm -rf conftest*
1742   ac_cv_header_alloca_h=yes
1743 else
1744   echo "configure: failed program was:" >&5
1745   cat conftest.$ac_ext >&5
1746   rm -rf conftest*
1747   ac_cv_header_alloca_h=no
1748 fi
1749 rm -f conftest*
1750 fi
1751
1752 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1753 if test $ac_cv_header_alloca_h = yes; then
1754   cat >> confdefs.h <<\EOF
1755 #define HAVE_ALLOCA_H 1
1756 EOF
1757
1758 fi
1759
1760 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1761 echo "configure:1762: checking for alloca" >&5
1762 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1763   echo $ac_n "(cached) $ac_c" 1>&6
1764 else
1765   cat > conftest.$ac_ext <<EOF
1766 #line 1767 "configure"
1767 #include "confdefs.h"
1768
1769 #ifdef __GNUC__
1770 # define alloca __builtin_alloca
1771 #else
1772 # ifdef _MSC_VER
1773 #  include <malloc.h>
1774 #  define alloca _alloca
1775 # else
1776 #  if HAVE_ALLOCA_H
1777 #   include <alloca.h>
1778 #  else
1779 #   ifdef _AIX
1780  #pragma alloca
1781 #   else
1782 #    ifndef alloca /* predefined by HP cc +Olibcalls */
1783 char *alloca ();
1784 #    endif
1785 #   endif
1786 #  endif
1787 # endif
1788 #endif
1789
1790 int main() {
1791 char *p = (char *) alloca(1);
1792 ; return 0; }
1793 EOF
1794 if { (eval echo configure:1795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1795   rm -rf conftest*
1796   ac_cv_func_alloca_works=yes
1797 else
1798   echo "configure: failed program was:" >&5
1799   cat conftest.$ac_ext >&5
1800   rm -rf conftest*
1801   ac_cv_func_alloca_works=no
1802 fi
1803 rm -f conftest*
1804 fi
1805
1806 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1807 if test $ac_cv_func_alloca_works = yes; then
1808   cat >> confdefs.h <<\EOF
1809 #define HAVE_ALLOCA 1
1810 EOF
1811
1812 fi
1813
1814 if test $ac_cv_func_alloca_works = no; then
1815   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1816   # that cause trouble.  Some versions do not even contain alloca or
1817   # contain a buggy version.  If you still want to use their alloca,
1818   # use ar to extract alloca.o from them instead of compiling alloca.c.
1819   ALLOCA=alloca.${ac_objext}
1820   cat >> confdefs.h <<\EOF
1821 #define C_ALLOCA 1
1822 EOF
1823
1824
1825 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1826 echo "configure:1827: checking whether alloca needs Cray hooks" >&5
1827 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1828   echo $ac_n "(cached) $ac_c" 1>&6
1829 else
1830   cat > conftest.$ac_ext <<EOF
1831 #line 1832 "configure"
1832 #include "confdefs.h"
1833 #if defined(CRAY) && ! defined(CRAY2)
1834 webecray
1835 #else
1836 wenotbecray
1837 #endif
1838
1839 EOF
1840 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1841   egrep "webecray" >/dev/null 2>&1; then
1842   rm -rf conftest*
1843   ac_cv_os_cray=yes
1844 else
1845   rm -rf conftest*
1846   ac_cv_os_cray=no
1847 fi
1848 rm -f conftest*
1849
1850 fi
1851
1852 echo "$ac_t""$ac_cv_os_cray" 1>&6
1853 if test $ac_cv_os_cray = yes; then
1854 for ac_func in _getb67 GETB67 getb67; do
1855   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1856 echo "configure:1857: checking for $ac_func" >&5
1857 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1858   echo $ac_n "(cached) $ac_c" 1>&6
1859 else
1860   cat > conftest.$ac_ext <<EOF
1861 #line 1862 "configure"
1862 #include "confdefs.h"
1863 /* System header to define __stub macros and hopefully few prototypes,
1864     which can conflict with char $ac_func(); below.  */
1865 #include <assert.h>
1866 /* Override any gcc2 internal prototype to avoid an error.  */
1867 /* We use char because int might match the return type of a gcc2
1868     builtin and then its argument prototype would still apply.  */
1869 char $ac_func();
1870
1871 int main() {
1872
1873 /* The GNU C library defines this for functions which it implements
1874     to always fail with ENOSYS.  Some functions are actually named
1875     something starting with __ and the normal name is an alias.  */
1876 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1877 choke me
1878 #else
1879 $ac_func();
1880 #endif
1881
1882 ; return 0; }
1883 EOF
1884 if { (eval echo configure:1885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1885   rm -rf conftest*
1886   eval "ac_cv_func_$ac_func=yes"
1887 else
1888   echo "configure: failed program was:" >&5
1889   cat conftest.$ac_ext >&5
1890   rm -rf conftest*
1891   eval "ac_cv_func_$ac_func=no"
1892 fi
1893 rm -f conftest*
1894 fi
1895
1896 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1897   echo "$ac_t""yes" 1>&6
1898   cat >> confdefs.h <<EOF
1899 #define CRAY_STACKSEG_END $ac_func
1900 EOF
1901
1902   break
1903 else
1904   echo "$ac_t""no" 1>&6
1905 fi
1906
1907 done
1908 fi
1909
1910 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1911 echo "configure:1912: checking stack direction for C alloca" >&5
1912 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1913   echo $ac_n "(cached) $ac_c" 1>&6
1914 else
1915   if test "$cross_compiling" = yes; then
1916   ac_cv_c_stack_direction=0
1917 else
1918   cat > conftest.$ac_ext <<EOF
1919 #line 1920 "configure"
1920 #include "confdefs.h"
1921 find_stack_direction ()
1922 {
1923   static char *addr = 0;
1924   auto char dummy;
1925   if (addr == 0)
1926     {
1927       addr = &dummy;
1928       return find_stack_direction ();
1929     }
1930   else
1931     return (&dummy > addr) ? 1 : -1;
1932 }
1933 main ()
1934 {
1935   exit (find_stack_direction() < 0);
1936 }
1937 EOF
1938 if { (eval echo configure:1939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1939 then
1940   ac_cv_c_stack_direction=1
1941 else
1942   echo "configure: failed program was:" >&5
1943   cat conftest.$ac_ext >&5
1944   rm -fr conftest*
1945   ac_cv_c_stack_direction=-1
1946 fi
1947 rm -fr conftest*
1948 fi
1949
1950 fi
1951
1952 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1953 cat >> confdefs.h <<EOF
1954 #define STACK_DIRECTION $ac_cv_c_stack_direction
1955 EOF
1956
1957 fi
1958
1959
1960 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
1961 echo "configure:1962: checking whether malloc must be declared" >&5
1962 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
1963   echo $ac_n "(cached) $ac_c" 1>&6
1964 else
1965   cat > conftest.$ac_ext <<EOF
1966 #line 1967 "configure"
1967 #include "confdefs.h"
1968
1969 #include <stdio.h>
1970 #ifdef HAVE_STRING_H
1971 #include <string.h>
1972 #else
1973 #ifdef HAVE_STRINGS_H
1974 #include <strings.h>
1975 #endif
1976 #endif
1977 #ifdef HAVE_STDLIB_H
1978 #include <stdlib.h>
1979 #endif
1980 #ifdef HAVE_UNISTD_H
1981 #include <unistd.h>
1982 #endif
1983 int main() {
1984 char *(*pfn) = (char *(*)) malloc
1985 ; return 0; }
1986 EOF
1987 if { (eval echo configure:1988: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1988   rm -rf conftest*
1989   bfd_cv_decl_needed_malloc=no
1990 else
1991   echo "configure: failed program was:" >&5
1992   cat conftest.$ac_ext >&5
1993   rm -rf conftest*
1994   bfd_cv_decl_needed_malloc=yes
1995 fi
1996 rm -f conftest*
1997 fi
1998
1999 echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
2000 if test $bfd_cv_decl_needed_malloc = yes; then
2001   cat >> confdefs.h <<\EOF
2002 #define NEED_DECLARATION_MALLOC 1
2003 EOF
2004
2005 fi
2006
2007 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
2008 echo "configure:2009: checking whether realloc must be declared" >&5
2009 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
2010   echo $ac_n "(cached) $ac_c" 1>&6
2011 else
2012   cat > conftest.$ac_ext <<EOF
2013 #line 2014 "configure"
2014 #include "confdefs.h"
2015
2016 #include <stdio.h>
2017 #ifdef HAVE_STRING_H
2018 #include <string.h>
2019 #else
2020 #ifdef HAVE_STRINGS_H
2021 #include <strings.h>
2022 #endif
2023 #endif
2024 #ifdef HAVE_STDLIB_H
2025 #include <stdlib.h>
2026 #endif
2027 #ifdef HAVE_UNISTD_H
2028 #include <unistd.h>
2029 #endif
2030 int main() {
2031 char *(*pfn) = (char *(*)) realloc
2032 ; return 0; }
2033 EOF
2034 if { (eval echo configure:2035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2035   rm -rf conftest*
2036   bfd_cv_decl_needed_realloc=no
2037 else
2038   echo "configure: failed program was:" >&5
2039   cat conftest.$ac_ext >&5
2040   rm -rf conftest*
2041   bfd_cv_decl_needed_realloc=yes
2042 fi
2043 rm -f conftest*
2044 fi
2045
2046 echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
2047 if test $bfd_cv_decl_needed_realloc = yes; then
2048   cat >> confdefs.h <<\EOF
2049 #define NEED_DECLARATION_REALLOC 1
2050 EOF
2051
2052 fi
2053
2054 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
2055 echo "configure:2056: checking whether free must be declared" >&5
2056 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
2057   echo $ac_n "(cached) $ac_c" 1>&6
2058 else
2059   cat > conftest.$ac_ext <<EOF
2060 #line 2061 "configure"
2061 #include "confdefs.h"
2062
2063 #include <stdio.h>
2064 #ifdef HAVE_STRING_H
2065 #include <string.h>
2066 #else
2067 #ifdef HAVE_STRINGS_H
2068 #include <strings.h>
2069 #endif
2070 #endif
2071 #ifdef HAVE_STDLIB_H
2072 #include <stdlib.h>
2073 #endif
2074 #ifdef HAVE_UNISTD_H
2075 #include <unistd.h>
2076 #endif
2077 int main() {
2078 char *(*pfn) = (char *(*)) free
2079 ; return 0; }
2080 EOF
2081 if { (eval echo configure:2082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2082   rm -rf conftest*
2083   bfd_cv_decl_needed_free=no
2084 else
2085   echo "configure: failed program was:" >&5
2086   cat conftest.$ac_ext >&5
2087   rm -rf conftest*
2088   bfd_cv_decl_needed_free=yes
2089 fi
2090 rm -f conftest*
2091 fi
2092
2093 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
2094 if test $bfd_cv_decl_needed_free = yes; then
2095   cat >> confdefs.h <<\EOF
2096 #define NEED_DECLARATION_FREE 1
2097 EOF
2098
2099 fi
2100
2101 echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
2102 echo "configure:2103: checking whether strerror must be declared" >&5
2103 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
2104   echo $ac_n "(cached) $ac_c" 1>&6
2105 else
2106   cat > conftest.$ac_ext <<EOF
2107 #line 2108 "configure"
2108 #include "confdefs.h"
2109
2110 #include <stdio.h>
2111 #ifdef HAVE_STRING_H
2112 #include <string.h>
2113 #else
2114 #ifdef HAVE_STRINGS_H
2115 #include <strings.h>
2116 #endif
2117 #endif
2118 #ifdef HAVE_STDLIB_H
2119 #include <stdlib.h>
2120 #endif
2121 #ifdef HAVE_UNISTD_H
2122 #include <unistd.h>
2123 #endif
2124 int main() {
2125 char *(*pfn) = (char *(*)) strerror
2126 ; return 0; }
2127 EOF
2128 if { (eval echo configure:2129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2129   rm -rf conftest*
2130   bfd_cv_decl_needed_strerror=no
2131 else
2132   echo "configure: failed program was:" >&5
2133   cat conftest.$ac_ext >&5
2134   rm -rf conftest*
2135   bfd_cv_decl_needed_strerror=yes
2136 fi
2137 rm -f conftest*
2138 fi
2139
2140 echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
2141 if test $bfd_cv_decl_needed_strerror = yes; then
2142   cat >> confdefs.h <<\EOF
2143 #define NEED_DECLARATION_STRERROR 1
2144 EOF
2145
2146 fi
2147
2148 echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
2149 echo "configure:2150: checking whether strdup must be declared" >&5
2150 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
2151   echo $ac_n "(cached) $ac_c" 1>&6
2152 else
2153   cat > conftest.$ac_ext <<EOF
2154 #line 2155 "configure"
2155 #include "confdefs.h"
2156
2157 #include <stdio.h>
2158 #ifdef HAVE_STRING_H
2159 #include <string.h>
2160 #else
2161 #ifdef HAVE_STRINGS_H
2162 #include <strings.h>
2163 #endif
2164 #endif
2165 #ifdef HAVE_STDLIB_H
2166 #include <stdlib.h>
2167 #endif
2168 #ifdef HAVE_UNISTD_H
2169 #include <unistd.h>
2170 #endif
2171 int main() {
2172 char *(*pfn) = (char *(*)) strdup
2173 ; return 0; }
2174 EOF
2175 if { (eval echo configure:2176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2176   rm -rf conftest*
2177   bfd_cv_decl_needed_strdup=no
2178 else
2179   echo "configure: failed program was:" >&5
2180   cat conftest.$ac_ext >&5
2181   rm -rf conftest*
2182   bfd_cv_decl_needed_strdup=yes
2183 fi
2184 rm -f conftest*
2185 fi
2186
2187 echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
2188 if test $bfd_cv_decl_needed_strdup = yes; then
2189   cat >> confdefs.h <<\EOF
2190 #define NEED_DECLARATION_STRDUP 1
2191 EOF
2192
2193 fi
2194
2195
2196 # If we are configured native on GNU/Linux, work around problems with sys/procfs.h
2197 if test "${target}" = "${host}"; then
2198   case "${host}" in
2199   i[3456]86-*-linux*)
2200         cat >> confdefs.h <<\EOF
2201 #define START_INFERIOR_TRAPS_EXPECTED 2
2202 EOF
2203
2204         cat >> confdefs.h <<\EOF
2205 #define sys_quotactl 1
2206 EOF
2207
2208         ;;
2209   esac
2210 fi
2211
2212 echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6
2213 echo "configure:2214: checking for gregset_t type" >&5
2214 if eval "test \"`echo '$''{'gdb_cv_have_gregset_t'+set}'`\" = set"; then
2215   echo $ac_n "(cached) $ac_c" 1>&6
2216 else
2217   cat > conftest.$ac_ext <<EOF
2218 #line 2219 "configure"
2219 #include "confdefs.h"
2220 #include <sys/procfs.h>
2221 int main() {
2222 gregset_t *gregsetp = 0
2223 ; return 0; }
2224 EOF
2225 if { (eval echo configure:2226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2226   rm -rf conftest*
2227   gdb_cv_have_gregset_t=yes
2228 else
2229   echo "configure: failed program was:" >&5
2230   cat conftest.$ac_ext >&5
2231   rm -rf conftest*
2232   gdb_cv_have_gregset_t=no
2233 fi
2234 rm -f conftest*
2235 fi
2236
2237 echo "$ac_t""$gdb_cv_have_gregset_t" 1>&6
2238 if test $gdb_cv_have_gregset_t = yes; then
2239   cat >> confdefs.h <<\EOF
2240 #define HAVE_GREGSET_T 1
2241 EOF
2242
2243 fi
2244
2245 echo $ac_n "checking for fpregset_t type""... $ac_c" 1>&6
2246 echo "configure:2247: checking for fpregset_t type" >&5
2247 if eval "test \"`echo '$''{'gdb_cv_have_fpregset_t'+set}'`\" = set"; then
2248   echo $ac_n "(cached) $ac_c" 1>&6
2249 else
2250   cat > conftest.$ac_ext <<EOF
2251 #line 2252 "configure"
2252 #include "confdefs.h"
2253 #include <sys/procfs.h>
2254 int main() {
2255 fpregset_t *fpregsetp = 0
2256 ; return 0; }
2257 EOF
2258 if { (eval echo configure:2259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2259   rm -rf conftest*
2260   gdb_cv_have_fpregset_t=yes
2261 else
2262   echo "configure: failed program was:" >&5
2263   cat conftest.$ac_ext >&5
2264   rm -rf conftest*
2265   gdb_cv_have_fpregset_t=no
2266 fi
2267 rm -f conftest*
2268 fi
2269
2270 echo "$ac_t""$gdb_cv_have_fpregset_t" 1>&6
2271 if test $gdb_cv_have_fpregset_t = yes; then
2272   cat >> confdefs.h <<\EOF
2273 #define HAVE_FPREGSET_T 1
2274 EOF
2275
2276 fi
2277
2278 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
2279 echo "configure:2280: checking for main in -lm" >&5
2280 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
2281 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2282   echo $ac_n "(cached) $ac_c" 1>&6
2283 else
2284   ac_save_LIBS="$LIBS"
2285 LIBS="-lm  $LIBS"
2286 cat > conftest.$ac_ext <<EOF
2287 #line 2288 "configure"
2288 #include "confdefs.h"
2289
2290 int main() {
2291 main()
2292 ; return 0; }
2293 EOF
2294 if { (eval echo configure:2295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2295   rm -rf conftest*
2296   eval "ac_cv_lib_$ac_lib_var=yes"
2297 else
2298   echo "configure: failed program was:" >&5
2299   cat conftest.$ac_ext >&5
2300   rm -rf conftest*
2301   eval "ac_cv_lib_$ac_lib_var=no"
2302 fi
2303 rm -f conftest*
2304 LIBS="$ac_save_LIBS"
2305
2306 fi
2307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2308   echo "$ac_t""yes" 1>&6
2309     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2310     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2311   cat >> confdefs.h <<EOF
2312 #define $ac_tr_lib 1
2313 EOF
2314
2315   LIBS="-lm $LIBS"
2316
2317 else
2318   echo "$ac_t""no" 1>&6
2319 fi
2320
2321
2322 echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
2323 echo "configure:2324: checking for wctype in -lc" >&5
2324 ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
2325 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2326   echo $ac_n "(cached) $ac_c" 1>&6
2327 else
2328   ac_save_LIBS="$LIBS"
2329 LIBS="-lc  $LIBS"
2330 cat > conftest.$ac_ext <<EOF
2331 #line 2332 "configure"
2332 #include "confdefs.h"
2333 /* Override any gcc2 internal prototype to avoid an error.  */
2334 /* We use char because int might match the return type of a gcc2
2335     builtin and then its argument prototype would still apply.  */
2336 char wctype();
2337
2338 int main() {
2339 wctype()
2340 ; return 0; }
2341 EOF
2342 if { (eval echo configure:2343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2343   rm -rf conftest*
2344   eval "ac_cv_lib_$ac_lib_var=yes"
2345 else
2346   echo "configure: failed program was:" >&5
2347   cat conftest.$ac_ext >&5
2348   rm -rf conftest*
2349   eval "ac_cv_lib_$ac_lib_var=no"
2350 fi
2351 rm -f conftest*
2352 LIBS="$ac_save_LIBS"
2353
2354 fi
2355 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2356   echo "$ac_t""yes" 1>&6
2357   : 
2358 else
2359   echo "$ac_t""no" 1>&6
2360 echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
2361 echo "configure:2362: checking for wctype in -lw" >&5
2362 ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
2363 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2364   echo $ac_n "(cached) $ac_c" 1>&6
2365 else
2366   ac_save_LIBS="$LIBS"
2367 LIBS="-lw  $LIBS"
2368 cat > conftest.$ac_ext <<EOF
2369 #line 2370 "configure"
2370 #include "confdefs.h"
2371 /* Override any gcc2 internal prototype to avoid an error.  */
2372 /* We use char because int might match the return type of a gcc2
2373     builtin and then its argument prototype would still apply.  */
2374 char wctype();
2375
2376 int main() {
2377 wctype()
2378 ; return 0; }
2379 EOF
2380 if { (eval echo configure:2381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2381   rm -rf conftest*
2382   eval "ac_cv_lib_$ac_lib_var=yes"
2383 else
2384   echo "configure: failed program was:" >&5
2385   cat conftest.$ac_ext >&5
2386   rm -rf conftest*
2387   eval "ac_cv_lib_$ac_lib_var=no"
2388 fi
2389 rm -f conftest*
2390 LIBS="$ac_save_LIBS"
2391
2392 fi
2393 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2394   echo "$ac_t""yes" 1>&6
2395     ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \
2396     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2397   cat >> confdefs.h <<EOF
2398 #define $ac_tr_lib 1
2399 EOF
2400
2401   LIBS="-lw $LIBS"
2402
2403 else
2404   echo "$ac_t""no" 1>&6
2405 fi
2406
2407 fi
2408
2409
2410
2411
2412
2413 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
2414 echo "configure:2415: checking for long long support in compiler" >&5
2415 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
2416   echo $ac_n "(cached) $ac_c" 1>&6
2417 else
2418   cat > conftest.$ac_ext <<EOF
2419 #line 2420 "configure"
2420 #include "confdefs.h"
2421
2422 int main() {
2423
2424   extern long long foo;
2425   switch (foo & 2) { case 0: return 1; }
2426
2427 ; return 0; }
2428 EOF
2429 if { (eval echo configure:2430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2430   rm -rf conftest*
2431   gdb_cv_c_long_long=yes
2432 else
2433   echo "configure: failed program was:" >&5
2434   cat conftest.$ac_ext >&5
2435   rm -rf conftest*
2436   gdb_cv_c_long_long=no
2437 fi
2438 rm -f conftest*
2439 fi
2440
2441 echo "$ac_t""$gdb_cv_c_long_long" 1>&6
2442 if test $gdb_cv_c_long_long = yes; then
2443   cat >> confdefs.h <<\EOF
2444 #define CC_HAS_LONG_LONG 1
2445 EOF
2446
2447 fi
2448
2449
2450 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
2451 echo "configure:2452: checking for long long support in printf" >&5
2452 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
2453   echo $ac_n "(cached) $ac_c" 1>&6
2454 else
2455   if test "$cross_compiling" = yes; then
2456   gdb_cv_printf_has_long_long=no
2457 else
2458   cat > conftest.$ac_ext <<EOF
2459 #line 2460 "configure"
2460 #include "confdefs.h"
2461
2462 int main () {
2463   char buf[32];
2464   long long l = 0;
2465   l = (l << 16) + 0x0123;
2466   l = (l << 16) + 0x4567;
2467   l = (l << 16) + 0x89ab;
2468   l = (l << 16) + 0xcdef;
2469   sprintf (buf, "0x%016llx", l);
2470   return (strcmp ("0x0123456789abcdef", buf));
2471 }
2472 EOF
2473 if { (eval echo configure:2474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2474 then
2475   gdb_cv_printf_has_long_long=yes
2476 else
2477   echo "configure: failed program was:" >&5
2478   cat conftest.$ac_ext >&5
2479   rm -fr conftest*
2480   gdb_cv_printf_has_long_long=no
2481 fi
2482 rm -fr conftest*
2483 fi
2484
2485 fi
2486
2487 if test $gdb_cv_printf_has_long_long = yes; then
2488   cat >> confdefs.h <<\EOF
2489 #define PRINTF_HAS_LONG_LONG 1
2490 EOF
2491
2492 fi
2493 echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
2494
2495
2496 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
2497 echo "configure:2498: checking for long double support in compiler" >&5
2498 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
2499   echo $ac_n "(cached) $ac_c" 1>&6
2500 else
2501   cat > conftest.$ac_ext <<EOF
2502 #line 2503 "configure"
2503 #include "confdefs.h"
2504
2505 int main() {
2506 long double foo;
2507 ; return 0; }
2508 EOF
2509 if { (eval echo configure:2510: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2510   rm -rf conftest*
2511   ac_cv_c_long_double=yes
2512 else
2513   echo "configure: failed program was:" >&5
2514   cat conftest.$ac_ext >&5
2515   rm -rf conftest*
2516   ac_cv_c_long_double=no
2517 fi
2518 rm -f conftest*
2519 fi
2520
2521 echo "$ac_t""$ac_cv_c_long_double" 1>&6
2522 if test $ac_cv_c_long_double = yes; then
2523   cat >> confdefs.h <<\EOF
2524 #define HAVE_LONG_DOUBLE 1
2525 EOF
2526
2527 fi
2528
2529
2530 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
2531 echo "configure:2532: checking for long double support in printf" >&5
2532 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
2533   echo $ac_n "(cached) $ac_c" 1>&6
2534 else
2535   if test "$cross_compiling" = yes; then
2536   gdb_cv_printf_has_long_double=no
2537 else
2538   cat > conftest.$ac_ext <<EOF
2539 #line 2540 "configure"
2540 #include "confdefs.h"
2541
2542 int main () {
2543   char buf[16];
2544   long double f = 3.141592653;
2545   sprintf (buf, "%Lg", f);
2546   return (strncmp ("3.14159", buf, 7));
2547 }
2548 EOF
2549 if { (eval echo configure:2550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2550 then
2551   gdb_cv_printf_has_long_double=yes
2552 else
2553   echo "configure: failed program was:" >&5
2554   cat conftest.$ac_ext >&5
2555   rm -fr conftest*
2556   gdb_cv_printf_has_long_double=no
2557 fi
2558 rm -fr conftest*
2559 fi
2560
2561 fi
2562
2563 if test $gdb_cv_printf_has_long_double = yes; then
2564   cat >> confdefs.h <<\EOF
2565 #define PRINTF_HAS_LONG_DOUBLE 1
2566 EOF
2567
2568 fi
2569 echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
2570
2571
2572 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
2573 echo "configure:2574: checking for long double support in scanf" >&5
2574 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
2575   echo $ac_n "(cached) $ac_c" 1>&6
2576 else
2577   if test "$cross_compiling" = yes; then
2578   gdb_cv_scanf_has_long_double=no
2579 else
2580   cat > conftest.$ac_ext <<EOF
2581 #line 2582 "configure"
2582 #include "confdefs.h"
2583
2584 int main () {
2585   char *buf = "3.141592653";
2586   long double f = 0;
2587   sscanf (buf, "%Lg", &f);
2588   return !(f > 3.14159 && f < 3.14160);
2589 }
2590 EOF
2591 if { (eval echo configure:2592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2592 then
2593   gdb_cv_scanf_has_long_double=yes
2594 else
2595   echo "configure: failed program was:" >&5
2596   cat conftest.$ac_ext >&5
2597   rm -fr conftest*
2598   gdb_cv_scanf_has_long_double=no
2599 fi
2600 rm -fr conftest*
2601 fi
2602
2603 fi
2604
2605 if test $gdb_cv_scanf_has_long_double = yes; then
2606   cat >> confdefs.h <<\EOF
2607 #define SCANF_HAS_LONG_DOUBLE 1
2608 EOF
2609
2610 fi
2611 echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
2612
2613 for ac_hdr in unistd.h
2614 do
2615 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2616 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2617 echo "configure:2618: checking for $ac_hdr" >&5
2618 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2619   echo $ac_n "(cached) $ac_c" 1>&6
2620 else
2621   cat > conftest.$ac_ext <<EOF
2622 #line 2623 "configure"
2623 #include "confdefs.h"
2624 #include <$ac_hdr>
2625 EOF
2626 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2627 { (eval echo configure:2628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2628 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2629 if test -z "$ac_err"; then
2630   rm -rf conftest*
2631   eval "ac_cv_header_$ac_safe=yes"
2632 else
2633   echo "$ac_err" >&5
2634   echo "configure: failed program was:" >&5
2635   cat conftest.$ac_ext >&5
2636   rm -rf conftest*
2637   eval "ac_cv_header_$ac_safe=no"
2638 fi
2639 rm -f conftest*
2640 fi
2641 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2642   echo "$ac_t""yes" 1>&6
2643     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2644   cat >> confdefs.h <<EOF
2645 #define $ac_tr_hdr 1
2646 EOF
2647  
2648 else
2649   echo "$ac_t""no" 1>&6
2650 fi
2651 done
2652
2653 for ac_func in getpagesize
2654 do
2655 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2656 echo "configure:2657: checking for $ac_func" >&5
2657 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2658   echo $ac_n "(cached) $ac_c" 1>&6
2659 else
2660   cat > conftest.$ac_ext <<EOF
2661 #line 2662 "configure"
2662 #include "confdefs.h"
2663 /* System header to define __stub macros and hopefully few prototypes,
2664     which can conflict with char $ac_func(); below.  */
2665 #include <assert.h>
2666 /* Override any gcc2 internal prototype to avoid an error.  */
2667 /* We use char because int might match the return type of a gcc2
2668     builtin and then its argument prototype would still apply.  */
2669 char $ac_func();
2670
2671 int main() {
2672
2673 /* The GNU C library defines this for functions which it implements
2674     to always fail with ENOSYS.  Some functions are actually named
2675     something starting with __ and the normal name is an alias.  */
2676 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2677 choke me
2678 #else
2679 $ac_func();
2680 #endif
2681
2682 ; return 0; }
2683 EOF
2684 if { (eval echo configure:2685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2685   rm -rf conftest*
2686   eval "ac_cv_func_$ac_func=yes"
2687 else
2688   echo "configure: failed program was:" >&5
2689   cat conftest.$ac_ext >&5
2690   rm -rf conftest*
2691   eval "ac_cv_func_$ac_func=no"
2692 fi
2693 rm -f conftest*
2694 fi
2695
2696 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2697   echo "$ac_t""yes" 1>&6
2698     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2699   cat >> confdefs.h <<EOF
2700 #define $ac_tr_func 1
2701 EOF
2702  
2703 else
2704   echo "$ac_t""no" 1>&6
2705 fi
2706 done
2707
2708 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
2709 echo "configure:2710: checking for working mmap" >&5
2710 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
2711   echo $ac_n "(cached) $ac_c" 1>&6
2712 else
2713   if test "$cross_compiling" = yes; then
2714   ac_cv_func_mmap_fixed_mapped=no
2715 else
2716   cat > conftest.$ac_ext <<EOF
2717 #line 2718 "configure"
2718 #include "confdefs.h"
2719
2720 /* Thanks to Mike Haertel and Jim Avera for this test.
2721    Here is a matrix of mmap possibilities:
2722         mmap private not fixed
2723         mmap private fixed at somewhere currently unmapped
2724         mmap private fixed at somewhere already mapped
2725         mmap shared not fixed
2726         mmap shared fixed at somewhere currently unmapped
2727         mmap shared fixed at somewhere already mapped
2728    For private mappings, we should verify that changes cannot be read()
2729    back from the file, nor mmap's back from the file at a different
2730    address.  (There have been systems where private was not correctly
2731    implemented like the infamous i386 svr4.0, and systems where the
2732    VM page cache was not coherent with the filesystem buffer cache
2733    like early versions of FreeBSD and possibly contemporary NetBSD.)
2734    For shared mappings, we should conversely verify that changes get
2735    propogated back to all the places they're supposed to be.
2736
2737    Grep wants private fixed already mapped.
2738    The main things grep needs to know about mmap are:
2739    * does it exist and is it safe to write into the mmap'd area
2740    * how to use it (BSD variants)  */
2741 #include <sys/types.h>
2742 #include <fcntl.h>
2743 #include <sys/mman.h>
2744
2745 /* This mess was copied from the GNU getpagesize.h.  */
2746 #ifndef HAVE_GETPAGESIZE
2747 # ifdef HAVE_UNISTD_H
2748 #  include <unistd.h>
2749 # endif
2750
2751 /* Assume that all systems that can run configure have sys/param.h.  */
2752 # ifndef HAVE_SYS_PARAM_H
2753 #  define HAVE_SYS_PARAM_H 1
2754 # endif
2755
2756 # ifdef _SC_PAGESIZE
2757 #  define getpagesize() sysconf(_SC_PAGESIZE)
2758 # else /* no _SC_PAGESIZE */
2759 #  ifdef HAVE_SYS_PARAM_H
2760 #   include <sys/param.h>
2761 #   ifdef EXEC_PAGESIZE
2762 #    define getpagesize() EXEC_PAGESIZE
2763 #   else /* no EXEC_PAGESIZE */
2764 #    ifdef NBPG
2765 #     define getpagesize() NBPG * CLSIZE
2766 #     ifndef CLSIZE
2767 #      define CLSIZE 1
2768 #     endif /* no CLSIZE */
2769 #    else /* no NBPG */
2770 #     ifdef NBPC
2771 #      define getpagesize() NBPC
2772 #     else /* no NBPC */
2773 #      ifdef PAGESIZE
2774 #       define getpagesize() PAGESIZE
2775 #      endif /* PAGESIZE */
2776 #     endif /* no NBPC */
2777 #    endif /* no NBPG */
2778 #   endif /* no EXEC_PAGESIZE */
2779 #  else /* no HAVE_SYS_PARAM_H */
2780 #   define getpagesize() 8192   /* punt totally */
2781 #  endif /* no HAVE_SYS_PARAM_H */
2782 # endif /* no _SC_PAGESIZE */
2783
2784 #endif /* no HAVE_GETPAGESIZE */
2785
2786 #ifdef __cplusplus
2787 extern "C" { void *malloc(unsigned); }
2788 #else
2789 char *malloc();
2790 #endif
2791
2792 int
2793 main()
2794 {
2795         char *data, *data2, *data3;
2796         int i, pagesize;
2797         int fd;
2798
2799         pagesize = getpagesize();
2800
2801         /*
2802          * First, make a file with some known garbage in it.
2803          */
2804         data = malloc(pagesize);
2805         if (!data)
2806                 exit(1);
2807         for (i = 0; i < pagesize; ++i)
2808                 *(data + i) = rand();
2809         umask(0);
2810         fd = creat("conftestmmap", 0600);
2811         if (fd < 0)
2812                 exit(1);
2813         if (write(fd, data, pagesize) != pagesize)
2814                 exit(1);
2815         close(fd);
2816
2817         /*
2818          * Next, try to mmap the file at a fixed address which
2819          * already has something else allocated at it.  If we can,
2820          * also make sure that we see the same garbage.
2821          */
2822         fd = open("conftestmmap", O_RDWR);
2823         if (fd < 0)
2824                 exit(1);
2825         data2 = malloc(2 * pagesize);
2826         if (!data2)
2827                 exit(1);
2828         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
2829         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
2830             MAP_PRIVATE | MAP_FIXED, fd, 0L))
2831                 exit(1);
2832         for (i = 0; i < pagesize; ++i)
2833                 if (*(data + i) != *(data2 + i))
2834                         exit(1);
2835
2836         /*
2837          * Finally, make sure that changes to the mapped area
2838          * do not percolate back to the file as seen by read().
2839          * (This is a bug on some variants of i386 svr4.0.)
2840          */
2841         for (i = 0; i < pagesize; ++i)
2842                 *(data2 + i) = *(data2 + i) + 1;
2843         data3 = malloc(pagesize);
2844         if (!data3)
2845                 exit(1);
2846         if (read(fd, data3, pagesize) != pagesize)
2847                 exit(1);
2848         for (i = 0; i < pagesize; ++i)
2849                 if (*(data + i) != *(data3 + i))
2850                         exit(1);
2851         close(fd);
2852         unlink("conftestmmap");
2853         exit(0);
2854 }
2855
2856 EOF
2857 if { (eval echo configure:2858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2858 then
2859   ac_cv_func_mmap_fixed_mapped=yes
2860 else
2861   echo "configure: failed program was:" >&5
2862   cat conftest.$ac_ext >&5
2863   rm -fr conftest*
2864   ac_cv_func_mmap_fixed_mapped=no
2865 fi
2866 rm -fr conftest*
2867 fi
2868
2869 fi
2870
2871 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
2872 if test $ac_cv_func_mmap_fixed_mapped = yes; then
2873   cat >> confdefs.h <<\EOF
2874 #define HAVE_MMAP 1
2875 EOF
2876
2877 fi
2878
2879
2880
2881
2882 if test ${build} = ${host} -a ${host} = ${target} ; then
2883    case ${host_os} in
2884    hpux*)
2885       echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
2886 echo "configure:2887: checking for HPUX/OSF thread support" >&5
2887       if test -f /usr/include/dce/cma_config.h ; then
2888          if test "$GCC" = "yes" ; then
2889             echo "$ac_t""yes" 1>&6
2890             cat >> confdefs.h <<\EOF
2891 #define HAVE_HPUX_THREAD_SUPPORT 1
2892 EOF
2893
2894             CONFIG_OBS="${CONFIG_OJS} hpux-thread.o"
2895             CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
2896          else
2897             echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
2898          fi
2899       else
2900          echo "$ac_t""no" 1>&6
2901       fi
2902       ;;
2903    solaris*)
2904       echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
2905 echo "configure:2906: checking for Solaris thread debugging library" >&5
2906       if test -f /usr/lib/libthread_db.so.1 ; then
2907          echo "$ac_t""yes" 1>&6
2908          cat >> confdefs.h <<\EOF
2909 #define HAVE_THREAD_DB_LIB 1
2910 EOF
2911
2912          CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
2913          CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
2914          echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
2915 echo "configure:2916: checking for dlopen in -ldl" >&5
2916 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
2917 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2918   echo $ac_n "(cached) $ac_c" 1>&6
2919 else
2920   ac_save_LIBS="$LIBS"
2921 LIBS="-ldl  $LIBS"
2922 cat > conftest.$ac_ext <<EOF
2923 #line 2924 "configure"
2924 #include "confdefs.h"
2925 /* Override any gcc2 internal prototype to avoid an error.  */
2926 /* We use char because int might match the return type of a gcc2
2927     builtin and then its argument prototype would still apply.  */
2928 char dlopen();
2929
2930 int main() {
2931 dlopen()
2932 ; return 0; }
2933 EOF
2934 if { (eval echo configure:2935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2935   rm -rf conftest*
2936   eval "ac_cv_lib_$ac_lib_var=yes"
2937 else
2938   echo "configure: failed program was:" >&5
2939   cat conftest.$ac_ext >&5
2940   rm -rf conftest*
2941   eval "ac_cv_lib_$ac_lib_var=no"
2942 fi
2943 rm -f conftest*
2944 LIBS="$ac_save_LIBS"
2945
2946 fi
2947 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2948   echo "$ac_t""yes" 1>&6
2949     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2950     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2951   cat >> confdefs.h <<EOF
2952 #define $ac_tr_lib 1
2953 EOF
2954
2955   LIBS="-ldl $LIBS"
2956
2957 else
2958   echo "$ac_t""no" 1>&6
2959 fi
2960
2961          if test "$GCC" = "yes" ; then
2962             # The GNU linker requires the -export-dynamic option to make
2963             # all symbols visible in the dynamic symbol table.
2964             hold_ldflags=$LDFLAGS
2965             echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
2966 echo "configure:2967: checking for the ld -export-dynamic flag" >&5
2967             LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
2968             cat > conftest.$ac_ext <<EOF
2969 #line 2970 "configure"
2970 #include "confdefs.h"
2971
2972 int main() {
2973 int i;
2974 ; return 0; }
2975 EOF
2976 if { (eval echo configure:2977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2977   rm -rf conftest*
2978   found=yes
2979 else
2980   echo "configure: failed program was:" >&5
2981   cat conftest.$ac_ext >&5
2982   rm -rf conftest*
2983   found=no
2984 fi
2985 rm -f conftest*
2986             LDFLAGS=$hold_ldflags
2987             echo "$ac_t""$found" 1>&6
2988             if test $found = yes; then
2989                CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
2990             fi
2991          fi
2992          # Sun randomly tweaked the prototypes in <proc_service.h>
2993          # at one point.
2994          echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
2995 echo "configure:2996: checking if <proc_service.h> is old" >&5
2996          if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
2997   echo $ac_n "(cached) $ac_c" 1>&6
2998 else
2999   
3000             cat > conftest.$ac_ext <<EOF
3001 #line 3002 "configure"
3002 #include "confdefs.h"
3003
3004                 #include <proc_service.h>
3005                 ps_err_e ps_pdwrite
3006                     (struct ps_prochandle*, psaddr_t, const void*, size_t);
3007             
3008 int main() {
3009
3010 ; return 0; }
3011 EOF
3012 if { (eval echo configure:3013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3013   rm -rf conftest*
3014   gdb_cv_proc_service_is_old=no
3015 else
3016   echo "configure: failed program was:" >&5
3017   cat conftest.$ac_ext >&5
3018   rm -rf conftest*
3019   gdb_cv_proc_service_is_old=yes
3020 fi
3021 rm -f conftest*
3022          
3023 fi
3024
3025          echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
3026          if test $gdb_cv_proc_service_is_old = yes; then
3027             cat >> confdefs.h <<\EOF
3028 #define PROC_SERVICE_IS_OLD 1
3029 EOF
3030
3031          fi
3032       else
3033          echo "$ac_t""no" 1>&6
3034       fi
3035       ;;
3036    esac
3037    
3038 fi
3039
3040 ENABLE_CFLAGS=
3041
3042 # Check whether --enable-tui or --disable-tui was given.
3043 if test "${enable_tui+set}" = set; then
3044   enableval="$enable_tui"
3045   
3046   case "${enable_tui}" in
3047     yes | no) ;;
3048     "")  enable_tui=yes ;;
3049     *)
3050       { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; }
3051     ;;
3052   esac
3053
3054 fi
3055
3056 case ${enable_tui} in
3057   "yes" )
3058     cat >> confdefs.h <<\EOF
3059 #define TUI 1
3060 EOF
3061
3062     BUILD_TUI=all-tui
3063     TUI_LIBRARY=tui/libtui.a
3064   ;;
3065   * )
3066     BUILD_TUI=
3067     TUI_LIBRARY=
3068   ;;
3069 esac
3070
3071
3072
3073 # Check whether --enable-netrom or --disable-netrom was given.
3074 if test "${enable_netrom+set}" = set; then
3075   enableval="$enable_netrom"
3076   case "${enableval}" in
3077 yes)    enable_netrom=yes ;;
3078 no)     enable_netrom=no ;;
3079 *)      { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
3080 esac
3081 fi
3082
3083
3084 if test "${enable_netrom}" = "yes"; then
3085         CONFIG_OBS="${CONFIG_OBS} remote-nrom.o" 
3086         CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
3087 fi
3088
3089 # Check whether --enable-build-warnings or --disable-build-warnings was given.
3090 if test "${enable_build_warnings+set}" = set; then
3091   enableval="$enable_build_warnings"
3092   build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
3093 case "${enableval}" in
3094   yes)  ;;
3095   no)   build_warnings="-w";;
3096   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
3097         build_warnings="${build_warnings} ${t}";;
3098   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
3099         build_warnings="${t} ${build_warnings}";;
3100   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
3101 esac
3102 else
3103   build_warnings=""
3104 fi
3105
3106 if test "x${build_warnings}" != x -a "x$GCC" = xyes
3107 then
3108    WARN_CFLAGS="${build_warnings}"
3109 else
3110    WARN_CFLAGS=""
3111 fi
3112
3113
3114 MMALLOC_CFLAGS=
3115 MMALLOC=
3116
3117
3118
3119 # Check whether --with-mmalloc or --without-mmalloc was given.
3120 if test "${with_mmalloc+set}" = set; then
3121   withval="$with_mmalloc"
3122   case "${withval}" in
3123   yes)  want_mmalloc=true ;;
3124   no)   want_mmalloc=false;;
3125   *)    { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
3126 esac
3127 else
3128   want_mmalloc=false
3129 fi
3130
3131 if test x$want_mmalloc = xtrue; then
3132    cat >> confdefs.h <<\EOF
3133 #define USE_MMALLOC 1
3134 EOF
3135
3136    cat >> confdefs.h <<\EOF
3137 #define MMCHECK_FORCE 1
3138 EOF
3139
3140    MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
3141    MMALLOC='../mmalloc/libmmalloc.a'
3142 fi
3143
3144 # start-sanitize-carp
3145 # The below takes an educated guess at the targets that
3146 # should be built.  It is an interum version that provides
3147 # significant backward compatibility.
3148
3149 # Check whether --enable-carp or --disable-carp was given.
3150 if test "${enable_carp+set}" = set; then
3151   enableval="$enable_carp"
3152   case "${enableval}" in
3153   yes) enable_carp=yes ;;
3154   no)  enable_carp=no ;;
3155   *)   { echo "configure: error: bad value ${enableval} for carp option" 1>&2; exit 1; } ;;
3156 esac
3157 else
3158   enable_carp=no
3159 fi
3160
3161 # Check whether --enable-targets or --disable-targets was given.
3162 if test "${enable_targets+set}" = set; then
3163   enableval="$enable_targets"
3164   case "${enableval}" in
3165   yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
3166             ;;
3167   no)       enable_targets= ;;
3168   *)        enable_targets="$enableval" ;;
3169 esac
3170 fi
3171
3172 # Canonicalize the secondary target names.
3173 all_targets=false
3174 if test -n "$enable_targets" ; then
3175     if test "$enable_targets" = all ; then
3176         all_targets=true
3177     else
3178         for targ in `echo $enable_targets | sed 's/,/ /g'`
3179         do
3180             result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
3181             if test -n "$result" ; then
3182                 canon_targets="$canon_targets $result"
3183             fi
3184         done
3185     fi
3186 fi
3187
3188 # Convert the target names into GDB [*]-tdep.c names
3189 selarchs=
3190 for targ in $target $canon_targets
3191 do
3192     if test "x$targ" = "xall" ; then
3193         all_targets=true
3194     else
3195         t_cpu=`echo $targ    | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
3196         t_vendor=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
3197         t_os=`echo $targ     | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
3198         mt=`
3199 target=$targ
3200 target_cpu=$t_cpu
3201 target_vendor=$t_vendor
3202 target_os=$t_os
3203 . ${srcdir}/configure.tgt
3204 echo ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt`
3205         if test -r ${mt} ; then
3206             # This gets confused over .mt files that have multiple -tdep.o
3207             tdep=`sed -n '
3208 s/^.*[  =]\([^  ]*\)-tdep.o.*/\1/p
3209 ' $mt`
3210             selarchs="$selarchs $tdep"
3211         fi
3212     fi
3213 done    
3214
3215 # We don't do any links based on the target system, just makefile config.
3216
3217 if test x${all_targets} = xfalse ; then
3218
3219     # Target architecture .o files.
3220     ta=
3221
3222     for arch in $selarchs
3223     do
3224         archdefs="$archdefs -DARCH_$arch"
3225         ta="$ta ${arch}-tdep.o"
3226         # Special cases
3227         case "$arch" in
3228             dvp)  ta="$ta mips-tdep.o dvp-tdep.o" ;;
3229         esac
3230     done
3231
3232     # Weed out duplicate .o files.
3233     f=""
3234     for i in $ta ; do
3235         case " $f " in
3236             *" $i "*) ;;
3237             *) f="$f $i" ;;
3238         esac
3239     done
3240     ta="$f"
3241
3242     # And duplicate -D flags.
3243     f=""
3244     for i in $archdefs ; do
3245         case " $f " in
3246             *" $i "*) ;;
3247             *) f="$f $i" ;;
3248         esac
3249     done
3250     archdefs="$f"
3251
3252     MACHINE_OBS="$ta"
3253
3254 else    # all_targets is true
3255     archdefs=-DARCH_all
3256     MACHINE_OBS='$(ALL_MACHINES)'
3257 fi
3258
3259 if test "${enable_carp}" = yes ; then
3260     gdb_target=carp
3261     gdb_target_cpu=carp
3262 else
3263     MACHINE_OBS="# $MACHINE_OBS"
3264 fi
3265
3266
3267 # end-sanitize-carp
3268 # start-sanitize-gdbtk
3269 # start-sanitize-ide
3270 ENABLE_IDE=
3271 # Check whether --enable-ide or --disable-ide was given.
3272 if test "${enable_ide+set}" = set; then
3273   enableval="$enable_ide"
3274   :
3275 fi
3276
3277 if test "$enable_ide" = yes; then
3278    enable_ide=yes
3279    ENABLE_IDE=1
3280 else
3281    enable_ide=no
3282 fi
3283
3284
3285 # Check whether --with-foundry-libs or --without-foundry-libs was given.
3286 if test "${with_foundry_libs+set}" = set; then
3287   withval="$with_foundry_libs"
3288   FOUNDRY_LIB_BASE=${withval}
3289 fi
3290
3291
3292
3293 #
3294 # This is the Foundry SDK
3295 #
3296 # These variables are used to determine where the Foundry libs and
3297 # header files are located.
3298 #
3299 if test "$FOUNDRY_LIB_BASE" != ""; then
3300     LIBGUI="${FOUNDRY_LIB_BASE}/lib/libgui.a"
3301     GUI_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include"
3302     if test x$enable_ide = xyes; then
3303         IDE_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include -DIDE"
3304         IDE_X="-L${FOUNDRY_LIB_BASE}/lib -lilu-Tk -lilu-c -lilu"
3305     else
3306         IDE_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include"
3307     fi
3308     LIBIDETCL="${FOUNDRY_LIB_BASE}/lib/libidetcl.a"
3309     LIBIDE="${FOUNDRY_LIB_BASE}/lib/libide.a"
3310     IDE_DEPS="${FOUNDRY_LIB_BASE}/lib/libilu-Tk.a ${FOUNDRY_LIB_BASE}/lib/libilu-c.a ${FOUNDRY_LIB_BASE}/lib/libilu.a"
3311 else
3312 # end-sanitize-ide
3313     LIBGUI="../libgui/src/libgui.a"
3314     GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
3315 # start-sanitize-ide
3316     if test x$enable_ide = xyes; then
3317         IDE_CFLAGS_X="-I${srcdir}/../libidetcl/src -I${srcdir}/../libide/src -DIDE -I${srcdir}/../ilu/runtime/mainloop"
3318         IDE_X="-L../ilu/runtime/mainloop -lilu-Tk -L../ilu/runtime/c -lilu-c -L../ilu/runtime/kernel -lilu"
3319     else
3320         IDE_CFLAGS_X="-I${srcdir}/../libidetcl/src -I${srcdir}/../libide/src"
3321     fi
3322     LIBIDETCL="../libidetcl/src/libidetcl.a"
3323     LIBIDE="../libide/src/libide.a"
3324     IDE_DEPS="../ilu/runtime/mainloop/libilu-Tk.a ../ilu/runtime/c/libilu-c.a ../ilu/runtime/kernel/libilu.a"
3325 fi
3326
3327 # end-sanitize-ide
3328
3329
3330 # start-sanitize-ide
3331
3332
3333
3334
3335
3336 # end-sanitize-ide
3337
3338
3339 # Check whether --with-cpu or --without-cpu was given.
3340 if test "${with_cpu+set}" = set; then
3341   withval="$with_cpu"
3342   case "${target}" in
3343   powerpc-* | powerpcle-* )
3344     ## It would be nice to keep this table in sync with the one in
3345     ## gcc/configure.
3346     case "${with_cpu}" in
3347       ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
3348       | 604 | 750 )
3349         ## Those are all handled in variants in rs6000-tdep.c, so they're fine.
3350       ;;
3351       common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 ) 
3352         ## These are all RS6000 variants, as far as GDB is concerned.
3353         with_cpu=rs6000
3354       ;;
3355       603e | ec603e )
3356         with_cpu=603
3357       ;;
3358       604e )
3359         with_cpu=604
3360       ;;
3361       * )
3362         echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2
3363         with_cpu=ppc-uisa
3364       ;;
3365     esac
3366   ;;
3367   * )
3368     echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2
3369   ;;
3370 esac
3371 cat >> confdefs.h <<EOF
3372 #define TARGET_CPU_DEFAULT "${with_cpu}"
3373 EOF
3374
3375
3376 fi
3377
3378
3379
3380 ENABLE_GDBTK=
3381
3382 # Check whether --enable-gdbtk or --disable-gdbtk was given.
3383 if test "${enable_gdbtk+set}" = set; then
3384   enableval="$enable_gdbtk"
3385   case "${enableval}" in
3386     yes)
3387         case "$host" in
3388         *go32*)
3389             echo "configure: warning: GDB does not support GDBtk on host ${host}.  GDBtk will be disabled." 1>&2
3390             enable_gdbtk=no ;;
3391         *windows*)
3392             echo "configure: warning: GDB does not support GDBtk on host ${host}.  GDBtk will be disabled." 1>&2
3393             enable_gdbtk=no ;;
3394         *)
3395             enable_gdbtk=yes ;;
3396         esac ;;
3397     no)
3398         enable_gdbtk=no  ;;
3399     *)
3400         { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
3401 esac
3402 else
3403   
3404 # Default is on for everything but go32 and Cygwin
3405 case "$host" in
3406     *go32* | *windows*)
3407         ;;
3408     *)
3409         enable_gdbtk=yes ;;
3410     esac
3411
3412 fi
3413
3414
3415 # In the Cygwin environment, we need some additional flags.
3416 echo $ac_n "checking for cygwin""... $ac_c" 1>&6
3417 echo "configure:3418: checking for cygwin" >&5
3418 if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
3419   echo $ac_n "(cached) $ac_c" 1>&6
3420 else
3421   cat > conftest.$ac_ext <<EOF
3422 #line 3423 "configure"
3423 #include "confdefs.h"
3424
3425 #ifdef __CYGWIN32__
3426 lose
3427 #endif
3428 EOF
3429 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3430   egrep "lose" >/dev/null 2>&1; then
3431   rm -rf conftest*
3432   gdb_cv_os_cygwin=yes
3433 else
3434   rm -rf conftest*
3435   gdb_cv_os_cygwin=no
3436 fi
3437 rm -f conftest*
3438
3439 fi
3440
3441 echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
3442
3443 if test x$gdb_cv_os_cygwin = xyes; then
3444   TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
3445 else
3446   TERM_LIB=
3447   echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
3448 echo "configure:3449: checking for tgetent in -lncurses" >&5
3449 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
3450 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3451   echo $ac_n "(cached) $ac_c" 1>&6
3452 else
3453   ac_save_LIBS="$LIBS"
3454 LIBS="-lncurses  $LIBS"
3455 cat > conftest.$ac_ext <<EOF
3456 #line 3457 "configure"
3457 #include "confdefs.h"
3458 /* Override any gcc2 internal prototype to avoid an error.  */
3459 /* We use char because int might match the return type of a gcc2
3460     builtin and then its argument prototype would still apply.  */
3461 char tgetent();
3462
3463 int main() {
3464 tgetent()
3465 ; return 0; }
3466 EOF
3467 if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3468   rm -rf conftest*
3469   eval "ac_cv_lib_$ac_lib_var=yes"
3470 else
3471   echo "configure: failed program was:" >&5
3472   cat conftest.$ac_ext >&5
3473   rm -rf conftest*
3474   eval "ac_cv_lib_$ac_lib_var=no"
3475 fi
3476 rm -f conftest*
3477 LIBS="$ac_save_LIBS"
3478
3479 fi
3480 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3481   echo "$ac_t""yes" 1>&6
3482   TERM_LIB=-lncurses
3483 else
3484   echo "$ac_t""no" 1>&6
3485 echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
3486 echo "configure:3487: checking for tgetent in -ltermlib" >&5
3487 ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
3488 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3489   echo $ac_n "(cached) $ac_c" 1>&6
3490 else
3491   ac_save_LIBS="$LIBS"
3492 LIBS="-ltermlib  $LIBS"
3493 cat > conftest.$ac_ext <<EOF
3494 #line 3495 "configure"
3495 #include "confdefs.h"
3496 /* Override any gcc2 internal prototype to avoid an error.  */
3497 /* We use char because int might match the return type of a gcc2
3498     builtin and then its argument prototype would still apply.  */
3499 char tgetent();
3500
3501 int main() {
3502 tgetent()
3503 ; return 0; }
3504 EOF
3505 if { (eval echo configure:3506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3506   rm -rf conftest*
3507   eval "ac_cv_lib_$ac_lib_var=yes"
3508 else
3509   echo "configure: failed program was:" >&5
3510   cat conftest.$ac_ext >&5
3511   rm -rf conftest*
3512   eval "ac_cv_lib_$ac_lib_var=no"
3513 fi
3514 rm -f conftest*
3515 LIBS="$ac_save_LIBS"
3516
3517 fi
3518 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3519   echo "$ac_t""yes" 1>&6
3520   TERM_LIB=-ltermlib
3521 else
3522   echo "$ac_t""no" 1>&6
3523 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
3524 echo "configure:3525: checking for tgetent in -ltermcap" >&5
3525 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
3526 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3527   echo $ac_n "(cached) $ac_c" 1>&6
3528 else
3529   ac_save_LIBS="$LIBS"
3530 LIBS="-ltermcap  $LIBS"
3531 cat > conftest.$ac_ext <<EOF
3532 #line 3533 "configure"
3533 #include "confdefs.h"
3534 /* Override any gcc2 internal prototype to avoid an error.  */
3535 /* We use char because int might match the return type of a gcc2
3536     builtin and then its argument prototype would still apply.  */
3537 char tgetent();
3538
3539 int main() {
3540 tgetent()
3541 ; return 0; }
3542 EOF
3543 if { (eval echo configure:3544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3544   rm -rf conftest*
3545   eval "ac_cv_lib_$ac_lib_var=yes"
3546 else
3547   echo "configure: failed program was:" >&5
3548   cat conftest.$ac_ext >&5
3549   rm -rf conftest*
3550   eval "ac_cv_lib_$ac_lib_var=no"
3551 fi
3552 rm -f conftest*
3553 LIBS="$ac_save_LIBS"
3554
3555 fi
3556 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3557   echo "$ac_t""yes" 1>&6
3558   TERM_LIB=-ltermcap
3559 else
3560   echo "$ac_t""no" 1>&6
3561 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
3562 echo "configure:3563: checking for tgetent in -lcurses" >&5
3563 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
3564 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3565   echo $ac_n "(cached) $ac_c" 1>&6
3566 else
3567   ac_save_LIBS="$LIBS"
3568 LIBS="-lcurses  $LIBS"
3569 cat > conftest.$ac_ext <<EOF
3570 #line 3571 "configure"
3571 #include "confdefs.h"
3572 /* Override any gcc2 internal prototype to avoid an error.  */
3573 /* We use char because int might match the return type of a gcc2
3574     builtin and then its argument prototype would still apply.  */
3575 char tgetent();
3576
3577 int main() {
3578 tgetent()
3579 ; return 0; }
3580 EOF
3581 if { (eval echo configure:3582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3582   rm -rf conftest*
3583   eval "ac_cv_lib_$ac_lib_var=yes"
3584 else
3585   echo "configure: failed program was:" >&5
3586   cat conftest.$ac_ext >&5
3587   rm -rf conftest*
3588   eval "ac_cv_lib_$ac_lib_var=no"
3589 fi
3590 rm -f conftest*
3591 LIBS="$ac_save_LIBS"
3592
3593 fi
3594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3595   echo "$ac_t""yes" 1>&6
3596   TERM_LIB=-lcurses
3597 else
3598   echo "$ac_t""no" 1>&6
3599 echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
3600 echo "configure:3601: checking for tgetent in -lterminfo" >&5
3601 ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
3602 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3603   echo $ac_n "(cached) $ac_c" 1>&6
3604 else
3605   ac_save_LIBS="$LIBS"
3606 LIBS="-lterminfo  $LIBS"
3607 cat > conftest.$ac_ext <<EOF
3608 #line 3609 "configure"
3609 #include "confdefs.h"
3610 /* Override any gcc2 internal prototype to avoid an error.  */
3611 /* We use char because int might match the return type of a gcc2
3612     builtin and then its argument prototype would still apply.  */
3613 char tgetent();
3614
3615 int main() {
3616 tgetent()
3617 ; return 0; }
3618 EOF
3619 if { (eval echo configure:3620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3620   rm -rf conftest*
3621   eval "ac_cv_lib_$ac_lib_var=yes"
3622 else
3623   echo "configure: failed program was:" >&5
3624   cat conftest.$ac_ext >&5
3625   rm -rf conftest*
3626   eval "ac_cv_lib_$ac_lib_var=no"
3627 fi
3628 rm -f conftest*
3629 LIBS="$ac_save_LIBS"
3630
3631 fi
3632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3633   echo "$ac_t""yes" 1>&6
3634   TERM_LIB=-lterminfo
3635 else
3636   echo "$ac_t""no" 1>&6
3637 fi
3638
3639 fi
3640
3641 fi
3642
3643 fi
3644
3645 fi
3646
3647
3648   if test "x$TERM_LIB" = x
3649   then
3650     { echo "configure: error: Could not find a term library" 1>&2; exit 1; }
3651   fi
3652 fi
3653
3654 WIN32LIBS=
3655 WIN32LDAPP=
3656
3657
3658
3659 DLLTOOL=${DLLTOOL-dlltool}
3660 WINDRES=${WINDRES-windres}
3661
3662
3663
3664 if test x$gdb_cv_os_cygwin = xyes; then
3665     WIN32LIBS="-luser32"
3666     if test x$enable_ide = xyes; then
3667         WIN32LIBS="$WIN32LIBS -ladvapi32"
3668     fi
3669 fi
3670
3671 configdir="unix"
3672
3673 GDBTKLIBS=
3674 if test "${enable_gdbtk}" = "yes"; then
3675
3676     
3677 #
3678 # Ok, lets find the tcl configuration
3679 # First, look for one uninstalled.  
3680 # the alternative search directory is invoked by --with-tclconfig
3681 #
3682
3683 if test x"${no_tcl}" = x ; then
3684   # we reset no_tcl in case something fails here
3685   no_tcl=true
3686   # Check whether --with-tclconfig or --without-tclconfig was given.
3687 if test "${with_tclconfig+set}" = set; then
3688   withval="$with_tclconfig"
3689   with_tclconfig=${withval}
3690 fi
3691
3692   echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
3693 echo "configure:3694: checking for Tcl configuration" >&5
3694   if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
3695   echo $ac_n "(cached) $ac_c" 1>&6
3696 else
3697   
3698
3699   # First check to see if --with-tclconfig was specified.
3700   if test x"${with_tclconfig}" != x ; then
3701     if test -f "${with_tclconfig}/tclConfig.sh" ; then
3702       ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
3703     else
3704       { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
3705     fi
3706   fi
3707
3708   # then check for a private Tcl installation
3709   if test x"${ac_cv_c_tclconfig}" = x ; then
3710     for i in \
3711                 ../tcl \
3712                 `ls -dr ../tcl[7-9]* 2>/dev/null` \
3713                 ../../tcl \
3714                 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
3715                 ../../../tcl \
3716                 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
3717       if test -f "$i/${configdir}/tclConfig.sh" ; then
3718         ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
3719         break
3720       fi
3721     done
3722   fi
3723   # check in a few common install locations
3724   if test x"${ac_cv_c_tclconfig}" = x ; then
3725     for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
3726       if test -f "$i/tclConfig.sh" ; then
3727         ac_cv_c_tclconfig=`(cd $i; pwd)`
3728         break
3729       fi
3730     done
3731   fi
3732   # check in a few other private locations
3733   if test x"${ac_cv_c_tclconfig}" = x ; then
3734     for i in \
3735                 ${srcdir}/../tcl \
3736                 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
3737       if test -f "$i/${configdir}/tclConfig.sh" ; then
3738         ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
3739         break
3740       fi
3741     done
3742   fi
3743   
3744 fi
3745
3746   if test x"${ac_cv_c_tclconfig}" = x ; then
3747     TCLCONFIG="# no Tcl configs found"
3748     echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
3749   else
3750     no_tcl=
3751     TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
3752     echo "$ac_t""found $TCLCONFIG" 1>&6
3753   fi
3754 fi
3755
3756     if test -z "${no_tcl}"; then
3757         
3758     . $TCLCONFIG
3759
3760     
3761     
3762     
3763     
3764     
3765
3766
3767
3768
3769     
3770     
3771     
3772     
3773     
3774     
3775     
3776     
3777     
3778     
3779     
3780     
3781
3782
3783
3784         
3785 #
3786 # Ok, lets find the tk configuration
3787 # First, look for one uninstalled.  
3788 # the alternative search directory is invoked by --with-tkconfig
3789 #
3790
3791 if test x"${no_tk}" = x ; then
3792   # we reset no_tk in case something fails here
3793   no_tk=true
3794   # Check whether --with-tkconfig or --without-tkconfig was given.
3795 if test "${with_tkconfig+set}" = set; then
3796   withval="$with_tkconfig"
3797   with_tkconfig=${withval}
3798 fi
3799
3800   echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
3801 echo "configure:3802: checking for Tk configuration" >&5
3802   if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
3803   echo $ac_n "(cached) $ac_c" 1>&6
3804 else
3805   
3806
3807   # First check to see if --with-tkconfig was specified.
3808   if test x"${with_tkconfig}" != x ; then
3809     if test -f "${with_tkconfig}/tkConfig.sh" ; then
3810       ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
3811     else
3812       { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
3813     fi
3814   fi
3815
3816   # then check for a private Tk library
3817   if test x"${ac_cv_c_tkconfig}" = x ; then
3818     for i in \
3819                 ../tk \
3820                 `ls -dr ../tk[4-9]* 2>/dev/null` \
3821                 ../../tk \
3822                 `ls -dr ../../tk[4-9]* 2>/dev/null` \
3823                 ../../../tk \
3824                 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
3825       if test -f "$i/${configdir}/tkConfig.sh" ; then
3826         ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
3827         break
3828       fi
3829     done
3830   fi
3831   # check in a few common install locations
3832   if test x"${ac_cv_c_tkconfig}" = x ; then
3833     for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
3834       if test -f "$i/tkConfig.sh" ; then
3835         ac_cv_c_tkconfig=`(cd $i; pwd)`
3836         break
3837       fi
3838     done
3839   fi
3840   # check in a few other private locations
3841   if test x"${ac_cv_c_tkconfig}" = x ; then
3842     for i in \
3843                 ${srcdir}/../tk \
3844                 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
3845       if test -f "$i/${configdir}/tkConfig.sh" ; then
3846         ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
3847         break
3848       fi
3849     done
3850   fi
3851   
3852 fi
3853
3854   if test x"${ac_cv_c_tkconfig}" = x ; then
3855     TKCONFIG="# no Tk configs found"
3856     echo "configure: warning: Can't find Tk configuration definitions" 1>&2
3857   else
3858     no_tk=
3859     TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
3860     echo "$ac_t""found $TKCONFIG" 1>&6
3861   fi
3862 fi
3863
3864
3865
3866         # If $no_tk is nonempty, then we can't do Tk, and there is no
3867         # point to doing Tcl.
3868         if test -z "${no_tk}"; then
3869            
3870     if test -f "$TKCONFIG" ; then
3871       . $TKCONFIG
3872     fi
3873
3874     
3875     
3876
3877     
3878
3879
3880     
3881     
3882     
3883     
3884     
3885
3886            
3887 #
3888 # Ok, lets find the tcl source trees so we can use the headers
3889 # Warning: transition of version 9 to 10 will break this algorithm
3890 # because 10 sorts before 9. We also look for just tcl. We have to
3891 # be careful that we don't match stuff like tclX by accident.
3892 # the alternative search directory is involked by --with-tclinclude
3893 #
3894
3895 no_tcl=true
3896 echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
3897 echo "configure:3898: checking for Tcl private headers. dir=${configdir}" >&5
3898 # Check whether --with-tclinclude or --without-tclinclude was given.
3899 if test "${with_tclinclude+set}" = set; then
3900   withval="$with_tclinclude"
3901   with_tclinclude=${withval}
3902 fi
3903
3904 if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
3905   echo $ac_n "(cached) $ac_c" 1>&6
3906 else
3907   
3908 # first check to see if --with-tclinclude was specified
3909 if test x"${with_tclinclude}" != x ; then
3910   if test -f ${with_tclinclude}/tclInt.h ; then
3911     ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
3912   elif test -f ${with_tclinclude}/generic/tclInt.h ; then
3913     ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
3914   else
3915     { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
3916   fi
3917 fi
3918
3919 # next check if it came with Tcl configuration file
3920 if test x"${ac_cv_c_tclconfig}" = x ; then
3921   if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
3922     ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
3923   fi
3924 fi
3925
3926 # next check in private source directory
3927 #
3928 # since ls returns lowest version numbers first, reverse its output
3929 if test x"${ac_cv_c_tclh}" = x ; then
3930   for i in \
3931                 ${srcdir}/../tcl \
3932                 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
3933                 ${srcdir}/../../tcl \
3934                 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
3935                 ${srcdir}/../../../tcl \
3936                 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
3937     if test -f $i/generic/tclInt.h ; then
3938       ac_cv_c_tclh=`(cd $i/generic; pwd)`
3939       break
3940     fi
3941   done
3942 fi
3943 # finally check in a few common install locations
3944 #
3945 # since ls returns lowest version numbers first, reverse its output
3946 if test x"${ac_cv_c_tclh}" = x ; then
3947   for i in \
3948                 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
3949                 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
3950                 /usr/local/src/tcl \
3951                 /usr/local/lib/tcl \
3952                 ${prefix}/include ; do
3953     if test -f $i/generic/tclInt.h ; then
3954       ac_cv_c_tclh=`(cd $i/generic; pwd)`
3955       break
3956     fi
3957   done
3958 fi
3959 # see if one is installed
3960 if test x"${ac_cv_c_tclh}" = x ; then
3961    ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
3962 echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
3963 echo "configure:3964: checking for tclInt.h" >&5
3964 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3965   echo $ac_n "(cached) $ac_c" 1>&6
3966 else
3967   cat > conftest.$ac_ext <<EOF
3968 #line 3969 "configure"
3969 #include "confdefs.h"
3970 #include <tclInt.h>
3971 EOF
3972 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3973 { (eval echo configure:3974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3974 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3975 if test -z "$ac_err"; then
3976   rm -rf conftest*
3977   eval "ac_cv_header_$ac_safe=yes"
3978 else
3979   echo "$ac_err" >&5
3980   echo "configure: failed program was:" >&5
3981   cat conftest.$ac_ext >&5
3982   rm -rf conftest*
3983   eval "ac_cv_header_$ac_safe=no"
3984 fi
3985 rm -f conftest*
3986 fi
3987 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3988   echo "$ac_t""yes" 1>&6
3989   ac_cv_c_tclh=installed
3990 else
3991   echo "$ac_t""no" 1>&6
3992 ac_cv_c_tclh=""
3993 fi
3994
3995 fi
3996
3997 fi
3998
3999 if test x"${ac_cv_c_tclh}" = x ; then
4000   TCLHDIR="# no Tcl private headers found"
4001   { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
4002 fi
4003 if test x"${ac_cv_c_tclh}" != x ; then
4004   no_tcl=""
4005   if test x"${ac_cv_c_tclh}" = x"installed" ; then
4006     echo "$ac_t""is installed" 1>&6
4007     TCLHDIR=""
4008   else
4009     echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
4010     # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
4011     TCLHDIR="-I${ac_cv_c_tclh}"
4012   fi
4013 fi
4014
4015
4016
4017            
4018 #
4019 # Ok, lets find the tk source trees so we can use the headers
4020 # If the directory (presumably symlink) named "tk" exists, use that one
4021 # in preference to any others.  Same logic is used when choosing library
4022 # and again with Tcl. The search order is the best place to look first, then in
4023 # decreasing significance. The loop breaks if the trigger file is found.
4024 # Note the gross little conversion here of srcdir by cd'ing to the found
4025 # directory. This converts the path from a relative to an absolute, so
4026 # recursive cache variables for the path will work right. We check all
4027 # the possible paths in one loop rather than many seperate loops to speed
4028 # things up.
4029 # the alternative search directory is involked by --with-tkinclude
4030 #
4031 no_tk=true
4032 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
4033 echo "configure:4034: checking for Tk private headers" >&5
4034 # Check whether --with-tkinclude or --without-tkinclude was given.
4035 if test "${with_tkinclude+set}" = set; then
4036   withval="$with_tkinclude"
4037   with_tkinclude=${withval}
4038 fi
4039
4040 if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
4041   echo $ac_n "(cached) $ac_c" 1>&6
4042 else
4043   
4044 # first check to see if --with-tkinclude was specified
4045 if test x"${with_tkinclude}" != x ; then
4046   if test -f ${with_tkinclude}/tk.h ; then
4047     ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
4048   elif test -f ${with_tkinclude}/generic/tk.h ; then
4049     ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
4050   else
4051     { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
4052   fi
4053 fi
4054
4055 # next check if it came with Tk configuration file
4056 if test x"${ac_cv_c_tkconfig}" = x ; then
4057   if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
4058     ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
4059   fi
4060 fi
4061
4062 # next check in private source directory
4063 #
4064 # since ls returns lowest version numbers first, reverse its output
4065 if test x"${ac_cv_c_tkh}" = x ; then
4066   for i in \
4067                 ${srcdir}/../tk \
4068                 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
4069                 ${srcdir}/../../tk \
4070                 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
4071                 ${srcdir}/../../../tk \
4072                 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
4073     if test -f $i/generic/tk.h ; then
4074       ac_cv_c_tkh=`(cd $i/generic; pwd)`
4075       break
4076     fi
4077   done
4078 fi
4079 # finally check in a few common install locations
4080 #
4081 # since ls returns lowest version numbers first, reverse its output
4082 if test x"${ac_cv_c_tkh}" = x ; then
4083   for i in \
4084                 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
4085                 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
4086                 /usr/local/src/tk \
4087                 /usr/local/lib/tk \
4088                 ${prefix}/include ; do
4089     if test -f $i/generic/tk.h ; then
4090       ac_cv_c_tkh=`(cd $i/generic; pwd)`
4091       break
4092     fi
4093   done
4094 fi
4095 # see if one is installed
4096 if test x"${ac_cv_c_tkh}" = x ; then
4097    ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
4098 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
4099 echo "configure:4100: checking for tk.h" >&5
4100 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4101   echo $ac_n "(cached) $ac_c" 1>&6
4102 else
4103   cat > conftest.$ac_ext <<EOF
4104 #line 4105 "configure"
4105 #include "confdefs.h"
4106 #include <tk.h>
4107 EOF
4108 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4109 { (eval echo configure:4110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4110 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4111 if test -z "$ac_err"; then
4112   rm -rf conftest*
4113   eval "ac_cv_header_$ac_safe=yes"
4114 else
4115   echo "$ac_err" >&5
4116   echo "configure: failed program was:" >&5
4117   cat conftest.$ac_ext >&5
4118   rm -rf conftest*
4119   eval "ac_cv_header_$ac_safe=no"
4120 fi
4121 rm -f conftest*
4122 fi
4123 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4124   echo "$ac_t""yes" 1>&6
4125   ac_cv_c_tkh=installed
4126 else
4127   echo "$ac_t""no" 1>&6
4128 ac_cv_c_tkh=""
4129 fi
4130
4131 fi
4132
4133 fi
4134
4135 if test x"${ac_cv_c_tkh}" != x ; then
4136   no_tk=""
4137   if test x"${ac_cv_c_tkh}" = x"installed" ; then
4138     echo "$ac_t""is installed" 1>&6
4139     TKHDIR=""
4140   else
4141     echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
4142     # this hack is cause the TKHDIR won't print if there is a "-I" in it.
4143     TKHDIR="-I${ac_cv_c_tkh}"
4144   fi
4145 else
4146   TKHDIR="# no Tk directory found"
4147   echo "configure: warning: Can't find Tk private headers" 1>&2
4148   no_tk=true
4149 fi
4150
4151
4152
4153            
4154 echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
4155 echo "configure:4156: checking for Itcl private headers. srcdir=${srcdir}" >&5
4156 if test x"${ac_cv_c_itclh}" = x ; then
4157   for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
4158     if test -f $i/generic/itcl.h ; then
4159       ac_cv_c_itclh=`(cd $i/generic; pwd)`
4160       break
4161     fi
4162   done
4163 fi
4164 if test x"${ac_cv_c_itclh}" = x ; then
4165   ITCLHDIR="# no Itcl private headers found"
4166   { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
4167 fi
4168 if test x"${ac_cv_c_itclh}" != x ; then
4169      ITCLHDIR="-I${ac_cv_c_itclh}"
4170 fi
4171 # should always be here
4172 #     ITCLLIB="../itcl/itcl/unix/libitcl.a"
4173
4174 #AC_SUBST(ITCLLIB)
4175
4176            
4177 echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
4178 echo "configure:4179: checking for Itk private headers. srcdir=${srcdir}" >&5
4179 if test x"${ac_cv_c_itkh}" = x ; then
4180   for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
4181     if test -f $i/generic/itk.h ; then
4182       ac_cv_c_itkh=`(cd $i/generic; pwd)`
4183       break
4184     fi
4185   done
4186 fi
4187 if test x"${ac_cv_c_itkh}" = x ; then
4188   ITKHDIR="# no Itk private headers found"
4189   { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
4190 fi
4191 if test x"${ac_cv_c_itkh}" != x ; then
4192      ITKHDIR="-I${ac_cv_c_itkh}"
4193 fi
4194 # should always be here
4195 #     ITKLIB="../itcl/itk/unix/libitk.a"
4196
4197 #AC_SUBST(ITKLIB)
4198
4199            
4200 echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
4201 echo "configure:4202: checking for Tix private headers. srcdir=${srcdir}" >&5
4202 if test x"${ac_cv_c_tixh}" = x ; then
4203   for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
4204     if test -f $i/generic/tix.h ; then
4205       ac_cv_c_tixh=`(cd $i/generic; pwd)`
4206       break
4207     fi
4208   done
4209 fi
4210 if test x"${ac_cv_c_tixh}" = x ; then
4211   TIXHDIR="# no Tix private headers found"
4212   { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; }
4213 fi
4214 if test x"${ac_cv_c_tixh}" != x ; then
4215      TIXHDIR="-I${ac_cv_c_tixh}"
4216 fi
4217
4218
4219
4220            # now look for Itcl library stuff
4221
4222            
4223 #
4224 # Ok, lets find the itcl configuration
4225 # First, look for one uninstalled.  
4226 # the alternative search directory is invoked by --with-itclconfig
4227 #
4228
4229 if test x"${no_itcl}" = x ; then
4230   # we reset no_itcl in case something fails here
4231   no_itcl=true
4232   # Check whether --with-itclconfig or --without-itclconfig was given.
4233 if test "${with_itclconfig+set}" = set; then
4234   withval="$with_itclconfig"
4235   with_itclconfig=${withval}
4236 fi
4237
4238   echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
4239 echo "configure:4240: checking for Itcl configuration" >&5
4240   if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
4241   echo $ac_n "(cached) $ac_c" 1>&6
4242 else
4243   
4244
4245   # First check to see if --with-itclconfig was specified.
4246   if test x"${with_itclconfig}" != x ; then
4247     if test -f "${with_itclconfig}/itclConfig.sh" ; then
4248       ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
4249     else
4250       { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
4251     fi
4252   fi
4253
4254   # then check for a private Itcl library
4255   if test x"${ac_cv_c_itclconfig}" = x ; then
4256     for i in \
4257                 ../itcl/itcl \
4258                 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
4259                 ../../itcl \
4260                 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
4261                 ../../../itcl \
4262                 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
4263       if test -f "$i/itclConfig.sh" ; then
4264         ac_cv_c_itclconfig=`(cd $i; pwd)`
4265         break
4266       fi
4267     done
4268   fi
4269   # check in a few common install locations
4270   if test x"${ac_cv_c_itclconfig}" = x ; then
4271     for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
4272       if test -f "$i/itclConfig.sh" ; then
4273         ac_cv_c_itclconfig=`(cd $i; pwd)`
4274         break
4275       fi
4276     done
4277   fi
4278   # check in a few other private locations
4279   if test x"${ac_cv_c_itclconfig}" = x ; then
4280     for i in \
4281                 ${srcdir}/../itcl/itcl \
4282                 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
4283       if test -f "$i/itclConfig.sh" ; then
4284         ac_cv_c_itclconfig=`(cd $i; pwd)`
4285         break
4286       fi
4287     done
4288   fi
4289   
4290 fi
4291
4292   if test x"${ac_cv_c_itclconfig}" = x ; then
4293     ITCLCONFIG="# no Itcl configs found"
4294     echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
4295   else
4296     no_itcl=
4297     ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
4298     echo "$ac_t""found $ITCLCONFIG" 1>&6
4299   fi
4300 fi
4301
4302            if test -z "${no_itcl}"; then
4303              
4304     if test -f "$ITCLCONFIG" ; then
4305       . $ITCLCONFIG
4306     fi
4307
4308     
4309     
4310
4311     
4312
4313
4314     
4315     
4316     
4317
4318              case "${host}" in
4319              *-*-cygwin32*)
4320                 itcldir=../itcl/itcl/win/
4321                 ;;
4322              *)
4323                 itcldir=../itcl/itcl/unix/
4324                 ;;
4325              esac
4326  
4327
4328              ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
4329              ITCL_DEPS="${itcldir}${ITCL_LIB_FILE}"
4330            fi
4331
4332            
4333            # now look for Itk library stuff
4334            
4335 #
4336 # Ok, lets find the itk configuration
4337 # First, look for one uninstalled.  
4338 # the alternative search directory is invoked by --with-itkconfig
4339 #
4340
4341 if test x"${no_itk}" = x ; then
4342   # we reset no_itk in case something fails here
4343   no_itk=true
4344   # Check whether --with-itkconfig or --without-itkconfig was given.
4345 if test "${with_itkconfig+set}" = set; then
4346   withval="$with_itkconfig"
4347   with_itkconfig=${withval}
4348 fi
4349
4350   echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
4351 echo "configure:4352: checking for Itk configuration" >&5
4352   if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
4353   echo $ac_n "(cached) $ac_c" 1>&6
4354 else
4355   
4356
4357   # First check to see if --with-itkconfig was specified.
4358   if test x"${with_itkconfig}" != x ; then
4359     if test -f "${with_itkconfig}/itkConfig.sh" ; then
4360       ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
4361     else
4362       { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
4363     fi
4364   fi
4365
4366   # then check for a private Itk library
4367   if test x"${ac_cv_c_itkconfig}" = x ; then
4368     for i in \
4369                 ../itcl/itk \
4370                 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
4371                 ../../itk \
4372                 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
4373                 ../../../itk \
4374                 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
4375       if test -f "$i/itkConfig.sh" ; then
4376         ac_cv_c_itkconfig=`(cd $i; pwd)`
4377         break
4378       fi
4379     done
4380   fi
4381   # check in a few common install locations
4382   if test x"${ac_cv_c_itkconfig}" = x ; then
4383     for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
4384       if test -f "$i/itkConfig.sh" ; then
4385         ac_cv_c_itkconfig=`(cd $i; pwd)`
4386         break
4387       fi
4388     done
4389   fi
4390   # check in a few other private locations
4391   if test x"${ac_cv_c_itkconfig}" = x ; then
4392     for i in \
4393                 ${srcdir}/../itcl/itk \
4394                 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
4395       if test -f "$i/itkConfig.sh" ; then
4396         ac_cv_c_itkconfig=`(cd $i; pwd)`
4397         break
4398       fi
4399     done
4400   fi
4401   
4402 fi
4403
4404   if test x"${ac_cv_c_itkconfig}" = x ; then
4405     ITKCONFIG="# no Itk configs found"
4406     echo "configure: warning: Can't find Itk configuration definitions" 1>&2
4407   else
4408     no_itk=
4409     ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
4410     echo "$ac_t""found $ITKCONFIG" 1>&6
4411   fi
4412 fi
4413
4414
4415            if test -z "${no_itcl}"; then
4416              
4417     if test -f "$ITKCONFIG" ; then
4418       . $ITKCONFIG
4419     fi
4420
4421     
4422     
4423
4424     
4425
4426
4427     
4428     
4429     
4430
4431
4432              case "${host}" in
4433                *-*-cygwin32*)
4434                  itkdir=../itcl/itk/win/
4435                  ;;
4436                *)
4437                  itkdir=../itcl/itk/unix/
4438                  ;;
4439                esac 
4440
4441              ITKLIB="${ITK_BUILD_LIB_SPEC}"
4442              ITK_DEPS="${itkdir}${ITK_LIB_FILE}"
4443            fi
4444
4445            # now look for Tix library stuff
4446            
4447 #
4448 # Ok, lets find the tix configuration
4449 # First, look for one uninstalled.  
4450 # the alternative search directory is invoked by --with-itkconfig
4451 #
4452
4453 if test x"${no_tix}" = x ; then
4454   # we reset no_tix in case something fails here
4455   no_tix=true
4456   # Check whether --with-tixconfig or --without-tixconfig was given.
4457 if test "${with_tixconfig+set}" = set; then
4458   withval="$with_tixconfig"
4459   with_tixconfig=${withval}
4460 fi
4461
4462   echo $ac_n "checking for Tix configuration""... $ac_c" 1>&6
4463 echo "configure:4464: checking for Tix configuration" >&5
4464   if eval "test \"`echo '$''{'ac_cv_c_tixconfig'+set}'`\" = set"; then
4465   echo $ac_n "(cached) $ac_c" 1>&6
4466 else
4467   
4468
4469   # First check to see if --with-tixconfig was specified.
4470   if test x"${with_tixconfig}" != x ; then
4471     if test -f "${with_tixconfig}/tixConfig.sh" ; then
4472       ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)`
4473     else
4474       { echo "configure: error: ${with_tixconfig} directory doesn't contain tixConfig.sh" 1>&2; exit 1; }
4475     fi
4476   fi
4477
4478   # then check for a private Tix library
4479   if test x"${ac_cv_c_tixconfig}" = x ; then
4480     for i in \
4481                 ../tix \
4482                 `ls -dr ../tix 2>/dev/null` \
4483                 ../../tix \
4484                 `ls -dr ../../tix 2>/dev/null` \
4485                 ../../../tix \
4486                 `ls -dr ../../../tix 2>/dev/null` ; do
4487       echo "**** Looking at $i - with ${configdir}"
4488       if test -f "$i/tixConfig.sh" ; then
4489         ac_cv_c_tixconfig=`(cd $i; pwd)`
4490         break
4491       fi
4492     done
4493   fi
4494   # check in a few common install locations
4495   if test x"${ac_cv_c_tixconfig}" = x ; then
4496     for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
4497       echo "**** Looking at $i"
4498       if test -f "$i/tixConfig.sh" ; then
4499         ac_cv_c_tixconfig=`(cd $i; pwd)`
4500         break
4501       fi
4502     done
4503   fi
4504   # check in a few other private locations
4505   echo "**** Other private locations"
4506   if test x"${ac_cv_c_tixconfig}" = x ; then
4507     for i in \
4508                 ${srcdir}/../tix \
4509                 `ls -dr ${srcdir}/../tix 2>/dev/null` ; do
4510       echo "**** Looking at $i - with ${configdir}"
4511       if test -f "$i/${configdir}/tixConfig.sh" ; then
4512         ac_cv_c_tixconfig=`(cd $i/${configdir}; pwd)`
4513         break
4514       fi
4515     done
4516   fi
4517   
4518 fi
4519
4520   if test x"${ac_cv_c_tixconfig}" = x ; then
4521     TIXCONFIG="# no Tix configs found"
4522     echo "configure: warning: Can't find Tix configuration definitions" 1>&2
4523   else
4524     no_tix=
4525     TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh
4526     echo "$ac_t""found $TIXCONFIG" 1>&6
4527   fi
4528 fi
4529
4530
4531            if test -z "${no_tix}"; then
4532              
4533     if test -f "$TIXCONFIG" ; then
4534       . $TIXCONFIG
4535     fi
4536
4537     
4538
4539
4540
4541
4542     
4543
4544              TIXLIB="${TIX_BUILD_LIB_SPEC}"
4545              TIX_DEPS="${TIX_BUILD_LOCATION}/${TIX_LIB_FILE}"
4546            fi
4547
4548            ENABLE_GDBTK=1
4549            ENABLE_CFLAGS="${ENABLE_CFLAGS} -DGDBTK"
4550            # Tcl/Tk 8.1 require -fwritable strings.  I don't
4551            # know whether 8.2 will or not, but I bet it will.
4552            # I don't have to worry about 7.x since we don't support it.
4553            GDBTK_CFLAGS=""
4554            if test ${GCC} = "yes"; then
4555                if test ${TCL_VERSION} != "8.0" ; then
4556                    GDBTK_CFLAGS="-fwritable-strings"
4557                fi
4558            fi
4559
4560            # Include some libraries that Tcl and Tk want.
4561            if test "${enable_ide}" = "yes"; then        
4562               TCL_LIBS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE) $(ITCL) $(ITK) $(TIXLIB) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
4563               CONFIG_DEPS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE_DEPS) $(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)'
4564            else
4565               TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
4566               CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)'
4567            fi
4568            # Yes, the ordering seems wrong here.  But it isn't.
4569            # TK_LIBS is the list of libraries that need to be linked
4570            # after Tcl/Tk.  Note that this isn't put into LIBS.  If it
4571            # were in LIBS then any link tests after this point would
4572            # try to include things like `$(LIBGUI)', which wouldn't work.
4573            GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
4574            CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-variable.o gdbtk-wrapper.o"
4575
4576            if test x$gdb_cv_os_cygwin = xyes; then
4577               WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
4578               WIN32LDAPP="-Wl,--subsystem,console"
4579               CONFIG_OBS="${CONFIG_OBS} gdbres.o"
4580            fi
4581         fi
4582     fi
4583 fi
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597 # end-sanitize-gdbtk
4598
4599 # If we find X, set shell vars x_includes and x_libraries to the
4600 # paths, otherwise set no_x=yes.
4601 # Uses ac_ vars as temps to allow command line to override cache and checks.
4602 # --without-x overrides everything else, but does not touch the cache.
4603 echo $ac_n "checking for X""... $ac_c" 1>&6
4604 echo "configure:4605: checking for X" >&5
4605
4606 # Check whether --with-x or --without-x was given.
4607 if test "${with_x+set}" = set; then
4608   withval="$with_x"
4609   :
4610 fi
4611
4612 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4613 if test "x$with_x" = xno; then
4614   # The user explicitly disabled X.
4615   have_x=disabled
4616 else
4617   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4618     # Both variables are already set.
4619     have_x=yes
4620   else
4621 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
4622   echo $ac_n "(cached) $ac_c" 1>&6
4623 else
4624   # One or both of the vars are not set, and there is no cached value.
4625 ac_x_includes=NO ac_x_libraries=NO
4626 rm -fr conftestdir
4627 if mkdir conftestdir; then
4628   cd conftestdir
4629   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4630   cat > Imakefile <<'EOF'
4631 acfindx:
4632         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4633 EOF
4634   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4635     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4636     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4637     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4638     for ac_extension in a so sl; do
4639       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4640         test -f $ac_im_libdir/libX11.$ac_extension; then
4641         ac_im_usrlibdir=$ac_im_libdir; break
4642       fi
4643     done
4644     # Screen out bogus values from the imake configuration.  They are
4645     # bogus both because they are the default anyway, and because
4646     # using them would break gcc on systems where it needs fixed includes.
4647     case "$ac_im_incroot" in
4648         /usr/include) ;;
4649         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4650     esac
4651     case "$ac_im_usrlibdir" in
4652         /usr/lib | /lib) ;;
4653         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4654     esac
4655   fi
4656   cd ..
4657   rm -fr conftestdir
4658 fi
4659
4660 if test "$ac_x_includes" = NO; then
4661   # Guess where to find include files, by looking for this one X11 .h file.
4662   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4663
4664   # First, try using that file with no special directory specified.
4665 cat > conftest.$ac_ext <<EOF
4666 #line 4667 "configure"
4667 #include "confdefs.h"
4668 #include <$x_direct_test_include>
4669 EOF
4670 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4671 { (eval echo configure:4672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4672 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4673 if test -z "$ac_err"; then
4674   rm -rf conftest*
4675   # We can compile using X headers with no special include directory.
4676 ac_x_includes=
4677 else
4678   echo "$ac_err" >&5
4679   echo "configure: failed program was:" >&5
4680   cat conftest.$ac_ext >&5
4681   rm -rf conftest*
4682   # Look for the header file in a standard set of common directories.
4683 # Check X11 before X11Rn because it is often a symlink to the current release.
4684   for ac_dir in               \
4685     /usr/X11/include          \
4686     /usr/X11R6/include        \
4687     /usr/X11R5/include        \
4688     /usr/X11R4/include        \
4689                               \
4690     /usr/include/X11          \
4691     /usr/include/X11R6        \
4692     /usr/include/X11R5        \
4693     /usr/include/X11R4        \
4694                               \
4695     /usr/local/X11/include    \
4696     /usr/local/X11R6/include  \
4697     /usr/local/X11R5/include  \
4698     /usr/local/X11R4/include  \
4699                               \
4700     /usr/local/include/X11    \
4701     /usr/local/include/X11R6  \
4702     /usr/local/include/X11R5  \
4703     /usr/local/include/X11R4  \
4704                               \
4705     /usr/X386/include         \
4706     /usr/x386/include         \
4707     /usr/XFree86/include/X11  \
4708                               \
4709     /usr/include              \
4710     /usr/local/include        \
4711     /usr/unsupported/include  \
4712     /usr/athena/include       \
4713     /usr/local/x11r5/include  \
4714     /usr/lpp/Xamples/include  \
4715                               \
4716     /usr/openwin/include      \
4717     /usr/openwin/share/include \
4718     ; \
4719   do
4720     if test -r "$ac_dir/$x_direct_test_include"; then
4721       ac_x_includes=$ac_dir
4722       break
4723     fi
4724   done
4725 fi
4726 rm -f conftest*
4727 fi # $ac_x_includes = NO
4728
4729 if test "$ac_x_libraries" = NO; then
4730   # Check for the libraries.
4731
4732   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4733   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4734
4735   # See if we find them without any special options.
4736   # Don't add to $LIBS permanently.
4737   ac_save_LIBS="$LIBS"
4738   LIBS="-l$x_direct_test_library $LIBS"
4739 cat > conftest.$ac_ext <<EOF
4740 #line 4741 "configure"
4741 #include "confdefs.h"
4742
4743 int main() {
4744 ${x_direct_test_function}()
4745 ; return 0; }
4746 EOF
4747 if { (eval echo configure:4748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4748   rm -rf conftest*
4749   LIBS="$ac_save_LIBS"
4750 # We can link X programs with no special library path.
4751 ac_x_libraries=
4752 else
4753   echo "configure: failed program was:" >&5
4754   cat conftest.$ac_ext >&5
4755   rm -rf conftest*
4756   LIBS="$ac_save_LIBS"
4757 # First see if replacing the include by lib works.
4758 # Check X11 before X11Rn because it is often a symlink to the current release.
4759 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4760     /usr/X11/lib          \
4761     /usr/X11R6/lib        \
4762     /usr/X11R5/lib        \
4763     /usr/X11R4/lib        \
4764                           \
4765     /usr/lib/X11          \
4766     /usr/lib/X11R6        \
4767     /usr/lib/X11R5        \
4768     /usr/lib/X11R4        \
4769                           \
4770     /usr/local/X11/lib    \
4771     /usr/local/X11R6/lib  \
4772     /usr/local/X11R5/lib  \
4773     /usr/local/X11R4/lib  \
4774                           \
4775     /usr/local/lib/X11    \
4776     /usr/local/lib/X11R6  \
4777     /usr/local/lib/X11R5  \
4778     /usr/local/lib/X11R4  \
4779                           \
4780     /usr/X386/lib         \
4781     /usr/x386/lib         \
4782     /usr/XFree86/lib/X11  \
4783                           \
4784     /usr/lib              \
4785     /usr/local/lib        \
4786     /usr/unsupported/lib  \
4787     /usr/athena/lib       \
4788     /usr/local/x11r5/lib  \
4789     /usr/lpp/Xamples/lib  \
4790     /lib/usr/lib/X11      \
4791                           \
4792     /usr/openwin/lib      \
4793     /usr/openwin/share/lib \
4794     ; \
4795 do
4796   for ac_extension in a so sl; do
4797     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4798       ac_x_libraries=$ac_dir
4799       break 2
4800     fi
4801   done
4802 done
4803 fi
4804 rm -f conftest*
4805 fi # $ac_x_libraries = NO
4806
4807 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4808   # Didn't find X anywhere.  Cache the known absence of X.
4809   ac_cv_have_x="have_x=no"
4810 else
4811   # Record where we found X for the cache.
4812   ac_cv_have_x="have_x=yes \
4813                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4814 fi
4815 fi
4816   fi
4817   eval "$ac_cv_have_x"
4818 fi # $with_x != no
4819
4820 if test "$have_x" != yes; then
4821   echo "$ac_t""$have_x" 1>&6
4822   no_x=yes
4823 else
4824   # If each of the values was on the command line, it overrides each guess.
4825   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4826   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4827   # Update the cache value to reflect the command line values.
4828   ac_cv_have_x="have_x=yes \
4829                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4830   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4831 fi
4832
4833 # start-sanitize-sky
4834 # Enable GPU2 library for MIPS simulator
4835 # Check whether --with-sim-gpu2 or --without-sim-gpu2 was given.
4836 if test "${with_sim_gpu2+set}" = set; then
4837   withval="$with_sim_gpu2"
4838   case "${target}" in
4839   mips*-sky*-*)
4840     if test -d "${withval}"
4841     then
4842       if test x${x_libraries} != x
4843       then
4844         LIBS="${LIBS} -L${withval}/lib -lgpu2 -L${x_libraries} -lX11 -lXext -lm"
4845       else
4846         LIBS="${LIBS} -L${withval}/lib -lgpu2 -lX11 -lXext -lm"
4847       fi
4848     else
4849       echo "configure: warning: Directory ${withval} does not exist." 1>&2
4850     fi ;;
4851   *)  echo "configure: warning: --with-sim-gpu2 option invalid for target ${target}" 1>&2
4852 esac
4853 fi
4854
4855 # Enable target accurate FP library
4856 # Check whether --with-sim-funit or --without-sim-funit was given.
4857 if test "${with_sim_funit+set}" = set; then
4858   withval="$with_sim_funit"
4859   case "${target}" in
4860   mips*-sky*-*)
4861     if test -d "${withval}"
4862     then
4863       LIBS="${LIBS} -L${withval}/lib -lfunit"
4864     else
4865       echo "configure: warning: Directory ${withval} does not exist." 1>&2
4866     fi ;;
4867   *)  echo "configure: warning: --with-sim-funit option invalid for target ${target}" 1>&2
4868 esac
4869 fi
4870 # end-sanitize-sky
4871
4872
4873
4874
4875
4876
4877
4878 # Begin stuff to support --enable-shared
4879 # Check whether --enable-shared or --disable-shared was given.
4880 if test "${enable_shared+set}" = set; then
4881   enableval="$enable_shared"
4882   case "${enableval}" in
4883   yes) shared=true ;;
4884   no)  shared=false ;;
4885   *) shared=true ;;
4886 esac
4887 fi
4888
4889 HLDFLAGS=
4890 HLDENV=
4891 # If we have shared libraries, try to set rpath reasonably.
4892 if test "${shared}" = "true"; then
4893   case "${host}" in
4894   *-*-hpux*)
4895     HLDFLAGS='-Wl,+s,+b,$(libdir)'
4896     ;;
4897   *-*-irix5* | *-*-irix6*)
4898     HLDFLAGS='-Wl,-rpath,$(libdir)'
4899     ;;
4900   *-*-linux*aout*)
4901     ;;
4902   *-*-linux* | *-pc-linux-gnu)
4903     HLDFLAGS='-Wl,-rpath,$(libdir)'
4904     ;;
4905   *-*-solaris*)
4906     HLDFLAGS='-R $(libdir)'
4907     ;;
4908   *-*-sysv4*)
4909     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;'
4910     ;;
4911   esac
4912 fi
4913
4914 # On SunOS, if the linker supports the -rpath option, use it to
4915 # prevent ../bfd and ../opcodes from being included in the run time
4916 # search path.
4917 case "${host}" in
4918   *-*-sunos*)
4919     echo 'main () { }' > conftest.c
4920     ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
4921     if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
4922       :
4923     elif grep 'No such file' conftest.t >/dev/null 2>&1; then
4924       :
4925     elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
4926       :
4927     elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
4928       :
4929     elif test "${shared}" = "true"; then
4930       HLDFLAGS='-Wl,-rpath=$(libdir)'
4931     else
4932       HLDFLAGS='-Wl,-rpath='
4933     fi
4934     rm -f conftest.t conftest.c conftest
4935     ;;
4936 esac
4937
4938
4939 # End stuff to support --enable-shared
4940
4941 # target_subdir is used by the testsuite to find the target libraries.
4942 target_subdir=
4943 if test "${host}" != "${target}"; then
4944     target_subdir="${target_alias}/"
4945 fi
4946
4947
4948 frags=
4949 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
4950 if test ! -f ${host_makefile_frag}; then
4951 { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
4952 fi
4953 frags="$frags $host_makefile_frag"
4954
4955 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
4956 if test ! -f ${target_makefile_frag}; then
4957 { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
4958 fi
4959 frags="$frags $target_makefile_frag"
4960
4961
4962
4963
4964
4965 hostfile=`sed -n '
4966 s/XM_FILE[      ]*=[    ]*\([^  ]*\)/\1/p
4967 ' ${host_makefile_frag}`
4968
4969 targetfile=`sed -n '
4970 s/TM_FILE[      ]*=[    ]*\([^  ]*\)/\1/p
4971 ' ${target_makefile_frag}`
4972
4973 # these really aren't orthogonal true/false values of the same condition,
4974 # but shells are slow enough that I like to reuse the test conditions
4975 # whenever possible
4976 if test "${target}" = "${host}"; then
4977 nativefile=`sed -n '
4978 s/NAT_FILE[     ]*=[    ]*\([^  ]*\)/\1/p
4979 ' ${host_makefile_frag}`
4980 # else
4981 # GDBserver is only useful in a "native" enviroment
4982 # configdirs=`echo $configdirs | sed 's/gdbserver//'`
4983 fi
4984
4985
4986 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
4987 # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
4988 # corresponding links.  But we have to remove the xm.h files and tm.h
4989 # files anyway, e.g. when switching from "configure host" to
4990 # "configure none".
4991
4992 files=
4993 links=
4994 rm -f xm.h
4995 if test "${hostfile}" != ""; then
4996 files="${files} config/${gdb_host_cpu}/${hostfile}"
4997 links="${links} xm.h"
4998 fi
4999 rm -f tm.h
5000 if test "${targetfile}" != ""; then
5001 files="${files} config/${gdb_target_cpu}/${targetfile}"
5002 links="${links} tm.h"
5003 fi
5004 rm -f nm.h
5005 if test "${nativefile}" != ""; then
5006 files="${files} config/${gdb_host_cpu}/${nativefile}"
5007 links="${links} nm.h"
5008 else
5009 # A cross-only configuration.
5010 files="${files} config/nm-empty.h"
5011 links="${links} nm.h"
5012 fi
5013 # start-sanitize-gdbtk
5014 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
5015 echo "configure:5016: checking whether ln -s works" >&5
5016 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
5017   echo $ac_n "(cached) $ac_c" 1>&6
5018 else
5019   rm -f conftestdata
5020 if ln -s X conftestdata 2>/dev/null
5021 then
5022   rm -f conftestdata
5023   ac_cv_prog_LN_S="ln -s"
5024 else
5025   ac_cv_prog_LN_S=ln
5026 fi
5027 fi
5028 LN_S="$ac_cv_prog_LN_S"
5029 if test "$ac_cv_prog_LN_S" = "ln -s"; then
5030   echo "$ac_t""yes" 1>&6
5031 else
5032   echo "$ac_t""no" 1>&6
5033 fi
5034
5035 # Make it possible to use the GUI without doing a full install
5036 if test "${enable_gdbtk}" = "yes" -a ! -d gdbtcl2 ; then
5037   if test "$LN_S" = "ln -s" -a ! -f gdbtcl2 ; then
5038   echo linking $srcdir/gdbtcl2 to gdbtcl2
5039   $LN_S $srcdir/gdbtcl2 gdbtcl2
5040   else
5041   echo Warning: Unable to link $srcdir/gdbtcl2 to gdbtcl2.  You will need to do a
5042   echo "         " make install before you are able to run the GUI.
5043   fi
5044 fi
5045 # end-sanitize-gdbtk
5046
5047
5048
5049 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
5050 echo "configure:5051: checking for Cygwin environment" >&5
5051 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
5052   echo $ac_n "(cached) $ac_c" 1>&6
5053 else
5054   cat > conftest.$ac_ext <<EOF
5055 #line 5056 "configure"
5056 #include "confdefs.h"
5057
5058 int main() {
5059
5060 #ifndef __CYGWIN__
5061 #define __CYGWIN__ __CYGWIN32__
5062 #endif
5063 return __CYGWIN__;
5064 ; return 0; }
5065 EOF
5066 if { (eval echo configure:5067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5067   rm -rf conftest*
5068   ac_cv_cygwin=yes
5069 else
5070   echo "configure: failed program was:" >&5
5071   cat conftest.$ac_ext >&5
5072   rm -rf conftest*
5073   ac_cv_cygwin=no
5074 fi
5075 rm -f conftest*
5076 rm -f conftest*
5077 fi
5078
5079 echo "$ac_t""$ac_cv_cygwin" 1>&6
5080 CYGWIN=
5081 test "$ac_cv_cygwin" = yes && CYGWIN=yes
5082 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
5083 echo "configure:5084: checking for mingw32 environment" >&5
5084 if eval "test \"`echo '$''{'ac_cv_mingw32'+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 int main() {
5092 return __MINGW32__;
5093 ; return 0; }
5094 EOF
5095 if { (eval echo configure:5096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5096   rm -rf conftest*
5097   ac_cv_mingw32=yes
5098 else
5099   echo "configure: failed program was:" >&5
5100   cat conftest.$ac_ext >&5
5101   rm -rf conftest*
5102   ac_cv_mingw32=no
5103 fi
5104 rm -f conftest*
5105 rm -f conftest*
5106 fi
5107
5108 echo "$ac_t""$ac_cv_mingw32" 1>&6
5109 MINGW32=
5110 test "$ac_cv_mingw32" = yes && MINGW32=yes
5111
5112
5113 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
5114 echo "configure:5115: checking for executable suffix" >&5
5115 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
5116   echo $ac_n "(cached) $ac_c" 1>&6
5117 else
5118   if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
5119   ac_cv_exeext=.exe
5120 else
5121   rm -f conftest*
5122   echo 'int main () { return 0; }' > conftest.$ac_ext
5123   ac_cv_exeext=
5124   if { (eval echo configure:5125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
5125     for file in conftest.*; do
5126       case $file in
5127       *.c | *.o | *.obj | *.ilk | *.pdb) ;;
5128       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
5129       esac
5130     done
5131   else
5132     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
5133   fi
5134   rm -f conftest*
5135   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
5136 fi
5137 fi
5138
5139 EXEEXT=""
5140 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
5141 echo "$ac_t""${ac_cv_exeext}" 1>&6
5142 ac_exeext=$EXEEXT
5143
5144
5145 subdirs="$configdirs"
5146
5147 trap '' 1 2 15
5148 cat > confcache <<\EOF
5149 # This file is a shell script that caches the results of configure
5150 # tests run on this system so they can be shared between configure
5151 # scripts and configure runs.  It is not useful on other systems.
5152 # If it contains results you don't want to keep, you may remove or edit it.
5153 #
5154 # By default, configure uses ./config.cache as the cache file,
5155 # creating it if it does not exist already.  You can give configure
5156 # the --cache-file=FILE option to use a different cache file; that is
5157 # what configure does when it calls configure scripts in
5158 # subdirectories, so they share the cache.
5159 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5160 # config.status only pays attention to the cache file if you give it the
5161 # --recheck option to rerun configure.
5162 #
5163 EOF
5164 # The following way of writing the cache mishandles newlines in values,
5165 # but we know of no workaround that is simple, portable, and efficient.
5166 # So, don't put newlines in cache variables' values.
5167 # Ultrix sh set writes to stderr and can't be redirected directly,
5168 # and sets the high bit in the cache file unless we assign to the vars.
5169 (set) 2>&1 |
5170   case `(ac_space=' '; set | grep ac_space) 2>&1` in
5171   *ac_space=\ *)
5172     # `set' does not quote correctly, so add quotes (double-quote substitution
5173     # turns \\\\ into \\, and sed turns \\ into \).
5174     sed -n \
5175       -e "s/'/'\\\\''/g" \
5176       -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5177     ;;
5178   *)
5179     # `set' quotes correctly as required by POSIX, so do not add quotes.
5180     sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5181     ;;
5182   esac >> confcache
5183 if cmp -s $cache_file confcache; then
5184   :
5185 else
5186   if test -w $cache_file; then
5187     echo "updating cache $cache_file"
5188     cat confcache > $cache_file
5189   else
5190     echo "not updating unwritable cache $cache_file"
5191   fi
5192 fi
5193 rm -f confcache
5194
5195 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5196
5197 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5198 # Let make expand exec_prefix.
5199 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5200
5201 # Any assignment to VPATH causes Sun make to only execute
5202 # the first set of double-colon rules, so remove it if not needed.
5203 # If there is a colon in the path, we need to keep it.
5204 if test "x$srcdir" = x.; then
5205   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
5206 fi
5207
5208 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5209
5210 DEFS=-DHAVE_CONFIG_H
5211
5212 # Without the "./", some shells look in PATH for config.status.
5213 : ${CONFIG_STATUS=./config.status}
5214
5215 echo creating $CONFIG_STATUS
5216 rm -f $CONFIG_STATUS
5217 cat > $CONFIG_STATUS <<EOF
5218 #! /bin/sh
5219 # Generated automatically by configure.
5220 # Run this file to recreate the current configuration.
5221 # This directory was configured as follows,
5222 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5223 #
5224 # $0 $ac_configure_args
5225 #
5226 # Compiler output produced by configure, useful for debugging
5227 # configure, is in ./config.log if it exists.
5228
5229 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5230 for ac_option
5231 do
5232   case "\$ac_option" in
5233   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5234     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5235     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5236   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5237     echo "$CONFIG_STATUS generated by autoconf version 2.13"
5238     exit 0 ;;
5239   -help | --help | --hel | --he | --h)
5240     echo "\$ac_cs_usage"; exit 0 ;;
5241   *) echo "\$ac_cs_usage"; exit 1 ;;
5242   esac
5243 done
5244
5245 ac_given_srcdir=$srcdir
5246 ac_given_INSTALL="$INSTALL"
5247
5248 trap 'rm -fr `echo "Makefile tui/Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5249 EOF
5250 cat >> $CONFIG_STATUS <<EOF
5251
5252 # Protect against being on the right side of a sed subst in config.status.
5253 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5254  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5255 $ac_vpsub
5256 $extrasub
5257 s%@SHELL@%$SHELL%g
5258 s%@CFLAGS@%$CFLAGS%g
5259 s%@CPPFLAGS@%$CPPFLAGS%g
5260 s%@CXXFLAGS@%$CXXFLAGS%g
5261 s%@FFLAGS@%$FFLAGS%g
5262 s%@DEFS@%$DEFS%g
5263 s%@LDFLAGS@%$LDFLAGS%g
5264 s%@LIBS@%$LIBS%g
5265 s%@exec_prefix@%$exec_prefix%g
5266 s%@prefix@%$prefix%g
5267 s%@program_transform_name@%$program_transform_name%g
5268 s%@bindir@%$bindir%g
5269 s%@sbindir@%$sbindir%g
5270 s%@libexecdir@%$libexecdir%g
5271 s%@datadir@%$datadir%g
5272 s%@sysconfdir@%$sysconfdir%g
5273 s%@sharedstatedir@%$sharedstatedir%g
5274 s%@localstatedir@%$localstatedir%g
5275 s%@libdir@%$libdir%g
5276 s%@includedir@%$includedir%g
5277 s%@oldincludedir@%$oldincludedir%g
5278 s%@infodir@%$infodir%g
5279 s%@mandir@%$mandir%g
5280 s%@CC@%$CC%g
5281 s%@CPP@%$CPP%g
5282 s%@host@%$host%g
5283 s%@host_alias@%$host_alias%g
5284 s%@host_cpu@%$host_cpu%g
5285 s%@host_vendor@%$host_vendor%g
5286 s%@host_os@%$host_os%g
5287 s%@target@%$target%g
5288 s%@target_alias@%$target_alias%g
5289 s%@target_cpu@%$target_cpu%g
5290 s%@target_vendor@%$target_vendor%g
5291 s%@target_os@%$target_os%g
5292 s%@build@%$build%g
5293 s%@build_alias@%$build_alias%g
5294 s%@build_cpu@%$build_cpu%g
5295 s%@build_vendor@%$build_vendor%g
5296 s%@build_os@%$build_os%g
5297 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5298 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5299 s%@INSTALL_DATA@%$INSTALL_DATA%g
5300 s%@AR@%$AR%g
5301 s%@RANLIB@%$RANLIB%g
5302 s%@YACC@%$YACC%g
5303 s%@ALLOCA@%$ALLOCA%g
5304 s%@TERM_LIB@%$TERM_LIB%g
5305 s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
5306 s%@BUILD_TUI@%$BUILD_TUI%g
5307 s%@TUI_LIBRARY@%$TUI_LIBRARY%g
5308 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
5309 s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
5310 s%@MMALLOC@%$MMALLOC%g
5311 s%@MACHINE_OBS@%$MACHINE_OBS%g
5312 s%@ENABLE_IDE@%$ENABLE_IDE%g
5313 s%@FOUNDRY_LIB_BASE@%$FOUNDRY_LIB_BASE%g
5314 s%@LIBGUI@%$LIBGUI%g
5315 s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
5316 s%@IDE_CFLAGS_X@%$IDE_CFLAGS_X%g
5317 s%@IDE_X@%$IDE_X%g
5318 s%@LIBIDETCL@%$LIBIDETCL%g
5319 s%@LIBIDE@%$LIBIDE%g
5320 s%@IDE_DEPS@%$IDE_DEPS%g
5321 s%@WIN32LIBS@%$WIN32LIBS%g
5322 s%@WIN32LDAPP@%$WIN32LDAPP%g
5323 s%@DLLTOOL@%$DLLTOOL%g
5324 s%@WINDRES@%$WINDRES%g
5325 s%@TCL_VERSION@%$TCL_VERSION%g
5326 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
5327 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
5328 s%@TCL_CC@%$TCL_CC%g
5329 s%@TCL_DEFS@%$TCL_DEFS%g
5330 s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
5331 s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
5332 s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
5333 s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
5334 s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
5335 s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
5336 s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
5337 s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
5338 s%@TCL_RANLIB@%$TCL_RANLIB%g
5339 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
5340 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
5341 s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
5342 s%@TK_VERSION@%$TK_VERSION%g
5343 s%@TK_DEFS@%$TK_DEFS%g
5344 s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
5345 s%@TK_XINCLUDES@%$TK_XINCLUDES%g
5346 s%@TK_XLIBSW@%$TK_XLIBSW%g
5347 s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
5348 s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
5349 s%@TCLHDIR@%$TCLHDIR%g
5350 s%@TKHDIR@%$TKHDIR%g
5351 s%@ITCLHDIR@%$ITCLHDIR%g
5352 s%@ITKHDIR@%$ITKHDIR%g
5353 s%@TIXHDIR@%$TIXHDIR%g
5354 s%@ITCL_VERSION@%$ITCL_VERSION%g
5355 s%@ITCL_DEFS@%$ITCL_DEFS%g
5356 s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
5357 s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
5358 s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
5359 s%@ITK_VERSION@%$ITK_VERSION%g
5360 s%@ITK_DEFS@%$ITK_DEFS%g
5361 s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
5362 s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
5363 s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
5364 s%@TIX_VERSION@%$TIX_VERSION%g
5365 s%@TIX_BUILD_LIB_SPEC@%$TIX_BUILD_LIB_SPEC%g
5366 s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g
5367 s%@X_CFLAGS@%$X_CFLAGS%g
5368 s%@X_LDFLAGS@%$X_LDFLAGS%g
5369 s%@X_LIBS@%$X_LIBS%g
5370 s%@ITCLLIB@%$ITCLLIB%g
5371 s%@ITCL_DEPS@%$ITCL_DEPS%g
5372 s%@ITKLIB@%$ITKLIB%g
5373 s%@ITK_DEPS@%$ITK_DEPS%g
5374 s%@TIXLIB@%$TIXLIB%g
5375 s%@TIX_DEPS@%$TIX_DEPS%g
5376 s%@GDBTKLIBS@%$GDBTKLIBS%g
5377 s%@GDBTK_CFLAGS@%$GDBTK_CFLAGS%g
5378 s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
5379 s%@CONFIG_OBS@%$CONFIG_OBS%g
5380 s%@CONFIG_DEPS@%$CONFIG_DEPS%g
5381 s%@CONFIG_SRCS@%$CONFIG_SRCS%g
5382 s%@HLDFLAGS@%$HLDFLAGS%g
5383 s%@HLDENV@%$HLDENV%g
5384 s%@target_subdir@%$target_subdir%g
5385 /@host_makefile_frag@/r $host_makefile_frag
5386 s%@host_makefile_frag@%%g
5387 /@target_makefile_frag@/r $target_makefile_frag
5388 s%@target_makefile_frag@%%g
5389 s%@frags@%$frags%g
5390 s%@LN_S@%$LN_S%g
5391 s%@EXEEXT@%$EXEEXT%g
5392 s%@subdirs@%$subdirs%g
5393
5394 CEOF
5395 EOF
5396
5397 cat >> $CONFIG_STATUS <<\EOF
5398
5399 # Split the substitutions into bite-sized pieces for seds with
5400 # small command number limits, like on Digital OSF/1 and HP-UX.
5401 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5402 ac_file=1 # Number of current file.
5403 ac_beg=1 # First line for current file.
5404 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5405 ac_more_lines=:
5406 ac_sed_cmds=""
5407 while $ac_more_lines; do
5408   if test $ac_beg -gt 1; then
5409     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5410   else
5411     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5412   fi
5413   if test ! -s conftest.s$ac_file; then
5414     ac_more_lines=false
5415     rm -f conftest.s$ac_file
5416   else
5417     if test -z "$ac_sed_cmds"; then
5418       ac_sed_cmds="sed -f conftest.s$ac_file"
5419     else
5420       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5421     fi
5422     ac_file=`expr $ac_file + 1`
5423     ac_beg=$ac_end
5424     ac_end=`expr $ac_end + $ac_max_sed_cmds`
5425   fi
5426 done
5427 if test -z "$ac_sed_cmds"; then
5428   ac_sed_cmds=cat
5429 fi
5430 EOF
5431
5432 cat >> $CONFIG_STATUS <<EOF
5433
5434 CONFIG_FILES=\${CONFIG_FILES-"Makefile tui/Makefile .gdbinit:gdbinit.in"}
5435 EOF
5436 cat >> $CONFIG_STATUS <<\EOF
5437 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5438   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5439   case "$ac_file" in
5440   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5441        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5442   *) ac_file_in="${ac_file}.in" ;;
5443   esac
5444
5445   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5446
5447   # Remove last slash and all that follows it.  Not all systems have dirname.
5448   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5449   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5450     # The file is in a subdirectory.
5451     test ! -d "$ac_dir" && mkdir "$ac_dir"
5452     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5453     # A "../" for each directory in $ac_dir_suffix.
5454     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5455   else
5456     ac_dir_suffix= ac_dots=
5457   fi
5458
5459   case "$ac_given_srcdir" in
5460   .)  srcdir=.
5461       if test -z "$ac_dots"; then top_srcdir=.
5462       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5463   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5464   *) # Relative path.
5465     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5466     top_srcdir="$ac_dots$ac_given_srcdir" ;;
5467   esac
5468
5469   case "$ac_given_INSTALL" in
5470   [/$]*) INSTALL="$ac_given_INSTALL" ;;
5471   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5472   esac
5473
5474   echo creating "$ac_file"
5475   rm -f "$ac_file"
5476   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5477   case "$ac_file" in
5478   *Makefile*) ac_comsub="1i\\
5479 # $configure_input" ;;
5480   *) ac_comsub= ;;
5481   esac
5482
5483   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5484   sed -e "$ac_comsub
5485 s%@configure_input@%$configure_input%g
5486 s%@srcdir@%$srcdir%g
5487 s%@top_srcdir@%$top_srcdir%g
5488 s%@INSTALL@%$INSTALL%g
5489 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5490 fi; done
5491 rm -f conftest.s*
5492
5493 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5494 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5495 #
5496 # ac_d sets the value in "#define NAME VALUE" lines.
5497 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
5498 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
5499 ac_dC='\3'
5500 ac_dD='%g'
5501 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5502 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5503 ac_uB='\([      ]\)%\1#\2define\3'
5504 ac_uC=' '
5505 ac_uD='\4%g'
5506 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5507 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
5508 ac_eB='$%\1#\2define\3'
5509 ac_eC=' '
5510 ac_eD='%g'
5511
5512 if test "${CONFIG_HEADERS+set}" != set; then
5513 EOF
5514 cat >> $CONFIG_STATUS <<EOF
5515   CONFIG_HEADERS="config.h:config.in"
5516 EOF
5517 cat >> $CONFIG_STATUS <<\EOF
5518 fi
5519 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5520   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5521   case "$ac_file" in
5522   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5523        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5524   *) ac_file_in="${ac_file}.in" ;;
5525   esac
5526
5527   echo creating $ac_file
5528
5529   rm -f conftest.frag conftest.in conftest.out
5530   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5531   cat $ac_file_inputs > conftest.in
5532
5533 EOF
5534
5535 # Transform confdefs.h into a sed script conftest.vals that substitutes
5536 # the proper values into config.h.in to produce config.h.  And first:
5537 # Protect against being on the right side of a sed subst in config.status.
5538 # Protect against being in an unquoted here document in config.status.
5539 rm -f conftest.vals
5540 cat > conftest.hdr <<\EOF
5541 s/[\\&%]/\\&/g
5542 s%[\\$`]%\\&%g
5543 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
5544 s%ac_d%ac_u%gp
5545 s%ac_u%ac_e%gp
5546 EOF
5547 sed -n -f conftest.hdr confdefs.h > conftest.vals
5548 rm -f conftest.hdr
5549
5550 # This sed command replaces #undef with comments.  This is necessary, for
5551 # example, in the case of _POSIX_SOURCE, which is predefined and required
5552 # on some systems where configure will not decide to define it.
5553 cat >> conftest.vals <<\EOF
5554 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
5555 EOF
5556
5557 # Break up conftest.vals because some shells have a limit on
5558 # the size of here documents, and old seds have small limits too.
5559
5560 rm -f conftest.tail
5561 while :
5562 do
5563   ac_lines=`grep -c . conftest.vals`
5564   # grep -c gives empty output for an empty file on some AIX systems.
5565   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5566   # Write a limited-size here document to conftest.frag.
5567   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
5568   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5569   echo 'CEOF
5570   sed -f conftest.frag conftest.in > conftest.out
5571   rm -f conftest.in
5572   mv conftest.out conftest.in
5573 ' >> $CONFIG_STATUS
5574   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5575   rm -f conftest.vals
5576   mv conftest.tail conftest.vals
5577 done
5578 rm -f conftest.vals
5579
5580 cat >> $CONFIG_STATUS <<\EOF
5581   rm -f conftest.frag conftest.h
5582   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
5583   cat conftest.in >> conftest.h
5584   rm -f conftest.in
5585   if cmp -s $ac_file conftest.h 2>/dev/null; then
5586     echo "$ac_file is unchanged"
5587     rm -f conftest.h
5588   else
5589     # Remove last slash and all that follows it.  Not all systems have dirname.
5590       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5591       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5592       # The file is in a subdirectory.
5593       test ! -d "$ac_dir" && mkdir "$ac_dir"
5594     fi
5595     rm -f $ac_file
5596     mv conftest.h $ac_file
5597   fi
5598 fi; done
5599
5600 EOF
5601
5602 cat >> $CONFIG_STATUS <<EOF
5603 ac_sources="$files"
5604 ac_dests="$links"
5605 EOF
5606
5607 cat >> $CONFIG_STATUS <<\EOF
5608 srcdir=$ac_given_srcdir
5609 while test -n "$ac_sources"; do
5610   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
5611   set $ac_sources; ac_source=$1; shift; ac_sources=$*
5612
5613   echo "linking $srcdir/$ac_source to $ac_dest"
5614
5615   if test ! -r $srcdir/$ac_source; then
5616     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
5617   fi
5618   rm -f $ac_dest
5619
5620   # Make relative symlinks.
5621   # Remove last slash and all that follows it.  Not all systems have dirname.
5622   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
5623   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
5624     # The dest file is in a subdirectory.
5625     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
5626     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
5627     # A "../" for each directory in $ac_dest_dir_suffix.
5628     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
5629   else
5630     ac_dest_dir_suffix= ac_dots=
5631   fi
5632
5633   case "$srcdir" in
5634   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
5635   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
5636   esac
5637
5638   # Make a symlink if possible; otherwise try a hard link.
5639   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
5640     ln $srcdir/$ac_source $ac_dest; then :
5641   else
5642     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
5643   fi
5644 done
5645 EOF
5646 cat >> $CONFIG_STATUS <<EOF
5647
5648 gdb_host_cpu=$gdb_host_cpu
5649 gdb_target_cpu=$gdb_target_cpu
5650 nativefile=$nativefile
5651
5652 EOF
5653 cat >> $CONFIG_STATUS <<\EOF
5654
5655 if test "${nativefile}" = ""; then
5656 sed -e '/^NATDEPFILES[  ]*=[    ]*/s//# NATDEPFILES=/' \
5657         < Makefile > Makefile.tem
5658 mv -f Makefile.tem Makefile
5659 fi
5660
5661 sed -e '/^TM_FILE[      ]*=/s,^TM_FILE[         ]*=[    ]*,&config/'"${gdb_target_cpu}"'/,
5662 /^XM_FILE[      ]*=/s,^XM_FILE[         ]*=[    ]*,&config/'"${gdb_host_cpu}"'/,
5663 /^NAT_FILE[     ]*=/s,^NAT_FILE[        ]*=[    ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
5664 mv -f Makefile.tmp Makefile
5665
5666 case x$CONFIG_HEADERS in
5667 xconfig.h:config.in)
5668 echo > stamp-h ;;
5669 esac
5670
5671 exit 0
5672 EOF
5673 chmod +x $CONFIG_STATUS
5674 rm -fr confdefs* $ac_clean_files
5675 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
5676
5677 if test "$no_recursion" != yes; then
5678
5679   # Remove --cache-file and --srcdir arguments so they do not pile up.
5680   ac_sub_configure_args=
5681   ac_prev=
5682   for ac_arg in $ac_configure_args; do
5683     if test -n "$ac_prev"; then
5684       ac_prev=
5685       continue
5686     fi
5687     case "$ac_arg" in
5688     -cache-file | --cache-file | --cache-fil | --cache-fi \
5689     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
5690       ac_prev=cache_file ;;
5691     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
5692     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
5693       ;;
5694     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
5695       ac_prev=srcdir ;;
5696     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
5697       ;;
5698     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
5699     esac
5700   done
5701
5702   for ac_config_dir in $configdirs; do
5703
5704     # Do not complain, so a configure script can configure whichever
5705     # parts of a large source tree are present.
5706     if test ! -d $srcdir/$ac_config_dir; then
5707       continue
5708     fi
5709
5710     echo configuring in $ac_config_dir
5711
5712     case "$srcdir" in
5713     .) ;;
5714     *)
5715       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
5716       else
5717         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
5718       fi
5719       ;;
5720     esac
5721
5722     ac_popdir=`pwd`
5723     cd $ac_config_dir
5724
5725       # A "../" for each directory in /$ac_config_dir.
5726       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
5727
5728     case "$srcdir" in
5729     .) # No --srcdir option.  We are building in place.
5730       ac_sub_srcdir=$srcdir ;;
5731     /*) # Absolute path.
5732       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
5733     *) # Relative path.
5734       ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
5735     esac
5736
5737     # Check for guested configure; otherwise get Cygnus style configure.
5738     if test -f $ac_sub_srcdir/configure; then
5739       ac_sub_configure=$ac_sub_srcdir/configure
5740     elif test -f $ac_sub_srcdir/configure.in; then
5741       ac_sub_configure=$ac_configure
5742     else
5743       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
5744       ac_sub_configure=
5745     fi
5746
5747     # The recursion is here.
5748     if test -n "$ac_sub_configure"; then
5749
5750       # Make the cache file name correct relative to the subdirectory.
5751       case "$cache_file" in
5752       /*) ac_sub_cache_file=$cache_file ;;
5753       *) # Relative path.
5754         ac_sub_cache_file="$ac_dots$cache_file" ;;
5755       esac
5756   case "$ac_given_INSTALL" in
5757         [/$]*) INSTALL="$ac_given_INSTALL" ;;
5758         *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5759         esac
5760
5761       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
5762       # The eval makes quoting arguments work.
5763       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
5764       then :
5765       else
5766         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
5767       fi
5768     fi
5769
5770     cd $ac_popdir
5771   done
5772 fi
5773
5774
5775 exit 0