blob: 2abd69b78504828828c852b1aebda73ed4442c31 [file] [log] [blame]
drh75897232000-05-29 14:26:00 +00001#! /bin/sh
2
3# Guess values for system-dependent variables and create Makefiles.
4# Generated automatically using autoconf version 2.13
5# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
6#
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Defaults:
11ac_help=
12ac_default_prefix=/usr/local
13# Any additions from configure.in:
14ac_help="$ac_help
15 --with-hints=FILE Read configuration options from FILE"
16
17# Initialize some variables set by options.
18# The variables have the same names as the options, with
19# dashes changed to underlines.
20build=NONE
21cache_file=./config.cache
22exec_prefix=NONE
23host=NONE
24no_create=
25nonopt=NONE
26no_recursion=
27prefix=NONE
28program_prefix=NONE
29program_suffix=NONE
30program_transform_name=s,x,x,
31silent=
32site=
33srcdir=
34target=NONE
35verbose=
36x_includes=NONE
37x_libraries=NONE
38bindir='${exec_prefix}/bin'
39sbindir='${exec_prefix}/sbin'
40libexecdir='${exec_prefix}/libexec'
41datadir='${prefix}/share'
42sysconfdir='${prefix}/etc'
43sharedstatedir='${prefix}/com'
44localstatedir='${prefix}/var'
45libdir='${exec_prefix}/lib'
46includedir='${prefix}/include'
47oldincludedir='/usr/include'
48infodir='${prefix}/info'
49mandir='${prefix}/man'
50
51# Initialize some other variables.
52subdirs=
53MFLAGS= MAKEFLAGS=
54SHELL=${CONFIG_SHELL-/bin/sh}
55# Maximum number of lines to put in a shell here document.
56ac_max_here_lines=12
57
58ac_prev=
59for ac_option
60do
61
62 # If the previous option needs an argument, assign it.
63 if test -n "$ac_prev"; then
64 eval "$ac_prev=\$ac_option"
65 ac_prev=
66 continue
67 fi
68
69 case "$ac_option" in
70 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
71 *) ac_optarg= ;;
72 esac
73
74 # Accept the important Cygnus configure options, so we can diagnose typos.
75
76 case "$ac_option" in
77
78 -bindir | --bindir | --bindi | --bind | --bin | --bi)
79 ac_prev=bindir ;;
80 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
81 bindir="$ac_optarg" ;;
82
83 -build | --build | --buil | --bui | --bu)
84 ac_prev=build ;;
85 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
86 build="$ac_optarg" ;;
87
88 -cache-file | --cache-file | --cache-fil | --cache-fi \
89 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
90 ac_prev=cache_file ;;
91 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
92 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
93 cache_file="$ac_optarg" ;;
94
95 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
96 ac_prev=datadir ;;
97 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
98 | --da=*)
99 datadir="$ac_optarg" ;;
100
101 -disable-* | --disable-*)
102 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
103 # Reject names that are not valid shell variable names.
104 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
105 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
106 fi
107 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
108 eval "enable_${ac_feature}=no" ;;
109
110 -enable-* | --enable-*)
111 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
112 # Reject names that are not valid shell variable names.
113 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
114 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
115 fi
116 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
117 case "$ac_option" in
118 *=*) ;;
119 *) ac_optarg=yes ;;
120 esac
121 eval "enable_${ac_feature}='$ac_optarg'" ;;
122
123 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
124 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
125 | --exec | --exe | --ex)
126 ac_prev=exec_prefix ;;
127 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
128 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
129 | --exec=* | --exe=* | --ex=*)
130 exec_prefix="$ac_optarg" ;;
131
132 -gas | --gas | --ga | --g)
133 # Obsolete; use --with-gas.
134 with_gas=yes ;;
135
136 -help | --help | --hel | --he)
137 # Omit some internal or obsolete options to make the list less imposing.
138 # This message is too long to be a string in the A/UX 3.1 sh.
139 cat << EOF
140Usage: configure [options] [host]
141Options: [defaults in brackets after descriptions]
142Configuration:
143 --cache-file=FILE cache test results in FILE
144 --help print this message
145 --no-create do not create output files
146 --quiet, --silent do not print \`checking...' messages
147 --version print the version of autoconf that created configure
148Directory and file names:
149 --prefix=PREFIX install architecture-independent files in PREFIX
150 [$ac_default_prefix]
151 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
152 [same as prefix]
153 --bindir=DIR user executables in DIR [EPREFIX/bin]
154 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
155 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
156 --datadir=DIR read-only architecture-independent data in DIR
157 [PREFIX/share]
158 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
159 --sharedstatedir=DIR modifiable architecture-independent data in DIR
160 [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]
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
171 run sed PROGRAM on installed program names
172EOF
173 cat << EOF
174Host type:
175 --build=BUILD configure for building on BUILD [BUILD=HOST]
176 --host=HOST configure for HOST [guessed]
177 --target=TARGET configure for TARGET [TARGET=HOST]
178Features and packages:
179 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
180 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
181 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
182 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
183 --x-includes=DIR X include files are in DIR
184 --x-libraries=DIR X library files are in DIR
185EOF
186 if test -n "$ac_help"; then
187 echo "--enable and --with options recognized:$ac_help"
188 fi
189 exit 0 ;;
190
191 -host | --host | --hos | --ho)
192 ac_prev=host ;;
193 -host=* | --host=* | --hos=* | --ho=*)
194 host="$ac_optarg" ;;
195
196 -includedir | --includedir | --includedi | --included | --include \
197 | --includ | --inclu | --incl | --inc)
198 ac_prev=includedir ;;
199 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
200 | --includ=* | --inclu=* | --incl=* | --inc=*)
201 includedir="$ac_optarg" ;;
202
203 -infodir | --infodir | --infodi | --infod | --info | --inf)
204 ac_prev=infodir ;;
205 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
206 infodir="$ac_optarg" ;;
207
208 -libdir | --libdir | --libdi | --libd)
209 ac_prev=libdir ;;
210 -libdir=* | --libdir=* | --libdi=* | --libd=*)
211 libdir="$ac_optarg" ;;
212
213 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
214 | --libexe | --libex | --libe)
215 ac_prev=libexecdir ;;
216 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
217 | --libexe=* | --libex=* | --libe=*)
218 libexecdir="$ac_optarg" ;;
219
220 -localstatedir | --localstatedir | --localstatedi | --localstated \
221 | --localstate | --localstat | --localsta | --localst \
222 | --locals | --local | --loca | --loc | --lo)
223 ac_prev=localstatedir ;;
224 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
225 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
226 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
227 localstatedir="$ac_optarg" ;;
228
229 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
230 ac_prev=mandir ;;
231 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
232 mandir="$ac_optarg" ;;
233
234 -nfp | --nfp | --nf)
235 # Obsolete; use --without-fp.
236 with_fp=no ;;
237
238 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
239 | --no-cr | --no-c)
240 no_create=yes ;;
241
242 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
243 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
244 no_recursion=yes ;;
245
246 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
247 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
248 | --oldin | --oldi | --old | --ol | --o)
249 ac_prev=oldincludedir ;;
250 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
251 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
252 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
253 oldincludedir="$ac_optarg" ;;
254
255 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
256 ac_prev=prefix ;;
257 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
258 prefix="$ac_optarg" ;;
259
260 -program-prefix | --program-prefix | --program-prefi | --program-pref \
261 | --program-pre | --program-pr | --program-p)
262 ac_prev=program_prefix ;;
263 -program-prefix=* | --program-prefix=* | --program-prefi=* \
264 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
265 program_prefix="$ac_optarg" ;;
266
267 -program-suffix | --program-suffix | --program-suffi | --program-suff \
268 | --program-suf | --program-su | --program-s)
269 ac_prev=program_suffix ;;
270 -program-suffix=* | --program-suffix=* | --program-suffi=* \
271 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
272 program_suffix="$ac_optarg" ;;
273
274 -program-transform-name | --program-transform-name \
275 | --program-transform-nam | --program-transform-na \
276 | --program-transform-n | --program-transform- \
277 | --program-transform | --program-transfor \
278 | --program-transfo | --program-transf \
279 | --program-trans | --program-tran \
280 | --progr-tra | --program-tr | --program-t)
281 ac_prev=program_transform_name ;;
282 -program-transform-name=* | --program-transform-name=* \
283 | --program-transform-nam=* | --program-transform-na=* \
284 | --program-transform-n=* | --program-transform-=* \
285 | --program-transform=* | --program-transfor=* \
286 | --program-transfo=* | --program-transf=* \
287 | --program-trans=* | --program-tran=* \
288 | --progr-tra=* | --program-tr=* | --program-t=*)
289 program_transform_name="$ac_optarg" ;;
290
291 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
292 | -silent | --silent | --silen | --sile | --sil)
293 silent=yes ;;
294
295 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
296 ac_prev=sbindir ;;
297 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
298 | --sbi=* | --sb=*)
299 sbindir="$ac_optarg" ;;
300
301 -sharedstatedir | --sharedstatedir | --sharedstatedi \
302 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
303 | --sharedst | --shareds | --shared | --share | --shar \
304 | --sha | --sh)
305 ac_prev=sharedstatedir ;;
306 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
307 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
308 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
309 | --sha=* | --sh=*)
310 sharedstatedir="$ac_optarg" ;;
311
312 -site | --site | --sit)
313 ac_prev=site ;;
314 -site=* | --site=* | --sit=*)
315 site="$ac_optarg" ;;
316
317 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
318 ac_prev=srcdir ;;
319 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
320 srcdir="$ac_optarg" ;;
321
322 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
323 | --syscon | --sysco | --sysc | --sys | --sy)
324 ac_prev=sysconfdir ;;
325 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
326 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
327 sysconfdir="$ac_optarg" ;;
328
329 -target | --target | --targe | --targ | --tar | --ta | --t)
330 ac_prev=target ;;
331 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
332 target="$ac_optarg" ;;
333
334 -v | -verbose | --verbose | --verbos | --verbo | --verb)
335 verbose=yes ;;
336
337 -version | --version | --versio | --versi | --vers)
338 echo "configure generated by autoconf version 2.13"
339 exit 0 ;;
340
341 -with-* | --with-*)
342 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
343 # Reject names that are not valid shell variable names.
344 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
345 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
346 fi
347 ac_package=`echo $ac_package| sed 's/-/_/g'`
348 case "$ac_option" in
349 *=*) ;;
350 *) ac_optarg=yes ;;
351 esac
352 eval "with_${ac_package}='$ac_optarg'" ;;
353
354 -without-* | --without-*)
355 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
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 eval "with_${ac_package}=no" ;;
362
363 --x)
364 # Obsolete; use --with-x.
365 with_x=yes ;;
366
367 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
368 | --x-incl | --x-inc | --x-in | --x-i)
369 ac_prev=x_includes ;;
370 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
371 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
372 x_includes="$ac_optarg" ;;
373
374 -x-libraries | --x-libraries | --x-librarie | --x-librari \
375 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
376 ac_prev=x_libraries ;;
377 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
378 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
379 x_libraries="$ac_optarg" ;;
380
381 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
382 ;;
383
384 *)
385 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
386 echo "configure: warning: $ac_option: invalid host type" 1>&2
387 fi
388 if test "x$nonopt" != xNONE; then
389 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
390 fi
391 nonopt="$ac_option"
392 ;;
393
394 esac
395done
396
397if test -n "$ac_prev"; then
398 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
399fi
400
401trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
402
403# File descriptor usage:
404# 0 standard input
405# 1 file creation
406# 2 errors and warnings
407# 3 some systems may open it to /dev/tty
408# 4 used on the Kubota Titan
409# 6 checking for... messages and results
410# 5 compiler messages saved in config.log
411if test "$silent" = yes; then
412 exec 6>/dev/null
413else
414 exec 6>&1
415fi
416exec 5>./config.log
417
418echo "\
419This file contains any messages produced by compilers while
420running configure, to aid debugging if configure makes a mistake.
421" 1>&5
422
423# Strip out --no-create and --no-recursion so they do not pile up.
424# Also quote any args containing shell metacharacters.
425ac_configure_args=
426for ac_arg
427do
428 case "$ac_arg" in
429 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
430 | --no-cr | --no-c) ;;
431 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
432 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
433 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
434 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
435 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
436 esac
437done
438
439# NLS nuisances.
440# Only set these to C if already set. These must not be set unconditionally
441# because not all systems understand e.g. LANG=C (notably SCO).
442# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
443# Non-C LC_CTYPE values break the ctype check.
444if test "${LANG+set}" = set; then LANG=C; export LANG; fi
445if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
446if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
447if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
448
449# confdefs.h avoids OS command line length limits that DEFS can exceed.
450rm -rf conftest* confdefs.h
451# AIX cpp loses on an empty file, so make sure it contains at least a newline.
452echo > confdefs.h
453
454# A filename unique to this package, relative to the directory that
455# configure is in, which we can look for to find out if srcdir is correct.
456ac_unique_file=src/sqlite.h
457
458# Find the source files, if location was not specified.
459if test -z "$srcdir"; then
460 ac_srcdir_defaulted=yes
461 # Try the directory containing this script, then its parent.
462 ac_prog=$0
463 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
464 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
465 srcdir=$ac_confdir
466 if test ! -r $srcdir/$ac_unique_file; then
467 srcdir=..
468 fi
469else
470 ac_srcdir_defaulted=no
471fi
472if test ! -r $srcdir/$ac_unique_file; then
473 if test "$ac_srcdir_defaulted" = yes; then
474 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
475 else
476 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
477 fi
478fi
479srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
480
481# Prefer explicitly selected file to automatically selected ones.
482if test -z "$CONFIG_SITE"; then
483 if test "x$prefix" != xNONE; then
484 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
485 else
486 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
487 fi
488fi
489for ac_site_file in $CONFIG_SITE; do
490 if test -r "$ac_site_file"; then
491 echo "loading site script $ac_site_file"
492 . "$ac_site_file"
493 fi
494done
495
496if test -r "$cache_file"; then
497 echo "loading cache $cache_file"
498 . $cache_file
499else
500 echo "creating cache $cache_file"
501 > $cache_file
502fi
503
504ac_ext=c
505# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
506ac_cpp='$CPP $CPPFLAGS'
507ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
508ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
509cross_compiling=$ac_cv_prog_cc_cross
510
511ac_exeext=
512ac_objext=o
513if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
514 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
515 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
516 ac_n= ac_c='
517' ac_t=' '
518 else
519 ac_n=-n ac_c= ac_t=
520 fi
521else
522 ac_n= ac_c='\c' ac_t=
523fi
524
525
526
527# The following RCS revision string applies to configure.in
drh5fc27f92000-06-12 17:49:22 +0000528# $Revision: 1.3 $
drh75897232000-05-29 14:26:00 +0000529
530#########
531# Make sure we are not building in a subdirectory of the source tree.
532#
533
534temp=`echo $srcdir | grep '[^./]'`
535
536if test "$temp" = ""; then
537 { echo "configure: error:
538**************************************************************************
539** This program may not be compiled in the same directory that contains **
540** the configure script or any subdirectory of that directory. Rerun **
541** the configure script from a directory that is separate from the **
542** source tree. **
drh348784e2000-05-29 20:41:49 +0000543** **
544** See the README file for additional information. **
drh75897232000-05-29 14:26:00 +0000545**************************************************************************" 1>&2; exit 1; }
546fi
547
548#########
549# Set up an appropriate program prefix
550#
551if test "$program_prefix" = "NONE"; then
552 program_prefix=""
553fi
554
555
556#########
557# Check to see if the --with-hints=FILE option is used. If there is none,
558# then check for a files named "$host.hints" and ../$hosts.hints where
559# $host is the hostname of the build system. If still no hints are
560# found, try looking in $system.hints and ../$system.hints where
561# $system is the result of uname -s.
562#
563# Check whether --with-hints or --without-hints was given.
564if test "${with_hints+set}" = set; then
565 withval="$with_hints"
566 hints=$withval
567fi
568
569if test "$hints" = ""; then
570 host=`hostname | sed 's/\..*//'`
571 if test -r $host.hints; then
572 hints=$host.hints
573 else
574 if test -r ../$host.hints; then
575 hints=../$host.hints
576 fi
577 fi
578fi
579if test "$hints" = ""; then
580 sys=`uname -s`
581 if test -r $sys.hints; then
582 hints=$sys.hints
583 else
584 if test -r ../$sys.hints; then
585 hints=../$sys.hints
586 fi
587 fi
588fi
589if test "$hints" != ""; then
590 echo "$ac_t""reading hints from $hints" 1>&6
591 . $hints
592fi
593
594#########
595# Locate a compiler for the build machine. This compiler should
596# generate command-line programs that run on the build machine.
597#
598default_build_cflags="-g"
599if test "$config_BUILD_CC" = ""; then
600 # Extract the first word of "gcc", so it can be a program name with args.
601set dummy gcc; ac_word=$2
602echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +0000603echo "configure:604: checking for $ac_word" >&5
drh75897232000-05-29 14:26:00 +0000604if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
605 echo $ac_n "(cached) $ac_c" 1>&6
606else
607 if test -n "$CC"; then
608 ac_cv_prog_CC="$CC" # Let the user override the test.
609else
610 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
611 ac_dummy="$PATH"
612 for ac_dir in $ac_dummy; do
613 test -z "$ac_dir" && ac_dir=.
614 if test -f $ac_dir/$ac_word; then
615 ac_cv_prog_CC="gcc"
616 break
617 fi
618 done
619 IFS="$ac_save_ifs"
620fi
621fi
622CC="$ac_cv_prog_CC"
623if test -n "$CC"; then
624 echo "$ac_t""$CC" 1>&6
625else
626 echo "$ac_t""no" 1>&6
627fi
628
629if test -z "$CC"; then
630 # Extract the first word of "cc", so it can be a program name with args.
631set dummy cc; ac_word=$2
632echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +0000633echo "configure:634: checking for $ac_word" >&5
drh75897232000-05-29 14:26:00 +0000634if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
635 echo $ac_n "(cached) $ac_c" 1>&6
636else
637 if test -n "$CC"; then
638 ac_cv_prog_CC="$CC" # Let the user override the test.
639else
640 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
641 ac_prog_rejected=no
642 ac_dummy="$PATH"
643 for ac_dir in $ac_dummy; do
644 test -z "$ac_dir" && ac_dir=.
645 if test -f $ac_dir/$ac_word; then
646 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
647 ac_prog_rejected=yes
648 continue
649 fi
650 ac_cv_prog_CC="cc"
651 break
652 fi
653 done
654 IFS="$ac_save_ifs"
655if test $ac_prog_rejected = yes; then
656 # We found a bogon in the path, so make sure we never use it.
657 set dummy $ac_cv_prog_CC
658 shift
659 if test $# -gt 0; then
660 # We chose a different compiler from the bogus one.
661 # However, it has the same basename, so the bogon will be chosen
662 # first if we set CC to just the basename; use the full file name.
663 shift
664 set dummy "$ac_dir/$ac_word" "$@"
665 shift
666 ac_cv_prog_CC="$@"
667 fi
668fi
669fi
670fi
671CC="$ac_cv_prog_CC"
672if test -n "$CC"; then
673 echo "$ac_t""$CC" 1>&6
674else
675 echo "$ac_t""no" 1>&6
676fi
677
678 if test -z "$CC"; then
679 case "`uname -s`" in
680 *win32* | *WIN32*)
681 # Extract the first word of "cl", so it can be a program name with args.
682set dummy cl; ac_word=$2
683echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +0000684echo "configure:685: checking for $ac_word" >&5
drh75897232000-05-29 14:26:00 +0000685if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
686 echo $ac_n "(cached) $ac_c" 1>&6
687else
688 if test -n "$CC"; then
689 ac_cv_prog_CC="$CC" # Let the user override the test.
690else
691 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
692 ac_dummy="$PATH"
693 for ac_dir in $ac_dummy; do
694 test -z "$ac_dir" && ac_dir=.
695 if test -f $ac_dir/$ac_word; then
696 ac_cv_prog_CC="cl"
697 break
698 fi
699 done
700 IFS="$ac_save_ifs"
701fi
702fi
703CC="$ac_cv_prog_CC"
704if test -n "$CC"; then
705 echo "$ac_t""$CC" 1>&6
706else
707 echo "$ac_t""no" 1>&6
708fi
709 ;;
710 esac
711 fi
712 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
713fi
714
715echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +0000716echo "configure:717: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
drh75897232000-05-29 14:26:00 +0000717
718ac_ext=c
719# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
720ac_cpp='$CPP $CPPFLAGS'
721ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
722ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
723cross_compiling=$ac_cv_prog_cc_cross
724
725cat > conftest.$ac_ext << EOF
726
drh348784e2000-05-29 20:41:49 +0000727#line 728 "configure"
drh75897232000-05-29 14:26:00 +0000728#include "confdefs.h"
729
730main(){return(0);}
731EOF
drh348784e2000-05-29 20:41:49 +0000732if { (eval echo configure:733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
drh75897232000-05-29 14:26:00 +0000733 ac_cv_prog_cc_works=yes
734 # If we can't run a trivial program, we are probably using a cross compiler.
735 if (./conftest; exit) 2>/dev/null; then
736 ac_cv_prog_cc_cross=no
737 else
738 ac_cv_prog_cc_cross=yes
739 fi
740else
741 echo "configure: failed program was:" >&5
742 cat conftest.$ac_ext >&5
743 ac_cv_prog_cc_works=no
744fi
745rm -fr conftest*
746ac_ext=c
747# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
748ac_cpp='$CPP $CPPFLAGS'
749ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
750ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
751cross_compiling=$ac_cv_prog_cc_cross
752
753echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
754if test $ac_cv_prog_cc_works = no; then
755 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
756fi
757echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +0000758echo "configure:759: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
drh75897232000-05-29 14:26:00 +0000759echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
760cross_compiling=$ac_cv_prog_cc_cross
761
762echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +0000763echo "configure:764: checking whether we are using GNU C" >&5
drh75897232000-05-29 14:26:00 +0000764if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
765 echo $ac_n "(cached) $ac_c" 1>&6
766else
767 cat > conftest.c <<EOF
768#ifdef __GNUC__
769 yes;
770#endif
771EOF
drh348784e2000-05-29 20:41:49 +0000772if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
drh75897232000-05-29 14:26:00 +0000773 ac_cv_prog_gcc=yes
774else
775 ac_cv_prog_gcc=no
776fi
777fi
778
779echo "$ac_t""$ac_cv_prog_gcc" 1>&6
780
781if test $ac_cv_prog_gcc = yes; then
782 GCC=yes
783else
784 GCC=
785fi
786
787ac_test_CFLAGS="${CFLAGS+set}"
788ac_save_CFLAGS="$CFLAGS"
789CFLAGS=
790echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +0000791echo "configure:792: checking whether ${CC-cc} accepts -g" >&5
drh75897232000-05-29 14:26:00 +0000792if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
793 echo $ac_n "(cached) $ac_c" 1>&6
794else
795 echo 'void f(){}' > conftest.c
796if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
797 ac_cv_prog_cc_g=yes
798else
799 ac_cv_prog_cc_g=no
800fi
801rm -f conftest*
802
803fi
804
805echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
806if test "$ac_test_CFLAGS" = set; then
807 CFLAGS="$ac_save_CFLAGS"
808elif test $ac_cv_prog_cc_g = yes; then
809 if test "$GCC" = yes; then
810 CFLAGS="-g -O2"
811 else
812 CFLAGS="-g"
813 fi
814else
815 if test "$GCC" = yes; then
816 CFLAGS="-O2"
817 else
818 CFLAGS=
819 fi
820fi
821
822 if test "$cross_compiling" = "yes"; then
823 { echo "configure: error: unable to find a compiler for building build tools" 1>&2; exit 1; }
824 fi
825 BUILD_CC=$CC
826 default_build_cflags=$CFLAGS
827else
828 BUILD_CC=$config_BUILD_CC
829 echo $ac_n "checking host compiler""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +0000830echo "configure:831: checking host compiler" >&5
drh75897232000-05-29 14:26:00 +0000831 CC=$BUILD_CC
832 echo "$ac_t""$BUILD_CC" 1>&6
833fi
834echo $ac_n "checking switches for the host compiler""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +0000835echo "configure:836: checking switches for the host compiler" >&5
drh75897232000-05-29 14:26:00 +0000836if test "$config_BUILD_CFLAGS" != ""; then
837 CFLAGS=$config_BUILD_CFLAGS
838 BUILD_CFLAGS=$config_BUILD_CFLAGS
839else
840 BUILD_CFLAGS=$default_build_cflags
841fi
842echo "$ac_t""$BUILD_CFLAGS" 1>&6
843if test "$config_BUILD_LIBS" != ""; then
844 BUILD_LIBS=$config_BUILD_LIBS
845fi
846
847
848
849
850##########
851# Locate a compiler that converts C code into *.o files that run on
852# the target machine.
853#
854echo $ac_n "checking target compiler""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +0000855echo "configure:856: checking target compiler" >&5
drh75897232000-05-29 14:26:00 +0000856if test "$config_TARGET_CC" != ""; then
857 TARGET_CC=$config_TARGET_CC
858else
859 TARGET_CC=$BUILD_CC
860fi
861echo "$ac_t""$TARGET_CC" 1>&6
862echo $ac_n "checking switches on the target compiler""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +0000863echo "configure:864: checking switches on the target compiler" >&5
drh75897232000-05-29 14:26:00 +0000864if test "$config_TARGET_CFLAGS" != ""; then
865 TARGET_CFLAGS=$config_TARGET_CFLAGS
866else
867 TARGET_CFLAGS=$BUILD_CFLAGS
868fi
869echo "$ac_t""$TARGET_CFLAGS" 1>&6
870echo $ac_n "checking target linker""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +0000871echo "configure:872: checking target linker" >&5
drh75897232000-05-29 14:26:00 +0000872if test "$config_TARGET_LINK" = ""; then
873 TARGET_LINK=$TARGET_CC
874else
875 TARGET_LINK=$config_TARGET_LINK
876fi
877echo "$ac_t""$TARGET_LINK" 1>&6
878echo $ac_n "checking switches on the target compiler""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +0000879echo "configure:880: checking switches on the target compiler" >&5
drh75897232000-05-29 14:26:00 +0000880if test "$config_TARGET_TFLAGS" != ""; then
881 TARGET_TFLAGS=$config_TARGET_TFLAGS
882else
883 TARGET_TFLAGS=$BUILD_CFLAGS
884fi
885if test "$config_TARGET_RANLIB" != ""; then
886 TARGET_RANLIB=$config_TARGET_RANLIB
887else
888 # Extract the first word of "ranlib", so it can be a program name with args.
889set dummy ranlib; ac_word=$2
890echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +0000891echo "configure:892: checking for $ac_word" >&5
drh75897232000-05-29 14:26:00 +0000892if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
893 echo $ac_n "(cached) $ac_c" 1>&6
894else
895 if test -n "$RANLIB"; then
896 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
897else
898 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
899 ac_dummy="$PATH"
900 for ac_dir in $ac_dummy; do
901 test -z "$ac_dir" && ac_dir=.
902 if test -f $ac_dir/$ac_word; then
903 ac_cv_prog_RANLIB="ranlib"
904 break
905 fi
906 done
907 IFS="$ac_save_ifs"
908 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
909fi
910fi
911RANLIB="$ac_cv_prog_RANLIB"
912if test -n "$RANLIB"; then
913 echo "$ac_t""$RANLIB" 1>&6
914else
915 echo "$ac_t""no" 1>&6
916fi
917
918 TARGET_RANLIB=$RANLIB
919fi
920if test "$config_TARGET_AR" != ""; then
921 TARGET_RANLIB=$config_TARGET_AR
922else
923 TARGET_AR='ar cr'
924fi
925echo "$ac_t""$TARGET_TFLAGS" 1>&6
926
927
928
929
930
931
932
933# Set the $cross variable if we are cross-compiling. Make
934# it 0 if we are not.
935#
936echo $ac_n "checking if host and target compilers are the same""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +0000937echo "configure:938: checking if host and target compilers are the same" >&5
drh75897232000-05-29 14:26:00 +0000938if test "$BUILD_CC" = "$TARGET_CC"; then
939 cross=0
940 echo "$ac_t""yes" 1>&6
941else
942 cross=1
943 echo "$ac_t""no" 1>&6
944fi
945
946###########
947# Lots of things are different if we are compiling for Windows using
948# the CYGWIN environment. So check for that special case and handle
949# things accordingly.
950#
951echo $ac_n "checking if executables have the .exe suffix""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +0000952echo "configure:953: checking if executables have the .exe suffix" >&5
drh75897232000-05-29 14:26:00 +0000953if test "$config_BUILD_EXEEXT" = ".exe"; then
954 CYGWIN=yes
955 echo "$ac_t""yes" 1>&6
956else
957 echo "$ac_t""unknown" 1>&6
958fi
959if test "$CYGWIN" != "yes"; then
960 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +0000961echo "configure:962: checking for Cygwin environment" >&5
drh75897232000-05-29 14:26:00 +0000962if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
963 echo $ac_n "(cached) $ac_c" 1>&6
964else
965 cat > conftest.$ac_ext <<EOF
drh348784e2000-05-29 20:41:49 +0000966#line 967 "configure"
drh75897232000-05-29 14:26:00 +0000967#include "confdefs.h"
968
969int main() {
970
971#ifndef __CYGWIN__
972#define __CYGWIN__ __CYGWIN32__
973#endif
974return __CYGWIN__;
975; return 0; }
976EOF
drh348784e2000-05-29 20:41:49 +0000977if { (eval echo configure:978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
drh75897232000-05-29 14:26:00 +0000978 rm -rf conftest*
979 ac_cv_cygwin=yes
980else
981 echo "configure: failed program was:" >&5
982 cat conftest.$ac_ext >&5
983 rm -rf conftest*
984 ac_cv_cygwin=no
985fi
986rm -f conftest*
987rm -f conftest*
988fi
989
990echo "$ac_t""$ac_cv_cygwin" 1>&6
991CYGWIN=
992test "$ac_cv_cygwin" = yes && CYGWIN=yes
993fi
994if test "$CYGWIN" = "yes"; then
995 BUILD_EXEEXT=.exe
996else
997 BUILD_EXEEXT=""
998fi
999if test "$cross" = "0"; then
1000 TARGET_EXEEXT=$BUILD_EXEEXT
1001else
1002 TARGET_EXEEXT=$config_TARGET_EXEEXT
1003fi
1004if test "$TARGET_EXEEXT" = ".exe"; then
1005 OS_UNIX=0
1006 OS_WIN=1
1007 tclsubdir=win
1008else
1009 OS_UNIX=1
1010 OS_WIN=0
1011 tclsubdir=unix
1012fi
1013TARGET_CFLAGS="$TARGET_CFLAGS -DOS_UNIX=$OS_UNIX -DOS_WIN=$OS_WIN"
1014
1015
1016
1017
1018
1019
1020##########
1021# Extract generic linker options from the environment.
1022#
1023if test "$config_TARGET_LIBS" != ""; then
1024 TARGET_LIBS=$config_TARGET_LIBS
1025else
1026 TARGET_LIBS=""
1027fi
1028
1029
1030##########
1031# Figure out what C libraries are required to compile Tcl programs.
1032#
1033if test "$config_TARGET_TCL_LIBS" != ""; then
1034 TARGET_TCL_LIBS="$config_TARGET_TCL_LIBS"
1035else
1036 if test "$with_tcl" != ""; then
1037 extra=`echo $with_tcl/$tclsubdir/libtcl8*.a`
1038 fi
1039 CC=$TARGET_CC
1040 echo $ac_n "checking for sin""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +00001041echo "configure:1042: checking for sin" >&5
drh75897232000-05-29 14:26:00 +00001042if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
1043 echo $ac_n "(cached) $ac_c" 1>&6
1044else
1045 cat > conftest.$ac_ext <<EOF
drh348784e2000-05-29 20:41:49 +00001046#line 1047 "configure"
drh75897232000-05-29 14:26:00 +00001047#include "confdefs.h"
1048/* System header to define __stub macros and hopefully few prototypes,
1049 which can conflict with char sin(); below. */
1050#include <assert.h>
1051/* Override any gcc2 internal prototype to avoid an error. */
1052/* We use char because int might match the return type of a gcc2
1053 builtin and then its argument prototype would still apply. */
1054char sin();
1055
1056int main() {
1057
1058/* The GNU C library defines this for functions which it implements
1059 to always fail with ENOSYS. Some functions are actually named
1060 something starting with __ and the normal name is an alias. */
1061#if defined (__stub_sin) || defined (__stub___sin)
1062choke me
1063#else
1064sin();
1065#endif
1066
1067; return 0; }
1068EOF
drh348784e2000-05-29 20:41:49 +00001069if { (eval echo configure:1070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
drh75897232000-05-29 14:26:00 +00001070 rm -rf conftest*
1071 eval "ac_cv_func_sin=yes"
1072else
1073 echo "configure: failed program was:" >&5
1074 cat conftest.$ac_ext >&5
1075 rm -rf conftest*
1076 eval "ac_cv_func_sin=no"
1077fi
1078rm -f conftest*
1079fi
1080
1081if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
1082 echo "$ac_t""yes" 1>&6
1083 LIBS=""
1084else
1085 echo "$ac_t""no" 1>&6
1086LIBS="-lm"
1087fi
1088
1089 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +00001090echo "configure:1091: checking for dlopen in -ldl" >&5
drh75897232000-05-29 14:26:00 +00001091ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
1092if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1093 echo $ac_n "(cached) $ac_c" 1>&6
1094else
1095 ac_save_LIBS="$LIBS"
1096LIBS="-ldl $LIBS"
1097cat > conftest.$ac_ext <<EOF
drh348784e2000-05-29 20:41:49 +00001098#line 1099 "configure"
drh75897232000-05-29 14:26:00 +00001099#include "confdefs.h"
1100/* Override any gcc2 internal prototype to avoid an error. */
1101/* We use char because int might match the return type of a gcc2
1102 builtin and then its argument prototype would still apply. */
1103char dlopen();
1104
1105int main() {
1106dlopen()
1107; return 0; }
1108EOF
drh348784e2000-05-29 20:41:49 +00001109if { (eval echo configure:1110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
drh75897232000-05-29 14:26:00 +00001110 rm -rf conftest*
1111 eval "ac_cv_lib_$ac_lib_var=yes"
1112else
1113 echo "configure: failed program was:" >&5
1114 cat conftest.$ac_ext >&5
1115 rm -rf conftest*
1116 eval "ac_cv_lib_$ac_lib_var=no"
1117fi
1118rm -f conftest*
1119LIBS="$ac_save_LIBS"
1120
1121fi
1122if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1123 echo "$ac_t""yes" 1>&6
1124 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1125 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1126 cat >> confdefs.h <<EOF
1127#define $ac_tr_lib 1
1128EOF
1129
1130 LIBS="-ldl $LIBS"
1131
1132else
1133 echo "$ac_t""no" 1>&6
1134fi
1135
1136 otherlibs=$LIBS
1137 if test "$extra" != ""; then
1138 LIBS=$extra
1139 else
1140 LIBS=""
1141
1142echo $ac_n "checking for library containing Tcl_Init""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +00001143echo "configure:1144: checking for library containing Tcl_Init" >&5
drh75897232000-05-29 14:26:00 +00001144if eval "test \"`echo '$''{'ac_cv_search_Tcl_Init'+set}'`\" = set"; then
1145 echo $ac_n "(cached) $ac_c" 1>&6
1146else
1147 ac_func_search_save_LIBS="$LIBS"
1148ac_cv_search_Tcl_Init="no"
1149cat > conftest.$ac_ext <<EOF
drh348784e2000-05-29 20:41:49 +00001150#line 1151 "configure"
drh75897232000-05-29 14:26:00 +00001151#include "confdefs.h"
1152/* Override any gcc2 internal prototype to avoid an error. */
1153/* We use char because int might match the return type of a gcc2
1154 builtin and then its argument prototype would still apply. */
1155char Tcl_Init();
1156
1157int main() {
1158Tcl_Init()
1159; return 0; }
1160EOF
drh348784e2000-05-29 20:41:49 +00001161if { (eval echo configure:1162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
drh75897232000-05-29 14:26:00 +00001162 rm -rf conftest*
1163 ac_cv_search_Tcl_Init="none required"
1164else
1165 echo "configure: failed program was:" >&5
1166 cat conftest.$ac_ext >&5
1167fi
1168rm -f conftest*
1169test "$ac_cv_search_Tcl_Init" = "no" && for i in tcl8.4 tcl8.3 tcl8.2 tcl8.1 tcl8.0 tcl80 tcl; do
1170LIBS="-l$i $otherlibs $ac_func_search_save_LIBS"
1171cat > conftest.$ac_ext <<EOF
drh348784e2000-05-29 20:41:49 +00001172#line 1173 "configure"
drh75897232000-05-29 14:26:00 +00001173#include "confdefs.h"
1174/* Override any gcc2 internal prototype to avoid an error. */
1175/* We use char because int might match the return type of a gcc2
1176 builtin and then its argument prototype would still apply. */
1177char Tcl_Init();
1178
1179int main() {
1180Tcl_Init()
1181; return 0; }
1182EOF
drh348784e2000-05-29 20:41:49 +00001183if { (eval echo configure:1184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
drh75897232000-05-29 14:26:00 +00001184 rm -rf conftest*
1185 ac_cv_search_Tcl_Init="-l$i"
1186break
1187else
1188 echo "configure: failed program was:" >&5
1189 cat conftest.$ac_ext >&5
1190fi
1191rm -f conftest*
1192done
1193LIBS="$ac_func_search_save_LIBS"
1194fi
1195
1196echo "$ac_t""$ac_cv_search_Tcl_Init" 1>&6
1197if test "$ac_cv_search_Tcl_Init" != "no"; then
1198 test "$ac_cv_search_Tcl_Init" = "none required" || LIBS="$ac_cv_search_Tcl_Init $LIBS"
1199
1200else :
1201
1202fi
1203 fi
1204 TARGET_TCL_LIBS="$LIBS $otherlibs"
1205fi
1206
1207
1208##########
1209# Figure out where to get the TCL header files.
1210#
1211echo $ac_n "checking TCL header files""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +00001212echo "configure:1213: checking TCL header files" >&5
drh75897232000-05-29 14:26:00 +00001213found=no
1214if test "$config_TARGET_TCL_INC" != ""; then
1215 TARGET_TCL_INC=$config_TARGET_TCL_INC
1216 found=yes
1217else
1218 if test "$with_tcl" != ""; then
1219 TARGET_TCL_INC="-I$with_tcl/generic -I$with_tcl/$tclsubdir"
1220 found=yes
1221 else
1222 TARGET_TCL_INC=""
1223 found=no
1224 fi
1225fi
1226if test "$found" = "yes"; then
1227 echo "$ac_t""$TARGET_TCL_INC" 1>&6
1228else
1229 echo "$ac_t""not specified: still searching..." 1>&6
1230 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +00001231echo "configure:1232: checking how to run the C preprocessor" >&5
drh75897232000-05-29 14:26:00 +00001232# On Suns, sometimes $CPP names a directory.
1233if test -n "$CPP" && test -d "$CPP"; then
1234 CPP=
1235fi
1236if test -z "$CPP"; then
1237if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1238 echo $ac_n "(cached) $ac_c" 1>&6
1239else
1240 # This must be in double quotes, not single quotes, because CPP may get
1241 # substituted into the Makefile and "${CC-cc}" will confuse make.
1242 CPP="${CC-cc} -E"
1243 # On the NeXT, cc -E runs the code through the compiler's parser,
1244 # not just through cpp.
1245 cat > conftest.$ac_ext <<EOF
drh348784e2000-05-29 20:41:49 +00001246#line 1247 "configure"
drh75897232000-05-29 14:26:00 +00001247#include "confdefs.h"
1248#include <assert.h>
1249Syntax Error
1250EOF
1251ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
drh348784e2000-05-29 20:41:49 +00001252{ (eval echo configure:1253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
drh75897232000-05-29 14:26:00 +00001253ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1254if test -z "$ac_err"; then
1255 :
1256else
1257 echo "$ac_err" >&5
1258 echo "configure: failed program was:" >&5
1259 cat conftest.$ac_ext >&5
1260 rm -rf conftest*
1261 CPP="${CC-cc} -E -traditional-cpp"
1262 cat > conftest.$ac_ext <<EOF
drh348784e2000-05-29 20:41:49 +00001263#line 1264 "configure"
drh75897232000-05-29 14:26:00 +00001264#include "confdefs.h"
1265#include <assert.h>
1266Syntax Error
1267EOF
1268ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
drh348784e2000-05-29 20:41:49 +00001269{ (eval echo configure:1270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
drh75897232000-05-29 14:26:00 +00001270ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1271if test -z "$ac_err"; then
1272 :
1273else
1274 echo "$ac_err" >&5
1275 echo "configure: failed program was:" >&5
1276 cat conftest.$ac_ext >&5
1277 rm -rf conftest*
1278 CPP="${CC-cc} -nologo -E"
1279 cat > conftest.$ac_ext <<EOF
drh348784e2000-05-29 20:41:49 +00001280#line 1281 "configure"
drh75897232000-05-29 14:26:00 +00001281#include "confdefs.h"
1282#include <assert.h>
1283Syntax Error
1284EOF
1285ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
drh348784e2000-05-29 20:41:49 +00001286{ (eval echo configure:1287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
drh75897232000-05-29 14:26:00 +00001287ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1288if test -z "$ac_err"; then
1289 :
1290else
1291 echo "$ac_err" >&5
1292 echo "configure: failed program was:" >&5
1293 cat conftest.$ac_ext >&5
1294 rm -rf conftest*
1295 CPP=/lib/cpp
1296fi
1297rm -f conftest*
1298fi
1299rm -f conftest*
1300fi
1301rm -f conftest*
1302 ac_cv_prog_CPP="$CPP"
1303fi
1304 CPP="$ac_cv_prog_CPP"
1305else
1306 ac_cv_prog_CPP="$CPP"
1307fi
1308echo "$ac_t""$CPP" 1>&6
1309
1310ac_safe=`echo "tcl.h" | sed 'y%./+-%__p_%'`
1311echo $ac_n "checking for tcl.h""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +00001312echo "configure:1313: checking for tcl.h" >&5
drh75897232000-05-29 14:26:00 +00001313if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1314 echo $ac_n "(cached) $ac_c" 1>&6
1315else
1316 cat > conftest.$ac_ext <<EOF
drh348784e2000-05-29 20:41:49 +00001317#line 1318 "configure"
drh75897232000-05-29 14:26:00 +00001318#include "confdefs.h"
1319#include <tcl.h>
1320EOF
1321ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
drh348784e2000-05-29 20:41:49 +00001322{ (eval echo configure:1323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
drh75897232000-05-29 14:26:00 +00001323ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1324if test -z "$ac_err"; then
1325 rm -rf conftest*
1326 eval "ac_cv_header_$ac_safe=yes"
1327else
1328 echo "$ac_err" >&5
1329 echo "configure: failed program was:" >&5
1330 cat conftest.$ac_ext >&5
1331 rm -rf conftest*
1332 eval "ac_cv_header_$ac_safe=no"
1333fi
1334rm -f conftest*
1335fi
1336if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1337 echo "$ac_t""yes" 1>&6
1338 found=yes
1339else
1340 echo "$ac_t""no" 1>&6
1341fi
1342
1343fi
1344if test "$found" = "no"; then
1345 for dir in /usr/local /usr/X11* /usr/pkg /usr/contrib /usr; do
1346
1347ac_safe=`echo "$dir/include/tcl.h" | sed 'y%./+-%__p_%'`
1348echo $ac_n "checking for $dir/include/tcl.h""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +00001349echo "configure:1350: checking for $dir/include/tcl.h" >&5
drh75897232000-05-29 14:26:00 +00001350if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
1351 echo $ac_n "(cached) $ac_c" 1>&6
1352else
1353 if test "$cross_compiling" = yes; then
1354 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
1355else
1356 if test -r $dir/include/tcl.h; then
1357 eval "ac_cv_file_$ac_safe=yes"
1358 else
1359 eval "ac_cv_file_$ac_safe=no"
1360 fi
1361fi
1362fi
1363if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
1364 echo "$ac_t""yes" 1>&6
1365 found=yes
1366else
1367 echo "$ac_t""no" 1>&6
1368
1369fi
1370
1371 if test "$found" = "yes"; then
1372 TARGET_TCL_INC="-I$dir/include"
1373 break
1374 fi
1375 done
1376fi
1377
1378
1379##########
1380# Figure out what C libraries are required to compile programs
1381# that use GDBM.
1382#
1383if test "$config_TARGET_GDBM_LIBS" != ""; then
1384 TARGET_GDBM_LIBS="$config_TARGET_GDBM_LIBS"
1385else
1386 CC=$TARGET_CC
1387 LIBS=""
1388
1389echo $ac_n "checking for library containing gdbm_open""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +00001390echo "configure:1391: checking for library containing gdbm_open" >&5
drh75897232000-05-29 14:26:00 +00001391if eval "test \"`echo '$''{'ac_cv_search_gdbm_open'+set}'`\" = set"; then
1392 echo $ac_n "(cached) $ac_c" 1>&6
1393else
1394 ac_func_search_save_LIBS="$LIBS"
1395ac_cv_search_gdbm_open="no"
1396cat > conftest.$ac_ext <<EOF
drh348784e2000-05-29 20:41:49 +00001397#line 1398 "configure"
drh75897232000-05-29 14:26:00 +00001398#include "confdefs.h"
1399/* Override any gcc2 internal prototype to avoid an error. */
1400/* We use char because int might match the return type of a gcc2
1401 builtin and then its argument prototype would still apply. */
1402char gdbm_open();
1403
1404int main() {
1405gdbm_open()
1406; return 0; }
1407EOF
drh348784e2000-05-29 20:41:49 +00001408if { (eval echo configure:1409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
drh75897232000-05-29 14:26:00 +00001409 rm -rf conftest*
1410 ac_cv_search_gdbm_open="none required"
1411else
1412 echo "configure: failed program was:" >&5
1413 cat conftest.$ac_ext >&5
1414fi
1415rm -f conftest*
1416test "$ac_cv_search_gdbm_open" = "no" && for i in gdbm; do
1417LIBS="-l$i $ac_func_search_save_LIBS"
1418cat > conftest.$ac_ext <<EOF
drh348784e2000-05-29 20:41:49 +00001419#line 1420 "configure"
drh75897232000-05-29 14:26:00 +00001420#include "confdefs.h"
1421/* Override any gcc2 internal prototype to avoid an error. */
1422/* We use char because int might match the return type of a gcc2
1423 builtin and then its argument prototype would still apply. */
1424char gdbm_open();
1425
1426int main() {
1427gdbm_open()
1428; return 0; }
1429EOF
drh348784e2000-05-29 20:41:49 +00001430if { (eval echo configure:1431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
drh75897232000-05-29 14:26:00 +00001431 rm -rf conftest*
1432 ac_cv_search_gdbm_open="-l$i"
1433break
1434else
1435 echo "configure: failed program was:" >&5
1436 cat conftest.$ac_ext >&5
1437fi
1438rm -f conftest*
1439done
1440LIBS="$ac_func_search_save_LIBS"
1441fi
1442
1443echo "$ac_t""$ac_cv_search_gdbm_open" 1>&6
1444if test "$ac_cv_search_gdbm_open" != "no"; then
1445 test "$ac_cv_search_gdbm_open" = "none required" || LIBS="$ac_cv_search_gdbm_open $LIBS"
1446
1447else :
1448
1449fi
1450 TARGET_GDBM_LIBS="$LIBS"
1451fi
1452
1453
1454##########
1455# Figure out where to get the GDBM header files.
1456#
1457echo $ac_n "checking GDBM header files""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +00001458echo "configure:1459: checking GDBM header files" >&5
drh75897232000-05-29 14:26:00 +00001459found=no
1460if test "$config_TARGET_GDBM_INC" != ""; then
1461 TARGET_GDBM_INC=$config_TARGET_GDBM_INC
1462 found=yes
1463fi
1464if test "$found" = "yes"; then
drh5fc27f92000-06-12 17:49:22 +00001465 echo "$ac_t""$TARGET_GDBM_INC" 1>&6
drh75897232000-05-29 14:26:00 +00001466else
1467 echo "$ac_t""not specified: still searching..." 1>&6
1468 ac_safe=`echo "gdbm.h" | sed 'y%./+-%__p_%'`
1469echo $ac_n "checking for gdbm.h""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +00001470echo "configure:1471: checking for gdbm.h" >&5
drh75897232000-05-29 14:26:00 +00001471if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1472 echo $ac_n "(cached) $ac_c" 1>&6
1473else
1474 cat > conftest.$ac_ext <<EOF
drh348784e2000-05-29 20:41:49 +00001475#line 1476 "configure"
drh75897232000-05-29 14:26:00 +00001476#include "confdefs.h"
1477#include <gdbm.h>
1478EOF
1479ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
drh348784e2000-05-29 20:41:49 +00001480{ (eval echo configure:1481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
drh75897232000-05-29 14:26:00 +00001481ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1482if test -z "$ac_err"; then
1483 rm -rf conftest*
1484 eval "ac_cv_header_$ac_safe=yes"
1485else
1486 echo "$ac_err" >&5
1487 echo "configure: failed program was:" >&5
1488 cat conftest.$ac_ext >&5
1489 rm -rf conftest*
1490 eval "ac_cv_header_$ac_safe=no"
1491fi
1492rm -f conftest*
1493fi
1494if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1495 echo "$ac_t""yes" 1>&6
1496 found=yes
1497else
1498 echo "$ac_t""no" 1>&6
1499fi
1500
1501fi
1502if test "$found" = "no"; then
1503 for dir in /usr/local /usr/pkg /usr/contrib; do
1504
1505ac_safe=`echo "$dir/include/gdbm.h" | sed 'y%./+-%__p_%'`
1506echo $ac_n "checking for $dir/include/gdbm.h""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +00001507echo "configure:1508: checking for $dir/include/gdbm.h" >&5
drh75897232000-05-29 14:26:00 +00001508if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
1509 echo $ac_n "(cached) $ac_c" 1>&6
1510else
1511 if test "$cross_compiling" = yes; then
1512 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
1513else
1514 if test -r $dir/include/gdbm.h; then
1515 eval "ac_cv_file_$ac_safe=yes"
1516 else
1517 eval "ac_cv_file_$ac_safe=no"
1518 fi
1519fi
1520fi
1521if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
1522 echo "$ac_t""yes" 1>&6
1523 found=yes
1524else
1525 echo "$ac_t""no" 1>&6
1526
1527fi
1528
1529 if test "$found" = "yes"; then
1530 TARGET_GDBM_INC="-I$dir/include"
1531 break
1532 fi
1533 done
1534fi
1535
1536
1537##########
1538# Figure out what C libraries are required to compile programs
1539# that use "readline()" library.
1540#
1541if test "$config_TARGET_READLINE_LIBS" != ""; then
1542 TARGET_READLINE_LIBS="$config_TARGET_READLINE_LIBS"
1543else
1544 CC=$TARGET_CC
1545 LIBS=""
1546
1547echo $ac_n "checking for library containing readline""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +00001548echo "configure:1549: checking for library containing readline" >&5
drh75897232000-05-29 14:26:00 +00001549if eval "test \"`echo '$''{'ac_cv_search_readline'+set}'`\" = set"; then
1550 echo $ac_n "(cached) $ac_c" 1>&6
1551else
1552 ac_func_search_save_LIBS="$LIBS"
1553ac_cv_search_readline="no"
1554cat > conftest.$ac_ext <<EOF
drh348784e2000-05-29 20:41:49 +00001555#line 1556 "configure"
drh75897232000-05-29 14:26:00 +00001556#include "confdefs.h"
1557/* Override any gcc2 internal prototype to avoid an error. */
1558/* We use char because int might match the return type of a gcc2
1559 builtin and then its argument prototype would still apply. */
1560char readline();
1561
1562int main() {
1563readline()
1564; return 0; }
1565EOF
drh348784e2000-05-29 20:41:49 +00001566if { (eval echo configure:1567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
drh75897232000-05-29 14:26:00 +00001567 rm -rf conftest*
1568 ac_cv_search_readline="none required"
1569else
1570 echo "configure: failed program was:" >&5
1571 cat conftest.$ac_ext >&5
1572fi
1573rm -f conftest*
1574test "$ac_cv_search_readline" = "no" && for i in readline; do
1575LIBS="-l$i $ac_func_search_save_LIBS"
1576cat > conftest.$ac_ext <<EOF
drh348784e2000-05-29 20:41:49 +00001577#line 1578 "configure"
drh75897232000-05-29 14:26:00 +00001578#include "confdefs.h"
1579/* Override any gcc2 internal prototype to avoid an error. */
1580/* We use char because int might match the return type of a gcc2
1581 builtin and then its argument prototype would still apply. */
1582char readline();
1583
1584int main() {
1585readline()
1586; return 0; }
1587EOF
drh348784e2000-05-29 20:41:49 +00001588if { (eval echo configure:1589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
drh75897232000-05-29 14:26:00 +00001589 rm -rf conftest*
1590 ac_cv_search_readline="-l$i"
1591break
1592else
1593 echo "configure: failed program was:" >&5
1594 cat conftest.$ac_ext >&5
1595fi
1596rm -f conftest*
1597done
1598LIBS="$ac_func_search_save_LIBS"
1599fi
1600
1601echo "$ac_t""$ac_cv_search_readline" 1>&6
1602if test "$ac_cv_search_readline" != "no"; then
1603 test "$ac_cv_search_readline" = "none required" || LIBS="$ac_cv_search_readline $LIBS"
1604
1605else :
1606
1607fi
1608 TARGET_READLINE_LIBS="$LIBS"
1609fi
1610
1611
1612##########
1613# Figure out where to get the READLINE header files.
1614#
1615echo $ac_n "checking readline header files""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +00001616echo "configure:1617: checking readline header files" >&5
drh75897232000-05-29 14:26:00 +00001617found=no
1618if test "$config_TARGET_READLINE_INC" != ""; then
1619 TARGET_READLINE_INC=$config_TARGET_READLINE_INC
1620 found=yes
1621fi
1622if test "$found" = "yes"; then
1623 echo "$ac_t""$TARGET_READLINE_INC" 1>&6
1624else
1625 echo "$ac_t""not specified: still searching..." 1>&6
1626 ac_safe=`echo "readline.h" | sed 'y%./+-%__p_%'`
1627echo $ac_n "checking for readline.h""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +00001628echo "configure:1629: checking for readline.h" >&5
drh75897232000-05-29 14:26:00 +00001629if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1630 echo $ac_n "(cached) $ac_c" 1>&6
1631else
1632 cat > conftest.$ac_ext <<EOF
drh348784e2000-05-29 20:41:49 +00001633#line 1634 "configure"
drh75897232000-05-29 14:26:00 +00001634#include "confdefs.h"
1635#include <readline.h>
1636EOF
1637ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
drh348784e2000-05-29 20:41:49 +00001638{ (eval echo configure:1639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
drh75897232000-05-29 14:26:00 +00001639ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1640if test -z "$ac_err"; then
1641 rm -rf conftest*
1642 eval "ac_cv_header_$ac_safe=yes"
1643else
1644 echo "$ac_err" >&5
1645 echo "configure: failed program was:" >&5
1646 cat conftest.$ac_ext >&5
1647 rm -rf conftest*
1648 eval "ac_cv_header_$ac_safe=no"
1649fi
1650rm -f conftest*
1651fi
1652if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1653 echo "$ac_t""yes" 1>&6
1654 found=yes
1655else
1656 echo "$ac_t""no" 1>&6
1657fi
1658
1659fi
1660if test "$found" = "no"; then
1661 for dir in /usr /usr/local /usr/local/readline /usr/contrib; do
1662
1663ac_safe=`echo "$dir/include/readline.h" | sed 'y%./+-%__p_%'`
1664echo $ac_n "checking for $dir/include/readline.h""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +00001665echo "configure:1666: checking for $dir/include/readline.h" >&5
drh75897232000-05-29 14:26:00 +00001666if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
1667 echo $ac_n "(cached) $ac_c" 1>&6
1668else
1669 if test "$cross_compiling" = yes; then
1670 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
1671else
1672 if test -r $dir/include/readline.h; then
1673 eval "ac_cv_file_$ac_safe=yes"
1674 else
1675 eval "ac_cv_file_$ac_safe=no"
1676 fi
1677fi
1678fi
1679if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
1680 echo "$ac_t""yes" 1>&6
1681 found=yes
1682else
1683 echo "$ac_t""no" 1>&6
1684
1685fi
1686
1687 if test "$found" = "yes"; then
1688 TARGET_READLINE_INC="-I$dir/include"
1689 break
1690 fi
1691
1692ac_safe=`echo "$dir/include/readline/readline.h" | sed 'y%./+-%__p_%'`
1693echo $ac_n "checking for $dir/include/readline/readline.h""... $ac_c" 1>&6
drh348784e2000-05-29 20:41:49 +00001694echo "configure:1695: checking for $dir/include/readline/readline.h" >&5
drh75897232000-05-29 14:26:00 +00001695if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
1696 echo $ac_n "(cached) $ac_c" 1>&6
1697else
1698 if test "$cross_compiling" = yes; then
1699 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
1700else
1701 if test -r $dir/include/readline/readline.h; then
1702 eval "ac_cv_file_$ac_safe=yes"
1703 else
1704 eval "ac_cv_file_$ac_safe=no"
1705 fi
1706fi
1707fi
1708if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
1709 echo "$ac_t""yes" 1>&6
1710 found=yes
1711else
1712 echo "$ac_t""no" 1>&6
1713
1714fi
1715
1716 if test "$found" = "yes"; then
1717 TARGET_READLINE_INC="-I$dir/include/readline"
1718 break
1719 fi
1720 done
1721fi
1722if test "$found" = "yes"; then
1723 TARGET_HAVE_READLINE=1
1724else
1725 TARGET_HAVE_READLINE=0
1726fi
1727
1728
1729
1730#########
1731# Generate the output files.
1732#
1733trap '' 1 2 15
1734cat > confcache <<\EOF
1735# This file is a shell script that caches the results of configure
1736# tests run on this system so they can be shared between configure
1737# scripts and configure runs. It is not useful on other systems.
1738# If it contains results you don't want to keep, you may remove or edit it.
1739#
1740# By default, configure uses ./config.cache as the cache file,
1741# creating it if it does not exist already. You can give configure
1742# the --cache-file=FILE option to use a different cache file; that is
1743# what configure does when it calls configure scripts in
1744# subdirectories, so they share the cache.
1745# Giving --cache-file=/dev/null disables caching, for debugging configure.
1746# config.status only pays attention to the cache file if you give it the
1747# --recheck option to rerun configure.
1748#
1749EOF
1750# The following way of writing the cache mishandles newlines in values,
1751# but we know of no workaround that is simple, portable, and efficient.
1752# So, don't put newlines in cache variables' values.
1753# Ultrix sh set writes to stderr and can't be redirected directly,
1754# and sets the high bit in the cache file unless we assign to the vars.
1755(set) 2>&1 |
1756 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1757 *ac_space=\ *)
1758 # `set' does not quote correctly, so add quotes (double-quote substitution
1759 # turns \\\\ into \\, and sed turns \\ into \).
1760 sed -n \
1761 -e "s/'/'\\\\''/g" \
1762 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1763 ;;
1764 *)
1765 # `set' quotes correctly as required by POSIX, so do not add quotes.
1766 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1767 ;;
1768 esac >> confcache
1769if cmp -s $cache_file confcache; then
1770 :
1771else
1772 if test -w $cache_file; then
1773 echo "updating cache $cache_file"
1774 cat confcache > $cache_file
1775 else
1776 echo "not updating unwritable cache $cache_file"
1777 fi
1778fi
1779rm -f confcache
1780
1781trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1782
1783test "x$prefix" = xNONE && prefix=$ac_default_prefix
1784# Let make expand exec_prefix.
1785test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1786
1787# Any assignment to VPATH causes Sun make to only execute
1788# the first set of double-colon rules, so remove it if not needed.
1789# If there is a colon in the path, we need to keep it.
1790if test "x$srcdir" = x.; then
1791 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1792fi
1793
1794trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1795
1796# Transform confdefs.h into DEFS.
1797# Protect against shell expansion while executing Makefile rules.
1798# Protect against Makefile macro expansion.
1799cat > conftest.defs <<\EOF
1800s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
1801s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
1802s%\[%\\&%g
1803s%\]%\\&%g
1804s%\$%$$%g
1805EOF
1806DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1807rm -f conftest.defs
1808
1809
1810# Without the "./", some shells look in PATH for config.status.
1811: ${CONFIG_STATUS=./config.status}
1812
1813echo creating $CONFIG_STATUS
1814rm -f $CONFIG_STATUS
1815cat > $CONFIG_STATUS <<EOF
1816#! /bin/sh
1817# Generated automatically by configure.
1818# Run this file to recreate the current configuration.
1819# This directory was configured as follows,
1820# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1821#
1822# $0 $ac_configure_args
1823#
1824# Compiler output produced by configure, useful for debugging
1825# configure, is in ./config.log if it exists.
1826
1827ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1828for ac_option
1829do
1830 case "\$ac_option" in
1831 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1832 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1833 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1834 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1835 echo "$CONFIG_STATUS generated by autoconf version 2.13"
1836 exit 0 ;;
1837 -help | --help | --hel | --he | --h)
1838 echo "\$ac_cs_usage"; exit 0 ;;
1839 *) echo "\$ac_cs_usage"; exit 1 ;;
1840 esac
1841done
1842
1843ac_given_srcdir=$srcdir
1844
1845trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1846EOF
1847cat >> $CONFIG_STATUS <<EOF
1848
1849# Protect against being on the right side of a sed subst in config.status.
1850sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1851 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1852$ac_vpsub
1853$extrasub
1854s%@SHELL@%$SHELL%g
1855s%@CFLAGS@%$CFLAGS%g
1856s%@CPPFLAGS@%$CPPFLAGS%g
1857s%@CXXFLAGS@%$CXXFLAGS%g
1858s%@FFLAGS@%$FFLAGS%g
1859s%@DEFS@%$DEFS%g
1860s%@LDFLAGS@%$LDFLAGS%g
1861s%@LIBS@%$LIBS%g
1862s%@exec_prefix@%$exec_prefix%g
1863s%@prefix@%$prefix%g
1864s%@program_transform_name@%$program_transform_name%g
1865s%@bindir@%$bindir%g
1866s%@sbindir@%$sbindir%g
1867s%@libexecdir@%$libexecdir%g
1868s%@datadir@%$datadir%g
1869s%@sysconfdir@%$sysconfdir%g
1870s%@sharedstatedir@%$sharedstatedir%g
1871s%@localstatedir@%$localstatedir%g
1872s%@libdir@%$libdir%g
1873s%@includedir@%$includedir%g
1874s%@oldincludedir@%$oldincludedir%g
1875s%@infodir@%$infodir%g
1876s%@mandir@%$mandir%g
1877s%@program_prefix@%$program_prefix%g
1878s%@CC@%$CC%g
1879s%@BUILD_CC@%$BUILD_CC%g
1880s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g
1881s%@BUILD_LIBS@%$BUILD_LIBS%g
1882s%@RANLIB@%$RANLIB%g
1883s%@TARGET_CC@%$TARGET_CC%g
1884s%@TARGET_CFLAGS@%$TARGET_CFLAGS%g
1885s%@TARGET_LINK@%$TARGET_LINK%g
1886s%@TARGET_LFLAGS@%$TARGET_LFLAGS%g
1887s%@TARGET_RANLIB@%$TARGET_RANLIB%g
1888s%@TARGET_AR@%$TARGET_AR%g
1889s%@BUILD_EXEEXT@%$BUILD_EXEEXT%g
1890s%@OS_UNIX@%$OS_UNIX%g
1891s%@OS_WIN@%$OS_WIN%g
1892s%@TARGET_EXEEXT@%$TARGET_EXEEXT%g
1893s%@TARGET_LIBS@%$TARGET_LIBS%g
1894s%@TARGET_TCL_LIBS@%$TARGET_TCL_LIBS%g
1895s%@CPP@%$CPP%g
1896s%@TARGET_TCL_INC@%$TARGET_TCL_INC%g
1897s%@TARGET_GDBM_LIBS@%$TARGET_GDBM_LIBS%g
1898s%@TARGET_GDBM_INC@%$TARGET_GDBM_INC%g
1899s%@TARGET_READLINE_LIBS@%$TARGET_READLINE_LIBS%g
1900s%@TARGET_READLINE_INC@%$TARGET_READLINE_INC%g
1901s%@TARGET_HAVE_READLINE@%$TARGET_HAVE_READLINE%g
1902
1903CEOF
1904EOF
1905
1906cat >> $CONFIG_STATUS <<\EOF
1907
1908# Split the substitutions into bite-sized pieces for seds with
1909# small command number limits, like on Digital OSF/1 and HP-UX.
1910ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1911ac_file=1 # Number of current file.
1912ac_beg=1 # First line for current file.
1913ac_end=$ac_max_sed_cmds # Line after last line for current file.
1914ac_more_lines=:
1915ac_sed_cmds=""
1916while $ac_more_lines; do
1917 if test $ac_beg -gt 1; then
1918 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1919 else
1920 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1921 fi
1922 if test ! -s conftest.s$ac_file; then
1923 ac_more_lines=false
1924 rm -f conftest.s$ac_file
1925 else
1926 if test -z "$ac_sed_cmds"; then
1927 ac_sed_cmds="sed -f conftest.s$ac_file"
1928 else
1929 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1930 fi
1931 ac_file=`expr $ac_file + 1`
1932 ac_beg=$ac_end
1933 ac_end=`expr $ac_end + $ac_max_sed_cmds`
1934 fi
1935done
1936if test -z "$ac_sed_cmds"; then
1937 ac_sed_cmds=cat
1938fi
1939EOF
1940
1941cat >> $CONFIG_STATUS <<EOF
1942
1943CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1944EOF
1945cat >> $CONFIG_STATUS <<\EOF
1946for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1947 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1948 case "$ac_file" in
1949 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1950 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1951 *) ac_file_in="${ac_file}.in" ;;
1952 esac
1953
1954 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1955
1956 # Remove last slash and all that follows it. Not all systems have dirname.
1957 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1958 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1959 # The file is in a subdirectory.
1960 test ! -d "$ac_dir" && mkdir "$ac_dir"
1961 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1962 # A "../" for each directory in $ac_dir_suffix.
1963 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1964 else
1965 ac_dir_suffix= ac_dots=
1966 fi
1967
1968 case "$ac_given_srcdir" in
1969 .) srcdir=.
1970 if test -z "$ac_dots"; then top_srcdir=.
1971 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1972 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1973 *) # Relative path.
1974 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1975 top_srcdir="$ac_dots$ac_given_srcdir" ;;
1976 esac
1977
1978
1979 echo creating "$ac_file"
1980 rm -f "$ac_file"
1981 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1982 case "$ac_file" in
1983 *Makefile*) ac_comsub="1i\\
1984# $configure_input" ;;
1985 *) ac_comsub= ;;
1986 esac
1987
1988 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1989 sed -e "$ac_comsub
1990s%@configure_input@%$configure_input%g
1991s%@srcdir@%$srcdir%g
1992s%@top_srcdir@%$top_srcdir%g
1993" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1994fi; done
1995rm -f conftest.s*
1996
1997EOF
1998cat >> $CONFIG_STATUS <<EOF
1999
2000EOF
2001cat >> $CONFIG_STATUS <<\EOF
2002
2003exit 0
2004EOF
2005chmod +x $CONFIG_STATUS
2006rm -fr confdefs* $ac_clean_files
2007test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2008