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