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