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