1999-02-01 Jason Molenda (jsm@bugshack.cygnus.com)
[deliverable/binutils-gdb.git] / gdb / configure
1 #! /bin/sh
2
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.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 TERM_LIB=
4082 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
4083 echo "configure:4084: checking for tgetent in -lncurses" >&5
4084 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
4085 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4086 echo $ac_n "(cached) $ac_c" 1>&6
4087 else
4088 ac_save_LIBS="$LIBS"
4089 LIBS="-lncurses $LIBS"
4090 cat > conftest.$ac_ext <<EOF
4091 #line 4092 "configure"
4092 #include "confdefs.h"
4093 /* Override any gcc2 internal prototype to avoid an error. */
4094 /* We use char because int might match the return type of a gcc2
4095 builtin and then its argument prototype would still apply. */
4096 char tgetent();
4097
4098 int main() {
4099 tgetent()
4100 ; return 0; }
4101 EOF
4102 if { (eval echo configure:4103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4103 rm -rf conftest*
4104 eval "ac_cv_lib_$ac_lib_var=yes"
4105 else
4106 echo "configure: failed program was:" >&5
4107 cat conftest.$ac_ext >&5
4108 rm -rf conftest*
4109 eval "ac_cv_lib_$ac_lib_var=no"
4110 fi
4111 rm -f conftest*
4112 LIBS="$ac_save_LIBS"
4113
4114 fi
4115 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4116 echo "$ac_t""yes" 1>&6
4117 TERM_LIB=-lncurses
4118 else
4119 echo "$ac_t""no" 1>&6
4120 echo $ac_n "checking for tgetent in -ltermlib""... $ac_c" 1>&6
4121 echo "configure:4122: checking for tgetent in -ltermlib" >&5
4122 ac_lib_var=`echo termlib'_'tgetent | sed 'y%./+-%__p_%'`
4123 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4124 echo $ac_n "(cached) $ac_c" 1>&6
4125 else
4126 ac_save_LIBS="$LIBS"
4127 LIBS="-ltermlib $LIBS"
4128 cat > conftest.$ac_ext <<EOF
4129 #line 4130 "configure"
4130 #include "confdefs.h"
4131 /* Override any gcc2 internal prototype to avoid an error. */
4132 /* We use char because int might match the return type of a gcc2
4133 builtin and then its argument prototype would still apply. */
4134 char tgetent();
4135
4136 int main() {
4137 tgetent()
4138 ; return 0; }
4139 EOF
4140 if { (eval echo configure:4141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4141 rm -rf conftest*
4142 eval "ac_cv_lib_$ac_lib_var=yes"
4143 else
4144 echo "configure: failed program was:" >&5
4145 cat conftest.$ac_ext >&5
4146 rm -rf conftest*
4147 eval "ac_cv_lib_$ac_lib_var=no"
4148 fi
4149 rm -f conftest*
4150 LIBS="$ac_save_LIBS"
4151
4152 fi
4153 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4154 echo "$ac_t""yes" 1>&6
4155 TERM_LIB=-ltermlib
4156 else
4157 echo "$ac_t""no" 1>&6
4158 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
4159 echo "configure:4160: checking for tgetent in -ltermcap" >&5
4160 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
4161 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4162 echo $ac_n "(cached) $ac_c" 1>&6
4163 else
4164 ac_save_LIBS="$LIBS"
4165 LIBS="-ltermcap $LIBS"
4166 cat > conftest.$ac_ext <<EOF
4167 #line 4168 "configure"
4168 #include "confdefs.h"
4169 /* Override any gcc2 internal prototype to avoid an error. */
4170 /* We use char because int might match the return type of a gcc2
4171 builtin and then its argument prototype would still apply. */
4172 char tgetent();
4173
4174 int main() {
4175 tgetent()
4176 ; return 0; }
4177 EOF
4178 if { (eval echo configure:4179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4179 rm -rf conftest*
4180 eval "ac_cv_lib_$ac_lib_var=yes"
4181 else
4182 echo "configure: failed program was:" >&5
4183 cat conftest.$ac_ext >&5
4184 rm -rf conftest*
4185 eval "ac_cv_lib_$ac_lib_var=no"
4186 fi
4187 rm -f conftest*
4188 LIBS="$ac_save_LIBS"
4189
4190 fi
4191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4192 echo "$ac_t""yes" 1>&6
4193 TERM_LIB=-ltermcap
4194 else
4195 echo "$ac_t""no" 1>&6
4196 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
4197 echo "configure:4198: checking for tgetent in -lcurses" >&5
4198 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
4199 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4200 echo $ac_n "(cached) $ac_c" 1>&6
4201 else
4202 ac_save_LIBS="$LIBS"
4203 LIBS="-lcurses $LIBS"
4204 cat > conftest.$ac_ext <<EOF
4205 #line 4206 "configure"
4206 #include "confdefs.h"
4207 /* Override any gcc2 internal prototype to avoid an error. */
4208 /* We use char because int might match the return type of a gcc2
4209 builtin and then its argument prototype would still apply. */
4210 char tgetent();
4211
4212 int main() {
4213 tgetent()
4214 ; return 0; }
4215 EOF
4216 if { (eval echo configure:4217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4217 rm -rf conftest*
4218 eval "ac_cv_lib_$ac_lib_var=yes"
4219 else
4220 echo "configure: failed program was:" >&5
4221 cat conftest.$ac_ext >&5
4222 rm -rf conftest*
4223 eval "ac_cv_lib_$ac_lib_var=no"
4224 fi
4225 rm -f conftest*
4226 LIBS="$ac_save_LIBS"
4227
4228 fi
4229 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4230 echo "$ac_t""yes" 1>&6
4231 TERM_LIB=-lcurses
4232 else
4233 echo "$ac_t""no" 1>&6
4234 echo $ac_n "checking for tgetent in -lterminfo""... $ac_c" 1>&6
4235 echo "configure:4236: checking for tgetent in -lterminfo" >&5
4236 ac_lib_var=`echo terminfo'_'tgetent | sed 'y%./+-%__p_%'`
4237 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4238 echo $ac_n "(cached) $ac_c" 1>&6
4239 else
4240 ac_save_LIBS="$LIBS"
4241 LIBS="-lterminfo $LIBS"
4242 cat > conftest.$ac_ext <<EOF
4243 #line 4244 "configure"
4244 #include "confdefs.h"
4245 /* Override any gcc2 internal prototype to avoid an error. */
4246 /* We use char because int might match the return type of a gcc2
4247 builtin and then its argument prototype would still apply. */
4248 char tgetent();
4249
4250 int main() {
4251 tgetent()
4252 ; return 0; }
4253 EOF
4254 if { (eval echo configure:4255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4255 rm -rf conftest*
4256 eval "ac_cv_lib_$ac_lib_var=yes"
4257 else
4258 echo "configure: failed program was:" >&5
4259 cat conftest.$ac_ext >&5
4260 rm -rf conftest*
4261 eval "ac_cv_lib_$ac_lib_var=no"
4262 fi
4263 rm -f conftest*
4264 LIBS="$ac_save_LIBS"
4265
4266 fi
4267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4268 echo "$ac_t""yes" 1>&6
4269 TERM_LIB=-lterminfo
4270 else
4271 echo "$ac_t""no" 1>&6
4272 fi
4273
4274 fi
4275
4276 fi
4277
4278 fi
4279
4280 fi
4281
4282
4283 if test "x$TERM_LIB" = x
4284 then
4285 { echo "configure: error: Could not find a term library" 1>&2; exit 1; }
4286 fi
4287
4288
4289
4290
4291 echo $ac_n "checking for long long support in compiler""... $ac_c" 1>&6
4292 echo "configure:4293: checking for long long support in compiler" >&5
4293 if eval "test \"`echo '$''{'gdb_cv_c_long_long'+set}'`\" = set"; then
4294 echo $ac_n "(cached) $ac_c" 1>&6
4295 else
4296 cat > conftest.$ac_ext <<EOF
4297 #line 4298 "configure"
4298 #include "confdefs.h"
4299
4300 int main() {
4301
4302 extern long long foo;
4303 switch (foo & 2) { case 0: return 1; }
4304
4305 ; return 0; }
4306 EOF
4307 if { (eval echo configure:4308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4308 rm -rf conftest*
4309 gdb_cv_c_long_long=yes
4310 else
4311 echo "configure: failed program was:" >&5
4312 cat conftest.$ac_ext >&5
4313 rm -rf conftest*
4314 gdb_cv_c_long_long=no
4315 fi
4316 rm -f conftest*
4317 fi
4318
4319 echo "$ac_t""$gdb_cv_c_long_long" 1>&6
4320 if test $gdb_cv_c_long_long = yes; then
4321 cat >> confdefs.h <<\EOF
4322 #define CC_HAS_LONG_LONG 1
4323 EOF
4324
4325 fi
4326
4327
4328 echo $ac_n "checking for long long support in printf""... $ac_c" 1>&6
4329 echo "configure:4330: checking for long long support in printf" >&5
4330 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_long'+set}'`\" = set"; then
4331 echo $ac_n "(cached) $ac_c" 1>&6
4332 else
4333 if test "$cross_compiling" = yes; then
4334 gdb_cv_printf_has_long_long=no
4335 else
4336 cat > conftest.$ac_ext <<EOF
4337 #line 4338 "configure"
4338 #include "confdefs.h"
4339
4340 int main () {
4341 char buf[32];
4342 long long l = 0;
4343 l = (l << 16) + 0x0123;
4344 l = (l << 16) + 0x4567;
4345 l = (l << 16) + 0x89ab;
4346 l = (l << 16) + 0xcdef;
4347 sprintf (buf, "0x%016llx", l);
4348 return (strcmp ("0x0123456789abcdef", buf));
4349 }
4350 EOF
4351 if { (eval echo configure:4352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4352 then
4353 gdb_cv_printf_has_long_long=yes
4354 else
4355 echo "configure: failed program was:" >&5
4356 cat conftest.$ac_ext >&5
4357 rm -fr conftest*
4358 gdb_cv_printf_has_long_long=no
4359 fi
4360 rm -fr conftest*
4361 fi
4362
4363 fi
4364
4365 if test $gdb_cv_printf_has_long_long = yes; then
4366 cat >> confdefs.h <<\EOF
4367 #define PRINTF_HAS_LONG_LONG 1
4368 EOF
4369
4370 fi
4371 echo "$ac_t""$gdb_cv_printf_has_long_long" 1>&6
4372
4373
4374 echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
4375 echo "configure:4376: checking for long double support in compiler" >&5
4376 if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
4377 echo $ac_n "(cached) $ac_c" 1>&6
4378 else
4379 cat > conftest.$ac_ext <<EOF
4380 #line 4381 "configure"
4381 #include "confdefs.h"
4382
4383 int main() {
4384 long double foo;
4385 ; return 0; }
4386 EOF
4387 if { (eval echo configure:4388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4388 rm -rf conftest*
4389 ac_cv_c_long_double=yes
4390 else
4391 echo "configure: failed program was:" >&5
4392 cat conftest.$ac_ext >&5
4393 rm -rf conftest*
4394 ac_cv_c_long_double=no
4395 fi
4396 rm -f conftest*
4397 fi
4398
4399 echo "$ac_t""$ac_cv_c_long_double" 1>&6
4400 if test $ac_cv_c_long_double = yes; then
4401 cat >> confdefs.h <<\EOF
4402 #define HAVE_LONG_DOUBLE 1
4403 EOF
4404
4405 fi
4406
4407
4408 echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
4409 echo "configure:4410: checking for long double support in printf" >&5
4410 if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
4411 echo $ac_n "(cached) $ac_c" 1>&6
4412 else
4413 if test "$cross_compiling" = yes; then
4414 gdb_cv_printf_has_long_double=no
4415 else
4416 cat > conftest.$ac_ext <<EOF
4417 #line 4418 "configure"
4418 #include "confdefs.h"
4419
4420 int main () {
4421 char buf[16];
4422 long double f = 3.141592653;
4423 sprintf (buf, "%Lg", f);
4424 return (strncmp ("3.14159", buf, 7));
4425 }
4426 EOF
4427 if { (eval echo configure:4428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4428 then
4429 gdb_cv_printf_has_long_double=yes
4430 else
4431 echo "configure: failed program was:" >&5
4432 cat conftest.$ac_ext >&5
4433 rm -fr conftest*
4434 gdb_cv_printf_has_long_double=no
4435 fi
4436 rm -fr conftest*
4437 fi
4438
4439 fi
4440
4441 if test $gdb_cv_printf_has_long_double = yes; then
4442 cat >> confdefs.h <<\EOF
4443 #define PRINTF_HAS_LONG_DOUBLE 1
4444 EOF
4445
4446 fi
4447 echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
4448
4449
4450 echo $ac_n "checking for long double support in scanf""... $ac_c" 1>&6
4451 echo "configure:4452: checking for long double support in scanf" >&5
4452 if eval "test \"`echo '$''{'gdb_cv_scanf_has_long_double'+set}'`\" = set"; then
4453 echo $ac_n "(cached) $ac_c" 1>&6
4454 else
4455 if test "$cross_compiling" = yes; then
4456 gdb_cv_scanf_has_long_double=no
4457 else
4458 cat > conftest.$ac_ext <<EOF
4459 #line 4460 "configure"
4460 #include "confdefs.h"
4461
4462 int main () {
4463 char *buf = "3.141592653";
4464 long double f = 0;
4465 sscanf (buf, "%Lg", &f);
4466 return !(f > 3.14159 && f < 3.14160);
4467 }
4468 EOF
4469 if { (eval echo configure:4470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4470 then
4471 gdb_cv_scanf_has_long_double=yes
4472 else
4473 echo "configure: failed program was:" >&5
4474 cat conftest.$ac_ext >&5
4475 rm -fr conftest*
4476 gdb_cv_scanf_has_long_double=no
4477 fi
4478 rm -fr conftest*
4479 fi
4480
4481 fi
4482
4483 if test $gdb_cv_scanf_has_long_double = yes; then
4484 cat >> confdefs.h <<\EOF
4485 #define SCANF_HAS_LONG_DOUBLE 1
4486 EOF
4487
4488 fi
4489 echo "$ac_t""$gdb_cv_scanf_has_long_double" 1>&6
4490
4491 for ac_hdr in unistd.h
4492 do
4493 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4494 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4495 echo "configure:4496: checking for $ac_hdr" >&5
4496 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4497 echo $ac_n "(cached) $ac_c" 1>&6
4498 else
4499 cat > conftest.$ac_ext <<EOF
4500 #line 4501 "configure"
4501 #include "confdefs.h"
4502 #include <$ac_hdr>
4503 EOF
4504 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4505 { (eval echo configure:4506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4506 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4507 if test -z "$ac_err"; then
4508 rm -rf conftest*
4509 eval "ac_cv_header_$ac_safe=yes"
4510 else
4511 echo "$ac_err" >&5
4512 echo "configure: failed program was:" >&5
4513 cat conftest.$ac_ext >&5
4514 rm -rf conftest*
4515 eval "ac_cv_header_$ac_safe=no"
4516 fi
4517 rm -f conftest*
4518 fi
4519 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4520 echo "$ac_t""yes" 1>&6
4521 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4522 cat >> confdefs.h <<EOF
4523 #define $ac_tr_hdr 1
4524 EOF
4525
4526 else
4527 echo "$ac_t""no" 1>&6
4528 fi
4529 done
4530
4531 for ac_func in getpagesize
4532 do
4533 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4534 echo "configure:4535: checking for $ac_func" >&5
4535 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4536 echo $ac_n "(cached) $ac_c" 1>&6
4537 else
4538 cat > conftest.$ac_ext <<EOF
4539 #line 4540 "configure"
4540 #include "confdefs.h"
4541 /* System header to define __stub macros and hopefully few prototypes,
4542 which can conflict with char $ac_func(); below. */
4543 #include <assert.h>
4544 /* Override any gcc2 internal prototype to avoid an error. */
4545 /* We use char because int might match the return type of a gcc2
4546 builtin and then its argument prototype would still apply. */
4547 char $ac_func();
4548
4549 int main() {
4550
4551 /* The GNU C library defines this for functions which it implements
4552 to always fail with ENOSYS. Some functions are actually named
4553 something starting with __ and the normal name is an alias. */
4554 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4555 choke me
4556 #else
4557 $ac_func();
4558 #endif
4559
4560 ; return 0; }
4561 EOF
4562 if { (eval echo configure:4563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4563 rm -rf conftest*
4564 eval "ac_cv_func_$ac_func=yes"
4565 else
4566 echo "configure: failed program was:" >&5
4567 cat conftest.$ac_ext >&5
4568 rm -rf conftest*
4569 eval "ac_cv_func_$ac_func=no"
4570 fi
4571 rm -f conftest*
4572 fi
4573
4574 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4575 echo "$ac_t""yes" 1>&6
4576 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4577 cat >> confdefs.h <<EOF
4578 #define $ac_tr_func 1
4579 EOF
4580
4581 else
4582 echo "$ac_t""no" 1>&6
4583 fi
4584 done
4585
4586 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
4587 echo "configure:4588: checking for working mmap" >&5
4588 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
4589 echo $ac_n "(cached) $ac_c" 1>&6
4590 else
4591 if test "$cross_compiling" = yes; then
4592 ac_cv_func_mmap_fixed_mapped=no
4593 else
4594 cat > conftest.$ac_ext <<EOF
4595 #line 4596 "configure"
4596 #include "confdefs.h"
4597
4598 /* Thanks to Mike Haertel and Jim Avera for this test.
4599 Here is a matrix of mmap possibilities:
4600 mmap private not fixed
4601 mmap private fixed at somewhere currently unmapped
4602 mmap private fixed at somewhere already mapped
4603 mmap shared not fixed
4604 mmap shared fixed at somewhere currently unmapped
4605 mmap shared fixed at somewhere already mapped
4606 For private mappings, we should verify that changes cannot be read()
4607 back from the file, nor mmap's back from the file at a different
4608 address. (There have been systems where private was not correctly
4609 implemented like the infamous i386 svr4.0, and systems where the
4610 VM page cache was not coherent with the filesystem buffer cache
4611 like early versions of FreeBSD and possibly contemporary NetBSD.)
4612 For shared mappings, we should conversely verify that changes get
4613 propogated back to all the places they're supposed to be.
4614
4615 Grep wants private fixed already mapped.
4616 The main things grep needs to know about mmap are:
4617 * does it exist and is it safe to write into the mmap'd area
4618 * how to use it (BSD variants) */
4619 #include <sys/types.h>
4620 #include <fcntl.h>
4621 #include <sys/mman.h>
4622
4623 /* This mess was copied from the GNU getpagesize.h. */
4624 #ifndef HAVE_GETPAGESIZE
4625 # ifdef HAVE_UNISTD_H
4626 # include <unistd.h>
4627 # endif
4628
4629 /* Assume that all systems that can run configure have sys/param.h. */
4630 # ifndef HAVE_SYS_PARAM_H
4631 # define HAVE_SYS_PARAM_H 1
4632 # endif
4633
4634 # ifdef _SC_PAGESIZE
4635 # define getpagesize() sysconf(_SC_PAGESIZE)
4636 # else /* no _SC_PAGESIZE */
4637 # ifdef HAVE_SYS_PARAM_H
4638 # include <sys/param.h>
4639 # ifdef EXEC_PAGESIZE
4640 # define getpagesize() EXEC_PAGESIZE
4641 # else /* no EXEC_PAGESIZE */
4642 # ifdef NBPG
4643 # define getpagesize() NBPG * CLSIZE
4644 # ifndef CLSIZE
4645 # define CLSIZE 1
4646 # endif /* no CLSIZE */
4647 # else /* no NBPG */
4648 # ifdef NBPC
4649 # define getpagesize() NBPC
4650 # else /* no NBPC */
4651 # ifdef PAGESIZE
4652 # define getpagesize() PAGESIZE
4653 # endif /* PAGESIZE */
4654 # endif /* no NBPC */
4655 # endif /* no NBPG */
4656 # endif /* no EXEC_PAGESIZE */
4657 # else /* no HAVE_SYS_PARAM_H */
4658 # define getpagesize() 8192 /* punt totally */
4659 # endif /* no HAVE_SYS_PARAM_H */
4660 # endif /* no _SC_PAGESIZE */
4661
4662 #endif /* no HAVE_GETPAGESIZE */
4663
4664 #ifdef __cplusplus
4665 extern "C" { void *malloc(unsigned); }
4666 #else
4667 char *malloc();
4668 #endif
4669
4670 int
4671 main()
4672 {
4673 char *data, *data2, *data3;
4674 int i, pagesize;
4675 int fd;
4676
4677 pagesize = getpagesize();
4678
4679 /*
4680 * First, make a file with some known garbage in it.
4681 */
4682 data = malloc(pagesize);
4683 if (!data)
4684 exit(1);
4685 for (i = 0; i < pagesize; ++i)
4686 *(data + i) = rand();
4687 umask(0);
4688 fd = creat("conftestmmap", 0600);
4689 if (fd < 0)
4690 exit(1);
4691 if (write(fd, data, pagesize) != pagesize)
4692 exit(1);
4693 close(fd);
4694
4695 /*
4696 * Next, try to mmap the file at a fixed address which
4697 * already has something else allocated at it. If we can,
4698 * also make sure that we see the same garbage.
4699 */
4700 fd = open("conftestmmap", O_RDWR);
4701 if (fd < 0)
4702 exit(1);
4703 data2 = malloc(2 * pagesize);
4704 if (!data2)
4705 exit(1);
4706 data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
4707 if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
4708 MAP_PRIVATE | MAP_FIXED, fd, 0L))
4709 exit(1);
4710 for (i = 0; i < pagesize; ++i)
4711 if (*(data + i) != *(data2 + i))
4712 exit(1);
4713
4714 /*
4715 * Finally, make sure that changes to the mapped area
4716 * do not percolate back to the file as seen by read().
4717 * (This is a bug on some variants of i386 svr4.0.)
4718 */
4719 for (i = 0; i < pagesize; ++i)
4720 *(data2 + i) = *(data2 + i) + 1;
4721 data3 = malloc(pagesize);
4722 if (!data3)
4723 exit(1);
4724 if (read(fd, data3, pagesize) != pagesize)
4725 exit(1);
4726 for (i = 0; i < pagesize; ++i)
4727 if (*(data + i) != *(data3 + i))
4728 exit(1);
4729 close(fd);
4730 unlink("conftestmmap");
4731 exit(0);
4732 }
4733
4734 EOF
4735 if { (eval echo configure:4736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4736 then
4737 ac_cv_func_mmap_fixed_mapped=yes
4738 else
4739 echo "configure: failed program was:" >&5
4740 cat conftest.$ac_ext >&5
4741 rm -fr conftest*
4742 ac_cv_func_mmap_fixed_mapped=no
4743 fi
4744 rm -fr conftest*
4745 fi
4746
4747 fi
4748
4749 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
4750 if test $ac_cv_func_mmap_fixed_mapped = yes; then
4751 cat >> confdefs.h <<\EOF
4752 #define HAVE_MMAP 1
4753 EOF
4754
4755 fi
4756
4757
4758
4759
4760 if test ${build} = ${host} -a ${host} = ${target} ; then
4761 case ${host_os} in
4762 hpux*)
4763 echo $ac_n "checking for HPUX/OSF thread support""... $ac_c" 1>&6
4764 echo "configure:4765: checking for HPUX/OSF thread support" >&5
4765 if test -f /usr/include/dce/cma_config.h ; then
4766 if test "$GCC" = "yes" ; then
4767 echo "$ac_t""yes" 1>&6
4768 cat >> confdefs.h <<\EOF
4769 #define HAVE_HPUX_THREAD_SUPPORT 1
4770 EOF
4771
4772 CONFIG_OBS="${CONFIG_OJS} hpux-thread.o"
4773 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
4774 else
4775 echo "$ac_t""no (suppressed because you are not using GCC)" 1>&6
4776 fi
4777 else
4778 echo "$ac_t""no" 1>&6
4779 fi
4780 ;;
4781 solaris*)
4782 echo $ac_n "checking for Solaris thread debugging library""... $ac_c" 1>&6
4783 echo "configure:4784: checking for Solaris thread debugging library" >&5
4784 if test -f /usr/lib/libthread_db.so.1 ; then
4785 echo "$ac_t""yes" 1>&6
4786 cat >> confdefs.h <<\EOF
4787 #define HAVE_THREAD_DB_LIB 1
4788 EOF
4789
4790 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
4791 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
4792 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
4793 echo "configure:4794: checking for dlopen in -ldl" >&5
4794 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
4795 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4796 echo $ac_n "(cached) $ac_c" 1>&6
4797 else
4798 ac_save_LIBS="$LIBS"
4799 LIBS="-ldl $LIBS"
4800 cat > conftest.$ac_ext <<EOF
4801 #line 4802 "configure"
4802 #include "confdefs.h"
4803 /* Override any gcc2 internal prototype to avoid an error. */
4804 /* We use char because int might match the return type of a gcc2
4805 builtin and then its argument prototype would still apply. */
4806 char dlopen();
4807
4808 int main() {
4809 dlopen()
4810 ; return 0; }
4811 EOF
4812 if { (eval echo configure:4813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4813 rm -rf conftest*
4814 eval "ac_cv_lib_$ac_lib_var=yes"
4815 else
4816 echo "configure: failed program was:" >&5
4817 cat conftest.$ac_ext >&5
4818 rm -rf conftest*
4819 eval "ac_cv_lib_$ac_lib_var=no"
4820 fi
4821 rm -f conftest*
4822 LIBS="$ac_save_LIBS"
4823
4824 fi
4825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4826 echo "$ac_t""yes" 1>&6
4827 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4828 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4829 cat >> confdefs.h <<EOF
4830 #define $ac_tr_lib 1
4831 EOF
4832
4833 LIBS="-ldl $LIBS"
4834
4835 else
4836 echo "$ac_t""no" 1>&6
4837 fi
4838
4839 if test "$GCC" = "yes" ; then
4840 # The GNU linker requires the -export-dynamic option to make
4841 # all symbols visible in the dynamic symbol table.
4842 hold_ldflags=$LDFLAGS
4843 echo $ac_n "checking for the ld -export-dynamic flag""... $ac_c" 1>&6
4844 echo "configure:4845: checking for the ld -export-dynamic flag" >&5
4845 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
4846 cat > conftest.$ac_ext <<EOF
4847 #line 4848 "configure"
4848 #include "confdefs.h"
4849
4850 int main() {
4851 int i;
4852 ; return 0; }
4853 EOF
4854 if { (eval echo configure:4855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4855 rm -rf conftest*
4856 found=yes
4857 else
4858 echo "configure: failed program was:" >&5
4859 cat conftest.$ac_ext >&5
4860 rm -rf conftest*
4861 found=no
4862 fi
4863 rm -f conftest*
4864 LDFLAGS=$hold_ldflags
4865 echo "$ac_t""$found" 1>&6
4866 if test $found = yes; then
4867 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
4868 fi
4869 fi
4870 # Sun randomly tweaked the prototypes in <proc_service.h>
4871 # at one point.
4872 echo $ac_n "checking if <proc_service.h> is old""... $ac_c" 1>&6
4873 echo "configure:4874: checking if <proc_service.h> is old" >&5
4874 if eval "test \"`echo '$''{'gdb_cv_proc_service_is_old'+set}'`\" = set"; then
4875 echo $ac_n "(cached) $ac_c" 1>&6
4876 else
4877
4878 cat > conftest.$ac_ext <<EOF
4879 #line 4880 "configure"
4880 #include "confdefs.h"
4881
4882 #include <proc_service.h>
4883 ps_err_e ps_pdwrite
4884 (struct ps_prochandle*, psaddr_t, const void*, size_t);
4885
4886 int main() {
4887
4888 ; return 0; }
4889 EOF
4890 if { (eval echo configure:4891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4891 rm -rf conftest*
4892 gdb_cv_proc_service_is_old=no
4893 else
4894 echo "configure: failed program was:" >&5
4895 cat conftest.$ac_ext >&5
4896 rm -rf conftest*
4897 gdb_cv_proc_service_is_old=yes
4898 fi
4899 rm -f conftest*
4900
4901 fi
4902
4903 echo "$ac_t""$gdb_cv_proc_service_is_old" 1>&6
4904 if test $gdb_cv_proc_service_is_old = yes; then
4905 cat >> confdefs.h <<\EOF
4906 #define PROC_SERVICE_IS_OLD 1
4907 EOF
4908
4909 fi
4910 else
4911 echo "$ac_t""no" 1>&6
4912 fi
4913 ;;
4914 esac
4915
4916 fi
4917
4918 ENABLE_CFLAGS=
4919
4920 # Check whether --enable-tui or --disable-tui was given.
4921 if test "${enable_tui+set}" = set; then
4922 enableval="$enable_tui"
4923
4924 case "${enable_tui}" in
4925 yes | no) ;;
4926 "") enable_tui=yes ;;
4927 *)
4928 { echo "configure: error: Bad value for --enable-tui: ${enableval}" 1>&2; exit 1; }
4929 ;;
4930 esac
4931
4932 fi
4933
4934 case ${enable_tui} in
4935 "yes" )
4936 cat >> confdefs.h <<\EOF
4937 #define TUI 1
4938 EOF
4939
4940 BUILD_TUI=all-tui
4941 TUI_LIBRARY=tui/libtui.a
4942 ;;
4943 * )
4944 BUILD_TUI=
4945 TUI_LIBRARY=
4946 ;;
4947 esac
4948
4949
4950
4951 # Check whether --enable-netrom or --disable-netrom was given.
4952 if test "${enable_netrom+set}" = set; then
4953 enableval="$enable_netrom"
4954 case "${enableval}" in
4955 yes) enable_netrom=yes ;;
4956 no) enable_netrom=no ;;
4957 *) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
4958 esac
4959 fi
4960
4961
4962 if test "${enable_netrom}" = "yes"; then
4963 CONFIG_OBS="${CONFIG_OBS} remote-nrom.o"
4964 CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
4965 fi
4966
4967 # Check whether --enable-build-warnings or --disable-build-warnings was given.
4968 if test "${enable_build_warnings+set}" = set; then
4969 enableval="$enable_build_warnings"
4970 build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations"
4971 case "${enableval}" in
4972 yes) ;;
4973 no) build_warnings="-w";;
4974 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
4975 build_warnings="${build_warnings} ${t}";;
4976 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
4977 build_warnings="${t} ${build_warnings}";;
4978 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
4979 esac
4980 else
4981 build_warnings=""
4982 fi
4983
4984 if test "x${build_warnings}" != x -a "x$GCC" = xyes
4985 then
4986 WARN_CFLAGS="${build_warnings}"
4987 else
4988 WARN_CFLAGS=""
4989 fi
4990
4991
4992 MMALLOC_CFLAGS=
4993 MMALLOC=
4994
4995
4996
4997 # Check whether --with-mmalloc or --without-mmalloc was given.
4998 if test "${with_mmalloc+set}" = set; then
4999 withval="$with_mmalloc"
5000 case "${withval}" in
5001 yes) want_mmalloc=true ;;
5002 no) want_mmalloc=false;;
5003 *) { echo "configure: error: bad value ${withval} for GDB with-mmalloc option" 1>&2; exit 1; } ;;
5004 esac
5005 else
5006 want_mmalloc=false
5007 fi
5008
5009 if test x$want_mmalloc = xtrue; then
5010 cat >> confdefs.h <<\EOF
5011 #define USE_MMALLOC 1
5012 EOF
5013
5014 cat >> confdefs.h <<\EOF
5015 #define MMCHECK_FORCE 1
5016 EOF
5017
5018 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
5019 MMALLOC='../mmalloc/libmmalloc.a'
5020 fi
5021
5022 # start-sanitize-carp
5023 # The below takes an educated guess at the targets that
5024 # should be built. It is an interum version that provides
5025 # significant backward compatibility.
5026
5027 # Check whether --enable-carp or --disable-carp was given.
5028 if test "${enable_carp+set}" = set; then
5029 enableval="$enable_carp"
5030 case "${enableval}" in
5031 yes) enable_carp=yes ;;
5032 no) enable_carp=no ;;
5033 *) { echo "configure: error: bad value ${enableval} for carp option" 1>&2; exit 1; } ;;
5034 esac
5035 else
5036 enable_carp=no
5037 fi
5038
5039 # Check whether --enable-targets or --disable-targets was given.
5040 if test "${enable_targets+set}" = set; then
5041 enableval="$enable_targets"
5042 case "${enableval}" in
5043 yes | "") { echo "configure: error: enable-targets option must specify target names or 'all'" 1>&2; exit 1; }
5044 ;;
5045 no) enable_targets= ;;
5046 *) enable_targets="$enableval" ;;
5047 esac
5048 fi
5049
5050 # Canonicalize the secondary target names.
5051 all_targets=false
5052 if test -n "$enable_targets" ; then
5053 if test "$enable_targets" = all ; then
5054 all_targets=true
5055 else
5056 for targ in `echo $enable_targets | sed 's/,/ /g'`
5057 do
5058 result=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $targ 2>/dev/null`
5059 if test -n "$result" ; then
5060 canon_targets="$canon_targets $result"
5061 fi
5062 done
5063 fi
5064 fi
5065
5066 # Convert the target names into GDB [*]-tdep.c names
5067 selarchs=
5068 for targ in $target $canon_targets
5069 do
5070 if test "x$targ" = "xall" ; then
5071 all_targets=true
5072 else
5073 t_cpu=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
5074 t_vendor=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
5075 t_os=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
5076 mt=`
5077 target=$targ
5078 target_cpu=$t_cpu
5079 target_vendor=$t_vendor
5080 target_os=$t_os
5081 . ${srcdir}/configure.tgt
5082 echo ${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt`
5083 if test -r ${mt} ; then
5084 # This gets confused over .mt files that have multiple -tdep.o
5085 tdep=`sed -n '
5086 s/^.*[ =]\([^ ]*\)-tdep.o.*/\1/p
5087 ' $mt`
5088 selarchs="$selarchs $tdep"
5089 fi
5090 fi
5091 done
5092
5093 # We don't do any links based on the target system, just makefile config.
5094
5095 if test x${all_targets} = xfalse ; then
5096
5097 # Target architecture .o files.
5098 ta=
5099
5100 for arch in $selarchs
5101 do
5102 archdefs="$archdefs -DARCH_$arch"
5103 ta="$ta ${arch}-tdep.o"
5104 # Special cases
5105 case "$arch" in
5106 dvp) ta="$ta mips-tdep.o dvp-tdep.o" ;;
5107 esac
5108 done
5109
5110 # Weed out duplicate .o files.
5111 f=""
5112 for i in $ta ; do
5113 case " $f " in
5114 *" $i "*) ;;
5115 *) f="$f $i" ;;
5116 esac
5117 done
5118 ta="$f"
5119
5120 # And duplicate -D flags.
5121 f=""
5122 for i in $archdefs ; do
5123 case " $f " in
5124 *" $i "*) ;;
5125 *) f="$f $i" ;;
5126 esac
5127 done
5128 archdefs="$f"
5129
5130 MACHINE_OBS="$ta"
5131
5132 else # all_targets is true
5133 archdefs=-DARCH_all
5134 MACHINE_OBS='$(ALL_MACHINES)'
5135 fi
5136
5137 if test "${enable_carp}" = yes ; then
5138 gdb_target=carp
5139 gdb_target_cpu=carp
5140 else
5141 MACHINE_OBS="# $MACHINE_OBS"
5142 fi
5143
5144
5145 # end-sanitize-carp
5146 # start-sanitize-gdbtk
5147 # start-sanitize-ide
5148 ENABLE_IDE=
5149 # Check whether --enable-ide or --disable-ide was given.
5150 if test "${enable_ide+set}" = set; then
5151 enableval="$enable_ide"
5152 :
5153 fi
5154
5155 if test "$enable_ide" = yes; then
5156 enable_ide=yes
5157 ENABLE_IDE=1
5158 else
5159 enable_ide=no
5160 fi
5161
5162
5163 # Check whether --with-foundry-libs or --without-foundry-libs was given.
5164 if test "${with_foundry_libs+set}" = set; then
5165 withval="$with_foundry_libs"
5166 FOUNDRY_LIB_BASE=${withval}
5167 fi
5168
5169
5170
5171 #
5172 # This is the Foundry SDK
5173 #
5174 # These variables are used to determine where the Foundry libs and
5175 # header files are located.
5176 #
5177 if test "$FOUNDRY_LIB_BASE" != ""; then
5178 LIBGUI="${FOUNDRY_LIB_BASE}/lib/libgui.a"
5179 GUI_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include"
5180 if test x$enable_ide = xyes; then
5181 IDE_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include -DIDE"
5182 IDE_X="-L${FOUNDRY_LIB_BASE}/lib -lilu-Tk -lilu-c -lilu"
5183 else
5184 IDE_CFLAGS_X="-I${FOUNDRY_LIB_BASE}/include"
5185 fi
5186 LIBIDETCL="${FOUNDRY_LIB_BASE}/lib/libidetcl.a"
5187 LIBIDE="${FOUNDRY_LIB_BASE}/lib/libide.a"
5188 IDE_DEPS="${FOUNDRY_LIB_BASE}/lib/libilu-Tk.a ${FOUNDRY_LIB_BASE}/lib/libilu-c.a ${FOUNDRY_LIB_BASE}/lib/libilu.a"
5189 else
5190 # end-sanitize-ide
5191 LIBGUI="../libgui/src/libgui.a"
5192 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
5193 # start-sanitize-ide
5194 if test x$enable_ide = xyes; then
5195 IDE_CFLAGS_X="-I${srcdir}/../libidetcl/src -I${srcdir}/../libide/src -DIDE -I${srcdir}/../ilu/runtime/mainloop"
5196 IDE_X="-L../ilu/runtime/mainloop -lilu-Tk -L../ilu/runtime/c -lilu-c -L../ilu/runtime/kernel -lilu"
5197 else
5198 IDE_CFLAGS_X="-I${srcdir}/../libidetcl/src -I${srcdir}/../libide/src"
5199 fi
5200 LIBIDETCL="../libidetcl/src/libidetcl.a"
5201 LIBIDE="../libide/src/libide.a"
5202 IDE_DEPS="../ilu/runtime/mainloop/libilu-Tk.a ../ilu/runtime/c/libilu-c.a ../ilu/runtime/kernel/libilu.a"
5203 fi
5204
5205 # end-sanitize-ide
5206
5207
5208 # start-sanitize-ide
5209
5210
5211
5212
5213
5214 # end-sanitize-ide
5215
5216
5217 # Check whether --with-cpu or --without-cpu was given.
5218 if test "${with_cpu+set}" = set; then
5219 withval="$with_cpu"
5220 case "${target}" in
5221 powerpc-* | powerpcle-* )
5222 ## It would be nice to keep this table in sync with the one in
5223 ## gcc/configure.
5224 case "${with_cpu}" in
5225 ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \
5226 | 604 | 750 )
5227 ## Those are all handled in variants in rs6000-tdep.c, so they're fine.
5228 ;;
5229 common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 )
5230 ## These are all RS6000 variants, as far as GDB is concerned.
5231 with_cpu=rs6000
5232 ;;
5233 603e | ec603e )
5234 with_cpu=603
5235 ;;
5236 604e )
5237 with_cpu=604
5238 ;;
5239 * )
5240 echo "configure: warning: GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'." 1>&2
5241 with_cpu=ppc-uisa
5242 ;;
5243 esac
5244 ;;
5245 * )
5246 echo "configure: warning: GDB may ignore the --with-cpu flag for ${target} targets" 1>&2
5247 ;;
5248 esac
5249 cat >> confdefs.h <<EOF
5250 #define TARGET_CPU_DEFAULT "${with_cpu}"
5251 EOF
5252
5253
5254 fi
5255
5256
5257
5258 ENABLE_GDBTK=
5259
5260 # Check whether --enable-gdbtk or --disable-gdbtk was given.
5261 if test "${enable_gdbtk+set}" = set; then
5262 enableval="$enable_gdbtk"
5263 case "${enableval}" in
5264 yes)
5265 case "$host" in
5266 *go32*)
5267 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
5268 enable_gdbtk=no ;;
5269 *windows*)
5270 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
5271 enable_gdbtk=no ;;
5272 *)
5273 enable_gdbtk=yes ;;
5274 esac ;;
5275 no)
5276 enable_gdbtk=no ;;
5277 *)
5278 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
5279 esac
5280 else
5281
5282 # Default is on for everything but go32 and Cygwin
5283 case "$host" in
5284 *go32* | *windows*)
5285 ;;
5286 *)
5287 enable_gdbtk=yes ;;
5288 esac
5289
5290 fi
5291
5292
5293 # In the Cygwin environment, we need some additional flags.
5294 echo $ac_n "checking for cygwin""... $ac_c" 1>&6
5295 echo "configure:5296: checking for cygwin" >&5
5296 if eval "test \"`echo '$''{'gdb_cv_os_cygwin'+set}'`\" = set"; then
5297 echo $ac_n "(cached) $ac_c" 1>&6
5298 else
5299 cat > conftest.$ac_ext <<EOF
5300 #line 5301 "configure"
5301 #include "confdefs.h"
5302
5303 #ifdef __CYGWIN32__
5304 lose
5305 #endif
5306 EOF
5307 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5308 egrep "lose" >/dev/null 2>&1; then
5309 rm -rf conftest*
5310 gdb_cv_os_cygwin=yes
5311 else
5312 rm -rf conftest*
5313 gdb_cv_os_cygwin=no
5314 fi
5315 rm -f conftest*
5316
5317 fi
5318
5319 echo "$ac_t""$gdb_cv_os_cygwin" 1>&6
5320
5321 WIN32LIBS=
5322 WIN32LDAPP=
5323
5324
5325
5326 DLLTOOL=${DLLTOOL-dlltool}
5327 WINDRES=${WINDRES-windres}
5328
5329
5330
5331 if test x$gdb_cv_os_cygwin = xyes; then
5332 WIN32LIBS="-luser32"
5333 if test x$enable_ide = xyes; then
5334 WIN32LIBS="$WIN32LIBS -ladvapi32"
5335 fi
5336 fi
5337
5338 configdir="unix"
5339
5340 GDBTKLIBS=
5341 if test "${enable_gdbtk}" = "yes"; then
5342
5343
5344 #
5345 # Ok, lets find the tcl configuration
5346 # First, look for one uninstalled.
5347 # the alternative search directory is invoked by --with-tclconfig
5348 #
5349
5350 if test x"${no_tcl}" = x ; then
5351 # we reset no_tcl in case something fails here
5352 no_tcl=true
5353 # Check whether --with-tclconfig or --without-tclconfig was given.
5354 if test "${with_tclconfig+set}" = set; then
5355 withval="$with_tclconfig"
5356 with_tclconfig=${withval}
5357 fi
5358
5359 echo $ac_n "checking for Tcl configuration""... $ac_c" 1>&6
5360 echo "configure:5361: checking for Tcl configuration" >&5
5361 if eval "test \"`echo '$''{'ac_cv_c_tclconfig'+set}'`\" = set"; then
5362 echo $ac_n "(cached) $ac_c" 1>&6
5363 else
5364
5365
5366 # First check to see if --with-tclconfig was specified.
5367 if test x"${with_tclconfig}" != x ; then
5368 if test -f "${with_tclconfig}/tclConfig.sh" ; then
5369 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
5370 else
5371 { echo "configure: error: ${with_tclconfig} directory doesn't contain tclConfig.sh" 1>&2; exit 1; }
5372 fi
5373 fi
5374
5375 # then check for a private Tcl installation
5376 if test x"${ac_cv_c_tclconfig}" = x ; then
5377 for i in \
5378 ../tcl \
5379 `ls -dr ../tcl[7-9]* 2>/dev/null` \
5380 ../../tcl \
5381 `ls -dr ../../tcl[7-9]* 2>/dev/null` \
5382 ../../../tcl \
5383 `ls -dr ../../../tcl[7-9]* 2>/dev/null` ; do
5384 if test -f "$i/${configdir}/tclConfig.sh" ; then
5385 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
5386 break
5387 fi
5388 done
5389 fi
5390 # check in a few common install locations
5391 if test x"${ac_cv_c_tclconfig}" = x ; then
5392 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
5393 if test -f "$i/tclConfig.sh" ; then
5394 ac_cv_c_tclconfig=`(cd $i; pwd)`
5395 break
5396 fi
5397 done
5398 fi
5399 # check in a few other private locations
5400 if test x"${ac_cv_c_tclconfig}" = x ; then
5401 for i in \
5402 ${srcdir}/../tcl \
5403 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` ; do
5404 if test -f "$i/${configdir}/tclConfig.sh" ; then
5405 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
5406 break
5407 fi
5408 done
5409 fi
5410
5411 fi
5412
5413 if test x"${ac_cv_c_tclconfig}" = x ; then
5414 TCLCONFIG="# no Tcl configs found"
5415 echo "configure: warning: Can't find Tcl configuration definitions" 1>&2
5416 else
5417 no_tcl=
5418 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
5419 echo "$ac_t""found $TCLCONFIG" 1>&6
5420 fi
5421 fi
5422
5423 if test -z "${no_tcl}"; then
5424
5425 . $TCLCONFIG
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452 #
5453 # Ok, lets find the tk configuration
5454 # First, look for one uninstalled.
5455 # the alternative search directory is invoked by --with-tkconfig
5456 #
5457
5458 if test x"${no_tk}" = x ; then
5459 # we reset no_tk in case something fails here
5460 no_tk=true
5461 # Check whether --with-tkconfig or --without-tkconfig was given.
5462 if test "${with_tkconfig+set}" = set; then
5463 withval="$with_tkconfig"
5464 with_tkconfig=${withval}
5465 fi
5466
5467 echo $ac_n "checking for Tk configuration""... $ac_c" 1>&6
5468 echo "configure:5469: checking for Tk configuration" >&5
5469 if eval "test \"`echo '$''{'ac_cv_c_tkconfig'+set}'`\" = set"; then
5470 echo $ac_n "(cached) $ac_c" 1>&6
5471 else
5472
5473
5474 # First check to see if --with-tkconfig was specified.
5475 if test x"${with_tkconfig}" != x ; then
5476 if test -f "${with_tkconfig}/tkConfig.sh" ; then
5477 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
5478 else
5479 { echo "configure: error: ${with_tkconfig} directory doesn't contain tkConfig.sh" 1>&2; exit 1; }
5480 fi
5481 fi
5482
5483 # then check for a private Tk library
5484 if test x"${ac_cv_c_tkconfig}" = x ; then
5485 for i in \
5486 ../tk \
5487 `ls -dr ../tk[4-9]* 2>/dev/null` \
5488 ../../tk \
5489 `ls -dr ../../tk[4-9]* 2>/dev/null` \
5490 ../../../tk \
5491 `ls -dr ../../../tk[4-9]* 2>/dev/null` ; do
5492 if test -f "$i/${configdir}/tkConfig.sh" ; then
5493 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
5494 break
5495 fi
5496 done
5497 fi
5498 # check in a few common install locations
5499 if test x"${ac_cv_c_tkconfig}" = x ; then
5500 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
5501 if test -f "$i/tkConfig.sh" ; then
5502 ac_cv_c_tkconfig=`(cd $i; pwd)`
5503 break
5504 fi
5505 done
5506 fi
5507 # check in a few other private locations
5508 if test x"${ac_cv_c_tkconfig}" = x ; then
5509 for i in \
5510 ${srcdir}/../tk \
5511 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` ; do
5512 if test -f "$i/${configdir}/tkConfig.sh" ; then
5513 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
5514 break
5515 fi
5516 done
5517 fi
5518
5519 fi
5520
5521 if test x"${ac_cv_c_tkconfig}" = x ; then
5522 TKCONFIG="# no Tk configs found"
5523 echo "configure: warning: Can't find Tk configuration definitions" 1>&2
5524 else
5525 no_tk=
5526 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
5527 echo "$ac_t""found $TKCONFIG" 1>&6
5528 fi
5529 fi
5530
5531
5532
5533 # If $no_tk is nonempty, then we can't do Tk, and there is no
5534 # point to doing Tcl.
5535 if test -z "${no_tk}"; then
5536
5537 if test -f "$TKCONFIG" ; then
5538 . $TKCONFIG
5539 fi
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554 #
5555 # Ok, lets find the tcl source trees so we can use the headers
5556 # Warning: transition of version 9 to 10 will break this algorithm
5557 # because 10 sorts before 9. We also look for just tcl. We have to
5558 # be careful that we don't match stuff like tclX by accident.
5559 # the alternative search directory is involked by --with-tclinclude
5560 #
5561
5562 no_tcl=true
5563 echo $ac_n "checking for Tcl private headers. dir=${configdir}""... $ac_c" 1>&6
5564 echo "configure:5565: checking for Tcl private headers. dir=${configdir}" >&5
5565 # Check whether --with-tclinclude or --without-tclinclude was given.
5566 if test "${with_tclinclude+set}" = set; then
5567 withval="$with_tclinclude"
5568 with_tclinclude=${withval}
5569 fi
5570
5571 if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
5572 echo $ac_n "(cached) $ac_c" 1>&6
5573 else
5574
5575 # first check to see if --with-tclinclude was specified
5576 if test x"${with_tclinclude}" != x ; then
5577 if test -f ${with_tclinclude}/tclInt.h ; then
5578 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
5579 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
5580 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
5581 else
5582 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
5583 fi
5584 fi
5585
5586 # next check if it came with Tcl configuration file
5587 if test x"${ac_cv_c_tclconfig}" = x ; then
5588 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
5589 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
5590 fi
5591 fi
5592
5593 # next check in private source directory
5594 #
5595 # since ls returns lowest version numbers first, reverse its output
5596 if test x"${ac_cv_c_tclh}" = x ; then
5597 for i in \
5598 ${srcdir}/../tcl \
5599 `ls -dr ${srcdir}/../tcl[7-9]* 2>/dev/null` \
5600 ${srcdir}/../../tcl \
5601 `ls -dr ${srcdir}/../../tcl[7-9]* 2>/dev/null` \
5602 ${srcdir}/../../../tcl \
5603 `ls -dr ${srcdir}/../../../tcl[7-9]* 2>/dev/null ` ; do
5604 if test -f $i/generic/tclInt.h ; then
5605 ac_cv_c_tclh=`(cd $i/generic; pwd)`
5606 break
5607 fi
5608 done
5609 fi
5610 # finally check in a few common install locations
5611 #
5612 # since ls returns lowest version numbers first, reverse its output
5613 if test x"${ac_cv_c_tclh}" = x ; then
5614 for i in \
5615 `ls -dr /usr/local/src/tcl[7-9]* 2>/dev/null` \
5616 `ls -dr /usr/local/lib/tcl[7-9]* 2>/dev/null` \
5617 /usr/local/src/tcl \
5618 /usr/local/lib/tcl \
5619 ${prefix}/include ; do
5620 if test -f $i/generic/tclInt.h ; then
5621 ac_cv_c_tclh=`(cd $i/generic; pwd)`
5622 break
5623 fi
5624 done
5625 fi
5626 # see if one is installed
5627 if test x"${ac_cv_c_tclh}" = x ; then
5628 ac_safe=`echo "tclInt.h" | sed 'y%./+-%__p_%'`
5629 echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
5630 echo "configure:5631: checking for tclInt.h" >&5
5631 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5632 echo $ac_n "(cached) $ac_c" 1>&6
5633 else
5634 cat > conftest.$ac_ext <<EOF
5635 #line 5636 "configure"
5636 #include "confdefs.h"
5637 #include <tclInt.h>
5638 EOF
5639 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5640 { (eval echo configure:5641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5641 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5642 if test -z "$ac_err"; then
5643 rm -rf conftest*
5644 eval "ac_cv_header_$ac_safe=yes"
5645 else
5646 echo "$ac_err" >&5
5647 echo "configure: failed program was:" >&5
5648 cat conftest.$ac_ext >&5
5649 rm -rf conftest*
5650 eval "ac_cv_header_$ac_safe=no"
5651 fi
5652 rm -f conftest*
5653 fi
5654 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5655 echo "$ac_t""yes" 1>&6
5656 ac_cv_c_tclh=installed
5657 else
5658 echo "$ac_t""no" 1>&6
5659 ac_cv_c_tclh=""
5660 fi
5661
5662 fi
5663
5664 fi
5665
5666 if test x"${ac_cv_c_tclh}" = x ; then
5667 TCLHDIR="# no Tcl private headers found"
5668 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
5669 fi
5670 if test x"${ac_cv_c_tclh}" != x ; then
5671 no_tcl=""
5672 if test x"${ac_cv_c_tclh}" = x"installed" ; then
5673 echo "$ac_t""is installed" 1>&6
5674 TCLHDIR=""
5675 else
5676 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
5677 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
5678 TCLHDIR="-I${ac_cv_c_tclh}"
5679 fi
5680 fi
5681
5682
5683
5684
5685 #
5686 # Ok, lets find the tk source trees so we can use the headers
5687 # If the directory (presumably symlink) named "tk" exists, use that one
5688 # in preference to any others. Same logic is used when choosing library
5689 # and again with Tcl. The search order is the best place to look first, then in
5690 # decreasing significance. The loop breaks if the trigger file is found.
5691 # Note the gross little conversion here of srcdir by cd'ing to the found
5692 # directory. This converts the path from a relative to an absolute, so
5693 # recursive cache variables for the path will work right. We check all
5694 # the possible paths in one loop rather than many seperate loops to speed
5695 # things up.
5696 # the alternative search directory is involked by --with-tkinclude
5697 #
5698 no_tk=true
5699 echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
5700 echo "configure:5701: checking for Tk private headers" >&5
5701 # Check whether --with-tkinclude or --without-tkinclude was given.
5702 if test "${with_tkinclude+set}" = set; then
5703 withval="$with_tkinclude"
5704 with_tkinclude=${withval}
5705 fi
5706
5707 if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
5708 echo $ac_n "(cached) $ac_c" 1>&6
5709 else
5710
5711 # first check to see if --with-tkinclude was specified
5712 if test x"${with_tkinclude}" != x ; then
5713 if test -f ${with_tkinclude}/tk.h ; then
5714 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
5715 elif test -f ${with_tkinclude}/generic/tk.h ; then
5716 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
5717 else
5718 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
5719 fi
5720 fi
5721
5722 # next check if it came with Tk configuration file
5723 if test x"${ac_cv_c_tkconfig}" = x ; then
5724 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
5725 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
5726 fi
5727 fi
5728
5729 # next check in private source directory
5730 #
5731 # since ls returns lowest version numbers first, reverse its output
5732 if test x"${ac_cv_c_tkh}" = x ; then
5733 for i in \
5734 ${srcdir}/../tk \
5735 `ls -dr ${srcdir}/../tk[4-9]* 2>/dev/null` \
5736 ${srcdir}/../../tk \
5737 `ls -dr ${srcdir}/../../tk[4-9]* 2>/dev/null` \
5738 ${srcdir}/../../../tk \
5739 `ls -dr ${srcdir}/../../../tk[4-9]* 2>/dev/null ` ; do
5740 if test -f $i/generic/tk.h ; then
5741 ac_cv_c_tkh=`(cd $i/generic; pwd)`
5742 break
5743 fi
5744 done
5745 fi
5746 # finally check in a few common install locations
5747 #
5748 # since ls returns lowest version numbers first, reverse its output
5749 if test x"${ac_cv_c_tkh}" = x ; then
5750 for i in \
5751 `ls -dr /usr/local/src/tk[4-9]* 2>/dev/null` \
5752 `ls -dr /usr/local/lib/tk[4-9]* 2>/dev/null` \
5753 /usr/local/src/tk \
5754 /usr/local/lib/tk \
5755 ${prefix}/include ; do
5756 if test -f $i/generic/tk.h ; then
5757 ac_cv_c_tkh=`(cd $i/generic; pwd)`
5758 break
5759 fi
5760 done
5761 fi
5762 # see if one is installed
5763 if test x"${ac_cv_c_tkh}" = x ; then
5764 ac_safe=`echo "tk.h" | sed 'y%./+-%__p_%'`
5765 echo $ac_n "checking for tk.h""... $ac_c" 1>&6
5766 echo "configure:5767: checking for tk.h" >&5
5767 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5768 echo $ac_n "(cached) $ac_c" 1>&6
5769 else
5770 cat > conftest.$ac_ext <<EOF
5771 #line 5772 "configure"
5772 #include "confdefs.h"
5773 #include <tk.h>
5774 EOF
5775 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5776 { (eval echo configure:5777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5777 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5778 if test -z "$ac_err"; then
5779 rm -rf conftest*
5780 eval "ac_cv_header_$ac_safe=yes"
5781 else
5782 echo "$ac_err" >&5
5783 echo "configure: failed program was:" >&5
5784 cat conftest.$ac_ext >&5
5785 rm -rf conftest*
5786 eval "ac_cv_header_$ac_safe=no"
5787 fi
5788 rm -f conftest*
5789 fi
5790 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5791 echo "$ac_t""yes" 1>&6
5792 ac_cv_c_tkh=installed
5793 else
5794 echo "$ac_t""no" 1>&6
5795 ac_cv_c_tkh=""
5796 fi
5797
5798 fi
5799
5800 fi
5801
5802 if test x"${ac_cv_c_tkh}" != x ; then
5803 no_tk=""
5804 if test x"${ac_cv_c_tkh}" = x"installed" ; then
5805 echo "$ac_t""is installed" 1>&6
5806 TKHDIR=""
5807 else
5808 echo "$ac_t""found in ${ac_cv_c_tkh}" 1>&6
5809 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
5810 TKHDIR="-I${ac_cv_c_tkh}"
5811 fi
5812 else
5813 TKHDIR="# no Tk directory found"
5814 echo "configure: warning: Can't find Tk private headers" 1>&2
5815 no_tk=true
5816 fi
5817
5818
5819
5820
5821 echo $ac_n "checking for Itcl private headers. srcdir=${srcdir}""... $ac_c" 1>&6
5822 echo "configure:5823: checking for Itcl private headers. srcdir=${srcdir}" >&5
5823 if test x"${ac_cv_c_itclh}" = x ; then
5824 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
5825 if test -f $i/generic/itcl.h ; then
5826 ac_cv_c_itclh=`(cd $i/generic; pwd)`
5827 break
5828 fi
5829 done
5830 fi
5831 if test x"${ac_cv_c_itclh}" = x ; then
5832 ITCLHDIR="# no Itcl private headers found"
5833 { echo "configure: error: Can't find Itcl private headers" 1>&2; exit 1; }
5834 fi
5835 if test x"${ac_cv_c_itclh}" != x ; then
5836 ITCLHDIR="-I${ac_cv_c_itclh}"
5837 fi
5838 # should always be here
5839 # ITCLLIB="../itcl/itcl/unix/libitcl.a"
5840
5841 #AC_SUBST(ITCLLIB)
5842
5843
5844 echo $ac_n "checking for Itk private headers. srcdir=${srcdir}""... $ac_c" 1>&6
5845 echo "configure:5846: checking for Itk private headers. srcdir=${srcdir}" >&5
5846 if test x"${ac_cv_c_itkh}" = x ; then
5847 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
5848 if test -f $i/generic/itk.h ; then
5849 ac_cv_c_itkh=`(cd $i/generic; pwd)`
5850 break
5851 fi
5852 done
5853 fi
5854 if test x"${ac_cv_c_itkh}" = x ; then
5855 ITKHDIR="# no Itk private headers found"
5856 { echo "configure: error: Can't find Itk private headers" 1>&2; exit 1; }
5857 fi
5858 if test x"${ac_cv_c_itkh}" != x ; then
5859 ITKHDIR="-I${ac_cv_c_itkh}"
5860 fi
5861 # should always be here
5862 # ITKLIB="../itcl/itk/unix/libitk.a"
5863
5864 #AC_SUBST(ITKLIB)
5865
5866
5867 echo $ac_n "checking for Tix private headers. srcdir=${srcdir}""... $ac_c" 1>&6
5868 echo "configure:5869: checking for Tix private headers. srcdir=${srcdir}" >&5
5869 if test x"${ac_cv_c_tixh}" = x ; then
5870 for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
5871 if test -f $i/generic/tix.h ; then
5872 ac_cv_c_tixh=`(cd $i/generic; pwd)`
5873 break
5874 fi
5875 done
5876 fi
5877 if test x"${ac_cv_c_tixh}" = x ; then
5878 TIXHDIR="# no Tix private headers found"
5879 { echo "configure: error: Can't find Tix private headers" 1>&2; exit 1; }
5880 fi
5881 if test x"${ac_cv_c_tixh}" != x ; then
5882 TIXHDIR="-I${ac_cv_c_tixh}"
5883 fi
5884
5885
5886
5887 # now look for Itcl library stuff
5888
5889
5890 #
5891 # Ok, lets find the itcl configuration
5892 # First, look for one uninstalled.
5893 # the alternative search directory is invoked by --with-itclconfig
5894 #
5895
5896 if test x"${no_itcl}" = x ; then
5897 # we reset no_itcl in case something fails here
5898 no_itcl=true
5899 # Check whether --with-itclconfig or --without-itclconfig was given.
5900 if test "${with_itclconfig+set}" = set; then
5901 withval="$with_itclconfig"
5902 with_itclconfig=${withval}
5903 fi
5904
5905 echo $ac_n "checking for Itcl configuration""... $ac_c" 1>&6
5906 echo "configure:5907: checking for Itcl configuration" >&5
5907 if eval "test \"`echo '$''{'ac_cv_c_itclconfig'+set}'`\" = set"; then
5908 echo $ac_n "(cached) $ac_c" 1>&6
5909 else
5910
5911
5912 # First check to see if --with-itclconfig was specified.
5913 if test x"${with_itclconfig}" != x ; then
5914 if test -f "${with_itclconfig}/itclConfig.sh" ; then
5915 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
5916 else
5917 { echo "configure: error: ${with_itclconfig} directory doesn't contain itclConfig.sh" 1>&2; exit 1; }
5918 fi
5919 fi
5920
5921 # then check for a private Itcl library
5922 if test x"${ac_cv_c_itclconfig}" = x ; then
5923 for i in \
5924 ../itcl/itcl \
5925 `ls -dr ../itcl[4-9]*/itcl 2>/dev/null` \
5926 ../../itcl \
5927 `ls -dr ../../itcl[4-9]*/itcl 2>/dev/null` \
5928 ../../../itcl \
5929 `ls -dr ../../../itcl[4-9]*/itcl 2>/dev/null` ; do
5930 if test -f "$i/${configdir}/itclConfig.sh" ; then
5931 ac_cv_c_itclconfig=`(cd $i/${configdir}; pwd)`
5932 break
5933 fi
5934 done
5935 fi
5936 # check in a few common install locations
5937 if test x"${ac_cv_c_itclconfig}" = x ; then
5938 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
5939 if test -f "$i/itclConfig.sh" ; then
5940 ac_cv_c_itclconfig=`(cd $i; pwd)`
5941 break
5942 fi
5943 done
5944 fi
5945 # check in a few other private locations
5946 if test x"${ac_cv_c_itclconfig}" = x ; then
5947 for i in \
5948 ${srcdir}/../itcl/itcl \
5949 `ls -dr ${srcdir}/../itcl[4-9]*/itcl 2>/dev/null` ; do
5950 if test -f "$i/${configdir}/itclConfig.sh" ; then
5951 ac_cv_c_itclconfig=`(cd $i/${configdir}; pwd)`
5952 break
5953 fi
5954 done
5955 fi
5956
5957 fi
5958
5959 if test x"${ac_cv_c_itclconfig}" = x ; then
5960 ITCLCONFIG="# no Itcl configs found"
5961 echo "configure: warning: Can't find Itcl configuration definitions" 1>&2
5962 else
5963 no_itcl=
5964 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
5965 echo "$ac_t""found $ITCLCONFIG" 1>&6
5966 fi
5967 fi
5968
5969
5970 if test -z "${no_itcl}"; then
5971
5972 if test -f "$ITCLCONFIG" ; then
5973 . $ITCLCONFIG
5974 fi
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986 case "${host}" in
5987 *-*-cygwin32*)
5988 itcldir=../itcl/itcl/win/
5989 ;;
5990 *)
5991 itcldir=../itcl/itcl/unix/
5992 ;;
5993 esac
5994
5995
5996 ITCLLIB="${ITCL_BUILD_LIB_SPEC}"
5997 ITCL_DEPS="${itcldir}${ITCL_LIB_FILE}"
5998 fi
5999
6000
6001 # now look for Itk library stuff
6002
6003 #
6004 # Ok, lets find the itk configuration
6005 # First, look for one uninstalled.
6006 # the alternative search directory is invoked by --with-itkconfig
6007 #
6008
6009 if test x"${no_itk}" = x ; then
6010 # we reset no_itk in case something fails here
6011 no_itk=true
6012 # Check whether --with-itkconfig or --without-itkconfig was given.
6013 if test "${with_itkconfig+set}" = set; then
6014 withval="$with_itkconfig"
6015 with_itkconfig=${withval}
6016 fi
6017
6018 echo $ac_n "checking for Itk configuration""... $ac_c" 1>&6
6019 echo "configure:6020: checking for Itk configuration" >&5
6020 if eval "test \"`echo '$''{'ac_cv_c_itkconfig'+set}'`\" = set"; then
6021 echo $ac_n "(cached) $ac_c" 1>&6
6022 else
6023
6024
6025 # First check to see if --with-itkconfig was specified.
6026 if test x"${with_itkconfig}" != x ; then
6027 if test -f "${with_itkconfig}/itkConfig.sh" ; then
6028 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
6029 else
6030 { echo "configure: error: ${with_itkconfig} directory doesn't contain itkConfig.sh" 1>&2; exit 1; }
6031 fi
6032 fi
6033
6034 # then check for a private Itk library
6035 if test x"${ac_cv_c_itkconfig}" = x ; then
6036 for i in \
6037 ../itcl/itk \
6038 `ls -dr ../itcl[4-9]*/itk 2>/dev/null` \
6039 ../../itk \
6040 `ls -dr ../../itcl[4-9]*/itk 2>/dev/null` \
6041 ../../../itk \
6042 `ls -dr ../../../itcl[4-9]*/itk 2>/dev/null` ; do
6043 if test -f "$i/${configdir}/itkConfig.sh" ; then
6044 ac_cv_c_itkconfig=`(cd $i/${configdir}; pwd)`
6045 break
6046 fi
6047 done
6048 fi
6049 # check in a few common install locations
6050 if test x"${ac_cv_c_itkconfig}" = x ; then
6051 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
6052 if test -f "$i/itkConfig.sh" ; then
6053 ac_cv_c_itkconfig=`(cd $i; pwd)`
6054 break
6055 fi
6056 done
6057 fi
6058 # check in a few other private locations
6059 if test x"${ac_cv_c_itkconfig}" = x ; then
6060 for i in \
6061 ${srcdir}/../itcl/itk \
6062 `ls -dr ${srcdir}/../itcl[4-9]*/itk 2>/dev/null` ; do
6063 if test -f "$i/${configdir}/itkConfig.sh" ; then
6064 ac_cv_c_itkconfig=`(cd $i/${configdir}; pwd)`
6065 break
6066 fi
6067 done
6068 fi
6069
6070 fi
6071
6072 if test x"${ac_cv_c_itkconfig}" = x ; then
6073 ITKCONFIG="# no Itk configs found"
6074 echo "configure: warning: Can't find Itk configuration definitions" 1>&2
6075 else
6076 no_itk=
6077 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
6078 echo "$ac_t""found $ITKCONFIG" 1>&6
6079 fi
6080 fi
6081
6082
6083 if test -z "${no_itcl}"; then
6084
6085 if test -f "$ITKCONFIG" ; then
6086 . $ITKCONFIG
6087 fi
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100 case "${host}" in
6101 *-*-cygwin32*)
6102 itkdir=../itcl/itk/win/
6103 ;;
6104 *)
6105 itkdir=../itcl/itk/unix/
6106 ;;
6107 esac
6108
6109 ITKLIB="${ITK_BUILD_LIB_SPEC}"
6110 ITK_DEPS="${itkdir}${ITK_LIB_FILE}"
6111 fi
6112
6113 # now look for tix library stuff
6114 TIXVERSION=4.1.8.0
6115 . ${ac_cv_c_tclconfig}/tclConfig.sh
6116 case "${host}" in
6117 *-*-cygwin*)
6118 tixdir=../tix/win/tcl8.0
6119 ;;
6120 *)
6121 tixdir=../tix/unix/tk8.0
6122 ;;
6123 esac
6124 if test "${TCL_SHARED_BUILD}" = "1"; then
6125 TIX_LIB_EXT="${TCL_SHLIB_SUFFIX}"
6126
6127 # Can't win them all: SunOS 4 (others?) appends a version
6128 # number after the ".so"
6129 case "${host}" in
6130 *-*-sunos4*)
6131 TIX_LIB_EXT="${TIX_LIB_EXT}.1.0" ;;
6132 esac
6133
6134 else
6135 TIX_LIB_EXT=".a"
6136 fi
6137
6138 if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
6139 TIXLIB="-L${tixdir} -ltix${TIXVERSION}"
6140 TIX_DEPS="${tixdir}/libtix${TIXVERSION}${TIX_LIB_EXT}"
6141 else
6142 TIXLIB="-L${tixdir} -ltix`echo ${TIXVERSION} | tr -d .`"
6143 TIX_DEPS="${tixdir}/libtix`echo ${TIXVERSION} | tr -d .`${TIX_LIB_EXT}"
6144 fi
6145
6146 ENABLE_GDBTK=1
6147 ENABLE_CFLAGS="${ENABLE_CFLAGS} -DGDBTK"
6148
6149 # Include some libraries that Tcl and Tk want.
6150 if test "${enable_ide}" = "yes"; then
6151 TCL_LIBS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
6152 CONFIG_DEPS='$(LIBIDETCL) $(LIBIDE) $(LIBGUI) $(IDE_DEPS) $(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)'
6153 else
6154 TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
6155 CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)'
6156 fi
6157 # Yes, the ordering seems wrong here. But it isn't.
6158 # TK_LIBS is the list of libraries that need to be linked
6159 # after Tcl/Tk. Note that this isn't put into LIBS. If it
6160 # were in LIBS then any link tests after this point would
6161 # try to include things like `$(LIBGUI)', which wouldn't work.
6162 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
6163 CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-variable.o gdbtk-wrapper.o"
6164
6165 if test x$gdb_cv_os_cygwin = xyes; then
6166 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
6167 WIN32LDAPP="-Wl,--subsystem,console"
6168 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
6169 fi
6170 fi
6171 fi
6172 fi
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185 # end-sanitize-gdbtk
6186
6187 # If we find X, set shell vars x_includes and x_libraries to the
6188 # paths, otherwise set no_x=yes.
6189 # Uses ac_ vars as temps to allow command line to override cache and checks.
6190 # --without-x overrides everything else, but does not touch the cache.
6191 echo $ac_n "checking for X""... $ac_c" 1>&6
6192 echo "configure:6193: checking for X" >&5
6193
6194 # Check whether --with-x or --without-x was given.
6195 if test "${with_x+set}" = set; then
6196 withval="$with_x"
6197 :
6198 fi
6199
6200 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6201 if test "x$with_x" = xno; then
6202 # The user explicitly disabled X.
6203 have_x=disabled
6204 else
6205 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6206 # Both variables are already set.
6207 have_x=yes
6208 else
6209 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
6210 echo $ac_n "(cached) $ac_c" 1>&6
6211 else
6212 # One or both of the vars are not set, and there is no cached value.
6213 ac_x_includes=NO ac_x_libraries=NO
6214 rm -fr conftestdir
6215 if mkdir conftestdir; then
6216 cd conftestdir
6217 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6218 cat > Imakefile <<'EOF'
6219 acfindx:
6220 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
6221 EOF
6222 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6223 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6224 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6225 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6226 for ac_extension in a so sl; do
6227 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
6228 test -f $ac_im_libdir/libX11.$ac_extension; then
6229 ac_im_usrlibdir=$ac_im_libdir; break
6230 fi
6231 done
6232 # Screen out bogus values from the imake configuration. They are
6233 # bogus both because they are the default anyway, and because
6234 # using them would break gcc on systems where it needs fixed includes.
6235 case "$ac_im_incroot" in
6236 /usr/include) ;;
6237 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
6238 esac
6239 case "$ac_im_usrlibdir" in
6240 /usr/lib | /lib) ;;
6241 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
6242 esac
6243 fi
6244 cd ..
6245 rm -fr conftestdir
6246 fi
6247
6248 if test "$ac_x_includes" = NO; then
6249 # Guess where to find include files, by looking for this one X11 .h file.
6250 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
6251
6252 # First, try using that file with no special directory specified.
6253 cat > conftest.$ac_ext <<EOF
6254 #line 6255 "configure"
6255 #include "confdefs.h"
6256 #include <$x_direct_test_include>
6257 EOF
6258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6259 { (eval echo configure:6260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6261 if test -z "$ac_err"; then
6262 rm -rf conftest*
6263 # We can compile using X headers with no special include directory.
6264 ac_x_includes=
6265 else
6266 echo "$ac_err" >&5
6267 echo "configure: failed program was:" >&5
6268 cat conftest.$ac_ext >&5
6269 rm -rf conftest*
6270 # Look for the header file in a standard set of common directories.
6271 # Check X11 before X11Rn because it is often a symlink to the current release.
6272 for ac_dir in \
6273 /usr/X11/include \
6274 /usr/X11R6/include \
6275 /usr/X11R5/include \
6276 /usr/X11R4/include \
6277 \
6278 /usr/include/X11 \
6279 /usr/include/X11R6 \
6280 /usr/include/X11R5 \
6281 /usr/include/X11R4 \
6282 \
6283 /usr/local/X11/include \
6284 /usr/local/X11R6/include \
6285 /usr/local/X11R5/include \
6286 /usr/local/X11R4/include \
6287 \
6288 /usr/local/include/X11 \
6289 /usr/local/include/X11R6 \
6290 /usr/local/include/X11R5 \
6291 /usr/local/include/X11R4 \
6292 \
6293 /usr/X386/include \
6294 /usr/x386/include \
6295 /usr/XFree86/include/X11 \
6296 \
6297 /usr/include \
6298 /usr/local/include \
6299 /usr/unsupported/include \
6300 /usr/athena/include \
6301 /usr/local/x11r5/include \
6302 /usr/lpp/Xamples/include \
6303 \
6304 /usr/openwin/include \
6305 /usr/openwin/share/include \
6306 ; \
6307 do
6308 if test -r "$ac_dir/$x_direct_test_include"; then
6309 ac_x_includes=$ac_dir
6310 break
6311 fi
6312 done
6313 fi
6314 rm -f conftest*
6315 fi # $ac_x_includes = NO
6316
6317 if test "$ac_x_libraries" = NO; then
6318 # Check for the libraries.
6319
6320 test -z "$x_direct_test_library" && x_direct_test_library=Xt
6321 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
6322
6323 # See if we find them without any special options.
6324 # Don't add to $LIBS permanently.
6325 ac_save_LIBS="$LIBS"
6326 LIBS="-l$x_direct_test_library $LIBS"
6327 cat > conftest.$ac_ext <<EOF
6328 #line 6329 "configure"
6329 #include "confdefs.h"
6330
6331 int main() {
6332 ${x_direct_test_function}()
6333 ; return 0; }
6334 EOF
6335 if { (eval echo configure:6336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6336 rm -rf conftest*
6337 LIBS="$ac_save_LIBS"
6338 # We can link X programs with no special library path.
6339 ac_x_libraries=
6340 else
6341 echo "configure: failed program was:" >&5
6342 cat conftest.$ac_ext >&5
6343 rm -rf conftest*
6344 LIBS="$ac_save_LIBS"
6345 # First see if replacing the include by lib works.
6346 # Check X11 before X11Rn because it is often a symlink to the current release.
6347 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
6348 /usr/X11/lib \
6349 /usr/X11R6/lib \
6350 /usr/X11R5/lib \
6351 /usr/X11R4/lib \
6352 \
6353 /usr/lib/X11 \
6354 /usr/lib/X11R6 \
6355 /usr/lib/X11R5 \
6356 /usr/lib/X11R4 \
6357 \
6358 /usr/local/X11/lib \
6359 /usr/local/X11R6/lib \
6360 /usr/local/X11R5/lib \
6361 /usr/local/X11R4/lib \
6362 \
6363 /usr/local/lib/X11 \
6364 /usr/local/lib/X11R6 \
6365 /usr/local/lib/X11R5 \
6366 /usr/local/lib/X11R4 \
6367 \
6368 /usr/X386/lib \
6369 /usr/x386/lib \
6370 /usr/XFree86/lib/X11 \
6371 \
6372 /usr/lib \
6373 /usr/local/lib \
6374 /usr/unsupported/lib \
6375 /usr/athena/lib \
6376 /usr/local/x11r5/lib \
6377 /usr/lpp/Xamples/lib \
6378 /lib/usr/lib/X11 \
6379 \
6380 /usr/openwin/lib \
6381 /usr/openwin/share/lib \
6382 ; \
6383 do
6384 for ac_extension in a so sl; do
6385 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
6386 ac_x_libraries=$ac_dir
6387 break 2
6388 fi
6389 done
6390 done
6391 fi
6392 rm -f conftest*
6393 fi # $ac_x_libraries = NO
6394
6395 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
6396 # Didn't find X anywhere. Cache the known absence of X.
6397 ac_cv_have_x="have_x=no"
6398 else
6399 # Record where we found X for the cache.
6400 ac_cv_have_x="have_x=yes \
6401 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6402 fi
6403 fi
6404 fi
6405 eval "$ac_cv_have_x"
6406 fi # $with_x != no
6407
6408 if test "$have_x" != yes; then
6409 echo "$ac_t""$have_x" 1>&6
6410 no_x=yes
6411 else
6412 # If each of the values was on the command line, it overrides each guess.
6413 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6414 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6415 # Update the cache value to reflect the command line values.
6416 ac_cv_have_x="have_x=yes \
6417 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
6418 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
6419 fi
6420
6421 # start-sanitize-sky
6422 # Enable GPU2 library for MIPS simulator
6423 # Check whether --with-sim-gpu2 or --without-sim-gpu2 was given.
6424 if test "${with_sim_gpu2+set}" = set; then
6425 withval="$with_sim_gpu2"
6426 case "${target}" in
6427 mips*-sky*-*)
6428 if test -d "${withval}"
6429 then
6430 if test x${x_libraries} != x
6431 then
6432 LIBS="${LIBS} -L${withval}/lib -lgpu2 -L${x_libraries} -lX11 -lXext -lm"
6433 else
6434 LIBS="${LIBS} -L${withval}/lib -lgpu2 -lX11 -lXext -lm"
6435 fi
6436 else
6437 echo "configure: warning: Directory ${withval} does not exist." 1>&2
6438 fi ;;
6439 *) echo "configure: warning: --with-sim-gpu2 option invalid for target ${target}" 1>&2
6440 esac
6441 fi
6442
6443 # Enable target accurate FP library
6444 # Check whether --with-sim-funit or --without-sim-funit was given.
6445 if test "${with_sim_funit+set}" = set; then
6446 withval="$with_sim_funit"
6447 case "${target}" in
6448 mips*-sky*-*)
6449 if test -d "${withval}"
6450 then
6451 LIBS="${LIBS} -L${withval}/lib -lfunit"
6452 else
6453 echo "configure: warning: Directory ${withval} does not exist." 1>&2
6454 fi ;;
6455 *) echo "configure: warning: --with-sim-funit option invalid for target ${target}" 1>&2
6456 esac
6457 fi
6458 # end-sanitize-sky
6459
6460
6461
6462
6463
6464
6465
6466 # Begin stuff to support --enable-shared
6467 # Check whether --enable-shared or --disable-shared was given.
6468 if test "${enable_shared+set}" = set; then
6469 enableval="$enable_shared"
6470 case "${enableval}" in
6471 yes) shared=true ;;
6472 no) shared=false ;;
6473 *) shared=true ;;
6474 esac
6475 fi
6476
6477 HLDFLAGS=
6478 HLDENV=
6479 # If we have shared libraries, try to set rpath reasonably.
6480 if test "${shared}" = "true"; then
6481 case "${host}" in
6482 *-*-hpux*)
6483 HLDFLAGS='-Wl,+s,+b,$(libdir)'
6484 ;;
6485 *-*-irix5* | *-*-irix6*)
6486 HLDFLAGS='-Wl,-rpath,$(libdir)'
6487 ;;
6488 *-*-linux*aout*)
6489 ;;
6490 *-*-linux* | *-pc-linux-gnu)
6491 HLDFLAGS='-Wl,-rpath,$(libdir)'
6492 ;;
6493 *-*-solaris*)
6494 HLDFLAGS='-R $(libdir)'
6495 ;;
6496 *-*-sysv4*)
6497 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;'
6498 ;;
6499 esac
6500 fi
6501
6502 # On SunOS, if the linker supports the -rpath option, use it to
6503 # prevent ../bfd and ../opcodes from being included in the run time
6504 # search path.
6505 case "${host}" in
6506 *-*-sunos*)
6507 echo 'main () { }' > conftest.c
6508 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
6509 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
6510 :
6511 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
6512 :
6513 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
6514 :
6515 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
6516 :
6517 elif test "${shared}" = "true"; then
6518 HLDFLAGS='-Wl,-rpath=$(libdir)'
6519 else
6520 HLDFLAGS='-Wl,-rpath='
6521 fi
6522 rm -f conftest.t conftest.c conftest
6523 ;;
6524 esac
6525
6526
6527 # End stuff to support --enable-shared
6528
6529 # target_subdir is used by the testsuite to find the target libraries.
6530 target_subdir=
6531 if test "${host}" != "${target}"; then
6532 target_subdir="${target_alias}/"
6533 fi
6534
6535
6536 frags=
6537 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
6538 if test ! -f ${host_makefile_frag}; then
6539 { echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
6540 fi
6541 frags="$frags $host_makefile_frag"
6542
6543 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
6544 if test ! -f ${target_makefile_frag}; then
6545 { echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
6546 fi
6547 frags="$frags $target_makefile_frag"
6548
6549
6550
6551
6552
6553 hostfile=`sed -n '
6554 s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
6555 ' ${host_makefile_frag}`
6556
6557 targetfile=`sed -n '
6558 s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
6559 ' ${target_makefile_frag}`
6560
6561 # these really aren't orthogonal true/false values of the same condition,
6562 # but shells are slow enough that I like to reuse the test conditions
6563 # whenever possible
6564 if test "${target}" = "${host}"; then
6565 nativefile=`sed -n '
6566 s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
6567 ' ${host_makefile_frag}`
6568 # else
6569 # GDBserver is only useful in a "native" enviroment
6570 # configdirs=`echo $configdirs | sed 's/gdbserver//'`
6571 fi
6572
6573
6574 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
6575 # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
6576 # corresponding links. But we have to remove the xm.h files and tm.h
6577 # files anyway, e.g. when switching from "configure host" to
6578 # "configure none".
6579
6580 files=
6581 links=
6582 rm -f xm.h
6583 if test "${hostfile}" != ""; then
6584 files="${files} config/${gdb_host_cpu}/${hostfile}"
6585 links="${links} xm.h"
6586 fi
6587 rm -f tm.h
6588 if test "${targetfile}" != ""; then
6589 files="${files} config/${gdb_target_cpu}/${targetfile}"
6590 links="${links} tm.h"
6591 fi
6592 rm -f nm.h
6593 if test "${nativefile}" != ""; then
6594 files="${files} config/${gdb_host_cpu}/${nativefile}"
6595 links="${links} nm.h"
6596 else
6597 # A cross-only configuration.
6598 files="${files} config/nm-empty.h"
6599 links="${links} nm.h"
6600 fi
6601 # start-sanitize-gdbtk
6602 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
6603 echo "configure:6604: checking whether ln -s works" >&5
6604 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
6605 echo $ac_n "(cached) $ac_c" 1>&6
6606 else
6607 rm -f conftestdata
6608 if ln -s X conftestdata 2>/dev/null
6609 then
6610 rm -f conftestdata
6611 ac_cv_prog_LN_S="ln -s"
6612 else
6613 ac_cv_prog_LN_S=ln
6614 fi
6615 fi
6616 LN_S="$ac_cv_prog_LN_S"
6617 if test "$ac_cv_prog_LN_S" = "ln -s"; then
6618 echo "$ac_t""yes" 1>&6
6619 else
6620 echo "$ac_t""no" 1>&6
6621 fi
6622
6623 # Make it possible to use the GUI without doing a full install
6624 if test "${enable_gdbtk}" = "yes" -a ! -d gdbtcl2 ; then
6625 if test "$LN_S" = "ln -s" -a ! -f gdbtcl2 ; then
6626 echo linking $srcdir/gdbtcl2 to gdbtcl2
6627 $LN_S $srcdir/gdbtcl2 gdbtcl2
6628 else
6629 echo Warning: Unable to link $srcdir/gdbtcl2 to gdbtcl2. You will need to do a
6630 echo " " make install before you are able to run the GUI.
6631 fi
6632 fi
6633 # end-sanitize-gdbtk
6634
6635
6636
6637 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
6638 echo "configure:6639: checking for Cygwin environment" >&5
6639 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
6640 echo $ac_n "(cached) $ac_c" 1>&6
6641 else
6642 cat > conftest.$ac_ext <<EOF
6643 #line 6644 "configure"
6644 #include "confdefs.h"
6645
6646 int main() {
6647
6648 #ifndef __CYGWIN__
6649 #define __CYGWIN__ __CYGWIN32__
6650 #endif
6651 return __CYGWIN__;
6652 ; return 0; }
6653 EOF
6654 if { (eval echo configure:6655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6655 rm -rf conftest*
6656 ac_cv_cygwin=yes
6657 else
6658 echo "configure: failed program was:" >&5
6659 cat conftest.$ac_ext >&5
6660 rm -rf conftest*
6661 ac_cv_cygwin=no
6662 fi
6663 rm -f conftest*
6664 rm -f conftest*
6665 fi
6666
6667 echo "$ac_t""$ac_cv_cygwin" 1>&6
6668 CYGWIN=
6669 test "$ac_cv_cygwin" = yes && CYGWIN=yes
6670 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
6671 echo "configure:6672: checking for mingw32 environment" >&5
6672 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
6673 echo $ac_n "(cached) $ac_c" 1>&6
6674 else
6675 cat > conftest.$ac_ext <<EOF
6676 #line 6677 "configure"
6677 #include "confdefs.h"
6678
6679 int main() {
6680 return __MINGW32__;
6681 ; return 0; }
6682 EOF
6683 if { (eval echo configure:6684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6684 rm -rf conftest*
6685 ac_cv_mingw32=yes
6686 else
6687 echo "configure: failed program was:" >&5
6688 cat conftest.$ac_ext >&5
6689 rm -rf conftest*
6690 ac_cv_mingw32=no
6691 fi
6692 rm -f conftest*
6693 rm -f conftest*
6694 fi
6695
6696 echo "$ac_t""$ac_cv_mingw32" 1>&6
6697 MINGW32=
6698 test "$ac_cv_mingw32" = yes && MINGW32=yes
6699
6700
6701 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
6702 echo "configure:6703: checking for executable suffix" >&5
6703 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
6704 echo $ac_n "(cached) $ac_c" 1>&6
6705 else
6706 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
6707 ac_cv_exeext=.exe
6708 else
6709 rm -f conftest*
6710 echo 'int main () { return 0; }' > conftest.$ac_ext
6711 ac_cv_exeext=
6712 if { (eval echo configure:6713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
6713 for file in conftest.*; do
6714 case $file in
6715 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
6716 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
6717 esac
6718 done
6719 else
6720 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
6721 fi
6722 rm -f conftest*
6723 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
6724 fi
6725 fi
6726
6727 EXEEXT=""
6728 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
6729 echo "$ac_t""${ac_cv_exeext}" 1>&6
6730 ac_exeext=$EXEEXT
6731
6732
6733 subdirs="$configdirs"
6734
6735 trap '' 1 2 15
6736 cat > confcache <<\EOF
6737 # This file is a shell script that caches the results of configure
6738 # tests run on this system so they can be shared between configure
6739 # scripts and configure runs. It is not useful on other systems.
6740 # If it contains results you don't want to keep, you may remove or edit it.
6741 #
6742 # By default, configure uses ./config.cache as the cache file,
6743 # creating it if it does not exist already. You can give configure
6744 # the --cache-file=FILE option to use a different cache file; that is
6745 # what configure does when it calls configure scripts in
6746 # subdirectories, so they share the cache.
6747 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6748 # config.status only pays attention to the cache file if you give it the
6749 # --recheck option to rerun configure.
6750 #
6751 EOF
6752 # The following way of writing the cache mishandles newlines in values,
6753 # but we know of no workaround that is simple, portable, and efficient.
6754 # So, don't put newlines in cache variables' values.
6755 # Ultrix sh set writes to stderr and can't be redirected directly,
6756 # and sets the high bit in the cache file unless we assign to the vars.
6757 (set) 2>&1 |
6758 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6759 *ac_space=\ *)
6760 # `set' does not quote correctly, so add quotes (double-quote substitution
6761 # turns \\\\ into \\, and sed turns \\ into \).
6762 sed -n \
6763 -e "s/'/'\\\\''/g" \
6764 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6765 ;;
6766 *)
6767 # `set' quotes correctly as required by POSIX, so do not add quotes.
6768 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6769 ;;
6770 esac >> confcache
6771 if cmp -s $cache_file confcache; then
6772 :
6773 else
6774 if test -w $cache_file; then
6775 echo "updating cache $cache_file"
6776 cat confcache > $cache_file
6777 else
6778 echo "not updating unwritable cache $cache_file"
6779 fi
6780 fi
6781 rm -f confcache
6782
6783 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6784
6785 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6786 # Let make expand exec_prefix.
6787 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6788
6789 # Any assignment to VPATH causes Sun make to only execute
6790 # the first set of double-colon rules, so remove it if not needed.
6791 # If there is a colon in the path, we need to keep it.
6792 if test "x$srcdir" = x.; then
6793 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6794 fi
6795
6796 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6797
6798 DEFS=-DHAVE_CONFIG_H
6799
6800 # Without the "./", some shells look in PATH for config.status.
6801 : ${CONFIG_STATUS=./config.status}
6802
6803 echo creating $CONFIG_STATUS
6804 rm -f $CONFIG_STATUS
6805 cat > $CONFIG_STATUS <<EOF
6806 #! /bin/sh
6807 # Generated automatically by configure.
6808 # Run this file to recreate the current configuration.
6809 # This directory was configured as follows,
6810 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6811 #
6812 # $0 $ac_configure_args
6813 #
6814 # Compiler output produced by configure, useful for debugging
6815 # configure, is in ./config.log if it exists.
6816
6817 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
6818 for ac_option
6819 do
6820 case "\$ac_option" in
6821 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
6822 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6823 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
6824 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
6825 echo "$CONFIG_STATUS generated by autoconf version 2.13"
6826 exit 0 ;;
6827 -help | --help | --hel | --he | --h)
6828 echo "\$ac_cs_usage"; exit 0 ;;
6829 *) echo "\$ac_cs_usage"; exit 1 ;;
6830 esac
6831 done
6832
6833 ac_given_srcdir=$srcdir
6834 ac_given_INSTALL="$INSTALL"
6835
6836 trap 'rm -fr `echo "Makefile tui/Makefile .gdbinit:gdbinit.in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
6837 EOF
6838 cat >> $CONFIG_STATUS <<EOF
6839
6840 # Protect against being on the right side of a sed subst in config.status.
6841 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6842 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
6843 $ac_vpsub
6844 $extrasub
6845 s%@SHELL@%$SHELL%g
6846 s%@CFLAGS@%$CFLAGS%g
6847 s%@CPPFLAGS@%$CPPFLAGS%g
6848 s%@CXXFLAGS@%$CXXFLAGS%g
6849 s%@FFLAGS@%$FFLAGS%g
6850 s%@DEFS@%$DEFS%g
6851 s%@LDFLAGS@%$LDFLAGS%g
6852 s%@LIBS@%$LIBS%g
6853 s%@exec_prefix@%$exec_prefix%g
6854 s%@prefix@%$prefix%g
6855 s%@program_transform_name@%$program_transform_name%g
6856 s%@bindir@%$bindir%g
6857 s%@sbindir@%$sbindir%g
6858 s%@libexecdir@%$libexecdir%g
6859 s%@datadir@%$datadir%g
6860 s%@sysconfdir@%$sysconfdir%g
6861 s%@sharedstatedir@%$sharedstatedir%g
6862 s%@localstatedir@%$localstatedir%g
6863 s%@libdir@%$libdir%g
6864 s%@includedir@%$includedir%g
6865 s%@oldincludedir@%$oldincludedir%g
6866 s%@infodir@%$infodir%g
6867 s%@mandir@%$mandir%g
6868 s%@CC@%$CC%g
6869 s%@CPP@%$CPP%g
6870 s%@host@%$host%g
6871 s%@host_alias@%$host_alias%g
6872 s%@host_cpu@%$host_cpu%g
6873 s%@host_vendor@%$host_vendor%g
6874 s%@host_os@%$host_os%g
6875 s%@target@%$target%g
6876 s%@target_alias@%$target_alias%g
6877 s%@target_cpu@%$target_cpu%g
6878 s%@target_vendor@%$target_vendor%g
6879 s%@target_os@%$target_os%g
6880 s%@build@%$build%g
6881 s%@build_alias@%$build_alias%g
6882 s%@build_cpu@%$build_cpu%g
6883 s%@build_vendor@%$build_vendor%g
6884 s%@build_os@%$build_os%g
6885 s%@SET_MAKE@%$SET_MAKE%g
6886 s%@RANLIB@%$RANLIB%g
6887 s%@ALLOCA@%$ALLOCA%g
6888 s%@USE_NLS@%$USE_NLS%g
6889 s%@MSGFMT@%$MSGFMT%g
6890 s%@GMSGFMT@%$GMSGFMT%g
6891 s%@XGETTEXT@%$XGETTEXT%g
6892 s%@USE_INCLUDED_LIBINTL@%$USE_INCLUDED_LIBINTL%g
6893 s%@CATALOGS@%$CATALOGS%g
6894 s%@CATOBJEXT@%$CATOBJEXT%g
6895 s%@DATADIRNAME@%$DATADIRNAME%g
6896 s%@GMOFILES@%$GMOFILES%g
6897 s%@INSTOBJEXT@%$INSTOBJEXT%g
6898 s%@INTLDEPS@%$INTLDEPS%g
6899 s%@INTLLIBS@%$INTLLIBS%g
6900 s%@INTLOBJS@%$INTLOBJS%g
6901 s%@POFILES@%$POFILES%g
6902 s%@POSUB@%$POSUB%g
6903 s%@INCLUDE_LOCALE_H@%$INCLUDE_LOCALE_H%g
6904 s%@GT_NO@%$GT_NO%g
6905 s%@GT_YES@%$GT_YES%g
6906 s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
6907 s%@l@%$l%g
6908 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6909 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
6910 s%@INSTALL_DATA@%$INSTALL_DATA%g
6911 s%@AR@%$AR%g
6912 s%@YACC@%$YACC%g
6913 s%@TERM_LIB@%$TERM_LIB%g
6914 s%@CONFIG_LDFLAGS@%$CONFIG_LDFLAGS%g
6915 s%@BUILD_TUI@%$BUILD_TUI%g
6916 s%@TUI_LIBRARY@%$TUI_LIBRARY%g
6917 s%@WARN_CFLAGS@%$WARN_CFLAGS%g
6918 s%@MMALLOC_CFLAGS@%$MMALLOC_CFLAGS%g
6919 s%@MMALLOC@%$MMALLOC%g
6920 s%@MACHINE_OBS@%$MACHINE_OBS%g
6921 s%@ENABLE_IDE@%$ENABLE_IDE%g
6922 s%@FOUNDRY_LIB_BASE@%$FOUNDRY_LIB_BASE%g
6923 s%@LIBGUI@%$LIBGUI%g
6924 s%@GUI_CFLAGS_X@%$GUI_CFLAGS_X%g
6925 s%@IDE_CFLAGS_X@%$IDE_CFLAGS_X%g
6926 s%@IDE_X@%$IDE_X%g
6927 s%@LIBIDETCL@%$LIBIDETCL%g
6928 s%@LIBIDE@%$LIBIDE%g
6929 s%@IDE_DEPS@%$IDE_DEPS%g
6930 s%@WIN32LIBS@%$WIN32LIBS%g
6931 s%@WIN32LDAPP@%$WIN32LDAPP%g
6932 s%@DLLTOOL@%$DLLTOOL%g
6933 s%@WINDRES@%$WINDRES%g
6934 s%@TCL_VERSION@%$TCL_VERSION%g
6935 s%@TCL_MAJOR_VERSION@%$TCL_MAJOR_VERSION%g
6936 s%@TCL_MINOR_VERSION@%$TCL_MINOR_VERSION%g
6937 s%@TCL_CC@%$TCL_CC%g
6938 s%@TCL_DEFS@%$TCL_DEFS%g
6939 s%@TCL_SHLIB_CFLAGS@%$TCL_SHLIB_CFLAGS%g
6940 s%@TCL_SHLIB_LD@%$TCL_SHLIB_LD%g
6941 s%@TCL_SHLIB_LD_LIBS@%$TCL_SHLIB_LD_LIBS%g
6942 s%@TCL_SHLIB_SUFFIX@%$TCL_SHLIB_SUFFIX%g
6943 s%@TCL_DL_LIBS@%$TCL_DL_LIBS%g
6944 s%@TCL_LD_FLAGS@%$TCL_LD_FLAGS%g
6945 s%@TCL_LD_SEARCH_FLAGS@%$TCL_LD_SEARCH_FLAGS%g
6946 s%@TCL_COMPAT_OBJS@%$TCL_COMPAT_OBJS%g
6947 s%@TCL_RANLIB@%$TCL_RANLIB%g
6948 s%@TCL_BUILD_LIB_SPEC@%$TCL_BUILD_LIB_SPEC%g
6949 s%@TCL_LIB_SPEC@%$TCL_LIB_SPEC%g
6950 s%@TCL_LIB_VERSIONS_OK@%$TCL_LIB_VERSIONS_OK%g
6951 s%@TK_VERSION@%$TK_VERSION%g
6952 s%@TK_DEFS@%$TK_DEFS%g
6953 s%@TK_BUILD_INCLUDES@%$TK_BUILD_INCLUDES%g
6954 s%@TK_XINCLUDES@%$TK_XINCLUDES%g
6955 s%@TK_XLIBSW@%$TK_XLIBSW%g
6956 s%@TK_BUILD_LIB_SPEC@%$TK_BUILD_LIB_SPEC%g
6957 s%@TK_LIB_SPEC@%$TK_LIB_SPEC%g
6958 s%@TCLHDIR@%$TCLHDIR%g
6959 s%@TKHDIR@%$TKHDIR%g
6960 s%@ITCLHDIR@%$ITCLHDIR%g
6961 s%@ITKHDIR@%$ITKHDIR%g
6962 s%@TIXHDIR@%$TIXHDIR%g
6963 s%@ITCL_VERSION@%$ITCL_VERSION%g
6964 s%@ITCL_DEFS@%$ITCL_DEFS%g
6965 s%@ITCL_BUILD_INCLUDES@%$ITCL_BUILD_INCLUDES%g
6966 s%@ITCL_BUILD_LIB_SPEC@%$ITCL_BUILD_LIB_SPEC%g
6967 s%@ITCL_LIB_SPEC@%$ITCL_LIB_SPEC%g
6968 s%@ITK_VERSION@%$ITK_VERSION%g
6969 s%@ITK_DEFS@%$ITK_DEFS%g
6970 s%@ITK_BUILD_INCLUDES@%$ITK_BUILD_INCLUDES%g
6971 s%@ITK_BUILD_LIB_SPEC@%$ITK_BUILD_LIB_SPEC%g
6972 s%@ITK_LIB_SPEC@%$ITK_LIB_SPEC%g
6973 s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g
6974 s%@X_CFLAGS@%$X_CFLAGS%g
6975 s%@X_LDFLAGS@%$X_LDFLAGS%g
6976 s%@X_LIBS@%$X_LIBS%g
6977 s%@ITCLLIB@%$ITCLLIB%g
6978 s%@ITCL_DEPS@%$ITCL_DEPS%g
6979 s%@ITKLIB@%$ITKLIB%g
6980 s%@ITK_DEPS@%$ITK_DEPS%g
6981 s%@TIXLIB@%$TIXLIB%g
6982 s%@TIX_DEPS@%$TIX_DEPS%g
6983 s%@GDBTKLIBS@%$GDBTKLIBS%g
6984 s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
6985 s%@CONFIG_OBS@%$CONFIG_OBS%g
6986 s%@CONFIG_DEPS@%$CONFIG_DEPS%g
6987 s%@CONFIG_SRCS@%$CONFIG_SRCS%g
6988 s%@HLDFLAGS@%$HLDFLAGS%g
6989 s%@HLDENV@%$HLDENV%g
6990 s%@target_subdir@%$target_subdir%g
6991 /@host_makefile_frag@/r $host_makefile_frag
6992 s%@host_makefile_frag@%%g
6993 /@target_makefile_frag@/r $target_makefile_frag
6994 s%@target_makefile_frag@%%g
6995 s%@frags@%$frags%g
6996 s%@LN_S@%$LN_S%g
6997 s%@EXEEXT@%$EXEEXT%g
6998 s%@subdirs@%$subdirs%g
6999
7000 CEOF
7001 EOF
7002
7003 cat >> $CONFIG_STATUS <<\EOF
7004
7005 # Split the substitutions into bite-sized pieces for seds with
7006 # small command number limits, like on Digital OSF/1 and HP-UX.
7007 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7008 ac_file=1 # Number of current file.
7009 ac_beg=1 # First line for current file.
7010 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7011 ac_more_lines=:
7012 ac_sed_cmds=""
7013 while $ac_more_lines; do
7014 if test $ac_beg -gt 1; then
7015 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7016 else
7017 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7018 fi
7019 if test ! -s conftest.s$ac_file; then
7020 ac_more_lines=false
7021 rm -f conftest.s$ac_file
7022 else
7023 if test -z "$ac_sed_cmds"; then
7024 ac_sed_cmds="sed -f conftest.s$ac_file"
7025 else
7026 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7027 fi
7028 ac_file=`expr $ac_file + 1`
7029 ac_beg=$ac_end
7030 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7031 fi
7032 done
7033 if test -z "$ac_sed_cmds"; then
7034 ac_sed_cmds=cat
7035 fi
7036 EOF
7037
7038 cat >> $CONFIG_STATUS <<EOF
7039
7040 CONFIG_FILES=\${CONFIG_FILES-"Makefile tui/Makefile .gdbinit:gdbinit.in"}
7041 EOF
7042 cat >> $CONFIG_STATUS <<\EOF
7043 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7044 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7045 case "$ac_file" in
7046 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7047 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7048 *) ac_file_in="${ac_file}.in" ;;
7049 esac
7050
7051 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7052
7053 # Remove last slash and all that follows it. Not all systems have dirname.
7054 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7055 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7056 # The file is in a subdirectory.
7057 test ! -d "$ac_dir" && mkdir "$ac_dir"
7058 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7059 # A "../" for each directory in $ac_dir_suffix.
7060 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7061 else
7062 ac_dir_suffix= ac_dots=
7063 fi
7064
7065 case "$ac_given_srcdir" in
7066 .) srcdir=.
7067 if test -z "$ac_dots"; then top_srcdir=.
7068 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7069 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7070 *) # Relative path.
7071 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7072 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7073 esac
7074
7075 case "$ac_given_INSTALL" in
7076 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7077 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7078 esac
7079
7080 echo creating "$ac_file"
7081 rm -f "$ac_file"
7082 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7083 case "$ac_file" in
7084 *Makefile*) ac_comsub="1i\\
7085 # $configure_input" ;;
7086 *) ac_comsub= ;;
7087 esac
7088
7089 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7090 sed -e "$ac_comsub
7091 s%@configure_input@%$configure_input%g
7092 s%@srcdir@%$srcdir%g
7093 s%@top_srcdir@%$top_srcdir%g
7094 s%@INSTALL@%$INSTALL%g
7095 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7096 fi; done
7097 rm -f conftest.s*
7098
7099 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7100 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7101 #
7102 # ac_d sets the value in "#define NAME VALUE" lines.
7103 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7104 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7105 ac_dC='\3'
7106 ac_dD='%g'
7107 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7108 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7109 ac_uB='\([ ]\)%\1#\2define\3'
7110 ac_uC=' '
7111 ac_uD='\4%g'
7112 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7113 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7114 ac_eB='$%\1#\2define\3'
7115 ac_eC=' '
7116 ac_eD='%g'
7117
7118 if test "${CONFIG_HEADERS+set}" != set; then
7119 EOF
7120 cat >> $CONFIG_STATUS <<EOF
7121 CONFIG_HEADERS="config.h:config.in"
7122 EOF
7123 cat >> $CONFIG_STATUS <<\EOF
7124 fi
7125 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7126 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7127 case "$ac_file" in
7128 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7129 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7130 *) ac_file_in="${ac_file}.in" ;;
7131 esac
7132
7133 echo creating $ac_file
7134
7135 rm -f conftest.frag conftest.in conftest.out
7136 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7137 cat $ac_file_inputs > conftest.in
7138
7139 EOF
7140
7141 # Transform confdefs.h into a sed script conftest.vals that substitutes
7142 # the proper values into config.h.in to produce config.h. And first:
7143 # Protect against being on the right side of a sed subst in config.status.
7144 # Protect against being in an unquoted here document in config.status.
7145 rm -f conftest.vals
7146 cat > conftest.hdr <<\EOF
7147 s/[\\&%]/\\&/g
7148 s%[\\$`]%\\&%g
7149 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7150 s%ac_d%ac_u%gp
7151 s%ac_u%ac_e%gp
7152 EOF
7153 sed -n -f conftest.hdr confdefs.h > conftest.vals
7154 rm -f conftest.hdr
7155
7156 # This sed command replaces #undef with comments. This is necessary, for
7157 # example, in the case of _POSIX_SOURCE, which is predefined and required
7158 # on some systems where configure will not decide to define it.
7159 cat >> conftest.vals <<\EOF
7160 s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7161 EOF
7162
7163 # Break up conftest.vals because some shells have a limit on
7164 # the size of here documents, and old seds have small limits too.
7165
7166 rm -f conftest.tail
7167 while :
7168 do
7169 ac_lines=`grep -c . conftest.vals`
7170 # grep -c gives empty output for an empty file on some AIX systems.
7171 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7172 # Write a limited-size here document to conftest.frag.
7173 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7174 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7175 echo 'CEOF
7176 sed -f conftest.frag conftest.in > conftest.out
7177 rm -f conftest.in
7178 mv conftest.out conftest.in
7179 ' >> $CONFIG_STATUS
7180 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7181 rm -f conftest.vals
7182 mv conftest.tail conftest.vals
7183 done
7184 rm -f conftest.vals
7185
7186 cat >> $CONFIG_STATUS <<\EOF
7187 rm -f conftest.frag conftest.h
7188 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7189 cat conftest.in >> conftest.h
7190 rm -f conftest.in
7191 if cmp -s $ac_file conftest.h 2>/dev/null; then
7192 echo "$ac_file is unchanged"
7193 rm -f conftest.h
7194 else
7195 # Remove last slash and all that follows it. Not all systems have dirname.
7196 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7197 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7198 # The file is in a subdirectory.
7199 test ! -d "$ac_dir" && mkdir "$ac_dir"
7200 fi
7201 rm -f $ac_file
7202 mv conftest.h $ac_file
7203 fi
7204 fi; done
7205
7206 EOF
7207
7208 cat >> $CONFIG_STATUS <<EOF
7209 ac_sources="$files"
7210 ac_dests="$links"
7211 EOF
7212
7213 cat >> $CONFIG_STATUS <<\EOF
7214 srcdir=$ac_given_srcdir
7215 while test -n "$ac_sources"; do
7216 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
7217 set $ac_sources; ac_source=$1; shift; ac_sources=$*
7218
7219 echo "linking $srcdir/$ac_source to $ac_dest"
7220
7221 if test ! -r $srcdir/$ac_source; then
7222 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
7223 fi
7224 rm -f $ac_dest
7225
7226 # Make relative symlinks.
7227 # Remove last slash and all that follows it. Not all systems have dirname.
7228 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
7229 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
7230 # The dest file is in a subdirectory.
7231 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
7232 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
7233 # A "../" for each directory in $ac_dest_dir_suffix.
7234 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
7235 else
7236 ac_dest_dir_suffix= ac_dots=
7237 fi
7238
7239 case "$srcdir" in
7240 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
7241 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
7242 esac
7243
7244 # Make a symlink if possible; otherwise try a hard link.
7245 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
7246 ln $srcdir/$ac_source $ac_dest; then :
7247 else
7248 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
7249 fi
7250 done
7251 EOF
7252 cat >> $CONFIG_STATUS <<EOF
7253
7254 gdb_host_cpu=$gdb_host_cpu
7255 gdb_target_cpu=$gdb_target_cpu
7256 nativefile=$nativefile
7257
7258 EOF
7259 cat >> $CONFIG_STATUS <<\EOF
7260
7261 if test "${nativefile}" = ""; then
7262 sed -e '/^NATDEPFILES[ ]*=[ ]*/s//# NATDEPFILES=/' \
7263 < Makefile > Makefile.tem
7264 mv -f Makefile.tem Makefile
7265 fi
7266
7267 sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
7268 /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
7269 /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
7270 mv -f Makefile.tmp Makefile
7271
7272 case x$CONFIG_HEADERS in
7273 xconfig.h:config.in)
7274 echo > stamp-h ;;
7275 esac
7276
7277 exit 0
7278 EOF
7279 chmod +x $CONFIG_STATUS
7280 rm -fr confdefs* $ac_clean_files
7281 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
7282
7283 if test "$no_recursion" != yes; then
7284
7285 # Remove --cache-file and --srcdir arguments so they do not pile up.
7286 ac_sub_configure_args=
7287 ac_prev=
7288 for ac_arg in $ac_configure_args; do
7289 if test -n "$ac_prev"; then
7290 ac_prev=
7291 continue
7292 fi
7293 case "$ac_arg" in
7294 -cache-file | --cache-file | --cache-fil | --cache-fi \
7295 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
7296 ac_prev=cache_file ;;
7297 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
7298 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
7299 ;;
7300 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
7301 ac_prev=srcdir ;;
7302 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
7303 ;;
7304 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
7305 esac
7306 done
7307
7308 for ac_config_dir in $configdirs; do
7309
7310 # Do not complain, so a configure script can configure whichever
7311 # parts of a large source tree are present.
7312 if test ! -d $srcdir/$ac_config_dir; then
7313 continue
7314 fi
7315
7316 echo configuring in $ac_config_dir
7317
7318 case "$srcdir" in
7319 .) ;;
7320 *)
7321 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
7322 else
7323 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
7324 fi
7325 ;;
7326 esac
7327
7328 ac_popdir=`pwd`
7329 cd $ac_config_dir
7330
7331 # A "../" for each directory in /$ac_config_dir.
7332 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
7333
7334 case "$srcdir" in
7335 .) # No --srcdir option. We are building in place.
7336 ac_sub_srcdir=$srcdir ;;
7337 /*) # Absolute path.
7338 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
7339 *) # Relative path.
7340 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
7341 esac
7342
7343 # Check for guested configure; otherwise get Cygnus style configure.
7344 if test -f $ac_sub_srcdir/configure; then
7345 ac_sub_configure=$ac_sub_srcdir/configure
7346 elif test -f $ac_sub_srcdir/configure.in; then
7347 ac_sub_configure=$ac_configure
7348 else
7349 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
7350 ac_sub_configure=
7351 fi
7352
7353 # The recursion is here.
7354 if test -n "$ac_sub_configure"; then
7355
7356 # Make the cache file name correct relative to the subdirectory.
7357 case "$cache_file" in
7358 /*) ac_sub_cache_file=$cache_file ;;
7359 *) # Relative path.
7360 ac_sub_cache_file="$ac_dots$cache_file" ;;
7361 esac
7362 case "$ac_given_INSTALL" in
7363 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7364 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7365 esac
7366
7367 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
7368 # The eval makes quoting arguments work.
7369 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
7370 then :
7371 else
7372 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
7373 fi
7374 fi
7375
7376 cd $ac_popdir
7377 done
7378 fi
7379
7380
7381 exit 0
This page took 0.258119 seconds and 4 git commands to generate.