* eval.c (evaluate_subexp_standard): In case of TYPE_CODE_SET:
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
5436fc65
C
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
fda58904
FF
4# Generated automatically using autoconf version 2.8
5# Copyright (C) 1992, 1993, 1994 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:
14ac_help="$ac_help
15 --enable-netrom "
188c635f
SG
16ac_help="$ac_help
17 --enable-gm "
3c0bf315
MM
18ac_help="$ac_help
19 --enable-sim-powerpc "
5436fc65
C
20ac_help="$ac_help
21 --enable-gdbtk "
22ac_help="$ac_help
23 --with-x use the X Window System"
4e327047
TT
24ac_help="$ac_help
25 --with-tclinclude directory where tcl private headers are"
26ac_help="$ac_help
27 --with-tcllib directory where the tcl library is"
28ac_help="$ac_help
29 --with-tkinclude directory where the tk private headers are"
30ac_help="$ac_help
31 --with-tklib directory where the tk library is"
5436fc65
C
32
33# Initialize some variables set by options.
34# The variables have the same names as the options, with
35# dashes changed to underlines.
36build=NONE
37cache_file=./config.cache
38exec_prefix=NONE
39host=NONE
40no_create=
41nonopt=NONE
42no_recursion=
43prefix=NONE
44program_prefix=NONE
45program_suffix=NONE
46program_transform_name=s,x,x,
47silent=
48site=
49srcdir=
50target=NONE
51verbose=
52x_includes=NONE
53x_libraries=NONE
229b2c87
DE
54bindir='${exec_prefix}/bin'
55sbindir='${exec_prefix}/sbin'
56libexecdir='${exec_prefix}/libexec'
57datadir='${prefix}/share'
58sysconfdir='${prefix}/etc'
59sharedstatedir='${prefix}/com'
60localstatedir='${prefix}/var'
61libdir='${exec_prefix}/lib'
62includedir='${prefix}/include'
63oldincludedir='/usr/include'
64infodir='${prefix}/info'
65mandir='${prefix}/man'
5436fc65
C
66
67# Initialize some other variables.
68subdirs=
229b2c87 69MFLAGS= MAKEFLAGS=
5436fc65
C
70
71ac_prev=
72for ac_option
73do
74
75 # If the previous option needs an argument, assign it.
76 if test -n "$ac_prev"; then
77 eval "$ac_prev=\$ac_option"
78 ac_prev=
79 continue
80 fi
81
82 case "$ac_option" in
83 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
84 *) ac_optarg= ;;
85 esac
86
87 # Accept the important Cygnus configure options, so we can diagnose typos.
88
89 case "$ac_option" in
90
229b2c87
DE
91 -bindir | --bindir | --bindi | --bind | --bin | --bi)
92 ac_prev=bindir ;;
93 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
94 bindir="$ac_optarg" ;;
95
96 -build | --build | --buil | --bui | --bu)
5436fc65 97 ac_prev=build ;;
229b2c87 98 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
5436fc65
C
99 build="$ac_optarg" ;;
100
101 -cache-file | --cache-file | --cache-fil | --cache-fi \
102 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
103 ac_prev=cache_file ;;
104 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
105 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
106 cache_file="$ac_optarg" ;;
107
229b2c87
DE
108 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
109 ac_prev=datadir ;;
110 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
111 | --da=*)
112 datadir="$ac_optarg" ;;
113
5436fc65
C
114 -disable-* | --disable-*)
115 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
116 # Reject names that are not valid shell variable names.
117 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
118 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
119 fi
120 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
121 eval "enable_${ac_feature}=no" ;;
122
123 -enable-* | --enable-*)
124 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
125 # Reject names that are not valid shell variable names.
126 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
127 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
128 fi
129 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
130 case "$ac_option" in
131 *=*) ;;
132 *) ac_optarg=yes ;;
133 esac
134 eval "enable_${ac_feature}='$ac_optarg'" ;;
135
136 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
137 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
138 | --exec | --exe | --ex)
139 ac_prev=exec_prefix ;;
140 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
141 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
142 | --exec=* | --exe=* | --ex=*)
143 exec_prefix="$ac_optarg" ;;
144
145 -gas | --gas | --ga | --g)
146 # Obsolete; use --with-gas.
147 with_gas=yes ;;
148
149 -help | --help | --hel | --he)
150 # Omit some internal or obsolete options to make the list less imposing.
151 # This message is too long to be a string in the A/UX 3.1 sh.
152 cat << EOF
153Usage: configure [options] [host]
154Options: [defaults in brackets after descriptions]
155Configuration:
156 --cache-file=FILE cache test results in FILE
157 --help print this message
158 --no-create do not create output files
159 --quiet, --silent do not print \`checking...' messages
160 --version print the version of autoconf that created configure
161Directory and file names:
162 --prefix=PREFIX install architecture-independent files in PREFIX
163 [$ac_default_prefix]
229b2c87 164 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
5436fc65 165 [same as prefix]
229b2c87
DE
166 --bindir=DIR user executables in DIR [EPREFIX/bin]
167 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
168 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
169 --datadir=DIR read-only architecture-independent data in DIR
170 [PREFIX/share]
171 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
172 --sharedstatedir=DIR modifiable architecture-independent data in DIR
173 [PREFIX/com]
174 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
175 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
176 --includedir=DIR C header files in DIR [PREFIX/include]
177 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
178 --infodir=DIR info documentation in DIR [PREFIX/info]
179 --mandir=DIR man documentation in DIR [PREFIX/man]
5436fc65
C
180 --srcdir=DIR find the sources in DIR [configure dir or ..]
181 --program-prefix=PREFIX prepend PREFIX to installed program names
182 --program-suffix=SUFFIX append SUFFIX to installed program names
229b2c87
DE
183 --program-transform-name=PROGRAM
184 run sed PROGRAM on installed program names
185EOF
186 cat << EOF
5436fc65
C
187Host type:
188 --build=BUILD configure for building on BUILD [BUILD=HOST]
189 --host=HOST configure for HOST [guessed]
190 --target=TARGET configure for TARGET [TARGET=HOST]
191Features and packages:
192 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
193 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
194 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
195 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
196 --x-includes=DIR X include files are in DIR
197 --x-libraries=DIR X library files are in DIR
5436fc65 198EOF
229b2c87
DE
199 if test -n "$ac_help"; then
200 echo "--enable and --with options recognized:$ac_help"
201 fi
5436fc65
C
202 exit 0 ;;
203
204 -host | --host | --hos | --ho)
205 ac_prev=host ;;
206 -host=* | --host=* | --hos=* | --ho=*)
207 host="$ac_optarg" ;;
208
229b2c87
DE
209 -includedir | --includedir | --includedi | --included | --include \
210 | --includ | --inclu | --incl | --inc)
211 ac_prev=includedir ;;
212 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
213 | --includ=* | --inclu=* | --incl=* | --inc=*)
214 includedir="$ac_optarg" ;;
215
216 -infodir | --infodir | --infodi | --infod | --info | --inf)
217 ac_prev=infodir ;;
218 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
219 infodir="$ac_optarg" ;;
220
221 -libdir | --libdir | --libdi | --libd)
222 ac_prev=libdir ;;
223 -libdir=* | --libdir=* | --libdi=* | --libd=*)
224 libdir="$ac_optarg" ;;
225
226 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
227 | --libexe | --libex | --libe)
228 ac_prev=libexecdir ;;
229 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
230 | --libexe=* | --libex=* | --libe=*)
231 libexecdir="$ac_optarg" ;;
232
233 -localstatedir | --localstatedir | --localstatedi | --localstated \
234 | --localstate | --localstat | --localsta | --localst \
235 | --locals | --local | --loca | --loc | --lo)
236 ac_prev=localstatedir ;;
237 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
238 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
239 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
240 localstatedir="$ac_optarg" ;;
241
242 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
243 ac_prev=mandir ;;
244 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
245 mandir="$ac_optarg" ;;
246
5436fc65
C
247 -nfp | --nfp | --nf)
248 # Obsolete; use --without-fp.
249 with_fp=no ;;
250
251 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
252 | --no-cr | --no-c)
253 no_create=yes ;;
254
255 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
256 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
257 no_recursion=yes ;;
258
229b2c87
DE
259 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
260 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
261 | --oldin | --oldi | --old | --ol | --o)
262 ac_prev=oldincludedir ;;
263 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
264 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
265 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
266 oldincludedir="$ac_optarg" ;;
267
5436fc65
C
268 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
269 ac_prev=prefix ;;
270 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
271 prefix="$ac_optarg" ;;
272
273 -program-prefix | --program-prefix | --program-prefi | --program-pref \
274 | --program-pre | --program-pr | --program-p)
275 ac_prev=program_prefix ;;
276 -program-prefix=* | --program-prefix=* | --program-prefi=* \
277 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
278 program_prefix="$ac_optarg" ;;
279
280 -program-suffix | --program-suffix | --program-suffi | --program-suff \
281 | --program-suf | --program-su | --program-s)
282 ac_prev=program_suffix ;;
283 -program-suffix=* | --program-suffix=* | --program-suffi=* \
284 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
285 program_suffix="$ac_optarg" ;;
286
287 -program-transform-name | --program-transform-name \
288 | --program-transform-nam | --program-transform-na \
289 | --program-transform-n | --program-transform- \
290 | --program-transform | --program-transfor \
291 | --program-transfo | --program-transf \
292 | --program-trans | --program-tran \
293 | --progr-tra | --program-tr | --program-t)
294 ac_prev=program_transform_name ;;
295 -program-transform-name=* | --program-transform-name=* \
296 | --program-transform-nam=* | --program-transform-na=* \
297 | --program-transform-n=* | --program-transform-=* \
298 | --program-transform=* | --program-transfor=* \
299 | --program-transfo=* | --program-transf=* \
300 | --program-trans=* | --program-tran=* \
301 | --progr-tra=* | --program-tr=* | --program-t=*)
302 program_transform_name="$ac_optarg" ;;
303
304 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
305 | -silent | --silent | --silen | --sile | --sil)
306 silent=yes ;;
307
229b2c87
DE
308 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
309 ac_prev=sbindir ;;
310 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
311 | --sbi=* | --sb=*)
312 sbindir="$ac_optarg" ;;
313
314 -sharedstatedir | --sharedstatedir | --sharedstatedi \
315 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
316 | --sharedst | --shareds | --shared | --share | --shar \
317 | --sha | --sh)
318 ac_prev=sharedstatedir ;;
319 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
320 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
321 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
322 | --sha=* | --sh=*)
323 sharedstatedir="$ac_optarg" ;;
324
5436fc65
C
325 -site | --site | --sit)
326 ac_prev=site ;;
327 -site=* | --site=* | --sit=*)
328 site="$ac_optarg" ;;
329
330 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
331 ac_prev=srcdir ;;
332 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
333 srcdir="$ac_optarg" ;;
334
229b2c87
DE
335 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
336 | --syscon | --sysco | --sysc | --sys | --sy)
337 ac_prev=sysconfdir ;;
338 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
339 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
340 sysconfdir="$ac_optarg" ;;
341
5436fc65
C
342 -target | --target | --targe | --targ | --tar | --ta | --t)
343 ac_prev=target ;;
344 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
345 target="$ac_optarg" ;;
346
347 -v | -verbose | --verbose | --verbos | --verbo | --verb)
348 verbose=yes ;;
349
350 -version | --version | --versio | --versi | --vers)
fda58904 351 echo "configure generated by autoconf version 2.8"
5436fc65
C
352 exit 0 ;;
353
354 -with-* | --with-*)
355 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
356 # Reject names that are not valid shell variable names.
357 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
358 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
359 fi
360 ac_package=`echo $ac_package| sed 's/-/_/g'`
361 case "$ac_option" in
362 *=*) ;;
363 *) ac_optarg=yes ;;
364 esac
365 eval "with_${ac_package}='$ac_optarg'" ;;
366
367 -without-* | --without-*)
368 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
369 # Reject names that are not valid shell variable names.
370 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
371 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
372 fi
373 ac_package=`echo $ac_package| sed 's/-/_/g'`
374 eval "with_${ac_package}=no" ;;
375
376 --x)
377 # Obsolete; use --with-x.
378 with_x=yes ;;
379
380 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
381 | --x-incl | --x-inc | --x-in | --x-i)
382 ac_prev=x_includes ;;
383 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
384 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
385 x_includes="$ac_optarg" ;;
386
387 -x-libraries | --x-libraries | --x-librarie | --x-librari \
388 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
389 ac_prev=x_libraries ;;
390 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
391 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
392 x_libraries="$ac_optarg" ;;
393
394 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
395 ;;
396
229b2c87 397 *)
5436fc65
C
398 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
399 echo "configure: warning: $ac_option: invalid host type" 1>&2
400 fi
401 if test "x$nonopt" != xNONE; then
402 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
403 fi
404 nonopt="$ac_option"
405 ;;
406
407 esac
408done
409
410if test -n "$ac_prev"; then
411 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
412fi
413
414trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
415
416# File descriptor usage:
417# 0 standard input
418# 1 file creation
419# 2 errors and warnings
420# 3 some systems may open it to /dev/tty
421# 4 used on the Kubota Titan
422# 6 checking for... messages and results
423# 5 compiler messages saved in config.log
424if test "$silent" = yes; then
425 exec 6>/dev/null
426else
427 exec 6>&1
428fi
429exec 5>./config.log
430
431echo "\
432This file contains any messages produced by compilers while
433running configure, to aid debugging if configure makes a mistake.
434" 1>&5
435
436# Strip out --no-create and --no-recursion so they do not pile up.
437# Also quote any args containing shell metacharacters.
438ac_configure_args=
439for ac_arg
440do
441 case "$ac_arg" in
442 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
443 | --no-cr | --no-c) ;;
444 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
445 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
446 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
447 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
448 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
449 esac
450done
451
452# NLS nuisances.
453# Only set LANG and LC_ALL to C if already set.
454# These must not be set unconditionally because not all systems understand
455# e.g. LANG=C (notably SCO).
456if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
457if test "${LANG+set}" = set; then LANG=C; export LANG; fi
458
459# confdefs.h avoids OS command line length limits that DEFS can exceed.
460rm -rf conftest* confdefs.h
461# AIX cpp loses on an empty file, so make sure it contains at least a newline.
462echo > confdefs.h
463
464# A filename unique to this package, relative to the directory that
465# configure is in, which we can look for to find out if srcdir is correct.
466ac_unique_file=main.c
467
468# Find the source files, if location was not specified.
469if test -z "$srcdir"; then
470 ac_srcdir_defaulted=yes
471 # Try the directory containing this script, then its parent.
472 ac_prog=$0
473 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
474 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
475 srcdir=$ac_confdir
476 if test ! -r $srcdir/$ac_unique_file; then
477 srcdir=..
478 fi
479else
480 ac_srcdir_defaulted=no
481fi
482if test ! -r $srcdir/$ac_unique_file; then
483 if test "$ac_srcdir_defaulted" = yes; then
484 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
485 else
486 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
487 fi
488fi
489srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
490
491# Prefer explicitly selected file to automatically selected ones.
492if test -z "$CONFIG_SITE"; then
493 if test "x$prefix" != xNONE; then
494 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
495 else
496 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
497 fi
498fi
499for ac_site_file in $CONFIG_SITE; do
500 if test -r "$ac_site_file"; then
501 echo "loading site script $ac_site_file"
502 . "$ac_site_file"
503 fi
504done
505
506if test -r "$cache_file"; then
507 echo "loading cache $cache_file"
508 . $cache_file
509else
510 echo "creating cache $cache_file"
511 > $cache_file
512fi
513
514ac_ext=c
515# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3dedc867
FF
516ac_cpp='$CPP $CPPFLAGS'
517ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
518ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5436fc65
C
519
520if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
521 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
522 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
523 ac_n= ac_c='
524' ac_t=' '
525 else
526 ac_n=-n ac_c= ac_t=
527 fi
528else
529 ac_n= ac_c='\c' ac_t=
530fi
531
532
533
db210d08 534
5436fc65
C
535# Extract the first word of "gcc", so it can be a program name with args.
536set dummy gcc; ac_word=$2
537echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
538if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
539 echo $ac_n "(cached) $ac_c" 1>&6
540else
541 if test -n "$CC"; then
542 ac_cv_prog_CC="$CC" # Let the user override the test.
543else
544 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
da3d57e3 545 for ac_dir in $PATH; do
5436fc65
C
546 test -z "$ac_dir" && ac_dir=.
547 if test -f $ac_dir/$ac_word; then
548 ac_cv_prog_CC="gcc"
549 break
550 fi
551 done
552 IFS="$ac_save_ifs"
5436fc65
C
553fi
554fi
555CC="$ac_cv_prog_CC"
556if test -n "$CC"; then
557 echo "$ac_t""$CC" 1>&6
558else
559 echo "$ac_t""no" 1>&6
560fi
561
3dedc867
FF
562if test -z "$CC"; then
563 # Extract the first word of "cc", so it can be a program name with args.
564set dummy cc; ac_word=$2
565echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
566if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
567 echo $ac_n "(cached) $ac_c" 1>&6
568else
569 if test -n "$CC"; then
570 ac_cv_prog_CC="$CC" # Let the user override the test.
571else
572 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
573 ac_prog_rejected=no
574 for ac_dir in $PATH; do
575 test -z "$ac_dir" && ac_dir=.
576 if test -f $ac_dir/$ac_word; then
577 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
578 ac_prog_rejected=yes
579 continue
580 fi
581 ac_cv_prog_CC="cc"
582 break
583 fi
584 done
585 IFS="$ac_save_ifs"
586if test $ac_prog_rejected = yes; then
587 # We found a bogon in the path, so make sure we never use it.
588 set dummy $ac_cv_prog_CC
589 shift
590 if test $# -gt 0; then
591 # We chose a different compiler from the bogus one.
592 # However, it has the same basename, so the bogon will be chosen
593 # first if we set CC to just the basename; use the full file name.
594 shift
595 set dummy "$ac_dir/$ac_word" "$@"
596 shift
597 ac_cv_prog_CC="$@"
598 fi
599fi
600fi
601fi
602CC="$ac_cv_prog_CC"
603if test -n "$CC"; then
604 echo "$ac_t""$CC" 1>&6
605else
606 echo "$ac_t""no" 1>&6
607fi
608
609 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
610fi
5436fc65
C
611
612echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
613if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
614 echo $ac_n "(cached) $ac_c" 1>&6
615else
616 cat > conftest.c <<EOF
617#ifdef __GNUC__
618 yes;
619#endif
620EOF
db210d08 621if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
5436fc65
C
622 ac_cv_prog_gcc=yes
623else
624 ac_cv_prog_gcc=no
625fi
626fi
229b2c87 627
5436fc65
C
628echo "$ac_t""$ac_cv_prog_gcc" 1>&6
629if test $ac_cv_prog_gcc = yes; then
630 GCC=yes
631 if test "${CFLAGS+set}" != set; then
632 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
633if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
634 echo $ac_n "(cached) $ac_c" 1>&6
635else
636 echo 'void f(){}' > conftest.c
637if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
638 ac_cv_prog_gcc_g=yes
639else
640 ac_cv_prog_gcc_g=no
641fi
642rm -f conftest*
643
644fi
229b2c87
DE
645
646echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
5436fc65
C
647 if test $ac_cv_prog_gcc_g = yes; then
648 CFLAGS="-g -O"
649 else
650 CFLAGS="-O"
651 fi
652 fi
653else
654 GCC=
655 test "${CFLAGS+set}" = set || CFLAGS="-g"
656fi
657
658echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
659# On Suns, sometimes $CPP names a directory.
660if test -n "$CPP" && test -d "$CPP"; then
661 CPP=
662fi
663if test -z "$CPP"; then
664if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
665 echo $ac_n "(cached) $ac_c" 1>&6
666else
667 # This must be in double quotes, not single quotes, because CPP may get
668 # substituted into the Makefile and "${CC-cc}" will confuse make.
669 CPP="${CC-cc} -E"
670 # On the NeXT, cc -E runs the code through the compiler's parser,
671 # not just through cpp.
672 cat > conftest.$ac_ext <<EOF
db210d08 673#line 674 "configure"
5436fc65
C
674#include "confdefs.h"
675#include <assert.h>
676Syntax Error
677EOF
3dedc867 678ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
db210d08 679{ (eval echo configure:680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5436fc65
C
680ac_err=`grep -v '^ *+' conftest.out`
681if test -z "$ac_err"; then
682 :
683else
684 echo "$ac_err" >&5
685 rm -rf conftest*
686 CPP="${CC-cc} -E -traditional-cpp"
687 cat > conftest.$ac_ext <<EOF
db210d08 688#line 689 "configure"
5436fc65
C
689#include "confdefs.h"
690#include <assert.h>
691Syntax Error
692EOF
3dedc867 693ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
db210d08 694{ (eval echo configure:695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5436fc65
C
695ac_err=`grep -v '^ *+' conftest.out`
696if test -z "$ac_err"; then
697 :
698else
699 echo "$ac_err" >&5
700 rm -rf conftest*
701 CPP=/lib/cpp
702fi
703rm -f conftest*
704fi
705rm -f conftest*
706 ac_cv_prog_CPP="$CPP"
707fi
dedcc91d
SC
708 CPP="$ac_cv_prog_CPP"
709else
710 ac_cv_prog_CPP="$CPP"
5436fc65 711fi
5436fc65
C
712echo "$ac_t""$CPP" 1>&6
713
714echo $ac_n "checking for AIX""... $ac_c" 1>&6
715cat > conftest.$ac_ext <<EOF
db210d08 716#line 717 "configure"
5436fc65
C
717#include "confdefs.h"
718#ifdef _AIX
719 yes
720#endif
721
722EOF
723if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
724 egrep "yes" >/dev/null 2>&1; then
725 rm -rf conftest*
726 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
727#define _ALL_SOURCE 1
728EOF
729
730else
731 rm -rf conftest*
732 echo "$ac_t""no" 1>&6
733fi
734rm -f conftest*
735
736
737ac_safe=`echo "minix/config.h" | tr './\055' '___'`
738echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
739if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
740 echo $ac_n "(cached) $ac_c" 1>&6
741else
742 cat > conftest.$ac_ext <<EOF
db210d08 743#line 744 "configure"
5436fc65
C
744#include "confdefs.h"
745#include <minix/config.h>
746EOF
3dedc867 747ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
db210d08 748{ (eval echo configure:749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5436fc65
C
749ac_err=`grep -v '^ *+' conftest.out`
750if test -z "$ac_err"; then
751 rm -rf conftest*
752 eval "ac_cv_header_$ac_safe=yes"
753else
754 echo "$ac_err" >&5
755 rm -rf conftest*
756 eval "ac_cv_header_$ac_safe=no"
757fi
758rm -f conftest*
759fi
760if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
761 echo "$ac_t""yes" 1>&6
762 MINIX=yes
763else
764 echo "$ac_t""no" 1>&6
765MINIX=
766fi
767
768if test "$MINIX" = yes; then
769 cat >> confdefs.h <<\EOF
770#define _POSIX_SOURCE 1
771EOF
772
773 cat >> confdefs.h <<\EOF
774#define _POSIX_1_SOURCE 2
775EOF
776
777 cat >> confdefs.h <<\EOF
778#define _MINIX 1
779EOF
780
781fi
782
783echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
784if test -d /etc/conf/kconfig.d &&
785 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
786then
787 echo "$ac_t""yes" 1>&6
788 ISC=yes # If later tests want to check for ISC.
789 cat >> confdefs.h <<\EOF
790#define _POSIX_SOURCE 1
791EOF
792
793 if test "$GCC" = yes; then
794 CC="$CC -posix"
795 else
796 CC="$CC -Xp"
797 fi
798else
799 echo "$ac_t""no" 1>&6
800 ISC=
801fi
802
803
804ac_aux_dir=
805for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
806 if test -f $ac_dir/install-sh; then
807 ac_aux_dir=$ac_dir
808 ac_install_sh="$ac_aux_dir/install-sh -c"
809 break
810 elif test -f $ac_dir/install.sh; then
811 ac_aux_dir=$ac_dir
812 ac_install_sh="$ac_aux_dir/install.sh -c"
813 break
814 fi
815done
816if test -z "$ac_aux_dir"; then
817 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
818fi
819ac_config_guess=$ac_aux_dir/config.guess
820ac_config_sub=$ac_aux_dir/config.sub
821ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
822
823# Find a good install program. We prefer a C program (faster),
824# so one script is as good as another. But avoid the broken or
825# incompatible versions:
826# SysV /etc/install, /usr/sbin/install
827# SunOS /usr/etc/install
828# IRIX /sbin/install
829# AIX /bin/install
830# AFS /usr/afsws/bin/install, which mishandles nonexistent args
831# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
832# ./install, which can be erroneously created by make from ./install.sh.
833echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
834if test -z "$INSTALL"; then
835if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
836 echo $ac_n "(cached) $ac_c" 1>&6
837else
838 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
839 for ac_dir in $PATH; do
840 # Account for people who put trailing slashes in PATH elements.
841 case "$ac_dir/" in
842 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
843 *)
844 # OSF1 and SCO ODT 3.0 have their own names for install.
845 for ac_prog in ginstall installbsd scoinst install; do
846 if test -f $ac_dir/$ac_prog; then
847 if test $ac_prog = install &&
848 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
849 # AIX install. It has an incompatible calling convention.
850 # OSF/1 installbsd also uses dspmsg, but is usable.
851 :
852 else
853 ac_cv_path_install="$ac_dir/$ac_prog -c"
854 break 2
855 fi
856 fi
857 done
858 ;;
859 esac
860 done
861 IFS="$ac_save_ifs"
229b2c87 862
5436fc65 863fi
229b2c87
DE
864 if test "${ac_cv_path_install+set}" = set; then
865 INSTALL="$ac_cv_path_install"
866 else
867 # As a last resort, use the slow shell script. We don't cache a
868 # path for INSTALL within a source directory, because that will
869 # break other packages using the cache if that directory is
870 # removed, or if the path is relative.
871 INSTALL="$ac_install_sh"
872 fi
5436fc65
C
873fi
874echo "$ac_t""$INSTALL" 1>&6
875
876# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
877# It thinks the first close brace ends the variable substitution.
878test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
879
880test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
881
882# Extract the first word of "ranlib", so it can be a program name with args.
883set dummy ranlib; ac_word=$2
884echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
885if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
886 echo $ac_n "(cached) $ac_c" 1>&6
887else
888 if test -n "$RANLIB"; then
889 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
890else
891 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
da3d57e3 892 for ac_dir in $PATH; do
5436fc65
C
893 test -z "$ac_dir" && ac_dir=.
894 if test -f $ac_dir/$ac_word; then
895 ac_cv_prog_RANLIB="ranlib"
896 break
897 fi
898 done
899 IFS="$ac_save_ifs"
900 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
901fi
902fi
903RANLIB="$ac_cv_prog_RANLIB"
904if test -n "$RANLIB"; then
905 echo "$ac_t""$RANLIB" 1>&6
906else
907 echo "$ac_t""no" 1>&6
908fi
909
204c8825
FF
910for ac_prog in 'bison -y' byacc
911do
912# Extract the first word of "$ac_prog", so it can be a program name with args.
913set dummy $ac_prog; ac_word=$2
914echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
915if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
916 echo $ac_n "(cached) $ac_c" 1>&6
917else
918 if test -n "$YACC"; then
919 ac_cv_prog_YACC="$YACC" # Let the user override the test.
920else
921 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
922 for ac_dir in $PATH; do
923 test -z "$ac_dir" && ac_dir=.
924 if test -f $ac_dir/$ac_word; then
925 ac_cv_prog_YACC="$ac_prog"
926 break
927 fi
928 done
929 IFS="$ac_save_ifs"
930fi
931fi
932YACC="$ac_cv_prog_YACC"
933if test -n "$YACC"; then
934 echo "$ac_t""$YACC" 1>&6
935else
936 echo "$ac_t""no" 1>&6
937fi
938
939test -n "$YACC" && break
940done
941test -n "$YACC" || YACC="yacc"
942
5436fc65
C
943
944ac_aux_dir=
945for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
946 if test -f $ac_dir/install-sh; then
947 ac_aux_dir=$ac_dir
948 ac_install_sh="$ac_aux_dir/install-sh -c"
949 break
950 elif test -f $ac_dir/install.sh; then
951 ac_aux_dir=$ac_dir
952 ac_install_sh="$ac_aux_dir/install.sh -c"
953 break
954 fi
955done
956if test -z "$ac_aux_dir"; then
957 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
958fi
959ac_config_guess=$ac_aux_dir/config.guess
960ac_config_sub=$ac_aux_dir/config.sub
961ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
962
963
964# Do some error checking and defaulting for the host and target type.
965# The inputs are:
966# configure --host=HOST --target=TARGET --build=BUILD NONOPT
967#
968# The rules are:
969# 1. You are not allowed to specify --host, --target, and nonopt at the
229b2c87 970# same time.
5436fc65
C
971# 2. Host defaults to nonopt.
972# 3. If nonopt is not specified, then host defaults to the current host,
973# as determined by config.guess.
974# 4. Target and build default to nonopt.
975# 5. If nonopt is not specified, then target and build default to host.
976
977# The aliases save the names the user supplied, while $host etc.
978# will get canonicalized.
979case $host---$target---$nonopt in
980NONE---*---* | *---NONE---* | *---*---NONE) ;;
981*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
982esac
983
984
985# Make sure we can run config.sub.
986if $ac_config_sub sun4 >/dev/null 2>&1; then :
987else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
988fi
989
990echo $ac_n "checking host system type""... $ac_c" 1>&6
991
992host_alias=$host
993case "$host_alias" in
994NONE)
995 case $nonopt in
996 NONE)
997 if host_alias=`$ac_config_guess`; then :
998 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
999 fi ;;
1000 *) host_alias=$nonopt ;;
1001 esac ;;
1002esac
1003
1004host=`$ac_config_sub $host_alias`
1005host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
1006host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
1007host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
1008echo "$ac_t""$host" 1>&6
1009
1010echo $ac_n "checking target system type""... $ac_c" 1>&6
1011
1012target_alias=$target
1013case "$target_alias" in
1014NONE)
1015 case $nonopt in
1016 NONE) target_alias=$host_alias ;;
1017 *) target_alias=$nonopt ;;
1018 esac ;;
1019esac
1020
1021target=`$ac_config_sub $target_alias`
1022target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
1023target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
1024target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
1025echo "$ac_t""$target" 1>&6
1026
1027echo $ac_n "checking build system type""... $ac_c" 1>&6
1028
1029build_alias=$build
1030case "$build_alias" in
1031NONE)
1032 case $nonopt in
1033 NONE) build_alias=$host_alias ;;
1034 *) build_alias=$nonopt ;;
1035 esac ;;
1036esac
1037
1038build=`$ac_config_sub $build_alias`
1039build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
1040build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
1041build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
1042echo "$ac_t""$build" 1>&6
1043
1044test "$host_alias" != "$target_alias" &&
1045 test "$program_prefix$program_suffix$program_transform_name" = \
1046 NONENONEs,x,x, &&
1047 program_prefix=${target_alias}-
1048
1049if test "$program_transform_name" = s,x,x,; then
1050 program_transform_name=
1051else
229b2c87
DE
1052 # Double any \ or $. echo might interpret backslashes.
1053 cat <<\EOF_SED > conftestsed
1054s,\\,\\\\,g; s,\$,$$,g
1055EOF_SED
5436fc65
C
1056 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1057 rm -f conftestsed
1058fi
1059test "$program_prefix" != NONE &&
1060 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1061# Use a double $ so make ignores it.
1062test "$program_suffix" != NONE &&
1063 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1064
1065# sed with no file args requires a program.
1066test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1067
1068
2b576293
C
1069# If we cannot run a trivial program, we must be cross compiling.
1070echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1071if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1072 echo $ac_n "(cached) $ac_c" 1>&6
1073else
1074 if test "$cross_compiling" = yes; then
1075 ac_cv_c_cross=yes
1076else
1077cat > conftest.$ac_ext <<EOF
db210d08 1078#line 1079 "configure"
2b576293
C
1079#include "confdefs.h"
1080main(){return(0);}
1081EOF
db210d08 1082{ (eval echo configure:1083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2b576293
C
1083if test -s conftest && (./conftest; exit) 2>/dev/null; then
1084 ac_cv_c_cross=no
1085else
1086 ac_cv_c_cross=yes
1087fi
1088fi
1089rm -fr conftest*
1090fi
229b2c87 1091
3d78f532 1092echo "$ac_t""$ac_cv_c_cross" 1>&6
229b2c87 1093cross_compiling=$ac_cv_c_cross
2b576293
C
1094
1095echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1096if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1097 echo $ac_n "(cached) $ac_c" 1>&6
1098else
1099 cat > conftest.$ac_ext <<EOF
db210d08 1100#line 1101 "configure"
2b576293
C
1101#include "confdefs.h"
1102#include <stdlib.h>
1103#include <stdarg.h>
1104#include <string.h>
1105#include <float.h>
1106EOF
3dedc867 1107ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
db210d08 1108{ (eval echo configure:1109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2b576293
C
1109ac_err=`grep -v '^ *+' conftest.out`
1110if test -z "$ac_err"; then
1111 rm -rf conftest*
1112 ac_cv_header_stdc=yes
1113else
1114 echo "$ac_err" >&5
1115 rm -rf conftest*
1116 ac_cv_header_stdc=no
1117fi
1118rm -f conftest*
1119
1120if test $ac_cv_header_stdc = yes; then
1121 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1122cat > conftest.$ac_ext <<EOF
db210d08 1123#line 1124 "configure"
2b576293
C
1124#include "confdefs.h"
1125#include <string.h>
1126EOF
1127if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1128 egrep "memchr" >/dev/null 2>&1; then
1129 :
1130else
1131 rm -rf conftest*
1132 ac_cv_header_stdc=no
1133fi
1134rm -f conftest*
1135
1136fi
1137
1138if test $ac_cv_header_stdc = yes; then
1139 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1140cat > conftest.$ac_ext <<EOF
db210d08 1141#line 1142 "configure"
2b576293
C
1142#include "confdefs.h"
1143#include <stdlib.h>
1144EOF
1145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1146 egrep "free" >/dev/null 2>&1; then
1147 :
1148else
1149 rm -rf conftest*
1150 ac_cv_header_stdc=no
1151fi
1152rm -f conftest*
1153
1154fi
1155
1156if test $ac_cv_header_stdc = yes; then
1157 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1158if test "$cross_compiling" = yes; then
229b2c87 1159 :
2b576293
C
1160else
1161cat > conftest.$ac_ext <<EOF
db210d08 1162#line 1163 "configure"
2b576293
C
1163#include "confdefs.h"
1164#include <ctype.h>
1165#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1166#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1167#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1168int main () { int i; for (i = 0; i < 256; i++)
1169if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1170exit (0); }
1171
1172EOF
db210d08 1173{ (eval echo configure:1174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2b576293
C
1174if test -s conftest && (./conftest; exit) 2>/dev/null; then
1175 :
1176else
1177 ac_cv_header_stdc=no
1178fi
1179fi
1180rm -fr conftest*
1181fi
1182fi
229b2c87 1183
2b576293
C
1184echo "$ac_t""$ac_cv_header_stdc" 1>&6
1185if test $ac_cv_header_stdc = yes; then
1186 cat >> confdefs.h <<\EOF
1187#define STDC_HEADERS 1
1188EOF
1189
1190fi
1191
31520669 1192for ac_hdr in limits.h memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h sys/procfs.h link.h
1a494973
C
1193do
1194ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1195echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1196if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1197 echo $ac_n "(cached) $ac_c" 1>&6
1198else
1199 cat > conftest.$ac_ext <<EOF
db210d08 1200#line 1201 "configure"
1a494973
C
1201#include "confdefs.h"
1202#include <$ac_hdr>
1203EOF
3dedc867 1204ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
db210d08 1205{ (eval echo configure:1206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1a494973
C
1206ac_err=`grep -v '^ *+' conftest.out`
1207if test -z "$ac_err"; then
1208 rm -rf conftest*
1209 eval "ac_cv_header_$ac_safe=yes"
1210else
1211 echo "$ac_err" >&5
1212 rm -rf conftest*
1213 eval "ac_cv_header_$ac_safe=no"
1214fi
1215rm -f conftest*
1216fi
1217if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1218 echo "$ac_t""yes" 1>&6
229b2c87 1219 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'`
1a494973
C
1220 cat >> confdefs.h <<EOF
1221#define $ac_tr_hdr 1
1222EOF
1223
1224else
1225 echo "$ac_t""no" 1>&6
1226fi
1227done
1228
2b576293
C
1229echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1230if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1231 echo $ac_n "(cached) $ac_c" 1>&6
1232else
1233 cat > conftest.$ac_ext <<EOF
db210d08 1234#line 1235 "configure"
2b576293
C
1235#include "confdefs.h"
1236#include <sys/types.h>
1237#include <sys/stat.h>
1238
1239#if defined(S_ISBLK) && defined(S_IFDIR)
1240# if S_ISBLK (S_IFDIR)
1241You lose.
1242# endif
1243#endif
1244
1245#if defined(S_ISBLK) && defined(S_IFCHR)
1246# if S_ISBLK (S_IFCHR)
1247You lose.
1248# endif
1249#endif
1250
1251#if defined(S_ISLNK) && defined(S_IFREG)
1252# if S_ISLNK (S_IFREG)
1253You lose.
1254# endif
1255#endif
1256
1257#if defined(S_ISSOCK) && defined(S_IFREG)
1258# if S_ISSOCK (S_IFREG)
1259You lose.
1260# endif
1261#endif
1262
1263EOF
1264if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1265 egrep "You lose" >/dev/null 2>&1; then
1266 rm -rf conftest*
1267 ac_cv_header_stat_broken=yes
1268else
1269 rm -rf conftest*
1270 ac_cv_header_stat_broken=no
1271fi
1272rm -f conftest*
1273
1274fi
229b2c87 1275
2b576293
C
1276echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1277if test $ac_cv_header_stat_broken = yes; then
1278 cat >> confdefs.h <<\EOF
1279#define STAT_MACROS_BROKEN 1
1280EOF
1281
1282fi
1283
1284
72ae15f6
FF
1285for ac_func in setpgid
1286do
1287echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1288if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1289 echo $ac_n "(cached) $ac_c" 1>&6
1290else
1291 cat > conftest.$ac_ext <<EOF
1292#line 1293 "configure"
1293#include "confdefs.h"
1294/* System header to define __stub macros and hopefully few prototypes,
1295 which can conflict with char $ac_func(); below. */
1296#include <assert.h>
1297/* Override any gcc2 internal prototype to avoid an error. */
1298char $ac_func();
1299
1300int main() { return 0; }
1301int t() {
1302
1303/* The GNU C library defines this for functions which it implements
1304 to always fail with ENOSYS. Some functions are actually named
1305 something starting with __ and the normal name is an alias. */
1306#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1307choke me
1308#else
1309$ac_func();
1310#endif
1311
1312; return 0; }
1313EOF
1314if { (eval echo configure:1315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1315 rm -rf conftest*
1316 eval "ac_cv_func_$ac_func=yes"
1317else
1318 rm -rf conftest*
1319 eval "ac_cv_func_$ac_func=no"
1320fi
1321rm -f conftest*
1322
1323fi
1324if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1325 echo "$ac_t""yes" 1>&6
1326 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1327 cat >> confdefs.h <<EOF
1328#define $ac_tr_func 1
1329EOF
1330
1331else
1332 echo "$ac_t""no" 1>&6
1333fi
1334done
1335
1336
4708ac65 1337echo $ac_n "checking for gregset_t type""... $ac_c" 1>&6
07b77f5c 1338if eval "test \"`echo '$''{'gdb_cv_have_gregset_t'+set}'`\" = set"; then
4708ac65
FF
1339 echo $ac_n "(cached) $ac_c" 1>&6
1340else
1341 cat > conftest.$ac_ext <<EOF
72ae15f6 1342#line 1343 "configure"
4708ac65
FF
1343#include "confdefs.h"
1344#include <sys/procfs.h>
1345int main() { return 0; }
1346int t() {
1347gregset_t *gregsetp = 0
1348; return 0; }
1349EOF
72ae15f6 1350if { (eval echo configure:1351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4708ac65 1351 rm -rf conftest*
07b77f5c 1352 gdb_cv_have_gregset_t=yes
4708ac65
FF
1353else
1354 rm -rf conftest*
07b77f5c 1355 gdb_cv_have_gregset_t=no
4708ac65
FF
1356fi
1357rm -f conftest*
1358
1359fi
1360
07b77f5c
FF
1361echo "$ac_t""$gdb_cv_have_gregset_t" 1>&6
1362if test $gdb_cv_have_gregset_t = yes; then
4708ac65
FF
1363 cat >> confdefs.h <<\EOF
1364#define HAVE_GREGSET_T 1
1365EOF
1366
1367fi
1368
1369echo $ac_n "checking for fpregset_t type""... $ac_c" 1>&6
07b77f5c 1370if eval "test \"`echo '$''{'gdb_cv_have_fpregset_t'+set}'`\" = set"; then
4708ac65
FF
1371 echo $ac_n "(cached) $ac_c" 1>&6
1372else
1373 cat > conftest.$ac_ext <<EOF
72ae15f6 1374#line 1375 "configure"
4708ac65
FF
1375#include "confdefs.h"
1376#include <sys/procfs.h>
1377int main() { return 0; }
1378int t() {
1379fpregset_t *fpregsetp = 0
1380; return 0; }
1381EOF
72ae15f6 1382if { (eval echo configure:1383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4708ac65 1383 rm -rf conftest*
07b77f5c 1384 gdb_cv_have_fpregset_t=yes
4708ac65
FF
1385else
1386 rm -rf conftest*
07b77f5c 1387 gdb_cv_have_fpregset_t=no
4708ac65
FF
1388fi
1389rm -f conftest*
1390
1391fi
1392
07b77f5c
FF
1393echo "$ac_t""$gdb_cv_have_fpregset_t" 1>&6
1394if test $gdb_cv_have_fpregset_t = yes; then
4708ac65
FF
1395 cat >> confdefs.h <<\EOF
1396#define HAVE_FPREGSET_T 1
1397EOF
1398
1399fi
1400
aa220473 1401
07b77f5c 1402echo $ac_n "checking for long double support in compiler""... $ac_c" 1>&6
aa220473
SG
1403if eval "test \"`echo '$''{'ac_cv_c_long_double'+set}'`\" = set"; then
1404 echo $ac_n "(cached) $ac_c" 1>&6
1405else
1406 cat > conftest.$ac_ext <<EOF
72ae15f6 1407#line 1408 "configure"
aa220473
SG
1408#include "confdefs.h"
1409
1410int main() { return 0; }
1411int t() {
1412long double foo;
1413; return 0; }
1414EOF
72ae15f6 1415if { (eval echo configure:1416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
aa220473
SG
1416 rm -rf conftest*
1417 ac_cv_c_long_double=yes
1418else
1419 rm -rf conftest*
1420 ac_cv_c_long_double=no
1421fi
1422rm -f conftest*
1423
1424fi
1425
1426echo "$ac_t""$ac_cv_c_long_double" 1>&6
1427if test $ac_cv_c_long_double = yes; then
1428 cat >> confdefs.h <<\EOF
1429#define HAVE_LONG_DOUBLE 1
1430EOF
1431
1432fi
1433
07b77f5c
FF
1434
1435echo $ac_n "checking for long double support in printf""... $ac_c" 1>&6
1436if eval "test \"`echo '$''{'gdb_cv_printf_has_long_double'+set}'`\" = set"; then
1437 echo $ac_n "(cached) $ac_c" 1>&6
1438else
1439 if test "$cross_compiling" = yes; then
1440 gdb_cv_printf_has_long_double=no
1441else
1442cat > conftest.$ac_ext <<EOF
72ae15f6 1443#line 1444 "configure"
07b77f5c
FF
1444#include "confdefs.h"
1445
1446int main () {
1447 char buf[16];
1448 long double f = 3.141592653;
1449 sprintf (buf, "%Lg", f);
1450 return (strncmp ("3.14159", buf, 7));
1451}
1452EOF
72ae15f6 1453{ (eval echo configure:1454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
07b77f5c
FF
1454if test -s conftest && (./conftest; exit) 2>/dev/null; then
1455 gdb_cv_printf_has_long_double=yes
1456else
1457 gdb_cv_printf_has_long_double=no
1458fi
1459fi
1460rm -fr conftest*
1461fi
1462
1463if test $gdb_cv_printf_has_long_double = yes; then
1464 cat >> confdefs.h <<\EOF
1465#define PRINTF_HAS_LONG_DOUBLE 1
1466EOF
1467
1468fi
1469echo "$ac_t""$gdb_cv_printf_has_long_double" 1>&6
1470
229b2c87
DE
1471for ac_func in valloc getpagesize
1472do
1473echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
1474if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
1475 echo $ac_n "(cached) $ac_c" 1>&6
1476else
1477 cat > conftest.$ac_ext <<EOF
72ae15f6 1478#line 1479 "configure"
229b2c87
DE
1479#include "confdefs.h"
1480/* System header to define __stub macros and hopefully few prototypes,
1481 which can conflict with char $ac_func(); below. */
1482#include <assert.h>
1483/* Override any gcc2 internal prototype to avoid an error. */
1484char $ac_func();
1485
1486int main() { return 0; }
1487int t() {
1488
1489/* The GNU C library defines this for functions which it implements
1490 to always fail with ENOSYS. Some functions are actually named
1491 something starting with __ and the normal name is an alias. */
1492#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
1493choke me
1494#else
1495$ac_func();
1496#endif
1497
1498; return 0; }
1499EOF
72ae15f6 1500if { (eval echo configure:1501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
229b2c87
DE
1501 rm -rf conftest*
1502 eval "ac_cv_func_$ac_func=yes"
1503else
1504 rm -rf conftest*
1505 eval "ac_cv_func_$ac_func=no"
1506fi
1507rm -f conftest*
1508
1509fi
1510if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
1511 echo "$ac_t""yes" 1>&6
1512 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1513 cat >> confdefs.h <<EOF
1514#define $ac_tr_func 1
1515EOF
1516
1517else
1518 echo "$ac_t""no" 1>&6
1519fi
1520done
1521
2b576293
C
1522echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1523if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
1524 echo $ac_n "(cached) $ac_c" 1>&6
1525else
1526 if test "$cross_compiling" = yes; then
1527 ac_cv_func_mmap=no
1528else
1529cat > conftest.$ac_ext <<EOF
72ae15f6 1530#line 1531 "configure"
2b576293
C
1531#include "confdefs.h"
1532
1533/* Thanks to Mike Haertel and Jim Avera for this test. */
1534#include <sys/types.h>
1535#include <fcntl.h>
1536#include <sys/mman.h>
1537
2b576293
C
1538#ifndef HAVE_GETPAGESIZE
1539# include <sys/param.h>
1540# ifdef EXEC_PAGESIZE
1541# define getpagesize() EXEC_PAGESIZE
1542# else
1543# ifdef NBPG
1544# define getpagesize() NBPG * CLSIZE
1545# ifndef CLSIZE
1546# define CLSIZE 1
1547# endif
1548# else
1549# ifdef NBPC
1550# define getpagesize() NBPC
1551# else
1552# define getpagesize() PAGESIZE /* SVR4 */
1553# endif
1554# endif
1555# endif
1556#endif
1557
229b2c87 1558#ifndef HAVE_VALLOC
2b576293
C
1559# define valloc malloc
1560#endif
1561
1562#ifdef __cplusplus
1563extern "C" { void *valloc(unsigned), *malloc(unsigned); }
1564#else
1565char *valloc(), *malloc();
1566#endif
1567
1568int
1569main()
1570{
1571 char *buf1, *buf2, *buf3;
1572 int i = getpagesize(), j;
229b2c87 1573 int i2 = i * 2;
2b576293
C
1574 int fd;
1575
1576 buf1 = (char *)valloc(i2);
1577 buf2 = (char *)valloc(i);
1578 buf3 = (char *)malloc(i2);
1579 for (j = 0; j < i2; ++j)
1580 *(buf1 + j) = rand();
1581 fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
1582 write(fd, buf1, i2);
1583 mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
1584 for (j = 0; j < i; ++j)
1585 if (*(buf1 + j) != *(buf2 + j))
1586 exit(1);
1587 lseek(fd, (long)i, 0);
1588 read(fd, buf2, i); /* read into mapped memory -- file should not change */
1589 /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */
1590 lseek(fd, (long)0, 0);
1591 read(fd, buf3, i2);
1592 for (j = 0; j < i2; ++j)
1593 if (*(buf1 + j) != *(buf3 + j))
1594 exit(1);
1595 exit(0);
1596}
1597
1598EOF
72ae15f6 1599{ (eval echo configure:1600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
2b576293
C
1600if test -s conftest && (./conftest; exit) 2>/dev/null; then
1601 ac_cv_func_mmap=yes
1602else
1603 ac_cv_func_mmap=no
1604fi
1605fi
1606rm -fr conftest*
1607fi
229b2c87 1608
2b576293
C
1609echo "$ac_t""$ac_cv_func_mmap" 1>&6
1610if test $ac_cv_func_mmap = yes; then
1611 cat >> confdefs.h <<\EOF
1612#define HAVE_MMAP 1
1613EOF
1614
1615fi
1616
5436fc65
C
1617
1618ENABLE_CFLAGS=
1619ENABLE_CLIBS=
1620ENABLE_OBS=
1621
1622# Check whether --enable-netrom or --disable-netrom was given.
229b2c87
DE
1623if test "${enable_netrom+set}" = set; then
1624 enableval="$enable_netrom"
5436fc65
C
1625 case "${enableval}" in
1626yes) enable_netrom=yes ;;
1627no) enable_netrom=no ;;
1628*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
1629esac
1630fi
1631
1632
1633if test "${enable_netrom}" = "yes"; then
1634 ENABLE_OBS="${ENABLE_OBS} remote-nrom.o"
1635fi
1636
188c635f
SG
1637# start-sanitize-gm
1638ENABLE_GM=
1639
1640# Check whether --enable-gm or --disable-gm was given.
229b2c87
DE
1641if test "${enable_gm+set}" = set; then
1642 enableval="$enable_gm"
188c635f 1643 case "${enableval}" in
1a57cd09 1644yes) ENABLE_OBS="${ENABLE_OBS} gmagic.o"
188c635f
SG
1645 ENABLE_CFLAGS=-DGENERAL_MAGIC
1646 ;;
1647no) ;;
1648*) { echo "configure: error: bad value ${enableval} given for gm option" 1>&2; exit 1; } ;;
1649esac
1650fi
1651
1652
1653# end-sanitize-gm
1654
3c0bf315 1655# Check whether --enable-sim-powerpc or --disable-sim-powerpc was given.
229b2c87
DE
1656if test "${enable_sim_powerpc+set}" = set; then
1657 enableval="$enable_sim_powerpc"
3c0bf315
MM
1658 case "${enableval}" in
1659yes) powerpc_sim=yes ;;
1660no) powerpc_sim=no ;;
1661*) { echo "configure: error: bad value ${enableval} given for sim-powerpc option" 1>&2; exit 1; } ;;
1662esac
1663else
1664 if test x"$GCC" != x""; then powerpc_sim=yes; else powerpc_sim=no; fi
1665fi
1666
1667
5436fc65
C
1668# start-sanitize-gdbtk
1669ENABLE_GDBTK=
1670
1671# Check whether --enable-gdbtk or --disable-gdbtk was given.
229b2c87
DE
1672if test "${enable_gdbtk+set}" = set; then
1673 enableval="$enable_gdbtk"
5436fc65 1674 case "${enableval}" in
0fe1522a
SG
1675 yes)
1676 case "$host" in
1677 *go32*)
1678 echo "configure: warning: GDB does not support GDBtk on host ${host}. GDBtk will be disabled." 1>&2
1679 enable_gdbtk=no ;;
1680 *)
1681 enable_gdbtk=yes ;;
1682 esac ;;
1683 no)
1684 enable_gdbtk=no ;;
1685 *)
1686 { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
5436fc65 1687esac
0fe1522a
SG
1688else
1689
1690# Default is on for everything but go32
1691case "$host" in
1692 *go32*)
1693 ;;
1694 *)
1695 enable_gdbtk=yes ;;
1696 esac
1697
5436fc65
C
1698fi
1699
1700
1701if test "${enable_gdbtk}" = "yes"; then
0fe1522a 1702
a2b63bbd 1703 # If we find X, set shell vars x_includes and x_libraries to the
5436fc65
C
1704# paths, otherwise set no_x=yes.
1705# Uses ac_ vars as temps to allow command line to override cache and checks.
1706# --without-x overrides everything else, but does not touch the cache.
1707echo $ac_n "checking for X""... $ac_c" 1>&6
1708
1709# Check whether --with-x or --without-x was given.
229b2c87
DE
1710if test "${with_x+set}" = set; then
1711 withval="$with_x"
5436fc65
C
1712 :
1713fi
1714
3dedc867 1715# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5436fc65 1716if test "x$with_x" = xno; then
3dedc867
FF
1717 # The user explicitly disabled X.
1718 have_x=disabled
5436fc65
C
1719else
1720 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
3dedc867
FF
1721 # Both variables are already set.
1722 have_x=yes
5436fc65 1723 else
3dedc867 1724if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
5436fc65
C
1725 echo $ac_n "(cached) $ac_c" 1>&6
1726else
1727 # One or both of the vars are not set, and there is no cached value.
3dedc867 1728ac_x_includes=NO ac_x_libraries=NO
5436fc65
C
1729rm -fr conftestdir
1730if mkdir conftestdir; then
1731 cd conftestdir
1732 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1733 cat > Imakefile <<'EOF'
1734acfindx:
1735 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1736EOF
1737 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5436fc65 1738 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
229b2c87 1739 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5436fc65 1740 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
dedcc91d
SC
1741 for ac_extension in a so sl; do
1742 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1743 test -f $ac_im_libdir/libX11.$ac_extension; then
1744 ac_im_usrlibdir=$ac_im_libdir; break
1745 fi
1746 done
5436fc65
C
1747 # Screen out bogus values from the imake configuration.
1748 case "$ac_im_incroot" in
1749 /usr/include) ;;
1750 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1751 esac
1752 case "$ac_im_usrlibdir" in
1753 /usr/lib | /lib) ;;
1754 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1755 esac
1756 fi
1757 cd ..
1758 rm -fr conftestdir
1759fi
1760
3dedc867
FF
1761if test "$ac_x_includes" = NO; then
1762 # Guess where to find include files, by looking for this one X11 .h file.
1763 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1764
1765 # First, try using that file with no special directory specified.
5436fc65 1766cat > conftest.$ac_ext <<EOF
72ae15f6 1767#line 1768 "configure"
5436fc65
C
1768#include "confdefs.h"
1769#include <$x_direct_test_include>
1770EOF
3dedc867 1771ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72ae15f6 1772{ (eval echo configure:1773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5436fc65
C
1773ac_err=`grep -v '^ *+' conftest.out`
1774if test -z "$ac_err"; then
1775 rm -rf conftest*
3dedc867
FF
1776 # We can compile using X headers with no special include directory.
1777ac_x_includes=
5436fc65
C
1778else
1779 echo "$ac_err" >&5
1780 rm -rf conftest*
3dedc867
FF
1781 # Look for the header file in a standard set of common directories.
1782 for ac_dir in \
5436fc65
C
1783 /usr/X11R6/include \
1784 /usr/X11R5/include \
1785 /usr/X11R4/include \
1786 \
1787 /usr/include/X11R6 \
1788 /usr/include/X11R5 \
1789 /usr/include/X11R4 \
1790 \
1791 /usr/local/X11R6/include \
1792 /usr/local/X11R5/include \
1793 /usr/local/X11R4/include \
1794 \
1795 /usr/local/include/X11R6 \
1796 /usr/local/include/X11R5 \
1797 /usr/local/include/X11R4 \
1798 \
1799 /usr/X11/include \
1800 /usr/include/X11 \
1801 /usr/local/X11/include \
1802 /usr/local/include/X11 \
1803 \
1804 /usr/X386/include \
1805 /usr/x386/include \
1806 /usr/XFree86/include/X11 \
1807 \
1808 /usr/include \
1809 /usr/local/include \
1810 /usr/unsupported/include \
1811 /usr/athena/include \
1812 /usr/local/x11r5/include \
1813 /usr/lpp/Xamples/include \
1814 \
1815 /usr/openwin/include \
1816 /usr/openwin/share/include \
1817 ; \
1818 do
1819 if test -r "$ac_dir/$x_direct_test_include"; then
3dedc867 1820 ac_x_includes=$ac_dir
5436fc65
C
1821 break
1822 fi
1823 done
1824fi
1825rm -f conftest*
3dedc867 1826fi # $ac_x_includes = NO
5436fc65 1827
3dedc867
FF
1828if test "$ac_x_libraries" = NO; then
1829 # Check for the libraries.
1830
1831 test -z "$x_direct_test_library" && x_direct_test_library=Xt
1832 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1833
1834 # See if we find them without any special options.
1835 # Don't add to $LIBS permanently.
1836 ac_save_LIBS="$LIBS"
1837 LIBS="-l$x_direct_test_library $LIBS"
5436fc65 1838cat > conftest.$ac_ext <<EOF
72ae15f6 1839#line 1840 "configure"
5436fc65
C
1840#include "confdefs.h"
1841
1842int main() { return 0; }
1843int t() {
1844${x_direct_test_function}()
1845; return 0; }
1846EOF
72ae15f6 1847if { (eval echo configure:1848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
5436fc65 1848 rm -rf conftest*
3dedc867
FF
1849 LIBS="$ac_save_LIBS"
1850# We can link X programs with no special library path.
1851ac_x_libraries=
5436fc65
C
1852else
1853 rm -rf conftest*
1854 LIBS="$ac_save_LIBS"
1855# First see if replacing the include by lib works.
1856for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1857 /usr/X11R6/lib \
1858 /usr/X11R5/lib \
1859 /usr/X11R4/lib \
1860 \
1861 /usr/lib/X11R6 \
1862 /usr/lib/X11R5 \
1863 /usr/lib/X11R4 \
1864 \
1865 /usr/local/X11R6/lib \
1866 /usr/local/X11R5/lib \
1867 /usr/local/X11R4/lib \
1868 \
1869 /usr/local/lib/X11R6 \
1870 /usr/local/lib/X11R5 \
1871 /usr/local/lib/X11R4 \
1872 \
1873 /usr/X11/lib \
1874 /usr/lib/X11 \
1875 /usr/local/X11/lib \
1876 /usr/local/lib/X11 \
1877 \
1878 /usr/X386/lib \
1879 /usr/x386/lib \
1880 /usr/XFree86/lib/X11 \
1881 \
1882 /usr/lib \
1883 /usr/local/lib \
1884 /usr/unsupported/lib \
1885 /usr/athena/lib \
1886 /usr/local/x11r5/lib \
1887 /usr/lpp/Xamples/lib \
1888 \
1889 /usr/openwin/lib \
1890 /usr/openwin/share/lib \
1891 ; \
1892do
1893 for ac_extension in a so sl; do
1894 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
3dedc867 1895 ac_x_libraries=$ac_dir
5436fc65
C
1896 break 2
1897 fi
1898 done
1899done
1900fi
1901rm -f conftest*
1902
3dedc867
FF
1903fi # $ac_x_libraries = NO
1904
1905if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
1906 # Didn't find X anywhere. Cache the known absence of X.
1907 ac_cv_have_x="have_x=no"
5436fc65 1908else
3dedc867
FF
1909 # Record where we found X for the cache.
1910 ac_cv_have_x="have_x=yes \
1911 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5436fc65
C
1912fi
1913fi
1914 fi
3dedc867 1915 eval "$ac_cv_have_x"
5436fc65
C
1916fi # $with_x != no
1917
3dedc867
FF
1918if test "$have_x" != yes; then
1919 echo "$ac_t""$have_x" 1>&6
1920 no_x=yes
5436fc65 1921else
3dedc867 1922 # If each of the values was on the command line, it overrides each guess.
5436fc65
C
1923 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1924 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
3dedc867
FF
1925 # Update the cache value to reflect the command line values.
1926 ac_cv_have_x="have_x=yes \
1927 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5436fc65
C
1928 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1929fi
1930
3dedc867 1931 if test "$no_x" = yes; then
5436fc65
C
1932 # Not all programs may use this symbol, but it does not hurt to define it.
1933 X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING"
1934else
1935 if test -n "$x_includes"; then
1936 X_CFLAGS="$X_CFLAGS -I$x_includes"
1937 fi
1938
1939 # It would be nice to have a more robust check for the -R ld option than
1940 # just checking for Solaris.
1941 # It would also be nice to do this for all -L options, not just this one.
1942 if test -n "$x_libraries"; then
1943 X_LIBS="$X_LIBS -L$x_libraries"
1944 if test "`(uname) 2>/dev/null`" = SunOS &&
1945 uname -r | grep '^5' >/dev/null; then
229b2c87 1946 X_LIBS="$X_LIBS -R $x_libraries"
5436fc65
C
1947 fi
1948 fi
1949
1950 # Check for libraries that X11R6 Xt/Xaw programs need.
1951
1952 ac_save_LDFLAGS="$LDFLAGS"
1953 LDFLAGS="$LDFLAGS -L$x_libraries"
1954 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1955 # check for ICE first), but we must link in the order -lSM -lICE or
1956 # we get undefined symbols. So assume we have SM if we have ICE.
1957 # These have to be linked with before -lX11, unlike the other
1958 # libraries we check for below, so use a different variable.
1959 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
1960 echo $ac_n "checking for -lICE""... $ac_c" 1>&6
3dedc867 1961ac_lib_var=`echo ICE_IceConnectionNumber | tr '.-/+' '___p'`
229b2c87 1962if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1963 echo $ac_n "(cached) $ac_c" 1>&6
1964else
1965 ac_save_LIBS="$LIBS"
1966LIBS="-lICE $LIBS"
1967cat > conftest.$ac_ext <<EOF
72ae15f6 1968#line 1969 "configure"
5436fc65
C
1969#include "confdefs.h"
1970
1971int main() { return 0; }
1972int t() {
1973IceConnectionNumber()
1974; return 0; }
1975EOF
72ae15f6 1976if { (eval echo configure:1977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
5436fc65 1977 rm -rf conftest*
229b2c87 1978 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1979else
1980 rm -rf conftest*
229b2c87 1981 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1982fi
1983rm -f conftest*
1984LIBS="$ac_save_LIBS"
1985
1986fi
229b2c87 1987if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1988 echo "$ac_t""yes" 1>&6
1989 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
1990else
1991 echo "$ac_t""no" 1>&6
1992fi
1993
1994 LDFLAGS="$ac_save_LDFLAGS"
1995
1996 # Check for system-dependent libraries X programs must link with.
1997
1998 if test "$ISC" = yes; then
1999 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
2000 else
2001 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
2002 # libraries were built with DECnet support. And karl@cs.umb.edu says
2003 # the Alpha needs dnet_stub (dnet does not exist).
2004 echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
3dedc867 2005ac_lib_var=`echo dnet_dnet_ntoa | tr '.-/+' '___p'`
229b2c87 2006if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
2007 echo $ac_n "(cached) $ac_c" 1>&6
2008else
2009 ac_save_LIBS="$LIBS"
2010LIBS="-ldnet $LIBS"
2011cat > conftest.$ac_ext <<EOF
72ae15f6 2012#line 2013 "configure"
5436fc65
C
2013#include "confdefs.h"
2014
2015int main() { return 0; }
2016int t() {
2017dnet_ntoa()
2018; return 0; }
2019EOF
72ae15f6 2020if { (eval echo configure:2021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
5436fc65 2021 rm -rf conftest*
229b2c87 2022 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
2023else
2024 rm -rf conftest*
229b2c87 2025 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
2026fi
2027rm -f conftest*
2028LIBS="$ac_save_LIBS"
2029
2030fi
229b2c87 2031if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
2032 echo "$ac_t""yes" 1>&6
2033 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
2034else
2035 echo "$ac_t""no" 1>&6
2036fi
2037
84f737e9 2038 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5436fc65 2039 echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
3dedc867 2040ac_lib_var=`echo dnet_stub_dnet_ntoa | tr '.-/+' '___p'`
229b2c87 2041if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
2042 echo $ac_n "(cached) $ac_c" 1>&6
2043else
2044 ac_save_LIBS="$LIBS"
2045LIBS="-ldnet_stub $LIBS"
2046cat > conftest.$ac_ext <<EOF
72ae15f6 2047#line 2048 "configure"
5436fc65
C
2048#include "confdefs.h"
2049
2050int main() { return 0; }
2051int t() {
2052dnet_ntoa()
2053; return 0; }
2054EOF
72ae15f6 2055if { (eval echo configure:2056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
5436fc65 2056 rm -rf conftest*
229b2c87 2057 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
2058else
2059 rm -rf conftest*
229b2c87 2060 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
2061fi
2062rm -f conftest*
2063LIBS="$ac_save_LIBS"
2064
2065fi
229b2c87 2066if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
2067 echo "$ac_t""yes" 1>&6
2068 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
2069else
2070 echo "$ac_t""no" 1>&6
2071fi
2072
2073 fi
2074
2075 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
2076 # to get the SysV transport functions.
2077 # Not sure which flavor of 386 UNIX this is, but it seems harmless to
2078 # check for it.
2079 echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
3dedc867 2080ac_lib_var=`echo nsl_t_accept | tr '.-/+' '___p'`
229b2c87 2081if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
2082 echo $ac_n "(cached) $ac_c" 1>&6
2083else
2084 ac_save_LIBS="$LIBS"
2085LIBS="-lnsl $LIBS"
2086cat > conftest.$ac_ext <<EOF
72ae15f6 2087#line 2088 "configure"
5436fc65
C
2088#include "confdefs.h"
2089
2090int main() { return 0; }
2091int t() {
2092t_accept()
2093; return 0; }
2094EOF
72ae15f6 2095if { (eval echo configure:2096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
5436fc65 2096 rm -rf conftest*
229b2c87 2097 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
2098else
2099 rm -rf conftest*
229b2c87 2100 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
2101fi
2102rm -f conftest*
2103LIBS="$ac_save_LIBS"
2104
2105fi
229b2c87 2106if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
2107 echo "$ac_t""yes" 1>&6
2108 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
2109else
2110 echo "$ac_t""no" 1>&6
2111fi
2112
2113
2114 # lieder@skyler.mavd.honeywell.com says without -lsocket,
2115 # socket/setsockopt and other routines are undefined under SCO ODT 2.0.
2116 # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
2117 if test "`(uname) 2>/dev/null`" != IRIX; then
2118 echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
3dedc867 2119ac_lib_var=`echo socket_socket | tr '.-/+' '___p'`
229b2c87 2120if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
2121 echo $ac_n "(cached) $ac_c" 1>&6
2122else
2123 ac_save_LIBS="$LIBS"
2124LIBS="-lsocket $LIBS"
2125cat > conftest.$ac_ext <<EOF
72ae15f6 2126#line 2127 "configure"
5436fc65
C
2127#include "confdefs.h"
2128
2129int main() { return 0; }
2130int t() {
2131socket()
2132; return 0; }
2133EOF
72ae15f6 2134if { (eval echo configure:2135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
5436fc65 2135 rm -rf conftest*
229b2c87 2136 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
2137else
2138 rm -rf conftest*
229b2c87 2139 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
2140fi
2141rm -f conftest*
2142LIBS="$ac_save_LIBS"
2143
2144fi
229b2c87 2145if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
2146 echo "$ac_t""yes" 1>&6
2147 X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
2148else
2149 echo "$ac_t""no" 1>&6
2150fi
2151
2152 fi
2153 fi
2154fi
2155
2156
a2b63bbd 2157
4e327047 2158
5436fc65 2159#
4e327047
TT
2160# Ok, lets find the tcl source trees so we can use the headers
2161# Warning: transition of version 9 to 10 will break this algorithm
2162# because 10 sorts before 9. We also look for just tcl. We have to
2163# be careful that we don't match stuff like tclX by accident.
2164# the alternative search directory is involked by --with-tclinclude
5436fc65 2165#
4e327047
TT
2166no_tcl=true
2167echo $ac_n "checking for Tcl private headers""... $ac_c" 1>&6
2168# Check whether --with-tclinclude or --without-tclinclude was given.
229b2c87
DE
2169if test "${with_tclinclude+set}" = set; then
2170 withval="$with_tclinclude"
4e327047
TT
2171 with_tclinclude=${withval}
2172fi
2173
2174if eval "test \"`echo '$''{'ac_cv_c_tclh'+set}'`\" = set"; then
2175 echo $ac_n "(cached) $ac_c" 1>&6
2176else
2177
2178# first check to see if --with-tclinclude was specified
2179if test x"${with_tclinclude}" != x ; then
2180 if test -f ${with_tclinclude}/tclInt.h ; then
2181 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
5436fc65 2182 else
4e327047
TT
2183 { echo "configure: error: ${with_tclinclude} directory doesn't contain private headers" 1>&2; exit 1; }
2184 fi
2185fi
2186# next check in private source directory
2187#
2188# since ls returns lowest version numbers first, reverse its output
2189if test x"${ac_cv_c_tclh}" = x ; then
2190 for i in \
2191 ${srcdir}/../tcl \
2192 `ls -dr ${srcdir}/../tcl[0-9]* 2>/dev/null` \
2193 ${srcdir}/../../tcl \
2194 `ls -dr ${srcdir}/../../tcl[0-9]* 2>/dev/null` \
2195 ${srcdir}/../../../tcl \
2196 `ls -dr ${srcdir}/../../../tcl[0-9]* 2>/dev/null ` ; do
2197 if test -f $i/tclInt.h ; then
2198 ac_cv_c_tclh=`(cd $i; pwd)`
2199 break
2200 fi
2201 # Tcl 7.5 and greater puts headers in subdirectory.
2202 if test -f $i/generic/tclInt.h ; then
2203 ac_cv_c_tclh=`(cd $i; pwd)`/generic
2204 fi
2205 done
2206fi
2207# finally check in a few common install locations
2208#
2209# since ls returns lowest version numbers first, reverse its output
2210if test x"${ac_cv_c_tclh}" = x ; then
2211 for i in \
2212 `ls -dr /usr/local/src/tcl[0-9]* 2>/dev/null` \
2213 `ls -dr /usr/local/lib/tcl[0-9]* 2>/dev/null` \
2214 /usr/local/src/tcl \
2215 /usr/local/lib/tcl \
2216 ${prefix}/include ; do
2217 if test -f $i/tclInt.h ; then
2218 ac_cv_c_tclh=`(cd $i; pwd)`
2219 break
2220 fi
2221 done
2222fi
2223# see if one is installed
2224if test x"${ac_cv_c_tclh}" = x ; then
2225 ac_safe=`echo "tclInt.h" | tr './\055' '___'`
2226echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
5436fc65
C
2227if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2228 echo $ac_n "(cached) $ac_c" 1>&6
2229else
2230 cat > conftest.$ac_ext <<EOF
72ae15f6 2231#line 2232 "configure"
5436fc65 2232#include "confdefs.h"
4e327047 2233#include <tclInt.h>
5436fc65 2234EOF
3dedc867 2235ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72ae15f6 2236{ (eval echo configure:2237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5436fc65
C
2237ac_err=`grep -v '^ *+' conftest.out`
2238if test -z "$ac_err"; then
2239 rm -rf conftest*
2240 eval "ac_cv_header_$ac_safe=yes"
2241else
2242 echo "$ac_err" >&5
2243 rm -rf conftest*
2244 eval "ac_cv_header_$ac_safe=no"
2245fi
2246rm -f conftest*
2247fi
2248if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2249 echo "$ac_t""yes" 1>&6
4e327047 2250 ac_cv_c_tclh=installed
5436fc65
C
2251else
2252 echo "$ac_t""no" 1>&6
4e327047 2253ac_cv_c_tclh=""
5436fc65
C
2254fi
2255
4e327047
TT
2256fi
2257
2258fi
2259
2260if test x"${ac_cv_c_tclh}" = x ; then
2261 TCLHDIR="# no Tcl private headers found"
2262 { echo "configure: error: Can't find Tcl private headers" 1>&2; exit 1; }
2263fi
2264if test x"${ac_cv_c_tclh}" != x ; then
2265 no_tcl=""
2266 if test x"${ac_cv_c_tkh}" = x"installed" ; then
2267 echo "$ac_t""is installed" 1>&6
2268 TCLHDIR=""
2269 else
2270 echo "$ac_t""found in ${ac_cv_c_tclh}" 1>&6
2271 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
2272 TCLHDIR="-I${ac_cv_c_tclh}"
5436fc65 2273 fi
5436fc65 2274fi
4e327047
TT
2275
2276echo $ac_n "checking Tcl version""... $ac_c" 1>&6
2277rm -rf tclmajor tclminor
2278orig_includes="$CPPFLAGS"
2279
2280if test x"${TCLHDIR}" != x ; then
2281 CPPFLAGS="$CPPFLAGS $TCLHDIR"
2282fi
2283
2284if test "$cross_compiling" = yes; then
2285 { echo "configure: error: can't be cross compiled" 1>&2; exit 1; }
2286
2287else
2288cat > conftest.$ac_ext <<EOF
72ae15f6 2289#line 2290 "configure"
4e327047
TT
2290#include "confdefs.h"
2291
2292#include <stdio.h>
2293#include "tcl.h"
2294main() {
2295 FILE *maj = fopen("tclmajor","w");
2296 FILE *min = fopen("tclminor","w");
2297 fprintf(maj,"%d",TCL_MAJOR_VERSION);
2298 fprintf(min,"%d",TCL_MINOR_VERSION);
2299 fclose(maj);
2300 fclose(min);
2301 return 0;
2302}
2303EOF
72ae15f6 2304{ (eval echo configure:2305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
4e327047
TT
2305if test -s conftest && (./conftest; exit) 2>/dev/null; then
2306 tclmajor=`cat tclmajor`
2307 tclminor=`cat tclminor`
2308 tclversion=$tclmajor.$tclminor
2309 echo "$ac_t""$tclversion" 1>&6
2310 rm -f tclmajor tclminor
2311
2312else
2313 echo "$ac_t""can't happen" 1>&6
2314
2315fi
5436fc65 2316fi
4e327047
TT
2317rm -fr conftest*
2318CPPFLAGS="${orig_includes}"
2319
5436fc65 2320
4e327047
TT
2321
2322
2323
5436fc65 2324#
4e327047 2325# Ok, lets find the tcl library
5436fc65 2326# First, look for one uninstalled.
4e327047 2327# the alternative search directory is invoked by --with-tcllib
5436fc65 2328#
4e327047
TT
2329
2330if test $tclmajor -ge 7 -a $tclminor -ge 4 ; then
2331 installedtcllibroot=tcl$tclversion
2332else
2333 installedtcllibroot=tcl
2334fi
2335
2336if test x"${no_tcl}" = x ; then
2337 # we reset no_tcl incase something fails here
2338 no_tcl=true
2339 # Check whether --with-tcllib or --without-tcllib was given.
229b2c87
DE
2340if test "${with_tcllib+set}" = set; then
2341 withval="$with_tcllib"
4e327047
TT
2342 with_tcllib=${withval}
2343fi
2344
2345 echo $ac_n "checking for Tcl library""... $ac_c" 1>&6
2346 if eval "test \"`echo '$''{'ac_cv_c_tcllib'+set}'`\" = set"; then
2347 echo $ac_n "(cached) $ac_c" 1>&6
2348else
2349
2350 # First check to see if --with-tcllib was specified.
2351 # This requires checking for both the installed and uninstalled name-styles
2352 # since we have no idea if it's installed or not.
2353 if test x"${with_tcllib}" != x ; then
2354 if test -f "${with_tcllib}/lib$installedtcllibroot.so" ; then
2355 ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/lib$installedtcllibroot.so
2356 elif test -f "${with_tcllib}/libtcl.so" ; then
2357 ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/libtcl.so
2358 # then look for a freshly built statically linked library
2359 # if Makefile exists we assume its configured and libtcl will be built first.
2360 elif test -f "${with_tcllib}/lib$installedtcllibroot.a" ; then
2361 ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/lib$installedtcllibroot.a
2362 elif test -f "${with_tcllib}/libtcl.a" ; then
2363 ac_cv_c_tcllib=`(cd ${with_tcllib}; pwd)`/libtcl.a
2364 else
2365 { echo "configure: error: ${with_tcllib} directory doesn't contain libraries" 1>&2; exit 1; }
2366 fi
5436fc65 2367 fi
4e327047
TT
2368 # then check for a private Tcl library
2369 # Since these are uninstalled, use the simple lib name root.
2370 if test x"${ac_cv_c_tcllib}" = x ; then
2371 for i in \
2372 ../tcl \
2373 `ls -dr ../tcl[0-9]* 2>/dev/null` \
2374 ../../tcl \
2375 `ls -dr ../../tcl[0-9]* 2>/dev/null` \
2376 ../../../tcl \
2377 `ls -dr ../../../tcl[0-9]* 2>/dev/null` ; do
2378 # Tcl 7.5 and greater puts library in subdir. Look there first.
2379 if test -f "$i/unix/libtcl.so" ; then
2380 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.so
2381 break
2382 elif test -f "$i/unix/libtcl.a" -o -f "$i/unix/Makefile"; then
2383 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.a
2384 break
2385 # look for a freshly built dynamically linked library
2386 elif test -f "$i/libtcl.so" ; then
2387 ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.so
2388 break
2389
2390 # then look for a freshly built statically linked library
2391 # if Makefile exists we assume its configured and libtcl will be
2392 # built first.
2393 elif test -f "$i/libtcl.a" -o -f "$i/Makefile" ; then
2394 ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.a
2395 break
2396 fi
2397 done
5436fc65 2398 fi
4e327047
TT
2399 # check in a few common install locations
2400 if test x"${ac_cv_c_tcllib}" = x ; then
2401 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
2402 # first look for a freshly built dynamically linked library
2403 if test -f "$i/lib$installedtcllibroot.so" ; then
2404 ac_cv_c_tcllib=`(cd $i; pwd)`/lib$installedtcllibroot.so
2405 break
2406 # then look for a freshly built statically linked library
2407 # if Makefile exists we assume its configured and libtcl will be built first.
2408 elif test -f "$i/lib$installedtcllibroot.a" -o -f "$i/Makefile" ; then
2409 ac_cv_c_tcllib=`(cd $i; pwd)`/lib$installedtcllibroot.a
2410 break
2411 fi
2412 done
5436fc65 2413 fi
4e327047
TT
2414 # check in a few other private locations
2415 if test x"${ac_cv_c_tcllib}" = x ; then
2416 for i in \
2417 ${srcdir}/../tcl \
2418 `ls -dr ${srcdir}/../tcl[0-9]* 2>/dev/null` ; do
2419 # Tcl 7.5 and greater puts library in subdir. Look there first.
2420 if test -f "$i/unix/libtcl.so" ; then
2421 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.so
2422 break
2423 elif test -f "$i/unix/libtcl.a" -o -f "$i/unix/Makefile"; then
2424 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtcl.a
2425 break
2426 # look for a freshly built dynamically linked library
2427 elif test -f "$i/libtcl.so" ; then
2428 ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.so
2429 break
2430
2431 # then look for a freshly built statically linked library
2432 # if Makefile exists we assume its configured and libtcl will be
2433 # built first.
2434 elif test -f "$i/libtcl.a" -o -f "$i/Makefile" ; then
2435 ac_cv_c_tcllib=`(cd $i; pwd)`/libtcl.a
2436 break
2437 fi
2438 done
2439 fi
2440
2441 # see if one is conveniently installed with the compiler
2442 if test x"${ac_cv_c_tcllib}" = x ; then
2443 orig_libs="$LIBS"
2444 LIBS="$LIBS -l$installedtcllibroot -lm"
2445 if test "$cross_compiling" = yes; then
2446 ac_cv_c_tclib="-l$installedtcllibroot"
2447else
2448cat > conftest.$ac_ext <<EOF
72ae15f6 2449#line 2450 "configure"
4e327047
TT
2450#include "confdefs.h"
2451
2452 Tcl_AppInit()
2453 { exit(0); }
2454EOF
72ae15f6 2455{ (eval echo configure:2456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
4e327047
TT
2456if test -s conftest && (./conftest; exit) 2>/dev/null; then
2457 ac_cv_c_tcllib="-l$installedtcllibroot"
2458else
2459 ac_cv_c_tcllib=""
2460
2461fi
2462fi
2463rm -fr conftest*
2464 LIBS="${orig_libs}"
2465 fi
2466
5436fc65
C
2467fi
2468
4e327047
TT
2469 if test x"${ac_cv_c_tcllib}" = x ; then
2470 TCLLIB="# no Tcl library found"
2471 echo "configure: warning: Can't find Tcl library" 1>&2
2472 else
2473 TCLLIB=${ac_cv_c_tcllib}
2474 echo "$ac_t""found $TCLLIB" 1>&6
2475 no_tcl=
5436fc65 2476 fi
5436fc65
C
2477fi
2478
5436fc65
C
2479
2480
2481
2482
a2b63bbd 2483
4e327047 2484
5436fc65 2485#
4e327047
TT
2486# Ok, lets find the tk source trees so we can use the headers
2487# If the directory (presumably symlink) named "tk" exists, use that one
2488# in preference to any others. Same logic is used when choosing library
2489# and again with Tcl. The search order is the best place to look first, then in
2490# decreasing significance. The loop breaks if the trigger file is found.
2491# Note the gross little conversion here of srcdir by cd'ing to the found
2492# directory. This converts the path from a relative to an absolute, so
2493# recursive cache variables for the path will work right. We check all
2494# the possible paths in one loop rather than many seperate loops to speed
2495# things up.
2496# the alternative search directory is invoked by --with-tkinclude
5436fc65 2497#
4e327047
TT
2498echo $ac_n "checking for Tk private headers""... $ac_c" 1>&6
2499# Check whether --with-tkinclude or --without-tkinclude was given.
229b2c87
DE
2500if test "${with_tkinclude+set}" = set; then
2501 withval="$with_tkinclude"
4e327047
TT
2502 with_tkinclude=${withval}
2503fi
2504
2505no_tk=true
2506if eval "test \"`echo '$''{'ac_cv_c_tkh'+set}'`\" = set"; then
2507 echo $ac_n "(cached) $ac_c" 1>&6
2508else
2509
2510# first check to see if --with-tkinclude was specified
2511if test x"${with_tkinclude}" != x ; then
2512 if test -f ${with_tkinclude}/tk.h ; then
2513 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
5436fc65 2514 else
4e327047
TT
2515 { echo "configure: error: ${with_tkinclude} directory doesn't contain private headers" 1>&2; exit 1; }
2516 fi
2517fi
2518# next check in private source directory
2519#
2520# since ls returns lowest version numbers first, reverse the entire list
2521# and search for the worst fit, overwriting it with better fits as we find them
2522if test x"${ac_cv_c_tkh}" = x ; then
2523 for i in \
2524 ${srcdir}/../tk \
2525 `ls -dr ${srcdir}/../tk[0-9]* 2>/dev/null` \
2526 ${srcdir}/../../tk \
2527 `ls -dr ${srcdir}/../../tk[0-9]* 2>/dev/null` \
2528 ${srcdir}/../../../tk \
2529 `ls -dr ${srcdir}/../../../tk[0-9]* 2>/dev/null ` ; do
2530 if test -f $i/tk.h ; then
2531 ac_cv_c_tkh=`(cd $i; pwd)`
2532 break
2533 fi
2534 # Tk 4.1 and greater puts this in a subdir.
2535 if test -f $i/generic/tk.h; then
2536 ac_cv_c_tkh=`(cd $i; pwd)`/generic
2537 fi
2538 done
2539fi
2540# finally check in a few common install locations
2541#
2542# since ls returns lowest version numbers first, reverse the entire list
2543# and search for the worst fit, overwriting it with better fits as we find them
2544if test x"${ac_cv_c_tkh}" = x ; then
2545 for i in \
2546 `ls -dr /usr/local/src/tk[0-9]* 2>/dev/null` \
2547 `ls -dr /usr/local/lib/tk[0-9]* 2>/dev/null` \
2548 /usr/local/src/tk \
2549 /usr/local/lib/tk \
2550 ${prefix}/include ; do
2551 if test -f $i/tk.h ; then
2552 ac_cv_c_tkh=`(cd $i; pwd)`
2553 break
2554 fi
2555 done
2556fi
2557# see if one is installed
2558if test x"${ac_cv_c_tkh}" = x ; then
2559 ac_safe=`echo "tk.h" | tr './\055' '___'`
2560echo $ac_n "checking for tk.h""... $ac_c" 1>&6
5436fc65
C
2561if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2562 echo $ac_n "(cached) $ac_c" 1>&6
2563else
2564 cat > conftest.$ac_ext <<EOF
72ae15f6 2565#line 2566 "configure"
5436fc65 2566#include "confdefs.h"
4e327047 2567#include <tk.h>
5436fc65 2568EOF
3dedc867 2569ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
72ae15f6 2570{ (eval echo configure:2571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5436fc65
C
2571ac_err=`grep -v '^ *+' conftest.out`
2572if test -z "$ac_err"; then
2573 rm -rf conftest*
2574 eval "ac_cv_header_$ac_safe=yes"
2575else
2576 echo "$ac_err" >&5
2577 rm -rf conftest*
2578 eval "ac_cv_header_$ac_safe=no"
2579fi
2580rm -f conftest*
2581fi
2582if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2583 echo "$ac_t""yes" 1>&6
4e327047 2584 ac_cv_c_tkh=installed
5436fc65
C
2585else
2586 echo "$ac_t""no" 1>&6
2587fi
2588
4e327047
TT
2589fi
2590
2591fi
2592
2593if test x"${ac_cv_c_tkh}" != x ; then
2594 no_tk=""
2595 if test x"${ac_cv_c_tkh}" = x"installed" ; then
2596 echo "$ac_t""is installed" 1>&6
2597 TKHDIR=""
2598 else
2599 echo "$ac_t""found in $ac_cv_c_tkh" 1>&6
2600 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
2601 TKHDIR="-I${ac_cv_c_tkh}"
5436fc65
C
2602 fi
2603else
4e327047
TT
2604 TKHDIR="# no Tk directory found"
2605 echo "configure: warning: Can't find Tk private headers" 1>&2
2606 no_tk=true
5436fc65
C
2607fi
2608
4e327047
TT
2609# if Tk is installed, extract the major/minor version
2610if test x"${no_tk}" = x ; then
2611echo $ac_n "checking Tk version""... $ac_c" 1>&6
2612rm -rf tkmajor tkminor
2613orig_includes="$CPPFLAGS"
2614
2615if test x"${TCLHDIR}" != x ; then
2616 CPPFLAGS="$CPPFLAGS $TCLHDIR"
2617fi
2618if test x"${TKHDIR}" != x ; then
2619 CPPFLAGS="$CPPFLAGS $TKHDIR"
2620fi
2621if test x"${x_includes}" != x -a x"${x_includes}" != xNONE ; then
2622 CPPFLAGS="$CPPFLAGS -I$x_includes"
2623fi
2624
2625if test "$cross_compiling" = yes; then
2626 { echo "configure: error: can't be cross compiled" 1>&2; exit 1; }
2627
2628else
2629cat > conftest.$ac_ext <<EOF
72ae15f6 2630#line 2631 "configure"
4e327047
TT
2631#include "confdefs.h"
2632
2633#include <stdio.h>
2634#include "tk.h"
2635 main() {
2636 FILE *maj = fopen("tkmajor","w");
2637 FILE *min = fopen("tkminor","w");
2638 fprintf(maj,"%d",TK_MAJOR_VERSION);
2639 fprintf(min,"%d",TK_MINOR_VERSION);
2640 fclose(maj);
2641 fclose(min);
2642 return 0;
2643}
2644EOF
72ae15f6 2645{ (eval echo configure:2646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
4e327047
TT
2646if test -s conftest && (./conftest; exit) 2>/dev/null; then
2647 tkmajor=`cat tkmajor`
2648 tkminor=`cat tkminor`
2649 tkversion=$tkmajor.$tkminor
2650 echo "$ac_t""$tkversion" 1>&6
2651 rm -f tkmajor tkminor
2652
2653else
2654 { echo "configure: error:
2655cannot compile a simple X program - suspect your xmkmf is
2656misconfigured and is incorrectly reporting the location of your X
2657include or libraries - report this to your system admin" 1>&2; exit 1; }
2658fi
2659fi
2660rm -fr conftest*
2661CPPFLAGS="${orig_includes}"
2662fi
2663
2664
2665
2666
2667
2668
5436fc65 2669#
4e327047
TT
2670# Ok, lets find the tk library
2671# First, look for the latest private (uninstalled) copy
2672# Notice that the destinations in backwards priority since the tests have
2673# no break.
2674# Then we look for either .a, .so, or Makefile. A Makefile is acceptable
2675# is it indicates the target has been configured and will (probably)
2676# soon be built. This allows an entire tree of Tcl software to be
2677# configured at once and then built.
2678# the alternative search directory is invoked by --with-tklib
5436fc65 2679#
4e327047
TT
2680
2681if test x"${no_tk}" = x ; then
2682 # reset no_tk incase something fails here
2683 no_tk="true"
2684
2685 if test $tkmajor -ge 4 ; then
2686 installedtklibroot=tk$tkversion
2687 else
2688 installedtkllibroot=tk
5436fc65 2689 fi
4e327047
TT
2690
2691 # Check whether --with-tklib or --without-tklib was given.
229b2c87
DE
2692if test "${with_tklib+set}" = set; then
2693 withval="$with_tklib"
4e327047 2694 with_tklib=${withval}
5436fc65 2695fi
4e327047
TT
2696
2697 echo $ac_n "checking for Tk library""... $ac_c" 1>&6
2698 if eval "test \"`echo '$''{'ac_cv_c_tklib'+set}'`\" = set"; then
2699 echo $ac_n "(cached) $ac_c" 1>&6
2700else
2701
2702 # first check to see if --with-tklib was specified
2703 # This requires checking for both the installed and uninstalled name-styles
2704 # since we have no idea if it's installed or not.
2705 if test x"${with_tklib}" != x ; then
2706 if test -f "${with_tklib}/lib$installedtklibroot.so" ; then
2707 ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/lib$installedtklibroot.so
2708 no_tk=""
2709 elif test -f "${with_tklib}/libtk.so" ; then
2710 ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/libtk.so
2711 no_tk=""
2712 # then look for a freshly built statically linked library
2713 # if Makefile exists we assume its configured and libtk will be built
2714 elif test -f "${with_tklib}/lib$installedtklibroot.a" ; then
2715 ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/lib$installedtklibroot.a
2716 no_tk=""
2717 elif test -f "${with_tklib}/libtk.a" ; then
2718 ac_cv_c_tklib=`(cd ${with_tklib}; pwd)`/libtk.a
2719 no_tk=""
2720 else
2721 { echo "configure: error: ${with_tklib} directory doesn't contain libraries" 1>&2; exit 1; }
2722 fi
5436fc65 2723 fi
4e327047
TT
2724 # then check for a private Tk library
2725 # Since these are uninstalled, use the simple lib name root.
2726 if test x"${ac_cv_c_tklib}" = x ; then
2727 for i in \
2728 ../tk \
2729 `ls -dr ../tk[0-9]* 2>/dev/null` \
2730 ../../tk \
2731 `ls -dr ../../tk[0-9]* 2>/dev/null` \
2732 ../../../tk \
2733 `ls -dr ../../../tk[0-9]* 2>/dev/null` ; do
2734 # Tk 4.1 and greater puts things in subdirs. Check these first.
2735 if test -f "$i/unix/libtk.so" ; then
2736 ac_cv_c_tklib=`(cd $i; pwd)`/unix/libtk.so
2737 no_tk=
2738 break
2739 elif test -f "$i/unix/libtk.a" -o -f "$i/unix/Makefile"; then
2740 ac_cv_c_tklib=`(cd $i; pwd)`/unix/libtk.a
2741 no_tk=
2742 break
2743 # look for a freshly built dynamically linked library
2744 elif test -f "$i/libtk.so" ; then
2745 ac_cv_c_tklib=`(cd $i; pwd)`/libtk.so
2746 no_tk=
2747 break
2748 # then look for a freshly built statically linked library
2749 # if Makefile exists we assume its configured and libtk will be built
2750 elif test -f "$i/libtk.a" -o -f "$i/Makefile" ; then
2751 ac_cv_c_tklib=`(cd $i; pwd)`/libtk.a
2752 no_tk=""
2753 break
2754 fi
2755 done
2756 fi
2757 # finally check in a few common install locations
2758 if test x"${ac_cv_c_tklib}" = x ; then
2759 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
2760 # first look for a freshly built dynamically linked library
2761 if test -f "$i/lib$installedtklibroot.so" ; then
2762 ac_cv_c_tklib=`(cd $i; pwd)`/lib$installedtklibroot.so
2763 no_tk=""
2764 break
2765 # then look for a freshly built statically linked library
2766 # if Makefile exists, we assume it's configured and libtcl will be built
2767 elif test -f "$i/lib$installedtklibroot.a" -o -f "$i/Makefile" ; then
2768 ac_cv_c_tklib=`(cd $i; pwd)`/lib$installedtklibroot.a
2769 no_tk=""
2770 break
2771 fi
2772 done
2773 fi
2774 # check in a few other private locations
2775 if test x"${ac_cv_c_tklib}" = x ; then
2776 for i in \
2777 ${srcdir}/../tk \
2778 `ls -dr ${srcdir}/../tk[0-9]* 2>/dev/null` ; do
2779 # Tk 4.1 and greater puts things in subdirs. Check these first.
2780 if test -f "$i/unix/libtk.so" ; then
2781 ac_cv_c_tklib=`(cd $i; pwd)`/unix/libtk.so
2782 no_tk=
2783 break
2784 elif test -f "$i/unix/libtk.a" -o -f "$i/unix/Makefile"; then
2785 ac_cv_c_tcllib=`(cd $i; pwd)`/unix/libtk.a
2786 no_tk=
2787 break
2788 # look for a freshly built dynamically linked library
2789 elif test -f "$i/libtk.so" ; then
2790 ac_cv_c_tklib=`(cd $i; pwd)`/libtk.so
2791 no_tk=""
2792 break
2793 # then look for a freshly built statically linked library
2794 # if Makefile exists, we assume it's configured and libtcl will be built
2795 elif test -f "$i/libtk.a" -o -f "$i/Makefile" ; then
2796 ac_cv_c_tklib=`(cd $i; pwd)`/libtk.a
2797 no_tk=""
2798 break
2799 fi
2800 done
2801 fi
2802 # see if one is conveniently installed with the compiler
2803 if test x"${ac_cv_c_tklib}" = x ; then
2804
2805 orig_libs="$LIBS"
2806 LIBS="$LIBS -l$installedtklibroot $x_libraries $ac_cv_c_tcllib -lm"
2807 if test "$cross_compiling" = yes; then
2808 ac_cv_c_tklib="-l$installedtklibroot"
2809else
2810cat > conftest.$ac_ext <<EOF
72ae15f6 2811#line 2812 "configure"
4e327047 2812#include "confdefs.h"
5436fc65 2813
4e327047
TT
2814 Tcl_AppInit()
2815 { exit(0); }
2816EOF
72ae15f6 2817{ (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
4e327047
TT
2818if test -s conftest && (./conftest; exit) 2>/dev/null; then
2819 ac_cv_c_tklib="-l$installedtklibroot"
5436fc65 2820else
4e327047
TT
2821 ac_cv_c_tklib=""
2822
2823fi
2824fi
2825rm -fr conftest*
2826 LIBS="${orig_libs}"
2827 fi
2828
2829fi
2830
2831 if test x"${ac_cv_c_tklib}" = x ; then
2832 TKLIB="# no Tk library found"
2833 echo "configure: warning: Can't find Tk library" 1>&2
2834 else
2835 TKLIB=$ac_cv_c_tklib
2836 echo "$ac_t""found $TKLIB" 1>&6
2837 no_tk=
2838 fi
5436fc65
C
2839fi
2840
2841
2842
2843
2844
1a57cd09
TT
2845 # Look for dynamic linking libraries that Tcl might need. This is
2846 # only done for Tcl 7.5 and greater. It would be good to look for and
2847 # use the "configInfo" file that Tcl generates, but for now that is
2848 # beyond us.
2849 if test $tclmajor -ge 7 -a $tclminor -ge 5 ; then
2850 echo $ac_n "checking for -ldl""... $ac_c" 1>&6
3dedc867 2851ac_lib_var=`echo dl_main | tr '.-/+' '___p'`
229b2c87 2852if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1a57cd09
TT
2853 echo $ac_n "(cached) $ac_c" 1>&6
2854else
2855 ac_save_LIBS="$LIBS"
2856LIBS="-ldl $LIBS"
2857cat > conftest.$ac_ext <<EOF
72ae15f6 2858#line 2859 "configure"
1a57cd09
TT
2859#include "confdefs.h"
2860
2861int main() { return 0; }
2862int t() {
2863main()
2864; return 0; }
2865EOF
72ae15f6 2866if { (eval echo configure:2867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1a57cd09 2867 rm -rf conftest*
229b2c87 2868 eval "ac_cv_lib_$ac_lib_var=yes"
1a57cd09
TT
2869else
2870 rm -rf conftest*
229b2c87 2871 eval "ac_cv_lib_$ac_lib_var=no"
1a57cd09
TT
2872fi
2873rm -f conftest*
2874LIBS="$ac_save_LIBS"
2875
2876fi
229b2c87 2877if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1a57cd09 2878 echo "$ac_t""yes" 1>&6
229b2c87 2879 ac_tr_lib=HAVE_LIB`echo dl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1a57cd09
TT
2880 cat >> confdefs.h <<EOF
2881#define $ac_tr_lib 1
2882EOF
2883
2884 LIBS="-ldl $LIBS"
2885
2886else
2887 echo "$ac_t""no" 1>&6
2888echo $ac_n "checking for -ldld""... $ac_c" 1>&6
3dedc867 2889ac_lib_var=`echo dld_main | tr '.-/+' '___p'`
229b2c87 2890if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1a57cd09
TT
2891 echo $ac_n "(cached) $ac_c" 1>&6
2892else
2893 ac_save_LIBS="$LIBS"
2894LIBS="-ldld $LIBS"
2895cat > conftest.$ac_ext <<EOF
72ae15f6 2896#line 2897 "configure"
1a57cd09
TT
2897#include "confdefs.h"
2898
2899int main() { return 0; }
2900int t() {
2901main()
2902; return 0; }
2903EOF
72ae15f6 2904if { (eval echo configure:2905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1a57cd09 2905 rm -rf conftest*
229b2c87 2906 eval "ac_cv_lib_$ac_lib_var=yes"
1a57cd09
TT
2907else
2908 rm -rf conftest*
229b2c87 2909 eval "ac_cv_lib_$ac_lib_var=no"
1a57cd09
TT
2910fi
2911rm -f conftest*
2912LIBS="$ac_save_LIBS"
2913
2914fi
229b2c87 2915if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1a57cd09 2916 echo "$ac_t""yes" 1>&6
229b2c87 2917 ac_tr_lib=HAVE_LIB`echo dld | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
1a57cd09
TT
2918 cat >> confdefs.h <<EOF
2919#define $ac_tr_lib 1
2920EOF
2921
2922 LIBS="-ldld $LIBS"
2923
2924else
2925 echo "$ac_t""no" 1>&6
2926fi
2927
2928fi
2929
2930 fi
2931
a2b63bbd 2932 ENABLE_GDBTK=1
66efdff9 2933
a2b63bbd
JM
2934 if test "x$no_x" != "xyes"; then
2935 if test "x$x_includes" != "x" ;
2936 then
2937 X_CFLAGS="-I$x_includes"
2938 else
2939 X_CFLAGS=""
2940 fi
2941
2942 if test "x$x_libraries" != "x" ;
2943 then
2944 X_LDFLAGS="-L$x_libraries"
2945 else
2946 X_LDFLAGS=""
2947 fi
2948
2949 case "$host" in
2950#
2951# gdb linked statically w/ Solaris iff GCC is used, otherwise dynamic
2952#
146ee7db 2953 sparc*-sun-solaris2*)
a2b63bbd
JM
2954 if test "x$GCC" = "xyes";
2955 then
127841e4 2956 X_LIBS="-Wl,-Bstatic -lX11 -lXext -lX11 -Wl,-Bdynamic -ldl -lw"
a2b63bbd
JM
2957 else
2958 if test "x$x_libraries" != "x" ;
2959 then
2960 X_LDFLAGS="$X_LDFLAGS -R$x_libraries"
2961 fi
2962 X_LIBS="-lX11 -lXext -lX11"
2963 fi ;;
2964#
2965# gdb linked statically w/ SunOS or HPUX
2966#
2967 m68k-hp-hpux*|hppa*-hp-hpux*|sparc-sun-sunos*)
2968 if test "x$x_libraries" != "x" ;
2969 then
2970 X_LIBS="$x_libraries/libX11.a"
2971 else
2972 X_LIBS="/usr/lib/libX11.a"
2973 fi ;;
2974#
2975# default is to link dynamically
2976#
2977 *)
2978 X_LIBS="-lX11" ;;
2979 esac
2980 else
2981 X_LDLAGS=""
2982 X_CFLAGS=""
2983 X_LIBS=""
2984 echo "configure: warning: No X based programs will be built" 1>&2
2985 fi
2986
2987 TCL_LIBS='$(TCL) $(TK) $(X11_LDFLAGS) $(X11_LIBS)'
2988 ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS} -lm"
2989 ENABLE_OBS="${ENABLE_OBS} gdbtk.o"
2990fi
66efdff9 2991
66efdff9 2992
5436fc65 2993
66efdff9
JM
2994
2995
5436fc65
C
2996# end-sanitize-gdbtk
2997
2998
2999
3000
3001
7c40dd08
DE
3002# target_subdir is used by the testsuite to find the target libraries.
3003target_subdir=
3004if test "${host}" != "${target}"; then
3005 target_subdir="${target_alias}/"
3006fi
3007
5436fc65
C
3008
3009configdirs="doc testsuite"
3010
3011
3012# Map host cpu into the config cpu subdirectory name.
3013# The default is $host_cpu.
3014
3015case "${host_cpu}" in
3016
3017c[12]) gdb_host_cpu=convex ;;
3018hppa*) gdb_host_cpu=pa ;;
3222ff2e 3019i[3456]86) gdb_host_cpu=i386 ;;
5436fc65
C
3020m68*) gdb_host_cpu=m68k ;;
3021m88*) gdb_host_cpu=m88k ;;
3022np1) gdb_host_cpu=gould ;;
3023pyramid) gdb_host_cpu=pyr ;;
3024powerpc*) gdb_host_cpu=powerpc ;;
146ee7db 3025sparc64) gdb_host_cpu=sparc ;;
5436fc65
C
3026*) gdb_host_cpu=$host_cpu ;;
3027
3028esac
3029
3030# map host info into gdb names.
3031
3032case "${host}" in
3033
3034a29k-*-*) gdb_host=ultra3 ;;
3035
3036alpha-*-osf1*) gdb_host=alpha-osf1 ;;
b8ea4fec
PS
3037alpha-*-osf2*) gdb_host=alpha-osf2 ;;
3038alpha-*-osf[3456789]*) gdb_host=alpha-osf3 ;;
5436fc65
C
3039
3040arm-*-*) gdb_host=arm ;;
3041
3042c[12]-*-*) gdb_host=convex ;;
3043
3044hppa*-*-bsd*) gdb_host=hppabsd ;;
3045hppa*-*-hiux*) gdb_host=hppahpux ;;
3046hppa*-*-hpux*) gdb_host=hppahpux ;;
3047hppa*-*-osf*) gdb_host=hppaosf ;;
3048
3222ff2e
MM
3049i[3456]86-ncr-*) gdb_host=ncr3000 ;;
3050i[3456]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
3051i[3456]86-sequent-sysv4*) gdb_host=ptx4 ;;
3052i[3456]86-sequent-sysv*) gdb_host=ptx ;;
3053i[3456]86-*-aix*) gdb_host=i386aix ;;
3054i[3456]86-*-bsd*) gdb_host=i386bsd ;;
3055i[3456]86-*-dgux*) gdb_host=i386dgux ;;
3056i[3456]86-*-freebsd*) gdb_host=fbsd ;;
3057i[3456]86-*-netbsd*) gdb_host=nbsd ;;
3058i[3456]86-*-go32*) gdb_host=go32 ;;
3059i[3456]86-*-linux*) gdb_host=linux ;;
3060i[3456]86-*-lynxos*) gdb_host=i386lynx ;;
3061i[3456]86-*-mach3*) gdb_host=i386m3 ;;
3062i[3456]86-*-mach*) gdb_host=i386mach ;;
3063i[3456]86-*-osf1mk*) gdb_host=osf1mk ;;
125c17af 3064i[3456]86-*-sco3.2v5*) gdb_host=i386sco5 ;;
3222ff2e
MM
3065i[3456]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
3066i[3456]86-*-sco*) gdb_host=i386sco ;;
3067i[3456]86-*-solaris*) gdb_host=i386sol2 ;;
3068i[3456]86-*-sunos*) gdb_host=sun386 ;;
3069i[3456]86-*-sysv3.2*) gdb_host=i386v32 ;;
3070i[3456]86-*-sysv32*) gdb_host=i386v32 ;;
3071i[3456]86-*-sysv4*) gdb_host=i386v4 ;;
3072i[3456]86-*-unixware) gdb_host=i386v4 ;;
3073i[3456]86-*-sysv*) gdb_host=i386v ;;
3074i[3456]86-*-isc*) gdb_host=i386v32 ;;
3075i[3456]86-*-os9k) gdb_host=i386os9k ;;
3d78f532 3076i[3456]86-*-cygwin32) gdb_host=cygwin32 ;;
5436fc65
C
3077m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
3078m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
3079m68030-sony-*) gdb_host=news1000 ;;
3080
3081m68*-altos-*) gdb_host=altos ;;
3082m68*-apollo*-sysv*) gdb_host=apollo68v ;;
3083m68*-apollo*-bsd*) gdb_host=apollo68b ;;
3084m68*-att-*) gdb_host=3b1 ;;
3085m68*-bull*-sysv*) gdb_host=dpx2 ;;
3086m68*-hp-bsd*) gdb_host=hp300bsd ;;
3087m68*-hp-hpux*) gdb_host=hp300hpux ;;
3088m68*-isi-*) gdb_host=isi ;;
3089m68*-*-lynxos*) gdb_host=m68klynx ;;
b7f3b6d5 3090m68*-*-netbsd*) gdb_host=nbsd ;;
5436fc65
C
3091m68*-*-sysv4*) gdb_host=m68kv4 ;;
3092m68*-motorola-*) gdb_host=delta68 ;;
3093m68*-sony-*) gdb_host=news ;;
3094m68*-sun-sunos3*) gdb_host=sun3os3 ;;
3095m68*-sun-sunos4*) gdb_host=sun3os4 ;;
3096m68*-sun-*) gdb_host=sun3os4 ;;
3097
3098m88*-harris-cxux*) gdb_host=cxux ;;
3099m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
3100m88*-motorola-sysv*) gdb_host=delta88 ;;
3101m88*-*-mach3*) gdb_host=mach3 ;;
3102m88*-*-*) gdb_host=m88k ;;
3103
3104mips-dec-mach3*) gdb_host=mach3 ;;
3105mips-dec-*) gdb_host=decstation ;;
3106mips-little-*) gdb_host=littlemips ;;
3107mips-sgi-irix3*) gdb_host=irix3 ;;
3108mips-sgi-irix4*) gdb_host=irix4 ;;
3109mips-sgi-irix5*) gdb_host=irix5 ;;
3110mips-sony-*) gdb_host=news-mips ;;
3111mips-*-mach3*) gdb_host=mach3 ;;
3112mips-*-sysv4*) gdb_host=mipsv4 ;;
3113mips-*-sysv*) gdb_host=riscos ;;
3114mips-*-riscos*) gdb_host=riscos ;;
3115
3116none-*-*) gdb_host=none ;;
3117
3118np1-*-*) gdb_host=np1 ;;
3119
3120ns32k-*-mach3*) gdb_host=mach3 ;;
3121ns32k-*-netbsd*) gdb_host=nbsd ;;
3122ns32k-umax-*) gdb_host=umax ;;
3123ns32k-utek-sysv*) gdb_host=merlin ;;
3124
fbc3f191 3125powerpc-*-aix*) gdb_host=aix ;;
3d78f532 3126powerpcle-*-cygwin32) gdb_host=cygwin32 ;;
5436fc65
C
3127pn-*-*) gdb_host=pn ;;
3128
3129pyramid-*-*) gdb_host=pyramid ;;
3130
3131romp-*-*) gdb_host=rtbsd ;;
3132
3133rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
a1956677 3134rs6000-*-aix4*) gdb_host=aix4 ;;
5436fc65
C
3135rs6000-*-*) gdb_host=rs6000 ;;
3136
3137sparc-*-lynxos*) gdb_host=sparclynx ;;
3138sparc-*-netbsd*) gdb_host=nbsd ;;
3139sparc-*-solaris2*) gdb_host=sun4sol2 ;;
3140sparc-*-sunos4*) gdb_host=sun4os4 ;;
3141sparc-*-sunos5*) gdb_host=sun4sol2 ;;
3142sparc-*-*) gdb_host=sun4os4 ;;
146ee7db 3143sparc64-*-*) gdb_host=sun4sol2 ;;
5436fc65
C
3144
3145tahoe-*-*) gdb_host=tahoe ;;
3146
3147vax-*-bsd*) gdb_host=vaxbsd ;;
3148vax-*-ultrix2*) gdb_host=vaxult2 ;;
3149vax-*-ultrix*) gdb_host=vaxult ;;
3150
3151w65-*-*) gdb_host=w65 ;;
3152
3153esac
3154
3155
3156# Map target cpu into the config cpu subdirectory name.
3157# The default is $target_cpu.
3158
3159case "${target_cpu}" in
3160
3161alpha) gdb_target_cpu=alpha ;;
3162c[12]) gdb_target_cpu=convex ;;
3163hppa*) gdb_target_cpu=pa ;;
3222ff2e 3164i[3456]86) gdb_target_cpu=i386 ;;
5436fc65
C
3165m68*) gdb_target_cpu=m68k ;;
3166m88*) gdb_target_cpu=m88k ;;
3167mips*) gdb_target_cpu=mips ;;
3168np1) gdb_target_cpu=gould ;;
3169powerpc*) gdb_target_cpu=powerpc ;;
3170pn) gdb_target_cpu=gould ;;
3171pyramid) gdb_target_cpu=pyr ;;
5436fc65
C
3172sparc*) gdb_target_cpu=sparc ;;
3173*) gdb_target_cpu=$target_cpu ;;
3174
3175esac
3176
3177# map target info into gdb names.
3178
3179case "${target}" in
3180
3181a29k-*-aout*) gdb_target=a29k ;;
3182a29k-*-coff*) gdb_target=a29k ;;
3183a29k-*-elf*) gdb_target=a29k ;;
3184a29k-*-ebmon*) gdb_target=a29k ;;
3185a29k-*-kern*) gdb_target=a29k-kern ;;
3186a29k-*-none*) gdb_target=a29k ;;
3187a29k-*-sym1*) gdb_target=ultra3 ;;
3188a29k-*-udi*) gdb_target=a29k-udi ;;
3189a29k-*-vxworks*) gdb_target=vx29k ;;
3190
3191alpha-*-osf*) gdb_target=alpha-osf1 ;;
3192
3193# start-sanitize-arc
3194arc-*-*) gdb_target=arc ;;
3195# end-sanitize-arc
3196
3197arm-*-*) gdb_target=arm ;;
3198
3199c1-*-*) gdb_target=convex ;;
3200c2-*-*) gdb_target=convex ;;
3201
fb506180
SS
3202h8300-*-*) gdb_target=h8300 ;;
3203h8500-*-*) gdb_target=h8500 ;;
5436fc65
C
3204
3205sh-*-*) gdb_target=sh ;;
3206
3207# start-sanitize-r16
3208r16-*-*) gdb_target=r16 ;;
3209# end-sanitize-r16
3210
3211hppa*-*-bsd*) gdb_target=hppabsd ;;
3212hppa*-*-pro*) gdb_target=hppapro ;;
3213hppa*-*-hpux*) gdb_target=hppahpux ;;
3214hppa*-*-hiux*) gdb_target=hppahpux ;;
3215hppa*-*-osf*) gdb_target=hppaosf ;;
3216
3222ff2e
MM
3217i[3456]86-sequent-bsd*) gdb_target=symmetry ;;
3218i[3456]86-sequent-sysv4*) gdb_target=ptx4 ;;
3219i[3456]86-sequent-sysv*) gdb_target=ptx ;;
3220i[3456]86-ncr-*) gdb_target=ncr3000 ;;
3221i[3456]86-*-aout*) gdb_target=i386aout ;;
3222i[3456]86-*-coff*) gdb_target=i386v ;;
3223i[3456]86-*-elf*) gdb_target=i386v ;;
3224i[3456]86-*-aix*) gdb_target=i386aix ;;
3225i[3456]86-*-bsd*) gdb_target=i386bsd ;;
3226i[3456]86-*-freebsd*) gdb_target=fbsd ;;
3227i[3456]86-*-netbsd*) gdb_target=nbsd ;;
3228i[3456]86-*-os9k) gdb_target=i386os9k ;;
3229i[3456]86-*-go32*) gdb_target=i386aout ;;
3230i[3456]86-*-lynxos*) gdb_target=i386lynx
5436fc65 3231 configdirs="${configdirs} gdbserver" ;;
3222ff2e
MM
3232i[3456]86-*-solaris*) gdb_target=i386sol2 ;;
3233i[3456]86-*-sunos*) gdb_target=sun386 ;;
3234i[3456]86-*-sysv4*) gdb_target=i386v4 ;;
3235i[3456]86-*-sco*) gdb_target=i386v ;;
3236i[3456]86-*-sysv*) gdb_target=i386v ;;
3dedc867
FF
3237i[3456]86-*-linux*) gdb_target=linux
3238 configdirs="${configdirs} gdbserver" ;;
3222ff2e
MM
3239i[3456]86-*-isc*) gdb_target=i386v ;;
3240i[3456]86-*-mach3*) gdb_target=i386m3 ;;
3241i[3456]86-*-mach*) gdb_target=i386mach ;;
3242i[3456]86-*-netware*) gdb_target=i386nw
5436fc65 3243 configdirs="${configdirs} nlm" ;;
3222ff2e 3244i[3456]86-*-osf1mk*) gdb_target=i386mk ;;
3d78f532 3245i[3456]86-*-cygwin32) gdb_target=cygwin32 ;;
5436fc65 3246i960-*-bout*) gdb_target=vxworks960 ;;
2e665cd3
DP
3247i960-nindy-coff*) gdb_target=nindy960 ;;
3248i960-*-coff*) gdb_target=mon960 ;;
3249i960-nindy-elf*) gdb_target=nindy960 ;;
3250i960-*-elf*) gdb_target=mon960 ;;
5436fc65
C
3251
3252i960-*-nindy*) gdb_target=nindy960 ;;
3253i960-*-vxworks*) gdb_target=vxworks960 ;;
3254
3255m68000-*-sunos3*) gdb_target=sun2os3 ;;
3256m68000-*-sunos4*) gdb_target=sun2os4 ;;
3257
3258m68*-apollo*-bsd*) gdb_target=apollo68b ;;
3259m68*-bull-sysv*) gdb_target=dpx2 ;;
3260m68*-hp-bsd*) gdb_target=hp300bsd ;;
3261m68*-hp-hpux*) gdb_target=hp300hpux ;;
3262m68*-altos-*) gdb_target=altos ;;
3263m68*-att-*) gdb_target=3b1 ;;
3264m68*-cisco*-*) gdb_target=cisco ;;
3265m68*-ericsson-*) gdb_target=es1800 ;;
3266m68*-isi-*) gdb_target=isi ;;
3267m68*-motorola-*) gdb_target=delta68 ;;
3268m68*-netx-*) gdb_target=vxworks68 ;;
3269m68*-sony-*) gdb_target=news ;;
3270m68*-tandem-*) gdb_target=st2000 ;;
3271m68*-rom68k-*) gdb_target=monitor ;;
3272m68*-*bug-*) gdb_target=monitor ;;
3273m68*-monitor-*) gdb_target=monitor ;;
949e2bbf 3274m68*-est-*) gdb_target=monitor ;;
5436fc65
C
3275m68*-*-aout*) gdb_target=monitor ;;
3276m68*-*-coff*) gdb_target=monitor ;;
3277m68*-*-elf*) gdb_target=monitor ;;
3278m68*-*-lynxos*) gdb_target=m68klynx
3279 configdirs="${configdirs} gdbserver" ;;
b7f3b6d5 3280m68*-*-netbsd*) gdb_target=nbsd ;;
5436fc65
C
3281m68*-*-os68k*) gdb_target=os68k ;;
3282m68*-*-sunos3*) gdb_target=sun3os3 ;;
3283m68*-*-sunos4*) gdb_target=sun3os4 ;;
3284m68*-*-sysv4*) gdb_target=m68kv4 ;;
3285m68*-*-vxworks*) gdb_target=vxworks68 ;;
3286
3287m88*-harris-cxux*) gdb_target=cxux ;;
3288m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
3289m88*-*-mach3*) gdb_target=mach3 ;;
3290m88*-motorola-*) gdb_target=delta88 ;;
3291m88*-*-*) gdb_target=m88k ;;
3292
3293mips64*-big-*) gdb_target=bigmips64 ;;
3294mips*-big-*) gdb_target=bigmips ;;
3295mips*-dec-mach3*) gdb_target=mach3 ;;
3296mips*-dec-*) gdb_target=decstation ;;
7bb5e831
RS
3297mips64*el-*-ecoff*) gdb_target=embedl64 ;;
3298mips64*-*-ecoff*) gdb_target=embed64 ;;
0e3a4b1e
JSC
3299mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;;
3300mips64*vr4300*-*-elf*) gdb_target=vr4300 ;;
7bb5e831
RS
3301mips64*el-*-elf*) gdb_target=embedl64 ;;
3302mips64*-*-elf*) gdb_target=embed64 ;;
3303mips*el-*-ecoff*) gdb_target=embedl ;;
3304mips*-*-ecoff*) gdb_target=embed ;;
cd10c7e3 3305# start-sanitize-gm
7bb5e831 3306mips*-*-magic*) gdb_target=embed ;;
cd10c7e3 3307# end-sanitize-gm
7bb5e831
RS
3308mips*el-*-elf*) gdb_target=embedl ;;
3309mips*-*-elf*) gdb_target=embed ;;
5436fc65
C
3310mips*-little-*) gdb_target=littlemips ;;
3311mips*-sgi-irix5*) gdb_target=irix5 ;;
3312mips*-sgi-*) gdb_target=irix3 ;;
3313mips*-sony-*) gdb_target=bigmips ;;
3314mips*-*-mach3*) gdb_target=mach3 ;;
3315mips*-*-sysv4*) gdb_target=mipsv4 ;;
3316mips*-*-sysv*) gdb_target=bigmips ;;
3317mips*-*-riscos*) gdb_target=bigmips ;;
3dedc867 3318mips*-*-vxworks*) gdb_target=vxmips ;;
5436fc65
C
3319
3320none-*-*) gdb_target=none ;;
3321
3322np1-*-*) gdb_target=np1 ;;
3323
3324ns32k-*-mach3*) gdb_target=mach3 ;;
3325ns32k-*-netbsd*) gdb_target=nbsd ;;
3326ns32k-utek-sysv*) gdb_target=merlin ;;
3327ns32k-utek-*) gdb_target=umax ;;
3328
3329pn-*-*) gdb_target=pn ;;
c148ab3c 3330powerpc-*-macos*) gdb_target=macos ;;
5436fc65
C
3331powerpc-*-netware*) gdb_target=ppc-nw
3332 configdirs="${configdirs} nlm" ;;
3333
65eaea27 3334powerpc-*-aix4*) gdb_target=aix4 ;;
fbc3f191 3335powerpc-*-aix*) gdb_target=aix ;;
3d78f532 3336powerpcle-*-cygwin32) gdb_target=cygwin32 ;;
3c0bf315
MM
3337powerpc-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
3338 gdb_target=ppc-sim
3339 else
3340 gdb_target=ppc-eabi
3341 fi ;;
3342powerpcle-*-eabi*) if test x"$powerpc_sim" = x"yes"; then
3343 gdb_target=ppcle-sim
3344 else
3345 gdb_target=ppcle-eabi
3346 fi ;;
5436fc65
C
3347
3348pyramid-*-*) gdb_target=pyramid ;;
3349
3350rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
65eaea27 3351rs6000-*-aix4*) gdb_target=aix4 ;;
5436fc65
C
3352rs6000-*-*) gdb_target=rs6000 ;;
3353
3354sparc-*-aout*) gdb_target=sparc-em ;;
3355sparc-*-coff*) gdb_target=sparc-em ;;
3356sparc-*-elf*) gdb_target=sparc-em ;;
3357sparc-*-lynxos*) gdb_target=sparclynx
3358 configdirs="${configdirs} gdbserver" ;;
3359sparc-*-netbsd*) gdb_target=nbsd ;;
3360sparc-*-solaris2*) gdb_target=sun4sol2 ;;
3361sparc-*-sunos4*) gdb_target=sun4os4 ;;
3362sparc-*-sunos5*) gdb_target=sun4sol2 ;;
3363sparc-*-vxworks*) gdb_target=vxsparc ;;
3364sparc-*-*) gdb_target=sun4os4 ;;
229b2c87
DE
3365# Use sparc-em for sparclet for now.
3366sparclet-*-*) gdb_target=sparc-em ;;
5436fc65 3367sparclite*-*-*) gdb_target=sparclite ;;
078aeca4
DE
3368# It's not clear what the right solution for "v8plus" systems is yet.
3369# For now, stick with sparc-sun-solaris2 since that's what config.guess
3370# should return. Work is still needed to get gdb to print the 64 bit
3371# regs (some of which are usable in v8plus) so sp64sol.mt hasn't been
3372# deleted though presumably it should be eventually.
3373#sparc64-*-solaris2*) gdb_target=sp64sol2 ;;
5436fc65
C
3374sparc64-*-*) gdb_target=sp64 ;;
3375
3376tahoe-*-*) gdb_target=tahoe ;;
3377
3378vax-*-*) gdb_target=vax ;;
3379
3380w65-*-*) gdb_target=w65 ;;
3381
fb506180 3382z8k-*-coff*) gdb_target=z8k ;;
5436fc65
C
3383
3384esac
3385
3386
5f107900 3387frags=
5436fc65
C
3388host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
3389if test ! -f ${host_makefile_frag}; then
3390{ echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
3391fi
5f107900 3392frags="$frags $host_makefile_frag"
5436fc65
C
3393
3394target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
3395if test ! -f ${target_makefile_frag}; then
3396{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
3397fi
5f107900 3398frags="$frags $target_makefile_frag"
5436fc65
C
3399
3400
3401
3402
3403
094fd4ae
C
3404hostfile=`sed -n '
3405s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
3406' ${host_makefile_frag}`
5436fc65 3407
094fd4ae
C
3408targetfile=`sed -n '
3409s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
3410' ${target_makefile_frag}`
5436fc65
C
3411
3412# these really aren't orthogonal true/false values of the same condition,
3413# but shells are slow enough that I like to reuse the test conditions
3414# whenever possible
3415if test "${target}" = "${host}"; then
094fd4ae
C
3416nativefile=`sed -n '
3417s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
3418' ${host_makefile_frag}`
5436fc65
C
3419else
3420# GDBserver is only useful in a "native" enviroment
3421configdirs=`echo $configdirs | sed 's/gdbserver//'`
3422fi
3423
094fd4ae 3424
5436fc65
C
3425# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
3426# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
3427# corresponding links. But we have to remove the xm.h files and tm.h
3428# files anyway, e.g. when switching from "configure host" to
3429# "configure none".
3430
3431files=
3432links=
3433rm -f xm.h
3434if test "${hostfile}" != ""; then
3435files="${files} config/${gdb_host_cpu}/${hostfile}"
3436links="${links} xm.h"
3437fi
3438rm -f tm.h
3439if test "${targetfile}" != ""; then
3440files="${files} config/${gdb_target_cpu}/${targetfile}"
3441links="${links} tm.h"
3442fi
3443rm -f nm.h
3444if test "${nativefile}" != ""; then
3445files="${files} config/${gdb_host_cpu}/${nativefile}"
3446links="${links} nm.h"
3447else
3448# A cross-only configuration.
3449files="${files} config/nm-empty.h"
3450links="${links} nm.h"
3451fi
3452# start-sanitize-gdbtk
3453
3454# Make it possible to use the GUI without doing a full install
3455if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then
3456files="${files} gdbtk.tcl"
3457links="${links} gdbtk.tcl"
3458fi
3459# end-sanitize-gdbtk
3460
3461
3462
3463subdirs="$configdirs"
3464
3465trap '' 1 2 15
3466cat > confcache <<\EOF
3467# This file is a shell script that caches the results of configure
3468# tests run on this system so they can be shared between configure
3469# scripts and configure runs. It is not useful on other systems.
3470# If it contains results you don't want to keep, you may remove or edit it.
3471#
3472# By default, configure uses ./config.cache as the cache file,
3473# creating it if it does not exist already. You can give configure
3474# the --cache-file=FILE option to use a different cache file; that is
3475# what configure does when it calls configure scripts in
3476# subdirectories, so they share the cache.
3477# Giving --cache-file=/dev/null disables caching, for debugging configure.
3478# config.status only pays attention to the cache file if you give it the
3479# --recheck option to rerun configure.
3480#
3481EOF
3482# Ultrix sh set writes to stderr and can't be redirected directly,
3483# and sets the high bit in the cache file unless we assign to the vars.
3484(set) 2>&1 |
3485 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
3486 >> confcache
3487if cmp -s $cache_file confcache; then
3488 :
3489else
3490 if test -w $cache_file; then
3491 echo "updating cache $cache_file"
3492 cat confcache > $cache_file
3493 else
3494 echo "not updating unwritable cache $cache_file"
3495 fi
3496fi
3497rm -f confcache
3498
3499trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
3500
3501test "x$prefix" = xNONE && prefix=$ac_default_prefix
3502# Let make expand exec_prefix.
3503test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
3504
3505# Any assignment to VPATH causes Sun make to only execute
3506# the first set of double-colon rules, so remove it if not needed.
3507# If there is a colon in the path, we need to keep it.
3508if test "x$srcdir" = x.; then
3509 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
3510fi
3511
3512trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
3513
db210d08 3514DEFS=-DHAVE_CONFIG_H
5436fc65
C
3515
3516# Without the "./", some shells look in PATH for config.status.
3517: ${CONFIG_STATUS=./config.status}
3518
3519echo creating $CONFIG_STATUS
3520rm -f $CONFIG_STATUS
3521cat > $CONFIG_STATUS <<EOF
3522#! /bin/sh
3523# Generated automatically by configure.
3524# Run this file to recreate the current configuration.
3525# This directory was configured as follows,
3526# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3527#
3528# $0 $ac_configure_args
3529#
3530# Compiler output produced by configure, useful for debugging
3531# configure, is in ./config.log if it exists.
3532
3533ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
3534for ac_option
3535do
3536 case "\$ac_option" in
3537 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
3538 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
3539 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
3540 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
fda58904 3541 echo "$CONFIG_STATUS generated by autoconf version 2.8"
5436fc65
C
3542 exit 0 ;;
3543 -help | --help | --hel | --he | --h)
3544 echo "\$ac_cs_usage"; exit 0 ;;
3545 *) echo "\$ac_cs_usage"; exit 1 ;;
3546 esac
3547done
3548
3549ac_given_srcdir=$srcdir
3550ac_given_INSTALL="$INSTALL"
3551
18ea4416 3552trap 'rm -fr `echo "Makefile config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
229b2c87
DE
3553EOF
3554cat >> $CONFIG_STATUS <<EOF
5436fc65 3555
229b2c87
DE
3556# Protect against being on the right side of a sed subst in config.status.
3557sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
3558 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5436fc65
C
3559$ac_vpsub
3560$extrasub
3561s%@CFLAGS@%$CFLAGS%g
3562s%@CPPFLAGS@%$CPPFLAGS%g
3563s%@CXXFLAGS@%$CXXFLAGS%g
3564s%@DEFS@%$DEFS%g
3565s%@LDFLAGS@%$LDFLAGS%g
3566s%@LIBS@%$LIBS%g
3567s%@exec_prefix@%$exec_prefix%g
3568s%@prefix@%$prefix%g
3569s%@program_transform_name@%$program_transform_name%g
229b2c87
DE
3570s%@bindir@%$bindir%g
3571s%@sbindir@%$sbindir%g
3572s%@libexecdir@%$libexecdir%g
3573s%@datadir@%$datadir%g
3574s%@sysconfdir@%$sysconfdir%g
3575s%@sharedstatedir@%$sharedstatedir%g
3576s%@localstatedir@%$localstatedir%g
3577s%@libdir@%$libdir%g
3578s%@includedir@%$includedir%g
3579s%@oldincludedir@%$oldincludedir%g
3580s%@infodir@%$infodir%g
3581s%@mandir@%$mandir%g
5436fc65
C
3582s%@CC@%$CC%g
3583s%@CPP@%$CPP%g
3584s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
3585s%@INSTALL_DATA@%$INSTALL_DATA%g
3586s%@RANLIB@%$RANLIB%g
204c8825 3587s%@YACC@%$YACC%g
5436fc65
C
3588s%@host@%$host%g
3589s%@host_alias@%$host_alias%g
3590s%@host_cpu@%$host_cpu%g
3591s%@host_vendor@%$host_vendor%g
3592s%@host_os@%$host_os%g
3593s%@target@%$target%g
3594s%@target_alias@%$target_alias%g
3595s%@target_cpu@%$target_cpu%g
3596s%@target_vendor@%$target_vendor%g
3597s%@target_os@%$target_os%g
3598s%@build@%$build%g
3599s%@build_alias@%$build_alias%g
3600s%@build_cpu@%$build_cpu%g
3601s%@build_vendor@%$build_vendor%g
3602s%@build_os@%$build_os%g
3603s%@X_CFLAGS@%$X_CFLAGS%g
3604s%@X_PRE_LIBS@%$X_PRE_LIBS%g
3605s%@X_LIBS@%$X_LIBS%g
3606s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
5436fc65
C
3607s%@TCLHDIR@%$TCLHDIR%g
3608s%@TCLLIB@%$TCLLIB%g
4e327047
TT
3609s%@TKHDIR@%$TKHDIR%g
3610s%@TKLIB@%$TKLIB%g
5436fc65 3611s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g
a2b63bbd 3612s%@X_LDFLAGS@%$X_LDFLAGS%g
5436fc65
C
3613s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
3614s%@ENABLE_CLIBS@%$ENABLE_CLIBS%g
3615s%@ENABLE_OBS@%$ENABLE_OBS%g
7c40dd08 3616s%@target_subdir@%$target_subdir%g
5436fc65
C
3617/@host_makefile_frag@/r $host_makefile_frag
3618s%@host_makefile_frag@%%g
3619/@target_makefile_frag@/r $target_makefile_frag
3620s%@target_makefile_frag@%%g
5f107900 3621s%@frags@%$frags%g
5436fc65
C
3622s%@subdirs@%$subdirs%g
3623
3624CEOF
3625EOF
3626cat >> $CONFIG_STATUS <<EOF
3627
3628CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
3629EOF
3630cat >> $CONFIG_STATUS <<\EOF
3631for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
3632 # Support "outfile[:infile]", defaulting infile="outfile.in".
3633 case "$ac_file" in
3634 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3635 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3636 *) ac_file_in="${ac_file}.in" ;;
3637 esac
3638
3639 # Adjust relative srcdir, etc. for subdirectories.
3640
3641 # Remove last slash and all that follows it. Not all systems have dirname.
3642 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
3643 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
3644 # The file is in a subdirectory.
3645 test ! -d "$ac_dir" && mkdir "$ac_dir"
3646 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
3647 # A "../" for each directory in $ac_dir_suffix.
3648 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
3649 else
3650 ac_dir_suffix= ac_dots=
3651 fi
3652
3653 case "$ac_given_srcdir" in
3654 .) srcdir=.
3655 if test -z "$ac_dots"; then top_srcdir=.
3656 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
3657 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
3658 *) # Relative path.
3659 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
3660 top_srcdir="$ac_dots$ac_given_srcdir" ;;
3661 esac
3662
3663 case "$ac_given_INSTALL" in
3664 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3665 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3666 esac
3667 echo creating "$ac_file"
3668 rm -f "$ac_file"
3669 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
3670 case "$ac_file" in
3671 *Makefile*) ac_comsub="1i\\
3672# $configure_input" ;;
3673 *) ac_comsub= ;;
3674 esac
3675 sed -e "$ac_comsub
3676s%@configure_input@%$configure_input%g
3677s%@srcdir@%$srcdir%g
3678s%@top_srcdir@%$top_srcdir%g
3679s%@INSTALL@%$INSTALL%g
3680" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
3681fi; done
3682rm -f conftest.subs
3683
db210d08
FF
3684# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
3685# NAME is the cpp macro being defined and VALUE is the value it is being given.
3686#
3687# ac_d sets the value in "#define NAME VALUE" lines.
3688ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
3689ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
3690ac_dC='\3'
3691ac_dD='%g'
3692# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
3693ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3694ac_uB='\([ ]\)%\1#\2define\3'
3695ac_uC=' '
3696ac_uD='\4%g'
3697# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
3698ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
3699ac_eB='$%\1#\2define\3'
3700ac_eC=' '
3701ac_eD='%g'
3702
18ea4416 3703CONFIG_HEADERS=${CONFIG_HEADERS-"config.h:config.in"}
db210d08
FF
3704for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
3705 # Support "outfile[:infile]", defaulting infile="outfile.in".
3706 case "$ac_file" in
3707 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
3708 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
3709 *) ac_file_in="${ac_file}.in" ;;
3710 esac
3711
3712 echo creating $ac_file
3713
3714 rm -f conftest.frag conftest.in conftest.out
3715 cp $ac_given_srcdir/$ac_file_in conftest.in
3716
3717EOF
3718
3719# Transform confdefs.h into a sed script conftest.vals that substitutes
3720# the proper values into config.h.in to produce config.h. And first:
3721# Protect against being on the right side of a sed subst in config.status.
3722# Protect against being in an unquoted here document in config.status.
3723rm -f conftest.vals
3724cat > conftest.hdr <<\EOF
3725s/[\\&%]/\\&/g
3726s%[\\$`]%\\&%g
fda58904 3727s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
db210d08
FF
3728s%ac_d%ac_u%gp
3729s%ac_u%ac_e%gp
3730EOF
3731sed -n -f conftest.hdr confdefs.h > conftest.vals
3732rm -f conftest.hdr
3733
3734# This sed command replaces #undef with comments. This is necessary, for
3735# example, in the case of _POSIX_SOURCE, which is predefined and required
3736# on some systems where configure will not decide to define it.
3737cat >> conftest.vals <<\EOF
3738s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
3739EOF
3740
3741# Break up conftest.vals because some shells have a limit on
3742# the size of here documents, and old seds have small limits too.
3743# Maximum number of lines to put in a single here document.
3744ac_max_here_lines=12
3745
3746rm -f conftest.tail
3747while :
3748do
3749 ac_lines=`grep -c . conftest.vals`
3750 # grep -c gives empty output for an empty file on some AIX systems.
3751 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
3752 # Write a limited-size here document to conftest.frag.
3753 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
3754 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
3755 echo 'CEOF
3756 sed -f conftest.frag conftest.in > conftest.out
3757 rm -f conftest.in
3758 mv conftest.out conftest.in
3759' >> $CONFIG_STATUS
3760 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
3761 rm -f conftest.vals
3762 mv conftest.tail conftest.vals
3763done
3764rm -f conftest.vals
3765
3766cat >> $CONFIG_STATUS <<\EOF
3767 rm -f conftest.frag conftest.h
3768 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
3769 cat conftest.in >> conftest.h
3770 rm -f conftest.in
3771 if cmp -s $ac_file conftest.h 2>/dev/null; then
3772 echo "$ac_file is unchanged"
3773 rm -f conftest.h
3774 else
3775 rm -f $ac_file
3776 mv conftest.h $ac_file
3777 fi
3778fi; done
3779
5436fc65
C
3780EOF
3781
3782cat >> $CONFIG_STATUS <<EOF
3783ac_sources="$files"
3784ac_dests="$links"
3785EOF
3786
3787cat >> $CONFIG_STATUS <<\EOF
3788srcdir=$ac_given_srcdir
3789while test -n "$ac_sources"; do
3790 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
3791 set $ac_sources; ac_source=$1; shift; ac_sources=$*
3792
3793 echo "linking $srcdir/$ac_source to $ac_dest"
3794
3795 if test ! -r $srcdir/$ac_source; then
3796 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
3797 fi
3798 rm -f $ac_dest
3799
3800 # Make relative symlinks.
3801 # Remove last slash and all that follows it. Not all systems have dirname.
3802 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
3803 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
3804 # The dest file is in a subdirectory.
3805 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
3806 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
3807 # A "../" for each directory in $ac_dest_dir_suffix.
3808 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
3809 else
3810 ac_dest_dir_suffix= ac_dots=
3811 fi
3812
3813 case "$srcdir" in
3814 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
3815 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
3816 esac
3817
3818 # Make a symlink if possible; otherwise try a hard link.
3819 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
3820 ln $srcdir/$ac_source $ac_dest; then :
3821 else
3822 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
3823 fi
3824done
0a5a1821
C
3825EOF
3826cat >> $CONFIG_STATUS <<EOF
5436fc65 3827
0a5a1821
C
3828gdb_host_cpu=$gdb_host_cpu
3829gdb_target_cpu=$gdb_target_cpu
3830nativefile=$nativefile
3831
3832EOF
3833cat >> $CONFIG_STATUS <<\EOF
5436fc65
C
3834
3835if test "${nativefile}" = ""; then
3836sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
3837 < Makefile > Makefile.tem
3838mv -f Makefile.tem Makefile
3839fi
3840
3841sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
3842/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
3843/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
3844mv -f Makefile.tmp Makefile
3845
3846case ${srcdir} in
3847.)
3848;;
3849*)
3850grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
3851echo "source ${srcdir}/.gdbinit" >> .gdbinit
3852esac
3853
31520669 3854case x$CONFIG_HEADERS in
18ea4416 3855xconfig.h:config.in)
31520669
FF
3856echo > stamp-h ;;
3857esac
3858
5436fc65
C
3859exit 0
3860EOF
3861chmod +x $CONFIG_STATUS
3862rm -fr confdefs* $ac_clean_files
3863test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
3864
3865if test "$no_recursion" != yes; then
3866
3867 # Remove --cache-file and --srcdir arguments so they do not pile up.
3868 ac_sub_configure_args=
3869 ac_prev=
3870 for ac_arg in $ac_configure_args; do
3871 if test -n "$ac_prev"; then
3872 ac_prev=
3873 continue
3874 fi
3875 case "$ac_arg" in
3876 -cache-file | --cache-file | --cache-fil | --cache-fi \
3877 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
3878 ac_prev=cache_file ;;
3879 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
3880 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
3881 ;;
3882 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
3883 ac_prev=srcdir ;;
3884 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
3885 ;;
3886 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
3887 esac
3888 done
3889
3890 for ac_config_dir in $configdirs; do
3891
3892 # Do not complain, so a configure script can configure whichever
3893 # parts of a large source tree are present.
3894 if test ! -d $srcdir/$ac_config_dir; then
3895 continue
3896 fi
3897
3898 echo configuring in $ac_config_dir
3899
3900 case "$srcdir" in
3901 .) ;;
3902 *)
3903 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
3904 else
3905 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
3906 fi
3907 ;;
3908 esac
3909
3910 ac_popdir=`pwd`
3911 cd $ac_config_dir
3912
3913 case "$srcdir" in
3914 .) # No --srcdir option. We are building in place.
3915 ac_sub_srcdir=$srcdir ;;
3916 /*) # Absolute path.
3917 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
3918 *) # Relative path.
3919 ac_sub_srcdir=../$srcdir/$ac_config_dir ;;
3920 esac
3921
3922 # Check for guested configure; otherwise get Cygnus style configure.
3923 if test -f $ac_sub_srcdir/configure; then
3924 ac_sub_configure=$ac_sub_srcdir/configure
3925 elif test -f $ac_sub_srcdir/configure.in; then
3926 ac_sub_configure=$ac_configure
3927 else
3928 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
3929 ac_sub_configure=
3930 fi
3931
3932 # The recursion is here.
3933 if test -n "$ac_sub_configure"; then
3934
3935 # Make the cache file name correct relative to the subdirectory.
3936 # A "../" for each directory in /$ac_config_dir.
3937 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
3938 case "$cache_file" in
3939 /*) ac_sub_cache_file=$cache_file ;;
3940 *) # Relative path.
3941 ac_sub_cache_file="$ac_dots$cache_file" ;;
3942 esac
3943 case "$ac_given_INSTALL" in
3944 [/$]*) INSTALL="$ac_given_INSTALL" ;;
3945 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
3946 esac
3947
3948 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
3949 # The eval makes quoting arguments work.
3950 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
3951 then :
3952 else
3953 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
3954 fi
3955 fi
3956
3957 cd $ac_popdir
3958 done
3959fi
3960
5e711e7f
PS
3961
3962exit 0
b7f3b6d5 3963
This page took 0.232737 seconds and 4 git commands to generate.