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