Fix typo in ChangeLog itself.
[deliverable/binutils-gdb.git] / gdb / configure
CommitLineData
5436fc65
C
1#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
188c635f 4# Generated automatically using autoconf version 2.4.2
5436fc65
C
5# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --enable-netrom "
188c635f
SG
16ac_help="$ac_help
17 --enable-gm "
5436fc65
C
18ac_help="$ac_help
19 --enable-gdbtk "
20ac_help="$ac_help
21 --with-x use the X Window System"
22
23# Initialize some variables set by options.
24# The variables have the same names as the options, with
25# dashes changed to underlines.
26build=NONE
27cache_file=./config.cache
28exec_prefix=NONE
29host=NONE
30no_create=
31nonopt=NONE
32no_recursion=
33prefix=NONE
34program_prefix=NONE
35program_suffix=NONE
36program_transform_name=s,x,x,
37silent=
38site=
39srcdir=
40target=NONE
41verbose=
42x_includes=NONE
43x_libraries=NONE
188c635f
SG
44bindir='${exec_prefix}/bin'
45sbindir='${exec_prefix}/sbin'
46libexecdir='${exec_prefix}/libexec'
47datadir='${prefix}/share'
48sysconfdir='${prefix}/etc'
49sharedstatedir='${prefix}/com'
50localstatedir='${prefix}/var'
51libdir='${exec_prefix}/lib'
52includedir='${prefix}/include'
53oldincludedir='/usr/include'
54infodir='${prefix}/info'
55mandir='${prefix}/man'
5436fc65
C
56
57# Initialize some other variables.
58subdirs=
59
60ac_prev=
61for ac_option
62do
63
64 # If the previous option needs an argument, assign it.
65 if test -n "$ac_prev"; then
66 eval "$ac_prev=\$ac_option"
67 ac_prev=
68 continue
69 fi
70
71 case "$ac_option" in
72 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
73 *) ac_optarg= ;;
74 esac
75
76 # Accept the important Cygnus configure options, so we can diagnose typos.
77
78 case "$ac_option" in
79
188c635f
SG
80 -bindir | --bindir | --bindi | --bind | --bin | --bi)
81 ac_prev=bindir ;;
82 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
83 bindir="$ac_optarg" ;;
84
85 -build | --build | --buil | --bui | --bu)
5436fc65 86 ac_prev=build ;;
188c635f 87 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
5436fc65
C
88 build="$ac_optarg" ;;
89
90 -cache-file | --cache-file | --cache-fil | --cache-fi \
91 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
92 ac_prev=cache_file ;;
93 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
94 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
95 cache_file="$ac_optarg" ;;
96
188c635f
SG
97 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
98 ac_prev=datadir ;;
99 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
100 | --da=*)
101 datadir="$ac_optarg" ;;
102
5436fc65
C
103 -disable-* | --disable-*)
104 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
105 # Reject names that are not valid shell variable names.
106 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
107 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
108 fi
109 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
110 eval "enable_${ac_feature}=no" ;;
111
112 -enable-* | --enable-*)
113 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
114 # Reject names that are not valid shell variable names.
115 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
116 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
117 fi
118 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
119 case "$ac_option" in
120 *=*) ;;
121 *) ac_optarg=yes ;;
122 esac
123 eval "enable_${ac_feature}='$ac_optarg'" ;;
124
125 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
126 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
127 | --exec | --exe | --ex)
128 ac_prev=exec_prefix ;;
129 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
130 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
131 | --exec=* | --exe=* | --ex=*)
132 exec_prefix="$ac_optarg" ;;
133
134 -gas | --gas | --ga | --g)
135 # Obsolete; use --with-gas.
136 with_gas=yes ;;
137
138 -help | --help | --hel | --he)
139 # Omit some internal or obsolete options to make the list less imposing.
140 # This message is too long to be a string in the A/UX 3.1 sh.
141 cat << EOF
142Usage: configure [options] [host]
143Options: [defaults in brackets after descriptions]
144Configuration:
145 --cache-file=FILE cache test results in FILE
146 --help print this message
147 --no-create do not create output files
148 --quiet, --silent do not print \`checking...' messages
149 --version print the version of autoconf that created configure
150Directory and file names:
151 --prefix=PREFIX install architecture-independent files in PREFIX
152 [$ac_default_prefix]
188c635f 153 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
5436fc65 154 [same as prefix]
188c635f
SG
155 --bindir=DIR user executables in DIR [EPREFIX/bin]
156 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
157 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
158 --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share]
159 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
160 --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com]
161 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
162 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
163 --includedir=DIR C header files in DIR [PREFIX/include]
164 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
165 --infodir=DIR info documentation in DIR [PREFIX/info]
166 --mandir=DIR man documentation in DIR [PREFIX/man]
5436fc65
C
167 --srcdir=DIR find the sources in DIR [configure dir or ..]
168 --program-prefix=PREFIX prepend PREFIX to installed program names
169 --program-suffix=SUFFIX append SUFFIX to installed program names
170 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
188c635f
SG
171EOF
172 cat << EOF
5436fc65
C
173Host type:
174 --build=BUILD configure for building on BUILD [BUILD=HOST]
175 --host=HOST configure for HOST [guessed]
176 --target=TARGET configure for TARGET [TARGET=HOST]
177Features and packages:
178 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
179 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
180 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
181 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
182 --x-includes=DIR X include files are in DIR
183 --x-libraries=DIR X library files are in DIR
184--enable and --with options recognized:$ac_help
185EOF
186 exit 0 ;;
187
188 -host | --host | --hos | --ho)
189 ac_prev=host ;;
190 -host=* | --host=* | --hos=* | --ho=*)
191 host="$ac_optarg" ;;
192
188c635f
SG
193 -includedir | --includedir | --includedi | --included | --include \
194 | --includ | --inclu | --incl | --inc)
195 ac_prev=includedir ;;
196 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
197 | --includ=* | --inclu=* | --incl=* | --inc=*)
198 includedir="$ac_optarg" ;;
199
200 -infodir | --infodir | --infodi | --infod | --info | --inf)
201 ac_prev=infodir ;;
202 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
203 infodir="$ac_optarg" ;;
204
205 -libdir | --libdir | --libdi | --libd)
206 ac_prev=libdir ;;
207 -libdir=* | --libdir=* | --libdi=* | --libd=*)
208 libdir="$ac_optarg" ;;
209
210 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
211 | --libexe | --libex | --libe)
212 ac_prev=libexecdir ;;
213 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
214 | --libexe=* | --libex=* | --libe=*)
215 libexecdir="$ac_optarg" ;;
216
217 -localstatedir | --localstatedir | --localstatedi | --localstated \
218 | --localstate | --localstat | --localsta | --localst \
219 | --locals | --local | --loca | --loc | --lo)
220 ac_prev=localstatedir ;;
221 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
222 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
223 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
224 localstatedir="$ac_optarg" ;;
225
226 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
227 ac_prev=mandir ;;
228 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
229 mandir="$ac_optarg" ;;
230
5436fc65
C
231 -nfp | --nfp | --nf)
232 # Obsolete; use --without-fp.
233 with_fp=no ;;
234
235 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
236 | --no-cr | --no-c)
237 no_create=yes ;;
238
239 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
240 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
241 no_recursion=yes ;;
242
188c635f
SG
243 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
244 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
245 | --oldin | --oldi | --old | --ol | --o)
246 ac_prev=oldincludedir ;;
247 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
248 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
249 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
250 oldincludedir="$ac_optarg" ;;
251
5436fc65
C
252 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
253 ac_prev=prefix ;;
254 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
255 prefix="$ac_optarg" ;;
256
257 -program-prefix | --program-prefix | --program-prefi | --program-pref \
258 | --program-pre | --program-pr | --program-p)
259 ac_prev=program_prefix ;;
260 -program-prefix=* | --program-prefix=* | --program-prefi=* \
261 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
262 program_prefix="$ac_optarg" ;;
263
264 -program-suffix | --program-suffix | --program-suffi | --program-suff \
265 | --program-suf | --program-su | --program-s)
266 ac_prev=program_suffix ;;
267 -program-suffix=* | --program-suffix=* | --program-suffi=* \
268 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
269 program_suffix="$ac_optarg" ;;
270
271 -program-transform-name | --program-transform-name \
272 | --program-transform-nam | --program-transform-na \
273 | --program-transform-n | --program-transform- \
274 | --program-transform | --program-transfor \
275 | --program-transfo | --program-transf \
276 | --program-trans | --program-tran \
277 | --progr-tra | --program-tr | --program-t)
278 ac_prev=program_transform_name ;;
279 -program-transform-name=* | --program-transform-name=* \
280 | --program-transform-nam=* | --program-transform-na=* \
281 | --program-transform-n=* | --program-transform-=* \
282 | --program-transform=* | --program-transfor=* \
283 | --program-transfo=* | --program-transf=* \
284 | --program-trans=* | --program-tran=* \
285 | --progr-tra=* | --program-tr=* | --program-t=*)
286 program_transform_name="$ac_optarg" ;;
287
288 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
289 | -silent | --silent | --silen | --sile | --sil)
290 silent=yes ;;
291
188c635f
SG
292 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
293 ac_prev=sbindir ;;
294 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
295 | --sbi=* | --sb=*)
296 sbindir="$ac_optarg" ;;
297
298 -sharedstatedir | --sharedstatedir | --sharedstatedi \
299 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
300 | --sharedst | --shareds | --shared | --share | --shar \
301 | --sha | --sh)
302 ac_prev=sharedstatedir ;;
303 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
304 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
305 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
306 | --sha=* | --sh=*)
307 sharedstatedir="$ac_optarg" ;;
308
5436fc65
C
309 -site | --site | --sit)
310 ac_prev=site ;;
311 -site=* | --site=* | --sit=*)
312 site="$ac_optarg" ;;
313
314 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
315 ac_prev=srcdir ;;
316 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
317 srcdir="$ac_optarg" ;;
318
188c635f
SG
319 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
320 | --syscon | --sysco | --sysc | --sys | --sy)
321 ac_prev=sysconfdir ;;
322 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
323 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
324 sysconfdir="$ac_optarg" ;;
325
5436fc65
C
326 -target | --target | --targe | --targ | --tar | --ta | --t)
327 ac_prev=target ;;
328 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
329 target="$ac_optarg" ;;
330
331 -v | -verbose | --verbose | --verbos | --verbo | --verb)
332 verbose=yes ;;
333
334 -version | --version | --versio | --versi | --vers)
188c635f 335 echo "configure generated by autoconf version 2.4.2"
5436fc65
C
336 exit 0 ;;
337
338 -with-* | --with-*)
339 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
340 # Reject names that are not valid shell variable names.
341 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
342 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
343 fi
344 ac_package=`echo $ac_package| sed 's/-/_/g'`
345 case "$ac_option" in
346 *=*) ;;
347 *) ac_optarg=yes ;;
348 esac
349 eval "with_${ac_package}='$ac_optarg'" ;;
350
351 -without-* | --without-*)
352 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
353 # Reject names that are not valid shell variable names.
354 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
355 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
356 fi
357 ac_package=`echo $ac_package| sed 's/-/_/g'`
358 eval "with_${ac_package}=no" ;;
359
360 --x)
361 # Obsolete; use --with-x.
362 with_x=yes ;;
363
364 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
365 | --x-incl | --x-inc | --x-in | --x-i)
366 ac_prev=x_includes ;;
367 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
368 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
369 x_includes="$ac_optarg" ;;
370
371 -x-libraries | --x-libraries | --x-librarie | --x-librari \
372 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
373 ac_prev=x_libraries ;;
374 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
375 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
376 x_libraries="$ac_optarg" ;;
377
378 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
379 ;;
380
381 *)
382 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
383 echo "configure: warning: $ac_option: invalid host type" 1>&2
384 fi
385 if test "x$nonopt" != xNONE; then
386 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
387 fi
388 nonopt="$ac_option"
389 ;;
390
391 esac
392done
393
394if test -n "$ac_prev"; then
395 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
396fi
397
398trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
399
400# File descriptor usage:
401# 0 standard input
402# 1 file creation
403# 2 errors and warnings
404# 3 some systems may open it to /dev/tty
405# 4 used on the Kubota Titan
406# 6 checking for... messages and results
407# 5 compiler messages saved in config.log
408if test "$silent" = yes; then
409 exec 6>/dev/null
410else
411 exec 6>&1
412fi
413exec 5>./config.log
414
415echo "\
416This file contains any messages produced by compilers while
417running configure, to aid debugging if configure makes a mistake.
418" 1>&5
419
420# Strip out --no-create and --no-recursion so they do not pile up.
421# Also quote any args containing shell metacharacters.
422ac_configure_args=
423for ac_arg
424do
425 case "$ac_arg" in
426 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
427 | --no-cr | --no-c) ;;
428 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
429 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
430 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
431 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
432 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
433 esac
434done
435
436# NLS nuisances.
437# Only set LANG and LC_ALL to C if already set.
438# These must not be set unconditionally because not all systems understand
439# e.g. LANG=C (notably SCO).
440if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
441if test "${LANG+set}" = set; then LANG=C; export LANG; fi
442
443# confdefs.h avoids OS command line length limits that DEFS can exceed.
444rm -rf conftest* confdefs.h
445# AIX cpp loses on an empty file, so make sure it contains at least a newline.
446echo > confdefs.h
447
448# A filename unique to this package, relative to the directory that
449# configure is in, which we can look for to find out if srcdir is correct.
450ac_unique_file=main.c
451
452# Find the source files, if location was not specified.
453if test -z "$srcdir"; then
454 ac_srcdir_defaulted=yes
455 # Try the directory containing this script, then its parent.
456 ac_prog=$0
457 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
458 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
459 srcdir=$ac_confdir
460 if test ! -r $srcdir/$ac_unique_file; then
461 srcdir=..
462 fi
463else
464 ac_srcdir_defaulted=no
465fi
466if test ! -r $srcdir/$ac_unique_file; then
467 if test "$ac_srcdir_defaulted" = yes; then
468 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
469 else
470 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
471 fi
472fi
473srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
474
475# Prefer explicitly selected file to automatically selected ones.
476if test -z "$CONFIG_SITE"; then
477 if test "x$prefix" != xNONE; then
478 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
479 else
480 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
481 fi
482fi
483for ac_site_file in $CONFIG_SITE; do
484 if test -r "$ac_site_file"; then
485 echo "loading site script $ac_site_file"
486 . "$ac_site_file"
487 fi
488done
489
490if test -r "$cache_file"; then
491 echo "loading cache $cache_file"
492 . $cache_file
493else
494 echo "creating cache $cache_file"
495 > $cache_file
496fi
497
498ac_ext=c
499# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
188c635f
SG
500ac_cpp='echo $CPP $CPPFLAGS 1>&5;
501$CPP $CPPFLAGS'
502ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5;
503${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
504ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5;
505${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
5436fc65
C
506
507if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
508 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
509 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
510 ac_n= ac_c='
511' ac_t=' '
512 else
513 ac_n=-n ac_c= ac_t=
514 fi
515else
516 ac_n= ac_c='\c' ac_t=
517fi
518
519
520
521CC=${CC-cc}
522# Extract the first word of "gcc", so it can be a program name with args.
523set dummy gcc; ac_word=$2
524echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
525if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
526 echo $ac_n "(cached) $ac_c" 1>&6
527else
528 if test -n "$CC"; then
529 ac_cv_prog_CC="$CC" # Let the user override the test.
530else
531 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
188c635f 532 for ac_dir in cc; do
5436fc65
C
533 test -z "$ac_dir" && ac_dir=.
534 if test -f $ac_dir/$ac_word; then
535 ac_cv_prog_CC="gcc"
536 break
537 fi
538 done
539 IFS="$ac_save_ifs"
540 test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
541fi
542fi
543CC="$ac_cv_prog_CC"
544if test -n "$CC"; then
545 echo "$ac_t""$CC" 1>&6
546else
547 echo "$ac_t""no" 1>&6
548fi
549
550
551echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
552if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
553 echo $ac_n "(cached) $ac_c" 1>&6
554else
555 cat > conftest.c <<EOF
556#ifdef __GNUC__
557 yes;
558#endif
559EOF
560if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
561 ac_cv_prog_gcc=yes
562else
563 ac_cv_prog_gcc=no
564fi
565fi
188c635f 566
5436fc65
C
567echo "$ac_t""$ac_cv_prog_gcc" 1>&6
568if test $ac_cv_prog_gcc = yes; then
569 GCC=yes
570 if test "${CFLAGS+set}" != set; then
571 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
572if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
573 echo $ac_n "(cached) $ac_c" 1>&6
574else
575 echo 'void f(){}' > conftest.c
576if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
577 ac_cv_prog_gcc_g=yes
578else
579 ac_cv_prog_gcc_g=no
580fi
581rm -f conftest*
582
583fi
188c635f
SG
584
585echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
5436fc65
C
586 if test $ac_cv_prog_gcc_g = yes; then
587 CFLAGS="-g -O"
588 else
589 CFLAGS="-O"
590 fi
591 fi
592else
593 GCC=
594 test "${CFLAGS+set}" = set || CFLAGS="-g"
595fi
596
597echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
598# On Suns, sometimes $CPP names a directory.
599if test -n "$CPP" && test -d "$CPP"; then
600 CPP=
601fi
602if test -z "$CPP"; then
603if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
604 echo $ac_n "(cached) $ac_c" 1>&6
605else
606 # This must be in double quotes, not single quotes, because CPP may get
607 # substituted into the Makefile and "${CC-cc}" will confuse make.
608 CPP="${CC-cc} -E"
609 # On the NeXT, cc -E runs the code through the compiler's parser,
610 # not just through cpp.
611 cat > conftest.$ac_ext <<EOF
188c635f 612#line 613 "configure"
5436fc65
C
613#include "confdefs.h"
614#include <assert.h>
615Syntax Error
616EOF
617eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
618ac_err=`grep -v '^ *+' conftest.out`
619if test -z "$ac_err"; then
620 :
621else
622 echo "$ac_err" >&5
623 rm -rf conftest*
624 CPP="${CC-cc} -E -traditional-cpp"
625 cat > conftest.$ac_ext <<EOF
188c635f 626#line 627 "configure"
5436fc65
C
627#include "confdefs.h"
628#include <assert.h>
629Syntax Error
630EOF
631eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
632ac_err=`grep -v '^ *+' conftest.out`
633if test -z "$ac_err"; then
634 :
635else
636 echo "$ac_err" >&5
637 rm -rf conftest*
638 CPP=/lib/cpp
639fi
640rm -f conftest*
641fi
642rm -f conftest*
643 ac_cv_prog_CPP="$CPP"
644fi
dedcc91d
SC
645 CPP="$ac_cv_prog_CPP"
646else
647 ac_cv_prog_CPP="$CPP"
5436fc65 648fi
5436fc65
C
649echo "$ac_t""$CPP" 1>&6
650
651echo $ac_n "checking for AIX""... $ac_c" 1>&6
652cat > conftest.$ac_ext <<EOF
188c635f 653#line 654 "configure"
5436fc65
C
654#include "confdefs.h"
655#ifdef _AIX
656 yes
657#endif
658
659EOF
660if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
661 egrep "yes" >/dev/null 2>&1; then
662 rm -rf conftest*
663 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
664#define _ALL_SOURCE 1
665EOF
666
667else
668 rm -rf conftest*
669 echo "$ac_t""no" 1>&6
670fi
671rm -f conftest*
672
673
674ac_safe=`echo "minix/config.h" | tr './\055' '___'`
675echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
676if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
677 echo $ac_n "(cached) $ac_c" 1>&6
678else
679 cat > conftest.$ac_ext <<EOF
188c635f 680#line 681 "configure"
5436fc65
C
681#include "confdefs.h"
682#include <minix/config.h>
683EOF
684eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
685ac_err=`grep -v '^ *+' conftest.out`
686if test -z "$ac_err"; then
687 rm -rf conftest*
688 eval "ac_cv_header_$ac_safe=yes"
689else
690 echo "$ac_err" >&5
691 rm -rf conftest*
692 eval "ac_cv_header_$ac_safe=no"
693fi
694rm -f conftest*
695fi
696if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
697 echo "$ac_t""yes" 1>&6
698 MINIX=yes
699else
700 echo "$ac_t""no" 1>&6
701MINIX=
702fi
703
704if test "$MINIX" = yes; then
705 cat >> confdefs.h <<\EOF
706#define _POSIX_SOURCE 1
707EOF
708
709 cat >> confdefs.h <<\EOF
710#define _POSIX_1_SOURCE 2
711EOF
712
713 cat >> confdefs.h <<\EOF
714#define _MINIX 1
715EOF
716
717fi
718
719echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
720if test -d /etc/conf/kconfig.d &&
721 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
722then
723 echo "$ac_t""yes" 1>&6
724 ISC=yes # If later tests want to check for ISC.
725 cat >> confdefs.h <<\EOF
726#define _POSIX_SOURCE 1
727EOF
728
729 if test "$GCC" = yes; then
730 CC="$CC -posix"
731 else
732 CC="$CC -Xp"
733 fi
734else
735 echo "$ac_t""no" 1>&6
736 ISC=
737fi
738
739
740ac_aux_dir=
741for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
742 if test -f $ac_dir/install-sh; then
743 ac_aux_dir=$ac_dir
744 ac_install_sh="$ac_aux_dir/install-sh -c"
745 break
746 elif test -f $ac_dir/install.sh; then
747 ac_aux_dir=$ac_dir
748 ac_install_sh="$ac_aux_dir/install.sh -c"
749 break
750 fi
751done
752if test -z "$ac_aux_dir"; then
753 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
754fi
755ac_config_guess=$ac_aux_dir/config.guess
756ac_config_sub=$ac_aux_dir/config.sub
757ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
758
759# Find a good install program. We prefer a C program (faster),
760# so one script is as good as another. But avoid the broken or
761# incompatible versions:
762# SysV /etc/install, /usr/sbin/install
763# SunOS /usr/etc/install
764# IRIX /sbin/install
765# AIX /bin/install
766# AFS /usr/afsws/bin/install, which mishandles nonexistent args
767# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
768# ./install, which can be erroneously created by make from ./install.sh.
769echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
770if test -z "$INSTALL"; then
771if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
772 echo $ac_n "(cached) $ac_c" 1>&6
773else
774 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
775 for ac_dir in $PATH; do
776 # Account for people who put trailing slashes in PATH elements.
777 case "$ac_dir/" in
778 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
779 *)
780 # OSF1 and SCO ODT 3.0 have their own names for install.
781 for ac_prog in ginstall installbsd scoinst install; do
782 if test -f $ac_dir/$ac_prog; then
783 if test $ac_prog = install &&
784 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
785 # AIX install. It has an incompatible calling convention.
786 # OSF/1 installbsd also uses dspmsg, but is usable.
787 :
788 else
789 ac_cv_path_install="$ac_dir/$ac_prog -c"
790 break 2
791 fi
792 fi
793 done
794 ;;
795 esac
796 done
797 IFS="$ac_save_ifs"
188c635f 798
5436fc65 799fi
188c635f
SG
800 if test "${ac_cv_path_install+set}" = set; then
801 INSTALL="$ac_cv_path_install"
802 else
803 # As a last resort, use the slow shell script. We don't cache a
804 # path for INSTALL within a source directory, because that will
805 # break other packages using the cache if that directory is
806 # removed, or if the path is relative.
807 INSTALL="$ac_install_sh"
808 fi
5436fc65
C
809fi
810echo "$ac_t""$INSTALL" 1>&6
811
812# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
813# It thinks the first close brace ends the variable substitution.
814test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
815
816test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
817
818# Extract the first word of "ranlib", so it can be a program name with args.
819set dummy ranlib; ac_word=$2
820echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
821if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
822 echo $ac_n "(cached) $ac_c" 1>&6
823else
824 if test -n "$RANLIB"; then
825 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
826else
827 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
188c635f 828 for ac_dir in :; do
5436fc65
C
829 test -z "$ac_dir" && ac_dir=.
830 if test -f $ac_dir/$ac_word; then
831 ac_cv_prog_RANLIB="ranlib"
832 break
833 fi
834 done
835 IFS="$ac_save_ifs"
836 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
837fi
838fi
839RANLIB="$ac_cv_prog_RANLIB"
840if test -n "$RANLIB"; then
841 echo "$ac_t""$RANLIB" 1>&6
842else
843 echo "$ac_t""no" 1>&6
844fi
845
204c8825
FF
846for ac_prog in 'bison -y' byacc
847do
848# Extract the first word of "$ac_prog", so it can be a program name with args.
849set dummy $ac_prog; ac_word=$2
850echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
851if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
852 echo $ac_n "(cached) $ac_c" 1>&6
853else
854 if test -n "$YACC"; then
855 ac_cv_prog_YACC="$YACC" # Let the user override the test.
856else
857 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
858 for ac_dir in $PATH; do
859 test -z "$ac_dir" && ac_dir=.
860 if test -f $ac_dir/$ac_word; then
861 ac_cv_prog_YACC="$ac_prog"
862 break
863 fi
864 done
865 IFS="$ac_save_ifs"
866fi
867fi
868YACC="$ac_cv_prog_YACC"
869if test -n "$YACC"; then
870 echo "$ac_t""$YACC" 1>&6
871else
872 echo "$ac_t""no" 1>&6
873fi
874
875test -n "$YACC" && break
876done
877test -n "$YACC" || YACC="yacc"
878
5436fc65
C
879
880ac_aux_dir=
881for ac_dir in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/..; do
882 if test -f $ac_dir/install-sh; then
883 ac_aux_dir=$ac_dir
884 ac_install_sh="$ac_aux_dir/install-sh -c"
885 break
886 elif test -f $ac_dir/install.sh; then
887 ac_aux_dir=$ac_dir
888 ac_install_sh="$ac_aux_dir/install.sh -c"
889 break
890 fi
891done
892if test -z "$ac_aux_dir"; then
893 { echo "configure: error: can not find install-sh or install.sh in `cd $srcdir;pwd`/.. $srcdir/`cd $srcdir;pwd`/.." 1>&2; exit 1; }
894fi
895ac_config_guess=$ac_aux_dir/config.guess
896ac_config_sub=$ac_aux_dir/config.sub
897ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
898
899
900# Do some error checking and defaulting for the host and target type.
901# The inputs are:
902# configure --host=HOST --target=TARGET --build=BUILD NONOPT
903#
904# The rules are:
905# 1. You are not allowed to specify --host, --target, and nonopt at the
906# same time.
907# 2. Host defaults to nonopt.
908# 3. If nonopt is not specified, then host defaults to the current host,
909# as determined by config.guess.
910# 4. Target and build default to nonopt.
911# 5. If nonopt is not specified, then target and build default to host.
912
913# The aliases save the names the user supplied, while $host etc.
914# will get canonicalized.
915case $host---$target---$nonopt in
916NONE---*---* | *---NONE---* | *---*---NONE) ;;
917*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
918esac
919
920
921# Make sure we can run config.sub.
922if $ac_config_sub sun4 >/dev/null 2>&1; then :
923else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
924fi
925
926echo $ac_n "checking host system type""... $ac_c" 1>&6
927
928host_alias=$host
929case "$host_alias" in
930NONE)
931 case $nonopt in
932 NONE)
933 if host_alias=`$ac_config_guess`; then :
934 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
935 fi ;;
936 *) host_alias=$nonopt ;;
937 esac ;;
938esac
939
940host=`$ac_config_sub $host_alias`
941host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
942host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
943host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
944echo "$ac_t""$host" 1>&6
945
946echo $ac_n "checking target system type""... $ac_c" 1>&6
947
948target_alias=$target
949case "$target_alias" in
950NONE)
951 case $nonopt in
952 NONE) target_alias=$host_alias ;;
953 *) target_alias=$nonopt ;;
954 esac ;;
955esac
956
957target=`$ac_config_sub $target_alias`
958target_cpu=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
959target_vendor=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
960target_os=`echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
961echo "$ac_t""$target" 1>&6
962
963echo $ac_n "checking build system type""... $ac_c" 1>&6
964
965build_alias=$build
966case "$build_alias" in
967NONE)
968 case $nonopt in
969 NONE) build_alias=$host_alias ;;
970 *) build_alias=$nonopt ;;
971 esac ;;
972esac
973
974build=`$ac_config_sub $build_alias`
975build_cpu=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
976build_vendor=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
977build_os=`echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
978echo "$ac_t""$build" 1>&6
979
980test "$host_alias" != "$target_alias" &&
981 test "$program_prefix$program_suffix$program_transform_name" = \
982 NONENONEs,x,x, &&
983 program_prefix=${target_alias}-
984
985if test "$program_transform_name" = s,x,x,; then
986 program_transform_name=
987else
988 # Double any \ or $.
989 echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
990 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
991 rm -f conftestsed
992fi
993test "$program_prefix" != NONE &&
994 program_transform_name="s,^,${program_prefix},; $program_transform_name"
995# Use a double $ so make ignores it.
996test "$program_suffix" != NONE &&
997 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
998
999# sed with no file args requires a program.
1000test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1001
1002
2b576293
C
1003# If we cannot run a trivial program, we must be cross compiling.
1004echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
1005if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
1006 echo $ac_n "(cached) $ac_c" 1>&6
1007else
1008 if test "$cross_compiling" = yes; then
1009 ac_cv_c_cross=yes
1010else
1011cat > conftest.$ac_ext <<EOF
188c635f 1012#line 1013 "configure"
2b576293
C
1013#include "confdefs.h"
1014main(){return(0);}
1015EOF
1016eval $ac_link
1017if test -s conftest && (./conftest; exit) 2>/dev/null; then
1018 ac_cv_c_cross=no
1019else
1020 ac_cv_c_cross=yes
1021fi
1022fi
1023rm -fr conftest*
1024fi
188c635f 1025
3067858d 1026echo "$ac_t""$ac_cv_c_cross" 1>&6
188c635f 1027cross_compiling=$ac_cv_c_cross
2b576293
C
1028
1029echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1030if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1031 echo $ac_n "(cached) $ac_c" 1>&6
1032else
1033 cat > conftest.$ac_ext <<EOF
188c635f 1034#line 1035 "configure"
2b576293
C
1035#include "confdefs.h"
1036#include <stdlib.h>
1037#include <stdarg.h>
1038#include <string.h>
1039#include <float.h>
1040EOF
1041eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1042ac_err=`grep -v '^ *+' conftest.out`
1043if test -z "$ac_err"; then
1044 rm -rf conftest*
1045 ac_cv_header_stdc=yes
1046else
1047 echo "$ac_err" >&5
1048 rm -rf conftest*
1049 ac_cv_header_stdc=no
1050fi
1051rm -f conftest*
1052
1053if test $ac_cv_header_stdc = yes; then
1054 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1055cat > conftest.$ac_ext <<EOF
188c635f 1056#line 1057 "configure"
2b576293
C
1057#include "confdefs.h"
1058#include <string.h>
1059EOF
1060if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1061 egrep "memchr" >/dev/null 2>&1; then
1062 :
1063else
1064 rm -rf conftest*
1065 ac_cv_header_stdc=no
1066fi
1067rm -f conftest*
1068
1069fi
1070
1071if test $ac_cv_header_stdc = yes; then
1072 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1073cat > conftest.$ac_ext <<EOF
188c635f 1074#line 1075 "configure"
2b576293
C
1075#include "confdefs.h"
1076#include <stdlib.h>
1077EOF
1078if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1079 egrep "free" >/dev/null 2>&1; then
1080 :
1081else
1082 rm -rf conftest*
1083 ac_cv_header_stdc=no
1084fi
1085rm -f conftest*
1086
1087fi
1088
1089if test $ac_cv_header_stdc = yes; then
1090 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1091if test "$cross_compiling" = yes; then
1092 ac_cv_header_stdc=no
1093else
1094cat > conftest.$ac_ext <<EOF
188c635f 1095#line 1096 "configure"
2b576293
C
1096#include "confdefs.h"
1097#include <ctype.h>
1098#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1099#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
1100#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
1101int main () { int i; for (i = 0; i < 256; i++)
1102if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1103exit (0); }
1104
1105EOF
1106eval $ac_link
1107if test -s conftest && (./conftest; exit) 2>/dev/null; then
1108 :
1109else
1110 ac_cv_header_stdc=no
1111fi
1112fi
1113rm -fr conftest*
1114fi
1115fi
188c635f 1116
2b576293
C
1117echo "$ac_t""$ac_cv_header_stdc" 1>&6
1118if test $ac_cv_header_stdc = yes; then
1119 cat >> confdefs.h <<\EOF
1120#define STDC_HEADERS 1
1121EOF
1122
1123fi
1124
dedcc91d 1125for ac_hdr in memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h
1a494973
C
1126do
1127ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
1128echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1129if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1130 echo $ac_n "(cached) $ac_c" 1>&6
1131else
1132 cat > conftest.$ac_ext <<EOF
188c635f 1133#line 1134 "configure"
1a494973
C
1134#include "confdefs.h"
1135#include <$ac_hdr>
1136EOF
1137eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1138ac_err=`grep -v '^ *+' conftest.out`
1139if test -z "$ac_err"; then
1140 rm -rf conftest*
1141 eval "ac_cv_header_$ac_safe=yes"
1142else
1143 echo "$ac_err" >&5
1144 rm -rf conftest*
1145 eval "ac_cv_header_$ac_safe=no"
1146fi
1147rm -f conftest*
1148fi
1149if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1150 echo "$ac_t""yes" 1>&6
188c635f 1151 ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdedfghijklmnopqrstuvwxyz./\055' 'ABCDEDFGHIJKLMNOPQRSTUVWXYZ___'`
1a494973
C
1152 cat >> confdefs.h <<EOF
1153#define $ac_tr_hdr 1
1154EOF
1155
1156else
1157 echo "$ac_t""no" 1>&6
1158fi
1159done
1160
2b576293
C
1161echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6
1162if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then
1163 echo $ac_n "(cached) $ac_c" 1>&6
1164else
1165 cat > conftest.$ac_ext <<EOF
188c635f 1166#line 1167 "configure"
2b576293
C
1167#include "confdefs.h"
1168#include <sys/types.h>
1169#include <sys/stat.h>
1170
1171#if defined(S_ISBLK) && defined(S_IFDIR)
1172# if S_ISBLK (S_IFDIR)
1173You lose.
1174# endif
1175#endif
1176
1177#if defined(S_ISBLK) && defined(S_IFCHR)
1178# if S_ISBLK (S_IFCHR)
1179You lose.
1180# endif
1181#endif
1182
1183#if defined(S_ISLNK) && defined(S_IFREG)
1184# if S_ISLNK (S_IFREG)
1185You lose.
1186# endif
1187#endif
1188
1189#if defined(S_ISSOCK) && defined(S_IFREG)
1190# if S_ISSOCK (S_IFREG)
1191You lose.
1192# endif
1193#endif
1194
1195EOF
1196if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1197 egrep "You lose" >/dev/null 2>&1; then
1198 rm -rf conftest*
1199 ac_cv_header_stat_broken=yes
1200else
1201 rm -rf conftest*
1202 ac_cv_header_stat_broken=no
1203fi
1204rm -f conftest*
1205
1206fi
188c635f 1207
2b576293
C
1208echo "$ac_t""$ac_cv_header_stat_broken" 1>&6
1209if test $ac_cv_header_stat_broken = yes; then
1210 cat >> confdefs.h <<\EOF
1211#define STAT_MACROS_BROKEN 1
1212EOF
1213
1214fi
1215
1216
1217echo $ac_n "checking for working mmap""... $ac_c" 1>&6
1218if eval "test \"`echo '$''{'ac_cv_func_mmap'+set}'`\" = set"; then
1219 echo $ac_n "(cached) $ac_c" 1>&6
1220else
1221 if test "$cross_compiling" = yes; then
1222 ac_cv_func_mmap=no
1223else
1224cat > conftest.$ac_ext <<EOF
188c635f 1225#line 1226 "configure"
2b576293
C
1226#include "confdefs.h"
1227
1228/* Thanks to Mike Haertel and Jim Avera for this test. */
1229#include <sys/types.h>
1230#include <fcntl.h>
1231#include <sys/mman.h>
1232
1233#ifdef BSD
1234# ifndef BSD4_1
1235# define HAVE_GETPAGESIZE
1236# endif
1237#endif
1238
1239#ifndef HAVE_GETPAGESIZE
1240# include <sys/param.h>
1241# ifdef EXEC_PAGESIZE
1242# define getpagesize() EXEC_PAGESIZE
1243# else
1244# ifdef NBPG
1245# define getpagesize() NBPG * CLSIZE
1246# ifndef CLSIZE
1247# define CLSIZE 1
1248# endif
1249# else
1250# ifdef NBPC
1251# define getpagesize() NBPC
1252# else
1253# define getpagesize() PAGESIZE /* SVR4 */
1254# endif
1255# endif
1256# endif
1257#endif
1258
1259#ifdef __osf__
1260# define valloc malloc
1261#endif
1262
1263#ifdef __cplusplus
1264extern "C" { void *valloc(unsigned), *malloc(unsigned); }
1265#else
1266char *valloc(), *malloc();
1267#endif
1268
1269int
1270main()
1271{
1272 char *buf1, *buf2, *buf3;
1273 int i = getpagesize(), j;
1274 int i2 = getpagesize()*2;
1275 int fd;
1276
1277 buf1 = (char *)valloc(i2);
1278 buf2 = (char *)valloc(i);
1279 buf3 = (char *)malloc(i2);
1280 for (j = 0; j < i2; ++j)
1281 *(buf1 + j) = rand();
1282 fd = open("conftestmmap", O_CREAT | O_RDWR, 0666);
1283 write(fd, buf1, i2);
1284 mmap(buf2, i, PROT_READ | PROT_WRITE, MAP_FIXED | MAP_PRIVATE, fd, 0);
1285 for (j = 0; j < i; ++j)
1286 if (*(buf1 + j) != *(buf2 + j))
1287 exit(1);
1288 lseek(fd, (long)i, 0);
1289 read(fd, buf2, i); /* read into mapped memory -- file should not change */
1290 /* (it does in i386 SVR4.0 - Jim Avera, jima@netcom.com) */
1291 lseek(fd, (long)0, 0);
1292 read(fd, buf3, i2);
1293 for (j = 0; j < i2; ++j)
1294 if (*(buf1 + j) != *(buf3 + j))
1295 exit(1);
1296 exit(0);
1297}
1298
1299EOF
1300eval $ac_link
1301if test -s conftest && (./conftest; exit) 2>/dev/null; then
1302 ac_cv_func_mmap=yes
1303else
1304 ac_cv_func_mmap=no
1305fi
1306fi
1307rm -fr conftest*
1308fi
188c635f 1309
2b576293
C
1310echo "$ac_t""$ac_cv_func_mmap" 1>&6
1311if test $ac_cv_func_mmap = yes; then
1312 cat >> confdefs.h <<\EOF
1313#define HAVE_MMAP 1
1314EOF
1315
1316fi
1317
5436fc65
C
1318
1319ENABLE_CFLAGS=
1320ENABLE_CLIBS=
1321ENABLE_OBS=
1322
1323# Check whether --enable-netrom or --disable-netrom was given.
188c635f
SG
1324if test "${enable_netrom+set}" = set; then
1325 enableval="$enable_netrom"
5436fc65
C
1326 case "${enableval}" in
1327yes) enable_netrom=yes ;;
1328no) enable_netrom=no ;;
1329*) { echo "configure: error: bad value ${enableval} given for netrom option" 1>&2; exit 1; } ;;
1330esac
1331fi
1332
1333
1334if test "${enable_netrom}" = "yes"; then
1335 ENABLE_OBS="${ENABLE_OBS} remote-nrom.o"
1336fi
1337
188c635f
SG
1338# start-sanitize-gm
1339ENABLE_GM=
1340
1341# Check whether --enable-gm or --disable-gm was given.
1342if test "${enable_gm+set}" = set; then
1343 enableval="$enable_gm"
1344 case "${enableval}" in
1345yes) ENABLE_OBS="${ENABLE_OBS} magic.o"
1346 ENABLE_CFLAGS=-DGENERAL_MAGIC
1347 ;;
1348no) ;;
1349*) { echo "configure: error: bad value ${enableval} given for gm option" 1>&2; exit 1; } ;;
1350esac
1351fi
1352
1353
1354# end-sanitize-gm
1355
5436fc65
C
1356# start-sanitize-gdbtk
1357ENABLE_GDBTK=
1358
1359# Check whether --enable-gdbtk or --disable-gdbtk was given.
188c635f
SG
1360if test "${enable_gdbtk+set}" = set; then
1361 enableval="$enable_gdbtk"
5436fc65
C
1362 case "${enableval}" in
1363yes) enable_gdbtk=yes ;;
1364no) enable_gdbtk=no ;;
1365*) { echo "configure: error: bad value ${enableval} given for gdbtk option" 1>&2; exit 1; } ;;
1366esac
1367fi
1368
1369
1370if test "${enable_gdbtk}" = "yes"; then
a2b63bbd 1371 # If we find X, set shell vars x_includes and x_libraries to the
5436fc65
C
1372# paths, otherwise set no_x=yes.
1373# Uses ac_ vars as temps to allow command line to override cache and checks.
1374# --without-x overrides everything else, but does not touch the cache.
1375echo $ac_n "checking for X""... $ac_c" 1>&6
1376
1377# Check whether --with-x or --without-x was given.
188c635f
SG
1378if test "${with_x+set}" = set; then
1379 withval="$with_x"
5436fc65
C
1380 :
1381fi
1382
1383if test "x$with_x" = xno; then
1384 no_x=yes
1385else
1386 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
1387 no_x=
1388 else
1389if eval "test \"`echo '$''{'ac_cv_path_x'+set}'`\" = set"; then
1390 echo $ac_n "(cached) $ac_c" 1>&6
1391else
1392 # One or both of the vars are not set, and there is no cached value.
1393no_x=yes
1394rm -fr conftestdir
1395if mkdir conftestdir; then
1396 cd conftestdir
1397 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
1398 cat > Imakefile <<'EOF'
1399acfindx:
1400 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
1401EOF
1402 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
1403 no_x=
1404 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1405 eval `make acfindx 2>/dev/null | grep -v make`
1406 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
dedcc91d
SC
1407 for ac_extension in a so sl; do
1408 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
1409 test -f $ac_im_libdir/libX11.$ac_extension; then
1410 ac_im_usrlibdir=$ac_im_libdir; break
1411 fi
1412 done
5436fc65
C
1413 # Screen out bogus values from the imake configuration.
1414 case "$ac_im_incroot" in
1415 /usr/include) ;;
1416 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
1417 esac
1418 case "$ac_im_usrlibdir" in
1419 /usr/lib | /lib) ;;
1420 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
1421 esac
1422 fi
1423 cd ..
1424 rm -fr conftestdir
1425fi
1426
1427if test "$no_x" = yes; then
1428test -z "$x_direct_test_library" && x_direct_test_library=Xt
1429test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
1430test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
1431cat > conftest.$ac_ext <<EOF
188c635f 1432#line 1433 "configure"
5436fc65
C
1433#include "confdefs.h"
1434#include <$x_direct_test_include>
1435EOF
1436eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1437ac_err=`grep -v '^ *+' conftest.out`
1438if test -z "$ac_err"; then
1439 rm -rf conftest*
1440 no_x= ac_x_includes=
1441else
1442 echo "$ac_err" >&5
1443 rm -rf conftest*
1444 for ac_dir in \
1445 /usr/X11R6/include \
1446 /usr/X11R5/include \
1447 /usr/X11R4/include \
1448 \
1449 /usr/include/X11R6 \
1450 /usr/include/X11R5 \
1451 /usr/include/X11R4 \
1452 \
1453 /usr/local/X11R6/include \
1454 /usr/local/X11R5/include \
1455 /usr/local/X11R4/include \
1456 \
1457 /usr/local/include/X11R6 \
1458 /usr/local/include/X11R5 \
1459 /usr/local/include/X11R4 \
1460 \
1461 /usr/X11/include \
1462 /usr/include/X11 \
1463 /usr/local/X11/include \
1464 /usr/local/include/X11 \
1465 \
1466 /usr/X386/include \
1467 /usr/x386/include \
1468 /usr/XFree86/include/X11 \
1469 \
1470 /usr/include \
1471 /usr/local/include \
1472 /usr/unsupported/include \
1473 /usr/athena/include \
1474 /usr/local/x11r5/include \
1475 /usr/lpp/Xamples/include \
1476 \
1477 /usr/openwin/include \
1478 /usr/openwin/share/include \
1479 ; \
1480 do
1481 if test -r "$ac_dir/$x_direct_test_include"; then
1482 no_x= ac_x_includes=$ac_dir
1483 break
1484 fi
1485 done
1486fi
1487rm -f conftest*
1488
1489# Check for the libraries.
1490# See if we find them without any special options.
1491# Don't add to $LIBS permanently.
1492ac_save_LIBS="$LIBS"
1493LIBS="-l$x_direct_test_library $LIBS"
1494cat > conftest.$ac_ext <<EOF
188c635f 1495#line 1496 "configure"
5436fc65
C
1496#include "confdefs.h"
1497
1498int main() { return 0; }
1499int t() {
1500${x_direct_test_function}()
1501; return 0; }
1502EOF
1503if eval $ac_link; then
1504 rm -rf conftest*
1505 LIBS="$ac_save_LIBS" no_x= ac_x_libraries=
1506else
1507 rm -rf conftest*
1508 LIBS="$ac_save_LIBS"
1509# First see if replacing the include by lib works.
1510for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
1511 /usr/X11R6/lib \
1512 /usr/X11R5/lib \
1513 /usr/X11R4/lib \
1514 \
1515 /usr/lib/X11R6 \
1516 /usr/lib/X11R5 \
1517 /usr/lib/X11R4 \
1518 \
1519 /usr/local/X11R6/lib \
1520 /usr/local/X11R5/lib \
1521 /usr/local/X11R4/lib \
1522 \
1523 /usr/local/lib/X11R6 \
1524 /usr/local/lib/X11R5 \
1525 /usr/local/lib/X11R4 \
1526 \
1527 /usr/X11/lib \
1528 /usr/lib/X11 \
1529 /usr/local/X11/lib \
1530 /usr/local/lib/X11 \
1531 \
1532 /usr/X386/lib \
1533 /usr/x386/lib \
1534 /usr/XFree86/lib/X11 \
1535 \
1536 /usr/lib \
1537 /usr/local/lib \
1538 /usr/unsupported/lib \
1539 /usr/athena/lib \
1540 /usr/local/x11r5/lib \
1541 /usr/lpp/Xamples/lib \
1542 \
1543 /usr/openwin/lib \
1544 /usr/openwin/share/lib \
1545 ; \
1546do
1547 for ac_extension in a so sl; do
1548 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
1549 no_x= ac_x_libraries=$ac_dir
1550 break 2
1551 fi
1552 done
1553done
1554fi
1555rm -f conftest*
1556
1557fi
1558if test "$no_x" = yes; then
1559 ac_cv_path_x="no_x=yes"
1560else
1561 ac_cv_path_x="no_x= ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
1562fi
1563fi
1564 fi
1565 eval "$ac_cv_path_x"
1566fi # $with_x != no
1567
1568if test "$no_x" = yes; then
1569 echo "$ac_t""no" 1>&6
1570else
1571 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
1572 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
1573 ac_cv_path_x="no_x= ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
1574 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
1575fi
1576
a2b63bbd 1577 if test "$no_x" = yes; then
5436fc65
C
1578 # Not all programs may use this symbol, but it does not hurt to define it.
1579 X_CFLAGS="$X_CFLAGS -DX_DISPLAY_MISSING"
1580else
1581 if test -n "$x_includes"; then
1582 X_CFLAGS="$X_CFLAGS -I$x_includes"
1583 fi
1584
1585 # It would be nice to have a more robust check for the -R ld option than
1586 # just checking for Solaris.
1587 # It would also be nice to do this for all -L options, not just this one.
1588 if test -n "$x_libraries"; then
1589 X_LIBS="$X_LIBS -L$x_libraries"
1590 if test "`(uname) 2>/dev/null`" = SunOS &&
1591 uname -r | grep '^5' >/dev/null; then
1592 X_LIBS="$X_LIBS -R$x_libraries"
1593 fi
1594 fi
1595
1596 # Check for libraries that X11R6 Xt/Xaw programs need.
1597
1598 ac_save_LDFLAGS="$LDFLAGS"
1599 LDFLAGS="$LDFLAGS -L$x_libraries"
1600 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
1601 # check for ICE first), but we must link in the order -lSM -lICE or
1602 # we get undefined symbols. So assume we have SM if we have ICE.
1603 # These have to be linked with before -lX11, unlike the other
1604 # libraries we check for below, so use a different variable.
1605 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
1606 echo $ac_n "checking for -lICE""... $ac_c" 1>&6
188c635f
SG
1607ac_lib_var=`echo ICE | tr '+./' 'p__'`
1608if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1609 echo $ac_n "(cached) $ac_c" 1>&6
1610else
1611 ac_save_LIBS="$LIBS"
1612LIBS="-lICE $LIBS"
1613cat > conftest.$ac_ext <<EOF
188c635f 1614#line 1615 "configure"
5436fc65
C
1615#include "confdefs.h"
1616
1617int main() { return 0; }
1618int t() {
1619IceConnectionNumber()
1620; return 0; }
1621EOF
1622if eval $ac_link; then
1623 rm -rf conftest*
188c635f 1624 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1625else
1626 rm -rf conftest*
188c635f 1627 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1628fi
1629rm -f conftest*
1630LIBS="$ac_save_LIBS"
1631
1632fi
188c635f 1633if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1634 echo "$ac_t""yes" 1>&6
1635 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
1636else
1637 echo "$ac_t""no" 1>&6
1638fi
1639
1640 LDFLAGS="$ac_save_LDFLAGS"
1641
1642 # Check for system-dependent libraries X programs must link with.
1643
1644 if test "$ISC" = yes; then
1645 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
1646 else
1647 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
1648 # libraries were built with DECnet support. And karl@cs.umb.edu says
1649 # the Alpha needs dnet_stub (dnet does not exist).
1650 echo $ac_n "checking for -ldnet""... $ac_c" 1>&6
188c635f
SG
1651ac_lib_var=`echo dnet | tr '+./' 'p__'`
1652if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1653 echo $ac_n "(cached) $ac_c" 1>&6
1654else
1655 ac_save_LIBS="$LIBS"
1656LIBS="-ldnet $LIBS"
1657cat > conftest.$ac_ext <<EOF
188c635f 1658#line 1659 "configure"
5436fc65
C
1659#include "confdefs.h"
1660
1661int main() { return 0; }
1662int t() {
1663dnet_ntoa()
1664; return 0; }
1665EOF
1666if eval $ac_link; then
1667 rm -rf conftest*
188c635f 1668 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1669else
1670 rm -rf conftest*
188c635f 1671 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1672fi
1673rm -f conftest*
1674LIBS="$ac_save_LIBS"
1675
1676fi
188c635f 1677if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1678 echo "$ac_t""yes" 1>&6
1679 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
1680else
1681 echo "$ac_t""no" 1>&6
1682fi
1683
1684 if test $ac_cv_lib_dnet = no; then
1685 echo $ac_n "checking for -ldnet_stub""... $ac_c" 1>&6
188c635f
SG
1686ac_lib_var=`echo dnet_stub | tr '+./' 'p__'`
1687if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1688 echo $ac_n "(cached) $ac_c" 1>&6
1689else
1690 ac_save_LIBS="$LIBS"
1691LIBS="-ldnet_stub $LIBS"
1692cat > conftest.$ac_ext <<EOF
188c635f 1693#line 1694 "configure"
5436fc65
C
1694#include "confdefs.h"
1695
1696int main() { return 0; }
1697int t() {
1698dnet_ntoa()
1699; return 0; }
1700EOF
1701if eval $ac_link; then
1702 rm -rf conftest*
188c635f 1703 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1704else
1705 rm -rf conftest*
188c635f 1706 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1707fi
1708rm -f conftest*
1709LIBS="$ac_save_LIBS"
1710
1711fi
188c635f 1712if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1713 echo "$ac_t""yes" 1>&6
1714 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
1715else
1716 echo "$ac_t""no" 1>&6
1717fi
1718
1719 fi
1720
1721 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
1722 # to get the SysV transport functions.
1723 # Not sure which flavor of 386 UNIX this is, but it seems harmless to
1724 # check for it.
1725 echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
188c635f
SG
1726ac_lib_var=`echo nsl | tr '+./' 'p__'`
1727if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1728 echo $ac_n "(cached) $ac_c" 1>&6
1729else
1730 ac_save_LIBS="$LIBS"
1731LIBS="-lnsl $LIBS"
1732cat > conftest.$ac_ext <<EOF
188c635f 1733#line 1734 "configure"
5436fc65
C
1734#include "confdefs.h"
1735
1736int main() { return 0; }
1737int t() {
1738t_accept()
1739; return 0; }
1740EOF
1741if eval $ac_link; then
1742 rm -rf conftest*
188c635f 1743 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1744else
1745 rm -rf conftest*
188c635f 1746 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1747fi
1748rm -f conftest*
1749LIBS="$ac_save_LIBS"
1750
1751fi
188c635f 1752if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1753 echo "$ac_t""yes" 1>&6
1754 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
1755else
1756 echo "$ac_t""no" 1>&6
1757fi
1758
1759
1760 # lieder@skyler.mavd.honeywell.com says without -lsocket,
1761 # socket/setsockopt and other routines are undefined under SCO ODT 2.0.
1762 # But -lsocket is broken on IRIX, according to simon@lia.di.epfl.ch.
1763 if test "`(uname) 2>/dev/null`" != IRIX; then
1764 echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
188c635f
SG
1765ac_lib_var=`echo socket | tr '+./' 'p__'`
1766if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5436fc65
C
1767 echo $ac_n "(cached) $ac_c" 1>&6
1768else
1769 ac_save_LIBS="$LIBS"
1770LIBS="-lsocket $LIBS"
1771cat > conftest.$ac_ext <<EOF
188c635f 1772#line 1773 "configure"
5436fc65
C
1773#include "confdefs.h"
1774
1775int main() { return 0; }
1776int t() {
1777socket()
1778; return 0; }
1779EOF
1780if eval $ac_link; then
1781 rm -rf conftest*
188c635f 1782 eval "ac_cv_lib_$ac_lib_var=yes"
5436fc65
C
1783else
1784 rm -rf conftest*
188c635f 1785 eval "ac_cv_lib_$ac_lib_var=no"
5436fc65
C
1786fi
1787rm -f conftest*
1788LIBS="$ac_save_LIBS"
1789
1790fi
188c635f 1791if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5436fc65
C
1792 echo "$ac_t""yes" 1>&6
1793 X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket"
1794else
1795 echo "$ac_t""no" 1>&6
1796fi
1797
1798 fi
1799 fi
1800fi
1801
1802
a2b63bbd 1803
5436fc65
C
1804#
1805# Ok, lets find the tk source trees so we can use the headers
1806# If the directory (presumably symlink) named "tk" exists, use that one
1807# in preference to any others. Same logic is used when choosing library
1808# and again with Tcl.
1809#
1810echo "checking for Tk source directory" 1>&6
1811TKHDIR=""
1812for i in `ls -d ${srcdir}/../tk* 2>/dev/null` ${srcdir}/../tk ; do
1813 if test -f $i/tk.h ; then
1814 TKHDIR="-I$i"
1815 fi
1816done
1817# if we can't find it, see if one is installed
1818if test x"$TKHDIR" = x ; then
1819 installed=0
1820 if test -f $prefix/include/tk.h; then
1821 installed=1 TKHDIR="-I$prefix/include"
1822 else
1823 ac_safe=`echo "tk.h" | tr './\055' '___'`
1824echo $ac_n "checking for tk.h""... $ac_c" 1>&6
1825if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1826 echo $ac_n "(cached) $ac_c" 1>&6
1827else
1828 cat > conftest.$ac_ext <<EOF
188c635f 1829#line 1830 "configure"
5436fc65
C
1830#include "confdefs.h"
1831#include <tk.h>
1832EOF
1833eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1834ac_err=`grep -v '^ *+' conftest.out`
1835if test -z "$ac_err"; then
1836 rm -rf conftest*
1837 eval "ac_cv_header_$ac_safe=yes"
1838else
1839 echo "$ac_err" >&5
1840 rm -rf conftest*
1841 eval "ac_cv_header_$ac_safe=no"
1842fi
1843rm -f conftest*
1844fi
1845if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1846 echo "$ac_t""yes" 1>&6
1847 installed=1
1848else
1849 echo "$ac_t""no" 1>&6
1850fi
1851
1852 fi
1853 if test $installed -eq 0 ; then
1854 TKHDIR="# no Tk directory found"
1855 echo "configure: warning: Can't find Tk directory" 1>&2
1856 fi
1857fi
1858if test x"$TKHDIR" != x ; then
1859 echo "$ac_t""Setting TKHDIR to be $i" 1>&6
1860fi
1861
1862#
1863# Ok, lets find the tk library
1864# First, look for one uninstalled.
1865#
1866TKLIB=""
1867echo "checking for Tk library" 1>&6
1868for i in `ls -d ../tk* 2>/dev/null` ../tk ; do
1869 if test -f "$i/Makefile" ; then
1870 TKLIB=$i/libtk.a
1871 fi
1872done
1873# If not found, look for installed version
1874if test x"$TKLIB" = x ; then
1875 if test -f $prefix/lib/libtk.a; then
1876 installed=1
1877 else
1878 installed=0
1879 fi
1880 if test $installed -eq 1 ; then
1881 TKLIB="-ltk"
1882 fi
1883fi
1884
1885# If still not found, assume Tk simply hasn't been built yet
1886if test x"$TKLIB" = x ; then
1887 for i in `ls -d ../tk* 2>/dev/null` ../tk ; do
1888 if test -f "$i/tk.h" ; then
1889 TKLIB=$i/libtk.a
1890 fi
1891 done
1892fi
1893
1894if test x"$TKLIB" = x ; then
1895 TKLIB="# no Tk library found"
1896 echo "configure: warning: Can't find Tk library" 1>&2
1897else
1898 echo "$ac_t""setting TKLIB to be $TKLIB" 1>&6
1899 no_tk=
1900fi
1901
1902
1903
1904
a2b63bbd 1905
5436fc65
C
1906#
1907# Ok, lets find the tcl source trees so we can use the headers
1908#
1909# Warning: transition of version 9 to 10 will break this algorithm
1910# because 10 sorts before 9.
1911#
1912echo "checking for Tcl source directory" 1>&6
1913TCLHDIR=""
1914for i in `ls -d ${srcdir}/../tcl* 2>/dev/null` ${srcdir}/../tcl ; do
1915 if test -f $i/tclInt.h ; then
1916 TCLHDIR="-I$i"
1917 fi
1918done
1919# if we can't find it, see if one is installed
1920if test x"$TCLHDIR" = x ; then
1921 installed=0
1922 if test -f $prefix/include/tclInt.h; then
1923 installed=1 TCLHDIR="-I$prefix/include"
1924 else
1925 ac_safe=`echo "tclInt.h" | tr './\055' '___'`
1926echo $ac_n "checking for tclInt.h""... $ac_c" 1>&6
1927if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1928 echo $ac_n "(cached) $ac_c" 1>&6
1929else
1930 cat > conftest.$ac_ext <<EOF
188c635f 1931#line 1932 "configure"
5436fc65
C
1932#include "confdefs.h"
1933#include <tclInt.h>
1934EOF
1935eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1936ac_err=`grep -v '^ *+' conftest.out`
1937if test -z "$ac_err"; then
1938 rm -rf conftest*
1939 eval "ac_cv_header_$ac_safe=yes"
1940else
1941 echo "$ac_err" >&5
1942 rm -rf conftest*
1943 eval "ac_cv_header_$ac_safe=no"
1944fi
1945rm -f conftest*
1946fi
1947if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1948 echo "$ac_t""yes" 1>&6
1949 installed=1
1950else
1951 echo "$ac_t""no" 1>&6
1952fi
1953
1954 fi
1955 if test $installed -eq 0 ; then
1956 TCLHDIR="# no Tcl directory found"
1957 echo "configure: warning: Can't find Tcl directory" 1>&2
1958 fi
1959else
1960 echo "$ac_t""setting TCLHDIR to be $i" 1>&6
1961fi
1962
1963#
1964# Ok, lets find the tcl library
1965# First, look for the latest uninstalled
1966#
1967TCLLIB=""
1968echo "checking for Tcl library" 1>&6
1969for i in `ls -d ../tcl* 2>/dev/null` ../tcl ; do
1970 if test -f "$i/Makefile" ; then
1971 TCLLIB=$i/libtcl.a
1972 fi
1973done
1974# If not found, look for installed version
1975if test x"$TCLLIB" = x ; then
1976 if test -f $prefix/lib/libtcl.a; then installed=1; else installed=0; fi
1977 if test $installed -eq 1 ; then
1978 TCLLIB="-ltcl"
1979 fi
1980fi
1981# If still not found, assume Tcl simply hasn't been built yet
1982if test x"$TCLLIB" = x ; then
1983 for i in `ls -d ../tcl* 2>/dev/null` ../tcl ; do
1984 if test -f "$i/tcl.h" ; then
1985 TCLLIB=$i/libtcl.a
1986 fi
1987 done
1988fi
1989
1990if test x"$TCLLIB" = x ; then
1991 TCLLIB="# no Tcl library found"
1992 echo "configure: warning: Can't find Tcl library" 1>&2
1993else
1994 echo "$ac_t""setting TCLLIB to be $TCLLIB" 1>&6
1995fi
1996
1997
1998
1999
2000
a2b63bbd 2001 ENABLE_GDBTK=1
66efdff9 2002
a2b63bbd
JM
2003 if test "x$no_x" != "xyes"; then
2004 if test "x$x_includes" != "x" ;
2005 then
2006 X_CFLAGS="-I$x_includes"
2007 else
2008 X_CFLAGS=""
2009 fi
2010
2011 if test "x$x_libraries" != "x" ;
2012 then
2013 X_LDFLAGS="-L$x_libraries"
2014 else
2015 X_LDFLAGS=""
2016 fi
2017
2018 case "$host" in
2019#
2020# gdb linked statically w/ Solaris iff GCC is used, otherwise dynamic
2021#
2022 sparc-sun-solaris2*)
2023 if test "x$GCC" = "xyes";
2024 then
2025 X_LIBS="-Wl,-Bstatic -lX11 -lXext -lX11 -Wl,-Bdynamic"
2026 else
2027 if test "x$x_libraries" != "x" ;
2028 then
2029 X_LDFLAGS="$X_LDFLAGS -R$x_libraries"
2030 fi
2031 X_LIBS="-lX11 -lXext -lX11"
2032 fi ;;
2033#
2034# gdb linked statically w/ SunOS or HPUX
2035#
2036 m68k-hp-hpux*|hppa*-hp-hpux*|sparc-sun-sunos*)
2037 if test "x$x_libraries" != "x" ;
2038 then
2039 X_LIBS="$x_libraries/libX11.a"
2040 else
2041 X_LIBS="/usr/lib/libX11.a"
2042 fi ;;
2043#
2044# default is to link dynamically
2045#
2046 *)
2047 X_LIBS="-lX11" ;;
2048 esac
2049 else
2050 X_LDLAGS=""
2051 X_CFLAGS=""
2052 X_LIBS=""
2053 echo "configure: warning: No X based programs will be built" 1>&2
2054 fi
2055
2056 TCL_LIBS='$(TCL) $(TK) $(X11_LDFLAGS) $(X11_LIBS)'
2057 ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS} -lm"
2058 ENABLE_OBS="${ENABLE_OBS} gdbtk.o"
2059fi
66efdff9 2060
66efdff9 2061
5436fc65 2062
66efdff9
JM
2063
2064
5436fc65
C
2065# end-sanitize-gdbtk
2066
2067
2068
2069
2070
2071
2072configdirs="doc testsuite"
2073
2074
2075# Map host cpu into the config cpu subdirectory name.
2076# The default is $host_cpu.
2077
2078case "${host_cpu}" in
2079
2080c[12]) gdb_host_cpu=convex ;;
2081hppa*) gdb_host_cpu=pa ;;
2082i[345]86) gdb_host_cpu=i386 ;;
2083m68*) gdb_host_cpu=m68k ;;
2084m88*) gdb_host_cpu=m88k ;;
2085np1) gdb_host_cpu=gould ;;
2086pyramid) gdb_host_cpu=pyr ;;
2087powerpc*) gdb_host_cpu=powerpc ;;
2088*) gdb_host_cpu=$host_cpu ;;
2089
2090esac
2091
2092# map host info into gdb names.
2093
2094case "${host}" in
2095
2096a29k-*-*) gdb_host=ultra3 ;;
2097
2098alpha-*-osf1*) gdb_host=alpha-osf1 ;;
b8ea4fec
PS
2099alpha-*-osf2*) gdb_host=alpha-osf2 ;;
2100alpha-*-osf[3456789]*) gdb_host=alpha-osf3 ;;
5436fc65
C
2101
2102arm-*-*) gdb_host=arm ;;
2103
2104c[12]-*-*) gdb_host=convex ;;
2105
2106hppa*-*-bsd*) gdb_host=hppabsd ;;
2107hppa*-*-hiux*) gdb_host=hppahpux ;;
2108hppa*-*-hpux*) gdb_host=hppahpux ;;
2109hppa*-*-osf*) gdb_host=hppaosf ;;
2110
2111i[345]86-ncr-*) gdb_host=ncr3000 ;;
2112i[345]86-sequent-bsd*) gdb_host=symmetry ;; # dynix
2113i[345]86-sequent-sysv4*) gdb_host=ptx4 ;;
2114i[345]86-sequent-sysv*) gdb_host=ptx ;;
2115i[345]86-*-aix*) gdb_host=i386aix ;;
2116i[345]86-*-bsd*) gdb_host=i386bsd ;;
2117i[345]86-*-freebsd*) gdb_host=fbsd ;;
2118i[345]86-*-netbsd*) gdb_host=nbsd ;;
2119i[345]86-*-go32*) gdb_host=go32 ;;
2120i[345]86-*-linux*) gdb_host=linux ;;
2121i[345]86-*-lynxos*) gdb_host=i386lynx ;;
2122i[345]86-*-mach3*) gdb_host=i386m3 ;;
2123i[345]86-*-mach*) gdb_host=i386mach ;;
2124i[345]86-*-osf1mk*) gdb_host=osf1mk ;;
2125i[345]86-*-sco3.2v4*) gdb_host=i386sco4 ;;
2126i[345]86-*-sco*) gdb_host=i386sco ;;
2127i[345]86-*-solaris*) gdb_host=i386sol2 ;;
2128i[345]86-*-sunos*) gdb_host=sun386 ;;
2129i[345]86-*-sysv3.2*) gdb_host=i386v32 ;;
2130i[345]86-*-sysv32*) gdb_host=i386v32 ;;
2131i[345]86-*-sysv4*) gdb_host=i386v4 ;;
2132i[345]86-*-unixware) gdb_host=i386v4 ;;
2133i[345]86-*-sysv*) gdb_host=i386v ;;
2134i[345]86-*-isc*) gdb_host=i386v32 ;;
2135i[345]86-*-os9k) gdb_host=i386os9k ;;
24e60978 2136i[345]86-*-win32*) gdb_host=win32 ;;
5436fc65
C
2137m680[01]0-sun-sunos3*) gdb_host=sun2os3 ;;
2138m680[01]0-sun-sunos4*) gdb_host=sun2os4 ;;
2139m68030-sony-*) gdb_host=news1000 ;;
2140
2141m68*-altos-*) gdb_host=altos ;;
2142m68*-apollo*-sysv*) gdb_host=apollo68v ;;
2143m68*-apollo*-bsd*) gdb_host=apollo68b ;;
2144m68*-att-*) gdb_host=3b1 ;;
2145m68*-bull*-sysv*) gdb_host=dpx2 ;;
2146m68*-hp-bsd*) gdb_host=hp300bsd ;;
2147m68*-hp-hpux*) gdb_host=hp300hpux ;;
2148m68*-isi-*) gdb_host=isi ;;
2149m68*-*-lynxos*) gdb_host=m68klynx ;;
2150m68*-*-sysv4*) gdb_host=m68kv4 ;;
2151m68*-motorola-*) gdb_host=delta68 ;;
2152m68*-sony-*) gdb_host=news ;;
2153m68*-sun-sunos3*) gdb_host=sun3os3 ;;
2154m68*-sun-sunos4*) gdb_host=sun3os4 ;;
2155m68*-sun-*) gdb_host=sun3os4 ;;
2156
2157m88*-harris-cxux*) gdb_host=cxux ;;
2158m88*-motorola-sysv4*) gdb_host=delta88v4 ;;
2159m88*-motorola-sysv*) gdb_host=delta88 ;;
2160m88*-*-mach3*) gdb_host=mach3 ;;
2161m88*-*-*) gdb_host=m88k ;;
2162
2163mips-dec-mach3*) gdb_host=mach3 ;;
2164mips-dec-*) gdb_host=decstation ;;
2165mips-little-*) gdb_host=littlemips ;;
2166mips-sgi-irix3*) gdb_host=irix3 ;;
2167mips-sgi-irix4*) gdb_host=irix4 ;;
2168mips-sgi-irix5*) gdb_host=irix5 ;;
2169mips-sony-*) gdb_host=news-mips ;;
2170mips-*-mach3*) gdb_host=mach3 ;;
2171mips-*-sysv4*) gdb_host=mipsv4 ;;
2172mips-*-sysv*) gdb_host=riscos ;;
2173mips-*-riscos*) gdb_host=riscos ;;
2174
2175none-*-*) gdb_host=none ;;
2176
2177np1-*-*) gdb_host=np1 ;;
2178
2179ns32k-*-mach3*) gdb_host=mach3 ;;
2180ns32k-*-netbsd*) gdb_host=nbsd ;;
2181ns32k-umax-*) gdb_host=umax ;;
2182ns32k-utek-sysv*) gdb_host=merlin ;;
2183
fbc3f191
JL
2184powerpc-*-aix*) gdb_host=aix ;;
2185
5436fc65
C
2186pn-*-*) gdb_host=pn ;;
2187
2188pyramid-*-*) gdb_host=pyramid ;;
2189
2190romp-*-*) gdb_host=rtbsd ;;
2191
2192rs6000-*-lynxos*) gdb_host=rs6000lynx ;;
2193rs6000-*-*) gdb_host=rs6000 ;;
2194
2195sparc-*-lynxos*) gdb_host=sparclynx ;;
2196sparc-*-netbsd*) gdb_host=nbsd ;;
2197sparc-*-solaris2*) gdb_host=sun4sol2 ;;
2198sparc-*-sunos4*) gdb_host=sun4os4 ;;
2199sparc-*-sunos5*) gdb_host=sun4sol2 ;;
2200sparc-*-*) gdb_host=sun4os4 ;;
2201
2202tahoe-*-*) gdb_host=tahoe ;;
2203
2204vax-*-bsd*) gdb_host=vaxbsd ;;
2205vax-*-ultrix2*) gdb_host=vaxult2 ;;
2206vax-*-ultrix*) gdb_host=vaxult ;;
2207
2208w65-*-*) gdb_host=w65 ;;
2209
2210esac
2211
2212
2213# Map target cpu into the config cpu subdirectory name.
2214# The default is $target_cpu.
2215
2216case "${target_cpu}" in
2217
2218alpha) gdb_target_cpu=alpha ;;
2219c[12]) gdb_target_cpu=convex ;;
2220hppa*) gdb_target_cpu=pa ;;
2221i[345]86) gdb_target_cpu=i386 ;;
2222m68*) gdb_target_cpu=m68k ;;
2223m88*) gdb_target_cpu=m88k ;;
2224mips*) gdb_target_cpu=mips ;;
2225np1) gdb_target_cpu=gould ;;
2226powerpc*) gdb_target_cpu=powerpc ;;
2227pn) gdb_target_cpu=gould ;;
2228pyramid) gdb_target_cpu=pyr ;;
5436fc65
C
2229sparc*) gdb_target_cpu=sparc ;;
2230*) gdb_target_cpu=$target_cpu ;;
2231
2232esac
2233
2234# map target info into gdb names.
2235
2236case "${target}" in
2237
2238a29k-*-aout*) gdb_target=a29k ;;
2239a29k-*-coff*) gdb_target=a29k ;;
2240a29k-*-elf*) gdb_target=a29k ;;
2241a29k-*-ebmon*) gdb_target=a29k ;;
2242a29k-*-kern*) gdb_target=a29k-kern ;;
2243a29k-*-none*) gdb_target=a29k ;;
2244a29k-*-sym1*) gdb_target=ultra3 ;;
2245a29k-*-udi*) gdb_target=a29k-udi ;;
2246a29k-*-vxworks*) gdb_target=vx29k ;;
2247
2248alpha-*-osf*) gdb_target=alpha-osf1 ;;
2249
2250# start-sanitize-arc
2251arc-*-*) gdb_target=arc ;;
2252# end-sanitize-arc
2253
2254arm-*-*) gdb_target=arm ;;
2255
2256c1-*-*) gdb_target=convex ;;
2257c2-*-*) gdb_target=convex ;;
2258
fb506180
SS
2259h8300-*-*) gdb_target=h8300 ;;
2260h8500-*-*) gdb_target=h8500 ;;
5436fc65
C
2261
2262sh-*-*) gdb_target=sh ;;
2263
2264# start-sanitize-r16
2265r16-*-*) gdb_target=r16 ;;
2266# end-sanitize-r16
2267
2268hppa*-*-bsd*) gdb_target=hppabsd ;;
2269hppa*-*-pro*) gdb_target=hppapro ;;
2270hppa*-*-hpux*) gdb_target=hppahpux ;;
2271hppa*-*-hiux*) gdb_target=hppahpux ;;
2272hppa*-*-osf*) gdb_target=hppaosf ;;
2273
2274i[345]86-sequent-bsd*) gdb_target=symmetry ;;
2275i[345]86-sequent-sysv4*) gdb_target=ptx4 ;;
2276i[345]86-sequent-sysv*) gdb_target=ptx ;;
2277i[345]86-ncr-*) gdb_target=ncr3000 ;;
2278i[345]86-*-aout*) gdb_target=i386aout ;;
2279i[345]86-*-coff*) gdb_target=i386v ;;
2280i[345]86-*-elf*) gdb_target=i386v ;;
2281i[345]86-*-aix*) gdb_target=i386aix ;;
2282i[345]86-*-bsd*) gdb_target=i386bsd ;;
2283i[345]86-*-freebsd*) gdb_target=fbsd ;;
2284i[345]86-*-netbsd*) gdb_target=nbsd ;;
2285i[345]86-*-os9k) gdb_target=i386os9k ;;
2286i[345]86-*-go32*) gdb_target=i386aout ;;
2287i[345]86-*-lynxos*) gdb_target=i386lynx
2288 configdirs="${configdirs} gdbserver" ;;
2289i[345]86-*-solaris*) gdb_target=i386sol2 ;;
2290i[345]86-*-sunos*) gdb_target=sun386 ;;
2291i[345]86-*-sysv4*) gdb_target=i386v4 ;;
2292i[345]86-*-sco*) gdb_target=i386v ;;
2293i[345]86-*-sysv*) gdb_target=i386v ;;
2294i[345]86-*-linux*) gdb_target=linux ;;
2295i[345]86-*-isc*) gdb_target=i386v ;;
2296i[345]86-*-mach3*) gdb_target=i386m3 ;;
2297i[345]86-*-mach*) gdb_target=i386mach ;;
2298i[345]86-*-netware*) gdb_target=i386nw
2299 configdirs="${configdirs} nlm" ;;
2300i[345]86-*-osf1mk*) gdb_target=i386mk ;;
24e60978 2301i[345]86-*-win32) gdb_target=win32 ;;
5436fc65
C
2302
2303i960-*-bout*) gdb_target=vxworks960 ;;
2304i960-*-coff*) gdb_target=nindy960 ;;
2305i960-*-elf*) gdb_target=nindy960 ;;
2306
2307i960-*-nindy*) gdb_target=nindy960 ;;
2308i960-*-vxworks*) gdb_target=vxworks960 ;;
2309
2310m68000-*-sunos3*) gdb_target=sun2os3 ;;
2311m68000-*-sunos4*) gdb_target=sun2os4 ;;
2312
2313m68*-apollo*-bsd*) gdb_target=apollo68b ;;
2314m68*-bull-sysv*) gdb_target=dpx2 ;;
2315m68*-hp-bsd*) gdb_target=hp300bsd ;;
2316m68*-hp-hpux*) gdb_target=hp300hpux ;;
2317m68*-altos-*) gdb_target=altos ;;
2318m68*-att-*) gdb_target=3b1 ;;
2319m68*-cisco*-*) gdb_target=cisco ;;
2320m68*-ericsson-*) gdb_target=es1800 ;;
2321m68*-isi-*) gdb_target=isi ;;
2322m68*-motorola-*) gdb_target=delta68 ;;
2323m68*-netx-*) gdb_target=vxworks68 ;;
2324m68*-sony-*) gdb_target=news ;;
2325m68*-tandem-*) gdb_target=st2000 ;;
2326m68*-rom68k-*) gdb_target=monitor ;;
2327m68*-*bug-*) gdb_target=monitor ;;
2328m68*-monitor-*) gdb_target=monitor ;;
949e2bbf 2329m68*-est-*) gdb_target=monitor ;;
5436fc65
C
2330m68*-*-aout*) gdb_target=monitor ;;
2331m68*-*-coff*) gdb_target=monitor ;;
2332m68*-*-elf*) gdb_target=monitor ;;
2333m68*-*-lynxos*) gdb_target=m68klynx
2334 configdirs="${configdirs} gdbserver" ;;
2335m68*-*-os68k*) gdb_target=os68k ;;
2336m68*-*-sunos3*) gdb_target=sun3os3 ;;
2337m68*-*-sunos4*) gdb_target=sun3os4 ;;
2338m68*-*-sysv4*) gdb_target=m68kv4 ;;
2339m68*-*-vxworks*) gdb_target=vxworks68 ;;
2340
2341m88*-harris-cxux*) gdb_target=cxux ;;
2342m88*-motorola-sysv4*) gdb_target=delta88v4 ;;
2343m88*-*-mach3*) gdb_target=mach3 ;;
2344m88*-motorola-*) gdb_target=delta88 ;;
2345m88*-*-*) gdb_target=m88k ;;
2346
2347mips64*-big-*) gdb_target=bigmips64 ;;
2348mips*-big-*) gdb_target=bigmips ;;
2349mips*-dec-mach3*) gdb_target=mach3 ;;
2350mips*-dec-*) gdb_target=decstation ;;
2351mips64*el-*-ecoff*) gdb_target=idtl64 ;;
2352mips64*-idt-ecoff*) gdb_target=idt64 ;;
0e3a4b1e
JSC
2353mips64*vr4300*el-*-elf*) gdb_target=vr4300el ;;
2354mips64*vr4300*-*-elf*) gdb_target=vr4300 ;;
5436fc65
C
2355mips64*el-*-elf*) gdb_target=idtl64 ;;
2356mips64*-*-elf*) gdb_target=idt64 ;;
2357mips*el-*-ecoff*) gdb_target=idtl ;;
2358mips*-*-ecoff*) gdb_target=idt ;;
cd10c7e3 2359# start-sanitize-gm
188c635f 2360mips*-*-magic*) gdb_target=idt ;;
cd10c7e3 2361# end-sanitize-gm
5436fc65
C
2362mips*el-*-elf*) gdb_target=idtl ;;
2363mips*-*-elf*) gdb_target=idt ;;
2364mips*-little-*) gdb_target=littlemips ;;
2365mips*-sgi-irix5*) gdb_target=irix5 ;;
2366mips*-sgi-*) gdb_target=irix3 ;;
2367mips*-sony-*) gdb_target=bigmips ;;
2368mips*-*-mach3*) gdb_target=mach3 ;;
2369mips*-*-sysv4*) gdb_target=mipsv4 ;;
2370mips*-*-sysv*) gdb_target=bigmips ;;
2371mips*-*-riscos*) gdb_target=bigmips ;;
2372
2373none-*-*) gdb_target=none ;;
2374
2375np1-*-*) gdb_target=np1 ;;
2376
2377ns32k-*-mach3*) gdb_target=mach3 ;;
2378ns32k-*-netbsd*) gdb_target=nbsd ;;
2379ns32k-utek-sysv*) gdb_target=merlin ;;
2380ns32k-utek-*) gdb_target=umax ;;
2381
2382pn-*-*) gdb_target=pn ;;
2383powerpc-*-netware*) gdb_target=ppc-nw
2384 configdirs="${configdirs} nlm" ;;
2385
65eaea27 2386powerpc-*-aix4*) gdb_target=aix4 ;;
fbc3f191 2387powerpc-*-aix*) gdb_target=aix ;;
13ba8b69 2388powerpc-*-eabisim*) gdb_target=ppc-sim ;;
fbc3f191 2389powerpc-*-eabi*) gdb_target=ppc-eabi ;;
13ba8b69 2390powerpcle-*-eabisim*) gdb_target=ppcle-sim ;;
fbc3f191 2391powerpcle-*-eabi*) gdb_target=ppcle-eabi ;;
5436fc65
C
2392
2393pyramid-*-*) gdb_target=pyramid ;;
2394
2395rs6000-*-lynxos*) gdb_target=rs6000lynx ;;
65eaea27 2396rs6000-*-aix4*) gdb_target=aix4 ;;
5436fc65
C
2397rs6000-*-*) gdb_target=rs6000 ;;
2398
2399sparc-*-aout*) gdb_target=sparc-em ;;
2400sparc-*-coff*) gdb_target=sparc-em ;;
2401sparc-*-elf*) gdb_target=sparc-em ;;
2402sparc-*-lynxos*) gdb_target=sparclynx
2403 configdirs="${configdirs} gdbserver" ;;
2404sparc-*-netbsd*) gdb_target=nbsd ;;
2405sparc-*-solaris2*) gdb_target=sun4sol2 ;;
2406sparc-*-sunos4*) gdb_target=sun4os4 ;;
2407sparc-*-sunos5*) gdb_target=sun4sol2 ;;
2408sparc-*-vxworks*) gdb_target=vxsparc ;;
2409sparc-*-*) gdb_target=sun4os4 ;;
2410sparclite*-*-*) gdb_target=sparclite ;;
2411sparc64-*-*) gdb_target=sp64 ;;
2412
2413tahoe-*-*) gdb_target=tahoe ;;
2414
2415vax-*-*) gdb_target=vax ;;
2416
2417w65-*-*) gdb_target=w65 ;;
2418
fb506180 2419z8k-*-coff*) gdb_target=z8k ;;
5436fc65
C
2420
2421esac
2422
2423
5f107900 2424frags=
5436fc65
C
2425host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
2426if test ! -f ${host_makefile_frag}; then
2427{ echo "configure: error: "*** Gdb does not support host ${host}"" 1>&2; exit 1; }
2428fi
5f107900 2429frags="$frags $host_makefile_frag"
5436fc65
C
2430
2431target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
2432if test ! -f ${target_makefile_frag}; then
2433{ echo "configure: error: "*** Gdb does not support target ${target}"" 1>&2; exit 1; }
2434fi
5f107900 2435frags="$frags $target_makefile_frag"
5436fc65
C
2436
2437
2438
2439
2440
094fd4ae
C
2441hostfile=`sed -n '
2442s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
2443' ${host_makefile_frag}`
5436fc65 2444
094fd4ae
C
2445targetfile=`sed -n '
2446s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
2447' ${target_makefile_frag}`
5436fc65
C
2448
2449# these really aren't orthogonal true/false values of the same condition,
2450# but shells are slow enough that I like to reuse the test conditions
2451# whenever possible
2452if test "${target}" = "${host}"; then
094fd4ae
C
2453nativefile=`sed -n '
2454s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
2455' ${host_makefile_frag}`
5436fc65
C
2456else
2457# GDBserver is only useful in a "native" enviroment
2458configdirs=`echo $configdirs | sed 's/gdbserver//'`
2459fi
2460
094fd4ae 2461
5436fc65
C
2462# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
2463# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
2464# corresponding links. But we have to remove the xm.h files and tm.h
2465# files anyway, e.g. when switching from "configure host" to
2466# "configure none".
2467
2468files=
2469links=
2470rm -f xm.h
2471if test "${hostfile}" != ""; then
2472files="${files} config/${gdb_host_cpu}/${hostfile}"
2473links="${links} xm.h"
2474fi
2475rm -f tm.h
2476if test "${targetfile}" != ""; then
2477files="${files} config/${gdb_target_cpu}/${targetfile}"
2478links="${links} tm.h"
2479fi
2480rm -f nm.h
2481if test "${nativefile}" != ""; then
2482files="${files} config/${gdb_host_cpu}/${nativefile}"
2483links="${links} nm.h"
2484else
2485# A cross-only configuration.
2486files="${files} config/nm-empty.h"
2487links="${links} nm.h"
2488fi
2489# start-sanitize-gdbtk
2490
2491# Make it possible to use the GUI without doing a full install
2492if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then
2493files="${files} gdbtk.tcl"
2494links="${links} gdbtk.tcl"
2495fi
2496# end-sanitize-gdbtk
2497
2498
2499
2500subdirs="$configdirs"
2501
2502trap '' 1 2 15
2503cat > confcache <<\EOF
2504# This file is a shell script that caches the results of configure
2505# tests run on this system so they can be shared between configure
2506# scripts and configure runs. It is not useful on other systems.
2507# If it contains results you don't want to keep, you may remove or edit it.
2508#
2509# By default, configure uses ./config.cache as the cache file,
2510# creating it if it does not exist already. You can give configure
2511# the --cache-file=FILE option to use a different cache file; that is
2512# what configure does when it calls configure scripts in
2513# subdirectories, so they share the cache.
2514# Giving --cache-file=/dev/null disables caching, for debugging configure.
2515# config.status only pays attention to the cache file if you give it the
2516# --recheck option to rerun configure.
2517#
2518EOF
2519# Ultrix sh set writes to stderr and can't be redirected directly,
2520# and sets the high bit in the cache file unless we assign to the vars.
2521(set) 2>&1 |
2522 sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
2523 >> confcache
2524if cmp -s $cache_file confcache; then
2525 :
2526else
2527 if test -w $cache_file; then
2528 echo "updating cache $cache_file"
2529 cat confcache > $cache_file
2530 else
2531 echo "not updating unwritable cache $cache_file"
2532 fi
2533fi
2534rm -f confcache
2535
2536trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
2537
2538test "x$prefix" = xNONE && prefix=$ac_default_prefix
2539# Let make expand exec_prefix.
2540test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
2541
2542# Any assignment to VPATH causes Sun make to only execute
2543# the first set of double-colon rules, so remove it if not needed.
2544# If there is a colon in the path, we need to keep it.
2545if test "x$srcdir" = x.; then
2546 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2547fi
2548
2549trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
2550
2551# Transform confdefs.h into DEFS.
2552# Protect against shell expansion while executing Makefile rules.
2553# Protect against Makefile macro expansion.
2554cat > conftest.defs <<\EOF
2555s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
2556s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
2557s%\[%\\&%g
2558s%\]%\\&%g
2559s%\$%$$%g
2560EOF
2561DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
2562rm -f conftest.defs
2563
2564
2565# Without the "./", some shells look in PATH for config.status.
2566: ${CONFIG_STATUS=./config.status}
2567
2568echo creating $CONFIG_STATUS
2569rm -f $CONFIG_STATUS
2570cat > $CONFIG_STATUS <<EOF
2571#! /bin/sh
2572# Generated automatically by configure.
2573# Run this file to recreate the current configuration.
2574# This directory was configured as follows,
2575# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2576#
2577# $0 $ac_configure_args
2578#
2579# Compiler output produced by configure, useful for debugging
2580# configure, is in ./config.log if it exists.
2581
2582ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
2583for ac_option
2584do
2585 case "\$ac_option" in
2586 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2587 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
2588 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
2589 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
188c635f 2590 echo "$CONFIG_STATUS generated by autoconf version 2.4.2"
5436fc65
C
2591 exit 0 ;;
2592 -help | --help | --hel | --he | --h)
2593 echo "\$ac_cs_usage"; exit 0 ;;
2594 *) echo "\$ac_cs_usage"; exit 1 ;;
2595 esac
2596done
2597
2598ac_given_srcdir=$srcdir
2599ac_given_INSTALL="$INSTALL"
2600
2601trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
2602
2603# Protect against being on the right side of a sed subst in config.status.
2604sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g;
2605 s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
2606$ac_vpsub
2607$extrasub
2608s%@CFLAGS@%$CFLAGS%g
2609s%@CPPFLAGS@%$CPPFLAGS%g
2610s%@CXXFLAGS@%$CXXFLAGS%g
2611s%@DEFS@%$DEFS%g
2612s%@LDFLAGS@%$LDFLAGS%g
2613s%@LIBS@%$LIBS%g
2614s%@exec_prefix@%$exec_prefix%g
2615s%@prefix@%$prefix%g
2616s%@program_transform_name@%$program_transform_name%g
188c635f
SG
2617s%@bindir@%$bindir%g
2618s%@sbindir@%$sbindir%g
2619s%@libexecdir@%$libexecdir%g
2620s%@datadir@%$datadir%g
2621s%@sysconfdir@%$sysconfdir%g
2622s%@sharedstatedir@%$sharedstatedir%g
2623s%@localstatedir@%$localstatedir%g
2624s%@libdir@%$libdir%g
2625s%@includedir@%$includedir%g
2626s%@oldincludedir@%$oldincludedir%g
2627s%@infodir@%$infodir%g
2628s%@mandir@%$mandir%g
5436fc65
C
2629s%@CC@%$CC%g
2630s%@CPP@%$CPP%g
2631s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2632s%@INSTALL_DATA@%$INSTALL_DATA%g
2633s%@RANLIB@%$RANLIB%g
204c8825 2634s%@YACC@%$YACC%g
5436fc65
C
2635s%@host@%$host%g
2636s%@host_alias@%$host_alias%g
2637s%@host_cpu@%$host_cpu%g
2638s%@host_vendor@%$host_vendor%g
2639s%@host_os@%$host_os%g
2640s%@target@%$target%g
2641s%@target_alias@%$target_alias%g
2642s%@target_cpu@%$target_cpu%g
2643s%@target_vendor@%$target_vendor%g
2644s%@target_os@%$target_os%g
2645s%@build@%$build%g
2646s%@build_alias@%$build_alias%g
2647s%@build_cpu@%$build_cpu%g
2648s%@build_vendor@%$build_vendor%g
2649s%@build_os@%$build_os%g
2650s%@X_CFLAGS@%$X_CFLAGS%g
2651s%@X_PRE_LIBS@%$X_PRE_LIBS%g
2652s%@X_LIBS@%$X_LIBS%g
2653s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
2654s%@TKHDIR@%$TKHDIR%g
2655s%@TKLIB@%$TKLIB%g
2656s%@TCLHDIR@%$TCLHDIR%g
2657s%@TCLLIB@%$TCLLIB%g
2658s%@ENABLE_GDBTK@%$ENABLE_GDBTK%g
a2b63bbd
JM
2659s%@X_CLFAGS@%$X_CLFAGS%g
2660s%@X_LDFLAGS@%$X_LDFLAGS%g
5436fc65
C
2661s%@ENABLE_CFLAGS@%$ENABLE_CFLAGS%g
2662s%@ENABLE_CLIBS@%$ENABLE_CLIBS%g
2663s%@ENABLE_OBS@%$ENABLE_OBS%g
5436fc65
C
2664/@host_makefile_frag@/r $host_makefile_frag
2665s%@host_makefile_frag@%%g
2666/@target_makefile_frag@/r $target_makefile_frag
2667s%@target_makefile_frag@%%g
5f107900 2668s%@frags@%$frags%g
5436fc65
C
2669s%@subdirs@%$subdirs%g
2670
2671CEOF
2672EOF
2673cat >> $CONFIG_STATUS <<EOF
2674
2675CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2676EOF
2677cat >> $CONFIG_STATUS <<\EOF
2678for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2679 # Support "outfile[:infile]", defaulting infile="outfile.in".
2680 case "$ac_file" in
2681 *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
2682 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2683 *) ac_file_in="${ac_file}.in" ;;
2684 esac
2685
2686 # Adjust relative srcdir, etc. for subdirectories.
2687
2688 # Remove last slash and all that follows it. Not all systems have dirname.
2689 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2690 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2691 # The file is in a subdirectory.
2692 test ! -d "$ac_dir" && mkdir "$ac_dir"
2693 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2694 # A "../" for each directory in $ac_dir_suffix.
2695 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2696 else
2697 ac_dir_suffix= ac_dots=
2698 fi
2699
2700 case "$ac_given_srcdir" in
2701 .) srcdir=.
2702 if test -z "$ac_dots"; then top_srcdir=.
2703 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2704 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2705 *) # Relative path.
2706 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2707 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2708 esac
2709
2710 case "$ac_given_INSTALL" in
2711 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2712 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2713 esac
2714 echo creating "$ac_file"
2715 rm -f "$ac_file"
2716 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2717 case "$ac_file" in
2718 *Makefile*) ac_comsub="1i\\
2719# $configure_input" ;;
2720 *) ac_comsub= ;;
2721 esac
2722 sed -e "$ac_comsub
2723s%@configure_input@%$configure_input%g
2724s%@srcdir@%$srcdir%g
2725s%@top_srcdir@%$top_srcdir%g
2726s%@INSTALL@%$INSTALL%g
2727" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
2728fi; done
2729rm -f conftest.subs
2730
2731EOF
2732
2733cat >> $CONFIG_STATUS <<EOF
2734ac_sources="$files"
2735ac_dests="$links"
2736EOF
2737
2738cat >> $CONFIG_STATUS <<\EOF
2739srcdir=$ac_given_srcdir
2740while test -n "$ac_sources"; do
2741 set $ac_dests; ac_dest=$1; shift; ac_dests=$*
2742 set $ac_sources; ac_source=$1; shift; ac_sources=$*
2743
2744 echo "linking $srcdir/$ac_source to $ac_dest"
2745
2746 if test ! -r $srcdir/$ac_source; then
2747 { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
2748 fi
2749 rm -f $ac_dest
2750
2751 # Make relative symlinks.
2752 # Remove last slash and all that follows it. Not all systems have dirname.
2753 ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
2754 if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
2755 # The dest file is in a subdirectory.
2756 test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
2757 ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
2758 # A "../" for each directory in $ac_dest_dir_suffix.
2759 ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
2760 else
2761 ac_dest_dir_suffix= ac_dots=
2762 fi
2763
2764 case "$srcdir" in
2765 [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
2766 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
2767 esac
2768
2769 # Make a symlink if possible; otherwise try a hard link.
2770 if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
2771 ln $srcdir/$ac_source $ac_dest; then :
2772 else
2773 { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
2774 fi
2775done
0a5a1821
C
2776EOF
2777cat >> $CONFIG_STATUS <<EOF
5436fc65 2778
0a5a1821
C
2779gdb_host_cpu=$gdb_host_cpu
2780gdb_target_cpu=$gdb_target_cpu
2781nativefile=$nativefile
2782
2783EOF
2784cat >> $CONFIG_STATUS <<\EOF
5436fc65
C
2785
2786if test "${nativefile}" = ""; then
2787sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \
2788 < Makefile > Makefile.tem
2789mv -f Makefile.tem Makefile
2790fi
2791
2792sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
2793/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
2794/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
2795mv -f Makefile.tmp Makefile
2796
2797case ${srcdir} in
2798.)
2799;;
2800*)
2801grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
2802echo "source ${srcdir}/.gdbinit" >> .gdbinit
2803esac
2804
2805exit 0
2806EOF
2807chmod +x $CONFIG_STATUS
2808rm -fr confdefs* $ac_clean_files
2809test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2810
2811if test "$no_recursion" != yes; then
2812
2813 # Remove --cache-file and --srcdir arguments so they do not pile up.
2814 ac_sub_configure_args=
2815 ac_prev=
2816 for ac_arg in $ac_configure_args; do
2817 if test -n "$ac_prev"; then
2818 ac_prev=
2819 continue
2820 fi
2821 case "$ac_arg" in
2822 -cache-file | --cache-file | --cache-fil | --cache-fi \
2823 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
2824 ac_prev=cache_file ;;
2825 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
2826 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
2827 ;;
2828 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
2829 ac_prev=srcdir ;;
2830 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
2831 ;;
2832 *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
2833 esac
2834 done
2835
2836 for ac_config_dir in $configdirs; do
2837
2838 # Do not complain, so a configure script can configure whichever
2839 # parts of a large source tree are present.
2840 if test ! -d $srcdir/$ac_config_dir; then
2841 continue
2842 fi
2843
2844 echo configuring in $ac_config_dir
2845
2846 case "$srcdir" in
2847 .) ;;
2848 *)
2849 if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
2850 else
2851 { echo "configure: error: can not create `pwd`/$ac_config_dir" 1>&2; exit 1; }
2852 fi
2853 ;;
2854 esac
2855
2856 ac_popdir=`pwd`
2857 cd $ac_config_dir
2858
2859 case "$srcdir" in
2860 .) # No --srcdir option. We are building in place.
2861 ac_sub_srcdir=$srcdir ;;
2862 /*) # Absolute path.
2863 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
2864 *) # Relative path.
2865 ac_sub_srcdir=../$srcdir/$ac_config_dir ;;
2866 esac
2867
2868 # Check for guested configure; otherwise get Cygnus style configure.
2869 if test -f $ac_sub_srcdir/configure; then
2870 ac_sub_configure=$ac_sub_srcdir/configure
2871 elif test -f $ac_sub_srcdir/configure.in; then
2872 ac_sub_configure=$ac_configure
2873 else
2874 echo "configure: warning: no configuration information is in $ac_config_dir" 1>&2
2875 ac_sub_configure=
2876 fi
2877
2878 # The recursion is here.
2879 if test -n "$ac_sub_configure"; then
2880
2881 # Make the cache file name correct relative to the subdirectory.
2882 # A "../" for each directory in /$ac_config_dir.
2883 ac_dots=`echo $ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
2884 case "$cache_file" in
2885 /*) ac_sub_cache_file=$cache_file ;;
2886 *) # Relative path.
2887 ac_sub_cache_file="$ac_dots$cache_file" ;;
2888 esac
2889 case "$ac_given_INSTALL" in
2890 [/$]*) INSTALL="$ac_given_INSTALL" ;;
2891 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
2892 esac
2893
2894 echo "running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir"
2895 # The eval makes quoting arguments work.
2896 if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
2897 then :
2898 else
2899 { echo "configure: error: $ac_sub_configure failed for $ac_config_dir" 1>&2; exit 1; }
2900 fi
2901 fi
2902
2903 cd $ac_popdir
2904 done
2905fi
2906
5e711e7f
PS
2907
2908exit 0
This page took 0.158776 seconds and 4 git commands to generate.