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