* configure.in: Move termcap determination a later in the file to catch
[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.13
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 --disable-nls do not use Native Language Support"
16 ac_help="$ac_help
17 --with-included-gettext use the GNU gettext library included here"
18 ac_help="$ac_help
19 --enable-tui Enable full-screen terminal user interface"
20 ac_help="$ac_help
21 --enable-netrom Enable NetROM support"
22 ac_help="$ac_help
23 --enable-build-warnings Enable build-time compiler warnings if gcc is used"
24 ac_help="$ac_help
25 --with-mmalloc Use memory mapped malloc package"
26 ac_help="$ac_help
27 --enable-carp Configure alternative readaptive paradigm "
28 ac_help="$ac_help
29 --enable-targets alternative target configurations"
30 ac_help="$ac_help
31 --enable-ide Enable IDE support"
32 ac_help="$ac_help
33 --with-foundry-libs=DIR Use the Foundry SDK in DIR"
34 ac_help="$ac_help
35 --with-cpu=CPU set the default CPU variant to debug"
36 ac_help="$ac_help
37 --enable-gdbtk Enable GDBTK GUI front end"
38 ac_help="$ac_help
39 --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)"
40 ac_help="$ac_help
41 --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)"
42 ac_help="$ac_help
43 --with-tclinclude=DIR Directory where tcl private headers are"
44 ac_help="$ac_help
45 --with-tkinclude=DIR Directory where tk private headers are"
46 ac_help="$ac_help
47 --with-itclconfig directory containing itcl configuration (itclConfig.sh)"
48 ac_help="$ac_help
49 --with-itkconfig directory containing itk configuration (itkConfig.sh)"
50 ac_help="$ac_help
51 --with-x use the X Window System"
52 ac_help="$ac_help
53 --with-sim-gpu2=DIR Use GPU2 library under given DIR"
54 ac_help="$ac_help
55 --with-sim-funit=DIR Use target FP lib under given DIR"
56 ac_help="$ac_help
57 --enable-shared Use shared libraries"
58
59 # Initialize some variables set by options.
60 # The variables have the same names as the options, with
61 # dashes changed to underlines.
62 build=NONE
63 cache_file=./config.cache
64 exec_prefix=NONE
65 host=NONE
66 no_create=
67 nonopt=NONE
68 no_recursion=
69 prefix=NONE
70 program_prefix=NONE
71 program_suffix=NONE
72 program_transform_name=s,x,x,
73 silent=
74 site=
75 srcdir=
76 target=NONE
77 verbose=
78 x_includes=NONE
79 x_libraries=NONE
80 bindir='${exec_prefix}/bin'
81 sbindir='${exec_prefix}/sbin'
82 libexecdir='${exec_prefix}/libexec'
83 datadir='${prefix}/share'
84 sysconfdir='${prefix}/etc'
85 sharedstatedir='${prefix}/com'
86 localstatedir='${prefix}/var'
87 libdir='${exec_prefix}/lib'
88 includedir='${prefix}/include'
89 oldincludedir='/usr/include'
90 infodir='${prefix}/info'
91 mandir='${prefix}/man'
92
93 # Initialize some other variables.
94 subdirs=
95 MFLAGS= MAKEFLAGS=
96 SHELL=${CONFIG_SHELL-/bin/sh}
97 # Maximum number of lines to put in a shell here document.
98 ac_max_here_lines=12
99
100 ac_prev=
101 for ac_option
102 do
103
104 # If the previous option needs an argument, assign it.
105 if test -n "$ac_prev"; then
106 eval "$ac_prev=\$ac_option"
107 ac_prev=
108 continue
109 fi
110
111 case "$ac_option" in
112 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
113 *) ac_optarg= ;;
114 esac
115
116 # Accept the important Cygnus configure options, so we can diagnose typos.
117
118 case "$ac_option" in
119
120 -bindir | --bindir | --bindi | --bind | --bin | --bi)
121 ac_prev=bindir ;;
122 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
123 bindir="$ac_optarg" ;;
124
125 -build | --build | --buil | --bui | --bu)
126 ac_prev=build ;;
127 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
128 build="$ac_optarg" ;;
129
130 -cache-file | --cache-file | --cache-fil | --cache-fi \
131 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
132 ac_prev=cache_file ;;
133 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
134 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
135 cache_file="$ac_optarg" ;;
136
137 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
138 ac_prev=datadir ;;
139 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
140 | --da=*)
141 datadir="$ac_optarg" ;;
142
143 -disable-* | --disable-*)
144 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
145 # Reject names that are not valid shell variable names.
146 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
147 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
148 fi
149 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
150 eval "enable_${ac_feature}=no" ;;
151
152 -enable-* | --enable-*)
153 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
154 # Reject names that are not valid shell variable names.
155 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
156 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
157 fi
158 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
159 case "$ac_option" in
160 *=*) ;;
161 *) ac_optarg=yes ;;
162 esac
163 eval "enable_${ac_feature}='$ac_optarg'" ;;
164
165 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
166 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
167 | --exec | --exe | --ex)
168 ac_prev=exec_prefix ;;
169 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
170 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
171 | --exec=* | --exe=* | --ex=*)
172 exec_prefix="$ac_optarg" ;;
173
174 -gas | --gas | --ga | --g)
175 # Obsolete; use --with-gas.
176 with_gas=yes ;;
177
178 -help | --help | --hel | --he)
179 # Omit some internal or obsolete options to make the list less imposing.
180 # This message is too long to be a string in the A/UX 3.1 sh.
181 cat << EOF
182 Usage: configure [options] [host]
183 Options: [defaults in brackets after descriptions]
184 Configuration:
185 --cache-file=FILE cache test results in FILE
186 --help print this message
187 --no-create do not create output files
188 --quiet, --silent do not print \`checking...' messages
189 --version print the version of autoconf that created configure
190 Directory and file names:
191 --prefix=PREFIX install architecture-independent files in PREFIX
192 [$ac_default_prefix]
193 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
194 [same as prefix]
195 --bindir=DIR user executables in DIR [EPREFIX/bin]
196 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
197 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
198 --datadir=DIR read-only architecture-independent data in DIR
199 [PREFIX/share]
200 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
201 --sharedstatedir=DIR modifiable architecture-independent data in DIR
202 [PREFIX/com]
203 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
204 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
205 --includedir=DIR C header files in DIR [PREFIX/include]
206 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
207 --infodir=DIR info documentation in DIR [PREFIX/info]
208 --mandir=DIR man documentation in DIR [PREFIX/man]
209 --srcdir=DIR find the sources in DIR [configure dir or ..]
210 --program-prefix=PREFIX prepend PREFIX to installed program names
211 --program-suffix=SUFFIX append SUFFIX to installed program names
212 --program-transform-name=PROGRAM
213 run sed PROGRAM on installed program names
214 EOF
215 cat << EOF
216 Host type:
217 --build=BUILD configure for building on BUILD [BUILD=HOST]
218 --host=HOST configure for HOST [guessed]
219 --target=TARGET configure for TARGET [TARGET=HOST]
220 Features and packages:
221 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
222 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
223 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
224 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
225 --x-includes=DIR X include files are in DIR
226 --x-libraries=DIR X library files are in DIR
227 EOF
228 if test -n "$ac_help"; then
229 echo "--enable and --with options recognized:$ac_help"
230 fi
231 exit 0 ;;
232
233 -host | --host | --hos | --ho)
234 ac_prev=host ;;
235 -host=* | --host=* | --hos=* | --ho=*)
236 host="$ac_optarg" ;;
237
238 -includedir | --includedir | --includedi | --included | --include \
239 | --includ | --inclu | --incl | --inc)
240 ac_prev=includedir ;;
241 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
242 | --includ=* | --inclu=* | --incl=* | --inc=*)
243 includedir="$ac_optarg" ;;
244
245 -infodir | --infodir | --infodi | --infod | --info | --inf)
246 ac_prev=infodir ;;
247 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
248 infodir="$ac_optarg" ;;
249
250 -libdir | --libdir | --libdi | --libd)
251 ac_prev=libdir ;;
252 -libdir=* | --libdir=* | --libdi=* | --libd=*)
253 libdir="$ac_optarg" ;;
254
255 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
256 | --libexe | --libex | --libe)
257 ac_prev=libexecdir ;;
258 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
259 | --libexe=* | --libex=* | --libe=*)
260 libexecdir="$ac_optarg" ;;
261
262 -localstatedir | --localstatedir | --localstatedi | --localstated \
263 | --localstate | --localstat | --localsta | --localst \
264 | --locals | --local | --loca | --loc | --lo)
265 ac_prev=localstatedir ;;
266 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
267 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
268 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
269 localstatedir="$ac_optarg" ;;
270
271 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
272 ac_prev=mandir ;;
273 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
274 mandir="$ac_optarg" ;;
275
276 -nfp | --nfp | --nf)
277 # Obsolete; use --without-fp.
278 with_fp=no ;;
279
280 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
281 | --no-cr | --no-c)
282 no_create=yes ;;
283
284 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
285 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
286 no_recursion=yes ;;
287
288 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
289 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
290 | --oldin | --oldi | --old | --ol | --o)
291 ac_prev=oldincludedir ;;
292 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
293 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
294 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
295 oldincludedir="$ac_optarg" ;;
296
297 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
298 ac_prev=prefix ;;
299 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
300 prefix="$ac_optarg" ;;
301
302 -program-prefix | --program-prefix | --program-prefi | --program-pref \
303 | --program-pre | --program-pr | --program-p)
304 ac_prev=program_prefix ;;
305 -program-prefix=* | --program-prefix=* | --program-prefi=* \
306 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
307 program_prefix="$ac_optarg" ;;
308
309 -program-suffix | --program-suffix | --program-suffi | --program-suff \
310 | --program-suf | --program-su | --program-s)
311 ac_prev=program_suffix ;;
312 -program-suffix=* | --program-suffix=* | --program-suffi=* \
313 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
314 program_suffix="$ac_optarg" ;;
315
316 -program-transform-name | --program-transform-name \
317 | --program-transform-nam | --program-transform-na \
318 | --program-transform-n | --program-transform- \
319 | --program-transform | --program-transfor \
320 | --program-transfo | --program-transf \
321 | --program-trans | --program-tran \
322 | --progr-tra | --program-tr | --program-t)
323 ac_prev=program_transform_name ;;
324 -program-transform-name=* | --program-transform-name=* \
325 | --program-transform-nam=* | --program-transform-na=* \
326 | --program-transform-n=* | --program-transform-=* \
327 | --program-transform=* | --program-transfor=* \
328 | --program-transfo=* | --program-transf=* \
329 | --program-trans=* | --program-tran=* \
330 | --progr-tra=* | --program-tr=* | --program-t=*)
331 program_transform_name="$ac_optarg" ;;
332
333 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
334 | -silent | --silent | --silen | --sile | --sil)
335 silent=yes ;;
336
337 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
338 ac_prev=sbindir ;;
339 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
340 | --sbi=* | --sb=*)
341 sbindir="$ac_optarg" ;;
342
343 -sharedstatedir | --sharedstatedir | --sharedstatedi \
344 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
345 | --sharedst | --shareds | --shared | --share | --shar \
346 | --sha | --sh)
347 ac_prev=sharedstatedir ;;
348 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
349 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
350 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
351 | --sha=* | --sh=*)
352 sharedstatedir="$ac_optarg" ;;
353
354 -site | --site | --sit)
355 ac_prev=site ;;
356 -site=* | --site=* | --sit=*)
357 site="$ac_optarg" ;;
358
359 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
360 ac_prev=srcdir ;;
361 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
362 srcdir="$ac_optarg" ;;
363
364 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
365 | --syscon | --sysco | --sysc | --sys | --sy)
366 ac_prev=sysconfdir ;;
367 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
368 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
369 sysconfdir="$ac_optarg" ;;
370
371 -target | --target | --targe | --targ | --tar | --ta | --t)
372 ac_prev=target ;;
373 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
374 target="$ac_optarg" ;;
375
376 -v | -verbose | --verbose | --verbos | --verbo | --verb)
377 verbose=yes ;;
378
379 -version | --version | --versio | --versi | --vers)
380 echo "configure generated by autoconf version 2.13"
381 exit 0 ;;
382
383 -with-* | --with-*)
384 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
385 # Reject names that are not valid shell variable names.
386 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
387 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
388 fi
389 ac_package=`echo $ac_package| sed 's/-/_/g'`
390 case "$ac_option" in
391 *=*) ;;
392 *) ac_optarg=yes ;;
393 esac
394 eval "with_${ac_package}='$ac_optarg'" ;;
395
396 -without-* | --without-*)
397 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
398 # Reject names that are not valid shell variable names.
399 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
400 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
401 fi
402 ac_package=`echo $ac_package| sed 's/-/_/g'`
403 eval "with_${ac_package}=no" ;;
404
405 --x)
406 # Obsolete; use --with-x.
407 with_x=yes ;;
408
409 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
410 | --x-incl | --x-inc | --x-in | --x-i)
411 ac_prev=x_includes ;;
412 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
413 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
414 x_includes="$ac_optarg" ;;
415
416 -x-libraries | --x-libraries | --x-librarie | --x-librari \
417 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
418 ac_prev=x_libraries ;;
419 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
420 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
421 x_libraries="$ac_optarg" ;;
422
423 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
424 ;;
425
426 *)
427 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
428 echo "configure: warning: $ac_option: invalid host type" 1>&2
429 fi
430 if test "x$nonopt" != xNONE; then
431 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
432 fi
433 nonopt="$ac_option"
434 ;;
435
436 esac
437 done
438
439 if test -n "$ac_prev"; then
440 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
441 fi
442
443 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
444
445 # File descriptor usage:
446 # 0 standard input
447 # 1 file creation
448 # 2 errors and warnings
449 # 3 some systems may open it to /dev/tty
450 # 4 used on the Kubota Titan
451 # 6 checking for... messages and results
452 # 5 compiler messages saved in config.log
453 if test "$silent" = yes; then
454 exec 6>/dev/null
455 else
456 exec 6>&1
457 fi
458 exec 5>./config.log
459
460 echo "\
461 This file contains any messages produced by compilers while
462 running configure, to aid debugging if configure makes a mistake.
463 " 1>&5
464
465 # Strip out --no-create and --no-recursion so they do not pile up.
466 # Also quote any args containing shell metacharacters.
467 ac_configure_args=
468 for ac_arg
469 do
470 case "$ac_arg" in
471 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
472 | --no-cr | --no-c) ;;
473 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
474 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
475 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
476 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
477 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
478 esac
479 done
480
481 # NLS nuisances.
482 # Only set these to C if already set. These must not be set unconditionally
483 # because not all systems understand e.g. LANG=C (notably SCO).
484 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
485 # Non-C LC_CTYPE values break the ctype check.
486 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
487 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
488 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
489 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
490
491 # confdefs.h avoids OS command line length limits that DEFS can exceed.
492 rm -rf conftest* confdefs.h
493 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
494 echo > confdefs.h
495
496 # A filename unique to this package, relative to the directory that
497 # configure is in, which we can look for to find out if srcdir is correct.
498 ac_unique_file=main.c
499
500 # Find the source files, if location was not specified.
501 if test -z "$srcdir"; then
502 ac_srcdir_defaulted=yes
503 # Try the directory containing this script, then its parent.
504 ac_prog=$0
505 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
506 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
507 srcdir=$ac_confdir
508 if test ! -r $srcdir/$ac_unique_file; then
509 srcdir=..
510 fi
511 else
512 ac_srcdir_defaulted=no
513 fi
514 if test ! -r $srcdir/$ac_unique_file; then
515 if test "$ac_srcdir_defaulted" = yes; then
516 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
517 else
518 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
519 fi
520 fi
521 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
522
523 # Prefer explicitly selected file to automatically selected ones.
524 if test -z "$CONFIG_SITE"; then
525 if test "x$prefix" != xNONE; then
526 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
527 else
528 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
529 fi
530 fi
531 for ac_site_file in $CONFIG_SITE; do
532 if test -r "$ac_site_file"; then
533 echo "loading site script $ac_site_file"
534 . "$ac_site_file"
535 fi
536 done
537
538 if test -r "$cache_file"; then
539 echo "loading cache $cache_file"
540 . $cache_file
541 else
542 echo "creating cache $cache_file"
543 > $cache_file
544 fi
545
546 ac_ext=c
547 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
548 ac_cpp='$CPP $CPPFLAGS'
549 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
550 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
551 cross_compiling=$ac_cv_prog_cc_cross
552
553 ac_exeext=
554 ac_objext=o
555 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
556 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
557 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
558 ac_n= ac_c='
559 ' ac_t=' '
560 else
561 ac_n=-n ac_c= ac_t=
562 fi
563 else
564 ac_n= ac_c='\c' ac_t=
565 fi
566
567
568
569
570 # Extract the first word of "gcc", so it can be a program name with args.
571 set dummy gcc; 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=":"
581 ac_dummy="$PATH"
582 for ac_dir in $ac_dummy; do
583 test -z "$ac_dir" && ac_dir=.
584 if test -f $ac_dir/$ac_word; then
585 ac_cv_prog_CC="gcc"
586 break
587 fi
588 done
589 IFS="$ac_save_ifs"
590 fi
591 fi
592 CC="$ac_cv_prog_CC"
593 if test -n "$CC"; then
594 echo "$ac_t""$CC" 1>&6
595 else
596 echo "$ac_t""no" 1>&6
597 fi
598
599 if test -z "$CC"; then
600 # Extract the first word of "cc", so it can be a program name with args.
601 set dummy cc; ac_word=$2
602 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
603 echo "configure:604: checking for $ac_word" >&5
604 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
605 echo $ac_n "(cached) $ac_c" 1>&6
606 else
607 if test -n "$CC"; then
608 ac_cv_prog_CC="$CC" # Let the user override the test.
609 else
610 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
611 ac_prog_rejected=no
612 ac_dummy="$PATH"
613 for ac_dir in $ac_dummy; do
614 test -z "$ac_dir" && ac_dir=.
615 if test -f $ac_dir/$ac_word; then
616 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
617 ac_prog_rejected=yes
618 continue
619 fi
620 ac_cv_prog_CC="cc"
621 break
622 fi
623 done
624 IFS="$ac_save_ifs"
625 if test $ac_prog_rejected = yes; then
626 # We found a bogon in the path, so make sure we never use it.
627 set dummy $ac_cv_prog_CC
628 shift
629 if test $# -gt 0; then
630 # We chose a different compiler from the bogus one.
631 # However, it has the same basename, so the bogon will be chosen
632 # first if we set CC to just the basename; use the full file name.
633 shift
634 set dummy "$ac_dir/$ac_word" "$@"
635 shift
636 ac_cv_prog_CC="$@"
637 fi
638 fi
639 fi
640 fi
641 CC="$ac_cv_prog_CC"
642 if test -n "$CC"; then
643 echo "$ac_t""$CC" 1>&6
644 else
645 echo "$ac_t""no" 1>&6
646 fi
647
648 if test -z "$CC"; then
649 case "`uname -s`" in
650 *win32* | *WIN32*)
651 # Extract the first word of "cl", so it can be a program name with args.
652 set dummy cl; ac_word=$2
653 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
654 echo "configure:655: checking for $ac_word" >&5
655 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
656 echo $ac_n "(cached) $ac_c" 1>&6
657 else
658 if test -n "$CC"; then
659 ac_cv_prog_CC="$CC" # Let the user override the test.
660 else
661 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
662 ac_dummy="$PATH"
663 for ac_dir in $ac_dummy; do
664 test -z "$ac_dir" && ac_dir=.
665 if test -f $ac_dir/$ac_word; then
666 ac_cv_prog_CC="cl"
667 break
668 fi
669 done
670 IFS="$ac_save_ifs"
671 fi
672 fi
673 CC="$ac_cv_prog_CC"
674 if test -n "$CC"; then
675 echo "$ac_t""$CC" 1>&6
676 else
677 echo "$ac_t""no" 1>&6
678 fi
679 ;;
680 esac
681 fi
682 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
683 fi
684
685 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
686 echo "configure:687: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
687
688 ac_ext=c
689 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
690 ac_cpp='$CPP $CPPFLAGS'
691 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
692 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
693 cross_compiling=$ac_cv_prog_cc_cross
694
695 cat > conftest.$ac_ext << EOF
696
697 #line 698 "configure"
698 #include "confdefs.h"
699
700 main(){return(0);}
701 EOF
702 if { (eval echo configure:703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
703 ac_cv_prog_cc_works=yes
704 # If we can't run a trivial program, we are probably using a cross compiler.
705 if (./conftest; exit) 2>/dev/null; then
706 ac_cv_prog_cc_cross=no
707 else
708 ac_cv_prog_cc_cross=yes
709 fi
710 else
711 echo "configure: failed program was:" >&5
712 cat conftest.$ac_ext >&5
713 ac_cv_prog_cc_works=no
714 fi
715 rm -fr conftest*
716 ac_ext=c
717 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
718 ac_cpp='$CPP $CPPFLAGS'
719 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
720 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
721 cross_compiling=$ac_cv_prog_cc_cross
722
723 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
724 if test $ac_cv_prog_cc_works = no; then
725 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
726 fi
727 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
728 echo "configure:729: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
729 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
730 cross_compiling=$ac_cv_prog_cc_cross
731
732 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
733 echo "configure:734: checking whether we are using GNU C" >&5
734 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
735 echo $ac_n "(cached) $ac_c" 1>&6
736 else
737 cat > conftest.c <<EOF
738 #ifdef __GNUC__
739 yes;
740 #endif
741 EOF
742 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:743: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
743 ac_cv_prog_gcc=yes
744 else
745 ac_cv_prog_gcc=no
746 fi
747 fi
748
749 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
750
751 if test $ac_cv_prog_gcc = yes; then
752 GCC=yes
753 else
754 GCC=
755 fi
756
757 ac_test_CFLAGS="${CFLAGS+set}"
758 ac_save_CFLAGS="$CFLAGS"
759 CFLAGS=
760 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
761 echo "configure:762: checking whether ${CC-cc} accepts -g" >&5
762 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
763 echo $ac_n "(cached) $ac_c" 1>&6
764 else
765 echo 'void f(){}' > conftest.c
766 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
767 ac_cv_prog_cc_g=yes
768 else
769 ac_cv_prog_cc_g=no
770 fi
771 rm -f conftest*
772
773 fi
774
775 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
776 if test "$ac_test_CFLAGS" = set; then
777 CFLAGS="$ac_save_CFLAGS"
778 elif test $ac_cv_prog_cc_g = yes; then
779 if test "$GCC" = yes; then
780 CFLAGS="-g -O2"
781 else
782 CFLAGS="-g"
783 fi
784 else
785 if test "$GCC" = yes; then
786 CFLAGS="-O2"
787 else
788 CFLAGS=
789 fi
790 fi
791
792 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
793 echo "configure:794: checking how to run the C preprocessor" >&5
794 # On Suns, sometimes $CPP names a directory.
795 if test -n "$CPP" && test -d "$CPP"; then
796 CPP=
797 fi
798 if test -z "$CPP"; then
799 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
800 echo $ac_n "(cached) $ac_c" 1>&6
801 else
802 # This must be in double quotes, not single quotes, because CPP may get
803 # substituted into the Makefile and "${CC-cc}" will confuse make.
804 CPP="${CC-cc} -E"
805 # On the NeXT, cc -E runs the code through the compiler's parser,
806 # not just through cpp.
807 cat > conftest.$ac_ext <<EOF
808 #line 809 "configure"
809 #include "confdefs.h"
810 #include <assert.h>
811 Syntax Error
812 EOF
813 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
814 { (eval echo configure:815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
815 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
816 if test -z "$ac_err"; then
817 :
818 else
819 echo "$ac_err" >&5
820 echo "configure: failed program was:" >&5
821 cat conftest.$ac_ext >&5
822 rm -rf conftest*
823 CPP="${CC-cc} -E -traditional-cpp"
824 cat > conftest.$ac_ext <<EOF
825 #line 826 "configure"
826 #include "confdefs.h"
827 #include <assert.h>
828 Syntax Error
829 EOF
830 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
831 { (eval echo configure:832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
832 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
833 if test -z "$ac_err"; then
834 :
835 else
836 echo "$ac_err" >&5
837 echo "configure: failed program was:" >&5
838 cat conftest.$ac_ext >&5
839 rm -rf conftest*
840 CPP="${CC-cc} -nologo -E"
841 cat > conftest.$ac_ext <<EOF
842 #line 843 "configure"
843 #include "confdefs.h"
844 #include <assert.h>
845 Syntax Error
846 EOF
847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
848 { (eval echo configure:849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
850 if test -z "$ac_err"; then
851 :
852 else
853 echo "$ac_err" >&5
854 echo "configure: failed program was:" >&5
855 cat conftest.$ac_ext >&5
856 rm -rf conftest*
857 CPP=/lib/cpp
858 fi
859 rm -f conftest*
860 fi
861 rm -f conftest*
862 fi
863 rm -f conftest*
864 ac_cv_prog_CPP="$CPP"
865 fi
866 CPP="$ac_cv_prog_CPP"
867 else
868 ac_cv_prog_CPP="$CPP"
869 fi
870 echo "$ac_t""$CPP" 1>&6
871
872 echo $ac_n "checking for AIX""... $ac_c" 1>&6
873 echo "configure:874: checking for AIX" >&5
874 cat > conftest.$ac_ext <<EOF
875 #line 876 "configure"
876 #include "confdefs.h"
877 #ifdef _AIX
878 yes
879 #endif
880
881 EOF
882 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
883 egrep "yes" >/dev/null 2>&1; then
884 rm -rf conftest*
885 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
886 #define _ALL_SOURCE 1
887 EOF
888
889 else
890 rm -rf conftest*
891 echo "$ac_t""no" 1>&6
892 fi
893 rm -f conftest*
894
895
896 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
897 echo "configure:898: checking for POSIXized ISC" >&5
898 if test -d /etc/conf/kconfig.d &&
899 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
900 then
901 echo "$ac_t""yes" 1>&6
902 ISC=yes # If later tests want to check for ISC.
903 cat >> confdefs.h <<\EOF
904 #define _POSIX_SOURCE 1
905 EOF
906
907 if test "$GCC" = yes; then
908 CC="$CC -posix"
909 else
910 CC="$CC -Xp"
911 fi
912 else
913 echo "$ac_t""no" 1>&6
914 ISC=
915 fi
916
917
918
919
920 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
921 echo "configure:922: checking for ${CC-cc} option to accept ANSI C" >&5
922 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
923 echo $ac_n "(cached) $ac_c" 1>&6
924 else
925 am_cv_prog_cc_stdc=no
926 ac_save_CC="$CC"
927 # Don't try gcc -ansi; that turns off useful extensions and
928 # breaks some systems' header files.
929 # AIX -qlanglvl=ansi
930 # Ultrix and OSF/1 -std1
931 # HP-UX -Aa -D_HPUX_SOURCE
932 # SVR4 -Xc -D__EXTENSIONS__
933 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
934 do
935 CC="$ac_save_CC $ac_arg"
936 cat > conftest.$ac_ext <<EOF
937 #line 938 "configure"
938 #include "confdefs.h"
939 #include <stdarg.h>
940 #include <stdio.h>
941 #include <sys/types.h>
942 #include <sys/stat.h>
943 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
944 struct buf { int x; };
945 FILE * (*rcsopen) (struct buf *, struct stat *, int);
946 static char *e (p, i)
947 char **p;
948 int i;
949 {
950 return p[i];
951 }
952 static char *f (char * (*g) (char **, int), char **p, ...)
953 {
954 char *s;
955 va_list v;
956 va_start (v,p);
957 s = g (p, va_arg (v,int));
958 va_end (v);
959 return s;
960 }
961 int test (int i, double x);
962 struct s1 {int (*f) (int a);};
963 struct s2 {int (*f) (double a);};
964 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
965 int argc;
966 char **argv;
967
968 int main() {
969
970 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
971
972 ; return 0; }
973 EOF
974 if { (eval echo configure:975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
975 rm -rf conftest*
976 am_cv_prog_cc_stdc="$ac_arg"; break
977 else
978 echo "configure: failed program was:" >&5
979 cat conftest.$ac_ext >&5
980 fi
981 rm -f conftest*
982 done
983 CC="$ac_save_CC"
984
985 fi
986
987 if test -z "$am_cv_prog_cc_stdc"; then
988 echo "$ac_t""none needed" 1>&6
989 else
990 echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
991 fi
992 case "x$am_cv_prog_cc_stdc" in
993 x|xno) ;;
994 *) CC="$CC $am_cv_prog_cc_stdc" ;;
995 esac
996
997
998 ac_aux_dir=
999 for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
1000 if test -f $ac_dir/install-sh; then
1001 ac_aux_dir=$ac_dir
1002 ac_install_sh="$ac_aux_dir/install-sh -c"
1003 break
1004 elif test -f $ac_dir/install.sh; then
1005 ac_aux_dir=$ac_dir
1006 ac_install_sh="$ac_aux_dir/install.sh -c"
1007 break
1008 fi
1009 done
1010 if test -z "$ac_aux_dir"; then
1011 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
1012 fi
1013 ac_config_guess=$ac_aux_dir/config.guess
1014 ac_config_sub=$ac_aux_dir/config.sub
1015 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1016
1017
1018 # Do some error checking and defaulting for the host and target type.
1019 # The inputs are:
1020 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
1021 #
1022 # The rules are:
1023 # 1. You are not allowed to specify --host, --target, and nonopt at the
1024 # same time.
1025 # 2. Host defaults to nonopt.
1026 # 3. If nonopt is not specified, then host defaults to the current host,
1027 # as determined by config.guess.
1028 # 4. Target and build default to nonopt.
1029 # 5. If nonopt is not specified, then target and build default to host.
1030
1031 # The aliases save the names the user supplied, while $host etc.
1032 # will get canonicalized.
1033 case $host---$target---$nonopt in
1034 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1035 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1036 esac
1037
1038
1039 # Make sure we can run config.sub.
1040 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
1041 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
1042 fi
1043
1044 echo $ac_n "checking host system type""... $ac_c" 1>&6
1045 echo "configure:1046: checking host system type" >&5
1046
1047 host_alias=$host
1048 case "$host_alias" in
1049 NONE)
1050 case $nonopt in
1051 NONE)
1052 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
1053 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
1054 fi ;;
1055 *) host_alias=$nonopt ;;
1056 esac ;;
1057 esac
1058
1059 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
1060 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1061 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1062 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1063 echo "$ac_t""$host" 1>&6
1064
1065 echo $ac_n "checking target system type""... $ac_c" 1>&6
1066 echo "configure:1067: checking target system type" >&5
1067
1068 target_alias=$target
1069 case "$target_alias" in
1070 NONE)
1071 case $nonopt in
1072 NONE) target_alias=$host_alias ;;
1073 *) target_alias=$nonopt ;;
1074 esac ;;
1075 esac
1076
1077 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
1078 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1079 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1080 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1081 echo "$ac_t""$target" 1>&6
1082
1083 echo $ac_n "checking build system type""... $ac_c" 1>&6
1084 echo "configure:1085: checking build system type" >&5
1085
1086 build_alias=$build
1087 case "$build_alias" in
1088 NONE)
1089 case $nonopt in
1090 NONE) build_alias=$host_alias ;;
1091 *) build_alias=$nonopt ;;
1092 esac ;;
1093 esac
1094
1095 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
1096 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1097 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1098 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1099 echo "$ac_t""$build" 1>&6
1100
1101 test "$host_alias" != "$target_alias" &&
1102 test "$program_prefix$program_suffix$program_transform_name" = \
1103 NONENONEs,x,x, &&
1104 program_prefix=${target_alias}-
1105
1106
1107 ALL_LINGUAS=
1108 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1109 echo "configure:1110: checking whether ${MAKE-make} sets \${MAKE}" >&5
1110 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1111 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1112 echo $ac_n "(cached) $ac_c" 1>&6
1113 else
1114 cat > conftestmake <<\EOF
1115 all:
1116 @echo 'ac_maketemp="${MAKE}"'
1117 EOF
1118 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1119 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1120 if test -n "$ac_maketemp"; then
1121 eval ac_cv_prog_make_${ac_make}_set=yes
1122 else
1123 eval ac_cv_prog_make_${ac_make}_set=no
1124 fi
1125 rm -f conftestmake
1126 fi
1127 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1128 echo "$ac_t""yes" 1>&6
1129 SET_MAKE=
1130 else
1131 echo "$ac_t""no" 1>&6
1132 SET_MAKE="MAKE=${MAKE-make}"
1133 fi
1134
1135 # Extract the first word of "ranlib", so it can be a program name with args.
1136 set dummy ranlib; ac_word=$2
1137 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1138 echo "configure:1139: checking for $ac_word" >&5
1139 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1140 echo $ac_n "(cached) $ac_c" 1>&6
1141 else
1142 if test -n "$RANLIB"; then
1143 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1144 else
1145 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1146 ac_dummy="$PATH"
1147 for ac_dir in $ac_dummy; do
1148 test -z "$ac_dir" && ac_dir=.
1149 if test -f $ac_dir/$ac_word; then
1150 ac_cv_prog_RANLIB="ranlib"
1151 break
1152 fi
1153 done
1154 IFS="$ac_save_ifs"
1155 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1156 fi
1157 fi
1158 RANLIB="$ac_cv_prog_RANLIB"
1159 if test -n "$RANLIB"; then
1160 echo "$ac_t""$RANLIB" 1>&6
1161 else
1162 echo "$ac_t""no" 1>&6
1163 fi
1164
1165 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1166 echo "configure:1167: checking for ANSI C header files" >&5
1167 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1168 echo $ac_n "(cached) $ac_c" 1>&6
1169 else
1170 cat > conftest.$ac_ext <<EOF
1171 #line 1172 "configure"
1172 #include "confdefs.h"
1173 #include <stdlib.h>
1174 #include <stdarg.h>
1175 #include <string.h>
1176 #include <float.h>
1177 EOF
1178 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1179 { (eval echo configure:1180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1180 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1181 if test -z "$ac_err"; then
1182 rm -rf conftest*
1183 ac_cv_header_stdc=yes
1184 else
1185 echo "$ac_err" >&5
1186 echo "configure: failed program was:" >&5
1187 cat conftest.$ac_ext >&5
1188 rm -rf conftest*
1189 ac_cv_header_stdc=no
1190 fi
1191 rm -f conftest*
1192
1193 if test $ac_cv_header_stdc = yes; then
1194 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1195 cat > conftest.$ac_ext <<EOF
1196 #line 1197 "configure"
1197 #include "confdefs.h"
1198 #include <string.h>
1199 EOF
1200 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1201 egrep "memchr" >/dev/null 2>&1; then
1202 :
1203 else
1204 rm -rf conftest*
1205 ac_cv_header_stdc=no
1206 fi
1207 rm -f conftest*
1208
1209 fi
1210
1211 if test $ac_cv_header_stdc = yes; then
1212 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1213 cat > conftest.$ac_ext <<EOF
1214 #line 1215 "configure"
1215 #include "confdefs.h"
1216 #include <stdlib.h>
1217 EOF
1218 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1219 egrep "free" >/dev/null 2>&1; then
1220 :
1221 else
1222 rm -rf conftest*
1223 ac_cv_header_stdc=no
1224 fi
1225 rm -f conftest*
1226
1227 fi
1228
1229 if test $ac_cv_header_stdc = yes; then
1230 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1231 if test "$cross_compiling" = yes; then
1232 :
1233 else
1234 cat > conftest.$ac_ext <<EOF
1235 #line 1236 "configure"
1236 #include "confdefs.h"
1237 #include <ctype.h>
1238 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1239 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1240 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1241 int main () { int i; for (i = 0; i < 256; i++)
1242 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1243 exit (0); }
1244
1245 EOF
1246 if { (eval echo configure:1247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1247 then
1248 :
1249 else
1250 echo "configure: failed program was:" >&5
1251 cat conftest.$ac_ext >&5
1252 rm -fr conftest*
1253 ac_cv_header_stdc=no
1254 fi
1255 rm -fr conftest*
1256 fi
1257
1258 fi
1259 fi
1260
1261 echo "$ac_t""$ac_cv_header_stdc" 1>&6
1262 if test $ac_cv_header_stdc = yes; then
1263 cat >> confdefs.h <<\EOF
1264 #define STDC_HEADERS 1
1265 EOF
1266
1267 fi
1268
1269 echo $ac_n "checking for working const""... $ac_c" 1>&6
1270 echo "configure:1271: checking for working const" >&5
1271 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
1272 echo $ac_n "(cached) $ac_c" 1>&6
1273 else
1274 cat > conftest.$ac_ext <<EOF
1275 #line 1276 "configure"
1276 #include "confdefs.h"
1277
1278 int main() {
1279
1280 /* Ultrix mips cc rejects this. */
1281 typedef int charset[2]; const charset x;
1282 /* SunOS 4.1.1 cc rejects this. */
1283 char const *const *ccp;
1284 char **p;
1285 /* NEC SVR4.0.2 mips cc rejects this. */
1286 struct point {int x, y;};
1287 static struct point const zero = {0,0};
1288 /* AIX XL C 1.02.0.0 rejects this.
1289 It does not let you subtract one const X* pointer from another in an arm
1290 of an if-expression whose if-part is not a constant expression */
1291 const char *g = "string";
1292 ccp = &g + (g ? g-g : 0);
1293 /* HPUX 7.0 cc rejects these. */
1294 ++ccp;
1295 p = (char**) ccp;
1296 ccp = (char const *const *) p;
1297 { /* SCO 3.2v4 cc rejects this. */
1298 char *t;
1299 char const *s = 0 ? (char *) 0 : (char const *) 0;
1300
1301 *t++ = 0;
1302 }
1303 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1304 int x[] = {25, 17};
1305 const int *foo = &x[0];
1306 ++foo;
1307 }
1308 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1309 typedef const int *iptr;
1310 iptr p = 0;
1311 ++p;
1312 }
1313 { /* AIX XL C 1.02.0.0 rejects this saying
1314 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1315 struct s { int j; const int *ap[3]; };
1316 struct s *b; b->j = 5;
1317 }
1318 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1319 const int foo = 10;
1320 }
1321
1322 ; return 0; }
1323 EOF
1324 if { (eval echo configure:1325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1325 rm -rf conftest*
1326 ac_cv_c_const=yes
1327 else
1328 echo "configure: failed program was:" >&5
1329 cat conftest.$ac_ext >&5
1330 rm -rf conftest*
1331 ac_cv_c_const=no
1332 fi
1333 rm -f conftest*
1334 fi
1335
1336 echo "$ac_t""$ac_cv_c_const" 1>&6
1337 if test $ac_cv_c_const = no; then
1338 cat >> confdefs.h <<\EOF
1339 #define const
1340 EOF
1341
1342 fi
1343
1344 echo $ac_n "checking for inline""... $ac_c" 1>&6
1345 echo "configure:1346: checking for inline" >&5
1346 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
1347 echo $ac_n "(cached) $ac_c" 1>&6
1348 else
1349 ac_cv_c_inline=no
1350 for ac_kw in inline __inline__ __inline; do
1351 cat > conftest.$ac_ext <<EOF
1352 #line 1353 "configure"
1353 #include "confdefs.h"
1354
1355 int main() {
1356 } $ac_kw foo() {
1357 ; return 0; }
1358 EOF
1359 if { (eval echo configure:1360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1360 rm -rf conftest*
1361 ac_cv_c_inline=$ac_kw; break
1362 else
1363 echo "configure: failed program was:" >&5
1364 cat conftest.$ac_ext >&5
1365 fi
1366 rm -f conftest*
1367 done
1368
1369 fi
1370
1371 echo "$ac_t""$ac_cv_c_inline" 1>&6
1372 case "$ac_cv_c_inline" in
1373 inline | yes) ;;
1374 no) cat >> confdefs.h <<\EOF
1375 #define inline
1376 EOF
1377 ;;
1378 *) cat >> confdefs.h <<EOF
1379 #define inline $ac_cv_c_inline
1380 EOF
1381 ;;
1382 esac
1383
1384 echo $ac_n "checking for off_t""... $ac_c" 1>&6
1385 echo "configure:1386: checking for off_t" >&5
1386 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
1387 echo $ac_n "(cached) $ac_c" 1>&6
1388 else
1389 cat > conftest.$ac_ext <<EOF
1390 #line 1391 "configure"
1391 #include "confdefs.h"
1392 #include <sys/types.h>
1393 #if STDC_HEADERS
1394 #include <stdlib.h>
1395 #include <stddef.h>
1396 #endif
1397 EOF
1398 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1399 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1400 rm -rf conftest*
1401 ac_cv_type_off_t=yes
1402 else
1403 rm -rf conftest*
1404 ac_cv_type_off_t=no
1405 fi
1406 rm -f conftest*
1407
1408 fi
1409 echo "$ac_t""$ac_cv_type_off_t" 1>&6
1410 if test $ac_cv_type_off_t = no; then
1411 cat >> confdefs.h <<\EOF
1412 #define off_t long
1413 EOF
1414
1415 fi
1416
1417 echo $ac_n "checking for size_t""... $ac_c" 1>&6
1418 echo "configure:1419: checking for size_t" >&5
1419 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
1420 echo $ac_n "(cached) $ac_c" 1>&6
1421 else
1422 cat > conftest.$ac_ext <<EOF
1423 #line 1424 "configure"
1424 #include "confdefs.h"
1425 #include <sys/types.h>
1426 #if STDC_HEADERS
1427 #include <stdlib.h>
1428 #include <stddef.h>
1429 #endif
1430 EOF
1431 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1432 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
1433 rm -rf conftest*
1434 ac_cv_type_size_t=yes
1435 else
1436 rm -rf conftest*
1437 ac_cv_type_size_t=no
1438 fi
1439 rm -f conftest*
1440
1441 fi
1442 echo "$ac_t""$ac_cv_type_size_t" 1>&6
1443 if test $ac_cv_type_size_t = no; then
1444 cat >> confdefs.h <<\EOF
1445 #define size_t unsigned
1446 EOF
1447
1448 fi
1449
1450 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
1451 # for constant arguments. Useless!
1452 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
1453 echo "configure:1454: checking for working alloca.h" >&5
1454 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
1455 echo $ac_n "(cached) $ac_c" 1>&6
1456 else
1457 cat > conftest.$ac_ext <<EOF
1458 #line 1459 "configure"
1459 #include "confdefs.h"
1460 #include <alloca.h>
1461 int main() {
1462 char *p = alloca(2 * sizeof(int));
1463 ; return 0; }
1464 EOF
1465 if { (eval echo configure:1466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1466 rm -rf conftest*
1467 ac_cv_header_alloca_h=yes
1468 else
1469 echo "configure: failed program was:" >&5
1470 cat conftest.$ac_ext >&5
1471 rm -rf conftest*
1472 ac_cv_header_alloca_h=no
1473 fi
1474 rm -f conftest*
1475 fi
1476
1477 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
1478 if test $ac_cv_header_alloca_h = yes; then
1479 cat >> confdefs.h <<\EOF
1480 #define HAVE_ALLOCA_H 1
1481 EOF
1482
1483 fi
1484
1485 echo $ac_n "checking for alloca""... $ac_c" 1>&6
1486 echo "configure:1487: checking for alloca" >&5
1487 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
1488 echo $ac_n "(cached) $ac_c" 1>&6
1489 else
1490 cat > conftest.$ac_ext <<EOF
1491 #line 1492 "configure"
1492 #include "confdefs.h"
1493
1494 #ifdef __GNUC__
1495 # define alloca __builtin_alloca
1496 #else
1497 # ifdef _MSC_VER
1498 # include <malloc.h>
1499 # define alloca _alloca
1500 # else
1501 # if HAVE_ALLOCA_H
1502 # include <alloca.h>
1503 # else
1504 # ifdef _AIX
1505 #pragma alloca
1506 # else
1507 # ifndef alloca /* predefined by HP cc +Olibcalls */
1508 char *alloca ();
1509 # endif
1510 # endif
1511 # endif
1512 # endif
1513 #endif
1514
1515 int main() {
1516 char *p = (char *) alloca(1);
1517 ; return 0; }
1518 EOF
1519 if { (eval echo configure:1520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1520 rm -rf conftest*
1521 ac_cv_func_alloca_works=yes
1522 else
1523 echo "configure: failed program was:" >&5
1524 cat conftest.$ac_ext >&5
1525 rm -rf conftest*
1526 ac_cv_func_alloca_works=no
1527 fi
1528 rm -f conftest*
1529 fi
1530
1531 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
1532 if test $ac_cv_func_alloca_works = yes; then
1533 cat >> confdefs.h <<\EOF
1534 #define HAVE_ALLOCA 1
1535 EOF
1536
1537 fi
1538
1539 if test $ac_cv_func_alloca_works = no; then
1540 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
1541 # that cause trouble. Some versions do not even contain alloca or
1542 # contain a buggy version. If you still want to use their alloca,
1543 # use ar to extract alloca.o from them instead of compiling alloca.c.
1544 ALLOCA=alloca.${ac_objext}
1545 cat >> confdefs.h <<\EOF
1546 #define C_ALLOCA 1
1547 EOF
1548
1549
1550 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
1551 echo "configure:1552: checking whether alloca needs Cray hooks" >&5
1552 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
1553 echo $ac_n "(cached) $ac_c" 1>&6
1554 else
1555 cat > conftest.$ac_ext <<EOF
1556 #line 1557 "configure"
1557 #include "confdefs.h"
1558 #if defined(CRAY) && ! defined(CRAY2)
1559 webecray
1560 #else
1561 wenotbecray
1562 #endif
1563
1564 EOF
1565 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1566 egrep "webecray" >/dev/null 2>&1; then
1567 rm -rf conftest*
1568 ac_cv_os_cray=yes
1569 else
1570 rm -rf conftest*
1571 ac_cv_os_cray=no
1572 fi
1573 rm -f conftest*
1574
1575 fi
1576
1577 echo "$ac_t""$ac_cv_os_cray" 1>&6
1578 if test $ac_cv_os_cray = yes; then
1579 for ac_func in _getb67 GETB67 getb67; do
1580 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1581 echo "configure:1582: checking for $ac_func" >&5
1582 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1583 echo $ac_n "(cached) $ac_c" 1>&6
1584 else
1585 cat > conftest.$ac_ext <<EOF
1586 #line 1587 "configure"
1587 #include "confdefs.h"
1588 /* System header to define __stub macros and hopefully few prototypes,
1589 which can conflict with char $ac_func(); below. */
1590 #include <assert.h>
1591 /* Override any gcc2 internal prototype to avoid an error. */
1592 /* We use char because int might match the return type of a gcc2
1593 builtin and then its argument prototype would still apply. */
1594 char $ac_func();
1595
1596 int main() {
1597
1598 /* The GNU C library defines this for functions which it implements
1599 to always fail with ENOSYS. Some functions are actually named
1600 something starting with __ and the normal name is an alias. */
1601 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1602 choke me
1603 #else
1604 $ac_func();
1605 #endif
1606
1607 ; return 0; }
1608 EOF
1609 if { (eval echo configure:1610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1610 rm -rf conftest*
1611 eval "ac_cv_func_$ac_func=yes"
1612 else
1613 echo "configure: failed program was:" >&5
1614 cat conftest.$ac_ext >&5
1615 rm -rf conftest*
1616 eval "ac_cv_func_$ac_func=no"
1617 fi
1618 rm -f conftest*
1619 fi
1620
1621 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1622 echo "$ac_t""yes" 1>&6
1623 cat >> confdefs.h <<EOF
1624 #define CRAY_STACKSEG_END $ac_func
1625 EOF
1626
1627 break
1628 else
1629 echo "$ac_t""no" 1>&6
1630 fi
1631
1632 done
1633 fi
1634
1635 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
1636 echo "configure:1637: checking stack direction for C alloca" >&5
1637 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
1638 echo $ac_n "(cached) $ac_c" 1>&6
1639 else
1640 if test "$cross_compiling" = yes; then
1641 ac_cv_c_stack_direction=0
1642 else
1643 cat > conftest.$ac_ext <<EOF
1644 #line 1645 "configure"
1645 #include "confdefs.h"
1646 find_stack_direction ()
1647 {
1648 static char *addr = 0;
1649 auto char dummy;
1650 if (addr == 0)
1651 {
1652 addr = &dummy;
1653 return find_stack_direction ();
1654 }
1655 else
1656 return (&dummy > addr) ? 1 : -1;
1657 }
1658 main ()
1659 {
1660 exit (find_stack_direction() < 0);
1661 }
1662 EOF
1663 if { (eval echo configure:1664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1664 then
1665 ac_cv_c_stack_direction=1
1666 else
1667 echo "configure: failed program was:" >&5
1668 cat conftest.$ac_ext >&5
1669 rm -fr conftest*
1670 ac_cv_c_stack_direction=-1
1671 fi
1672 rm -fr conftest*
1673 fi
1674
1675 fi
1676
1677 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
1678 cat >> confdefs.h <<EOF
1679 #define STACK_DIRECTION $ac_cv_c_stack_direction
1680 EOF
1681
1682 fi
1683
1684 for ac_hdr in unistd.h
1685 do
1686 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1687 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1688 echo "configure:1689: checking for $ac_hdr" >&5
1689 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1690 echo $ac_n "(cached) $ac_c" 1>&6
1691 else
1692 cat > conftest.$ac_ext <<EOF
1693 #line 1694 "configure"
1694 #include "confdefs.h"
1695 #include <$ac_hdr>
1696 EOF
1697 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1698 { (eval echo configure:1699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1699 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1700 if test -z "$ac_err"; then
1701 rm -rf conftest*
1702 eval "ac_cv_header_$ac_safe=yes"
1703 else
1704 echo "$ac_err" >&5
1705 echo "configure: failed program was:" >&5
1706 cat conftest.$ac_ext >&5
1707 rm -rf conftest*
1708 eval "ac_cv_header_$ac_safe=no"
1709 fi
1710 rm -f conftest*
1711 fi
1712 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1713 echo "$ac_t""yes" 1>&6
1714 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1715 cat >> confdefs.h <<EOF
1716 #define $ac_tr_hdr 1
1717 EOF
1718
1719 else
1720 echo "$ac_t""no" 1>&6
1721 fi
1722 done
1723
1724 for ac_func in getpagesize
1725 do
1726 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1727 echo "configure:1728: checking for $ac_func" >&5
1728 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1729 echo $ac_n "(cached) $ac_c" 1>&6
1730 else
1731 cat > conftest.$ac_ext <<EOF
1732 #line 1733 "configure"
1733 #include "confdefs.h"
1734 /* System header to define __stub macros and hopefully few prototypes,
1735 which can conflict with char $ac_func(); below. */
1736 #include <assert.h>
1737 /* Override any gcc2 internal prototype to avoid an error. */
1738 /* We use char because int might match the return type of a gcc2
1739 builtin and then its argument prototype would still apply. */
1740 char $ac_func();
1741
1742 int main() {
1743
1744 /* The GNU C library defines this for functions which it implements
1745 to always fail with ENOSYS. Some functions are actually named
1746 something starting with __ and the normal name is an alias. */
1747 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1748 choke me
1749 #else
1750 $ac_func();
1751 #endif
1752
1753 ; return 0; }
1754 EOF
1755 if { (eval echo configure:1756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1756 rm -rf conftest*
1757 eval "ac_cv_func_$ac_func=yes"
1758 else
1759 echo "configure: failed program was:" >&5
1760 cat conftest.$ac_ext >&5
1761 rm -rf conftest*
1762 eval "ac_cv_func_$ac_func=no"
1763 fi
1764 rm -f conftest*
1765 fi
1766
1767 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1768 echo "$ac_t""yes" 1>&6
1769 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1770 cat >> confdefs.h <<EOF
1771 #define $ac_tr_func 1
1772 EOF
1773
1774 else
1775 echo "$ac_t""no" 1>&6
1776 fi
1777 done
1778
1779 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1780 echo "configure:1781: checking for working mmap" >&5
1781 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
1782 echo $ac_n "(cached) $ac_c" 1>&6
1783 else
1784 if test "$cross_compiling" = yes; then
1785 ac_cv_func_mmap_fixed_mapped=no
1786 else
1787 cat > conftest.$ac_ext <<EOF
1788 #line 1789 "configure"
1789 #include "confdefs.h"
1790
1791 /* Thanks to Mike Haertel and Jim Avera for this test.
1792 Here is a matrix of mmap possibilities:
1793 mmap private not fixed
1794 mmap private fixed at somewhere currently unmapped
1795 mmap private fixed at somewhere already mapped
1796 mmap shared not fixed
1797 mmap shared fixed at somewhere currently unmapped
1798 mmap shared fixed at somewhere already mapped
1799 For private mappings, we should verify that changes cannot be read()
1800 back from the file, nor mmap's back from the file at a different
1801 address. (There have been systems where private was not correctly
1802 implemented like the infamous i386 svr4.0, and systems where the
1803 VM page cache was not coherent with the filesystem buffer cache
1804 like early versions of FreeBSD and possibly contemporary NetBSD.)
1805 For shared mappings, we should conversely verify that changes get
1806 propogated back to all the places they're supposed to be.
1807
1808 Grep wants private fixed already mapped.
1809 The main things grep needs to know about mmap are:
1810 * does it exist and is it safe to write into the mmap'd area
1811 * how to use it (BSD variants) */
1812 #include <sys/types.h>
1813 #include <fcntl.h>
1814 #include <sys/mman.h>
1815
1816 /* This mess was copied from the GNU getpagesize.h. */
1817 #ifndef HAVE_GETPAGESIZE
1818 # ifdef HAVE_UNISTD_H
1819 # include <unistd.h>
1820 # endif
1821
1822 /* Assume that all systems that can run configure have sys/param.h. */
1823 # ifndef HAVE_SYS_PARAM_H
1824 # define HAVE_SYS_PARAM_H 1
1825 # endif
1826
1827 # ifdef _SC_PAGESIZE
1828 # define getpagesize() sysconf(_SC_PAGESIZE)
1829 # else /* no _SC_PAGESIZE */
1830 # ifdef HAVE_SYS_PARAM_H
1831 # include <sys/param.h>
1832 # ifdef EXEC_PAGESIZE
1833 # define getpagesize() EXEC_PAGESIZE
1834 # else /* no EXEC_PAGESIZE */
1835 # ifdef NBPG
1836 # define getpagesize() NBPG * CLSIZE
1837 # ifndef CLSIZE
1838 # define CLSIZE 1
1839 # endif /* no CLSIZE */
1840 # else /* no NBPG */
1841 # ifdef NBPC
1842 # define getpagesize() NBPC
1843 # else /* no NBPC */
1844 # ifdef PAGESIZE
1845 # define getpagesize() PAGESIZE
1846 # endif /* PAGESIZE */
1847 # endif /* no NBPC */
1848 # endif /* no NBPG */
1849 # endif /* no EXEC_PAGESIZE */
1850 # else /* no HAVE_SYS_PARAM_H */
1851 # define getpagesize() 8192 /* punt totally */
1852 # endif /* no HAVE_SYS_PARAM_H */
1853 # endif /* no _SC_PAGESIZE */
1854
1855 #endif /* no HAVE_GETPAGESIZE */
1856
1857 #ifdef __cplusplus
1858 extern "C" { void *malloc(unsigned); }
1859 #else
1860 char *malloc();
1861 #endif
1862
1863 int
1864 main()
1865 {
1866 char *data, *data2, *data3;
1867 int i, pagesize;
1868 int fd;
1869
1870 pagesize = getpagesize();
1871
1872 /*
1873 * First, make a file with some known garbage in it.
1874 */
1875 data = malloc(pagesize);
1876 if (!data)
1877 exit(1);
1878 for (i = 0; i < pagesize; ++i)
1879 *(data + i) = rand();
1880 umask(0);
1881 fd = creat("conftestmmap", 0600);
1882 if (fd < 0)
1883 exit(1);
1884 if (write(fd, data, pagesize) != pagesize)
1885 exit(1);
1886 close(fd);
1887
1888 /*
1889 * Next, try to mmap the file at a fixed address which
1890 * already has something else allocated at it. If we can,
1891 * also make sure that we see the same garbage.
1892 */
1893 fd = open("conftestmmap", O_RDWR);
1894 if (fd < 0)
1895 exit(1);
1896 data2 = malloc(2 * pagesize);
1897 if (!data2)
1898 exit(1);
1899 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
1900 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
1901 MAP_PRIVATE | MAP_FIXED, fd, 0L))
1902 exit(1);
1903 for (i = 0; i < pagesize; ++i)
1904 if (*(data + i) != *(data2 + i))
1905 exit(1);
1906
1907 /*
1908 * Finally, make sure that changes to the mapped area
1909 * do not percolate back to the file as seen by read().
1910 * (This is a bug on some variants of i386 svr4.0.)
1911 */
1912 for (i = 0; i < pagesize; ++i)
1913 *(data2 + i) = *(data2 + i) + 1;
1914 data3 = malloc(pagesize);
1915 if (!data3)
1916 exit(1);
1917 if (read(fd, data3, pagesize) != pagesize)
1918 exit(1);
1919 for (i = 0; i < pagesize; ++i)
1920 if (*(data + i) != *(data3 + i))
1921 exit(1);
1922 close(fd);
1923 unlink("conftestmmap");
1924 exit(0);
1925 }
1926
1927 EOF
1928 if { (eval echo configure:1929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1929 then
1930 ac_cv_func_mmap_fixed_mapped=yes
1931 else
1932 echo "configure: failed program was:" >&5
1933 cat conftest.$ac_ext >&5
1934 rm -fr conftest*
1935 ac_cv_func_mmap_fixed_mapped=no
1936 fi
1937 rm -fr conftest*
1938 fi
1939
1940 fi
1941
1942 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
1943 if test $ac_cv_func_mmap_fixed_mapped = yes; then
1944 cat >> confdefs.h <<\EOF
1945 #define HAVE_MMAP 1
1946 EOF
1947
1948 fi
1949
1950
1951 for ac_hdr in argz.h limits.h locale.h nl_types.h malloc.h string.h \
1952 unistd.h values.h sys/param.h
1953 do
1954 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1955 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1956 echo "configure:1957: checking for $ac_hdr" >&5
1957 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1958 echo $ac_n "(cached) $ac_c" 1>&6
1959 else
1960 cat > conftest.$ac_ext <<EOF
1961 #line 1962 "configure"
1962 #include "confdefs.h"
1963 #include <$ac_hdr>
1964 EOF
1965 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1966 { (eval echo configure:1967: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1967 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1968 if test -z "$ac_err"; then
1969 rm -rf conftest*
1970 eval "ac_cv_header_$ac_safe=yes"
1971 else
1972 echo "$ac_err" >&5
1973 echo "configure: failed program was:" >&5
1974 cat conftest.$ac_ext >&5
1975 rm -rf conftest*
1976 eval "ac_cv_header_$ac_safe=no"
1977 fi
1978 rm -f conftest*
1979 fi
1980 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1981 echo "$ac_t""yes" 1>&6
1982 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1983 cat >> confdefs.h <<EOF
1984 #define $ac_tr_hdr 1
1985 EOF
1986
1987 else
1988 echo "$ac_t""no" 1>&6
1989 fi
1990 done
1991
1992 for ac_func in getcwd munmap putenv setenv setlocale strchr strcasecmp \
1993 __argz_count __argz_stringify __argz_next
1994 do
1995 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1996 echo "configure:1997: checking for $ac_func" >&5
1997 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1998 echo $ac_n "(cached) $ac_c" 1>&6
1999 else
2000 cat > conftest.$ac_ext <<EOF
2001 #line 2002 "configure"
2002 #include "confdefs.h"
2003 /* System header to define __stub macros and hopefully few prototypes,
2004 which can conflict with char $ac_func(); below. */
2005 #include <assert.h>
2006 /* Override any gcc2 internal prototype to avoid an error. */
2007 /* We use char because int might match the return type of a gcc2
2008 builtin and then its argument prototype would still apply. */
2009 char $ac_func();
2010
2011 int main() {
2012
2013 /* The GNU C library defines this for functions which it implements
2014 to always fail with ENOSYS. Some functions are actually named
2015 something starting with __ and the normal name is an alias. */
2016 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2017 choke me
2018 #else
2019 $ac_func();
2020 #endif
2021
2022 ; return 0; }
2023 EOF
2024 if { (eval echo configure:2025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2025 rm -rf conftest*
2026 eval "ac_cv_func_$ac_func=yes"
2027 else
2028 echo "configure: failed program was:" >&5
2029 cat conftest.$ac_ext >&5
2030 rm -rf conftest*
2031 eval "ac_cv_func_$ac_func=no"
2032 fi
2033 rm -f conftest*
2034 fi
2035
2036 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2037 echo "$ac_t""yes" 1>&6
2038 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2039 cat >> confdefs.h <<EOF
2040 #define $ac_tr_func 1
2041 EOF
2042
2043 else
2044 echo "$ac_t""no" 1>&6
2045 fi
2046 done
2047
2048
2049 if test "${ac_cv_func_stpcpy+set}" != "set"; then
2050 for ac_func in stpcpy
2051 do
2052 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2053 echo "configure:2054: checking for $ac_func" >&5
2054 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2055 echo $ac_n "(cached) $ac_c" 1>&6
2056 else
2057 cat > conftest.$ac_ext <<EOF
2058 #line 2059 "configure"
2059 #include "confdefs.h"
2060 /* System header to define __stub macros and hopefully few prototypes,
2061 which can conflict with char $ac_func(); below. */
2062 #include <assert.h>
2063 /* Override any gcc2 internal prototype to avoid an error. */
2064 /* We use char because int might match the return type of a gcc2
2065 builtin and then its argument prototype would still apply. */
2066 char $ac_func();
2067
2068 int main() {
2069
2070 /* The GNU C library defines this for functions which it implements
2071 to always fail with ENOSYS. Some functions are actually named
2072 something starting with __ and the normal name is an alias. */
2073 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2074 choke me
2075 #else
2076 $ac_func();
2077 #endif
2078
2079 ; return 0; }
2080 EOF
2081 if { (eval echo configure:2082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2082 rm -rf conftest*
2083 eval "ac_cv_func_$ac_func=yes"
2084 else
2085 echo "configure: failed program was:" >&5
2086 cat conftest.$ac_ext >&5
2087 rm -rf conftest*
2088 eval "ac_cv_func_$ac_func=no"
2089 fi
2090 rm -f conftest*
2091 fi
2092
2093 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2094 echo "$ac_t""yes" 1>&6
2095 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2096 cat >> confdefs.h <<EOF
2097 #define $ac_tr_func 1
2098 EOF
2099
2100 else
2101 echo "$ac_t""no" 1>&6
2102 fi
2103 done
2104
2105 fi
2106 if test "${ac_cv_func_stpcpy}" = "yes"; then
2107 cat >> confdefs.h <<\EOF
2108 #define HAVE_STPCPY 1
2109 EOF
2110
2111 fi
2112
2113 if test $ac_cv_header_locale_h = yes; then
2114 echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
2115 echo "configure:2116: checking for LC_MESSAGES" >&5
2116 if eval "test \"`echo '$''{'am_cv_val_LC_MESSAGES'+set}'`\" = set"; then
2117 echo $ac_n "(cached) $ac_c" 1>&6
2118 else
2119 cat > conftest.$ac_ext <<EOF
2120 #line 2121 "configure"
2121 #include "confdefs.h"
2122 #include <locale.h>
2123 int main() {
2124 return LC_MESSAGES
2125 ; return 0; }
2126 EOF
2127 if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2128 rm -rf conftest*
2129 am_cv_val_LC_MESSAGES=yes
2130 else
2131 echo "configure: failed program was:" >&5
2132 cat conftest.$ac_ext >&5
2133 rm -rf conftest*
2134 am_cv_val_LC_MESSAGES=no
2135 fi
2136 rm -f conftest*
2137 fi
2138
2139 echo "$ac_t""$am_cv_val_LC_MESSAGES" 1>&6
2140 if test $am_cv_val_LC_MESSAGES = yes; then
2141 cat >> confdefs.h <<\EOF
2142 #define HAVE_LC_MESSAGES 1
2143 EOF
2144
2145 fi
2146 fi
2147 echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
2148 echo "configure:2149: checking whether NLS is requested" >&5
2149 # Check whether --enable-nls or --disable-nls was given.
2150 if test "${enable_nls+set}" = set; then
2151 enableval="$enable_nls"
2152 USE_NLS=$enableval
2153 else
2154 USE_NLS=yes
2155 fi
2156
2157 echo "$ac_t""$USE_NLS" 1>&6
2158
2159
2160 USE_INCLUDED_LIBINTL=no
2161
2162 if test "$USE_NLS" = "yes"; then
2163 cat >> confdefs.h <<\EOF
2164 #define ENABLE_NLS 1
2165 EOF
2166
2167 echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
2168 echo "configure:2169: checking whether included gettext is requested" >&5
2169 # Check whether --with-included-gettext or --without-included-gettext was given.
2170 if test "${with_included_gettext+set}" = set; then
2171 withval="$with_included_gettext"
2172 nls_cv_force_use_gnu_gettext=$withval
2173 else
2174 nls_cv_force_use_gnu_gettext=no
2175 fi
2176
2177 echo "$ac_t""$nls_cv_force_use_gnu_gettext" 1>&6
2178
2179 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
2180 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
2181 nls_cv_header_intl=
2182 nls_cv_header_libgt=
2183 CATOBJEXT=NONE
2184
2185 ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
2186 echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
2187 echo "configure:2188: checking for libintl.h" >&5
2188 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2189 echo $ac_n "(cached) $ac_c" 1>&6
2190 else
2191 cat > conftest.$ac_ext <<EOF
2192 #line 2193 "configure"
2193 #include "confdefs.h"
2194 #include <libintl.h>
2195 EOF
2196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2197 { (eval echo configure:2198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2199 if test -z "$ac_err"; then
2200 rm -rf conftest*
2201 eval "ac_cv_header_$ac_safe=yes"
2202 else
2203 echo "$ac_err" >&5
2204 echo "configure: failed program was:" >&5
2205 cat conftest.$ac_ext >&5
2206 rm -rf conftest*
2207 eval "ac_cv_header_$ac_safe=no"
2208 fi
2209 rm -f conftest*
2210 fi
2211 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2212 echo "$ac_t""yes" 1>&6
2213 echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
2214 echo "configure:2215: checking for gettext in libc" >&5
2215 if eval "test \"`echo '$''{'gt_cv_func_gettext_libc'+set}'`\" = set"; then
2216 echo $ac_n "(cached) $ac_c" 1>&6
2217 else
2218 cat > conftest.$ac_ext <<EOF
2219 #line 2220 "configure"
2220 #include "confdefs.h"
2221 #include <libintl.h>
2222 int main() {
2223 return (int) gettext ("")
2224 ; return 0; }
2225 EOF
2226 if { (eval echo configure:2227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2227 rm -rf conftest*
2228 gt_cv_func_gettext_libc=yes
2229 else
2230 echo "configure: failed program was:" >&5
2231 cat conftest.$ac_ext >&5
2232 rm -rf conftest*
2233 gt_cv_func_gettext_libc=no
2234 fi
2235 rm -f conftest*
2236 fi
2237
2238 echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
2239
2240 if test "$gt_cv_func_gettext_libc" != "yes"; then
2241 echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
2242 echo "configure:2243: checking for bindtextdomain in -lintl" >&5
2243 ac_lib_var=`echo intl'_'bindtextdomain | sed 'y%./+-%__p_%'`
2244 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2245 echo $ac_n "(cached) $ac_c" 1>&6
2246 else
2247 ac_save_LIBS="$LIBS"
2248 LIBS="-lintl $LIBS"
2249 cat > conftest.$ac_ext <<EOF
2250 #line 2251 "configure"
2251 #include "confdefs.h"
2252 /* Override any gcc2 internal prototype to avoid an error. */
2253 /* We use char because int might match the return type of a gcc2
2254 builtin and then its argument prototype would still apply. */
2255 char bindtextdomain();
2256
2257 int main() {
2258 bindtextdomain()
2259 ; return 0; }
2260 EOF
2261 if { (eval echo configure:2262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2262 rm -rf conftest*
2263 eval "ac_cv_lib_$ac_lib_var=yes"
2264 else
2265 echo "configure: failed program was:" >&5
2266 cat conftest.$ac_ext >&5
2267 rm -rf conftest*
2268 eval "ac_cv_lib_$ac_lib_var=no"
2269 fi
2270 rm -f conftest*
2271 LIBS="$ac_save_LIBS"
2272
2273 fi
2274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2275 echo "$ac_t""yes" 1>&6
2276 echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
2277 echo "configure:2278: checking for gettext in libintl" >&5
2278 if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
2279 echo $ac_n "(cached) $ac_c" 1>&6
2280 else
2281 cat > conftest.$ac_ext <<EOF
2282 #line 2283 "configure"
2283 #include "confdefs.h"
2284
2285 int main() {
2286 return (int) gettext ("")
2287 ; return 0; }
2288 EOF
2289 if { (eval echo configure:2290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2290 rm -rf conftest*
2291 gt_cv_func_gettext_libintl=yes
2292 else
2293 echo "configure: failed program was:" >&5
2294 cat conftest.$ac_ext >&5
2295 rm -rf conftest*
2296 gt_cv_func_gettext_libintl=no
2297 fi
2298 rm -f conftest*
2299 fi
2300
2301 echo "$ac_t""$gt_cv_func_gettext_libintl" 1>&6
2302 else
2303 echo "$ac_t""no" 1>&6
2304 fi
2305
2306 fi
2307
2308 if test "$gt_cv_func_gettext_libc" = "yes" \
2309 || test "$gt_cv_func_gettext_libintl" = "yes"; then
2310 cat >> confdefs.h <<\EOF
2311 #define HAVE_GETTEXT 1
2312 EOF
2313
2314 # Extract the first word of "msgfmt", so it can be a program name with args.
2315 set dummy msgfmt; ac_word=$2
2316 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2317 echo "configure:2318: checking for $ac_word" >&5
2318 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2319 echo $ac_n "(cached) $ac_c" 1>&6
2320 else
2321 case "$MSGFMT" in
2322 /*)
2323 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2324 ;;
2325 *)
2326 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2327 for ac_dir in $PATH; do
2328 test -z "$ac_dir" && ac_dir=.
2329 if test -f $ac_dir/$ac_word; then
2330 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2331 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2332 break
2333 fi
2334 fi
2335 done
2336 IFS="$ac_save_ifs"
2337 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
2338 ;;
2339 esac
2340 fi
2341 MSGFMT="$ac_cv_path_MSGFMT"
2342 if test -n "$MSGFMT"; then
2343 echo "$ac_t""$MSGFMT" 1>&6
2344 else
2345 echo "$ac_t""no" 1>&6
2346 fi
2347 if test "$MSGFMT" != "no"; then
2348 for ac_func in dcgettext
2349 do
2350 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2351 echo "configure:2352: checking for $ac_func" >&5
2352 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2353 echo $ac_n "(cached) $ac_c" 1>&6
2354 else
2355 cat > conftest.$ac_ext <<EOF
2356 #line 2357 "configure"
2357 #include "confdefs.h"
2358 /* System header to define __stub macros and hopefully few prototypes,
2359 which can conflict with char $ac_func(); below. */
2360 #include <assert.h>
2361 /* Override any gcc2 internal prototype to avoid an error. */
2362 /* We use char because int might match the return type of a gcc2
2363 builtin and then its argument prototype would still apply. */
2364 char $ac_func();
2365
2366 int main() {
2367
2368 /* The GNU C library defines this for functions which it implements
2369 to always fail with ENOSYS. Some functions are actually named
2370 something starting with __ and the normal name is an alias. */
2371 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2372 choke me
2373 #else
2374 $ac_func();
2375 #endif
2376
2377 ; return 0; }
2378 EOF
2379 if { (eval echo configure:2380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2380 rm -rf conftest*
2381 eval "ac_cv_func_$ac_func=yes"
2382 else
2383 echo "configure: failed program was:" >&5
2384 cat conftest.$ac_ext >&5
2385 rm -rf conftest*
2386 eval "ac_cv_func_$ac_func=no"
2387 fi
2388 rm -f conftest*
2389 fi
2390
2391 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2392 echo "$ac_t""yes" 1>&6
2393 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2394 cat >> confdefs.h <<EOF
2395 #define $ac_tr_func 1
2396 EOF
2397
2398 else
2399 echo "$ac_t""no" 1>&6
2400 fi
2401 done
2402
2403 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2404 set dummy gmsgfmt; ac_word=$2
2405 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2406 echo "configure:2407: checking for $ac_word" >&5
2407 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2408 echo $ac_n "(cached) $ac_c" 1>&6
2409 else
2410 case "$GMSGFMT" in
2411 /*)
2412 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2413 ;;
2414 ?:/*)
2415 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2416 ;;
2417 *)
2418 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2419 ac_dummy="$PATH"
2420 for ac_dir in $ac_dummy; do
2421 test -z "$ac_dir" && ac_dir=.
2422 if test -f $ac_dir/$ac_word; then
2423 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2424 break
2425 fi
2426 done
2427 IFS="$ac_save_ifs"
2428 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2429 ;;
2430 esac
2431 fi
2432 GMSGFMT="$ac_cv_path_GMSGFMT"
2433 if test -n "$GMSGFMT"; then
2434 echo "$ac_t""$GMSGFMT" 1>&6
2435 else
2436 echo "$ac_t""no" 1>&6
2437 fi
2438
2439 # Extract the first word of "xgettext", so it can be a program name with args.
2440 set dummy xgettext; ac_word=$2
2441 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2442 echo "configure:2443: checking for $ac_word" >&5
2443 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2444 echo $ac_n "(cached) $ac_c" 1>&6
2445 else
2446 case "$XGETTEXT" in
2447 /*)
2448 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2449 ;;
2450 *)
2451 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2452 for ac_dir in $PATH; do
2453 test -z "$ac_dir" && ac_dir=.
2454 if test -f $ac_dir/$ac_word; then
2455 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2456 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2457 break
2458 fi
2459 fi
2460 done
2461 IFS="$ac_save_ifs"
2462 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2463 ;;
2464 esac
2465 fi
2466 XGETTEXT="$ac_cv_path_XGETTEXT"
2467 if test -n "$XGETTEXT"; then
2468 echo "$ac_t""$XGETTEXT" 1>&6
2469 else
2470 echo "$ac_t""no" 1>&6
2471 fi
2472
2473 cat > conftest.$ac_ext <<EOF
2474 #line 2475 "configure"
2475 #include "confdefs.h"
2476
2477 int main() {
2478 extern int _nl_msg_cat_cntr;
2479 return _nl_msg_cat_cntr
2480 ; return 0; }
2481 EOF
2482 if { (eval echo configure:2483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2483 rm -rf conftest*
2484 CATOBJEXT=.gmo
2485 DATADIRNAME=share
2486 else
2487 echo "configure: failed program was:" >&5
2488 cat conftest.$ac_ext >&5
2489 rm -rf conftest*
2490 CATOBJEXT=.mo
2491 DATADIRNAME=lib
2492 fi
2493 rm -f conftest*
2494 INSTOBJEXT=.mo
2495 fi
2496 fi
2497
2498 else
2499 echo "$ac_t""no" 1>&6
2500 fi
2501
2502
2503
2504 if test "$CATOBJEXT" = "NONE"; then
2505 nls_cv_use_gnu_gettext=yes
2506 fi
2507 fi
2508
2509 if test "$nls_cv_use_gnu_gettext" = "yes"; then
2510 INTLOBJS="\$(GETTOBJS)"
2511 # Extract the first word of "msgfmt", so it can be a program name with args.
2512 set dummy msgfmt; ac_word=$2
2513 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2514 echo "configure:2515: checking for $ac_word" >&5
2515 if eval "test \"`echo '$''{'ac_cv_path_MSGFMT'+set}'`\" = set"; then
2516 echo $ac_n "(cached) $ac_c" 1>&6
2517 else
2518 case "$MSGFMT" in
2519 /*)
2520 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
2521 ;;
2522 *)
2523 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2524 for ac_dir in $PATH; do
2525 test -z "$ac_dir" && ac_dir=.
2526 if test -f $ac_dir/$ac_word; then
2527 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
2528 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
2529 break
2530 fi
2531 fi
2532 done
2533 IFS="$ac_save_ifs"
2534 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="msgfmt"
2535 ;;
2536 esac
2537 fi
2538 MSGFMT="$ac_cv_path_MSGFMT"
2539 if test -n "$MSGFMT"; then
2540 echo "$ac_t""$MSGFMT" 1>&6
2541 else
2542 echo "$ac_t""no" 1>&6
2543 fi
2544
2545 # Extract the first word of "gmsgfmt", so it can be a program name with args.
2546 set dummy gmsgfmt; ac_word=$2
2547 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2548 echo "configure:2549: checking for $ac_word" >&5
2549 if eval "test \"`echo '$''{'ac_cv_path_GMSGFMT'+set}'`\" = set"; then
2550 echo $ac_n "(cached) $ac_c" 1>&6
2551 else
2552 case "$GMSGFMT" in
2553 /*)
2554 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
2555 ;;
2556 ?:/*)
2557 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a dos path.
2558 ;;
2559 *)
2560 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2561 ac_dummy="$PATH"
2562 for ac_dir in $ac_dummy; do
2563 test -z "$ac_dir" && ac_dir=.
2564 if test -f $ac_dir/$ac_word; then
2565 ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
2566 break
2567 fi
2568 done
2569 IFS="$ac_save_ifs"
2570 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
2571 ;;
2572 esac
2573 fi
2574 GMSGFMT="$ac_cv_path_GMSGFMT"
2575 if test -n "$GMSGFMT"; then
2576 echo "$ac_t""$GMSGFMT" 1>&6
2577 else
2578 echo "$ac_t""no" 1>&6
2579 fi
2580
2581 # Extract the first word of "xgettext", so it can be a program name with args.
2582 set dummy xgettext; ac_word=$2
2583 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2584 echo "configure:2585: checking for $ac_word" >&5
2585 if eval "test \"`echo '$''{'ac_cv_path_XGETTEXT'+set}'`\" = set"; then
2586 echo $ac_n "(cached) $ac_c" 1>&6
2587 else
2588 case "$XGETTEXT" in
2589 /*)
2590 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
2591 ;;
2592 *)
2593 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2594 for ac_dir in $PATH; do
2595 test -z "$ac_dir" && ac_dir=.
2596 if test -f $ac_dir/$ac_word; then
2597 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
2598 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
2599 break
2600 fi
2601 fi
2602 done
2603 IFS="$ac_save_ifs"
2604 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
2605 ;;
2606 esac
2607 fi
2608 XGETTEXT="$ac_cv_path_XGETTEXT"
2609 if test -n "$XGETTEXT"; then
2610 echo "$ac_t""$XGETTEXT" 1>&6
2611 else
2612 echo "$ac_t""no" 1>&6
2613 fi
2614
2615
2616 USE_INCLUDED_LIBINTL=yes
2617 CATOBJEXT=.gmo
2618 INSTOBJEXT=.mo
2619 DATADIRNAME=share
2620 INTLDEPS='$(top_builddir)/../intl/libintl.a'
2621 INTLLIBS=$INTLDEPS
2622 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
2623 nls_cv_header_intl=libintl.h
2624 nls_cv_header_libgt=libgettext.h
2625 fi
2626
2627 if test "$XGETTEXT" != ":"; then
2628 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
2629 : ;
2630 else
2631 echo "$ac_t""found xgettext programs is not GNU xgettext; ignore it" 1>&6
2632 XGETTEXT=":"
2633 fi
2634 fi
2635
2636 # We need to process the po/ directory.
2637 POSUB=po
2638 else
2639 DATADIRNAME=share
2640 nls_cv_header_intl=libintl.h
2641 nls_cv_header_libgt=libgettext.h
2642 fi
2643
2644 # If this is used in GNU gettext we have to set USE_NLS to `yes'
2645 # because some of the sources are only built for this goal.
2646 if test "$PACKAGE" = gettext; then
2647 USE_NLS=yes
2648 USE_INCLUDED_LIBINTL=yes
2649 fi
2650
2651 for lang in $ALL_LINGUAS; do
2652 GMOFILES="$GMOFILES $lang.gmo"
2653 POFILES="$POFILES $lang.po"
2654 done
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669 if test "x$CATOBJEXT" != "x"; then
2670 if test "x$ALL_LINGUAS" = "x"; then
2671 LINGUAS=
2672 else
2673 echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
2674 echo "configure:2675: checking for catalogs to be installed" >&5
2675 NEW_LINGUAS=
2676 for lang in ${LINGUAS=$ALL_LINGUAS}; do
2677 case "$ALL_LINGUAS" in
2678 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
2679 esac
2680 done
2681 LINGUAS=$NEW_LINGUAS
2682 echo "$ac_t""$LINGUAS" 1>&6
2683 fi
2684
2685 if test -n "$LINGUAS"; then
2686 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
2687 fi
2688 fi
2689
2690 if test $ac_cv_header_locale_h = yes; then
2691 INCLUDE_LOCALE_H="#include <locale.h>"
2692 else
2693 INCLUDE_LOCALE_H="\
2694 /* The system does not provide the header <locale.h>. Take care yourself. */"
2695 fi
2696
2697
2698 if test -f $srcdir/po2tbl.sed.in; then
2699 if test "$CATOBJEXT" = ".cat"; then
2700 ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
2701 echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
2702 echo "configure:2703: checking for linux/version.h" >&5
2703 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2704 echo $ac_n "(cached) $ac_c" 1>&6
2705 else
2706 cat > conftest.$ac_ext <<EOF
2707 #line 2708 "configure"
2708 #include "confdefs.h"
2709 #include <linux/version.h>
2710 EOF
2711 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2712 { (eval echo configure:2713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2713 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2714 if test -z "$ac_err"; then
2715 rm -rf conftest*
2716 eval "ac_cv_header_$ac_safe=yes"
2717 else
2718 echo "$ac_err" >&5
2719 echo "configure: failed program was:" >&5
2720 cat conftest.$ac_ext >&5
2721 rm -rf conftest*
2722 eval "ac_cv_header_$ac_safe=no"
2723 fi
2724 rm -f conftest*
2725 fi
2726 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2727 echo "$ac_t""yes" 1>&6
2728 msgformat=linux
2729 else
2730 echo "$ac_t""no" 1>&6
2731 msgformat=xopen
2732 fi
2733
2734
2735 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
2736 fi
2737 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
2738 $srcdir/po2tbl.sed.in > po2tbl.sed
2739 fi
2740
2741 if test "$PACKAGE" = "gettext"; then
2742 GT_NO="#NO#"
2743 GT_YES=
2744 else
2745 GT_NO=
2746 GT_YES="#YES#"
2747 fi
2748
2749
2750
2751 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
2752
2753
2754 l=
2755
2756
2757 if test -d $srcdir/po; then
2758 test -d po || mkdir po
2759 if test "x$srcdir" != "x."; then
2760 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
2761 posrcprefix="$srcdir/"
2762 else
2763 posrcprefix="../$srcdir/"
2764 fi
2765 else
2766 posrcprefix="../"
2767 fi
2768 rm -f po/POTFILES
2769 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
2770 < $srcdir/po/POTFILES.in > po/POTFILES
2771 fi
2772
2773
2774
2775 CONFIG_OBS=
2776 CONFIG_DEPS=
2777 CONFIG_SRCS=
2778
2779 configdirs="doc testsuite"
2780
2781
2782 . ${srcdir}/configure.host
2783
2784 . ${srcdir}/configure.tgt
2785
2786
2787 # Find a good install program. We prefer a C program (faster),
2788 # so one script is as good as another. But avoid the broken or
2789 # incompatible versions:
2790 # SysV /etc/install, /usr/sbin/install
2791 # SunOS /usr/etc/install
2792 # IRIX /sbin/install
2793 # AIX /bin/install
2794 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2795 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2796 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2797 # ./install, which can be erroneously created by make from ./install.sh.
2798 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2799 echo "configure:2800: checking for a BSD compatible install" >&5
2800 if test -z "$INSTALL"; then
2801 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
2802 echo $ac_n "(cached) $ac_c" 1>&6
2803 else
2804 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
2805 for ac_dir in $PATH; do
2806 # Account for people who put trailing slashes in PATH elements.
2807 case "$ac_dir/" in
2808 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2809 *)
2810 # OSF1 and SCO ODT 3.0 have their own names for install.
2811 # Don't use installbsd from OSF since it installs stuff as root
2812 # by default.
2813 for ac_prog in ginstall scoinst install; do
2814 if test -f $ac_dir/$ac_prog; then
2815 if test $ac_prog = install &&
2816 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2817 # AIX install. It has an incompatible calling convention.
2818 :
2819 else
2820 ac_cv_path_install="$ac_dir/$ac_prog -c"
2821 break 2
2822 fi
2823 fi
2824 done
2825 ;;
2826 esac
2827 done
2828 IFS="$ac_save_IFS"
2829
2830 fi
2831 if test "${ac_cv_path_install+set}" = set; then
2832 INSTALL="$ac_cv_path_install"
2833 else
2834 # As a last resort, use the slow shell script. We don't cache a
2835 # path for INSTALL within a source directory, because that will
2836 # break other packages using the cache if that directory is
2837 # removed, or if the path is relative.
2838 INSTALL="$ac_install_sh"
2839 fi
2840 fi
2841 echo "$ac_t""$INSTALL" 1>&6
2842
2843 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2844 # It thinks the first close brace ends the variable substitution.
2845 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2846
2847 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
2848
2849 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2850
2851 if test $host != $build; then
2852 ac_tool_prefix=${host_alias}-
2853 else
2854 ac_tool_prefix=
2855 fi
2856
2857 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
2858 set dummy ${ac_tool_prefix}ar; ac_word=$2
2859 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2860 echo "configure:2861: checking for $ac_word" >&5
2861 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
2862 echo $ac_n "(cached) $ac_c" 1>&6
2863 else
2864 if test -n "$AR"; then
2865 ac_cv_prog_AR="$AR" # Let the user override the test.
2866 else
2867 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2868 ac_dummy="$PATH"
2869 for ac_dir in $ac_dummy; do
2870 test -z "$ac_dir" && ac_dir=.
2871 if test -f $ac_dir/$ac_word; then
2872 ac_cv_prog_AR="${ac_tool_prefix}ar"
2873 break
2874 fi
2875 done
2876 IFS="$ac_save_ifs"
2877 test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
2878 fi
2879 fi
2880 AR="$ac_cv_prog_AR"
2881 if test -n "$AR"; then
2882 echo "$ac_t""$AR" 1>&6
2883 else
2884 echo "$ac_t""no" 1>&6
2885 fi
2886
2887
2888
2889 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
2890 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
2891 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2892 echo "configure:2893: checking for $ac_word" >&5
2893 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2894 echo $ac_n "(cached) $ac_c" 1>&6
2895 else
2896 if test -n "$RANLIB"; then
2897 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2898 else
2899 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2900 ac_dummy="$PATH"
2901 for ac_dir in $ac_dummy; do
2902 test -z "$ac_dir" && ac_dir=.
2903 if test -f $ac_dir/$ac_word; then
2904 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
2905 break
2906 fi
2907 done
2908 IFS="$ac_save_ifs"
2909 fi
2910 fi
2911 RANLIB="$ac_cv_prog_RANLIB"
2912 if test -n "$RANLIB"; then
2913 echo "$ac_t""$RANLIB" 1>&6
2914 else
2915 echo "$ac_t""no" 1>&6
2916 fi
2917
2918
2919 if test -z "$ac_cv_prog_RANLIB"; then
2920 if test -n "$ac_tool_prefix"; then
2921 # Extract the first word of "ranlib", so it can be a program name with args.
2922 set dummy ranlib; ac_word=$2
2923 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2924 echo "configure:2925: checking for $ac_word" >&5
2925 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2926 echo $ac_n "(cached) $ac_c" 1>&6
2927 else
2928 if test -n "$RANLIB"; then
2929 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2930 else
2931 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2932 ac_dummy="$PATH"
2933 for ac_dir in $ac_dummy; do
2934 test -z "$ac_dir" && ac_dir=.
2935 if test -f $ac_dir/$ac_word; then
2936 ac_cv_prog_RANLIB="ranlib"
2937 break
2938 fi
2939 done
2940 IFS="$ac_save_ifs"
2941 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2942 fi
2943 fi
2944 RANLIB="$ac_cv_prog_RANLIB"
2945 if test -n "$RANLIB"; then
2946 echo "$ac_t""$RANLIB" 1>&6
2947 else
2948 echo "$ac_t""no" 1>&6
2949 fi
2950
2951 else
2952 RANLIB=":"
2953 fi
2954 fi
2955
2956 for ac_prog in 'bison -y' byacc
2957 do
2958 # Extract the first word of "$ac_prog", so it can be a program name with args.
2959 set dummy $ac_prog; ac_word=$2
2960 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2961 echo "configure:2962: checking for $ac_word" >&5
2962 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
2963 echo $ac_n "(cached) $ac_c" 1>&6
2964 else
2965 if test -n "$YACC"; then
2966 ac_cv_prog_YACC="$YACC" # Let the user override the test.
2967 else
2968 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2969 ac_dummy="$PATH"
2970 for ac_dir in $ac_dummy; do
2971 test -z "$ac_dir" && ac_dir=.
2972 if test -f $ac_dir/$ac_word; then
2973 ac_cv_prog_YACC="$ac_prog"
2974 break
2975 fi
2976 done
2977 IFS="$ac_save_ifs"
2978 fi
2979 fi
2980 YACC="$ac_cv_prog_YACC"
2981 if test -n "$YACC"; then
2982 echo "$ac_t""$YACC" 1>&6
2983 else
2984 echo "$ac_t""no" 1>&6
2985 fi
2986
2987 test -n "$YACC" && break
2988 done
2989 test -n "$YACC" || YACC="yacc"
2990
2991
2992 if test "$program_transform_name" = s,x,x,; then
2993 program_transform_name=
2994 else
2995 # Double any \ or $. echo might interpret backslashes.
2996 cat <<\EOF_SED > conftestsed
2997 s,\\,\\\\,g; s,\$,$$,g
2998 EOF_SED
2999 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
3000 rm -f conftestsed
3001 fi
3002 test "$program_prefix" != NONE &&
3003 program_transform_name="s,^,${program_prefix},; $program_transform_name"
3004 # Use a double $ so make ignores it.
3005 test "$program_suffix" != NONE &&
3006 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
3007
3008 # sed with no file args requires a program.
3009 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
3010
3011
3012 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3013 echo "configure:3014: checking return type of signal handlers" >&5
3014 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3015 echo $ac_n "(cached) $ac_c" 1>&6
3016 else
3017 cat > conftest.$ac_ext <<EOF
3018 #line 3019 "configure"
3019 #include "confdefs.h"
3020 #include <sys/types.h>
3021 #include <signal.h>
3022 #ifdef signal
3023 #undef signal
3024 #endif
3025 #ifdef __cplusplus
3026 extern "C" void (*signal (int, void (*)(int)))(int);
3027 #else
3028 void (*signal ()) ();
3029 #endif
3030
3031 int main() {
3032 int i;
3033 ; return 0; }
3034 EOF
3035 if { (eval echo configure:3036: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3036 rm -rf conftest*
3037 ac_cv_type_signal=void
3038 else
3039 echo "configure: failed program was:" >&5
3040 cat conftest.$ac_ext >&5
3041 rm -rf conftest*
3042 ac_cv_type_signal=int
3043 fi
3044 rm -f conftest*
3045 fi
3046
3047 echo "$ac_t""$ac_cv_type_signal" 1>&6
3048 cat >> confdefs.h <<EOF
3049 #define RETSIGTYPE $ac_cv_type_signal
3050 EOF
3051
3052
3053
3054 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3055 echo "configure:3056: checking for ANSI C header files" >&5
3056 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3057 echo $ac_n "(cached) $ac_c" 1>&6
3058 else
3059 cat > conftest.$ac_ext <<EOF
3060 #line 3061 "configure"
3061 #include "confdefs.h"
3062 #include <stdlib.h>
3063 #include <stdarg.h>
3064 #include <string.h>
3065 #include <float.h>
3066 EOF
3067 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3068 { (eval echo configure:3069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3069 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3070 if test -z "$ac_err"; then
3071 rm -rf conftest*
3072 ac_cv_header_stdc=yes
3073 else
3074 echo "$ac_err" >&5
3075 echo "configure: failed program was:" >&5
3076 cat conftest.$ac_ext >&5
3077 rm -rf conftest*
3078 ac_cv_header_stdc=no
3079 fi
3080 rm -f conftest*
3081
3082 if test $ac_cv_header_stdc = yes; then
3083 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3084 cat > conftest.$ac_ext <<EOF
3085 #line 3086 "configure"
3086 #include "confdefs.h"
3087 #include <string.h>
3088 EOF
3089 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3090 egrep "memchr" >/dev/null 2>&1; then
3091 :
3092 else
3093 rm -rf conftest*
3094 ac_cv_header_stdc=no
3095 fi
3096 rm -f conftest*
3097
3098 fi
3099
3100 if test $ac_cv_header_stdc = yes; then
3101 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3102 cat > conftest.$ac_ext <<EOF
3103 #line 3104 "configure"
3104 #include "confdefs.h"
3105 #include <stdlib.h>
3106 EOF
3107 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3108 egrep "free" >/dev/null 2>&1; then
3109 :
3110 else
3111 rm -rf conftest*
3112 ac_cv_header_stdc=no
3113 fi
3114 rm -f conftest*
3115
3116 fi
3117
3118 if test $ac_cv_header_stdc = yes; then
3119 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3120 if test "$cross_compiling" = yes; then
3121 :
3122 else
3123 cat > conftest.$ac_ext <<EOF
3124 #line 3125 "configure"
3125 #include "confdefs.h"
3126 #include <ctype.h>
3127 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3128 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3129 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3130 int main () { int i; for (i = 0; i < 256; i++)
3131 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3132 exit (0); }
3133
3134 EOF
3135 if { (eval echo configure:3136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3136 then
3137 :
3138 else
3139 echo "configure: failed program was:" >&5
3140 cat conftest.$ac_ext >&5
3141 rm -fr conftest*
3142 ac_cv_header_stdc=no
3143 fi
3144 rm -fr conftest*
3145 fi
3146
3147 fi
3148 fi
3149
3150 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3151 if test $ac_cv_header_stdc = yes; then
3152 cat >> confdefs.h <<\EOF
3153 #define STDC_HEADERS 1
3154 EOF
3155
3156 fi
3157
3158
3159 for ac_hdr in ctype.h curses.h endian.h libintl.h link.h \
3160 memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \
3161 string.h sys/procfs.h sys/ptrace.h sys/reg.h \
3162 term.h termio.h termios.h unistd.h wait.h sys/wait.h \
3163 wchar.h wctype.h asm/debugreg.h
3164 do
3165 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3166 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3167 echo "configure:3168: checking for $ac_hdr" >&5
3168 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3169 echo $ac_n "(cached) $ac_c" 1>&6
3170 else
3171 cat > conftest.$ac_ext <<EOF
3172 #line 3173 "configure"
3173 #include "confdefs.h"
3174 #include <$ac_hdr>
3175 EOF
3176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3177 { (eval echo configure:3178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3179 if test -z "$ac_err"; then
3180 rm -rf conftest*
3181 eval "ac_cv_header_$ac_safe=yes"
3182 else
3183 echo "$ac_err" >&5
3184 echo "configure: failed program was:" >&5
3185 cat conftest.$ac_ext >&5
3186 rm -rf conftest*
3187 eval "ac_cv_header_$ac_safe=no"
3188 fi
3189 rm -f conftest*
3190 fi
3191 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3192 echo "$ac_t""yes" 1>&6
3193 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3194 cat >> confdefs.h <<EOF
3195 #define $ac_tr_hdr 1
3196 EOF
3197
3198 else
3199 echo "$ac_t""no" 1>&6
3200 fi
3201 done
3202
3203 echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
3204 echo "configure:3205: checking whether stat file-mode macros are broken" >&5
3205 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
3206 echo $ac_n "(cached) $ac_c" 1>&6
3207 else
3208 cat > conftest.$ac_ext <<EOF
3209 #line 3210 "configure"
3210 #include "confdefs.h"
3211 #include <sys/types.h>
3212 #include <sys/stat.h>
3213
3214 #if defined(S_ISBLK) && defined(S_IFDIR)
3215 # if S_ISBLK (S_IFDIR)
3216 You lose.
3217 # endif
3218 #endif
3219
3220 #if defined(S_ISBLK) && defined(S_IFCHR)
3221 # if S_ISBLK (S_IFCHR)
3222 You lose.
3223 # endif
3224 #endif
3225
3226 #if defined(S_ISLNK) && defined(S_IFREG)
3227 # if S_ISLNK (S_IFREG)
3228 You lose.
3229 # endif
3230 #endif
3231
3232 #if defined(S_ISSOCK) && defined(S_IFREG)
3233 # if S_ISSOCK (S_IFREG)
3234 You lose.
3235 # endif
3236 #endif
3237
3238 EOF
3239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3240 egrep "You lose" >/dev/null 2>&1; then
3241 rm -rf conftest*
3242 ac_cv_header_stat_broken=yes
3243 else
3244 rm -rf conftest*
3245 ac_cv_header_stat_broken=no
3246 fi
3247 rm -f conftest*
3248
3249 fi
3250
3251 echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
3252 if test $ac_cv_header_stat_broken = yes; then
3253 cat >> confdefs.h <<\EOF
3254 #define STAT_MACROS_BROKEN 1
3255 EOF
3256
3257 fi
3258
3259
3260 echo $ac_n "checking for working const""... $ac_c" 1>&6
3261 echo "configure:3262: checking for working const" >&5
3262 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3263 echo $ac_n "(cached) $ac_c" 1>&6
3264 else
3265 cat > conftest.$ac_ext <<EOF
3266 #line 3267 "configure"
3267 #include "confdefs.h"
3268
3269 int main() {
3270
3271 /* Ultrix mips cc rejects this. */
3272 typedef int charset[2]; const charset x;
3273 /* SunOS 4.1.1 cc rejects this. */
3274 char const *const *ccp;
3275 char **p;
3276 /* NEC SVR4.0.2 mips cc rejects this. */
3277 struct point {int x, y;};
3278 static struct point const zero = {0,0};
3279 /* AIX XL C 1.02.0.0 rejects this.
3280 It does not let you subtract one const X* pointer from another in an arm
3281 of an if-expression whose if-part is not a constant expression */
3282 const char *g = "string";
3283 ccp = &g + (g ? g-g : 0);
3284 /* HPUX 7.0 cc rejects these. */
3285 ++ccp;
3286 p = (char**) ccp;
3287 ccp = (char const *const *) p;
3288 { /* SCO 3.2v4 cc rejects this. */
3289 char *t;
3290 char const *s = 0 ? (char *) 0 : (char const *) 0;
3291
3292 *t++ = 0;
3293 }
3294 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3295 int x[] = {25, 17};
3296 const int *foo = &x[0];
3297 ++foo;
3298 }
3299 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3300 typedef const int *iptr;
3301 iptr p = 0;
3302 ++p;
3303 }
3304 { /* AIX XL C 1.02.0.0 rejects this saying
3305 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3306 struct s { int j; const int *ap[3]; };
3307 struct s *b; b->j = 5;
3308 }
3309 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3310 const int foo = 10;
3311 }
3312
3313 ; return 0; }
3314 EOF
3315 if { (eval echo configure:3316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3316 rm -rf conftest*
3317 ac_cv_c_const=yes
3318 else
3319 echo "configure: failed program was:" >&5
3320 cat conftest.$ac_ext >&5
3321 rm -rf conftest*
3322 ac_cv_c_const=no
3323 fi
3324 rm -f conftest*
3325 fi
3326
3327 echo "$ac_t""$ac_cv_c_const" 1>&6
3328 if test $ac_cv_c_const = no; then
3329 cat >> confdefs.h <<\EOF
3330 #define const
3331 EOF
3332
3333 fi
3334
3335
3336 for ac_func in setpgid sbrk sigaction isascii bzero bcopy btowc
3337 do
3338 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3339 echo "configure:3340: checking for $ac_func" >&5
3340 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3341 echo $ac_n "(cached) $ac_c" 1>&6
3342 else
3343 cat > conftest.$ac_ext <<EOF
3344 #line 3345 "configure"
3345 #include "confdefs.h"
3346 /* System header to define __stub macros and hopefully few prototypes,
3347 which can conflict with char $ac_func(); below. */
3348 #include <assert.h>
3349 /* Override any gcc2 internal prototype to avoid an error. */
3350 /* We use char because int might match the return type of a gcc2
3351 builtin and then its argument prototype would still apply. */
3352 char $ac_func();
3353
3354 int main() {
3355
3356 /* The GNU C library defines this for functions which it implements
3357 to always fail with ENOSYS. Some functions are actually named
3358 something starting with __ and the normal name is an alias. */
3359 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3360 choke me
3361 #else
3362 $ac_func();
3363 #endif
3364
3365 ; return 0; }
3366 EOF
3367 if { (eval echo configure:3368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3368 rm -rf conftest*
3369 eval "ac_cv_func_$ac_func=yes"
3370 else
3371 echo "configure: failed program was:" >&5
3372 cat conftest.$ac_ext >&5
3373 rm -rf conftest*
3374 eval "ac_cv_func_$ac_func=no"
3375 fi
3376 rm -f conftest*
3377 fi
3378
3379 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3380 echo "$ac_t""yes" 1>&6
3381 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3382 cat >> confdefs.h <<EOF
3383 #define $ac_tr_func 1
3384 EOF
3385
3386 else
3387 echo "$ac_t""no" 1>&6
3388 fi
3389 done
3390
3391 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
3392 # for constant arguments. Useless!
3393 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
3394 echo "configure:3395: checking for working alloca.h" >&5
3395 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
3396 echo $ac_n "(cached) $ac_c" 1>&6
3397 else
3398 cat > conftest.$ac_ext <<EOF
3399 #line 3400 "configure"
3400 #include "confdefs.h"
3401 #include <alloca.h>
3402 int main() {
3403 char *p = alloca(2 * sizeof(int));
3404 ; return 0; }
3405 EOF
3406 if { (eval echo configure:3407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3407 rm -rf conftest*
3408 ac_cv_header_alloca_h=yes
3409 else
3410 echo "configure: failed program was:" >&5
3411 cat conftest.$ac_ext >&5
3412 rm -rf conftest*
3413 ac_cv_header_alloca_h=no
3414 fi
3415 rm -f conftest*
3416 fi
3417
3418 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
3419 if test $ac_cv_header_alloca_h = yes; then
3420 cat >> confdefs.h <<\EOF
3421 #define HAVE_ALLOCA_H 1
3422 EOF
3423
3424 fi
3425
3426 echo $ac_n "checking for alloca""... $ac_c" 1>&6
3427 echo "configure:3428: checking for alloca" >&5
3428 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
3429 echo $ac_n "(cached) $ac_c" 1>&6
3430 else
3431 cat > conftest.$ac_ext <<EOF
3432 #line 3433 "configure"
3433 #include "confdefs.h"
3434
3435 #ifdef __GNUC__
3436 # define alloca __builtin_alloca
3437 #else
3438 # ifdef _MSC_VER
3439 # include <malloc.h>
3440 # define alloca _alloca
3441 # else
3442 # if HAVE_ALLOCA_H
3443 # include <alloca.h>
3444 # else
3445 # ifdef _AIX
3446 #pragma alloca
3447 # else
3448 # ifndef alloca /* predefined by HP cc +Olibcalls */
3449 char *alloca ();
3450 # endif
3451 # endif
3452 # endif
3453 # endif
3454 #endif
3455
3456 int main() {
3457 char *p = (char *) alloca(1);
3458 ; return 0; }
3459 EOF
3460 if { (eval echo configure:3461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3461 rm -rf conftest*
3462 ac_cv_func_alloca_works=yes
3463 else
3464 echo "configure: failed program was:" >&5
3465 cat conftest.$ac_ext >&5
3466 rm -rf conftest*
3467 ac_cv_func_alloca_works=no
3468 fi
3469 rm -f conftest*
3470 fi
3471
3472 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
3473 if test $ac_cv_func_alloca_works = yes; then
3474 cat >> confdefs.h <<\EOF
3475 #define HAVE_ALLOCA 1
3476 EOF
3477
3478 fi
3479
3480 if test $ac_cv_func_alloca_works = no; then
3481 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
3482 # that cause trouble. Some versions do not even contain alloca or
3483 # contain a buggy version. If you still want to use their alloca,
3484 # use ar to extract alloca.o from them instead of compiling alloca.c.
3485 ALLOCA=alloca.${ac_objext}
3486 cat >> confdefs.h <<\EOF
3487 #define C_ALLOCA 1
3488 EOF
3489
3490
3491 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
3492 echo "configure:3493: checking whether alloca needs Cray hooks" >&5
3493 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
3494 echo $ac_n "(cached) $ac_c" 1>&6
3495 else
3496 cat > conftest.$ac_ext <<EOF
3497 #line 3498 "configure"
3498 #include "confdefs.h"
3499 #if defined(CRAY) && ! defined(CRAY2)
3500 webecray
3501 #else
3502 wenotbecray
3503 #endif
3504
3505 EOF
3506 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3507 egrep "webecray" >/dev/null 2>&1; then
3508 rm -rf conftest*
3509 ac_cv_os_cray=yes
3510 else
3511 rm -rf conftest*
3512 ac_cv_os_cray=no
3513 fi
3514 rm -f conftest*
3515
3516 fi
3517
3518 echo "$ac_t""$ac_cv_os_cray" 1>&6
3519 if test $ac_cv_os_cray = yes; then
3520 for ac_func in _getb67 GETB67 getb67; do
3521 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3522 echo "configure:3523: checking for $ac_func" >&5
3523 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3524 echo $ac_n "(cached) $ac_c" 1>&6
3525 else
3526 cat > conftest.$ac_ext <<EOF
3527 #line 3528 "configure"
3528 #include "confdefs.h"
3529 /* System header to define __stub macros and hopefully few prototypes,
3530 which can conflict with char $ac_func(); below. */
3531 #include <assert.h>
3532 /* Override any gcc2 internal prototype to avoid an error. */
3533 /* We use char because int might match the return type of a gcc2
3534 builtin and then its argument prototype would still apply. */
3535 char $ac_func();
3536
3537 int main() {
3538
3539 /* The GNU C library defines this for functions which it implements
3540 to always fail with ENOSYS. Some functions are actually named
3541 something starting with __ and the normal name is an alias. */
3542 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3543 choke me
3544 #else
3545 $ac_func();
3546 #endif
3547
3548 ; return 0; }
3549 EOF
3550 if { (eval echo configure:3551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3551 rm -rf conftest*
3552 eval "ac_cv_func_$ac_func=yes"
3553 else
3554 echo "configure: failed program was:" >&5
3555 cat conftest.$ac_ext >&5
3556 rm -rf conftest*
3557 eval "ac_cv_func_$ac_func=no"
3558 fi
3559 rm -f conftest*
3560 fi
3561
3562 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3563 echo "$ac_t""yes" 1>&6
3564 cat >> confdefs.h <<EOF
3565 #define CRAY_STACKSEG_END $ac_func
3566 EOF
3567
3568 break
3569 else
3570 echo "$ac_t""no" 1>&6
3571 fi
3572
3573 done
3574 fi
3575
3576 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
3577 echo "configure:3578: checking stack direction for C alloca" >&5
3578 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
3579 echo $ac_n "(cached) $ac_c" 1>&6
3580 else
3581 if test "$cross_compiling" = yes; then
3582 ac_cv_c_stack_direction=0
3583 else
3584 cat > conftest.$ac_ext <<EOF
3585 #line 3586 "configure"
3586 #include "confdefs.h"
3587 find_stack_direction ()
3588 {
3589 static char *addr = 0;
3590 auto char dummy;
3591 if (addr == 0)
3592 {
3593 addr = &dummy;
3594 return find_stack_direction ();
3595 }
3596 else
3597 return (&dummy > addr) ? 1 : -1;
3598 }
3599 main ()
3600 {
3601 exit (find_stack_direction() < 0);
3602 }
3603 EOF
3604 if { (eval echo configure:3605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3605 then
3606 ac_cv_c_stack_direction=1
3607 else
3608 echo "configure: failed program was:" >&5
3609 cat conftest.$ac_ext >&5
3610 rm -fr conftest*
3611 ac_cv_c_stack_direction=-1
3612 fi
3613 rm -fr conftest*
3614 fi
3615
3616 fi
3617
3618 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
3619 cat >> confdefs.h <<EOF
3620 #define STACK_DIRECTION $ac_cv_c_stack_direction
3621 EOF
3622
3623 fi
3624
3625
3626 echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
3627 echo "configure:3628: checking whether malloc must be declared" >&5
3628 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then
3629 echo $ac_n "(cached) $ac_c" 1>&6
3630 else
3631 cat > conftest.$ac_ext <<EOF
3632 #line 3633 "configure"
3633 #include "confdefs.h"
3634
3635 #include <stdio.h>
3636 #ifdef HAVE_STRING_H
3637 #include <string.h>
3638 #else
3639 #ifdef HAVE_STRINGS_H
3640 #include <strings.h>
3641 #endif
3642 #endif
3643 #ifdef HAVE_STDLIB_H
3644 #include <stdlib.h>
3645 #endif
3646 #ifdef HAVE_UNISTD_H
3647 #include <unistd.h>
3648 #endif
3649 int main() {
3650 char *(*pfn) = (char *(*)) malloc
3651 ; return 0; }
3652 EOF
3653 if { (eval echo configure:3654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3654 rm -rf conftest*
3655 bfd_cv_decl_needed_malloc=no
3656 else
3657 echo "configure: failed program was:" >&5
3658 cat conftest.$ac_ext >&5
3659 rm -rf conftest*
3660 bfd_cv_decl_needed_malloc=yes
3661 fi
3662 rm -f conftest*
3663 fi
3664
3665 echo "$ac_t""$bfd_cv_decl_needed_malloc" 1>&6
3666 if test $bfd_cv_decl_needed_malloc = yes; then
3667 bfd_tr_decl=NEED_DECLARATION_`echo malloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3668 cat >> confdefs.h <<EOF
3669 #define $bfd_tr_decl 1
3670 EOF
3671
3672 fi
3673
3674 echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
3675 echo "configure:3676: checking whether realloc must be declared" >&5
3676 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then
3677 echo $ac_n "(cached) $ac_c" 1>&6
3678 else
3679 cat > conftest.$ac_ext <<EOF
3680 #line 3681 "configure"
3681 #include "confdefs.h"
3682
3683 #include <stdio.h>
3684 #ifdef HAVE_STRING_H
3685 #include <string.h>
3686 #else
3687 #ifdef HAVE_STRINGS_H
3688 #include <strings.h>
3689 #endif
3690 #endif
3691 #ifdef HAVE_STDLIB_H
3692 #include <stdlib.h>
3693 #endif
3694 #ifdef HAVE_UNISTD_H
3695 #include <unistd.h>
3696 #endif
3697 int main() {
3698 char *(*pfn) = (char *(*)) realloc
3699 ; return 0; }
3700 EOF
3701 if { (eval echo configure:3702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3702 rm -rf conftest*
3703 bfd_cv_decl_needed_realloc=no
3704 else
3705 echo "configure: failed program was:" >&5
3706 cat conftest.$ac_ext >&5
3707 rm -rf conftest*
3708 bfd_cv_decl_needed_realloc=yes
3709 fi
3710 rm -f conftest*
3711 fi
3712
3713 echo "$ac_t""$bfd_cv_decl_needed_realloc" 1>&6
3714 if test $bfd_cv_decl_needed_realloc = yes; then
3715 bfd_tr_decl=NEED_DECLARATION_`echo realloc | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3716 cat >> confdefs.h <<EOF
3717 #define $bfd_tr_decl 1
3718 EOF
3719
3720 fi
3721
3722 echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
3723 echo "configure:3724: checking whether free must be declared" >&5
3724 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then
3725 echo $ac_n "(cached) $ac_c" 1>&6
3726 else
3727 cat > conftest.$ac_ext <<EOF
3728 #line 3729 "configure"
3729 #include "confdefs.h"
3730
3731 #include <stdio.h>
3732 #ifdef HAVE_STRING_H
3733 #include <string.h>
3734 #else
3735 #ifdef HAVE_STRINGS_H
3736 #include <strings.h>
3737 #endif
3738 #endif
3739 #ifdef HAVE_STDLIB_H
3740 #include <stdlib.h>
3741 #endif
3742 #ifdef HAVE_UNISTD_H
3743 #include <unistd.h>
3744 #endif
3745 int main() {
3746 char *(*pfn) = (char *(*)) free
3747 ; return 0; }
3748 EOF
3749 if { (eval echo configure:3750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3750 rm -rf conftest*
3751 bfd_cv_decl_needed_free=no
3752 else
3753 echo "configure: failed program was:" >&5
3754 cat conftest.$ac_ext >&5
3755 rm -rf conftest*
3756 bfd_cv_decl_needed_free=yes
3757 fi
3758 rm -f conftest*
3759 fi
3760
3761 echo "$ac_t""$bfd_cv_decl_needed_free" 1>&6
3762 if test $bfd_cv_decl_needed_free = yes; then
3763 bfd_tr_decl=NEED_DECLARATION_`echo free | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3764 cat >> confdefs.h <<EOF
3765 #define $bfd_tr_decl 1
3766 EOF
3767
3768 fi
3769
3770 echo $ac_n "checking whether strerror must be declared""... $ac_c" 1>&6
3771 echo "configure:3772: checking whether strerror must be declared" >&5
3772 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strerror'+set}'`\" = set"; then
3773 echo $ac_n "(cached) $ac_c" 1>&6
3774 else
3775 cat > conftest.$ac_ext <<EOF
3776 #line 3777 "configure"
3777 #include "confdefs.h"
3778
3779 #include <stdio.h>
3780 #ifdef HAVE_STRING_H
3781 #include <string.h>
3782 #else
3783 #ifdef HAVE_STRINGS_H
3784 #include <strings.h>
3785 #endif
3786 #endif
3787 #ifdef HAVE_STDLIB_H
3788 #include <stdlib.h>
3789 #endif
3790 #ifdef HAVE_UNISTD_H
3791 #include <unistd.h>
3792 #endif
3793 int main() {
3794 char *(*pfn) = (char *(*)) strerror
3795 ; return 0; }
3796 EOF
3797 if { (eval echo configure:3798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3798 rm -rf conftest*
3799 bfd_cv_decl_needed_strerror=no
3800 else
3801 echo "configure: failed program was:" >&5
3802 cat conftest.$ac_ext >&5
3803 rm -rf conftest*
3804 bfd_cv_decl_needed_strerror=yes
3805 fi
3806 rm -f conftest*
3807 fi
3808
3809 echo "$ac_t""$bfd_cv_decl_needed_strerror" 1>&6
3810 if test $bfd_cv_decl_needed_strerror = yes; then
3811 bfd_tr_decl=NEED_DECLARATION_`echo strerror | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3812 cat >> confdefs.h <<EOF
3813 #define $bfd_tr_decl 1
3814 EOF
3815
3816 fi
3817
3818 echo $ac_n "checking whether strdup must be declared""... $ac_c" 1>&6
3819 echo "configure:3820: checking whether strdup must be declared" >&5
3820 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strdup'+set}'`\" = set"; then
3821 echo $ac_n "(cached) $ac_c" 1>&6
3822 else
3823 cat > conftest.$ac_ext <<EOF
3824 #line 3825 "configure"
3825 #include "confdefs.h"
3826
3827 #include <stdio.h>
3828 #ifdef HAVE_STRING_H
3829 #include <string.h>
3830 #else
3831 #ifdef HAVE_STRINGS_H
3832 #include <strings.h>
3833 #endif
3834 #endif
3835 #ifdef HAVE_STDLIB_H
3836 #include <stdlib.h>
3837 #endif
3838 #ifdef HAVE_UNISTD_H
3839 #include <unistd.h>
3840 #endif
3841 int main() {
3842 char *(*pfn) = (char *(*)) strdup
3843 ; return 0; }
3844 EOF
3845 if { (eval echo configure:3846: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3846 rm -rf conftest*
3847 bfd_cv_decl_needed_strdup=no
3848 else
3849 echo "configure: failed program was:" >&5
3850 cat conftest.$ac_ext >&5
3851 rm -rf conftest*
3852 bfd_cv_decl_needed_strdup=yes
3853 fi
3854 rm -f conftest*
3855 fi
3856
3857 echo "$ac_t""$bfd_cv_decl_needed_strdup" 1>&6
3858 if test $bfd_cv_decl_needed_strdup = yes; then
3859 bfd_tr_decl=NEED_DECLARATION_`echo strdup | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3860 cat >> confdefs.h <<EOF
3861 #define $bfd_tr_decl 1
3862 EOF
3863
3864 fi
3865
3866
3867 # If we are configured native on GNU/Linux, work around problems with sys/procfs.h
3868 if test "${target}" = "${host}"; then
3869 case "${host}" in
3870 i[3456]86-*-linux*)
3871 cat >> confdefs.h <<\EOF
3872 #define START_INFERIOR_TRAPS_EXPECTED 2
3873 EOF
3874
3875 cat >> confdefs.h <<\EOF
3876 #define sys_quotactl 1
3877 EOF
3878
3879 ;;
3880 esac
3881 fi
3882
3883 echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6
3884 echo "configure:3885: checking for gregset_t type" >&5
3885 if eval "test \"`echo '$''{'gdb_cv_have_gregset_t'+set}'`\" = set"; then
3886 echo $ac_n "(cached) $ac_c" 1>&6
3887 else
3888 cat > conftest.$ac_ext <<EOF
3889 #line 3890 "configure"
3890 #include "confdefs.h"
3891 #include <sys/procfs.h>
3892 int main() {
3893 gregset_t *gregsetp = 0
3894 ; return 0; }
3895 EOF
3896 if { (eval echo configure:3897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3897 rm -rf conftest*
3898 gdb_cv_have_gregset_t=yes
3899 else
3900 echo "configure: failed program was:" >&5
3901 cat conftest.$ac_ext >&5
3902 rm -rf conftest*
3903 gdb_cv_have_gregset_t=no
3904 fi
3905 rm -f conftest*
3906 fi
3907
3908 echo "$ac_t""$gdb_cv_have_gregset_t" 1>&6
3909 if test $gdb_cv_have_gregset_t = yes; then
3910 cat >> confdefs.h <<\EOF
3911 #define HAVE_GREGSET_T 1
3912 EOF
3913
3914 fi
3915
3916 echo $ac_n "checking for fpregset_t type""... $ac_c" 1>&6
3917 echo "configure:3918: checking for fpregset_t type" >&5
3918 if eval "test \"`echo '$''{'gdb_cv_have_fpregset_t'+set}'`\" = set"; then
3919 echo $ac_n "(cached) $ac_c" 1>&6
3920 else
3921 cat > conftest.$ac_ext <<EOF
3922 #line 3923 "configure"
3923 #include "confdefs.h"
3924 #include <sys/procfs.h>
3925 int main() {
3926 fpregset_t *fpregsetp = 0
3927 ; return 0; }
3928 EOF
3929 if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3930 rm -rf conftest*
3931 gdb_cv_have_fpregset_t=yes
3932 else
3933 echo "configure: failed program was:" >&5
3934 cat conftest.$ac_ext >&5
3935 rm -rf conftest*
3936 gdb_cv_have_fpregset_t=no
3937 fi
3938 rm -f conftest*
3939 fi
3940
3941 echo "$ac_t""$gdb_cv_have_fpregset_t" 1>&6
3942 if test $gdb_cv_have_fpregset_t = yes; then
3943 cat >> confdefs.h <<\EOF
3944 #define HAVE_FPREGSET_T 1
3945 EOF
3946
3947 fi
3948
3949 echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
3950 echo "configure:3951: checking for main in -lm" >&5
3951 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
3952 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3953 echo $ac_n "(cached) $ac_c" 1>&6
3954 else
3955 ac_save_LIBS="$LIBS"
3956 LIBS="-lm $LIBS"
3957 cat > conftest.$ac_ext <<EOF
3958 #line 3959 "configure"
3959 #include "confdefs.h"
3960
3961 int main() {
3962 main()
3963 ; return 0; }
3964 EOF
3965 if { (eval echo configure:3966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3966 rm -rf conftest*
3967 eval "ac_cv_lib_$ac_lib_var=yes"
3968 else
3969 echo "configure: failed program was:" >&5
3970 cat conftest.$ac_ext >&5
3971 rm -rf conftest*
3972 eval "ac_cv_lib_$ac_lib_var=no"
3973 fi
3974 rm -f conftest*
3975 LIBS="$ac_save_LIBS"
3976
3977 fi
3978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3979 echo "$ac_t""yes" 1>&6
3980 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3981 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3982 cat >> confdefs.h <<EOF
3983 #define $ac_tr_lib 1
3984 EOF
3985
3986 LIBS="-lm $LIBS"
3987
3988 else
3989 echo "$ac_t""no" 1>&6
3990 fi
3991
3992
3993 echo $ac_n "checking for wctype in -lc""... $ac_c" 1>&6
3994 echo "configure:3995: checking for wctype in -lc" >&5
3995 ac_lib_var=`echo c'_'wctype | sed 'y%./+-%__p_%'`
3996 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3997 echo $ac_n "(cached) $ac_c" 1>&6
3998 else
3999 ac_save_LIBS="$LIBS"
4000 LIBS="-lc $LIBS"
4001 cat > conftest.$ac_ext <<EOF
4002 #line 4003 "configure"
4003 #include "confdefs.h"
4004 /* Override any gcc2 internal prototype to avoid an error. */
4005 /* We use char because int might match the return type of a gcc2
4006 builtin and then its argument prototype would still apply. */
4007 char wctype();
4008
4009 int main() {
4010 wctype()
4011 ; return 0; }
4012 EOF
4013 if { (eval echo configure:4014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4014 rm -rf conftest*
4015 eval "ac_cv_lib_$ac_lib_var=yes"
4016 else
4017 echo "configure: failed program was:" >&5
4018 cat conftest.$ac_ext >&5
4019 rm -rf conftest*
4020 eval "ac_cv_lib_$ac_lib_var=no"
4021 fi
4022 rm -f conftest*
4023 LIBS="$ac_save_LIBS"
4024
4025 fi
4026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4027 echo "$ac_t""yes" 1>&6
4028 :
4029 else
4030 echo "$ac_t""no" 1>&6
4031 echo $ac_n "checking for wctype in -lw""... $ac_c" 1>&6
4032 echo "configure:4033: checking for wctype in -lw" >&5
4033 ac_lib_var=`echo w'_'wctype | sed 'y%./+-%__p_%'`
4034 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4035 echo $ac_n "(cached) $ac_c" 1>&6
4036 else
4037 ac_save_LIBS="$LIBS"
4038 LIBS="-lw $LIBS"
4039 cat > conftest.$ac_ext <<EOF
4040 #line 4041 "configure"
4041 #include "confdefs.h"
4042 /* Override any gcc2 internal prototype to avoid an error. */
4043 /* We use char because int might match the return type of a gcc2
4044 builtin and then its argument prototype would still apply. */
4045 char wctype();
4046
4047 int main() {
4048 wctype()
4049 ; return 0; }
4050 EOF
4051 if { (eval echo configure:4052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4052 rm -rf conftest*
4053 eval "ac_cv_lib_$ac_lib_var=yes"
4054 else
4055 echo "configure: failed program was:" >&5
4056 cat conftest.$ac_ext >&5
4057 rm -rf conftest*
4058 eval "ac_cv_lib_$ac_lib_var=no"
4059 fi
4060 rm -f conftest*
4061 LIBS="$ac_save_LIBS"
4062
4063 fi
4064 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4065 echo "$ac_t""yes" 1>&6
4066 ac_tr_lib=HAVE_LIB`echo w | sed -e 's/^a-zA-Z0-9_/_/g' \
4067 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4068 cat >> confdefs.h <<EOF
4069 #define $ac_tr_lib 1
4070 EOF
4071
4072 LIBS="-lw $LIBS"
4073
4074 else
4075 echo "$ac_t""no" 1>&6
4076 fi
4077
4078 fi
4079
4080
4081
4082
4083
4084 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
4085 echo "configure:4086: checking for long long support in compiler" >&5
4086 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
4087 echo $ac_n "(cached) $ac_c" 1>&6
4088 else
4089 cat > conftest.$ac_ext <<EOF
4090 #line 4091 "configure"
4091 #include "confdefs.h"
4092
4093 int main() {
4094
4095 extern long long foo;
4096 switch (foo & 2) { case 0: return 1; }
4097
4098 ; return 0; }
4099 EOF
4100 if { (eval echo configure:4101: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4101 rm -rf conftest*
4102 gdb_cv_c_long_long=yes
4103 else
4104 echo "configure: failed program was:" >&5
4105 cat conftest.$ac_ext >&5
4106 rm -rf conftest*
4107 gdb_cv_c_long_long=no
4108 fi
4109 rm -f conftest*
4110 fi
4111
4112 echo "$ac_t""$gdb_cv_c_long_long" 1>&6
4113 if test $gdb_cv_c_long_long = yes; then
4114 cat >> confdefs.h <<\EOF
4115 #define CC_HAS_LONG_LONG 1
4116 EOF
4117
4118 fi
4119
4120
4121 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
4122 echo "configure:4123: checking for long long support in printf" >&5
4123 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
4124 echo $ac_n "(cached) $ac_c" 1>&6
4125 else
4126 if test "$cross_compiling" = yes; then
4127 gdb_cv_printf_has_long_long=no
4128 else
4129 cat > conftest.$ac_ext <<EOF
4130 #line 4131 "configure"
4131 #include "confdefs.h"
4132
4133 int main () {
4134 char buf[32];
4135 long long l = 0;
4136 l = (l << 16) + 0x0123;
4137 l = (l << 16) + 0x4567;
4138 l = (l << 16) + 0x89ab;
4139 l = (l << 16) + 0xcdef;
4140 sprintf (buf, "0x%016llx", l);
4141 return (strcmp ("0x0123456789abcdef", buf));
4142 }
4143 EOF
4144 if { (eval echo configure:4145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4145 then
4146 gdb_cv_printf_has_long_long=yes
4147 else
4148 echo "configure: failed program was:" >&5
4149 cat conftest.$ac_ext >&5
4150 rm -fr conftest*
4151 gdb_cv_printf_has_long_long=no
4152 fi
4153 rm -fr conftest*
4154 fi
4155
4156 fi
4157
4158 if test $gdb_cv_printf_has_long_long = yes; then
4159 cat >> confdefs.h <<\EOF
4160 #define PRINTF_HAS_LONG_LONG 1
4161 EOF
4162
4163 fi
4164 echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
4165
4166
4167 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
4168 echo "configure:4169: checking for long double support in compiler" >&5
4169 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
4170 echo $ac_n "(cached) $ac_c" 1>&6
4171 else
4172 cat > conftest.$ac_ext <<EOF
4173 #line 4174 "configure"
4174 #include "confdefs.h"
4175
4176 int main() {
4177 long double foo;
4178 ; return 0; }
4179 EOF
4180 if { (eval echo configure:4181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4181 rm -rf conftest*
4182 ac_cv_c_long_double=yes
4183 else
4184 echo "configure: failed program was:" >&5
4185 cat conftest.$ac_ext >&5
4186 rm -rf conftest*
4187 ac_cv_c_long_double=no
4188 fi
4189 rm -f conftest*
4190 fi
4191
4192 echo "$ac_t""$ac_cv_c_long_double" 1>&6
4193 if test $ac_cv_c_long_double = yes; then
4194 cat >> confdefs.h <<\EOF
4195 #define HAVE_LONG_DOUBLE 1
4196 EOF
4197
4198 fi
4199
4200
4201 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
4202 echo "configure:4203: checking for long double support in printf" >&5
4203 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
4204 echo $ac_n "(cached) $ac_c" 1>&6
4205 else
4206 if test "$cross_compiling" = yes; then
4207 gdb_cv_printf_has_long_double=no
4208 else
4209 cat > conftest.$ac_ext <<EOF
4210 #line 4211 "configure"
4211 #include "confdefs.h"
4212
4213 int main () {
4214 char buf[16];
4215 long double f = 3.141592653;
4216 sprintf (buf, "%Lg", f);
4217 return (strncmp ("3.14159", buf, 7));
4218 }
4219 EOF
4220 if { (eval echo configure:4221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4221 then
4222 gdb_cv_printf_has_long_double=yes
4223 else
4224 echo "configure: failed program was:" >&5
4225 cat conftest.$ac_ext >&5
4226 rm -fr conftest*
4227 gdb_cv_printf_has_long_double=no
4228 fi
4229 rm -fr conftest*
4230 fi
4231
4232 fi
4233
4234 if test $gdb_cv_printf_has_long_double = yes; then
4235 cat >> confdefs.h <<\EOF
4236 #define PRINTF_HAS_LONG_DOUBLE 1
4237 EOF
4238
4239 fi
4240 echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
4241
4242
4243 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
4244 echo "configure:4245: checking for long double support in scanf" >&5
4245 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
4246 echo $ac_n "(cached) $ac_c" 1>&6
4247 else
4248 if test "$cross_compiling" = yes; then
4249 gdb_cv_scanf_has_long_double=no
4250 else
4251 cat > conftest.$ac_ext <<EOF
4252 #line 4253 "configure"
4253 #include "confdefs.h"
4254
4255 int main () {
4256 char *buf = "3.141592653";
4257 long double f = 0;
4258 sscanf (buf, "%Lg", &f);
4259 return !(f > 3.14159 && f < 3.14160);
4260 }
4261 EOF
4262 if { (eval echo configure:4263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4263 then
4264 gdb_cv_scanf_has_long_double=yes
4265 else
4266 echo "configure: failed program was:" >&5
4267 cat conftest.$ac_ext >&5
4268 rm -fr conftest*
4269 gdb_cv_scanf_has_long_double=no
4270 fi
4271 rm -fr conftest*
4272 fi
4273
4274 fi
4275
4276 if test $gdb_cv_scanf_has_long_double = yes; then
4277 cat >> confdefs.h <<\EOF
4278 #define SCANF_HAS_LONG_DOUBLE 1
4279 EOF
4280
4281 fi
4282 echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
4283
4284 for ac_hdr in unistd.h
4285 do
4286 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4287 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4288 echo "configure:4289: checking for $ac_hdr" >&5
4289 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4290 echo $ac_n "(cached) $ac_c" 1>&6
4291 else
4292 cat > conftest.$ac_ext <<EOF
4293 #line 4294 "configure"
4294 #include "confdefs.h"
4295 #include <$ac_hdr>
4296 EOF
4297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4298 { (eval echo configure:4299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4300 if test -z "$ac_err"; then
4301 rm -rf conftest*
4302 eval "ac_cv_header_$ac_safe=yes"
4303 else
4304 echo "$ac_err" >&5
4305 echo "configure: failed program was:" >&5
4306 cat conftest.$ac_ext >&5
4307 rm -rf conftest*
4308 eval "ac_cv_header_$ac_safe=no"
4309 fi
4310 rm -f conftest*
4311 fi
4312 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4313 echo "$ac_t""yes" 1>&6
4314 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4315 cat >> confdefs.h <<EOF
4316 #define $ac_tr_hdr 1
4317 EOF
4318
4319 else
4320 echo "$ac_t""no" 1>&6
4321 fi
4322 done
4323
4324 for ac_func in getpagesize
4325 do
4326 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4327 echo "configure:4328: checking for $ac_func" >&5
4328 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4329 echo $ac_n "(cached) $ac_c" 1>&6
4330 else
4331 cat > conftest.$ac_ext <<EOF
4332 #line 4333 "configure"
4333 #include "confdefs.h"
4334 /* System header to define __stub macros and hopefully few prototypes,
4335 which can conflict with char $ac_func(); below. */
4336 #include <assert.h>
4337 /* Override any gcc2 internal prototype to avoid an error. */
4338 /* We use char because int might match the return type of a gcc2
4339 builtin and then its argument prototype would still apply. */
4340 char $ac_func();
4341
4342 int main() {
4343
4344 /* The GNU C library defines this for functions which it implements
4345 to always fail with ENOSYS. Some functions are actually named
4346 something starting with __ and the normal name is an alias. */
4347 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4348 choke me
4349 #else
4350 $ac_func();
4351 #endif
4352
4353 ; return 0; }
4354 EOF
4355 if { (eval echo configure:4356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4356 rm -rf conftest*
4357 eval "ac_cv_func_$ac_func=yes"
4358 else
4359 echo "configure: failed program was:" >&5
4360 cat conftest.$ac_ext >&5
4361 rm -rf conftest*
4362 eval "ac_cv_func_$ac_func=no"
4363 fi
4364 rm -f conftest*
4365 fi
4366
4367 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4368 echo "$ac_t""yes" 1>&6
4369 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4370 cat >> confdefs.h <<EOF
4371 #define $ac_tr_func 1
4372 EOF
4373
4374 else
4375 echo "$ac_t""no" 1>&6
4376 fi
4377 done
4378
4379 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
4380 echo "configure:4381: checking for working mmap" >&5
4381 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
4382 echo $ac_n "(cached) $ac_c" 1>&6
4383 else
4384 if test "$cross_compiling" = yes; then
4385 ac_cv_func_mmap_fixed_mapped=no
4386 else
4387 cat > conftest.$ac_ext <<EOF
4388 #line 4389 "configure"
4389 #include "confdefs.h"
4390
4391 /* Thanks to Mike Haertel and Jim Avera for this test.
4392 Here is a matrix of mmap possibilities:
4393 mmap private not fixed
4394 mmap private fixed at somewhere currently unmapped
4395 mmap private fixed at somewhere already mapped
4396 mmap shared not fixed
4397 mmap shared fixed at somewhere currently unmapped
4398 mmap shared fixed at somewhere already mapped
4399 For private mappings, we should verify that changes cannot be read()
4400 back from the file, nor mmap's back from the file at a different
4401 address. (There have been systems where private was not correctly
4402 implemented like the infamous i386 svr4.0, and systems where the
4403 VM page cache was not coherent with the filesystem buffer cache
4404 like early versions of FreeBSD and possibly contemporary NetBSD.)
4405 For shared mappings, we should conversely verify that changes get
4406 propogated back to all the places they're supposed to be.
4407
4408 Grep wants private fixed already mapped.
4409 The main things grep needs to know about mmap are:
4410 * does it exist and is it safe to write into the mmap'd area
4411 * how to use it (BSD variants) */
4412 #include <sys/types.h>
4413 #include <fcntl.h>
4414 #include <sys/mman.h>
4415
4416 /* This mess was copied from the GNU getpagesize.h. */
4417 #ifndef HAVE_GETPAGESIZE
4418 # ifdef HAVE_UNISTD_H
4419 # include <unistd.h>
4420 # endif
4421
4422 /* Assume that all systems that can run configure have sys/param.h. */
4423 # ifndef HAVE_SYS_PARAM_H
4424 # define HAVE_SYS_PARAM_H 1
4425 # endif
4426
4427 # ifdef _SC_PAGESIZE
4428 # define getpagesize() sysconf(_SC_PAGESIZE)
4429 # else /* no _SC_PAGESIZE */
4430 # ifdef HAVE_SYS_PARAM_H
4431 # include <sys/param.h>
4432 # ifdef EXEC_PAGESIZE
4433 # define getpagesize() EXEC_PAGESIZE
4434 # else /* no EXEC_PAGESIZE */
4435 # ifdef NBPG
4436 # define getpagesize() NBPG * CLSIZE
4437 # ifndef CLSIZE
4438 # define CLSIZE 1
4439 # endif /* no CLSIZE */
4440 # else /* no NBPG */
4441 # ifdef NBPC
4442 # define getpagesize() NBPC
4443 # else /* no NBPC */
4444 # ifdef PAGESIZE
4445 # define getpagesize() PAGESIZE
4446 # endif /* PAGESIZE */
4447 # endif /* no NBPC */
4448 # endif /* no NBPG */
4449 # endif /* no EXEC_PAGESIZE */
4450 # else /* no HAVE_SYS_PARAM_H */
4451 # define getpagesize() 8192 /* punt totally */
4452 # endif /* no HAVE_SYS_PARAM_H */
4453 # endif /* no _SC_PAGESIZE */
4454
4455 #endif /* no HAVE_GETPAGESIZE */
4456
4457 #ifdef __cplusplus
4458 extern "C" { void *malloc(unsigned); }
4459 #else
4460 char *malloc();
4461 #endif
4462
4463 int
4464 main()
4465 {
4466 char *data, *data2, *data3;
4467 int i, pagesize;
4468 int fd;
4469
4470 pagesize = getpagesize();
4471
4472 /*
4473 * First, make a file with some known garbage in it.
4474 */
4475 data = malloc(pagesize);
4476 if (!data)
4477 exit(1);
4478 for (i = 0; i < pagesize; ++i)
4479 *(data + i) = rand();
4480 umask(0);
4481 fd = creat("conftestmmap", 0600);
4482 if (fd < 0)
4483 exit(1);
4484 if (write(fd, data, pagesize) != pagesize)
4485 exit(1);
4486 close(fd);
4487
4488 /*
4489 * Next, try to mmap the file at a fixed address which
4490 * already has something else allocated at it. If we can,
4491 * also make sure that we see the same garbage.
4492 */
4493 fd = open("conftestmmap", O_RDWR);
4494 if (fd < 0)
4495 exit(1);
4496 data2 = malloc(2 * pagesize);
4497 if (!data2)
4498 exit(1);
4499 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
4500 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
4501 MAP_PRIVATE | MAP_FIXED, fd, 0L))
4502 exit(1);
4503 for (i = 0; i < pagesize; ++i)
4504 if (*(data + i) != *(data2 + i))
4505 exit(1);
4506
4507 /*
4508 * Finally, make sure that changes to the mapped area
4509 * do not percolate back to the file as seen by read().
4510 * (This is a bug on some variants of i386 svr4.0.)
4511 */
4512 for (i = 0; i < pagesize; ++i)
4513 *(data2 + i) = *(data2 + i) + 1;
4514 data3 = malloc(pagesize);
4515 if (!data3)
4516 exit(1);
4517 if (read(fd, data3, pagesize) != pagesize)
4518 exit(1);
4519 for (i = 0; i < pagesize; ++i)
4520 if (*(data + i) != *(data3 + i))
4521 exit(1);
4522 close(fd);
4523 unlink("conftestmmap");
4524 exit(0);
4525 }
4526
4527 EOF
4528 if { (eval echo configure:4529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4529 then
4530 ac_cv_func_mmap_fixed_mapped=yes
4531 else
4532 echo "configure: failed program was:" >&5
4533 cat conftest.$ac_ext >&5
4534 rm -fr conftest*
4535 ac_cv_func_mmap_fixed_mapped=no
4536 fi
4537 rm -fr conftest*
4538 fi
4539
4540 fi
4541
4542 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
4543 if test $ac_cv_func_mmap_fixed_mapped = yes; then
4544 cat >> confdefs.h <<\EOF
4545 #define HAVE_MMAP 1
4546 EOF
4547
4548 fi
4549
4550
4551
4552
4553 if test ${build} = ${host} -a ${host} = ${target} ; then
4554 case ${host_os} in
4555 hpux*)
4556 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
4557 echo "configure:4558: checking for HPUX/OSF thread support" >&5
4558 if test -f /usr/include/dce/cma_config.h ; then
4559 if test "$GCC" = "yes" ; then
4560 echo "$ac_t""yes" 1>&6
4561 cat >> confdefs.h <<\EOF
4562 #define HAVE_HPUX_THREAD_SUPPORT 1
4563 EOF
4564
4565 CONFIG_OBS="${CONFIG_OJS} hpux-thread.o"
4566 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
4567 else
4568 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
4569 fi
4570 else
4571 echo "$ac_t""no" 1>&6
4572 fi
4573 ;;
4574 solaris*)
4575 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
4576 echo "configure:4577: checking for Solaris thread debugging library" >&5
4577 if test -f /usr/lib/libthread_db.so.1 ; then
4578 echo "$ac_t""yes" 1>&6
4579 cat >> confdefs.h <<\EOF
4580 #define HAVE_THREAD_DB_LIB 1
4581 EOF
4582
4583 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
4584 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
4585 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4586 echo "configure:4587: checking for dlopen in -ldl" >&5
4587 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
4588 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4589 echo $ac_n "(cached) $ac_c" 1>&6
4590 else
4591 ac_save_LIBS="$LIBS"
4592 LIBS="-ldl $LIBS"
4593 cat > conftest.$ac_ext <<EOF
4594 #line 4595 "configure"
4595 #include "confdefs.h"
4596 /* Override any gcc2 internal prototype to avoid an error. */
4597 /* We use char because int might match the return type of a gcc2
4598 builtin and then its argument prototype would still apply. */
4599 char dlopen();
4600
4601 int main() {
4602 dlopen()
4603 ; return 0; }
4604 EOF
4605 if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4606 rm -rf conftest*
4607 eval "ac_cv_lib_$ac_lib_var=yes"
4608 else
4609 echo "configure: failed program was:" >&5
4610 cat conftest.$ac_ext >&5
4611 rm -rf conftest*
4612 eval "ac_cv_lib_$ac_lib_var=no"
4613 fi
4614 rm -f conftest*
4615 LIBS="$ac_save_LIBS"
4616
4617 fi
4618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4619 echo "$ac_t""yes" 1>&6
4620 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4621 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4622 cat >> confdefs.h <<EOF
4623 #define $ac_tr_lib 1
4624 EOF
4625
4626 LIBS="-ldl $LIBS"
4627
4628 else
4629 echo "$ac_t""no" 1>&6
4630 fi
4631
4632 if test "$GCC" = "yes" ; then
4633 # The GNU linker requires the -export-dynamic option to make
4634 # all symbols visible in the dynamic symbol table.
4635 hold_ldflags=$LDFLAGS
4636 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
4637 echo "configure:4638: checking for the ld -export-dynamic flag" >&5
4638 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
4639 cat > conftest.$ac_ext <<EOF
4640 #line 4641 "configure"
4641 #include "confdefs.h"
4642
4643 int main() {
4644 int i;
4645 ; return 0; }
4646 EOF
4647 if { (eval echo configure:4648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4648 rm -rf conftest*
4649 found=yes
4650 else
4651 echo "configure: failed program was:" >&5
4652 cat conftest.$ac_ext >&5
4653 rm -rf conftest*
4654 found=no
4655 fi
4656 rm -f conftest*
4657 LDFLAGS=$hold_ldflags
4658 echo "$ac_t""$found" 1>&6
4659 if test $found = yes; then
4660 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
4661 fi
4662 fi
4663 # Sun randomly tweaked the prototypes in <proc_service.h>
4664 # at one point.
4665 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
4666 echo "configure:4667: checking if <proc_service.h> is old" >&5
4667 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
4668 echo $ac_n "(cached) $ac_c" 1>&6
4669 else
4670
4671 cat > conftest.$ac_ext <<EOF
4672 #line 4673 "configure"
4673 #include "confdefs.h"
4674
4675 #include <proc_service.h>
4676 ps_err_e ps_pdwrite
4677 (struct ps_prochandle*, psaddr_t, const void*, size_t);
4678
4679 int main() {
4680
4681 ; return 0; }
4682 EOF
4683 if { (eval echo configure:4684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4684 rm -rf conftest*
4685 gdb_cv_proc_service_is_old=no
4686 else
4687 echo "configure: failed program was:" >&5
4688 cat conftest.$ac_ext >&5
4689 rm -rf conftest*
4690 gdb_cv_proc_service_is_old=yes
4691 fi
4692 rm -f conftest*
4693
4694 fi
4695
4696 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
4697 if test $gdb_cv_proc_service_is_old = yes; then
4698 cat >> confdefs.h <<\EOF
4699 #define PROC_SERVICE_IS_OLD 1
4700 EOF
4701
4702 fi
4703 else
4704 echo "$ac_t""no" 1>&6
4705 fi
4706 ;;
4707 esac
4708
4709 fi
4710
4711 ENABLE_CFLAGS=
4712
4713 # Check whether --enable-tui or --disable-tui was given.
4714 if test "${enable_tui+set}" = set; then
4715 enableval="$enable_tui"
4716
4717 case "${enable_tui}" in
4718 yes | no) ;;
4719 "") enable_tui=yes ;;
4720 *)
4721 { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; }
4722 ;;
4723 esac
4724
4725 fi
4726
4727 case ${enable_tui} in
4728 "yes" )
4729 cat >> confdefs.h <<\EOF
4730 #define TUI 1
4731 EOF
4732
4733 BUILD_TUI=all-tui
4734 TUI_LIBRARY=tui/libtui.a
4735 ;;
4736 * )
4737 BUILD_TUI=
4738 TUI_LIBRARY=
4739 ;;
4740 esac
4741
4742
4743
4744 # Check whether --enable-netrom or --disable-netrom was given.
4745 if test "${enable_netrom+set}" = set; then
4746 enableval="$enable_netrom"
4747 case "${enableval}" in
4748 yes) enable_netrom=yes ;;
4749 no) enable_netrom=no ;;
4750 *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
4751 esac
4752 fi
4753
4754
4755 if test "${enable_netrom}" = "yes"; then
4756 CONFIG_OBS="${CONFIG_OBS} remote-nrom.o"
4757 CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
4758 fi
4759
4760 # Check whether --enable-build-warnings or --disable-build-warnings was given.
4761 if test "${enable_build_warnings+set}" = set; then
4762 enableval="$enable_build_warnings"
4763 build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
4764 case "${enableval}" in
4765 yes) ;;
4766 no) build_warnings="-w";;
4767 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
4768 build_warnings="${build_warnings} ${t}";;
4769 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
4770 build_warnings="${t} ${build_warnings}";;
4771 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
4772 esac
4773 else
4774 build_warnings=""
4775 fi
4776
4777 if test "x${build_warnings}" != x -a "x$GCC" = xyes
4778 then
4779 WARN_CFLAGS="${build_warnings}"
4780 else
4781 WARN_CFLAGS=""
4782 fi
4783
4784
4785 MMALLOC_CFLAGS=
4786 MMALLOC=
4787
4788
4789
4790 # Check whether --with-mmalloc or --without-mmalloc was given.
4791 if test "${with_mmalloc+set}" = set; then
4792 withval="$with_mmalloc"
4793 case "${withval}" in
4794 yes) want_mmalloc=true ;;
4795 no) want_mmalloc=false;;
4796 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
4797 esac
4798 else
4799 want_mmalloc=false
4800 fi
4801
4802 if test x$want_mmalloc = xtrue; then
4803 cat >> confdefs.h <<\EOF
4804 #define USE_MMALLOC 1
4805 EOF
4806
4807 cat >> confdefs.h <<\EOF
4808 #define MMCHECK_FORCE 1
4809 EOF
4810
4811 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
4812 MMALLOC='../mmalloc/libmmalloc.a'
4813 fi
4814
4815 # start-sanitize-carp
4816 # The below takes an educated guess at the targets that
4817 # should be built. It is an interum version that provides
4818 # significant backward compatibility.
4819
4820 # Check whether --enable-carp or --disable-carp was given.
4821 if test "${enable_carp+set}" = set; then
4822 enableval="$enable_carp"
4823 case "${enableval}" in
4824 yes) enable_carp=yes ;;
4825 no) enable_carp=no ;;
4826 *) { echo "configure: error: bad value ${enableval} for carp option" 1>&2; exit 1; } ;;
4827 esac
4828 else
4829 enable_carp=no
4830 fi
4831
4832 # Check whether --enable-targets or --disable-targets was given.
4833 if test "${enable_targets+set}" = set; then
4834 enableval="$enable_targets"
4835 case "${enableval}" in
4836 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
4837 ;;
4838 no) enable_targets= ;;
4839 *) enable_targets="$enableval" ;;
4840 esac
4841 fi
4842
4843 # Canonicalize the secondary target names.
4844 all_targets=false
4845 if test -n "$enable_targets" ; then
4846 if test "$enable_targets" = all ; then
4847 all_targets=true
4848 else
4849 for targ in `echo $enable_targets | sed 's/,/ /g'`
4850 do
4851 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
4852 if test -n "$result" ; then
4853 canon_targets="$canon_targets $result"
4854 fi
4855 done
4856 fi
4857 fi
4858
4859 # Convert the target names into GDB [*]-tdep.c names
4860 selarchs=
4861 for targ in $target $canon_targets
4862 do
4863 if test "x$targ" = "xall" ; then
4864 all_targets=true
4865 else
4866 t_cpu=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
4867 t_vendor=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
4868 t_os=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
4869 mt=`
4870 target=$targ
4871 target_cpu=$t_cpu
4872 target_vendor=$t_vendor
4873 target_os=$t_os
4874 . ${srcdir}/configure.tgt
4875 echo ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt`
4876 if test -r ${mt} ; then
4877 # This gets confused over .mt files that have multiple -tdep.o
4878 tdep=`sed -n '
4879 s/^.*[ =]\([^ ]*\)-tdep.o.*/\1/p
4880 ' $mt`
4881 selarchs="$selarchs $tdep"
4882 fi
4883 fi
4884 done
4885
4886 # We don't do any links based on the target system, just makefile config.
4887
4888 if test x${all_targets} = xfalse ; then
4889
4890 # Target architecture .o files.
4891 ta=
4892
4893 for arch in $selarchs
4894 do
4895 archdefs="$archdefs -DARCH_$arch"
4896 ta="$ta ${arch}-tdep.o"
4897 # Special cases
4898 case "$arch" in
4899 dvp) ta="$ta mips-tdep.o dvp-tdep.o" ;;
4900 esac
4901 done
4902
4903 # Weed out duplicate .o files.
4904 f=""
4905 for i in $ta ; do
4906 case " $f " in
4907 *" $i "*) ;;
4908 *) f="$f $i" ;;
4909 esac
4910 done
4911 ta="$f"
4912
4913 # And duplicate -D flags.
4914 f=""
4915 for i in $archdefs ; do
4916 case " $f " in
4917 *" $i "*) ;;
4918 *) f="$f $i" ;;
4919 esac
4920 done
4921 archdefs="$f"
4922
4923 MACHINE_OBS="$ta"
4924
4925 else # all_targets is true
4926 archdefs=-DARCH_all
4927 MACHINE_OBS='$(ALL_MACHINES)'
4928 fi
4929
4930 if test "${enable_carp}" = yes ; then
4931 gdb_target=carp
4932 gdb_target_cpu=carp
4933 else
4934 MACHINE_OBS="# $MACHINE_OBS"
4935 fi
4936
4937
4938 # end-sanitize-carp
4939 # start-sanitize-gdbtk
4940 # start-sanitize-ide
4941 ENABLE_IDE=
4942 # Check whether --enable-ide or --disable-ide was given.
4943 if test "${enable_ide+set}" = set; then
4944 enableval="$enable_ide"
4945 :
4946 fi
4947
4948 if test "$enable_ide" = yes; then
4949 enable_ide=yes
4950 ENABLE_IDE=1
4951 else
4952 enable_ide=no
4953 fi
4954
4955
4956 # Check whether --with-foundry-libs or --without-foundry-libs was given.
4957 if test "${with_foundry_libs+set}" = set; then
4958 withval="$with_foundry_libs"
4959 FOUNDRY_LIB_BASE=${withval}
4960 fi
4961
4962
4963
4964 #
4965 # This is the Foundry SDK
4966 #
4967 # These variables are used to determine where the Foundry libs and
4968 # header files are located.
4969 #
4970 if test "$FOUNDRY_LIB_BASE" != ""; then
4971 LIBGUI="${FOUNDRY_LIB_BASE}/lib/libgui.a"
4972 GUI_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include"
4973 if test x$enable_ide = xyes; then
4974 IDE_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include -DIDE"
4975 IDE_X="-L${FOUNDRY_LIB_BASE}/lib -lilu-Tk -lilu-c -lilu"
4976 else
4977 IDE_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include"
4978 fi
4979 LIBIDETCL="${FOUNDRY_LIB_BASE}/lib/libidetcl.a"
4980 LIBIDE="${FOUNDRY_LIB_BASE}/lib/libide.a"
4981 IDE_DEPS="${FOUNDRY_LIB_BASE}/lib/libilu-Tk.a ${FOUNDRY_LIB_BASE}/lib/libilu-c.a ${FOUNDRY_LIB_BASE}/lib/libilu.a"
4982 else
4983 # end-sanitize-ide
4984 LIBGUI="../libgui/src/libgui.a"
4985 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
4986 # start-sanitize-ide
4987 if test x$enable_ide = xyes; then
4988 IDE_CFLAGS_X="-I${srcdir}/../libidetcl/src -I${srcdir}/../libide/src -DIDE -I${srcdir}/../ilu/runtime/mainloop"
4989 IDE_X="-L../ilu/runtime/mainloop -lilu-Tk -L../ilu/runtime/c -lilu-c -L../ilu/runtime/kernel -lilu"
4990 else
4991 IDE_CFLAGS_X="-I${srcdir}/../libidetcl/src -I${srcdir}/../libide/src"
4992 fi
4993 LIBIDETCL="../libidetcl/src/libidetcl.a"
4994 LIBIDE="../libide/src/libide.a"
4995 IDE_DEPS="../ilu/runtime/mainloop/libilu-Tk.a ../ilu/runtime/c/libilu-c.a ../ilu/runtime/kernel/libilu.a"
4996 fi
4997
4998 # end-sanitize-ide
4999
5000
5001 # start-sanitize-ide
5002
5003
5004
5005
5006
5007 # end-sanitize-ide
5008
5009
5010 # Check whether --with-cpu or --without-cpu was given.
5011 if test "${with_cpu+set}" = set; then
5012 withval="$with_cpu"
5013 case "${target}" in
5014 powerpc-* | powerpcle-* )
5015 ## It would be nice to keep this table in sync with the one in
5016 ## gcc/configure.
5017 case "${with_cpu}" in
5018 ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
5019 | 604 | 750 )
5020 ## Those are all handled in variants in rs6000-tdep.c, so they're fine.
5021 ;;
5022 common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 )
5023 ## These are all RS6000 variants, as far as GDB is concerned.
5024 with_cpu=rs6000
5025 ;;
5026 603e | ec603e )
5027 with_cpu=603
5028 ;;
5029 604e )
5030 with_cpu=604
5031 ;;
5032 * )
5033 echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2
5034 with_cpu=ppc-uisa
5035 ;;
5036 esac
5037 ;;
5038 * )
5039 echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2
5040 ;;
5041 esac
5042 cat >> confdefs.h <<EOF
5043 #define TARGET_CPU_DEFAULT "${with_cpu}"
5044 EOF
5045
5046
5047 fi
5048
5049
5050
5051 ENABLE_GDBTK=
5052
5053 # Check whether --enable-gdbtk or --disable-gdbtk was given.
5054 if test "${enable_gdbtk+set}" = set; then
5055 enableval="$enable_gdbtk"
5056 case "${enableval}" in
5057 yes)
5058 case "$host" in
5059 *go32*)
5060 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
5061 enable_gdbtk=no ;;
5062 *windows*)
5063 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
5064 enable_gdbtk=no ;;
5065 *)
5066 enable_gdbtk=yes ;;
5067 esac ;;
5068 no)
5069 enable_gdbtk=no ;;
5070 *)
5071 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
5072 esac
5073 else
5074
5075 # Default is on for everything but go32 and Cygwin
5076 case "$host" in
5077 *go32* | *windows*)
5078 ;;
5079 *)
5080 enable_gdbtk=yes ;;
5081 esac
5082
5083 fi
5084
5085
5086 # In the Cygwin environment, we need some additional flags.
5087 echo $ac_n "checking for cygwin""... $ac_c" 1>&6
5088 echo "configure:5089: checking for cygwin" >&5
5089 if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
5090 echo $ac_n "(cached) $ac_c" 1>&6
5091 else
5092 cat > conftest.$ac_ext <<EOF
5093 #line 5094 "configure"
5094 #include "confdefs.h"
5095
5096 #ifdef __CYGWIN32__
5097 lose
5098 #endif
5099 EOF
5100 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5101 egrep "lose" >/dev/null 2>&1; then
5102 rm -rf conftest*
5103 gdb_cv_os_cygwin=yes
5104 else
5105 rm -rf conftest*
5106 gdb_cv_os_cygwin=no
5107 fi
5108 rm -f conftest*
5109
5110 fi
5111
5112 echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
5113
5114 if test x$gdb_cv_os_cygwin = xyes; then
5115 TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`'
5116 else
5117 TERM_LIB=
5118 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
5119 echo "configure:5120: checking for tgetent in -lncurses" >&5
5120 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
5121 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5122 echo $ac_n "(cached) $ac_c" 1>&6
5123 else
5124 ac_save_LIBS="$LIBS"
5125 LIBS="-lncurses $LIBS"
5126 cat > conftest.$ac_ext <<EOF
5127 #line 5128 "configure"
5128 #include "confdefs.h"
5129 /* Override any gcc2 internal prototype to avoid an error. */
5130 /* We use char because int might match the return type of a gcc2
5131 builtin and then its argument prototype would still apply. */
5132 char tgetent();
5133
5134 int main() {
5135 tgetent()
5136 ; return 0; }
5137 EOF
5138 if { (eval echo configure:5139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5139 rm -rf conftest*
5140 eval "ac_cv_lib_$ac_lib_var=yes"
5141 else
5142 echo "configure: failed program was:" >&5
5143 cat conftest.$ac_ext >&5
5144 rm -rf conftest*
5145 eval "ac_cv_lib_$ac_lib_var=no"
5146 fi
5147 rm -f conftest*
5148 LIBS="$ac_save_LIBS"
5149
5150 fi
5151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5152 echo "$ac_t""yes" 1>&6
5153 TERM_LIB=-lncurses
5154 else
5155 echo "$ac_t""no" 1>&6
5156 echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
5157 echo "configure:5158: checking for tgetent in -ltermlib" >&5
5158 ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
5159 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5160 echo $ac_n "(cached) $ac_c" 1>&6
5161 else
5162 ac_save_LIBS="$LIBS"
5163 LIBS="-ltermlib $LIBS"
5164 cat > conftest.$ac_ext <<EOF
5165 #line 5166 "configure"
5166 #include "confdefs.h"
5167 /* Override any gcc2 internal prototype to avoid an error. */
5168 /* We use char because int might match the return type of a gcc2
5169 builtin and then its argument prototype would still apply. */
5170 char tgetent();
5171
5172 int main() {
5173 tgetent()
5174 ; return 0; }
5175 EOF
5176 if { (eval echo configure:5177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5177 rm -rf conftest*
5178 eval "ac_cv_lib_$ac_lib_var=yes"
5179 else
5180 echo "configure: failed program was:" >&5
5181 cat conftest.$ac_ext >&5
5182 rm -rf conftest*
5183 eval "ac_cv_lib_$ac_lib_var=no"
5184 fi
5185 rm -f conftest*
5186 LIBS="$ac_save_LIBS"
5187
5188 fi
5189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5190 echo "$ac_t""yes" 1>&6
5191 TERM_LIB=-ltermlib
5192 else
5193 echo "$ac_t""no" 1>&6
5194 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
5195 echo "configure:5196: checking for tgetent in -ltermcap" >&5
5196 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
5197 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5198 echo $ac_n "(cached) $ac_c" 1>&6
5199 else
5200 ac_save_LIBS="$LIBS"
5201 LIBS="-ltermcap $LIBS"
5202 cat > conftest.$ac_ext <<EOF
5203 #line 5204 "configure"
5204 #include "confdefs.h"
5205 /* Override any gcc2 internal prototype to avoid an error. */
5206 /* We use char because int might match the return type of a gcc2
5207 builtin and then its argument prototype would still apply. */
5208 char tgetent();
5209
5210 int main() {
5211 tgetent()
5212 ; return 0; }
5213 EOF
5214 if { (eval echo configure:5215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5215 rm -rf conftest*
5216 eval "ac_cv_lib_$ac_lib_var=yes"
5217 else
5218 echo "configure: failed program was:" >&5
5219 cat conftest.$ac_ext >&5
5220 rm -rf conftest*
5221 eval "ac_cv_lib_$ac_lib_var=no"
5222 fi
5223 rm -f conftest*
5224 LIBS="$ac_save_LIBS"
5225
5226 fi
5227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5228 echo "$ac_t""yes" 1>&6
5229 TERM_LIB=-ltermcap
5230 else
5231 echo "$ac_t""no" 1>&6
5232 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
5233 echo "configure:5234: checking for tgetent in -lcurses" >&5
5234 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
5235 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5236 echo $ac_n "(cached) $ac_c" 1>&6
5237 else
5238 ac_save_LIBS="$LIBS"
5239 LIBS="-lcurses $LIBS"
5240 cat > conftest.$ac_ext <<EOF
5241 #line 5242 "configure"
5242 #include "confdefs.h"
5243 /* Override any gcc2 internal prototype to avoid an error. */
5244 /* We use char because int might match the return type of a gcc2
5245 builtin and then its argument prototype would still apply. */
5246 char tgetent();
5247
5248 int main() {
5249 tgetent()
5250 ; return 0; }
5251 EOF
5252 if { (eval echo configure:5253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5253 rm -rf conftest*
5254 eval "ac_cv_lib_$ac_lib_var=yes"
5255 else
5256 echo "configure: failed program was:" >&5
5257 cat conftest.$ac_ext >&5
5258 rm -rf conftest*
5259 eval "ac_cv_lib_$ac_lib_var=no"
5260 fi
5261 rm -f conftest*
5262 LIBS="$ac_save_LIBS"
5263
5264 fi
5265 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5266 echo "$ac_t""yes" 1>&6
5267 TERM_LIB=-lcurses
5268 else
5269 echo "$ac_t""no" 1>&6
5270 echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
5271 echo "configure:5272: checking for tgetent in -lterminfo" >&5
5272 ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
5273 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5274 echo $ac_n "(cached) $ac_c" 1>&6
5275 else
5276 ac_save_LIBS="$LIBS"
5277 LIBS="-lterminfo $LIBS"
5278 cat > conftest.$ac_ext <<EOF
5279 #line 5280 "configure"
5280 #include "confdefs.h"
5281 /* Override any gcc2 internal prototype to avoid an error. */
5282 /* We use char because int might match the return type of a gcc2
5283 builtin and then its argument prototype would still apply. */
5284 char tgetent();
5285
5286 int main() {
5287 tgetent()
5288 ; return 0; }
5289 EOF
5290 if { (eval echo configure:5291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5291 rm -rf conftest*
5292 eval "ac_cv_lib_$ac_lib_var=yes"
5293 else
5294 echo "configure: failed program was:" >&5
5295 cat conftest.$ac_ext >&5
5296 rm -rf conftest*
5297 eval "ac_cv_lib_$ac_lib_var=no"
5298 fi
5299 rm -f conftest*
5300 LIBS="$ac_save_LIBS"
5301
5302 fi
5303 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5304 echo "$ac_t""yes" 1>&6
5305 TERM_LIB=-lterminfo
5306 else
5307 echo "$ac_t""no" 1>&6
5308 fi
5309
5310 fi
5311
5312 fi
5313
5314 fi
5315
5316 fi
5317
5318
5319 if test "x$TERM_LIB" = x
5320 then
5321 { echo "configure: error: Could not find a term library" 1>&2; exit 1; }
5322 fi
5323 fi
5324
5325 WIN32LIBS=
5326 WIN32LDAPP=
5327
5328
5329
5330 DLLTOOL=${DLLTOOL-dlltool}
5331 WINDRES=${WINDRES-windres}
5332
5333
5334
5335 if test x$gdb_cv_os_cygwin = xyes; then
5336 WIN32LIBS="-luser32"
5337 if test x$enable_ide = xyes; then
5338 WIN32LIBS="$WIN32LIBS -ladvapi32"
5339 fi
5340 fi
5341
5342 configdir="unix"
5343
5344 GDBTKLIBS=
5345 if test "${enable_gdbtk}" = "yes"; then
5346
5347
5348 #
5349 # Ok, lets find the tcl configuration
5350 # First, look for one uninstalled.
5351 # the alternative search directory is invoked by --with-tclconfig
5352 #
5353
5354 if test x"${no_tcl}" = x ; then
5355 # we reset no_tcl in case something fails here
5356 no_tcl=true
5357 # Check whether --with-tclconfig or --without-tclconfig was given.
5358 if test "${with_tclconfig+set}" = set; then
5359 withval="$with_tclconfig"
5360 with_tclconfig=${withval}
5361 fi
5362
5363 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
5364 echo "configure:5365: checking for Tcl configuration" >&5
5365 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
5366 echo $ac_n "(cached) $ac_c" 1>&6
5367 else
5368
5369
5370 # First check to see if --with-tclconfig was specified.
5371 if test x"${with_tclconfig}" != x ; then
5372 if test -f "${with_tclconfig}/tclConfig.sh" ; then
5373 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
5374 else
5375 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
5376 fi
5377 fi
5378
5379 # then check for a private Tcl installation
5380 if test x"${ac_cv_c_tclconfig}" = x ; then
5381 for i in \
5382 ../tcl \
5383 `ls -dr ../tcl[7-9]* 2>/dev/null` \
5384 ../../tcl \
5385 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
5386 ../../../tcl \
5387 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
5388 if test -f "$i/${configdir}/tclConfig.sh" ; then
5389 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
5390 break
5391 fi
5392 done
5393 fi
5394 # check in a few common install locations
5395 if test x"${ac_cv_c_tclconfig}" = x ; then
5396 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
5397 if test -f "$i/tclConfig.sh" ; then
5398 ac_cv_c_tclconfig=`(cd $i; pwd)`
5399 break
5400 fi
5401 done
5402 fi
5403 # check in a few other private locations
5404 if test x"${ac_cv_c_tclconfig}" = x ; then
5405 for i in \
5406 ${srcdir}/../tcl \
5407 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
5408 if test -f "$i/${configdir}/tclConfig.sh" ; then
5409 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
5410 break
5411 fi
5412 done
5413 fi
5414
5415 fi
5416
5417 if test x"${ac_cv_c_tclconfig}" = x ; then
5418 TCLCONFIG="# no Tcl configs found"
5419 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
5420 else
5421 no_tcl=
5422 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
5423 echo "$ac_t""found $TCLCONFIG" 1>&6
5424 fi
5425 fi
5426
5427 if test -z "${no_tcl}"; then
5428
5429 . $TCLCONFIG
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456 #
5457 # Ok, lets find the tk configuration
5458 # First, look for one uninstalled.
5459 # the alternative search directory is invoked by --with-tkconfig
5460 #
5461
5462 if test x"${no_tk}" = x ; then
5463 # we reset no_tk in case something fails here
5464 no_tk=true
5465 # Check whether --with-tkconfig or --without-tkconfig was given.
5466 if test "${with_tkconfig+set}" = set; then
5467 withval="$with_tkconfig"
5468 with_tkconfig=${withval}
5469 fi
5470
5471 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
5472 echo "configure:5473: checking for Tk configuration" >&5
5473 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
5474 echo $ac_n "(cached) $ac_c" 1>&6
5475 else
5476
5477
5478 # First check to see if --with-tkconfig was specified.
5479 if test x"${with_tkconfig}" != x ; then
5480 if test -f "${with_tkconfig}/tkConfig.sh" ; then
5481 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
5482 else
5483 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
5484 fi
5485 fi
5486
5487 # then check for a private Tk library
5488 if test x"${ac_cv_c_tkconfig}" = x ; then
5489 for i in \
5490 ../tk \
5491 `ls -dr ../tk[4-9]* 2>/dev/null` \
5492 ../../tk \
5493 `ls -dr ../../tk[4-9]* 2>/dev/null` \
5494 ../../../tk \
5495 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
5496 if test -f "$i/${configdir}/tkConfig.sh" ; then
5497 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
5498 break
5499 fi
5500 done
5501 fi
5502 # check in a few common install locations
5503 if test x"${ac_cv_c_tkconfig}" = x ; then
5504 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
5505 if test -f "$i/tkConfig.sh" ; then
5506 ac_cv_c_tkconfig=`(cd $i; pwd)`
5507 break
5508 fi
5509 done
5510 fi
5511 # check in a few other private locations
5512 if test x"${ac_cv_c_tkconfig}" = x ; then
5513 for i in \
5514 ${srcdir}/../tk \
5515 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
5516 if test -f "$i/${configdir}/tkConfig.sh" ; then
5517 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
5518 break
5519 fi
5520 done
5521 fi
5522
5523 fi
5524
5525 if test x"${ac_cv_c_tkconfig}" = x ; then
5526 TKCONFIG="# no Tk configs found"
5527 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
5528 else
5529 no_tk=
5530 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
5531 echo "$ac_t""found $TKCONFIG" 1>&6
5532 fi
5533 fi
5534
5535
5536
5537 # If $no_tk is nonempty, then we can't do Tk, and there is no
5538 # point to doing Tcl.
5539 if test -z "${no_tk}"; then
5540
5541 if test -f "$TKCONFIG" ; then
5542 . $TKCONFIG
5543 fi
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558 #
5559 # Ok, lets find the tcl source trees so we can use the headers
5560 # Warning: transition of version 9 to 10 will break this algorithm
5561 # because 10 sorts before 9. We also look for just tcl. We have to
5562 # be careful that we don't match stuff like tclX by accident.
5563 # the alternative search directory is involked by --with-tclinclude
5564 #
5565
5566 no_tcl=true
5567 echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
5568 echo "configure:5569: checking for Tcl private headers. dir=${configdir}" >&5
5569 # Check whether --with-tclinclude or --without-tclinclude was given.
5570 if test "${with_tclinclude+set}" = set; then
5571 withval="$with_tclinclude"
5572 with_tclinclude=${withval}
5573 fi
5574
5575 if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
5576 echo $ac_n "(cached) $ac_c" 1>&6
5577 else
5578
5579 # first check to see if --with-tclinclude was specified
5580 if test x"${with_tclinclude}" != x ; then
5581 if test -f ${with_tclinclude}/tclInt.h ; then
5582 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
5583 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
5584 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
5585 else
5586 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
5587 fi
5588 fi
5589
5590 # next check if it came with Tcl configuration file
5591 if test x"${ac_cv_c_tclconfig}" = x ; then
5592 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
5593 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
5594 fi
5595 fi
5596
5597 # next check in private source directory
5598 #
5599 # since ls returns lowest version numbers first, reverse its output
5600 if test x"${ac_cv_c_tclh}" = x ; then
5601 for i in \
5602 ${srcdir}/../tcl \
5603 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
5604 ${srcdir}/../../tcl \
5605 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
5606 ${srcdir}/../../../tcl \
5607 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
5608 if test -f $i/generic/tclInt.h ; then
5609 ac_cv_c_tclh=`(cd $i/generic; pwd)`
5610 break
5611 fi
5612 done
5613 fi
5614 # finally check in a few common install locations
5615 #
5616 # since ls returns lowest version numbers first, reverse its output
5617 if test x"${ac_cv_c_tclh}" = x ; then
5618 for i in \
5619 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
5620 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
5621 /usr/local/src/tcl \
5622 /usr/local/lib/tcl \
5623 ${prefix}/include ; do
5624 if test -f $i/generic/tclInt.h ; then
5625 ac_cv_c_tclh=`(cd $i/generic; pwd)`
5626 break
5627 fi
5628 done
5629 fi
5630 # see if one is installed
5631 if test x"${ac_cv_c_tclh}" = x ; then
5632 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
5633 echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
5634 echo "configure:5635: checking for tclInt.h" >&5
5635 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5636 echo $ac_n "(cached) $ac_c" 1>&6
5637 else
5638 cat > conftest.$ac_ext <<EOF
5639 #line 5640 "configure"
5640 #include "confdefs.h"
5641 #include <tclInt.h>
5642 EOF
5643 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5644 { (eval echo configure:5645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5645 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5646 if test -z "$ac_err"; then
5647 rm -rf conftest*
5648 eval "ac_cv_header_$ac_safe=yes"
5649 else
5650 echo "$ac_err" >&5
5651 echo "configure: failed program was:" >&5
5652 cat conftest.$ac_ext >&5
5653 rm -rf conftest*
5654 eval "ac_cv_header_$ac_safe=no"
5655 fi
5656 rm -f conftest*
5657 fi
5658 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5659 echo "$ac_t""yes" 1>&6
5660 ac_cv_c_tclh=installed
5661 else
5662 echo "$ac_t""no" 1>&6
5663 ac_cv_c_tclh=""
5664 fi
5665
5666 fi
5667
5668 fi
5669
5670 if test x"${ac_cv_c_tclh}" = x ; then
5671 TCLHDIR="# no Tcl private headers found"
5672 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
5673 fi
5674 if test x"${ac_cv_c_tclh}" != x ; then
5675 no_tcl=""
5676 if test x"${ac_cv_c_tclh}" = x"installed" ; then
5677 echo "$ac_t""is installed" 1>&6
5678 TCLHDIR=""
5679 else
5680 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
5681 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
5682 TCLHDIR="-I${ac_cv_c_tclh}"
5683 fi
5684 fi
5685
5686
5687
5688
5689 #
5690 # Ok, lets find the tk source trees so we can use the headers
5691 # If the directory (presumably symlink) named "tk" exists, use that one
5692 # in preference to any others. Same logic is used when choosing library
5693 # and again with Tcl. The search order is the best place to look first, then in
5694 # decreasing significance. The loop breaks if the trigger file is found.
5695 # Note the gross little conversion here of srcdir by cd'ing to the found
5696 # directory. This converts the path from a relative to an absolute, so
5697 # recursive cache variables for the path will work right. We check all
5698 # the possible paths in one loop rather than many seperate loops to speed
5699 # things up.
5700 # the alternative search directory is involked by --with-tkinclude
5701 #
5702 no_tk=true
5703 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
5704 echo "configure:5705: checking for Tk private headers" >&5
5705 # Check whether --with-tkinclude or --without-tkinclude was given.
5706 if test "${with_tkinclude+set}" = set; then
5707 withval="$with_tkinclude"
5708 with_tkinclude=${withval}
5709 fi
5710
5711 if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
5712 echo $ac_n "(cached) $ac_c" 1>&6
5713 else
5714
5715 # first check to see if --with-tkinclude was specified
5716 if test x"${with_tkinclude}" != x ; then
5717 if test -f ${with_tkinclude}/tk.h ; then
5718 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
5719 elif test -f ${with_tkinclude}/generic/tk.h ; then
5720 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
5721 else
5722 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
5723 fi
5724 fi
5725
5726 # next check if it came with Tk configuration file
5727 if test x"${ac_cv_c_tkconfig}" = x ; then
5728 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
5729 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
5730 fi
5731 fi
5732
5733 # next check in private source directory
5734 #
5735 # since ls returns lowest version numbers first, reverse its output
5736 if test x"${ac_cv_c_tkh}" = x ; then
5737 for i in \
5738 ${srcdir}/../tk \
5739 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
5740 ${srcdir}/../../tk \
5741 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
5742 ${srcdir}/../../../tk \
5743 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
5744 if test -f $i/generic/tk.h ; then
5745 ac_cv_c_tkh=`(cd $i/generic; pwd)`
5746 break
5747 fi
5748 done
5749 fi
5750 # finally check in a few common install locations
5751 #
5752 # since ls returns lowest version numbers first, reverse its output
5753 if test x"${ac_cv_c_tkh}" = x ; then
5754 for i in \
5755 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
5756 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
5757 /usr/local/src/tk \
5758 /usr/local/lib/tk \
5759 ${prefix}/include ; do
5760 if test -f $i/generic/tk.h ; then
5761 ac_cv_c_tkh=`(cd $i/generic; pwd)`
5762 break
5763 fi
5764 done
5765 fi
5766 # see if one is installed
5767 if test x"${ac_cv_c_tkh}" = x ; then
5768 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
5769 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
5770 echo "configure:5771: checking for tk.h" >&5
5771 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5772 echo $ac_n "(cached) $ac_c" 1>&6
5773 else
5774 cat > conftest.$ac_ext <<EOF
5775 #line 5776 "configure"
5776 #include "confdefs.h"
5777 #include <tk.h>
5778 EOF
5779 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5780 { (eval echo configure:5781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5781 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5782 if test -z "$ac_err"; then
5783 rm -rf conftest*
5784 eval "ac_cv_header_$ac_safe=yes"
5785 else
5786 echo "$ac_err" >&5
5787 echo "configure: failed program was:" >&5
5788 cat conftest.$ac_ext >&5
5789 rm -rf conftest*
5790 eval "ac_cv_header_$ac_safe=no"
5791 fi
5792 rm -f conftest*
5793 fi
5794 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5795 echo "$ac_t""yes" 1>&6
5796 ac_cv_c_tkh=installed
5797 else
5798 echo "$ac_t""no" 1>&6
5799 ac_cv_c_tkh=""
5800 fi
5801
5802 fi
5803
5804 fi
5805
5806 if test x"${ac_cv_c_tkh}" != x ; then
5807 no_tk=""
5808 if test x"${ac_cv_c_tkh}" = x"installed" ; then
5809 echo "$ac_t""is installed" 1>&6
5810 TKHDIR=""
5811 else
5812 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
5813 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
5814 TKHDIR="-I${ac_cv_c_tkh}"
5815 fi
5816 else
5817 TKHDIR="# no Tk directory found"
5818 echo "configure: warning: Can't find Tk private headers" 1>&2
5819 no_tk=true
5820 fi
5821
5822
5823
5824
5825 echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
5826 echo "configure:5827: checking for Itcl private headers. srcdir=${srcdir}" >&5
5827 if test x"${ac_cv_c_itclh}" = x ; then
5828 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
5829 if test -f $i/generic/itcl.h ; then
5830 ac_cv_c_itclh=`(cd $i/generic; pwd)`
5831 break
5832 fi
5833 done
5834 fi
5835 if test x"${ac_cv_c_itclh}" = x ; then
5836 ITCLHDIR="# no Itcl private headers found"
5837 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
5838 fi
5839 if test x"${ac_cv_c_itclh}" != x ; then
5840 ITCLHDIR="-I${ac_cv_c_itclh}"
5841 fi
5842 # should always be here
5843 # ITCLLIB="../itcl/itcl/unix/libitcl.a"
5844
5845 #AC_SUBST(ITCLLIB)
5846
5847
5848 echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
5849 echo "configure:5850: checking for Itk private headers. srcdir=${srcdir}" >&5
5850 if test x"${ac_cv_c_itkh}" = x ; then
5851 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
5852 if test -f $i/generic/itk.h ; then
5853 ac_cv_c_itkh=`(cd $i/generic; pwd)`
5854 break
5855 fi
5856 done
5857 fi
5858 if test x"${ac_cv_c_itkh}" = x ; then
5859 ITKHDIR="# no Itk private headers found"
5860 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
5861 fi
5862 if test x"${ac_cv_c_itkh}" != x ; then
5863 ITKHDIR="-I${ac_cv_c_itkh}"
5864 fi
5865 # should always be here
5866 # ITKLIB="../itcl/itk/unix/libitk.a"
5867
5868 #AC_SUBST(ITKLIB)
5869
5870
5871 echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
5872 echo "configure:5873: checking for Tix private headers. srcdir=${srcdir}" >&5
5873 if test x"${ac_cv_c_tixh}" = x ; then
5874 for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
5875 if test -f $i/generic/tix.h ; then
5876 ac_cv_c_tixh=`(cd $i/generic; pwd)`
5877 break
5878 fi
5879 done
5880 fi
5881 if test x"${ac_cv_c_tixh}" = x ; then
5882 TIXHDIR="# no Tix private headers found"
5883 { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; }
5884 fi
5885 if test x"${ac_cv_c_tixh}" != x ; then
5886 TIXHDIR="-I${ac_cv_c_tixh}"
5887 fi
5888
5889
5890
5891 # now look for Itcl library stuff
5892
5893
5894 #
5895 # Ok, lets find the itcl configuration
5896 # First, look for one uninstalled.
5897 # the alternative search directory is invoked by --with-itclconfig
5898 #
5899
5900 if test x"${no_itcl}" = x ; then
5901 # we reset no_itcl in case something fails here
5902 no_itcl=true
5903 # Check whether --with-itclconfig or --without-itclconfig was given.
5904 if test "${with_itclconfig+set}" = set; then
5905 withval="$with_itclconfig"
5906 with_itclconfig=${withval}
5907 fi
5908
5909 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
5910 echo "configure:5911: checking for Itcl configuration" >&5
5911 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
5912 echo $ac_n "(cached) $ac_c" 1>&6
5913 else
5914
5915
5916 # First check to see if --with-itclconfig was specified.
5917 if test x"${with_itclconfig}" != x ; then
5918 if test -f "${with_itclconfig}/itclConfig.sh" ; then
5919 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
5920 else
5921 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
5922 fi
5923 fi
5924
5925 # then check for a private Itcl library
5926 if test x"${ac_cv_c_itclconfig}" = x ; then
5927 for i in \
5928 ../itcl/itcl \
5929 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
5930 ../../itcl \
5931 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
5932 ../../../itcl \
5933 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
5934 if test -f "$i/${configdir}/itclConfig.sh" ; then
5935 ac_cv_c_itclconfig=`(cd $i/${configdir}; pwd)`
5936 break
5937 fi
5938 done
5939 fi
5940 # check in a few common install locations
5941 if test x"${ac_cv_c_itclconfig}" = x ; then
5942 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
5943 if test -f "$i/itclConfig.sh" ; then
5944 ac_cv_c_itclconfig=`(cd $i; pwd)`
5945 break
5946 fi
5947 done
5948 fi
5949 # check in a few other private locations
5950 if test x"${ac_cv_c_itclconfig}" = x ; then
5951 for i in \
5952 ${srcdir}/../itcl/itcl \
5953 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
5954 if test -f "$i/${configdir}/itclConfig.sh" ; then
5955 ac_cv_c_itclconfig=`(cd $i/${configdir}; pwd)`
5956 break
5957 fi
5958 done
5959 fi
5960
5961 fi
5962
5963 if test x"${ac_cv_c_itclconfig}" = x ; then
5964 ITCLCONFIG="# no Itcl configs found"
5965 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
5966 else
5967 no_itcl=
5968 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
5969 echo "$ac_t""found $ITCLCONFIG" 1>&6
5970 fi
5971 fi
5972
5973
5974 if test -z "${no_itcl}"; then
5975
5976 if test -f "$ITCLCONFIG" ; then
5977 . $ITCLCONFIG
5978 fi
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990 case "${host}" in
5991 *-*-cygwin32*)
5992 itcldir=../itcl/itcl/win/
5993 ;;
5994 *)
5995 itcldir=../itcl/itcl/unix/
5996 ;;
5997 esac
5998
5999
6000 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
6001 ITCL_DEPS="${itcldir}${ITCL_LIB_FILE}"
6002 fi
6003
6004
6005 # now look for Itk library stuff
6006
6007 #
6008 # Ok, lets find the itk configuration
6009 # First, look for one uninstalled.
6010 # the alternative search directory is invoked by --with-itkconfig
6011 #
6012
6013 if test x"${no_itk}" = x ; then
6014 # we reset no_itk in case something fails here
6015 no_itk=true
6016 # Check whether --with-itkconfig or --without-itkconfig was given.
6017 if test "${with_itkconfig+set}" = set; then
6018 withval="$with_itkconfig"
6019 with_itkconfig=${withval}
6020 fi
6021
6022 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
6023 echo "configure:6024: checking for Itk configuration" >&5
6024 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
6025 echo $ac_n "(cached) $ac_c" 1>&6
6026 else
6027
6028
6029 # First check to see if --with-itkconfig was specified.
6030 if test x"${with_itkconfig}" != x ; then
6031 if test -f "${with_itkconfig}/itkConfig.sh" ; then
6032 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
6033 else
6034 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
6035 fi
6036 fi
6037
6038 # then check for a private Itk library
6039 if test x"${ac_cv_c_itkconfig}" = x ; then
6040 for i in \
6041 ../itcl/itk \
6042 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
6043 ../../itk \
6044 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
6045 ../../../itk \
6046 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
6047 if test -f "$i/${configdir}/itkConfig.sh" ; then
6048 ac_cv_c_itkconfig=`(cd $i/${configdir}; pwd)`
6049 break
6050 fi
6051 done
6052 fi
6053 # check in a few common install locations
6054 if test x"${ac_cv_c_itkconfig}" = x ; then
6055 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
6056 if test -f "$i/itkConfig.sh" ; then
6057 ac_cv_c_itkconfig=`(cd $i; pwd)`
6058 break
6059 fi
6060 done
6061 fi
6062 # check in a few other private locations
6063 if test x"${ac_cv_c_itkconfig}" = x ; then
6064 for i in \
6065 ${srcdir}/../itcl/itk \
6066 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
6067 if test -f "$i/${configdir}/itkConfig.sh" ; then
6068 ac_cv_c_itkconfig=`(cd $i/${configdir}; pwd)`
6069 break
6070 fi
6071 done
6072 fi
6073
6074 fi
6075
6076 if test x"${ac_cv_c_itkconfig}" = x ; then
6077 ITKCONFIG="# no Itk configs found"
6078 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
6079 else
6080 no_itk=
6081 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
6082 echo "$ac_t""found $ITKCONFIG" 1>&6
6083 fi
6084 fi
6085
6086
6087 if test -z "${no_itcl}"; then
6088
6089 if test -f "$ITKCONFIG" ; then
6090 . $ITKCONFIG
6091 fi
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104 case "${host}" in
6105 *-*-cygwin32*)
6106 itkdir=../itcl/itk/win/
6107 ;;
6108 *)
6109 itkdir=../itcl/itk/unix/
6110 ;;
6111 esac
6112
6113 ITKLIB="${ITK_BUILD_LIB_SPEC}"
6114 ITK_DEPS="${itkdir}${ITK_LIB_FILE}"
6115 fi
6116
6117 # now look for tix library stuff
6118 TIXVERSION=4.1.8.0
6119 . ${ac_cv_c_tclconfig}/tclConfig.sh
6120 case "${host}" in
6121 *-*-cygwin*)
6122 tixdir=../tix/win/tcl8.0
6123 ;;
6124 *)
6125 tixdir=../tix/unix/tk8.0
6126 ;;
6127 esac
6128 if test "${TCL_SHARED_BUILD}" = "1"; then
6129 TIX_LIB_EXT="${TCL_SHLIB_SUFFIX}"
6130
6131 # Can't win them all: SunOS 4 (others?) appends a version
6132 # number after the ".so"
6133 case "${host}" in
6134 *-*-sunos4*)
6135 TIX_LIB_EXT="${TIX_LIB_EXT}.1.0" ;;
6136 esac
6137
6138 else
6139 TIX_LIB_EXT=".a"
6140 fi
6141
6142 if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
6143 TIXLIB="-L${tixdir} -ltix${TIXVERSION}"
6144 TIX_DEPS="${tixdir}/libtix${TIXVERSION}${TIX_LIB_EXT}"
6145 else
6146 TIXLIB="-L${tixdir} -ltix`echo ${TIXVERSION} | tr -d .`"
6147 TIX_DEPS="${tixdir}/libtix`echo ${TIXVERSION} | tr -d .`${TIX_LIB_EXT}"
6148 fi
6149
6150 ENABLE_GDBTK=1
6151 ENABLE_CFLAGS="${ENABLE_CFLAGS} -DGDBTK"
6152
6153 # Include some libraries that Tcl and Tk want.
6154 if test "${enable_ide}" = "yes"; then
6155 TCL_LIBS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
6156 CONFIG_DEPS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE_DEPS) $(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)'
6157 else
6158 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
6159 CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)'
6160 fi
6161 # Yes, the ordering seems wrong here. But it isn't.
6162 # TK_LIBS is the list of libraries that need to be linked
6163 # after Tcl/Tk. Note that this isn't put into LIBS. If it
6164 # were in LIBS then any link tests after this point would
6165 # try to include things like `$(LIBGUI)', which wouldn't work.
6166 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
6167 CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-variable.o gdbtk-wrapper.o"
6168
6169 if test x$gdb_cv_os_cygwin = xyes; then
6170 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
6171 WIN32LDAPP="-Wl,--subsystem,console"
6172 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
6173 fi
6174 fi
6175 fi
6176 fi
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189 # end-sanitize-gdbtk
6190
6191 # If we find X, set shell vars x_includes and x_libraries to the
6192 # paths, otherwise set no_x=yes.
6193 # Uses ac_ vars as temps to allow command line to override cache and checks.
6194 # --without-x overrides everything else, but does not touch the cache.
6195 echo $ac_n "checking for X""... $ac_c" 1>&6
6196 echo "configure:6197: checking for X" >&5
6197
6198 # Check whether --with-x or --without-x was given.
6199 if test "${with_x+set}" = set; then
6200 withval="$with_x"
6201 :
6202 fi
6203
6204 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6205 if test "x$with_x" = xno; then
6206 # The user explicitly disabled X.
6207 have_x=disabled
6208 else
6209 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6210 # Both variables are already set.
6211 have_x=yes
6212 else
6213 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
6214 echo $ac_n "(cached) $ac_c" 1>&6
6215 else
6216 # One or both of the vars are not set, and there is no cached value.
6217 ac_x_includes=NO ac_x_libraries=NO
6218 rm -fr conftestdir
6219 if mkdir conftestdir; then
6220 cd conftestdir
6221 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6222 cat > Imakefile <<'EOF'
6223 acfindx:
6224 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
6225 EOF
6226 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6227 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6228 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6229 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6230 for ac_extension in a so sl; do
6231 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
6232 test -f $ac_im_libdir/libX11.$ac_extension; then
6233 ac_im_usrlibdir=$ac_im_libdir; break
6234 fi
6235 done
6236 # Screen out bogus values from the imake configuration. They are
6237 # bogus both because they are the default anyway, and because
6238 # using them would break gcc on systems where it needs fixed includes.
6239 case "$ac_im_incroot" in
6240 /usr/include) ;;
6241 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
6242 esac
6243 case "$ac_im_usrlibdir" in
6244 /usr/lib | /lib) ;;
6245 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
6246 esac
6247 fi
6248 cd ..
6249 rm -fr conftestdir
6250 fi
6251
6252 if test "$ac_x_includes" = NO; then
6253 # Guess where to find include files, by looking for this one X11 .h file.
6254 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
6255
6256 # First, try using that file with no special directory specified.
6257 cat > conftest.$ac_ext <<EOF
6258 #line 6259 "configure"
6259 #include "confdefs.h"
6260 #include <$x_direct_test_include>
6261 EOF
6262 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6263 { (eval echo configure:6264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6264 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6265 if test -z "$ac_err"; then
6266 rm -rf conftest*
6267 # We can compile using X headers with no special include directory.
6268 ac_x_includes=
6269 else
6270 echo "$ac_err" >&5
6271 echo "configure: failed program was:" >&5
6272 cat conftest.$ac_ext >&5
6273 rm -rf conftest*
6274 # Look for the header file in a standard set of common directories.
6275 # Check X11 before X11Rn because it is often a symlink to the current release.
6276 for ac_dir in \
6277 /usr/X11/include \
6278 /usr/X11R6/include \
6279 /usr/X11R5/include \
6280 /usr/X11R4/include \
6281 \
6282 /usr/include/X11 \
6283 /usr/include/X11R6 \
6284 /usr/include/X11R5 \
6285 /usr/include/X11R4 \
6286 \
6287 /usr/local/X11/include \
6288 /usr/local/X11R6/include \
6289 /usr/local/X11R5/include \
6290 /usr/local/X11R4/include \
6291 \
6292 /usr/local/include/X11 \
6293 /usr/local/include/X11R6 \
6294 /usr/local/include/X11R5 \
6295 /usr/local/include/X11R4 \
6296 \
6297 /usr/X386/include \
6298 /usr/x386/include \
6299 /usr/XFree86/include/X11 \
6300 \
6301 /usr/include \
6302 /usr/local/include \
6303 /usr/unsupported/include \
6304 /usr/athena/include \
6305 /usr/local/x11r5/include \
6306 /usr/lpp/Xamples/include \
6307 \
6308 /usr/openwin/include \
6309 /usr/openwin/share/include \
6310 ; \
6311 do
6312 if test -r "$ac_dir/$x_direct_test_include"; then
6313 ac_x_includes=$ac_dir
6314 break
6315 fi
6316 done
6317 fi
6318 rm -f conftest*
6319 fi # $ac_x_includes = NO
6320
6321 if test "$ac_x_libraries" = NO; then
6322 # Check for the libraries.
6323
6324 test -z "$x_direct_test_library" && x_direct_test_library=Xt
6325 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
6326
6327 # See if we find them without any special options.
6328 # Don't add to $LIBS permanently.
6329 ac_save_LIBS="$LIBS"
6330 LIBS="-l$x_direct_test_library $LIBS"
6331 cat > conftest.$ac_ext <<EOF
6332 #line 6333 "configure"
6333 #include "confdefs.h"
6334
6335 int main() {
6336 ${x_direct_test_function}()
6337 ; return 0; }
6338 EOF
6339 if { (eval echo configure:6340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6340 rm -rf conftest*
6341 LIBS="$ac_save_LIBS"
6342 # We can link X programs with no special library path.
6343 ac_x_libraries=
6344 else
6345 echo "configure: failed program was:" >&5
6346 cat conftest.$ac_ext >&5
6347 rm -rf conftest*
6348 LIBS="$ac_save_LIBS"
6349 # First see if replacing the include by lib works.
6350 # Check X11 before X11Rn because it is often a symlink to the current release.
6351 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
6352 /usr/X11/lib \
6353 /usr/X11R6/lib \
6354 /usr/X11R5/lib \
6355 /usr/X11R4/lib \
6356 \
6357 /usr/lib/X11 \
6358 /usr/lib/X11R6 \
6359 /usr/lib/X11R5 \
6360 /usr/lib/X11R4 \
6361 \
6362 /usr/local/X11/lib \
6363 /usr/local/X11R6/lib \
6364 /usr/local/X11R5/lib \
6365 /usr/local/X11R4/lib \
6366 \
6367 /usr/local/lib/X11 \
6368 /usr/local/lib/X11R6 \
6369 /usr/local/lib/X11R5 \
6370 /usr/local/lib/X11R4 \
6371 \
6372 /usr/X386/lib \
6373 /usr/x386/lib \
6374 /usr/XFree86/lib/X11 \
6375 \
6376 /usr/lib \
6377 /usr/local/lib \
6378 /usr/unsupported/lib \
6379 /usr/athena/lib \
6380 /usr/local/x11r5/lib \
6381 /usr/lpp/Xamples/lib \
6382 /lib/usr/lib/X11 \
6383 \
6384 /usr/openwin/lib \
6385 /usr/openwin/share/lib \
6386 ; \
6387 do
6388 for ac_extension in a so sl; do
6389 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
6390 ac_x_libraries=$ac_dir
6391 break 2
6392 fi
6393 done
6394 done
6395 fi
6396 rm -f conftest*
6397 fi # $ac_x_libraries = NO
6398
6399 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
6400 # Didn't find X anywhere. Cache the known absence of X.
6401 ac_cv_have_x="have_x=no"
6402 else
6403 # Record where we found X for the cache.
6404 ac_cv_have_x="have_x=yes \
6405 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6406 fi
6407 fi
6408 fi
6409 eval "$ac_cv_have_x"
6410 fi # $with_x != no
6411
6412 if test "$have_x" != yes; then
6413 echo "$ac_t""$have_x" 1>&6
6414 no_x=yes
6415 else
6416 # If each of the values was on the command line, it overrides each guess.
6417 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6418 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6419 # Update the cache value to reflect the command line values.
6420 ac_cv_have_x="have_x=yes \
6421 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
6422 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
6423 fi
6424
6425 # start-sanitize-sky
6426 # Enable GPU2 library for MIPS simulator
6427 # Check whether --with-sim-gpu2 or --without-sim-gpu2 was given.
6428 if test "${with_sim_gpu2+set}" = set; then
6429 withval="$with_sim_gpu2"
6430 case "${target}" in
6431 mips*-sky*-*)
6432 if test -d "${withval}"
6433 then
6434 if test x${x_libraries} != x
6435 then
6436 LIBS="${LIBS} -L${withval}/lib -lgpu2 -L${x_libraries} -lX11 -lXext -lm"
6437 else
6438 LIBS="${LIBS} -L${withval}/lib -lgpu2 -lX11 -lXext -lm"
6439 fi
6440 else
6441 echo "configure: warning: Directory ${withval} does not exist." 1>&2
6442 fi ;;
6443 *) echo "configure: warning: --with-sim-gpu2 option invalid for target ${target}" 1>&2
6444 esac
6445 fi
6446
6447 # Enable target accurate FP library
6448 # Check whether --with-sim-funit or --without-sim-funit was given.
6449 if test "${with_sim_funit+set}" = set; then
6450 withval="$with_sim_funit"
6451 case "${target}" in
6452 mips*-sky*-*)
6453 if test -d "${withval}"
6454 then
6455 LIBS="${LIBS} -L${withval}/lib -lfunit"
6456 else
6457 echo "configure: warning: Directory ${withval} does not exist." 1>&2
6458 fi ;;
6459 *) echo "configure: warning: --with-sim-funit option invalid for target ${target}" 1>&2
6460 esac
6461 fi
6462 # end-sanitize-sky
6463
6464
6465
6466
6467
6468
6469
6470 # Begin stuff to support --enable-shared
6471 # Check whether --enable-shared or --disable-shared was given.
6472 if test "${enable_shared+set}" = set; then
6473 enableval="$enable_shared"
6474 case "${enableval}" in
6475 yes) shared=true ;;
6476 no) shared=false ;;
6477 *) shared=true ;;
6478 esac
6479 fi
6480
6481 HLDFLAGS=
6482 HLDENV=
6483 # If we have shared libraries, try to set rpath reasonably.
6484 if test "${shared}" = "true"; then
6485 case "${host}" in
6486 *-*-hpux*)
6487 HLDFLAGS='-Wl,+s,+b,$(libdir)'
6488 ;;
6489 *-*-irix5* | *-*-irix6*)
6490 HLDFLAGS='-Wl,-rpath,$(libdir)'
6491 ;;
6492 *-*-linux*aout*)
6493 ;;
6494 *-*-linux* | *-pc-linux-gnu)
6495 HLDFLAGS='-Wl,-rpath,$(libdir)'
6496 ;;
6497 *-*-solaris*)
6498 HLDFLAGS='-R $(libdir)'
6499 ;;
6500 *-*-sysv4*)
6501 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;'
6502 ;;
6503 esac
6504 fi
6505
6506 # On SunOS, if the linker supports the -rpath option, use it to
6507 # prevent ../bfd and ../opcodes from being included in the run time
6508 # search path.
6509 case "${host}" in
6510 *-*-sunos*)
6511 echo 'main () { }' > conftest.c
6512 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
6513 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
6514 :
6515 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
6516 :
6517 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
6518 :
6519 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
6520 :
6521 elif test "${shared}" = "true"; then
6522 HLDFLAGS='-Wl,-rpath=$(libdir)'
6523 else
6524 HLDFLAGS='-Wl,-rpath='
6525 fi
6526 rm -f conftest.t conftest.c conftest
6527 ;;
6528 esac
6529
6530
6531 # End stuff to support --enable-shared
6532
6533 # target_subdir is used by the testsuite to find the target libraries.
6534 target_subdir=
6535 if test "${host}" != "${target}"; then
6536 target_subdir="${target_alias}/"
6537 fi
6538
6539
6540 frags=
6541 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
6542 if test ! -f ${host_makefile_frag}; then
6543 { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
6544 fi
6545 frags="$frags $host_makefile_frag"
6546
6547 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
6548 if test ! -f ${target_makefile_frag}; then
6549 { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
6550 fi
6551 frags="$frags $target_makefile_frag"
6552
6553
6554
6555
6556
6557 hostfile=`sed -n '
6558 s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
6559 ' ${host_makefile_frag}`
6560
6561 targetfile=`sed -n '
6562 s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
6563 ' ${target_makefile_frag}`
6564
6565 # these really aren't orthogonal true/false values of the same condition,
6566 # but shells are slow enough that I like to reuse the test conditions
6567 # whenever possible
6568 if test "${target}" = "${host}"; then
6569 nativefile=`sed -n '
6570 s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
6571 ' ${host_makefile_frag}`
6572 # else
6573 # GDBserver is only useful in a "native" enviroment
6574 # configdirs=`echo $configdirs | sed 's/gdbserver//'`
6575 fi
6576
6577
6578 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
6579 # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
6580 # corresponding links. But we have to remove the xm.h files and tm.h
6581 # files anyway, e.g. when switching from "configure host" to
6582 # "configure none".
6583
6584 files=
6585 links=
6586 rm -f xm.h
6587 if test "${hostfile}" != ""; then
6588 files="${files} config/${gdb_host_cpu}/${hostfile}"
6589 links="${links} xm.h"
6590 fi
6591 rm -f tm.h
6592 if test "${targetfile}" != ""; then
6593 files="${files} config/${gdb_target_cpu}/${targetfile}"
6594 links="${links} tm.h"
6595 fi
6596 rm -f nm.h
6597 if test "${nativefile}" != ""; then
6598 files="${files} config/${gdb_host_cpu}/${nativefile}"
6599 links="${links} nm.h"
6600 else
6601 # A cross-only configuration.
6602 files="${files} config/nm-empty.h"
6603 links="${links} nm.h"
6604 fi
6605 # start-sanitize-gdbtk
6606 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
6607 echo "configure:6608: checking whether ln -s works" >&5
6608 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
6609 echo $ac_n "(cached) $ac_c" 1>&6
6610 else
6611 rm -f conftestdata
6612 if ln -s X conftestdata 2>/dev/null
6613 then
6614 rm -f conftestdata
6615 ac_cv_prog_LN_S="ln -s"
6616 else
6617 ac_cv_prog_LN_S=ln
6618 fi
6619 fi
6620 LN_S="$ac_cv_prog_LN_S"
6621 if test "$ac_cv_prog_LN_S" = "ln -s"; then
6622 echo "$ac_t""yes" 1>&6
6623 else
6624 echo "$ac_t""no" 1>&6
6625 fi
6626
6627 # Make it possible to use the GUI without doing a full install
6628 if test "${enable_gdbtk}" = "yes" -a ! -d gdbtcl2 ; then
6629 if test "$LN_S" = "ln -s" -a ! -f gdbtcl2 ; then
6630 echo linking $srcdir/gdbtcl2 to gdbtcl2
6631 $LN_S $srcdir/gdbtcl2 gdbtcl2
6632 else
6633 echo Warning: Unable to link $srcdir/gdbtcl2 to gdbtcl2. You will need to do a
6634 echo " " make install before you are able to run the GUI.
6635 fi
6636 fi
6637 # end-sanitize-gdbtk
6638
6639
6640
6641 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
6642 echo "configure:6643: checking for Cygwin environment" >&5
6643 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
6644 echo $ac_n "(cached) $ac_c" 1>&6
6645 else
6646 cat > conftest.$ac_ext <<EOF
6647 #line 6648 "configure"
6648 #include "confdefs.h"
6649
6650 int main() {
6651
6652 #ifndef __CYGWIN__
6653 #define __CYGWIN__ __CYGWIN32__
6654 #endif
6655 return __CYGWIN__;
6656 ; return 0; }
6657 EOF
6658 if { (eval echo configure:6659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6659 rm -rf conftest*
6660 ac_cv_cygwin=yes
6661 else
6662 echo "configure: failed program was:" >&5
6663 cat conftest.$ac_ext >&5
6664 rm -rf conftest*
6665 ac_cv_cygwin=no
6666 fi
6667 rm -f conftest*
6668 rm -f conftest*
6669 fi
6670
6671 echo "$ac_t""$ac_cv_cygwin" 1>&6
6672 CYGWIN=
6673 test "$ac_cv_cygwin" = yes && CYGWIN=yes
6674 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
6675 echo "configure:6676: checking for mingw32 environment" >&5
6676 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
6677 echo $ac_n "(cached) $ac_c" 1>&6
6678 else
6679 cat > conftest.$ac_ext <<EOF
6680 #line 6681 "configure"
6681 #include "confdefs.h"
6682
6683 int main() {
6684 return __MINGW32__;
6685 ; return 0; }
6686 EOF
6687 if { (eval echo configure:6688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6688 rm -rf conftest*
6689 ac_cv_mingw32=yes
6690 else
6691 echo "configure: failed program was:" >&5
6692 cat conftest.$ac_ext >&5
6693 rm -rf conftest*
6694 ac_cv_mingw32=no
6695 fi
6696 rm -f conftest*
6697 rm -f conftest*
6698 fi
6699
6700 echo "$ac_t""$ac_cv_mingw32" 1>&6
6701 MINGW32=
6702 test "$ac_cv_mingw32" = yes && MINGW32=yes
6703
6704
6705 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
6706 echo "configure:6707: checking for executable suffix" >&5
6707 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
6708 echo $ac_n "(cached) $ac_c" 1>&6
6709 else
6710 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
6711 ac_cv_exeext=.exe
6712 else
6713 rm -f conftest*
6714 echo 'int main () { return 0; }' > conftest.$ac_ext
6715 ac_cv_exeext=
6716 if { (eval echo configure:6717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
6717 for file in conftest.*; do
6718 case $file in
6719 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
6720 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
6721 esac
6722 done
6723 else
6724 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
6725 fi
6726 rm -f conftest*
6727 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
6728 fi
6729 fi
6730
6731 EXEEXT=""
6732 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
6733 echo "$ac_t""${ac_cv_exeext}" 1>&6
6734 ac_exeext=$EXEEXT
6735
6736
6737 subdirs="$configdirs"
6738
6739 trap '' 1 2 15
6740 cat > confcache <<\EOF
6741 # This file is a shell script that caches the results of configure
6742 # tests run on this system so they can be shared between configure
6743 # scripts and configure runs. It is not useful on other systems.
6744 # If it contains results you don't want to keep, you may remove or edit it.
6745 #
6746 # By default, configure uses ./config.cache as the cache file,
6747 # creating it if it does not exist already. You can give configure
6748 # the --cache-file=FILE option to use a different cache file; that is
6749 # what configure does when it calls configure scripts in
6750 # subdirectories, so they share the cache.
6751 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6752 # config.status only pays attention to the cache file if you give it the
6753 # --recheck option to rerun configure.
6754 #
6755 EOF
6756 # The following way of writing the cache mishandles newlines in values,
6757 # but we know of no workaround that is simple, portable, and efficient.
6758 # So, don't put newlines in cache variables' values.
6759 # Ultrix sh set writes to stderr and can't be redirected directly,
6760 # and sets the high bit in the cache file unless we assign to the vars.
6761 (set) 2>&1 |
6762 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6763 *ac_space=\ *)
6764 # `set' does not quote correctly, so add quotes (double-quote substitution
6765 # turns \\\\ into \\, and sed turns \\ into \).
6766 sed -n \
6767 -e "s/'/'\\\\''/g" \
6768 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6769 ;;
6770 *)
6771 # `set' quotes correctly as required by POSIX, so do not add quotes.
6772 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6773 ;;
6774 esac >> confcache
6775 if cmp -s $cache_file confcache; then
6776 :
6777 else
6778 if test -w $cache_file; then
6779 echo "updating cache $cache_file"
6780 cat confcache > $cache_file
6781 else
6782 echo "not updating unwritable cache $cache_file"
6783 fi
6784 fi
6785 rm -f confcache
6786
6787 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6788
6789 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6790 # Let make expand exec_prefix.
6791 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6792
6793 # Any assignment to VPATH causes Sun make to only execute
6794 # the first set of double-colon rules, so remove it if not needed.
6795 # If there is a colon in the path, we need to keep it.
6796 if test "x$srcdir" = x.; then
6797 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6798 fi
6799
6800 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6801
6802 DEFS=-DHAVE_CONFIG_H
6803
6804 # Without the "./", some shells look in PATH for config.status.
6805 : ${CONFIG_STATUS=./config.status}
6806
6807 echo creating $CONFIG_STATUS
6808 rm -f $CONFIG_STATUS
6809 cat > $CONFIG_STATUS <<EOF
6810 #! /bin/sh
6811 # Generated automatically by configure.
6812 # Run this file to recreate the current configuration.
6813 # This directory was configured as follows,
6814 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6815 #
6816 # $0 $ac_configure_args
6817 #
6818 # Compiler output produced by configure, useful for debugging
6819 # configure, is in ./config.log if it exists.
6820
6821 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6822 for ac_option
6823 do
6824 case "\$ac_option" in
6825 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6826 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6827 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6828 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6829 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6830 exit 0 ;;
6831 -help | --help | --hel | --he | --h)
6832 echo "\$ac_cs_usage"; exit 0 ;;
6833 *) echo "\$ac_cs_usage"; exit 1 ;;
6834 esac
6835 done
6836
6837 ac_given_srcdir=$srcdir
6838 ac_given_INSTALL="$INSTALL"
6839
6840 trap 'rm -fr `echo "Makefile tui/Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6841 EOF
6842 cat >> $CONFIG_STATUS <<EOF
6843
6844 # Protect against being on the right side of a sed subst in config.status.
6845 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6846 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6847 $ac_vpsub
6848 $extrasub
6849 s%@SHELL@%$SHELL%g
6850 s%@CFLAGS@%$CFLAGS%g
6851 s%@CPPFLAGS@%$CPPFLAGS%g
6852 s%@CXXFLAGS@%$CXXFLAGS%g
6853 s%@FFLAGS@%$FFLAGS%g
6854 s%@DEFS@%$DEFS%g
6855 s%@LDFLAGS@%$LDFLAGS%g
6856 s%@LIBS@%$LIBS%g
6857 s%@exec_prefix@%$exec_prefix%g
6858 s%@prefix@%$prefix%g
6859 s%@program_transform_name@%$program_transform_name%g
6860 s%@bindir@%$bindir%g
6861 s%@sbindir@%$sbindir%g
6862 s%@libexecdir@%$libexecdir%g
6863 s%@datadir@%$datadir%g
6864 s%@sysconfdir@%$sysconfdir%g
6865 s%@sharedstatedir@%$sharedstatedir%g
6866 s%@localstatedir@%$localstatedir%g
6867 s%@libdir@%$libdir%g
6868 s%@includedir@%$includedir%g
6869 s%@oldincludedir@%$oldincludedir%g
6870 s%@infodir@%$infodir%g
6871 s%@mandir@%$mandir%g
6872 s%@CC@%$CC%g
6873 s%@CPP@%$CPP%g
6874 s%@host@%$host%g
6875 s%@host_alias@%$host_alias%g
6876 s%@host_cpu@%$host_cpu%g
6877 s%@host_vendor@%$host_vendor%g
6878 s%@host_os@%$host_os%g
6879 s%@target@%$target%g
6880 s%@target_alias@%$target_alias%g
6881 s%@target_cpu@%$target_cpu%g
6882 s%@target_vendor@%$target_vendor%g
6883 s%@target_os@%$target_os%g
6884 s%@build@%$build%g
6885 s%@build_alias@%$build_alias%g
6886 s%@build_cpu@%$build_cpu%g
6887 s%@build_vendor@%$build_vendor%g
6888 s%@build_os@%$build_os%g
6889 s%@SET_MAKE@%$SET_MAKE%g
6890 s%@RANLIB@%$RANLIB%g
6891 s%@ALLOCA@%$ALLOCA%g
6892 s%@USE_NLS@%$USE_NLS%g
6893 s%@MSGFMT@%$MSGFMT%g
6894 s%@GMSGFMT@%$GMSGFMT%g
6895 s%@XGETTEXT@%$XGETTEXT%g
6896 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
6897 s%@CATALOGS@%$CATALOGS%g
6898 s%@CATOBJEXT@%$CATOBJEXT%g
6899 s%@DATADIRNAME@%$DATADIRNAME%g
6900 s%@GMOFILES@%$GMOFILES%g
6901 s%@INSTOBJEXT@%$INSTOBJEXT%g
6902 s%@INTLDEPS@%$INTLDEPS%g
6903 s%@INTLLIBS@%$INTLLIBS%g
6904 s%@INTLOBJS@%$INTLOBJS%g
6905 s%@POFILES@%$POFILES%g
6906 s%@POSUB@%$POSUB%g
6907 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
6908 s%@GT_NO@%$GT_NO%g
6909 s%@GT_YES@%$GT_YES%g
6910 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
6911 s%@l@%$l%g
6912 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6913 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6914 s%@INSTALL_DATA@%$INSTALL_DATA%g
6915 s%@AR@%$AR%g
6916 s%@YACC@%$YACC%g
6917 s%@TERM_LIB@%$TERM_LIB%g
6918 s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
6919 s%@BUILD_TUI@%$BUILD_TUI%g
6920 s%@TUI_LIBRARY@%$TUI_LIBRARY%g
6921 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
6922 s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
6923 s%@MMALLOC@%$MMALLOC%g
6924 s%@MACHINE_OBS@%$MACHINE_OBS%g
6925 s%@ENABLE_IDE@%$ENABLE_IDE%g
6926 s%@FOUNDRY_LIB_BASE@%$FOUNDRY_LIB_BASE%g
6927 s%@LIBGUI@%$LIBGUI%g
6928 s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
6929 s%@IDE_CFLAGS_X@%$IDE_CFLAGS_X%g
6930 s%@IDE_X@%$IDE_X%g
6931 s%@LIBIDETCL@%$LIBIDETCL%g
6932 s%@LIBIDE@%$LIBIDE%g
6933 s%@IDE_DEPS@%$IDE_DEPS%g
6934 s%@WIN32LIBS@%$WIN32LIBS%g
6935 s%@WIN32LDAPP@%$WIN32LDAPP%g
6936 s%@DLLTOOL@%$DLLTOOL%g
6937 s%@WINDRES@%$WINDRES%g
6938 s%@TCL_VERSION@%$TCL_VERSION%g
6939 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
6940 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
6941 s%@TCL_CC@%$TCL_CC%g
6942 s%@TCL_DEFS@%$TCL_DEFS%g
6943 s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
6944 s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
6945 s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
6946 s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
6947 s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
6948 s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
6949 s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
6950 s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
6951 s%@TCL_RANLIB@%$TCL_RANLIB%g
6952 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
6953 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
6954 s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
6955 s%@TK_VERSION@%$TK_VERSION%g
6956 s%@TK_DEFS@%$TK_DEFS%g
6957 s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
6958 s%@TK_XINCLUDES@%$TK_XINCLUDES%g
6959 s%@TK_XLIBSW@%$TK_XLIBSW%g
6960 s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
6961 s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
6962 s%@TCLHDIR@%$TCLHDIR%g
6963 s%@TKHDIR@%$TKHDIR%g
6964 s%@ITCLHDIR@%$ITCLHDIR%g
6965 s%@ITKHDIR@%$ITKHDIR%g
6966 s%@TIXHDIR@%$TIXHDIR%g
6967 s%@ITCL_VERSION@%$ITCL_VERSION%g
6968 s%@ITCL_DEFS@%$ITCL_DEFS%g
6969 s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
6970 s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
6971 s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
6972 s%@ITK_VERSION@%$ITK_VERSION%g
6973 s%@ITK_DEFS@%$ITK_DEFS%g
6974 s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
6975 s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
6976 s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
6977 s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g
6978 s%@X_CFLAGS@%$X_CFLAGS%g
6979 s%@X_LDFLAGS@%$X_LDFLAGS%g
6980 s%@X_LIBS@%$X_LIBS%g
6981 s%@ITCLLIB@%$ITCLLIB%g
6982 s%@ITCL_DEPS@%$ITCL_DEPS%g
6983 s%@ITKLIB@%$ITKLIB%g
6984 s%@ITK_DEPS@%$ITK_DEPS%g
6985 s%@TIXLIB@%$TIXLIB%g
6986 s%@TIX_DEPS@%$TIX_DEPS%g
6987 s%@GDBTKLIBS@%$GDBTKLIBS%g
6988 s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
6989 s%@CONFIG_OBS@%$CONFIG_OBS%g
6990 s%@CONFIG_DEPS@%$CONFIG_DEPS%g
6991 s%@CONFIG_SRCS@%$CONFIG_SRCS%g
6992 s%@HLDFLAGS@%$HLDFLAGS%g
6993 s%@HLDENV@%$HLDENV%g
6994 s%@target_subdir@%$target_subdir%g
6995 /@host_makefile_frag@/r $host_makefile_frag
6996 s%@host_makefile_frag@%%g
6997 /@target_makefile_frag@/r $target_makefile_frag
6998 s%@target_makefile_frag@%%g
6999 s%@frags@%$frags%g
7000 s%@LN_S@%$LN_S%g
7001 s%@EXEEXT@%$EXEEXT%g
7002 s%@subdirs@%$subdirs%g
7003
7004 CEOF
7005 EOF
7006
7007 cat >> $CONFIG_STATUS <<\EOF
7008
7009 # Split the substitutions into bite-sized pieces for seds with
7010 # small command number limits, like on Digital OSF/1 and HP-UX.
7011 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7012 ac_file=1 # Number of current file.
7013 ac_beg=1 # First line for current file.
7014 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7015 ac_more_lines=:
7016 ac_sed_cmds=""
7017 while $ac_more_lines; do
7018 if test $ac_beg -gt 1; then
7019 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7020 else
7021 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7022 fi
7023 if test ! -s conftest.s$ac_file; then
7024 ac_more_lines=false
7025 rm -f conftest.s$ac_file
7026 else
7027 if test -z "$ac_sed_cmds"; then
7028 ac_sed_cmds="sed -f conftest.s$ac_file"
7029 else
7030 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7031 fi
7032 ac_file=`expr $ac_file + 1`
7033 ac_beg=$ac_end
7034 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7035 fi
7036 done
7037 if test -z "$ac_sed_cmds"; then
7038 ac_sed_cmds=cat
7039 fi
7040 EOF
7041
7042 cat >> $CONFIG_STATUS <<EOF
7043
7044 CONFIG_FILES=\${CONFIG_FILES-"Makefile tui/Makefile .gdbinit:gdbinit.in"}
7045 EOF
7046 cat >> $CONFIG_STATUS <<\EOF
7047 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7048 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7049 case "$ac_file" in
7050 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7051 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7052 *) ac_file_in="${ac_file}.in" ;;
7053 esac
7054
7055 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7056
7057 # Remove last slash and all that follows it. Not all systems have dirname.
7058 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7059 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7060 # The file is in a subdirectory.
7061 test ! -d "$ac_dir" && mkdir "$ac_dir"
7062 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7063 # A "../" for each directory in $ac_dir_suffix.
7064 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7065 else
7066 ac_dir_suffix= ac_dots=
7067 fi
7068
7069 case "$ac_given_srcdir" in
7070 .) srcdir=.
7071 if test -z "$ac_dots"; then top_srcdir=.
7072 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7073 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7074 *) # Relative path.
7075 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7076 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7077 esac
7078
7079 case "$ac_given_INSTALL" in
7080 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7081 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7082 esac
7083
7084 echo creating "$ac_file"
7085 rm -f "$ac_file"
7086 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7087 case "$ac_file" in
7088 *Makefile*) ac_comsub="1i\\
7089 # $configure_input" ;;
7090 *) ac_comsub= ;;
7091 esac
7092
7093 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7094 sed -e "$ac_comsub
7095 s%@configure_input@%$configure_input%g
7096 s%@srcdir@%$srcdir%g
7097 s%@top_srcdir@%$top_srcdir%g
7098 s%@INSTALL@%$INSTALL%g
7099 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7100 fi; done
7101 rm -f conftest.s*
7102
7103 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7104 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7105 #
7106 # ac_d sets the value in "#define NAME VALUE" lines.
7107 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7108 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7109 ac_dC='\3'
7110 ac_dD='%g'
7111 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7112 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7113 ac_uB='\([ ]\)%\1#\2define\3'
7114 ac_uC=' '
7115 ac_uD='\4%g'
7116 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7117 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7118 ac_eB='$%\1#\2define\3'
7119 ac_eC=' '
7120 ac_eD='%g'
7121
7122 if test "${CONFIG_HEADERS+set}" != set; then
7123 EOF
7124 cat >> $CONFIG_STATUS <<EOF
7125 CONFIG_HEADERS="config.h:config.in"
7126 EOF
7127 cat >> $CONFIG_STATUS <<\EOF
7128 fi
7129 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7130 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7131 case "$ac_file" in
7132 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7133 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7134 *) ac_file_in="${ac_file}.in" ;;
7135 esac
7136
7137 echo creating $ac_file
7138
7139 rm -f conftest.frag conftest.in conftest.out
7140 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7141 cat $ac_file_inputs > conftest.in
7142
7143 EOF
7144
7145 # Transform confdefs.h into a sed script conftest.vals that substitutes
7146 # the proper values into config.h.in to produce config.h. And first:
7147 # Protect against being on the right side of a sed subst in config.status.
7148 # Protect against being in an unquoted here document in config.status.
7149 rm -f conftest.vals
7150 cat > conftest.hdr <<\EOF
7151 s/[\\&%]/\\&/g
7152 s%[\\$`]%\\&%g
7153 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7154 s%ac_d%ac_u%gp
7155 s%ac_u%ac_e%gp
7156 EOF
7157 sed -n -f conftest.hdr confdefs.h > conftest.vals
7158 rm -f conftest.hdr
7159
7160 # This sed command replaces #undef with comments. This is necessary, for
7161 # example, in the case of _POSIX_SOURCE, which is predefined and required
7162 # on some systems where configure will not decide to define it.
7163 cat >> conftest.vals <<\EOF
7164 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7165 EOF
7166
7167 # Break up conftest.vals because some shells have a limit on
7168 # the size of here documents, and old seds have small limits too.
7169
7170 rm -f conftest.tail
7171 while :
7172 do
7173 ac_lines=`grep -c . conftest.vals`
7174 # grep -c gives empty output for an empty file on some AIX systems.
7175 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7176 # Write a limited-size here document to conftest.frag.
7177 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7178 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7179 echo 'CEOF
7180 sed -f conftest.frag conftest.in > conftest.out
7181 rm -f conftest.in
7182 mv conftest.out conftest.in
7183 ' >> $CONFIG_STATUS
7184 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7185 rm -f conftest.vals
7186 mv conftest.tail conftest.vals
7187 done
7188 rm -f conftest.vals
7189
7190 cat >> $CONFIG_STATUS <<\EOF
7191 rm -f conftest.frag conftest.h
7192 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7193 cat conftest.in >> conftest.h
7194 rm -f conftest.in
7195 if cmp -s $ac_file conftest.h 2>/dev/null; then
7196 echo "$ac_file is unchanged"
7197 rm -f conftest.h
7198 else
7199 # Remove last slash and all that follows it. Not all systems have dirname.
7200 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7201 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7202 # The file is in a subdirectory.
7203 test ! -d "$ac_dir" && mkdir "$ac_dir"
7204 fi
7205 rm -f $ac_file
7206 mv conftest.h $ac_file
7207 fi
7208 fi; done
7209
7210 EOF
7211
7212 cat >> $CONFIG_STATUS <<EOF
7213 ac_sources="$files"
7214 ac_dests="$links"
7215 EOF
7216
7217 cat >> $CONFIG_STATUS <<\EOF
7218 srcdir=$ac_given_srcdir
7219 while test -n "$ac_sources"; do
7220 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7221 set $ac_sources; ac_source=$1; shift; ac_sources=$*
7222
7223 echo "linking $srcdir/$ac_source to $ac_dest"
7224
7225 if test ! -r $srcdir/$ac_source; then
7226 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7227 fi
7228 rm -f $ac_dest
7229
7230 # Make relative symlinks.
7231 # Remove last slash and all that follows it. Not all systems have dirname.
7232 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7233 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7234 # The dest file is in a subdirectory.
7235 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7236 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7237 # A "../" for each directory in $ac_dest_dir_suffix.
7238 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7239 else
7240 ac_dest_dir_suffix= ac_dots=
7241 fi
7242
7243 case "$srcdir" in
7244 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7245 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7246 esac
7247
7248 # Make a symlink if possible; otherwise try a hard link.
7249 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7250 ln $srcdir/$ac_source $ac_dest; then :
7251 else
7252 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7253 fi
7254 done
7255 EOF
7256 cat >> $CONFIG_STATUS <<EOF
7257
7258 gdb_host_cpu=$gdb_host_cpu
7259 gdb_target_cpu=$gdb_target_cpu
7260 nativefile=$nativefile
7261
7262 EOF
7263 cat >> $CONFIG_STATUS <<\EOF
7264
7265 if test "${nativefile}" = ""; then
7266 sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \
7267 < Makefile > Makefile.tem
7268 mv -f Makefile.tem Makefile
7269 fi
7270
7271 sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
7272 /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
7273 /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
7274 mv -f Makefile.tmp Makefile
7275
7276 case x$CONFIG_HEADERS in
7277 xconfig.h:config.in)
7278 echo > stamp-h ;;
7279 esac
7280
7281 exit 0
7282 EOF
7283 chmod +x $CONFIG_STATUS
7284 rm -fr confdefs* $ac_clean_files
7285 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7286
7287 if test "$no_recursion" != yes; then
7288
7289 # Remove --cache-file and --srcdir arguments so they do not pile up.
7290 ac_sub_configure_args=
7291 ac_prev=
7292 for ac_arg in $ac_configure_args; do
7293 if test -n "$ac_prev"; then
7294 ac_prev=
7295 continue
7296 fi
7297 case "$ac_arg" in
7298 -cache-file | --cache-file | --cache-fil | --cache-fi \
7299 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
7300 ac_prev=cache_file ;;
7301 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
7302 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
7303 ;;
7304 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
7305 ac_prev=srcdir ;;
7306 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
7307 ;;
7308 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
7309 esac
7310 done
7311
7312 for ac_config_dir in $configdirs; do
7313
7314 # Do not complain, so a configure script can configure whichever
7315 # parts of a large source tree are present.
7316 if test ! -d $srcdir/$ac_config_dir; then
7317 continue
7318 fi
7319
7320 echo configuring in $ac_config_dir
7321
7322 case "$srcdir" in
7323 .) ;;
7324 *)
7325 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
7326 else
7327 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
7328 fi
7329 ;;
7330 esac
7331
7332 ac_popdir=`pwd`
7333 cd $ac_config_dir
7334
7335 # A "../" for each directory in /$ac_config_dir.
7336 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
7337
7338 case "$srcdir" in
7339 .) # No --srcdir option. We are building in place.
7340 ac_sub_srcdir=$srcdir ;;
7341 /*) # Absolute path.
7342 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
7343 *) # Relative path.
7344 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
7345 esac
7346
7347 # Check for guested configure; otherwise get Cygnus style configure.
7348 if test -f $ac_sub_srcdir/configure; then
7349 ac_sub_configure=$ac_sub_srcdir/configure
7350 elif test -f $ac_sub_srcdir/configure.in; then
7351 ac_sub_configure=$ac_configure
7352 else
7353 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
7354 ac_sub_configure=
7355 fi
7356
7357 # The recursion is here.
7358 if test -n "$ac_sub_configure"; then
7359
7360 # Make the cache file name correct relative to the subdirectory.
7361 case "$cache_file" in
7362 /*) ac_sub_cache_file=$cache_file ;;
7363 *) # Relative path.
7364 ac_sub_cache_file="$ac_dots$cache_file" ;;
7365 esac
7366 case "$ac_given_INSTALL" in
7367 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7368 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7369 esac
7370
7371 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
7372 # The eval makes quoting arguments work.
7373 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
7374 then :
7375 else
7376 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
7377 fi
7378 fi
7379
7380 cd $ac_popdir
7381 done
7382 fi
7383
7384
7385 exit 0