changes for new tcl/tk:
[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.10 
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-netrom "
16 ac_help="$ac_help
17   --enable-gm "
18 ac_help="$ac_help
19   --enable-sim-powerpc "
20 ac_help="$ac_help
21   --enable-gdbtk "
22 ac_help="$ac_help
23   --with-tclconfig           directory containing tcl configuration (tclConfig.sh)"
24 ac_help="$ac_help
25   --with-tkconfig           directory containing tk configuration (tkConfig.sh)"
26 ac_help="$ac_help
27   --with-tclinclude       directory where tcl private headers are"
28 ac_help="$ac_help
29   --with-tkinclude       directory where tk private headers are"
30
31 # Initialize some variables set by options.
32 # The variables have the same names as the options, with
33 # dashes changed to underlines.
34 build=NONE
35 cache_file=./config.cache
36 exec_prefix=NONE
37 host=NONE
38 no_create=
39 nonopt=NONE
40 no_recursion=
41 prefix=NONE
42 program_prefix=NONE
43 program_suffix=NONE
44 program_transform_name=s,x,x,
45 silent=
46 site=
47 srcdir=
48 target=NONE
49 verbose=
50 x_includes=NONE
51 x_libraries=NONE
52 bindir='${exec_prefix}/bin'
53 sbindir='${exec_prefix}/sbin'
54 libexecdir='${exec_prefix}/libexec'
55 datadir='${prefix}/share'
56 sysconfdir='${prefix}/etc'
57 sharedstatedir='${prefix}/com'
58 localstatedir='${prefix}/var'
59 libdir='${exec_prefix}/lib'
60 includedir='${prefix}/include'
61 oldincludedir='/usr/include'
62 infodir='${prefix}/info'
63 mandir='${prefix}/man'
64
65 # Initialize some other variables.
66 subdirs=
67 MFLAGS= MAKEFLAGS=
68
69 ac_prev=
70 for ac_option
71 do
72
73   # If the previous option needs an argument, assign it.
74   if test -n "$ac_prev"; then
75     eval "$ac_prev=\$ac_option"
76     ac_prev=
77     continue
78   fi
79
80   case "$ac_option" in
81   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
82   *) ac_optarg= ;;
83   esac
84
85   # Accept the important Cygnus configure options, so we can diagnose typos.
86
87   case "$ac_option" in
88
89   -bindir | --bindir | --bindi | --bind | --bin | --bi)
90     ac_prev=bindir ;;
91   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
92     bindir="$ac_optarg" ;;
93
94   -build | --build | --buil | --bui | --bu)
95     ac_prev=build ;;
96   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
97     build="$ac_optarg" ;;
98
99   -cache-file | --cache-file | --cache-fil | --cache-fi \
100   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
101     ac_prev=cache_file ;;
102   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
103   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
104     cache_file="$ac_optarg" ;;
105
106   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
107     ac_prev=datadir ;;
108   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
109   | --da=*)
110     datadir="$ac_optarg" ;;
111
112   -disable-* | --disable-*)
113     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
114     # Reject names that are not valid shell variable names.
115     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
116       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
117     fi
118     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
119     eval "enable_${ac_feature}=no" ;;
120
121   -enable-* | --enable-*)
122     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
123     # Reject names that are not valid shell variable names.
124     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
125       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
126     fi
127     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
128     case "$ac_option" in
129       *=*) ;;
130       *) ac_optarg=yes ;;
131     esac
132     eval "enable_${ac_feature}='$ac_optarg'" ;;
133
134   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
135   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
136   | --exec | --exe | --ex)
137     ac_prev=exec_prefix ;;
138   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
139   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
140   | --exec=* | --exe=* | --ex=*)
141     exec_prefix="$ac_optarg" ;;
142
143   -gas | --gas | --ga | --g)
144     # Obsolete; use --with-gas.
145     with_gas=yes ;;
146
147   -help | --help | --hel | --he)
148     # Omit some internal or obsolete options to make the list less imposing.
149     # This message is too long to be a string in the A/UX 3.1 sh.
150     cat << EOF
151 Usage: configure [options] [host]
152 Options: [defaults in brackets after descriptions]
153 Configuration:
154   --cache-file=FILE       cache test results in FILE
155   --help                  print this message
156   --no-create             do not create output files
157   --quiet, --silent       do not print \`checking...' messages
158   --version               print the version of autoconf that created configure
159 Directory and file names:
160   --prefix=PREFIX         install architecture-independent files in PREFIX
161                           [$ac_default_prefix]
162   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
163                           [same as prefix]
164   --bindir=DIR            user executables in DIR [EPREFIX/bin]
165   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
166   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
167   --datadir=DIR           read-only architecture-independent data in DIR
168                           [PREFIX/share]
169   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
170   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
171                           [PREFIX/com]
172   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
173   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
174   --includedir=DIR        C header files in DIR [PREFIX/include]
175   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
176   --infodir=DIR           info documentation in DIR [PREFIX/info]
177   --mandir=DIR            man documentation in DIR [PREFIX/man]
178   --srcdir=DIR            find the sources in DIR [configure dir or ..]
179   --program-prefix=PREFIX prepend PREFIX to installed program names
180   --program-suffix=SUFFIX append SUFFIX to installed program names
181   --program-transform-name=PROGRAM
182                           run sed PROGRAM on installed program names
183 EOF
184     cat << EOF
185 Host type:
186   --build=BUILD           configure for building on BUILD [BUILD=HOST]
187   --host=HOST             configure for HOST [guessed]
188   --target=TARGET         configure for TARGET [TARGET=HOST]
189 Features and packages:
190   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
191   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
192   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
193   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
194   --x-includes=DIR        X include files are in DIR
195   --x-libraries=DIR       X library files are in DIR
196 EOF
197     if test -n "$ac_help"; then
198       echo "--enable and --with options recognized:$ac_help"
199     fi
200     exit 0 ;;
201
202   -host | --host | --hos | --ho)
203     ac_prev=host ;;
204   -host=* | --host=* | --hos=* | --ho=*)
205     host="$ac_optarg" ;;
206
207   -includedir | --includedir | --includedi | --included | --include \
208   | --includ | --inclu | --incl | --inc)
209     ac_prev=includedir ;;
210   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
211   | --includ=* | --inclu=* | --incl=* | --inc=*)
212     includedir="$ac_optarg" ;;
213
214   -infodir | --infodir | --infodi | --infod | --info | --inf)
215     ac_prev=infodir ;;
216   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
217     infodir="$ac_optarg" ;;
218
219   -libdir | --libdir | --libdi | --libd)
220     ac_prev=libdir ;;
221   -libdir=* | --libdir=* | --libdi=* | --libd=*)
222     libdir="$ac_optarg" ;;
223
224   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
225   | --libexe | --libex | --libe)
226     ac_prev=libexecdir ;;
227   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
228   | --libexe=* | --libex=* | --libe=*)
229     libexecdir="$ac_optarg" ;;
230
231   -localstatedir | --localstatedir | --localstatedi | --localstated \
232   | --localstate | --localstat | --localsta | --localst \
233   | --locals | --local | --loca | --loc | --lo)
234     ac_prev=localstatedir ;;
235   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
236   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
237   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
238     localstatedir="$ac_optarg" ;;
239
240   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
241     ac_prev=mandir ;;
242   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
243     mandir="$ac_optarg" ;;
244
245   -nfp | --nfp | --nf)
246     # Obsolete; use --without-fp.
247     with_fp=no ;;
248
249   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
250   | --no-cr | --no-c)
251     no_create=yes ;;
252
253   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
254   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
255     no_recursion=yes ;;
256
257   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
258   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
259   | --oldin | --oldi | --old | --ol | --o)
260     ac_prev=oldincludedir ;;
261   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
262   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
263   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
264     oldincludedir="$ac_optarg" ;;
265
266   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
267     ac_prev=prefix ;;
268   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
269     prefix="$ac_optarg" ;;
270
271   -program-prefix | --program-prefix | --program-prefi | --program-pref \
272   | --program-pre | --program-pr | --program-p)
273     ac_prev=program_prefix ;;
274   -program-prefix=* | --program-prefix=* | --program-prefi=* \
275   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
276     program_prefix="$ac_optarg" ;;
277
278   -program-suffix | --program-suffix | --program-suffi | --program-suff \
279   | --program-suf | --program-su | --program-s)
280     ac_prev=program_suffix ;;
281   -program-suffix=* | --program-suffix=* | --program-suffi=* \
282   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
283     program_suffix="$ac_optarg" ;;
284
285   -program-transform-name | --program-transform-name \
286   | --program-transform-nam | --program-transform-na \
287   | --program-transform-n | --program-transform- \
288   | --program-transform | --program-transfor \
289   | --program-transfo | --program-transf \
290   | --program-trans | --program-tran \
291   | --progr-tra | --program-tr | --program-t)
292     ac_prev=program_transform_name ;;
293   -program-transform-name=* | --program-transform-name=* \
294   | --program-transform-nam=* | --program-transform-na=* \
295   | --program-transform-n=* | --program-transform-=* \
296   | --program-transform=* | --program-transfor=* \
297   | --program-transfo=* | --program-transf=* \
298   | --program-trans=* | --program-tran=* \
299   | --progr-tra=* | --program-tr=* | --program-t=*)
300     program_transform_name="$ac_optarg" ;;
301
302   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
303   | -silent | --silent | --silen | --sile | --sil)
304     silent=yes ;;
305
306   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
307     ac_prev=sbindir ;;
308   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
309   | --sbi=* | --sb=*)
310     sbindir="$ac_optarg" ;;
311
312   -sharedstatedir | --sharedstatedir | --sharedstatedi \
313   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
314   | --sharedst | --shareds | --shared | --share | --shar \
315   | --sha | --sh)
316     ac_prev=sharedstatedir ;;
317   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
318   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
319   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
320   | --sha=* | --sh=*)
321     sharedstatedir="$ac_optarg" ;;
322
323   -site | --site | --sit)
324     ac_prev=site ;;
325   -site=* | --site=* | --sit=*)
326     site="$ac_optarg" ;;
327
328   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
329     ac_prev=srcdir ;;
330   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
331     srcdir="$ac_optarg" ;;
332
333   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
334   | --syscon | --sysco | --sysc | --sys | --sy)
335     ac_prev=sysconfdir ;;
336   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
337   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
338     sysconfdir="$ac_optarg" ;;
339
340   -target | --target | --targe | --targ | --tar | --ta | --t)
341     ac_prev=target ;;
342   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
343     target="$ac_optarg" ;;
344
345   -v | -verbose | --verbose | --verbos | --verbo | --verb)
346     verbose=yes ;;
347
348   -version | --version | --versio | --versi | --vers)
349     echo "configure generated by autoconf version 2.10"
350     exit 0 ;;
351
352   -with-* | --with-*)
353     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
354     # Reject names that are not valid shell variable names.
355     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
356       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
357     fi
358     ac_package=`echo $ac_package| sed 's/-/_/g'`
359     case "$ac_option" in
360       *=*) ;;
361       *) ac_optarg=yes ;;
362     esac
363     eval "with_${ac_package}='$ac_optarg'" ;;
364
365   -without-* | --without-*)
366     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
367     # Reject names that are not valid shell variable names.
368     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
369       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
370     fi
371     ac_package=`echo $ac_package| sed 's/-/_/g'`
372     eval "with_${ac_package}=no" ;;
373
374   --x)
375     # Obsolete; use --with-x.
376     with_x=yes ;;
377
378   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
379   | --x-incl | --x-inc | --x-in | --x-i)
380     ac_prev=x_includes ;;
381   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
382   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
383     x_includes="$ac_optarg" ;;
384
385   -x-libraries | --x-libraries | --x-librarie | --x-librari \
386   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
387     ac_prev=x_libraries ;;
388   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
389   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
390     x_libraries="$ac_optarg" ;;
391
392   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
393     ;;
394
395   *)
396     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
397       echo "configure: warning: $ac_option: invalid host type" 1>&2
398     fi
399     if test "x$nonopt" != xNONE; then
400       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
401     fi
402     nonopt="$ac_option"
403     ;;
404
405   esac
406 done
407
408 if test -n "$ac_prev"; then
409   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
410 fi
411
412 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
413
414 # File descriptor usage:
415 # 0 standard input
416 # 1 file creation
417 # 2 errors and warnings
418 # 3 some systems may open it to /dev/tty
419 # 4 used on the Kubota Titan
420 # 6 checking for... messages and results
421 # 5 compiler messages saved in config.log
422 if test "$silent" = yes; then
423   exec 6>/dev/null
424 else
425   exec 6>&1
426 fi
427 exec 5>./config.log
428
429 echo "\
430 This file contains any messages produced by compilers while
431 running configure, to aid debugging if configure makes a mistake.
432 " 1>&5
433
434 # Strip out --no-create and --no-recursion so they do not pile up.
435 # Also quote any args containing shell metacharacters.
436 ac_configure_args=
437 for ac_arg
438 do
439   case "$ac_arg" in
440   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
441   | --no-cr | --no-c) ;;
442   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
443   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
444   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
445   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
446   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
447   esac
448 done
449
450 # NLS nuisances.
451 # Only set LANG and LC_ALL to C if already set.
452 # These must not be set unconditionally because not all systems understand
453 # e.g. LANG=C (notably SCO).
454 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
455 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
456
457 # confdefs.h avoids OS command line length limits that DEFS can exceed.
458 rm -rf conftest* confdefs.h
459 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
460 echo > confdefs.h
461
462 # A filename unique to this package, relative to the directory that
463 # configure is in, which we can look for to find out if srcdir is correct.
464 ac_unique_file=main.c
465
466 # Find the source files, if location was not specified.
467 if test -z "$srcdir"; then
468   ac_srcdir_defaulted=yes
469   # Try the directory containing this script, then its parent.
470   ac_prog=$0
471   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
472   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
473   srcdir=$ac_confdir
474   if test ! -r $srcdir/$ac_unique_file; then
475     srcdir=..
476   fi
477 else
478   ac_srcdir_defaulted=no
479 fi
480 if test ! -r $srcdir/$ac_unique_file; then
481   if test "$ac_srcdir_defaulted" = yes; then
482     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
483   else
484     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
485   fi
486 fi
487 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
488
489 # Prefer explicitly selected file to automatically selected ones.
490 if test -z "$CONFIG_SITE"; then
491   if test "x$prefix" != xNONE; then
492     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
493   else
494     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
495   fi
496 fi
497 for ac_site_file in $CONFIG_SITE; do
498   if test -r "$ac_site_file"; then
499     echo "loading site script $ac_site_file"
500     . "$ac_site_file"
501   fi
502 done
503
504 if test -r "$cache_file"; then
505   echo "loading cache $cache_file"
506   . $cache_file
507 else
508   echo "creating cache $cache_file"
509   > $cache_file
510 fi
511
512 ac_ext=c
513 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
514 ac_cpp='$CPP $CPPFLAGS'
515 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
516 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
517
518 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
519   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
520   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
521     ac_n= ac_c='
522 ' ac_t='        '
523   else
524     ac_n=-n ac_c= ac_t=
525   fi
526 else
527   ac_n= ac_c='\c' ac_t=
528 fi
529
530
531
532
533 # Extract the first word of "gcc", so it can be a program name with args.
534 set dummy gcc; ac_word=$2
535 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
536 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
537   echo $ac_n "(cached) $ac_c" 1>&6
538 else
539   if test -n "$CC"; then
540   ac_cv_prog_CC="$CC" # Let the user override the test.
541 else
542   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
543   for ac_dir in $PATH; do
544     test -z "$ac_dir" && ac_dir=.
545     if test -f $ac_dir/$ac_word; then
546       ac_cv_prog_CC="gcc"
547       break
548     fi
549   done
550   IFS="$ac_save_ifs"
551 fi
552 fi
553 CC="$ac_cv_prog_CC"
554 if test -n "$CC"; then
555   echo "$ac_t""$CC" 1>&6
556 else
557   echo "$ac_t""no" 1>&6
558 fi
559
560 if test -z "$CC"; then
561   # Extract the first word of "cc", so it can be a program name with args.
562 set dummy cc; ac_word=$2
563 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
564 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
565   echo $ac_n "(cached) $ac_c" 1>&6
566 else
567   if test -n "$CC"; then
568   ac_cv_prog_CC="$CC" # Let the user override the test.
569 else
570   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
571   ac_prog_rejected=no
572   for ac_dir in $PATH; do
573     test -z "$ac_dir" && ac_dir=.
574     if test -f $ac_dir/$ac_word; then
575       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
576         ac_prog_rejected=yes
577         continue
578       fi
579       ac_cv_prog_CC="cc"
580       break
581     fi
582   done
583   IFS="$ac_save_ifs"
584 if test $ac_prog_rejected = yes; then
585   # We found a bogon in the path, so make sure we never use it.
586   set dummy $ac_cv_prog_CC
587   shift
588   if test $# -gt 0; then
589     # We chose a different compiler from the bogus one.
590     # However, it has the same basename, so the bogon will be chosen
591     # first if we set CC to just the basename; use the full file name.
592     shift
593     set dummy "$ac_dir/$ac_word" "$@"
594     shift
595     ac_cv_prog_CC="$@"
596   fi
597 fi
598 fi
599 fi
600 CC="$ac_cv_prog_CC"
601 if test -n "$CC"; then
602   echo "$ac_t""$CC" 1>&6
603 else
604   echo "$ac_t""no" 1>&6
605 fi
606
607   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
608 fi
609
610 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
611 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
612   echo $ac_n "(cached) $ac_c" 1>&6
613 else
614   cat > conftest.c <<EOF
615 #ifdef __GNUC__
616   yes;
617 #endif
618 EOF
619 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
620   ac_cv_prog_gcc=yes
621 else
622   ac_cv_prog_gcc=no
623 fi
624 fi
625
626 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
627 if test $ac_cv_prog_gcc = yes; then
628   GCC=yes
629   if test "${CFLAGS+set}" != set; then
630     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
631 if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
632   echo $ac_n "(cached) $ac_c" 1>&6
633 else
634   echo 'void f(){}' > conftest.c
635 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
636   ac_cv_prog_gcc_g=yes
637 else
638   ac_cv_prog_gcc_g=no
639 fi
640 rm -f conftest*
641
642 fi
643
644 echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
645     if test $ac_cv_prog_gcc_g = yes; then
646       CFLAGS="-g -O"
647     else
648       CFLAGS="-O"
649     fi
650   fi
651 else
652   GCC=
653   test "${CFLAGS+set}" = set || CFLAGS="-g"
654 fi
655
656 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
657 # On Suns, sometimes $CPP names a directory.
658 if test -n "$CPP" && test -d "$CPP"; then
659   CPP=
660 fi
661 if test -z "$CPP"; then
662 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
663   echo $ac_n "(cached) $ac_c" 1>&6
664 else
665     # This must be in double quotes, not single quotes, because CPP may get
666   # substituted into the Makefile and "${CC-cc}" will confuse make.
667   CPP="${CC-cc} -E"
668   # On the NeXT, cc -E runs the code through the compiler's parser,
669   # not just through cpp.
670   cat > conftest.$ac_ext <<EOF
671 #line 672 "configure"
672 #include "confdefs.h"
673 #include <assert.h>
674 Syntax Error
675 EOF
676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
677 { (eval echo configure:678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
678 ac_err=`grep -v '^ *+' conftest.out`
679 if test -z "$ac_err"; then
680   :
681 else
682   echo "$ac_err" >&5
683   rm -rf conftest*
684   CPP="${CC-cc} -E -traditional-cpp"
685   cat > conftest.$ac_ext <<EOF
686 #line 687 "configure"
687 #include "confdefs.h"
688 #include <assert.h>
689 Syntax Error
690 EOF
691 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
692 { (eval echo configure:693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
693 ac_err=`grep -v '^ *+' conftest.out`
694 if test -z "$ac_err"; then
695   :
696 else
697   echo "$ac_err" >&5
698   rm -rf conftest*
699   CPP=/lib/cpp
700 fi
701 rm -f conftest*
702 fi
703 rm -f conftest*
704   ac_cv_prog_CPP="$CPP"
705 fi
706   CPP="$ac_cv_prog_CPP"
707 else
708   ac_cv_prog_CPP="$CPP"
709 fi
710 echo "$ac_t""$CPP" 1>&6
711
712 echo $ac_n "checking for AIX""... $ac_c" 1>&6
713 cat > conftest.$ac_ext <<EOF
714 #line 715 "configure"
715 #include "confdefs.h"
716 #ifdef _AIX
717   yes
718 #endif
719
720 EOF
721 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
722   egrep "yes" >/dev/null 2>&1; then
723   rm -rf conftest*
724   echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
725 #define _ALL_SOURCE 1
726 EOF
727
728 else
729   rm -rf conftest*
730   echo "$ac_t""no" 1>&6
731 fi
732 rm -f conftest*
733
734
735 ac_safe=`echo "minix/config.h" | tr './\055' '___'`
736 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
737 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
738   echo $ac_n "(cached) $ac_c" 1>&6
739 else
740   cat > conftest.$ac_ext <<EOF
741 #line 742 "configure"
742 #include "confdefs.h"
743 #include <minix/config.h>
744 EOF
745 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
746 { (eval echo configure:747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
747 ac_err=`grep -v '^ *+' conftest.out`
748 if test -z "$ac_err"; then
749   rm -rf conftest*
750   eval "ac_cv_header_$ac_safe=yes"
751 else
752   echo "$ac_err" >&5
753   rm -rf conftest*
754   eval "ac_cv_header_$ac_safe=no"
755 fi
756 rm -f conftest*
757 fi
758 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
759   echo "$ac_t""yes" 1>&6
760   MINIX=yes
761 else
762   echo "$ac_t""no" 1>&6
763 MINIX=
764 fi
765
766 if test "$MINIX" = yes; then
767   cat >> confdefs.h <<\EOF
768 #define _POSIX_SOURCE 1
769 EOF
770
771   cat >> confdefs.h <<\EOF
772 #define _POSIX_1_SOURCE 2
773 EOF
774
775   cat >> confdefs.h <<\EOF
776 #define _MINIX 1
777 EOF
778
779 fi
780
781 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
782 if test -d /etc/conf/kconfig.d &&
783   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
784 then
785   echo "$ac_t""yes" 1>&6
786   ISC=yes # If later tests want to check for ISC.
787   cat >> confdefs.h <<\EOF
788 #define _POSIX_SOURCE 1
789 EOF
790
791   if test "$GCC" = yes; then
792     CC="$CC -posix"
793   else
794     CC="$CC -Xp"
795   fi
796 else
797   echo "$ac_t""no" 1>&6
798   ISC=
799 fi
800
801
802 ac_aux_dir=
803 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
804   if test -f $ac_dir/install-sh; then
805     ac_aux_dir=$ac_dir
806     ac_install_sh="$ac_aux_dir/install-sh -c"
807     break
808   elif test -f $ac_dir/install.sh; then
809     ac_aux_dir=$ac_dir
810     ac_install_sh="$ac_aux_dir/install.sh -c"
811     break
812   fi
813 done
814 if test -z "$ac_aux_dir"; then
815   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
816 fi
817 ac_config_guess=$ac_aux_dir/config.guess
818 ac_config_sub=$ac_aux_dir/config.sub
819 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
820
821 # Find a good install program.  We prefer a C program (faster),
822 # so one script is as good as another.  But avoid the broken or
823 # incompatible versions:
824 # SysV /etc/install, /usr/sbin/install
825 # SunOS /usr/etc/install
826 # IRIX /sbin/install
827 # AIX /bin/install
828 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
829 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
830 # ./install, which can be erroneously created by make from ./install.sh.
831 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
832 if test -z "$INSTALL"; then
833 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
834   echo $ac_n "(cached) $ac_c" 1>&6
835 else
836     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
837   for ac_dir in $PATH; do
838     # Account for people who put trailing slashes in PATH elements.
839     case "$ac_dir/" in
840     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
841     *)
842       # OSF1 and SCO ODT 3.0 have their own names for install.
843       for ac_prog in ginstall installbsd scoinst install; do
844         if test -f $ac_dir/$ac_prog; then
845           if test $ac_prog = install &&
846             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
847             # AIX install.  It has an incompatible calling convention.
848             # OSF/1 installbsd also uses dspmsg, but is usable.
849             :
850           else
851             ac_cv_path_install="$ac_dir/$ac_prog -c"
852             break 2
853           fi
854         fi
855       done
856       ;;
857     esac
858   done
859   IFS="$ac_save_ifs"
860
861 fi
862   if test "${ac_cv_path_install+set}" = set; then
863     INSTALL="$ac_cv_path_install"
864   else
865     # As a last resort, use the slow shell script.  We don't cache a
866     # path for INSTALL within a source directory, because that will
867     # break other packages using the cache if that directory is
868     # removed, or if the path is relative.
869     INSTALL="$ac_install_sh"
870   fi
871 fi
872 echo "$ac_t""$INSTALL" 1>&6
873
874 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
875 # It thinks the first close brace ends the variable substitution.
876 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
877
878 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
879
880
881 # Make sure we can run config.sub.
882 if $ac_config_sub sun4 >/dev/null 2>&1; then :
883 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
884 fi
885
886 echo $ac_n "checking host system type""... $ac_c" 1>&6
887
888 host_alias=$host
889 case "$host_alias" in
890 NONE)
891   case $nonopt in
892   NONE)
893     if host_alias=`$ac_config_guess`; then :
894     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
895     fi ;;
896   *) host_alias=$nonopt ;;
897   esac ;;
898 esac
899
900 host=`$ac_config_sub $host_alias`
901 host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
902 host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
903 host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
904 echo "$ac_t""$host" 1>&6
905
906 echo $ac_n "checking build system type""... $ac_c" 1>&6
907
908 build_alias=$build
909 case "$build_alias" in
910 NONE)
911   case $nonopt in
912   NONE) build_alias=$host_alias ;;
913   *) build_alias=$nonopt ;;
914   esac ;;
915 esac
916
917 build=`$ac_config_sub $build_alias`
918 build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
919 build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
920 build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
921 echo "$ac_t""$build" 1>&6
922
923 if test $host != $build; then
924   ac_tool_prefix=${host_alias}-
925 else
926   ac_tool_prefix=
927 fi
928
929 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
930 set dummy ${ac_tool_prefix}ar; ac_word=$2
931 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
932 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
933   echo $ac_n "(cached) $ac_c" 1>&6
934 else
935   if test -n "$AR"; then
936   ac_cv_prog_AR="$AR" # Let the user override the test.
937 else
938   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
939   for ac_dir in $PATH; do
940     test -z "$ac_dir" && ac_dir=.
941     if test -f $ac_dir/$ac_word; then
942       ac_cv_prog_AR="${ac_tool_prefix}ar"
943       break
944     fi
945   done
946   IFS="$ac_save_ifs"
947   test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
948 fi
949 fi
950 AR="$ac_cv_prog_AR"
951 if test -n "$AR"; then
952   echo "$ac_t""$AR" 1>&6
953 else
954   echo "$ac_t""no" 1>&6
955 fi
956
957
958
959 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
960 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
961 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
962 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
963   echo $ac_n "(cached) $ac_c" 1>&6
964 else
965   if test -n "$RANLIB"; then
966   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
967 else
968   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
969   for ac_dir in $PATH; do
970     test -z "$ac_dir" && ac_dir=.
971     if test -f $ac_dir/$ac_word; then
972       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
973       break
974     fi
975   done
976   IFS="$ac_save_ifs"
977 fi
978 fi
979 RANLIB="$ac_cv_prog_RANLIB"
980 if test -n "$RANLIB"; then
981   echo "$ac_t""$RANLIB" 1>&6
982 else
983   echo "$ac_t""no" 1>&6
984 fi
985
986
987 if test -z "$ac_cv_prog_RANLIB"; then
988 if test -n "$ac_tool_prefix"; then
989   # Extract the first word of "ranlib", so it can be a program name with args.
990 set dummy ranlib; ac_word=$2
991 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
992 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
993   echo $ac_n "(cached) $ac_c" 1>&6
994 else
995   if test -n "$RANLIB"; then
996   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
997 else
998   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
999   for ac_dir in $PATH; do
1000     test -z "$ac_dir" && ac_dir=.
1001     if test -f $ac_dir/$ac_word; then
1002       ac_cv_prog_RANLIB="ranlib"
1003       break
1004     fi
1005   done
1006   IFS="$ac_save_ifs"
1007   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1008 fi
1009 fi
1010 RANLIB="$ac_cv_prog_RANLIB"
1011 if test -n "$RANLIB"; then
1012   echo "$ac_t""$RANLIB" 1>&6
1013 else
1014   echo "$ac_t""no" 1>&6
1015 fi
1016
1017 else
1018   RANLIB=":"
1019 fi
1020 fi
1021
1022 for ac_prog in 'bison -y' byacc
1023 do
1024 # Extract the first word of "$ac_prog", so it can be a program name with args.
1025 set dummy $ac_prog; ac_word=$2
1026 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1027 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
1028   echo $ac_n "(cached) $ac_c" 1>&6
1029 else
1030   if test -n "$YACC"; then
1031   ac_cv_prog_YACC="$YACC" # Let the user override the test.
1032 else
1033   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1034   for ac_dir in $PATH; do
1035     test -z "$ac_dir" && ac_dir=.
1036     if test -f $ac_dir/$ac_word; then
1037       ac_cv_prog_YACC="$ac_prog"
1038       break
1039     fi
1040   done
1041   IFS="$ac_save_ifs"
1042 fi
1043 fi
1044 YACC="$ac_cv_prog_YACC"
1045 if test -n "$YACC"; then
1046   echo "$ac_t""$YACC" 1>&6
1047 else
1048   echo "$ac_t""no" 1>&6
1049 fi
1050
1051 test -n "$YACC" && break
1052 done
1053 test -n "$YACC" || YACC="yacc"
1054
1055 for ac_prog in mawk gawk nawk awk
1056 do
1057 # Extract the first word of "$ac_prog", so it can be a program name with args.
1058 set dummy $ac_prog; ac_word=$2
1059 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1060 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1061   echo $ac_n "(cached) $ac_c" 1>&6
1062 else
1063   if test -n "$AWK"; then
1064   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1065 else
1066   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1067   for ac_dir in $PATH; do
1068     test -z "$ac_dir" && ac_dir=.
1069     if test -f $ac_dir/$ac_word; then
1070       ac_cv_prog_AWK="$ac_prog"
1071       break
1072     fi
1073   done
1074   IFS="$ac_save_ifs"
1075 fi
1076 fi
1077 AWK="$ac_cv_prog_AWK"
1078 if test -n "$AWK"; then
1079   echo "$ac_t""$AWK" 1>&6
1080 else
1081   echo "$ac_t""no" 1>&6
1082 fi
1083
1084 test -n "$AWK" && break
1085 done
1086
1087
1088 ac_aux_dir=
1089 for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1090   if test -f $ac_dir/install-sh; then
1091     ac_aux_dir=$ac_dir
1092     ac_install_sh="$ac_aux_dir/install-sh -c"
1093     break
1094   elif test -f $ac_dir/install.sh; then
1095     ac_aux_dir=$ac_dir
1096     ac_install_sh="$ac_aux_dir/install.sh -c"
1097     break
1098   fi
1099 done
1100 if test -z "$ac_aux_dir"; then
1101   { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1102 fi
1103 ac_config_guess=$ac_aux_dir/config.guess
1104 ac_config_sub=$ac_aux_dir/config.sub
1105 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1106
1107
1108 # Do some error checking and defaulting for the host and target type.
1109 # The inputs are:
1110 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1111 #
1112 # The rules are:
1113 # 1. You are not allowed to specify --host, --target, and nonopt at the
1114 #    same time.
1115 # 2. Host defaults to nonopt.
1116 # 3. If nonopt is not specified, then host defaults to the current host,
1117 #    as determined by config.guess.
1118 # 4. Target and build default to nonopt.
1119 # 5. If nonopt is not specified, then target and build default to host.
1120
1121 # The aliases save the names the user supplied, while $host etc.
1122 # will get canonicalized.
1123 case $host---$target---$nonopt in
1124 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1125 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1126 esac
1127
1128
1129 # Make sure we can run config.sub.
1130 if $ac_config_sub sun4 >/dev/null 2>&1; then :
1131 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1132 fi
1133
1134 echo $ac_n "checking host system type""... $ac_c" 1>&6
1135
1136 host_alias=$host
1137 case "$host_alias" in
1138 NONE)
1139   case $nonopt in
1140   NONE)
1141     if host_alias=`$ac_config_guess`; then :
1142     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1143     fi ;;
1144   *) host_alias=$nonopt ;;
1145   esac ;;
1146 esac
1147
1148 host=`$ac_config_sub $host_alias`
1149 host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
1150 host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
1151 host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
1152 echo "$ac_t""$host" 1>&6
1153
1154 echo $ac_n "checking target system type""... $ac_c" 1>&6
1155
1156 target_alias=$target
1157 case "$target_alias" in
1158 NONE)
1159   case $nonopt in
1160   NONE) target_alias=$host_alias ;;
1161   *) target_alias=$nonopt ;;
1162   esac ;;
1163 esac
1164
1165 target=`$ac_config_sub $target_alias`
1166 target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
1167 target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
1168 target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
1169 echo "$ac_t""$target" 1>&6
1170
1171 echo $ac_n "checking build system type""... $ac_c" 1>&6
1172
1173 build_alias=$build
1174 case "$build_alias" in
1175 NONE)
1176   case $nonopt in
1177   NONE) build_alias=$host_alias ;;
1178   *) build_alias=$nonopt ;;
1179   esac ;;
1180 esac
1181
1182 build=`$ac_config_sub $build_alias`
1183 build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
1184 build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
1185 build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
1186 echo "$ac_t""$build" 1>&6
1187
1188 test "$host_alias" != "$target_alias" &&
1189   test "$program_prefix$program_suffix$program_transform_name" = \
1190     NONENONEs,x,x, &&
1191   program_prefix=${target_alias}-
1192
1193 if test "$program_transform_name" = s,x,x,; then
1194   program_transform_name=
1195 else
1196   # Double any \ or $.  echo might interpret backslashes.
1197   cat <<\EOF_SED > conftestsed
1198 s,\\,\\\\,g; s,\$,$$,g
1199 EOF_SED
1200   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1201   rm -f conftestsed
1202 fi
1203 test "$program_prefix" != NONE &&
1204   program_transform_name="s,^,${program_prefix},; $program_transform_name"
1205 # Use a double $ so make ignores it.
1206 test "$program_suffix" != NONE &&
1207   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1208
1209 # sed with no file args requires a program.
1210 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1211
1212
1213 # If we cannot run a trivial program, we must be cross compiling.
1214 echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1215 if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1216   echo $ac_n "(cached) $ac_c" 1>&6
1217 else
1218   if test "$cross_compiling" = yes; then
1219   ac_cv_c_cross=yes
1220 else
1221 cat > conftest.$ac_ext <<EOF
1222 #line 1223 "configure"
1223 #include "confdefs.h"
1224 main(){return(0);}
1225 EOF
1226 { (eval echo configure:1227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1227 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1228   ac_cv_c_cross=no
1229 else
1230   ac_cv_c_cross=yes
1231 fi
1232 fi
1233 rm -fr conftest*
1234 fi
1235
1236 echo "$ac_t""$ac_cv_c_cross" 1>&6
1237 cross_compiling=$ac_cv_c_cross
1238
1239 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1240 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1241   echo $ac_n "(cached) $ac_c" 1>&6
1242 else
1243   cat > conftest.$ac_ext <<EOF
1244 #line 1245 "configure"
1245 #include "confdefs.h"
1246 #include <stdlib.h>
1247 #include <stdarg.h>
1248 #include <string.h>
1249 #include <float.h>
1250 EOF
1251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1252 { (eval echo configure:1253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1253 ac_err=`grep -v '^ *+' conftest.out`
1254 if test -z "$ac_err"; then
1255   rm -rf conftest*
1256   ac_cv_header_stdc=yes
1257 else
1258   echo "$ac_err" >&5
1259   rm -rf conftest*
1260   ac_cv_header_stdc=no
1261 fi
1262 rm -f conftest*
1263
1264 if test $ac_cv_header_stdc = yes; then
1265   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1266 cat > conftest.$ac_ext <<EOF
1267 #line 1268 "configure"
1268 #include "confdefs.h"
1269 #include <string.h>
1270 EOF
1271 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1272   egrep "memchr" >/dev/null 2>&1; then
1273   :
1274 else
1275   rm -rf conftest*
1276   ac_cv_header_stdc=no
1277 fi
1278 rm -f conftest*
1279
1280 fi
1281
1282 if test $ac_cv_header_stdc = yes; then
1283   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1284 cat > conftest.$ac_ext <<EOF
1285 #line 1286 "configure"
1286 #include "confdefs.h"
1287 #include <stdlib.h>
1288 EOF
1289 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1290   egrep "free" >/dev/null 2>&1; then
1291   :
1292 else
1293   rm -rf conftest*
1294   ac_cv_header_stdc=no
1295 fi
1296 rm -f conftest*
1297
1298 fi
1299
1300 if test $ac_cv_header_stdc = yes; then
1301   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1302 if test "$cross_compiling" = yes; then
1303   :
1304 else
1305 cat > conftest.$ac_ext <<EOF
1306 #line 1307 "configure"
1307 #include "confdefs.h"
1308 #include <ctype.h>
1309 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1310 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1311 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1312 int main () { int i; for (i = 0; i < 256; i++)
1313 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1314 exit (0); }
1315
1316 EOF
1317 { (eval echo configure:1318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1318 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1319   :
1320 else
1321   ac_cv_header_stdc=no
1322 fi
1323 fi
1324 rm -fr conftest*
1325 fi
1326 fi
1327
1328 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1329 if test $ac_cv_header_stdc = yes; then
1330   cat >> confdefs.h <<\EOF
1331 #define STDC_HEADERS 1
1332 EOF
1333
1334 fi
1335
1336 for ac_hdr in limits.h memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h sys/procfs.h link.h endian.h
1337 do
1338 ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1339 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1340 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1341   echo $ac_n "(cached) $ac_c" 1>&6
1342 else
1343   cat > conftest.$ac_ext <<EOF
1344 #line 1345 "configure"
1345 #include "confdefs.h"
1346 #include <$ac_hdr>
1347 EOF
1348 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1349 { (eval echo configure:1350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1350 ac_err=`grep -v '^ *+' conftest.out`
1351 if test -z "$ac_err"; then
1352   rm -rf conftest*
1353   eval "ac_cv_header_$ac_safe=yes"
1354 else
1355   echo "$ac_err" >&5
1356   rm -rf conftest*
1357   eval "ac_cv_header_$ac_safe=no"
1358 fi
1359 rm -f conftest*
1360 fi
1361 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1362   echo "$ac_t""yes" 1>&6
1363     ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1364   cat >> confdefs.h <<EOF
1365 #define $ac_tr_hdr 1
1366 EOF
1367  
1368 else
1369   echo "$ac_t""no" 1>&6
1370 fi
1371 done
1372
1373 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1374 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1375   echo $ac_n "(cached) $ac_c" 1>&6
1376 else
1377   cat > conftest.$ac_ext <<EOF
1378 #line 1379 "configure"
1379 #include "confdefs.h"
1380 #include <sys/types.h>
1381 #include <sys/stat.h>
1382
1383 #if defined(S_ISBLK) && defined(S_IFDIR)
1384 # if S_ISBLK (S_IFDIR)
1385 You lose.
1386 # endif
1387 #endif
1388
1389 #if defined(S_ISBLK) && defined(S_IFCHR)
1390 # if S_ISBLK (S_IFCHR)
1391 You lose.
1392 # endif
1393 #endif
1394
1395 #if defined(S_ISLNK) && defined(S_IFREG)
1396 # if S_ISLNK (S_IFREG)
1397 You lose.
1398 # endif
1399 #endif
1400
1401 #if defined(S_ISSOCK) && defined(S_IFREG)
1402 # if S_ISSOCK (S_IFREG)
1403 You lose.
1404 # endif
1405 #endif
1406
1407 EOF
1408 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1409   egrep "You lose" >/dev/null 2>&1; then
1410   rm -rf conftest*
1411   ac_cv_header_stat_broken=yes
1412 else
1413   rm -rf conftest*
1414   ac_cv_header_stat_broken=no
1415 fi
1416 rm -f conftest*
1417
1418 fi
1419
1420 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1421 if test $ac_cv_header_stat_broken = yes; then
1422   cat >> confdefs.h <<\EOF
1423 #define STAT_MACROS_BROKEN 1
1424 EOF
1425
1426 fi
1427
1428
1429 for ac_func in setpgid sbrk
1430 do
1431 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1432 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1433   echo $ac_n "(cached) $ac_c" 1>&6
1434 else
1435   cat > conftest.$ac_ext <<EOF
1436 #line 1437 "configure"
1437 #include "confdefs.h"
1438 /* System header to define __stub macros and hopefully few prototypes,
1439     which can conflict with char $ac_func(); below.  */
1440 #include <assert.h>
1441 /* Override any gcc2 internal prototype to avoid an error.  */
1442 /* We use char because int might match the return type of a gcc2
1443     builtin and then its argument prototype would still apply.  */
1444 char $ac_func();
1445
1446 int main() { return 0; }
1447 int t() {
1448
1449 /* The GNU C library defines this for functions which it implements
1450     to always fail with ENOSYS.  Some functions are actually named
1451     something starting with __ and the normal name is an alias.  */
1452 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1453 choke me
1454 #else
1455 $ac_func();
1456 #endif
1457
1458 ; return 0; }
1459 EOF
1460 if { (eval echo configure:1461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1461   rm -rf conftest*
1462   eval "ac_cv_func_$ac_func=yes"
1463 else
1464   rm -rf conftest*
1465   eval "ac_cv_func_$ac_func=no"
1466 fi
1467 rm -f conftest*
1468
1469 fi
1470 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1471   echo "$ac_t""yes" 1>&6
1472     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1473   cat >> confdefs.h <<EOF
1474 #define $ac_tr_func 1
1475 EOF
1476  
1477 else
1478   echo "$ac_t""no" 1>&6
1479 fi
1480 done
1481
1482
1483 echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6
1484 if eval "test \"`echo '$''{'gdb_cv_have_gregset_t'+set}'`\" = set"; then
1485   echo $ac_n "(cached) $ac_c" 1>&6
1486 else
1487   cat > conftest.$ac_ext <<EOF
1488 #line 1489 "configure"
1489 #include "confdefs.h"
1490 #include <sys/procfs.h>
1491 int main() { return 0; }
1492 int t() {
1493 gregset_t *gregsetp = 0
1494 ; return 0; }
1495 EOF
1496 if { (eval echo configure:1497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1497   rm -rf conftest*
1498   gdb_cv_have_gregset_t=yes
1499 else
1500   rm -rf conftest*
1501   gdb_cv_have_gregset_t=no
1502 fi
1503 rm -f conftest*
1504
1505 fi
1506
1507 echo "$ac_t""$gdb_cv_have_gregset_t" 1>&6
1508 if test $gdb_cv_have_gregset_t = yes; then
1509   cat >> confdefs.h <<\EOF
1510 #define HAVE_GREGSET_T 1
1511 EOF
1512
1513 fi
1514
1515 echo $ac_n "checking for fpregset_t type""... $ac_c" 1>&6
1516 if eval "test \"`echo '$''{'gdb_cv_have_fpregset_t'+set}'`\" = set"; then
1517   echo $ac_n "(cached) $ac_c" 1>&6
1518 else
1519   cat > conftest.$ac_ext <<EOF
1520 #line 1521 "configure"
1521 #include "confdefs.h"
1522 #include <sys/procfs.h>
1523 int main() { return 0; }
1524 int t() {
1525 fpregset_t *fpregsetp = 0
1526 ; return 0; }
1527 EOF
1528 if { (eval echo configure:1529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1529   rm -rf conftest*
1530   gdb_cv_have_fpregset_t=yes
1531 else
1532   rm -rf conftest*
1533   gdb_cv_have_fpregset_t=no
1534 fi
1535 rm -f conftest*
1536
1537 fi
1538
1539 echo "$ac_t""$gdb_cv_have_fpregset_t" 1>&6
1540 if test $gdb_cv_have_fpregset_t = yes; then
1541   cat >> confdefs.h <<\EOF
1542 #define HAVE_FPREGSET_T 1
1543 EOF
1544
1545 fi
1546
1547
1548 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
1549 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
1550   echo $ac_n "(cached) $ac_c" 1>&6
1551 else
1552   cat > conftest.$ac_ext <<EOF
1553 #line 1554 "configure"
1554 #include "confdefs.h"
1555
1556 int main() { return 0; }
1557 int t() {
1558
1559 long long foo;
1560 void bar ()
1561 {
1562   switch (foo & 2) { case 0: return; }
1563 }
1564 ; return 0; }
1565 EOF
1566 if { (eval echo configure:1567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1567   rm -rf conftest*
1568   gdb_cv_c_long_long=yes
1569 else
1570   rm -rf conftest*
1571   gdb_cv_c_long_long=no
1572 fi
1573 rm -f conftest*
1574
1575 fi
1576
1577 echo "$ac_t""$gdb_cv_c_long_long" 1>&6
1578 if test $gdb_cv_c_long_long = yes; then
1579   cat >> confdefs.h <<\EOF
1580 #define CC_HAS_LONG_LONG 1
1581 EOF
1582
1583 fi
1584
1585
1586 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
1587 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
1588   echo $ac_n "(cached) $ac_c" 1>&6
1589 else
1590   if test "$cross_compiling" = yes; then
1591   gdb_cv_printf_has_long_long=no
1592 else
1593 cat > conftest.$ac_ext <<EOF
1594 #line 1595 "configure"
1595 #include "confdefs.h"
1596
1597 int main () {
1598   char buf[16];
1599   long long l = 0x12345;
1600   sprintf (buf, "%llx", l);
1601   return (strcmp ("12345", buf));
1602 }
1603 EOF
1604 { (eval echo configure:1605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1605 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1606   gdb_cv_printf_has_long_long=yes
1607 else
1608   gdb_cv_printf_has_long_long=no
1609 fi
1610 fi
1611 rm -fr conftest*
1612 fi
1613
1614 if test $gdb_cv_printf_has_long_long = yes; then
1615   cat >> confdefs.h <<\EOF
1616 #define PRINTF_HAS_LONG_LONG 1
1617 EOF
1618
1619 fi
1620 echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
1621
1622
1623 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
1624 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
1625   echo $ac_n "(cached) $ac_c" 1>&6
1626 else
1627   cat > conftest.$ac_ext <<EOF
1628 #line 1629 "configure"
1629 #include "confdefs.h"
1630
1631 int main() { return 0; }
1632 int t() {
1633 long double foo;
1634 ; return 0; }
1635 EOF
1636 if { (eval echo configure:1637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1637   rm -rf conftest*
1638   ac_cv_c_long_double=yes
1639 else
1640   rm -rf conftest*
1641   ac_cv_c_long_double=no
1642 fi
1643 rm -f conftest*
1644
1645 fi
1646
1647 echo "$ac_t""$ac_cv_c_long_double" 1>&6
1648 if test $ac_cv_c_long_double = yes; then
1649   cat >> confdefs.h <<\EOF
1650 #define HAVE_LONG_DOUBLE 1
1651 EOF
1652
1653 fi
1654
1655
1656 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
1657 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
1658   echo $ac_n "(cached) $ac_c" 1>&6
1659 else
1660   if test "$cross_compiling" = yes; then
1661   gdb_cv_printf_has_long_double=no
1662 else
1663 cat > conftest.$ac_ext <<EOF
1664 #line 1665 "configure"
1665 #include "confdefs.h"
1666
1667 int main () {
1668   char buf[16];
1669   long double f = 3.141592653;
1670   sprintf (buf, "%Lg", f);
1671   return (strncmp ("3.14159", buf, 7));
1672 }
1673 EOF
1674 { (eval echo configure:1675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1675 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1676   gdb_cv_printf_has_long_double=yes
1677 else
1678   gdb_cv_printf_has_long_double=no
1679 fi
1680 fi
1681 rm -fr conftest*
1682 fi
1683
1684 if test $gdb_cv_printf_has_long_double = yes; then
1685   cat >> confdefs.h <<\EOF
1686 #define PRINTF_HAS_LONG_DOUBLE 1
1687 EOF
1688
1689 fi
1690 echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
1691
1692 for ac_func in valloc getpagesize
1693 do
1694 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1695 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1696   echo $ac_n "(cached) $ac_c" 1>&6
1697 else
1698   cat > conftest.$ac_ext <<EOF
1699 #line 1700 "configure"
1700 #include "confdefs.h"
1701 /* System header to define __stub macros and hopefully few prototypes,
1702     which can conflict with char $ac_func(); below.  */
1703 #include <assert.h>
1704 /* Override any gcc2 internal prototype to avoid an error.  */
1705 /* We use char because int might match the return type of a gcc2
1706     builtin and then its argument prototype would still apply.  */
1707 char $ac_func();
1708
1709 int main() { return 0; }
1710 int t() {
1711
1712 /* The GNU C library defines this for functions which it implements
1713     to always fail with ENOSYS.  Some functions are actually named
1714     something starting with __ and the normal name is an alias.  */
1715 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1716 choke me
1717 #else
1718 $ac_func();
1719 #endif
1720
1721 ; return 0; }
1722 EOF
1723 if { (eval echo configure:1724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1724   rm -rf conftest*
1725   eval "ac_cv_func_$ac_func=yes"
1726 else
1727   rm -rf conftest*
1728   eval "ac_cv_func_$ac_func=no"
1729 fi
1730 rm -f conftest*
1731
1732 fi
1733 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1734   echo "$ac_t""yes" 1>&6
1735     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1736   cat >> confdefs.h <<EOF
1737 #define $ac_tr_func 1
1738 EOF
1739  
1740 else
1741   echo "$ac_t""no" 1>&6
1742 fi
1743 done
1744
1745 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1746 if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
1747   echo $ac_n "(cached) $ac_c" 1>&6
1748 else
1749   if test "$cross_compiling" = yes; then
1750   ac_cv_func_mmap=no
1751 else
1752 cat > conftest.$ac_ext <<EOF
1753 #line 1754 "configure"
1754 #include "confdefs.h"
1755
1756 /* Thanks to Mike Haertel and Jim Avera for this test. */
1757 #include <sys/types.h>
1758 #include <fcntl.h>
1759 #include <sys/mman.h>
1760
1761 #ifndef HAVE_GETPAGESIZE
1762 # include <sys/param.h>
1763 # ifdef EXEC_PAGESIZE
1764 #  define getpagesize() EXEC_PAGESIZE
1765 # else
1766 #  ifdef NBPG
1767 #   define getpagesize() NBPG * CLSIZE
1768 #   ifndef CLSIZE
1769 #    define CLSIZE 1
1770 #   endif
1771 #  else
1772 #   ifdef NBPC
1773 #    define getpagesize() NBPC
1774 #   else
1775 #    define getpagesize() PAGESIZE /* SVR4 */
1776 #   endif
1777 #  endif
1778 # endif
1779 #endif
1780
1781 #ifndef HAVE_VALLOC
1782 # define valloc malloc
1783 #endif
1784
1785 #ifdef __cplusplus
1786 extern "C" { void *valloc(unsigned), *malloc(unsigned); }
1787 #else
1788 char *valloc(), *malloc();
1789 #endif
1790
1791 int
1792 main()
1793 {
1794   char *buf1, *buf2, *buf3;
1795   int i = getpagesize(), j;
1796   int i2 = i * 2;
1797   int fd;
1798
1799   buf1 = (char *)valloc(i2);
1800   buf2 = (char *)valloc(i);
1801   buf3 = (char *)malloc(i2);
1802   for (j = 0; j < i2; ++j)
1803     *(buf1 + j) = rand();
1804   fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
1805   write(fd, buf1, i2);
1806   mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
1807   for (j = 0; j < i; ++j)
1808     if (*(buf1 + j) != *(buf2 + j))
1809       exit(1);
1810   lseek(fd, (long)i, 0);
1811   read(fd, buf2, i); /* read into mapped memory -- file should not change */
1812   /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */
1813   lseek(fd, (long)0, 0);
1814   read(fd, buf3, i2);
1815   for (j = 0; j < i2; ++j)
1816     if (*(buf1 + j) != *(buf3 + j))
1817       exit(1);
1818   exit(0);
1819 }
1820
1821 EOF
1822 { (eval echo configure:1823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
1823 if test -s conftest && (./conftest; exit) 2>/dev/null; then
1824   ac_cv_func_mmap=yes
1825 else
1826   ac_cv_func_mmap=no
1827 fi
1828 fi
1829 rm -fr conftest*
1830 fi
1831
1832 echo "$ac_t""$ac_cv_func_mmap" 1>&6
1833 if test $ac_cv_func_mmap = yes; then
1834   cat >> confdefs.h <<\EOF
1835 #define HAVE_MMAP 1
1836 EOF
1837
1838 fi
1839
1840
1841
1842
1843 if test ${build} = ${host} -a ${host} = ${target} ; then
1844         echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
1845         if test -f /usr/lib/libthread_db.so.1 ; then
1846                 echo "$ac_t""yes" 1>&6
1847                 THREAD_DB_OBS=sol-thread.o
1848                 cat >> confdefs.h <<\EOF
1849 #define HAVE_THREAD_DB_LIB 1
1850 EOF
1851
1852                 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Xlinker -export-dynamic"
1853         else
1854                 echo "$ac_t""no" 1>&6
1855         fi
1856         
1857         
1858 fi
1859
1860 ENABLE_CFLAGS=
1861 ENABLE_CLIBS=
1862 ENABLE_OBS=
1863
1864 # Check whether --enable-netrom or --disable-netrom was given.
1865 if test "${enable_netrom+set}" = set; then
1866   enableval="$enable_netrom"
1867   case "${enableval}" in
1868 yes)    enable_netrom=yes ;;
1869 no)     enable_netrom=no ;;
1870 *)      { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
1871 esac
1872 fi
1873
1874
1875 if test "${enable_netrom}" = "yes"; then
1876         ENABLE_OBS="${ENABLE_OBS} remote-nrom.o" 
1877 fi
1878
1879 # start-sanitize-gm
1880 ENABLE_GM=
1881
1882 # Check whether --enable-gm or --disable-gm was given.
1883 if test "${enable_gm+set}" = set; then
1884   enableval="$enable_gm"
1885   case "${enableval}" in
1886 yes)    ENABLE_OBS="${ENABLE_OBS} gmagic.o"
1887         ENABLE_CFLAGS=-DGENERAL_MAGIC
1888         ;;
1889 no)     ;;
1890 *)      { echo "configure: error: bad value ${enableval} given for gm option" 1>&2; exit 1; } ;;
1891 esac
1892 fi
1893
1894
1895 # end-sanitize-gm
1896
1897 # Check whether --enable-sim-powerpc or --disable-sim-powerpc was given.
1898 if test "${enable_sim_powerpc+set}" = set; then
1899   enableval="$enable_sim_powerpc"
1900   case "${enableval}" in
1901 yes)    powerpc_sim=yes ;;
1902 no)     powerpc_sim=no ;;
1903 *)      { echo "configure: error: bad value ${enableval} given for sim-powerpc option" 1>&2; exit 1; } ;;
1904 esac
1905 else
1906   if test x"$GCC" != x""; then powerpc_sim=yes; else powerpc_sim=no; fi
1907 fi
1908
1909
1910 # start-sanitize-gdbtk
1911 ENABLE_GDBTK=
1912
1913 # Check whether --enable-gdbtk or --disable-gdbtk was given.
1914 if test "${enable_gdbtk+set}" = set; then
1915   enableval="$enable_gdbtk"
1916   case "${enableval}" in
1917     yes)
1918         case "$host" in
1919         *go32*)
1920             echo "configure: warning: GDB does not support GDBtk on host ${host}.  GDBtk will be disabled." 1>&2
1921             enable_gdbtk=no ;;
1922         *cygwin32*)
1923             echo "configure: warning: GDB does not support GDBtk on host ${host}.  GDBtk will be disabled." 1>&2
1924             enable_gdbtk=no ;;
1925         *)
1926             enable_gdbtk=yes ;;
1927         esac ;;
1928     no)
1929         enable_gdbtk=no  ;;
1930     *)
1931         { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
1932 esac
1933 else
1934   
1935 # Default is on for everything but go32 and cygwin32
1936 case "$host" in
1937     *go32*)
1938         ;;
1939     *cygwin32*)
1940         ;;
1941     *)
1942         enable_gdbtk=yes ;;
1943     esac
1944
1945 fi
1946
1947
1948 if test "${enable_gdbtk}" = "yes"; then
1949
1950     
1951 #
1952 # Ok, lets find the tcl configuration
1953 # First, look for one uninstalled.  
1954 # the alternative search directory is invoked by --with-tclconfig
1955 #
1956
1957 if test x"${no_tcl}" = x ; then
1958   # we reset no_tcl in case something fails here
1959   no_tcl=true
1960   # Check whether --with-tclconfig or --without-tclconfig was given.
1961 if test "${with_tclconfig+set}" = set; then
1962   withval="$with_tclconfig"
1963   with_tclconfig=${withval}
1964 fi
1965
1966   echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
1967   if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
1968   echo $ac_n "(cached) $ac_c" 1>&6
1969 else
1970   
1971
1972   # First check to see if --with-tclconfig was specified.
1973   if test x"${with_tclconfig}" != x ; then
1974     if test -f "${with_tclconfig}/tclConfig.sh" ; then
1975       ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
1976     else
1977       { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
1978     fi
1979   fi
1980
1981   # then check for a private Tcl installation
1982   if test x"${ac_cv_c_tclconfig}" = x ; then
1983     for i in \
1984                 ../tcl \
1985                 `ls -dr ../tcl[7-9]* 2>/dev/null` \
1986                 ../../tcl \
1987                 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
1988                 ../../../tcl \
1989                 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
1990       if test -f "$i/unix/tclConfig.sh" ; then
1991         ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
1992         break
1993       fi
1994     done
1995   fi
1996   # check in a few common install locations
1997   if test x"${ac_cv_c_tclconfig}" = x ; then
1998     for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
1999       if test -f "$i/tclConfig.sh" ; then
2000         ac_cv_c_tclconfig=`(cd $i; pwd)`
2001         break
2002       fi
2003     done
2004   fi
2005   # check in a few other private locations
2006   if test x"${ac_cv_c_tclconfig}" = x ; then
2007     for i in \
2008                 ${srcdir}/../tcl \
2009                 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
2010       if test -f "$i/unix/tclConfig.sh" ; then
2011         ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
2012         break
2013       fi
2014     done
2015   fi
2016   
2017 fi
2018
2019   if test x"${ac_cv_c_tclconfig}" = x ; then
2020     TCLCONFIG="# no Tcl configs found"
2021     echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
2022   else
2023     no_tcl=
2024     TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
2025     echo "$ac_t""found $TCLCONFIG" 1>&6
2026   fi
2027 fi
2028
2029     
2030     . $TCLCONFIG
2031
2032     
2033     
2034     
2035     
2036     
2037
2038
2039
2040
2041     
2042     
2043     
2044     
2045     
2046     
2047     
2048     
2049     
2050     
2051     
2052     
2053
2054
2055
2056     
2057 #
2058 # Ok, lets find the tk configuration
2059 # First, look for one uninstalled.  
2060 # the alternative search directory is invoked by --with-tkconfig
2061 #
2062
2063 if test x"${no_tk}" = x ; then
2064   # we reset no_tk in case something fails here
2065   no_tk=true
2066   # Check whether --with-tkconfig or --without-tkconfig was given.
2067 if test "${with_tkconfig+set}" = set; then
2068   withval="$with_tkconfig"
2069   with_tkconfig=${withval}
2070 fi
2071
2072   echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
2073   if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
2074   echo $ac_n "(cached) $ac_c" 1>&6
2075 else
2076   
2077
2078   # First check to see if --with-tkconfig was specified.
2079   if test x"${with_tkconfig}" != x ; then
2080     if test -f "${with_tkconfig}/tkConfig.sh" ; then
2081       ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
2082     else
2083       { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
2084     fi
2085   fi
2086
2087   # then check for a private Tk library
2088   if test x"${ac_cv_c_tkconfig}" = x ; then
2089     for i in \
2090                 ../tk \
2091                 `ls -dr ../tk[4-9]* 2>/dev/null` \
2092                 ../../tk \
2093                 `ls -dr ../../tk[4-9]* 2>/dev/null` \
2094                 ../../../tk \
2095                 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
2096       if test -f "$i/unix/tkConfig.sh" ; then
2097         ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
2098         break
2099       fi
2100     done
2101   fi
2102   # check in a few common install locations
2103   if test x"${ac_cv_c_tkconfig}" = x ; then
2104     for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
2105       if test -f "$i/tkConfig.sh" ; then
2106         ac_cv_c_tkconfig=`(cd $i; pwd)`
2107         break
2108       fi
2109     done
2110   fi
2111   # check in a few other private locations
2112   if test x"${ac_cv_c_tkconfig}" = x ; then
2113     for i in \
2114                 ${srcdir}/../tk \
2115                 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
2116       if test -f "$i/unix/tkConfig.sh" ; then
2117         ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
2118         break
2119       fi
2120     done
2121   fi
2122   
2123 fi
2124
2125   if test x"${ac_cv_c_tkconfig}" = x ; then
2126     TKCONFIG="# no Tk configs found"
2127     echo "configure: warning: Can't find Tk configuration definitions" 1>&2
2128   else
2129     no_tk=
2130     TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
2131     echo "$ac_t""found $TKCONFIG" 1>&6
2132   fi
2133 fi
2134
2135
2136
2137     # If $no_tk is nonempty, then we can't do Tk, and there is no
2138     # point to doing Tcl.
2139     if test -z "${no_tk}"; then
2140        
2141     if test -f "$TKCONFIG" ; then
2142       . $TKCONFIG
2143     fi
2144
2145     
2146     
2147
2148     
2149
2150
2151     
2152     
2153     
2154     
2155
2156        
2157 #
2158 # Ok, lets find the tcl source trees so we can use the headers
2159 # Warning: transition of version 9 to 10 will break this algorithm
2160 # because 10 sorts before 9. We also look for just tcl. We have to
2161 # be careful that we don't match stuff like tclX by accident.
2162 # the alternative search directory is involked by --with-tclinclude
2163 #
2164 no_tcl=true
2165 echo $ac_n "checking for Tcl private headers""... $ac_c" 1>&6
2166 # Check whether --with-tclinclude or --without-tclinclude was given.
2167 if test "${with_tclinclude+set}" = set; then
2168   withval="$with_tclinclude"
2169   with_tclinclude=${withval}
2170 fi
2171
2172 if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
2173   echo $ac_n "(cached) $ac_c" 1>&6
2174 else
2175   
2176 # first check to see if --with-tclinclude was specified
2177 if test x"${with_tclinclude}" != x ; then
2178   if test -f ${with_tclinclude}/tclInt.h ; then
2179     ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
2180   elif test -f ${with_tclinclude}/generic/tclInt.h ; then
2181     ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
2182   else
2183     { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
2184   fi
2185 fi
2186
2187 # next check if it came with Tcl configuration file
2188 if test x"${ac_cv_c_tclconfig}" = x ; then
2189   if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
2190     ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
2191   fi
2192 fi
2193
2194 # next check in private source directory
2195 #
2196 # since ls returns lowest version numbers first, reverse its output
2197 if test x"${ac_cv_c_tclh}" = x ; then
2198   for i in \
2199                 ${srcdir}/../tcl \
2200                 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
2201                 ${srcdir}/../../tcl \
2202                 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
2203                 ${srcdir}/../../../tcl \
2204                 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
2205     if test -f $i/generic/tclInt.h ; then
2206       ac_cv_c_tclh=`(cd $i/generic; pwd)`
2207       break
2208     fi
2209   done
2210 fi
2211 # finally check in a few common install locations
2212 #
2213 # since ls returns lowest version numbers first, reverse its output
2214 if test x"${ac_cv_c_tclh}" = x ; then
2215   for i in \
2216                 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
2217                 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
2218                 /usr/local/src/tcl \
2219                 /usr/local/lib/tcl \
2220                 ${prefix}/include ; do
2221     if test -f $i/generic/tclInt.h ; then
2222       ac_cv_c_tclh=`(cd $i/generic; pwd)`
2223       break
2224     fi
2225   done
2226 fi
2227 # see if one is installed
2228 if test x"${ac_cv_c_tclh}" = x ; then
2229    ac_safe=`echo "tclInt.h" | tr './\055' '___'`
2230 echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
2231 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2232   echo $ac_n "(cached) $ac_c" 1>&6
2233 else
2234   cat > conftest.$ac_ext <<EOF
2235 #line 2236 "configure"
2236 #include "confdefs.h"
2237 #include <tclInt.h>
2238 EOF
2239 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2240 { (eval echo configure:2241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2241 ac_err=`grep -v '^ *+' conftest.out`
2242 if test -z "$ac_err"; then
2243   rm -rf conftest*
2244   eval "ac_cv_header_$ac_safe=yes"
2245 else
2246   echo "$ac_err" >&5
2247   rm -rf conftest*
2248   eval "ac_cv_header_$ac_safe=no"
2249 fi
2250 rm -f conftest*
2251 fi
2252 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2253   echo "$ac_t""yes" 1>&6
2254   ac_cv_c_tclh=installed
2255 else
2256   echo "$ac_t""no" 1>&6
2257 ac_cv_c_tclh=""
2258 fi
2259
2260 fi
2261
2262 fi
2263
2264 if test x"${ac_cv_c_tclh}" = x ; then
2265   TCLHDIR="# no Tcl private headers found"
2266   { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
2267 fi
2268 if test x"${ac_cv_c_tclh}" != x ; then
2269   no_tcl=""
2270   if test x"${ac_cv_c_tclh}" = x"installed" ; then
2271     echo "$ac_t""is installed" 1>&6
2272     TCLHDIR=""
2273   else
2274     echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
2275     # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
2276     TCLHDIR="-I${ac_cv_c_tclh}"
2277   fi
2278 fi
2279
2280
2281
2282        
2283 #
2284 # Ok, lets find the tk source trees so we can use the headers
2285 # If the directory (presumably symlink) named "tk" exists, use that one
2286 # in preference to any others.  Same logic is used when choosing library
2287 # and again with Tcl. The search order is the best place to look first, then in
2288 # decreasing significance. The loop breaks if the trigger file is found.
2289 # Note the gross little conversion here of srcdir by cd'ing to the found
2290 # directory. This converts the path from a relative to an absolute, so
2291 # recursive cache variables for the path will work right. We check all
2292 # the possible paths in one loop rather than many seperate loops to speed
2293 # things up.
2294 # the alternative search directory is involked by --with-tkinclude
2295 #
2296 no_tk=true
2297 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
2298 # Check whether --with-tkinclude or --without-tkinclude was given.
2299 if test "${with_tkinclude+set}" = set; then
2300   withval="$with_tkinclude"
2301   with_tkinclude=${withval}
2302 fi
2303
2304 if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
2305   echo $ac_n "(cached) $ac_c" 1>&6
2306 else
2307   
2308 # first check to see if --with-tkinclude was specified
2309 if test x"${with_tkinclude}" != x ; then
2310   if test -f ${with_tkinclude}/tk.h ; then
2311     ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
2312   elif test -f ${with_tkinclude}/generic/tk.h ; then
2313     ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
2314   else
2315     { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
2316   fi
2317 fi
2318
2319 # next check if it came with Tk configuration file
2320 if test x"${ac_cv_c_tkconfig}" = x ; then
2321   if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
2322     ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
2323   fi
2324 fi
2325
2326 # next check in private source directory
2327 #
2328 # since ls returns lowest version numbers first, reverse its output
2329 if test x"${ac_cv_c_tkh}" = x ; then
2330   for i in \
2331                 ${srcdir}/../tk \
2332                 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
2333                 ${srcdir}/../../tk \
2334                 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
2335                 ${srcdir}/../../../tk \
2336                 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
2337     if test -f $i/generic/tk.h ; then
2338       ac_cv_c_tkh=`(cd $i/generic; pwd)`
2339       break
2340     fi
2341   done
2342 fi
2343 # finally check in a few common install locations
2344 #
2345 # since ls returns lowest version numbers first, reverse its output
2346 if test x"${ac_cv_c_tkh}" = x ; then
2347   for i in \
2348                 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
2349                 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
2350                 /usr/local/src/tk \
2351                 /usr/local/lib/tk \
2352                 ${prefix}/include ; do
2353     if test -f $i/generic/tk.h ; then
2354       ac_cv_c_tkh=`(cd $i/generic; pwd)`
2355       break
2356     fi
2357   done
2358 fi
2359 # see if one is installed
2360 if test x"${ac_cv_c_tkh}" = x ; then
2361    ac_safe=`echo "tk.h" | tr './\055' '___'`
2362 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
2363 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2364   echo $ac_n "(cached) $ac_c" 1>&6
2365 else
2366   cat > conftest.$ac_ext <<EOF
2367 #line 2368 "configure"
2368 #include "confdefs.h"
2369 #include <tk.h>
2370 EOF
2371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2372 { (eval echo configure:2373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2373 ac_err=`grep -v '^ *+' conftest.out`
2374 if test -z "$ac_err"; then
2375   rm -rf conftest*
2376   eval "ac_cv_header_$ac_safe=yes"
2377 else
2378   echo "$ac_err" >&5
2379   rm -rf conftest*
2380   eval "ac_cv_header_$ac_safe=no"
2381 fi
2382 rm -f conftest*
2383 fi
2384 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2385   echo "$ac_t""yes" 1>&6
2386   ac_cv_c_tkh=installed
2387 else
2388   echo "$ac_t""no" 1>&6
2389 ac_cv_c_tkh=""
2390 fi
2391
2392 fi
2393
2394 fi
2395
2396 if test x"${ac_cv_c_tkh}" != x ; then
2397   no_tk=""
2398   if test x"${ac_cv_c_tkh}" = x"installed" ; then
2399     echo "$ac_t""is installed" 1>&6
2400     TKHDIR=""
2401   else
2402     echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
2403     # this hack is cause the TKHDIR won't print if there is a "-I" in it.
2404     TKHDIR="-I${ac_cv_c_tkh}"
2405   fi
2406 else
2407   TKHDIR="# no Tk directory found"
2408   echo "configure: warning: Can't find Tk private headers" 1>&2
2409   no_tk=true
2410 fi
2411
2412
2413
2414
2415        # Include some libraries that Tcl and Tk want.
2416        LIBS="$LIBS $TK_LIBS"
2417
2418        ENABLE_GDBTK=1
2419
2420        TCL_LIBS='$(TCL) $(TK) $(X11_LDFLAGS) $(X11_LIBS)'
2421        ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS}"
2422        ENABLE_OBS="${ENABLE_OBS} gdbtk.o"
2423     fi
2424 fi
2425
2426
2427
2428
2429
2430 # end-sanitize-gdbtk
2431
2432
2433
2434
2435
2436 # target_subdir is used by the testsuite to find the target libraries.
2437 target_subdir=
2438 if test "${host}" != "${target}"; then
2439     target_subdir="${target_alias}/"
2440 fi
2441
2442
2443 configdirs="doc testsuite"
2444
2445
2446 # Map host cpu into the config cpu subdirectory name.
2447 # The default is $host_cpu.
2448
2449 case "${host_cpu}" in
2450
2451 c[12])                  gdb_host_cpu=convex ;;
2452 hppa*)                  gdb_host_cpu=pa ;;
2453 i[3456]86)              gdb_host_cpu=i386 ;;
2454 m68*)                   gdb_host_cpu=m68k ;;
2455 m88*)                   gdb_host_cpu=m88k ;;
2456 np1)                    gdb_host_cpu=gould ;;
2457 pyramid)                gdb_host_cpu=pyr ;;
2458 powerpc*)               gdb_host_cpu=powerpc ;;
2459 sparc64)                gdb_host_cpu=sparc ;;
2460 *)                      gdb_host_cpu=$host_cpu ;;
2461
2462 esac
2463
2464 # map host info into gdb names.
2465
2466 case "${host}" in
2467
2468 a29k-*-*)               gdb_host=ultra3 ;;
2469
2470 alpha-*-osf1*)          gdb_host=alpha-osf1 ;;
2471 alpha-*-osf2*)          gdb_host=alpha-osf2 ;;
2472 alpha-*-osf[3456789]*)  gdb_host=alpha-osf3 ;;
2473 alpha-*-linux*)         gdb_host=alpha-linux ;;
2474
2475 arm-*-*)                gdb_host=arm ;;
2476
2477 c[12]-*-*)              gdb_host=convex ;;
2478
2479 hppa*-*-bsd*)           gdb_host=hppabsd ;;
2480 hppa*-*-hiux*)          gdb_host=hppahpux ;;
2481 hppa*-*-hpux*)          gdb_host=hppahpux ;;
2482 hppa*-*-osf*)           gdb_host=hppaosf ;;
2483
2484 i[3456]86-ncr-*)        gdb_host=ncr3000 ;;
2485 i[3456]86-sequent-bsd*) gdb_host=symmetry ;;  # dynix
2486 i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;;
2487 i[3456]86-sequent-sysv*) gdb_host=ptx ;;
2488 i[3456]86-*-aix*)       gdb_host=i386aix ;;
2489 i[3456]86-*-bsd*)       gdb_host=i386bsd ;;
2490 i[3456]86-*-dgux*)      gdb_host=i386dgux ;;
2491 i[3456]86-*-freebsd*)   gdb_host=fbsd ;;
2492 i[3456]86-*-netbsd*)    gdb_host=nbsd ;;
2493 i[3456]86-*-go32*)      gdb_host=go32 ;;
2494 i[3456]86-*-linux*)     gdb_host=linux ;;
2495 i[3456]86-*-lynxos*)    gdb_host=i386lynx ;;
2496 i[3456]86-*-mach3*)     gdb_host=i386m3 ;;
2497 i[3456]86-*-mach*)      gdb_host=i386mach ;;
2498 i[3456]86-*-gnu*)       gdb_host=i386gnu ;;
2499 i[3456]86-*-osf1mk*)    gdb_host=osf1mk ;;
2500 i[3456]86-*-sco3.2v5*)  gdb_host=i386sco5 ;;
2501 i[3456]86-*-sco3.2v4*)  gdb_host=i386sco4 ;;
2502 i[3456]86-*-sco*)       gdb_host=i386sco ;;
2503 i[3456]86-*-solaris*)   gdb_host=i386sol2 ;;
2504 i[3456]86-*-sunos*)     gdb_host=sun386 ;;
2505 i[3456]86-*-sysv3.2*)   gdb_host=i386v32 ;;
2506 i[3456]86-*-sysv32*)    gdb_host=i386v32 ;;
2507 i[3456]86-*-sysv4*)     gdb_host=i386v4 ;;
2508 i[3456]86-*-unixware)   gdb_host=i386v4 ;;
2509 i[3456]86-*-sysv*)      gdb_host=i386v ;;
2510 i[3456]86-*-isc*)       gdb_host=i386v32 ;;
2511 i[3456]86-*-os9k)       gdb_host=i386os9k ;;
2512 i[3456]86-*-cygwin32)   gdb_host=cygwin32 ;;
2513 m680[01]0-sun-sunos3*)  gdb_host=sun2os3 ;;
2514 m680[01]0-sun-sunos4*)  gdb_host=sun2os4 ;;
2515 m68030-sony-*)          gdb_host=news1000 ;;
2516
2517 m68*-altos-*)           gdb_host=altos ;;
2518 m68*-apollo*-sysv*)     gdb_host=apollo68v ;;
2519 m68*-apollo*-bsd*)      gdb_host=apollo68b ;;
2520 m68*-att-*)             gdb_host=3b1 ;;
2521 m68*-bull*-sysv*)       gdb_host=dpx2 ;;
2522 m68*-hp-bsd*)           gdb_host=hp300bsd ;;
2523 m68*-hp-hpux*)          gdb_host=hp300hpux ;;
2524 m68*-isi-*)             gdb_host=isi ;;
2525 m68*-*-lynxos*)         gdb_host=m68klynx ;;
2526 m68*-*-netbsd*)         gdb_host=nbsd ;;
2527 m68*-*-sysv4*)          gdb_host=m68kv4 ;;
2528 m68*-motorola-*)        gdb_host=delta68 ;;
2529 m68*-sony-*)            gdb_host=news ;;
2530 m68*-sun-sunos3*)       gdb_host=sun3os3 ;;
2531 m68*-sun-sunos4*)       gdb_host=sun3os4 ;;
2532 m68*-sun-*)             gdb_host=sun3os4 ;;
2533
2534 m88*-harris-cxux*)      gdb_host=cxux ;;
2535 m88*-motorola-sysv4*)   gdb_host=delta88v4 ;;
2536 m88*-motorola-sysv*)    gdb_host=delta88 ;;
2537 m88*-*-mach3*)          gdb_host=mach3 ;;
2538 m88*-*-*)               gdb_host=m88k ;;
2539
2540 mips-dec-mach3*)        gdb_host=mach3 ;;
2541 mips-dec-*)             gdb_host=decstation ;;
2542 mips-little-*)          gdb_host=littlemips ;;
2543 mips-sgi-irix3*)        gdb_host=irix3 ;;
2544 mips-sgi-irix4*)        gdb_host=irix4 ;;
2545 mips-sgi-irix5*)        gdb_host=irix5 ;;
2546 mips-sony-*)            gdb_host=news-mips ;;
2547 mips-*-mach3*)          gdb_host=mach3 ;;
2548 mips-*-sysv4*)          gdb_host=mipsv4 ;;
2549 mips-*-sysv*)           gdb_host=riscos ;;
2550 mips-*-riscos*)         gdb_host=riscos ;;
2551
2552 none-*-*)               gdb_host=none ;;
2553
2554 np1-*-*)                gdb_host=np1 ;;
2555
2556 ns32k-*-mach3*)         gdb_host=mach3 ;;
2557 ns32k-*-netbsd*)        gdb_host=nbsd ;;
2558 ns32k-umax-*)           gdb_host=umax ;;
2559 ns32k-utek-sysv*)       gdb_host=merlin ;;
2560
2561 powerpc-*-aix*)         gdb_host=aix ;;
2562 powerpcle-*-cygwin32)   gdb_host=cygwin32 ;;
2563 powerpcle-*-solaris*)   gdb_host=solaris ;;
2564 powerpc-*-linux*)       gdb_host=linux ;;
2565 pn-*-*)                 gdb_host=pn ;;
2566
2567 pyramid-*-*)            gdb_host=pyramid ;;
2568
2569 romp-*-*)               gdb_host=rtbsd ;;
2570
2571 rs6000-*-lynxos*)       gdb_host=rs6000lynx ;;
2572 rs6000-*-aix4*)         gdb_host=aix4 ;;
2573 rs6000-*-*)             gdb_host=rs6000 ;;
2574
2575 sparc-*-lynxos*)        gdb_host=sparclynx ;;
2576 sparc-*-netbsd*)        gdb_host=nbsd ;;
2577 sparc-*-solaris2*)      gdb_host=sun4sol2 ;;
2578 sparc-*-sunos4*)        gdb_host=sun4os4 ;;
2579 sparc-*-sunos5*)        gdb_host=sun4sol2 ;;
2580 sparc-*-*)              gdb_host=sun4os4 ;;
2581 sparc64-*-*)            gdb_host=sun4sol2 ;;
2582
2583 tahoe-*-*)              gdb_host=tahoe ;;
2584
2585 vax-*-bsd*)             gdb_host=vaxbsd ;;
2586 vax-*-ultrix2*)         gdb_host=vaxult2 ;;
2587 vax-*-ultrix*)          gdb_host=vaxult ;;
2588
2589 w65-*-*)                gdb_host=w65 ;;
2590
2591 esac
2592
2593
2594 # Map target cpu into the config cpu subdirectory name.
2595 # The default is $target_cpu.
2596
2597 case "${target_cpu}" in
2598
2599 alpha)                  gdb_target_cpu=alpha ;;
2600 c[12])                  gdb_target_cpu=convex ;;
2601 hppa*)                  gdb_target_cpu=pa ;;
2602 i[3456]86)              gdb_target_cpu=i386 ;;
2603 m68*)                   gdb_target_cpu=m68k ;;
2604 m88*)                   gdb_target_cpu=m88k ;;
2605 mips*)                  gdb_target_cpu=mips ;;
2606 np1)                    gdb_target_cpu=gould ;;
2607 powerpc*)               gdb_target_cpu=powerpc ;;
2608 pn)                     gdb_target_cpu=gould ;;
2609 pyramid)                gdb_target_cpu=pyr ;;
2610 sparc*)                 gdb_target_cpu=sparc ;;
2611 *)                      gdb_target_cpu=$target_cpu ;;
2612
2613 esac
2614
2615 # map target info into gdb names.
2616
2617 case "${target}" in
2618
2619 a29k-*-aout*)           gdb_target=a29k ;;
2620 a29k-*-coff*)           gdb_target=a29k ;;
2621 a29k-*-elf*)            gdb_target=a29k ;;
2622 a29k-*-ebmon*)          gdb_target=a29k ;;
2623 a29k-*-kern*)           gdb_target=a29k-kern ;;
2624 a29k-*-none*)           gdb_target=a29k ;;
2625 a29k-*-sym1*)           gdb_target=ultra3 ;;
2626 a29k-*-udi*)            gdb_target=a29k-udi ;;
2627 a29k-*-vxworks*)        gdb_target=vx29k ;;
2628
2629 alpha-*-osf*)           gdb_target=alpha-osf1 ;;
2630 alpha-*-linux*)         gdb_target=alpha-linux ;;
2631
2632 # start-sanitize-arc
2633 arc-*-*)                gdb_target=arc ;;
2634 # end-sanitize-arc
2635
2636 arm-*-*)                gdb_target=arm ;;
2637
2638 c1-*-*)                 gdb_target=convex ;;
2639 c2-*-*)                 gdb_target=convex ;;
2640
2641 h8300-*-*)              gdb_target=h8300 ;;
2642 h8500-*-*)              gdb_target=h8500 ;;
2643
2644 sh-*-*)                 gdb_target=sh ;;
2645
2646 hppa*-*-bsd*)           gdb_target=hppabsd ;;
2647 hppa*-*-pro*)           gdb_target=hppapro ;;
2648 hppa*-*-hpux*)          gdb_target=hppahpux ;;
2649 hppa*-*-hiux*)          gdb_target=hppahpux ;;
2650 hppa*-*-osf*)           gdb_target=hppaosf ;;
2651
2652 i[3456]86-sequent-bsd*) gdb_target=symmetry ;;
2653 i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;;
2654 i[3456]86-sequent-sysv*) gdb_target=ptx ;;
2655 i[3456]86-ncr-*)        gdb_target=ncr3000 ;;
2656 i[3456]86-*-aout*)      gdb_target=i386aout ;;
2657 i[3456]86-*-coff*)      gdb_target=i386v ;;
2658 i[3456]86-*-elf*)       gdb_target=i386v ;;
2659 i[3456]86-*-aix*)       gdb_target=i386aix ;;
2660 i[3456]86-*-bsd*)       gdb_target=i386bsd ;;
2661 i[3456]86-*-freebsd*)   gdb_target=fbsd ;;
2662 i[3456]86-*-netbsd*)    gdb_target=nbsd ;;
2663 i[3456]86-*-os9k)       gdb_target=i386os9k ;;
2664 i[3456]86-*-go32*)      gdb_target=i386aout ;;
2665 i[3456]86-*-lynxos*)    gdb_target=i386lynx
2666                 configdirs="${configdirs} gdbserver" ;;
2667 i[3456]86-*-solaris*)   gdb_target=i386sol2 ;;
2668 i[3456]86-*-sunos*)     gdb_target=sun386 ;;
2669 i[3456]86-*-sysv4*)     gdb_target=i386v4 ;;
2670 i[3456]86-*-sco*)       gdb_target=i386v ;;
2671 i[3456]86-*-sysv*)      gdb_target=i386v ;;
2672 i[3456]86-*-linux*)     gdb_target=linux
2673                 configdirs="${configdirs} gdbserver" ;;
2674 i[3456]86-*-isc*)       gdb_target=i386v ;;
2675 i[3456]86-*-mach3*)     gdb_target=i386m3 ;;
2676 i[3456]86-*-mach*)      gdb_target=i386mach ;;
2677 i[3456]86-*-gnu*)       gdb_target=i386gnu ;;
2678 i[3456]86-*-netware*)   gdb_target=i386nw
2679                 configdirs="${configdirs} nlm" ;;
2680 i[3456]86-*-osf1mk*)    gdb_target=i386mk ;;
2681 i[3456]86-*-cygwin32)   gdb_target=cygwin32  ;;
2682 i960-*-bout*)           gdb_target=vxworks960 ;;
2683 i960-nindy-coff*)       gdb_target=nindy960 ;;
2684 i960-*-coff*)           gdb_target=mon960 ;;
2685 i960-nindy-elf*)        gdb_target=nindy960 ;;
2686 i960-*-elf*)            gdb_target=mon960 ;;
2687
2688 i960-*-nindy*)          gdb_target=nindy960 ;;
2689 i960-*-vxworks*)        gdb_target=vxworks960 ;;
2690
2691 m68000-*-sunos3*)       gdb_target=sun2os3 ;;
2692 m68000-*-sunos4*)       gdb_target=sun2os4 ;;
2693
2694 m68*-apollo*-bsd*)      gdb_target=apollo68b ;;
2695 m68*-bull-sysv*)        gdb_target=dpx2 ;;
2696 m68*-hp-bsd*)           gdb_target=hp300bsd ;;
2697 m68*-hp-hpux*)          gdb_target=hp300hpux ;;
2698 m68*-altos-*)           gdb_target=altos ;;
2699 m68*-att-*)             gdb_target=3b1 ;;
2700 m68*-cisco*-*)          gdb_target=cisco ;;
2701 m68*-ericsson-*)        gdb_target=es1800 ;;
2702 m68*-isi-*)             gdb_target=isi ;;
2703 m68*-motorola-*)        gdb_target=delta68 ;;
2704 m68*-netx-*)            gdb_target=vxworks68 ;;
2705 m68*-sony-*)            gdb_target=news ;;
2706 m68*-tandem-*)          gdb_target=st2000 ;;
2707 m68*-rom68k-*)          gdb_target=monitor ;;
2708 m68*-*bug-*)            gdb_target=monitor ;;
2709 m68*-monitor-*)         gdb_target=monitor ;;
2710 m68*-est-*)             gdb_target=monitor ;;
2711 m68*-*-aout*)           gdb_target=monitor ;;
2712 m68*-*-coff*)           gdb_target=monitor ;;
2713 m68*-*-elf*)            gdb_target=monitor ;;
2714 m68*-*-lynxos*)         gdb_target=m68klynx
2715                 configdirs="${configdirs} gdbserver" ;;
2716 m68*-*-netbsd*)         gdb_target=nbsd ;;
2717 m68*-*-os68k*)          gdb_target=os68k ;;
2718 m68*-*-sunos3*)         gdb_target=sun3os3 ;;
2719 m68*-*-sunos4*)         gdb_target=sun3os4 ;;
2720 m68*-*-sysv4*)          gdb_target=m68kv4 ;;
2721 m68*-*-vxworks*)        gdb_target=vxworks68 ;;
2722
2723 m88*-harris-cxux*)      gdb_target=cxux ;;
2724 m88*-motorola-sysv4*)   gdb_target=delta88v4 ;;
2725 m88*-*-mach3*)          gdb_target=mach3 ;;
2726 m88*-motorola-*)        gdb_target=delta88 ;;
2727 m88*-*-*)               gdb_target=m88k ;;
2728
2729 mips64*-big-*)          gdb_target=bigmips64 ;;
2730 mips*-big-*)            gdb_target=bigmips ;;
2731 mips*-dec-mach3*)       gdb_target=mach3 ;;
2732 mips*-dec-*)            gdb_target=decstation ;;
2733 mips64*el-*-ecoff*)     gdb_target=embedl64 ;;
2734 mips64*-*-ecoff*)       gdb_target=embed64 ;;
2735 mips64*vr4300*el-*-elf*)        gdb_target=vr4300el ;;
2736 mips64*vr4300*-*-elf*)  gdb_target=vr4300 ;;
2737 mips64*vr4100*el-*-elf*)        gdb_target=vr4300el ;;
2738 mips64*vr4100*-*-elf*)  gdb_target=vr4300 ;;
2739 mips64*el-*-elf*)       gdb_target=embedl64 ;;
2740 mips64*-*-elf*)         gdb_target=embed64 ;;
2741 mips*el-*-ecoff*)       gdb_target=embedl ;;
2742 mips*-*-ecoff*)         gdb_target=embed ;;
2743 # start-sanitize-gm
2744 mips*-*-magic*)         gdb_target=embed ;;
2745 # end-sanitize-gm
2746 mips*el-*-elf*)         gdb_target=embedl ;;
2747 mips*-*-elf*)           gdb_target=embed ;;
2748 mips*-little-*)         gdb_target=littlemips ;;
2749 mips*-sgi-irix5*)       gdb_target=irix5 ;;
2750 mips*-sgi-*)            gdb_target=irix3 ;;
2751 mips*-sony-*)           gdb_target=bigmips ;;
2752 mips*-*-mach3*)         gdb_target=mach3 ;;
2753 mips*-*-sysv4*)         gdb_target=mipsv4 ;;
2754 mips*-*-sysv*)          gdb_target=bigmips ;;
2755 mips*-*-riscos*)        gdb_target=bigmips ;;
2756 mips*-*-vxworks*)       gdb_target=vxmips ;;
2757
2758 none-*-*)               gdb_target=none ;;
2759
2760 np1-*-*)                gdb_target=np1 ;;
2761
2762 ns32k-*-mach3*)         gdb_target=mach3 ;;
2763 ns32k-*-netbsd*)        gdb_target=nbsd ;;
2764 ns32k-utek-sysv*)       gdb_target=merlin ;;
2765 ns32k-utek-*)           gdb_target=umax ;;
2766
2767 pn-*-*)                 gdb_target=pn ;;
2768 powerpc-*-macos*)       gdb_target=macos ;;
2769 powerpc-*-netware*)     gdb_target=ppc-nw
2770                         configdirs="${configdirs} nlm" ;;
2771
2772 powerpc-*-aix4*)        gdb_target=aix4 ;;
2773 powerpc-*-aix*)         gdb_target=aix ;;
2774 powerpcle-*-cygwin32)   gdb_target=cygwin32 ;;
2775 powerpcle-*-solaris*)   gdb_target=solaris ;;
2776 powerpc-*-eabi* | powerpc-*-linux* | powerpc-*-sysv* | powerpc-*-elf*)
2777                         if test x"$powerpc_sim" = x"yes"; then
2778                           gdb_target=ppc-sim
2779                         else
2780                           gdb_target=ppc-eabi
2781                         fi ;;
2782 powerpcle-*-eabi* | powerpcle-*-sysv* | powerpcle-*-elf*)
2783                         if test x"$powerpc_sim" = x"yes"; then
2784                           gdb_target=ppcle-sim
2785                         else
2786                           gdb_target=ppcle-eabi
2787                         fi ;;
2788
2789 pyramid-*-*)            gdb_target=pyramid ;;
2790
2791 rs6000-*-lynxos*)       gdb_target=rs6000lynx ;;
2792 rs6000-*-aix4*)         gdb_target=aix4 ;;
2793 rs6000-*-*)             gdb_target=rs6000 ;;
2794
2795 sparc-*-aout*)          gdb_target=sparc-em ;;
2796 sparc-*-coff*)          gdb_target=sparc-em ;;
2797 sparc-*-elf*)           gdb_target=sparc-em ;;
2798 sparc-*-lynxos*)        gdb_target=sparclynx
2799                 configdirs="${configdirs} gdbserver" ;;
2800 sparc-*-netbsd*)        gdb_target=nbsd ;;
2801 sparc-*-solaris2*)      gdb_target=sun4sol2 ;;
2802 sparc-*-sunos4*)        gdb_target=sun4os4 ;;
2803 sparc-*-sunos5*)        gdb_target=sun4sol2 ;;
2804 sparc-*-vxworks*)       gdb_target=vxsparc ;;
2805 sparc-*-*)              gdb_target=sun4os4 ;;
2806 sparclet-*-*)           gdb_target=sparclet;;
2807 sparclite*-*-*)         gdb_target=sparclite ;;
2808 # It's not clear what the right solution for "v8plus" systems is yet.
2809 # For now, stick with sparc-sun-solaris2 since that's what config.guess
2810 # should return.  Work is still needed to get gdb to print the 64 bit
2811 # regs (some of which are usable in v8plus) so sp64sol.mt hasn't been
2812 # deleted though presumably it should be eventually.
2813 #sparc64-*-solaris2*)   gdb_target=sp64sol2 ;;
2814 sparc64-*-*)            gdb_target=sp64 ;;
2815
2816 tahoe-*-*)              gdb_target=tahoe ;;
2817
2818 vax-*-*)                gdb_target=vax ;;
2819
2820 w65-*-*)                gdb_target=w65 ;;
2821
2822 z8k-*-coff*)            gdb_target=z8k ;;
2823
2824 esac
2825
2826
2827 frags=
2828 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
2829 if test ! -f ${host_makefile_frag}; then
2830 { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
2831 fi
2832 frags="$frags $host_makefile_frag"
2833
2834 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
2835 if test ! -f ${target_makefile_frag}; then
2836 { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
2837 fi
2838 frags="$frags $target_makefile_frag"
2839
2840
2841
2842
2843
2844 hostfile=`sed -n '
2845 s/XM_FILE[      ]*=[    ]*\([^  ]*\)/\1/p
2846 ' ${host_makefile_frag}`
2847
2848 targetfile=`sed -n '
2849 s/TM_FILE[      ]*=[    ]*\([^  ]*\)/\1/p
2850 ' ${target_makefile_frag}`
2851
2852 # these really aren't orthogonal true/false values of the same condition,
2853 # but shells are slow enough that I like to reuse the test conditions
2854 # whenever possible
2855 if test "${target}" = "${host}"; then
2856 nativefile=`sed -n '
2857 s/NAT_FILE[     ]*=[    ]*\([^  ]*\)/\1/p
2858 ' ${host_makefile_frag}`
2859 else
2860 # GDBserver is only useful in a "native" enviroment
2861 configdirs=`echo $configdirs | sed 's/gdbserver//'`
2862 fi
2863
2864
2865 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
2866 # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
2867 # corresponding links.  But we have to remove the xm.h files and tm.h
2868 # files anyway, e.g. when switching from "configure host" to
2869 # "configure none".
2870
2871 files=
2872 links=
2873 rm -f xm.h
2874 if test "${hostfile}" != ""; then
2875 files="${files} config/${gdb_host_cpu}/${hostfile}"
2876 links="${links} xm.h"
2877 fi
2878 rm -f tm.h
2879 if test "${targetfile}" != ""; then
2880 files="${files} config/${gdb_target_cpu}/${targetfile}"
2881 links="${links} tm.h"
2882 fi
2883 rm -f nm.h
2884 if test "${nativefile}" != ""; then
2885 files="${files} config/${gdb_host_cpu}/${nativefile}"
2886 links="${links} nm.h"
2887 else
2888 # A cross-only configuration.
2889 files="${files} config/nm-empty.h"
2890 links="${links} nm.h"
2891 fi
2892 # start-sanitize-gdbtk
2893
2894 # Make it possible to use the GUI without doing a full install
2895 if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then
2896 files="${files} gdbtk.tcl"
2897 links="${links} gdbtk.tcl"
2898 fi
2899 # end-sanitize-gdbtk
2900
2901
2902
2903 subdirs="$configdirs"
2904
2905 trap '' 1 2 15
2906 cat > confcache <<\EOF
2907 # This file is a shell script that caches the results of configure
2908 # tests run on this system so they can be shared between configure
2909 # scripts and configure runs.  It is not useful on other systems.
2910 # If it contains results you don't want to keep, you may remove or edit it.
2911 #
2912 # By default, configure uses ./config.cache as the cache file,
2913 # creating it if it does not exist already.  You can give configure
2914 # the --cache-file=FILE option to use a different cache file; that is
2915 # what configure does when it calls configure scripts in
2916 # subdirectories, so they share the cache.
2917 # Giving --cache-file=/dev/null disables caching, for debugging configure.
2918 # config.status only pays attention to the cache file if you give it the
2919 # --recheck option to rerun configure.
2920 #
2921 EOF
2922 # Ultrix sh set writes to stderr and can't be redirected directly,
2923 # and sets the high bit in the cache file unless we assign to the vars.
2924 (set) 2>&1 |
2925   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2926   >> confcache
2927 if cmp -s $cache_file confcache; then
2928   :
2929 else
2930   if test -w $cache_file; then
2931     echo "updating cache $cache_file"
2932     cat confcache > $cache_file
2933   else
2934     echo "not updating unwritable cache $cache_file"
2935   fi
2936 fi
2937 rm -f confcache
2938
2939 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2940
2941 test "x$prefix" = xNONE && prefix=$ac_default_prefix
2942 # Let make expand exec_prefix.
2943 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2944
2945 # Any assignment to VPATH causes Sun make to only execute
2946 # the first set of double-colon rules, so remove it if not needed.
2947 # If there is a colon in the path, we need to keep it.
2948 if test "x$srcdir" = x.; then
2949   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
2950 fi
2951
2952 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2953
2954 DEFS=-DHAVE_CONFIG_H
2955
2956 # Without the "./", some shells look in PATH for config.status.
2957 : ${CONFIG_STATUS=./config.status}
2958
2959 echo creating $CONFIG_STATUS
2960 rm -f $CONFIG_STATUS
2961 cat > $CONFIG_STATUS <<EOF
2962 #! /bin/sh
2963 # Generated automatically by configure.
2964 # Run this file to recreate the current configuration.
2965 # This directory was configured as follows,
2966 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2967 #
2968 # $0 $ac_configure_args
2969 #
2970 # Compiler output produced by configure, useful for debugging
2971 # configure, is in ./config.log if it exists.
2972
2973 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2974 for ac_option
2975 do
2976   case "\$ac_option" in
2977   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2978     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2979     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2980   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2981     echo "$CONFIG_STATUS generated by autoconf version 2.10"
2982     exit 0 ;;
2983   -help | --help | --hel | --he | --h)
2984     echo "\$ac_cs_usage"; exit 0 ;;
2985   *) echo "\$ac_cs_usage"; exit 1 ;;
2986   esac
2987 done
2988
2989 ac_given_srcdir=$srcdir
2990 ac_given_INSTALL="$INSTALL"
2991
2992 trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2993 EOF
2994 cat >> $CONFIG_STATUS <<EOF
2995
2996 # Protect against being on the right side of a sed subst in config.status.
2997 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
2998  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
2999 $ac_vpsub
3000 $extrasub
3001 s%@CFLAGS@%$CFLAGS%g
3002 s%@CPPFLAGS@%$CPPFLAGS%g
3003 s%@CXXFLAGS@%$CXXFLAGS%g
3004 s%@DEFS@%$DEFS%g
3005 s%@LDFLAGS@%$LDFLAGS%g
3006 s%@LIBS@%$LIBS%g
3007 s%@exec_prefix@%$exec_prefix%g
3008 s%@prefix@%$prefix%g
3009 s%@program_transform_name@%$program_transform_name%g
3010 s%@bindir@%$bindir%g
3011 s%@sbindir@%$sbindir%g
3012 s%@libexecdir@%$libexecdir%g
3013 s%@datadir@%$datadir%g
3014 s%@sysconfdir@%$sysconfdir%g
3015 s%@sharedstatedir@%$sharedstatedir%g
3016 s%@localstatedir@%$localstatedir%g
3017 s%@libdir@%$libdir%g
3018 s%@includedir@%$includedir%g
3019 s%@oldincludedir@%$oldincludedir%g
3020 s%@infodir@%$infodir%g
3021 s%@mandir@%$mandir%g
3022 s%@CC@%$CC%g
3023 s%@CPP@%$CPP%g
3024 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3025 s%@INSTALL_DATA@%$INSTALL_DATA%g
3026 s%@host@%$host%g
3027 s%@host_alias@%$host_alias%g
3028 s%@host_cpu@%$host_cpu%g
3029 s%@host_vendor@%$host_vendor%g
3030 s%@host_os@%$host_os%g
3031 s%@build@%$build%g
3032 s%@build_alias@%$build_alias%g
3033 s%@build_cpu@%$build_cpu%g
3034 s%@build_vendor@%$build_vendor%g
3035 s%@build_os@%$build_os%g
3036 s%@AR@%$AR%g
3037 s%@RANLIB@%$RANLIB%g
3038 s%@YACC@%$YACC%g
3039 s%@AWK@%$AWK%g
3040 s%@target@%$target%g
3041 s%@target_alias@%$target_alias%g
3042 s%@target_cpu@%$target_cpu%g
3043 s%@target_vendor@%$target_vendor%g
3044 s%@target_os@%$target_os%g
3045 s%@THREAD_DB_OBS@%$THREAD_DB_OBS%g
3046 s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
3047 s%@TCL_VERSION@%$TCL_VERSION%g
3048 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
3049 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
3050 s%@TCL_CC@%$TCL_CC%g
3051 s%@TCL_DEFS@%$TCL_DEFS%g
3052 s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
3053 s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
3054 s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
3055 s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
3056 s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
3057 s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
3058 s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
3059 s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
3060 s%@TCL_RANLIB@%$TCL_RANLIB%g
3061 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
3062 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
3063 s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
3064 s%@TK_VERSION@%$TK_VERSION%g
3065 s%@TK_DEFS@%$TK_DEFS%g
3066 s%@TK_XINCLUDES@%$TK_XINCLUDES%g
3067 s%@TK_XLIBSW@%$TK_XLIBSW%g
3068 s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
3069 s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
3070 s%@TCLHDIR@%$TCLHDIR%g
3071 s%@TKHDIR@%$TKHDIR%g
3072 s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g
3073 s%@X_CFLAGS@%$X_CFLAGS%g
3074 s%@X_LDFLAGS@%$X_LDFLAGS%g
3075 s%@X_LIBS@%$X_LIBS%g
3076 s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
3077 s%@ENABLE_CLIBS@%$ENABLE_CLIBS%g
3078 s%@ENABLE_OBS@%$ENABLE_OBS%g
3079 s%@target_subdir@%$target_subdir%g
3080 /@host_makefile_frag@/r $host_makefile_frag
3081 s%@host_makefile_frag@%%g
3082 /@target_makefile_frag@/r $target_makefile_frag
3083 s%@target_makefile_frag@%%g
3084 s%@frags@%$frags%g
3085 s%@subdirs@%$subdirs%g
3086
3087 CEOF
3088 EOF
3089 cat >> $CONFIG_STATUS <<EOF
3090
3091 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
3092 EOF
3093 cat >> $CONFIG_STATUS <<\EOF
3094 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3095   # Support "outfile[:infile]", defaulting infile="outfile.in".
3096   case "$ac_file" in
3097   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3098        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3099   *) ac_file_in="${ac_file}.in" ;;
3100   esac
3101
3102   # Adjust relative srcdir, etc. for subdirectories.
3103
3104   # Remove last slash and all that follows it.  Not all systems have dirname.
3105   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3106   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3107     # The file is in a subdirectory.
3108     test ! -d "$ac_dir" && mkdir "$ac_dir"
3109     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3110     # A "../" for each directory in $ac_dir_suffix.
3111     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3112   else
3113     ac_dir_suffix= ac_dots=
3114   fi
3115
3116   case "$ac_given_srcdir" in
3117   .)  srcdir=.
3118       if test -z "$ac_dots"; then top_srcdir=.
3119       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3120   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3121   *) # Relative path.
3122     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3123     top_srcdir="$ac_dots$ac_given_srcdir" ;;
3124   esac
3125
3126   case "$ac_given_INSTALL" in
3127   [/$]*) INSTALL="$ac_given_INSTALL" ;;
3128   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3129   esac
3130   echo creating "$ac_file"
3131   rm -f "$ac_file"
3132   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3133   case "$ac_file" in
3134   *Makefile*) ac_comsub="1i\\
3135 # $configure_input" ;;
3136   *) ac_comsub= ;;
3137   esac
3138   sed -e "$ac_comsub
3139 s%@configure_input@%$configure_input%g
3140 s%@srcdir@%$srcdir%g
3141 s%@top_srcdir@%$top_srcdir%g
3142 s%@INSTALL@%$INSTALL%g
3143 " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
3144 fi; done
3145 rm -f conftest.subs
3146
3147 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3148 # NAME is the cpp macro being defined and VALUE is the value it is being given.
3149 #
3150 # ac_d sets the value in "#define NAME VALUE" lines.
3151 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
3152 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
3153 ac_dC='\3'
3154 ac_dD='%g'
3155 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3156 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3157 ac_uB='\([      ]\)%\1#\2define\3'
3158 ac_uC=' '
3159 ac_uD='\4%g'
3160 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3161 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
3162 ac_eB='$%\1#\2define\3'
3163 ac_eC=' '
3164 ac_eD='%g'
3165
3166 CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"}
3167 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3168   # Support "outfile[:infile]", defaulting infile="outfile.in".
3169   case "$ac_file" in
3170   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3171        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3172   *) ac_file_in="${ac_file}.in" ;;
3173   esac
3174
3175   echo creating $ac_file
3176
3177   rm -f conftest.frag conftest.in conftest.out
3178   cp $ac_given_srcdir/$ac_file_in conftest.in
3179
3180 EOF
3181
3182 # Transform confdefs.h into a sed script conftest.vals that substitutes
3183 # the proper values into config.h.in to produce config.h.  And first:
3184 # Protect against being on the right side of a sed subst in config.status.
3185 # Protect against being in an unquoted here document in config.status.
3186 rm -f conftest.vals
3187 cat > conftest.hdr <<\EOF
3188 s/[\\&%]/\\&/g
3189 s%[\\$`]%\\&%g
3190 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
3191 s%ac_d%ac_u%gp
3192 s%ac_u%ac_e%gp
3193 EOF
3194 sed -n -f conftest.hdr confdefs.h > conftest.vals
3195 rm -f conftest.hdr
3196
3197 # This sed command replaces #undef with comments.  This is necessary, for
3198 # example, in the case of _POSIX_SOURCE, which is predefined and required
3199 # on some systems where configure will not decide to define it.
3200 cat >> conftest.vals <<\EOF
3201 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3202 EOF
3203
3204 # Break up conftest.vals because some shells have a limit on
3205 # the size of here documents, and old seds have small limits too.
3206 # Maximum number of lines to put in a single here document.
3207 ac_max_here_lines=12
3208
3209 rm -f conftest.tail
3210 while :
3211 do
3212   ac_lines=`grep -c . conftest.vals`
3213   # grep -c gives empty output for an empty file on some AIX systems.
3214   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3215   # Write a limited-size here document to conftest.frag.
3216   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3217   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3218   echo 'CEOF
3219   sed -f conftest.frag conftest.in > conftest.out
3220   rm -f conftest.in
3221   mv conftest.out conftest.in
3222 ' >> $CONFIG_STATUS
3223   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3224   rm -f conftest.vals
3225   mv conftest.tail conftest.vals
3226 done
3227 rm -f conftest.vals
3228
3229 cat >> $CONFIG_STATUS <<\EOF
3230   rm -f conftest.frag conftest.h
3231   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
3232   cat conftest.in >> conftest.h
3233   rm -f conftest.in
3234   if cmp -s $ac_file conftest.h 2>/dev/null; then
3235     echo "$ac_file is unchanged"
3236     rm -f conftest.h
3237   else
3238     # Remove last slash and all that follows it.  Not all systems have dirname.
3239       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3240       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3241       # The file is in a subdirectory.
3242       test ! -d "$ac_dir" && mkdir "$ac_dir"
3243     fi
3244     rm -f $ac_file
3245     mv conftest.h $ac_file
3246   fi
3247 fi; done
3248
3249 EOF
3250
3251 cat >> $CONFIG_STATUS <<EOF
3252 ac_sources="$files"
3253 ac_dests="$links"
3254 EOF
3255
3256 cat >> $CONFIG_STATUS <<\EOF
3257 srcdir=$ac_given_srcdir
3258 while test -n "$ac_sources"; do
3259   set $ac_dests; ac_dest=$1; shift; ac_dests=$*
3260   set $ac_sources; ac_source=$1; shift; ac_sources=$*
3261
3262   echo "linking $srcdir/$ac_source to $ac_dest"
3263
3264   if test ! -r $srcdir/$ac_source; then
3265     { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
3266   fi
3267   rm -f $ac_dest
3268
3269   # Make relative symlinks.
3270   # Remove last slash and all that follows it.  Not all systems have dirname.
3271   ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
3272   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
3273     # The dest file is in a subdirectory.
3274     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
3275     ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
3276     # A "../" for each directory in $ac_dest_dir_suffix.
3277     ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
3278   else
3279     ac_dest_dir_suffix= ac_dots=
3280   fi
3281
3282   case "$srcdir" in
3283   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
3284   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
3285   esac
3286
3287   # Make a symlink if possible; otherwise try a hard link.
3288   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
3289     ln $srcdir/$ac_source $ac_dest; then :
3290   else
3291     { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
3292   fi
3293 done
3294 EOF
3295 cat >> $CONFIG_STATUS <<EOF
3296
3297 gdb_host_cpu=$gdb_host_cpu
3298 gdb_target_cpu=$gdb_target_cpu
3299 nativefile=$nativefile
3300
3301 EOF
3302 cat >> $CONFIG_STATUS <<\EOF
3303
3304 if test "${nativefile}" = ""; then
3305 sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
3306         < Makefile > Makefile.tem
3307 mv -f Makefile.tem Makefile
3308 fi
3309
3310 sed -e '/^TM_FILE[      ]*=/s,^TM_FILE[         ]*=[    ]*,&config/'"${gdb_target_cpu}"'/,
3311 /^XM_FILE[      ]*=/s,^XM_FILE[         ]*=[    ]*,&config/'"${gdb_host_cpu}"'/,
3312 /^NAT_FILE[     ]*=/s,^NAT_FILE[        ]*=[    ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
3313 mv -f Makefile.tmp Makefile
3314
3315 case ${srcdir} in
3316 .)
3317 ;;
3318 *)
3319 grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
3320 echo "source ${srcdir}/.gdbinit" >> .gdbinit
3321 esac
3322
3323 case x$CONFIG_HEADERS in
3324 xconfig.h:config.in)
3325 echo > stamp-h ;;
3326 esac
3327
3328 exit 0
3329 EOF
3330 chmod +x $CONFIG_STATUS
3331 rm -fr confdefs* $ac_clean_files
3332 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3333
3334 if test "$no_recursion" != yes; then
3335
3336   # Remove --cache-file and --srcdir arguments so they do not pile up.
3337   ac_sub_configure_args=
3338   ac_prev=
3339   for ac_arg in $ac_configure_args; do
3340     if test -n "$ac_prev"; then
3341       ac_prev=
3342       continue
3343     fi
3344     case "$ac_arg" in
3345     -cache-file | --cache-file | --cache-fil | --cache-fi \
3346     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3347       ac_prev=cache_file ;;
3348     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3349     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3350       ;;
3351     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3352       ac_prev=srcdir ;;
3353     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3354       ;;
3355     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3356     esac
3357   done
3358
3359   for ac_config_dir in $configdirs; do
3360
3361     # Do not complain, so a configure script can configure whichever
3362     # parts of a large source tree are present.
3363     if test ! -d $srcdir/$ac_config_dir; then
3364       continue
3365     fi
3366
3367     echo configuring in $ac_config_dir
3368
3369     case "$srcdir" in
3370     .) ;;
3371     *)
3372       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3373       else
3374         { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3375       fi
3376       ;;
3377     esac
3378
3379     ac_popdir=`pwd`
3380     cd $ac_config_dir
3381
3382     case "$srcdir" in
3383     .) # No --srcdir option.  We are building in place.
3384       ac_sub_srcdir=$srcdir ;;
3385     /*) # Absolute path.
3386       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3387     *) # Relative path.
3388       ac_sub_srcdir=../$srcdir/$ac_config_dir ;;
3389     esac
3390
3391     # Check for guested configure; otherwise get Cygnus style configure.
3392     if test -f $ac_sub_srcdir/configure; then
3393       ac_sub_configure=$ac_sub_srcdir/configure
3394     elif test -f $ac_sub_srcdir/configure.in; then
3395       ac_sub_configure=$ac_configure
3396     else
3397       echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3398       ac_sub_configure=
3399     fi
3400
3401     # The recursion is here.
3402     if test -n "$ac_sub_configure"; then
3403
3404       # Make the cache file name correct relative to the subdirectory.
3405       # A "../" for each directory in /$ac_config_dir.
3406       ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3407       case "$cache_file" in
3408       /*) ac_sub_cache_file=$cache_file ;;
3409       *) # Relative path.
3410         ac_sub_cache_file="$ac_dots$cache_file" ;;
3411       esac
3412   case "$ac_given_INSTALL" in
3413         [/$]*) INSTALL="$ac_given_INSTALL" ;;
3414         *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3415         esac
3416
3417       echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3418       # The eval makes quoting arguments work.
3419       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3420       then :
3421       else
3422         { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3423       fi
3424     fi
3425
3426     cd $ac_popdir
3427   done
3428 fi
3429
3430
3431 exit 0
3432