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