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