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