blob: 23639edbc5337272182fc5ff968041fb9d29ef3f [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"
drh297ecf12001-04-05 15:57:13 +000016ac_help="$ac_help
17 --enable-utf8 Use UTF-8 encodings"
drh75897232000-05-29 14:26:00 +000018
19# Initialize some variables set by options.
20# The variables have the same names as the options, with
21# dashes changed to underlines.
22build=NONE
23cache_file=./config.cache
24exec_prefix=NONE
25host=NONE
26no_create=
27nonopt=NONE
28no_recursion=
29prefix=NONE
30program_prefix=NONE
31program_suffix=NONE
32program_transform_name=s,x,x,
33silent=
34site=
35srcdir=
36target=NONE
37verbose=
38x_includes=NONE
39x_libraries=NONE
40bindir='${exec_prefix}/bin'
41sbindir='${exec_prefix}/sbin'
42libexecdir='${exec_prefix}/libexec'
43datadir='${prefix}/share'
44sysconfdir='${prefix}/etc'
45sharedstatedir='${prefix}/com'
46localstatedir='${prefix}/var'
47libdir='${exec_prefix}/lib'
48includedir='${prefix}/include'
49oldincludedir='/usr/include'
50infodir='${prefix}/info'
51mandir='${prefix}/man'
52
53# Initialize some other variables.
54subdirs=
55MFLAGS= MAKEFLAGS=
56SHELL=${CONFIG_SHELL-/bin/sh}
57# Maximum number of lines to put in a shell here document.
58ac_max_here_lines=12
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
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)
86 ac_prev=build ;;
87 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
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
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
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]
153 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
154 [same as prefix]
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
159 [PREFIX/share]
160 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
161 --sharedstatedir=DIR modifiable architecture-independent data in DIR
162 [PREFIX/com]
163 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
164 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
165 --includedir=DIR C header files in DIR [PREFIX/include]
166 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
167 --infodir=DIR info documentation in DIR [PREFIX/info]
168 --mandir=DIR man documentation in DIR [PREFIX/man]
169 --srcdir=DIR find the sources in DIR [configure dir or ..]
170 --program-prefix=PREFIX prepend PREFIX to installed program names
171 --program-suffix=SUFFIX append SUFFIX to installed program names
172 --program-transform-name=PROGRAM
173 run sed PROGRAM on installed program names
174EOF
175 cat << EOF
176Host type:
177 --build=BUILD configure for building on BUILD [BUILD=HOST]
178 --host=HOST configure for HOST [guessed]
179 --target=TARGET configure for TARGET [TARGET=HOST]
180Features and packages:
181 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
182 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
183 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
184 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
185 --x-includes=DIR X include files are in DIR
186 --x-libraries=DIR X library files are in DIR
187EOF
188 if test -n "$ac_help"; then
189 echo "--enable and --with options recognized:$ac_help"
190 fi
191 exit 0 ;;
192
193 -host | --host | --hos | --ho)
194 ac_prev=host ;;
195 -host=* | --host=* | --hos=* | --ho=*)
196 host="$ac_optarg" ;;
197
198 -includedir | --includedir | --includedi | --included | --include \
199 | --includ | --inclu | --incl | --inc)
200 ac_prev=includedir ;;
201 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
202 | --includ=* | --inclu=* | --incl=* | --inc=*)
203 includedir="$ac_optarg" ;;
204
205 -infodir | --infodir | --infodi | --infod | --info | --inf)
206 ac_prev=infodir ;;
207 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
208 infodir="$ac_optarg" ;;
209
210 -libdir | --libdir | --libdi | --libd)
211 ac_prev=libdir ;;
212 -libdir=* | --libdir=* | --libdi=* | --libd=*)
213 libdir="$ac_optarg" ;;
214
215 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
216 | --libexe | --libex | --libe)
217 ac_prev=libexecdir ;;
218 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
219 | --libexe=* | --libex=* | --libe=*)
220 libexecdir="$ac_optarg" ;;
221
222 -localstatedir | --localstatedir | --localstatedi | --localstated \
223 | --localstate | --localstat | --localsta | --localst \
224 | --locals | --local | --loca | --loc | --lo)
225 ac_prev=localstatedir ;;
226 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
227 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
228 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
229 localstatedir="$ac_optarg" ;;
230
231 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
232 ac_prev=mandir ;;
233 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
234 mandir="$ac_optarg" ;;
235
236 -nfp | --nfp | --nf)
237 # Obsolete; use --without-fp.
238 with_fp=no ;;
239
240 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
241 | --no-cr | --no-c)
242 no_create=yes ;;
243
244 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
245 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
246 no_recursion=yes ;;
247
248 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
249 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
250 | --oldin | --oldi | --old | --ol | --o)
251 ac_prev=oldincludedir ;;
252 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
253 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
254 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
255 oldincludedir="$ac_optarg" ;;
256
257 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
258 ac_prev=prefix ;;
259 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
260 prefix="$ac_optarg" ;;
261
262 -program-prefix | --program-prefix | --program-prefi | --program-pref \
263 | --program-pre | --program-pr | --program-p)
264 ac_prev=program_prefix ;;
265 -program-prefix=* | --program-prefix=* | --program-prefi=* \
266 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
267 program_prefix="$ac_optarg" ;;
268
269 -program-suffix | --program-suffix | --program-suffi | --program-suff \
270 | --program-suf | --program-su | --program-s)
271 ac_prev=program_suffix ;;
272 -program-suffix=* | --program-suffix=* | --program-suffi=* \
273 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
274 program_suffix="$ac_optarg" ;;
275
276 -program-transform-name | --program-transform-name \
277 | --program-transform-nam | --program-transform-na \
278 | --program-transform-n | --program-transform- \
279 | --program-transform | --program-transfor \
280 | --program-transfo | --program-transf \
281 | --program-trans | --program-tran \
282 | --progr-tra | --program-tr | --program-t)
283 ac_prev=program_transform_name ;;
284 -program-transform-name=* | --program-transform-name=* \
285 | --program-transform-nam=* | --program-transform-na=* \
286 | --program-transform-n=* | --program-transform-=* \
287 | --program-transform=* | --program-transfor=* \
288 | --program-transfo=* | --program-transf=* \
289 | --program-trans=* | --program-tran=* \
290 | --progr-tra=* | --program-tr=* | --program-t=*)
291 program_transform_name="$ac_optarg" ;;
292
293 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
294 | -silent | --silent | --silen | --sile | --sil)
295 silent=yes ;;
296
297 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
298 ac_prev=sbindir ;;
299 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
300 | --sbi=* | --sb=*)
301 sbindir="$ac_optarg" ;;
302
303 -sharedstatedir | --sharedstatedir | --sharedstatedi \
304 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
305 | --sharedst | --shareds | --shared | --share | --shar \
306 | --sha | --sh)
307 ac_prev=sharedstatedir ;;
308 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
309 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
310 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
311 | --sha=* | --sh=*)
312 sharedstatedir="$ac_optarg" ;;
313
314 -site | --site | --sit)
315 ac_prev=site ;;
316 -site=* | --site=* | --sit=*)
317 site="$ac_optarg" ;;
318
319 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
320 ac_prev=srcdir ;;
321 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
322 srcdir="$ac_optarg" ;;
323
324 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
325 | --syscon | --sysco | --sysc | --sys | --sy)
326 ac_prev=sysconfdir ;;
327 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
328 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
329 sysconfdir="$ac_optarg" ;;
330
331 -target | --target | --targe | --targ | --tar | --ta | --t)
332 ac_prev=target ;;
333 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
334 target="$ac_optarg" ;;
335
336 -v | -verbose | --verbose | --verbos | --verbo | --verb)
337 verbose=yes ;;
338
339 -version | --version | --versio | --versi | --vers)
340 echo "configure generated by autoconf version 2.13"
341 exit 0 ;;
342
343 -with-* | --with-*)
344 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
345 # Reject names that are not valid shell variable names.
346 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
347 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
348 fi
349 ac_package=`echo $ac_package| sed 's/-/_/g'`
350 case "$ac_option" in
351 *=*) ;;
352 *) ac_optarg=yes ;;
353 esac
354 eval "with_${ac_package}='$ac_optarg'" ;;
355
356 -without-* | --without-*)
357 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
358 # Reject names that are not valid shell variable names.
359 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
360 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
361 fi
362 ac_package=`echo $ac_package| sed 's/-/_/g'`
363 eval "with_${ac_package}=no" ;;
364
365 --x)
366 # Obsolete; use --with-x.
367 with_x=yes ;;
368
369 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
370 | --x-incl | --x-inc | --x-in | --x-i)
371 ac_prev=x_includes ;;
372 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
373 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
374 x_includes="$ac_optarg" ;;
375
376 -x-libraries | --x-libraries | --x-librarie | --x-librari \
377 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
378 ac_prev=x_libraries ;;
379 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
380 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
381 x_libraries="$ac_optarg" ;;
382
383 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
384 ;;
385
386 *)
387 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
388 echo "configure: warning: $ac_option: invalid host type" 1>&2
389 fi
390 if test "x$nonopt" != xNONE; then
391 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
392 fi
393 nonopt="$ac_option"
394 ;;
395
396 esac
397done
398
399if test -n "$ac_prev"; then
400 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
401fi
402
403trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
404
405# File descriptor usage:
406# 0 standard input
407# 1 file creation
408# 2 errors and warnings
409# 3 some systems may open it to /dev/tty
410# 4 used on the Kubota Titan
411# 6 checking for... messages and results
412# 5 compiler messages saved in config.log
413if test "$silent" = yes; then
414 exec 6>/dev/null
415else
416 exec 6>&1
417fi
418exec 5>./config.log
419
420echo "\
421This file contains any messages produced by compilers while
422running configure, to aid debugging if configure makes a mistake.
423" 1>&5
424
425# Strip out --no-create and --no-recursion so they do not pile up.
426# Also quote any args containing shell metacharacters.
427ac_configure_args=
428for ac_arg
429do
430 case "$ac_arg" in
431 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
432 | --no-cr | --no-c) ;;
433 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
434 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
435 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
436 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
437 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
438 esac
439done
440
441# NLS nuisances.
442# Only set these to C if already set. These must not be set unconditionally
443# because not all systems understand e.g. LANG=C (notably SCO).
444# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
445# Non-C LC_CTYPE values break the ctype check.
446if test "${LANG+set}" = set; then LANG=C; export LANG; fi
447if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
448if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
449if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
450
451# confdefs.h avoids OS command line length limits that DEFS can exceed.
452rm -rf conftest* confdefs.h
453# AIX cpp loses on an empty file, so make sure it contains at least a newline.
454echo > confdefs.h
455
456# A filename unique to this package, relative to the directory that
457# configure is in, which we can look for to find out if srcdir is correct.
drhd3176762000-08-18 09:34:19 +0000458ac_unique_file=src/sqlite.h.in
drh75897232000-05-29 14:26:00 +0000459
460# Find the source files, if location was not specified.
461if test -z "$srcdir"; then
462 ac_srcdir_defaulted=yes
463 # Try the directory containing this script, then its parent.
464 ac_prog=$0
465 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
466 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
467 srcdir=$ac_confdir
468 if test ! -r $srcdir/$ac_unique_file; then
469 srcdir=..
470 fi
471else
472 ac_srcdir_defaulted=no
473fi
474if test ! -r $srcdir/$ac_unique_file; then
475 if test "$ac_srcdir_defaulted" = yes; then
476 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
477 else
478 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
479 fi
480fi
481srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
482
483# Prefer explicitly selected file to automatically selected ones.
484if test -z "$CONFIG_SITE"; then
485 if test "x$prefix" != xNONE; then
486 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
487 else
488 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
489 fi
490fi
491for ac_site_file in $CONFIG_SITE; do
492 if test -r "$ac_site_file"; then
493 echo "loading site script $ac_site_file"
494 . "$ac_site_file"
495 fi
496done
497
498if test -r "$cache_file"; then
499 echo "loading cache $cache_file"
500 . $cache_file
501else
502 echo "creating cache $cache_file"
503 > $cache_file
504fi
505
506ac_ext=c
507# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
508ac_cpp='$CPP $CPPFLAGS'
509ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
510ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
511cross_compiling=$ac_cv_prog_cc_cross
512
513ac_exeext=
514ac_objext=o
515if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
516 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
517 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
518 ac_n= ac_c='
519' ac_t=' '
520 else
521 ac_n=-n ac_c= ac_t=
522 fi
523else
524 ac_n= ac_c='\c' ac_t=
525fi
526
527
528
529# The following RCS revision string applies to configure.in
drh297ecf12001-04-05 15:57:13 +0000530# $Revision: 1.9 $
drh75897232000-05-29 14:26:00 +0000531
532#########
533# Make sure we are not building in a subdirectory of the source tree.
534#
535
536temp=`echo $srcdir | grep '[^./]'`
537
538if test "$temp" = ""; then
539 { echo "configure: error:
540**************************************************************************
541** This program may not be compiled in the same directory that contains **
542** the configure script or any subdirectory of that directory. Rerun **
543** the configure script from a directory that is separate from the **
544** source tree. **
drh348784e2000-05-29 20:41:49 +0000545** **
546** See the README file for additional information. **
drh75897232000-05-29 14:26:00 +0000547**************************************************************************" 1>&2; exit 1; }
548fi
549
550#########
551# Set up an appropriate program prefix
552#
553if test "$program_prefix" = "NONE"; then
554 program_prefix=""
555fi
556
557
558#########
559# Check to see if the --with-hints=FILE option is used. If there is none,
560# then check for a files named "$host.hints" and ../$hosts.hints where
561# $host is the hostname of the build system. If still no hints are
562# found, try looking in $system.hints and ../$system.hints where
563# $system is the result of uname -s.
564#
565# Check whether --with-hints or --without-hints was given.
566if test "${with_hints+set}" = set; then
567 withval="$with_hints"
568 hints=$withval
569fi
570
571if test "$hints" = ""; then
572 host=`hostname | sed 's/\..*//'`
573 if test -r $host.hints; then
574 hints=$host.hints
575 else
576 if test -r ../$host.hints; then
577 hints=../$host.hints
578 fi
579 fi
580fi
581if test "$hints" = ""; then
582 sys=`uname -s`
583 if test -r $sys.hints; then
584 hints=$sys.hints
585 else
586 if test -r ../$sys.hints; then
587 hints=../$sys.hints
588 fi
589 fi
590fi
591if test "$hints" != ""; then
592 echo "$ac_t""reading hints from $hints" 1>&6
593 . $hints
594fi
595
596#########
597# Locate a compiler for the build machine. This compiler should
598# generate command-line programs that run on the build machine.
599#
600default_build_cflags="-g"
601if test "$config_BUILD_CC" = ""; then
602 # Extract the first word of "gcc", so it can be a program name with args.
603set dummy gcc; ac_word=$2
604echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +0000605echo "configure:606: checking for $ac_word" >&5
drh75897232000-05-29 14:26:00 +0000606if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
607 echo $ac_n "(cached) $ac_c" 1>&6
608else
609 if test -n "$CC"; then
610 ac_cv_prog_CC="$CC" # Let the user override the test.
611else
612 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
613 ac_dummy="$PATH"
614 for ac_dir in $ac_dummy; do
615 test -z "$ac_dir" && ac_dir=.
616 if test -f $ac_dir/$ac_word; then
617 ac_cv_prog_CC="gcc"
618 break
619 fi
620 done
621 IFS="$ac_save_ifs"
622fi
623fi
624CC="$ac_cv_prog_CC"
625if test -n "$CC"; then
626 echo "$ac_t""$CC" 1>&6
627else
628 echo "$ac_t""no" 1>&6
629fi
630
631if test -z "$CC"; then
632 # Extract the first word of "cc", so it can be a program name with args.
633set dummy cc; ac_word=$2
634echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +0000635echo "configure:636: checking for $ac_word" >&5
drh75897232000-05-29 14:26:00 +0000636if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
637 echo $ac_n "(cached) $ac_c" 1>&6
638else
639 if test -n "$CC"; then
640 ac_cv_prog_CC="$CC" # Let the user override the test.
641else
642 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
643 ac_prog_rejected=no
644 ac_dummy="$PATH"
645 for ac_dir in $ac_dummy; do
646 test -z "$ac_dir" && ac_dir=.
647 if test -f $ac_dir/$ac_word; then
648 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
649 ac_prog_rejected=yes
650 continue
651 fi
652 ac_cv_prog_CC="cc"
653 break
654 fi
655 done
656 IFS="$ac_save_ifs"
657if test $ac_prog_rejected = yes; then
658 # We found a bogon in the path, so make sure we never use it.
659 set dummy $ac_cv_prog_CC
660 shift
661 if test $# -gt 0; then
662 # We chose a different compiler from the bogus one.
663 # However, it has the same basename, so the bogon will be chosen
664 # first if we set CC to just the basename; use the full file name.
665 shift
666 set dummy "$ac_dir/$ac_word" "$@"
667 shift
668 ac_cv_prog_CC="$@"
669 fi
670fi
671fi
672fi
673CC="$ac_cv_prog_CC"
674if test -n "$CC"; then
675 echo "$ac_t""$CC" 1>&6
676else
677 echo "$ac_t""no" 1>&6
678fi
679
680 if test -z "$CC"; then
681 case "`uname -s`" in
682 *win32* | *WIN32*)
683 # Extract the first word of "cl", so it can be a program name with args.
684set dummy cl; ac_word=$2
685echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +0000686echo "configure:687: checking for $ac_word" >&5
drh75897232000-05-29 14:26:00 +0000687if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
688 echo $ac_n "(cached) $ac_c" 1>&6
689else
690 if test -n "$CC"; then
691 ac_cv_prog_CC="$CC" # Let the user override the test.
692else
693 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
694 ac_dummy="$PATH"
695 for ac_dir in $ac_dummy; do
696 test -z "$ac_dir" && ac_dir=.
697 if test -f $ac_dir/$ac_word; then
698 ac_cv_prog_CC="cl"
699 break
700 fi
701 done
702 IFS="$ac_save_ifs"
703fi
704fi
705CC="$ac_cv_prog_CC"
706if test -n "$CC"; then
707 echo "$ac_t""$CC" 1>&6
708else
709 echo "$ac_t""no" 1>&6
710fi
711 ;;
712 esac
713 fi
714 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
715fi
716
717echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +0000718echo "configure:719: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
drh75897232000-05-29 14:26:00 +0000719
720ac_ext=c
721# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
722ac_cpp='$CPP $CPPFLAGS'
723ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
724ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
725cross_compiling=$ac_cv_prog_cc_cross
726
727cat > conftest.$ac_ext << EOF
728
drh297ecf12001-04-05 15:57:13 +0000729#line 730 "configure"
drh75897232000-05-29 14:26:00 +0000730#include "confdefs.h"
731
732main(){return(0);}
733EOF
drh297ecf12001-04-05 15:57:13 +0000734if { (eval echo configure:735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
drh75897232000-05-29 14:26:00 +0000735 ac_cv_prog_cc_works=yes
736 # If we can't run a trivial program, we are probably using a cross compiler.
737 if (./conftest; exit) 2>/dev/null; then
738 ac_cv_prog_cc_cross=no
739 else
740 ac_cv_prog_cc_cross=yes
741 fi
742else
743 echo "configure: failed program was:" >&5
744 cat conftest.$ac_ext >&5
745 ac_cv_prog_cc_works=no
746fi
747rm -fr conftest*
748ac_ext=c
749# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
750ac_cpp='$CPP $CPPFLAGS'
751ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
752ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
753cross_compiling=$ac_cv_prog_cc_cross
754
755echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
756if test $ac_cv_prog_cc_works = no; then
757 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
758fi
759echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +0000760echo "configure:761: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
drh75897232000-05-29 14:26:00 +0000761echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
762cross_compiling=$ac_cv_prog_cc_cross
763
764echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +0000765echo "configure:766: checking whether we are using GNU C" >&5
drh75897232000-05-29 14:26:00 +0000766if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
767 echo $ac_n "(cached) $ac_c" 1>&6
768else
769 cat > conftest.c <<EOF
770#ifdef __GNUC__
771 yes;
772#endif
773EOF
drh297ecf12001-04-05 15:57:13 +0000774if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
drh75897232000-05-29 14:26:00 +0000775 ac_cv_prog_gcc=yes
776else
777 ac_cv_prog_gcc=no
778fi
779fi
780
781echo "$ac_t""$ac_cv_prog_gcc" 1>&6
782
783if test $ac_cv_prog_gcc = yes; then
784 GCC=yes
785else
786 GCC=
787fi
788
789ac_test_CFLAGS="${CFLAGS+set}"
790ac_save_CFLAGS="$CFLAGS"
791CFLAGS=
792echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +0000793echo "configure:794: checking whether ${CC-cc} accepts -g" >&5
drh75897232000-05-29 14:26:00 +0000794if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
795 echo $ac_n "(cached) $ac_c" 1>&6
796else
797 echo 'void f(){}' > conftest.c
798if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
799 ac_cv_prog_cc_g=yes
800else
801 ac_cv_prog_cc_g=no
802fi
803rm -f conftest*
804
805fi
806
807echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
808if test "$ac_test_CFLAGS" = set; then
809 CFLAGS="$ac_save_CFLAGS"
810elif test $ac_cv_prog_cc_g = yes; then
811 if test "$GCC" = yes; then
812 CFLAGS="-g -O2"
813 else
814 CFLAGS="-g"
815 fi
816else
817 if test "$GCC" = yes; then
818 CFLAGS="-O2"
819 else
820 CFLAGS=
821 fi
822fi
823
824 if test "$cross_compiling" = "yes"; then
825 { echo "configure: error: unable to find a compiler for building build tools" 1>&2; exit 1; }
826 fi
827 BUILD_CC=$CC
828 default_build_cflags=$CFLAGS
829else
830 BUILD_CC=$config_BUILD_CC
831 echo $ac_n "checking host compiler""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +0000832echo "configure:833: checking host compiler" >&5
drh75897232000-05-29 14:26:00 +0000833 CC=$BUILD_CC
834 echo "$ac_t""$BUILD_CC" 1>&6
835fi
836echo $ac_n "checking switches for the host compiler""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +0000837echo "configure:838: checking switches for the host compiler" >&5
drh75897232000-05-29 14:26:00 +0000838if test "$config_BUILD_CFLAGS" != ""; then
839 CFLAGS=$config_BUILD_CFLAGS
840 BUILD_CFLAGS=$config_BUILD_CFLAGS
841else
842 BUILD_CFLAGS=$default_build_cflags
843fi
844echo "$ac_t""$BUILD_CFLAGS" 1>&6
845if test "$config_BUILD_LIBS" != ""; then
846 BUILD_LIBS=$config_BUILD_LIBS
847fi
848
849
850
851
852##########
853# Locate a compiler that converts C code into *.o files that run on
854# the target machine.
855#
856echo $ac_n "checking target compiler""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +0000857echo "configure:858: checking target compiler" >&5
drh75897232000-05-29 14:26:00 +0000858if test "$config_TARGET_CC" != ""; then
859 TARGET_CC=$config_TARGET_CC
860else
861 TARGET_CC=$BUILD_CC
862fi
863echo "$ac_t""$TARGET_CC" 1>&6
864echo $ac_n "checking switches on the target compiler""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +0000865echo "configure:866: checking switches on the target compiler" >&5
drh75897232000-05-29 14:26:00 +0000866if test "$config_TARGET_CFLAGS" != ""; then
867 TARGET_CFLAGS=$config_TARGET_CFLAGS
868else
869 TARGET_CFLAGS=$BUILD_CFLAGS
870fi
871echo "$ac_t""$TARGET_CFLAGS" 1>&6
872echo $ac_n "checking target linker""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +0000873echo "configure:874: checking target linker" >&5
drh75897232000-05-29 14:26:00 +0000874if test "$config_TARGET_LINK" = ""; then
875 TARGET_LINK=$TARGET_CC
876else
877 TARGET_LINK=$config_TARGET_LINK
878fi
879echo "$ac_t""$TARGET_LINK" 1>&6
880echo $ac_n "checking switches on the target compiler""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +0000881echo "configure:882: checking switches on the target compiler" >&5
drh75897232000-05-29 14:26:00 +0000882if test "$config_TARGET_TFLAGS" != ""; then
883 TARGET_TFLAGS=$config_TARGET_TFLAGS
884else
885 TARGET_TFLAGS=$BUILD_CFLAGS
886fi
887if test "$config_TARGET_RANLIB" != ""; then
888 TARGET_RANLIB=$config_TARGET_RANLIB
889else
890 # Extract the first word of "ranlib", so it can be a program name with args.
891set dummy ranlib; ac_word=$2
892echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +0000893echo "configure:894: checking for $ac_word" >&5
drh75897232000-05-29 14:26:00 +0000894if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
895 echo $ac_n "(cached) $ac_c" 1>&6
896else
897 if test -n "$RANLIB"; then
898 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
899else
900 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
901 ac_dummy="$PATH"
902 for ac_dir in $ac_dummy; do
903 test -z "$ac_dir" && ac_dir=.
904 if test -f $ac_dir/$ac_word; then
905 ac_cv_prog_RANLIB="ranlib"
906 break
907 fi
908 done
909 IFS="$ac_save_ifs"
910 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
911fi
912fi
913RANLIB="$ac_cv_prog_RANLIB"
914if test -n "$RANLIB"; then
915 echo "$ac_t""$RANLIB" 1>&6
916else
917 echo "$ac_t""no" 1>&6
918fi
919
920 TARGET_RANLIB=$RANLIB
921fi
922if test "$config_TARGET_AR" != ""; then
drh82ad3832000-07-31 13:38:24 +0000923 TARGET_AR=$config_TARGET_AR
drh75897232000-05-29 14:26:00 +0000924else
925 TARGET_AR='ar cr'
926fi
927echo "$ac_t""$TARGET_TFLAGS" 1>&6
928
929
930
931
932
933
934
935# Set the $cross variable if we are cross-compiling. Make
936# it 0 if we are not.
937#
938echo $ac_n "checking if host and target compilers are the same""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +0000939echo "configure:940: checking if host and target compilers are the same" >&5
drh75897232000-05-29 14:26:00 +0000940if test "$BUILD_CC" = "$TARGET_CC"; then
941 cross=0
942 echo "$ac_t""yes" 1>&6
943else
944 cross=1
945 echo "$ac_t""no" 1>&6
946fi
947
drh297ecf12001-04-05 15:57:13 +0000948##########
949# Are we using UTF-8 or iso8859 encodings?
950#
951# Check whether --enable-utf8 or --disable-utf8 was given.
952if test "${enable_utf8+set}" = set; then
953 enableval="$enable_utf8"
954 :
955else
956 enable_utf8=no
957fi
958
959echo $ac_n "checking character encoding""... $ac_c" 1>&6
960echo "configure:961: checking character encoding" >&5
961if test "$enable_utf8" = "no"; then
962 ENCODING=ISO8859
963 echo "$ac_t""iso8859" 1>&6
964else
965 ENCODING=UTF8
966 echo "$ac_t""UTF-8" 1>&6
967fi
968
969
drh75897232000-05-29 14:26:00 +0000970###########
971# Lots of things are different if we are compiling for Windows using
972# the CYGWIN environment. So check for that special case and handle
973# things accordingly.
974#
975echo $ac_n "checking if executables have the .exe suffix""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +0000976echo "configure:977: checking if executables have the .exe suffix" >&5
drh75897232000-05-29 14:26:00 +0000977if test "$config_BUILD_EXEEXT" = ".exe"; then
978 CYGWIN=yes
979 echo "$ac_t""yes" 1>&6
980else
981 echo "$ac_t""unknown" 1>&6
982fi
983if test "$CYGWIN" != "yes"; then
984 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +0000985echo "configure:986: checking for Cygwin environment" >&5
drh75897232000-05-29 14:26:00 +0000986if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
987 echo $ac_n "(cached) $ac_c" 1>&6
988else
989 cat > conftest.$ac_ext <<EOF
drh297ecf12001-04-05 15:57:13 +0000990#line 991 "configure"
drh75897232000-05-29 14:26:00 +0000991#include "confdefs.h"
992
993int main() {
994
995#ifndef __CYGWIN__
996#define __CYGWIN__ __CYGWIN32__
997#endif
998return __CYGWIN__;
999; return 0; }
1000EOF
drh297ecf12001-04-05 15:57:13 +00001001if { (eval echo configure:1002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
drh75897232000-05-29 14:26:00 +00001002 rm -rf conftest*
1003 ac_cv_cygwin=yes
1004else
1005 echo "configure: failed program was:" >&5
1006 cat conftest.$ac_ext >&5
1007 rm -rf conftest*
1008 ac_cv_cygwin=no
1009fi
1010rm -f conftest*
1011rm -f conftest*
1012fi
1013
1014echo "$ac_t""$ac_cv_cygwin" 1>&6
1015CYGWIN=
1016test "$ac_cv_cygwin" = yes && CYGWIN=yes
1017fi
1018if test "$CYGWIN" = "yes"; then
1019 BUILD_EXEEXT=.exe
1020else
1021 BUILD_EXEEXT=""
1022fi
1023if test "$cross" = "0"; then
1024 TARGET_EXEEXT=$BUILD_EXEEXT
1025else
1026 TARGET_EXEEXT=$config_TARGET_EXEEXT
1027fi
1028if test "$TARGET_EXEEXT" = ".exe"; then
1029 OS_UNIX=0
1030 OS_WIN=1
1031 tclsubdir=win
1032else
1033 OS_UNIX=1
1034 OS_WIN=0
1035 tclsubdir=unix
1036fi
1037TARGET_CFLAGS="$TARGET_CFLAGS -DOS_UNIX=$OS_UNIX -DOS_WIN=$OS_WIN"
1038
1039
1040
1041
1042
1043
1044##########
1045# Extract generic linker options from the environment.
1046#
1047if test "$config_TARGET_LIBS" != ""; then
1048 TARGET_LIBS=$config_TARGET_LIBS
1049else
1050 TARGET_LIBS=""
1051fi
1052
1053
1054##########
1055# Figure out what C libraries are required to compile Tcl programs.
1056#
1057if test "$config_TARGET_TCL_LIBS" != ""; then
1058 TARGET_TCL_LIBS="$config_TARGET_TCL_LIBS"
1059else
1060 if test "$with_tcl" != ""; then
1061 extra=`echo $with_tcl/$tclsubdir/libtcl8*.a`
1062 fi
1063 CC=$TARGET_CC
1064 echo $ac_n "checking for sin""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +00001065echo "configure:1066: checking for sin" >&5
drh75897232000-05-29 14:26:00 +00001066if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
1067 echo $ac_n "(cached) $ac_c" 1>&6
1068else
1069 cat > conftest.$ac_ext <<EOF
drh297ecf12001-04-05 15:57:13 +00001070#line 1071 "configure"
drh75897232000-05-29 14:26:00 +00001071#include "confdefs.h"
1072/* System header to define __stub macros and hopefully few prototypes,
1073 which can conflict with char sin(); below. */
1074#include <assert.h>
1075/* Override any gcc2 internal prototype to avoid an error. */
1076/* We use char because int might match the return type of a gcc2
1077 builtin and then its argument prototype would still apply. */
1078char sin();
1079
1080int main() {
1081
1082/* The GNU C library defines this for functions which it implements
1083 to always fail with ENOSYS. Some functions are actually named
1084 something starting with __ and the normal name is an alias. */
1085#if defined (__stub_sin) || defined (__stub___sin)
1086choke me
1087#else
1088sin();
1089#endif
1090
1091; return 0; }
1092EOF
drh297ecf12001-04-05 15:57:13 +00001093if { (eval echo configure:1094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
drh75897232000-05-29 14:26:00 +00001094 rm -rf conftest*
1095 eval "ac_cv_func_sin=yes"
1096else
1097 echo "configure: failed program was:" >&5
1098 cat conftest.$ac_ext >&5
1099 rm -rf conftest*
1100 eval "ac_cv_func_sin=no"
1101fi
1102rm -f conftest*
1103fi
1104
1105if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
1106 echo "$ac_t""yes" 1>&6
1107 LIBS=""
1108else
1109 echo "$ac_t""no" 1>&6
1110LIBS="-lm"
1111fi
1112
1113 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +00001114echo "configure:1115: checking for dlopen in -ldl" >&5
drh75897232000-05-29 14:26:00 +00001115ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
1116if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1117 echo $ac_n "(cached) $ac_c" 1>&6
1118else
1119 ac_save_LIBS="$LIBS"
1120LIBS="-ldl $LIBS"
1121cat > conftest.$ac_ext <<EOF
drh297ecf12001-04-05 15:57:13 +00001122#line 1123 "configure"
drh75897232000-05-29 14:26:00 +00001123#include "confdefs.h"
1124/* Override any gcc2 internal prototype to avoid an error. */
1125/* We use char because int might match the return type of a gcc2
1126 builtin and then its argument prototype would still apply. */
1127char dlopen();
1128
1129int main() {
1130dlopen()
1131; return 0; }
1132EOF
drh297ecf12001-04-05 15:57:13 +00001133if { (eval echo configure:1134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
drh75897232000-05-29 14:26:00 +00001134 rm -rf conftest*
1135 eval "ac_cv_lib_$ac_lib_var=yes"
1136else
1137 echo "configure: failed program was:" >&5
1138 cat conftest.$ac_ext >&5
1139 rm -rf conftest*
1140 eval "ac_cv_lib_$ac_lib_var=no"
1141fi
1142rm -f conftest*
1143LIBS="$ac_save_LIBS"
1144
1145fi
1146if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1147 echo "$ac_t""yes" 1>&6
1148 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1149 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1150 cat >> confdefs.h <<EOF
1151#define $ac_tr_lib 1
1152EOF
1153
1154 LIBS="-ldl $LIBS"
1155
1156else
1157 echo "$ac_t""no" 1>&6
1158fi
1159
1160 otherlibs=$LIBS
1161 if test "$extra" != ""; then
1162 LIBS=$extra
1163 else
1164 LIBS=""
1165
1166echo $ac_n "checking for library containing Tcl_Init""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +00001167echo "configure:1168: checking for library containing Tcl_Init" >&5
drh75897232000-05-29 14:26:00 +00001168if eval "test \"`echo '$''{'ac_cv_search_Tcl_Init'+set}'`\" = set"; then
1169 echo $ac_n "(cached) $ac_c" 1>&6
1170else
1171 ac_func_search_save_LIBS="$LIBS"
1172ac_cv_search_Tcl_Init="no"
1173cat > conftest.$ac_ext <<EOF
drh297ecf12001-04-05 15:57:13 +00001174#line 1175 "configure"
drh75897232000-05-29 14:26:00 +00001175#include "confdefs.h"
1176/* Override any gcc2 internal prototype to avoid an error. */
1177/* We use char because int might match the return type of a gcc2
1178 builtin and then its argument prototype would still apply. */
1179char Tcl_Init();
1180
1181int main() {
1182Tcl_Init()
1183; return 0; }
1184EOF
drh297ecf12001-04-05 15:57:13 +00001185if { (eval echo configure:1186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
drh75897232000-05-29 14:26:00 +00001186 rm -rf conftest*
1187 ac_cv_search_Tcl_Init="none required"
1188else
1189 echo "configure: failed program was:" >&5
1190 cat conftest.$ac_ext >&5
1191fi
1192rm -f conftest*
1193test "$ac_cv_search_Tcl_Init" = "no" && for i in tcl8.4 tcl8.3 tcl8.2 tcl8.1 tcl8.0 tcl80 tcl; do
1194LIBS="-l$i $otherlibs $ac_func_search_save_LIBS"
1195cat > conftest.$ac_ext <<EOF
drh297ecf12001-04-05 15:57:13 +00001196#line 1197 "configure"
drh75897232000-05-29 14:26:00 +00001197#include "confdefs.h"
1198/* Override any gcc2 internal prototype to avoid an error. */
1199/* We use char because int might match the return type of a gcc2
1200 builtin and then its argument prototype would still apply. */
1201char Tcl_Init();
1202
1203int main() {
1204Tcl_Init()
1205; return 0; }
1206EOF
drh297ecf12001-04-05 15:57:13 +00001207if { (eval echo configure:1208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
drh75897232000-05-29 14:26:00 +00001208 rm -rf conftest*
1209 ac_cv_search_Tcl_Init="-l$i"
1210break
1211else
1212 echo "configure: failed program was:" >&5
1213 cat conftest.$ac_ext >&5
1214fi
1215rm -f conftest*
1216done
1217LIBS="$ac_func_search_save_LIBS"
1218fi
1219
1220echo "$ac_t""$ac_cv_search_Tcl_Init" 1>&6
1221if test "$ac_cv_search_Tcl_Init" != "no"; then
1222 test "$ac_cv_search_Tcl_Init" = "none required" || LIBS="$ac_cv_search_Tcl_Init $LIBS"
1223
1224else :
1225
1226fi
1227 fi
1228 TARGET_TCL_LIBS="$LIBS $otherlibs"
1229fi
1230
1231
1232##########
1233# Figure out where to get the TCL header files.
1234#
1235echo $ac_n "checking TCL header files""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +00001236echo "configure:1237: checking TCL header files" >&5
drh75897232000-05-29 14:26:00 +00001237found=no
1238if test "$config_TARGET_TCL_INC" != ""; then
1239 TARGET_TCL_INC=$config_TARGET_TCL_INC
1240 found=yes
1241else
1242 if test "$with_tcl" != ""; then
1243 TARGET_TCL_INC="-I$with_tcl/generic -I$with_tcl/$tclsubdir"
1244 found=yes
1245 else
1246 TARGET_TCL_INC=""
1247 found=no
1248 fi
1249fi
1250if test "$found" = "yes"; then
1251 echo "$ac_t""$TARGET_TCL_INC" 1>&6
1252else
1253 echo "$ac_t""not specified: still searching..." 1>&6
1254 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +00001255echo "configure:1256: checking how to run the C preprocessor" >&5
drh75897232000-05-29 14:26:00 +00001256# On Suns, sometimes $CPP names a directory.
1257if test -n "$CPP" && test -d "$CPP"; then
1258 CPP=
1259fi
1260if test -z "$CPP"; then
1261if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1262 echo $ac_n "(cached) $ac_c" 1>&6
1263else
1264 # This must be in double quotes, not single quotes, because CPP may get
1265 # substituted into the Makefile and "${CC-cc}" will confuse make.
1266 CPP="${CC-cc} -E"
1267 # On the NeXT, cc -E runs the code through the compiler's parser,
1268 # not just through cpp.
1269 cat > conftest.$ac_ext <<EOF
drh297ecf12001-04-05 15:57:13 +00001270#line 1271 "configure"
drh75897232000-05-29 14:26:00 +00001271#include "confdefs.h"
1272#include <assert.h>
1273Syntax Error
1274EOF
1275ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
drh297ecf12001-04-05 15:57:13 +00001276{ (eval echo configure:1277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
drh75897232000-05-29 14:26:00 +00001277ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1278if test -z "$ac_err"; then
1279 :
1280else
1281 echo "$ac_err" >&5
1282 echo "configure: failed program was:" >&5
1283 cat conftest.$ac_ext >&5
1284 rm -rf conftest*
1285 CPP="${CC-cc} -E -traditional-cpp"
1286 cat > conftest.$ac_ext <<EOF
drh297ecf12001-04-05 15:57:13 +00001287#line 1288 "configure"
drh75897232000-05-29 14:26:00 +00001288#include "confdefs.h"
1289#include <assert.h>
1290Syntax Error
1291EOF
1292ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
drh297ecf12001-04-05 15:57:13 +00001293{ (eval echo configure:1294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
drh75897232000-05-29 14:26:00 +00001294ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1295if test -z "$ac_err"; then
1296 :
1297else
1298 echo "$ac_err" >&5
1299 echo "configure: failed program was:" >&5
1300 cat conftest.$ac_ext >&5
1301 rm -rf conftest*
1302 CPP="${CC-cc} -nologo -E"
1303 cat > conftest.$ac_ext <<EOF
drh297ecf12001-04-05 15:57:13 +00001304#line 1305 "configure"
drh75897232000-05-29 14:26:00 +00001305#include "confdefs.h"
1306#include <assert.h>
1307Syntax Error
1308EOF
1309ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
drh297ecf12001-04-05 15:57:13 +00001310{ (eval echo configure:1311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
drh75897232000-05-29 14:26:00 +00001311ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1312if test -z "$ac_err"; then
1313 :
1314else
1315 echo "$ac_err" >&5
1316 echo "configure: failed program was:" >&5
1317 cat conftest.$ac_ext >&5
1318 rm -rf conftest*
1319 CPP=/lib/cpp
1320fi
1321rm -f conftest*
1322fi
1323rm -f conftest*
1324fi
1325rm -f conftest*
1326 ac_cv_prog_CPP="$CPP"
1327fi
1328 CPP="$ac_cv_prog_CPP"
1329else
1330 ac_cv_prog_CPP="$CPP"
1331fi
1332echo "$ac_t""$CPP" 1>&6
1333
1334ac_safe=`echo "tcl.h" | sed 'y%./+-%__p_%'`
1335echo $ac_n "checking for tcl.h""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +00001336echo "configure:1337: checking for tcl.h" >&5
drh75897232000-05-29 14:26:00 +00001337if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1338 echo $ac_n "(cached) $ac_c" 1>&6
1339else
1340 cat > conftest.$ac_ext <<EOF
drh297ecf12001-04-05 15:57:13 +00001341#line 1342 "configure"
drh75897232000-05-29 14:26:00 +00001342#include "confdefs.h"
1343#include <tcl.h>
1344EOF
1345ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
drh297ecf12001-04-05 15:57:13 +00001346{ (eval echo configure:1347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
drh75897232000-05-29 14:26:00 +00001347ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1348if test -z "$ac_err"; then
1349 rm -rf conftest*
1350 eval "ac_cv_header_$ac_safe=yes"
1351else
1352 echo "$ac_err" >&5
1353 echo "configure: failed program was:" >&5
1354 cat conftest.$ac_ext >&5
1355 rm -rf conftest*
1356 eval "ac_cv_header_$ac_safe=no"
1357fi
1358rm -f conftest*
1359fi
1360if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1361 echo "$ac_t""yes" 1>&6
1362 found=yes
1363else
1364 echo "$ac_t""no" 1>&6
1365fi
1366
1367fi
1368if test "$found" = "no"; then
drhfdc99e92000-09-29 15:15:51 +00001369 for dir in /usr/local /usr/X11 /usr/X11R6 /usr/pkg /usr/contrib /usr; do
drh75897232000-05-29 14:26:00 +00001370
1371ac_safe=`echo "$dir/include/tcl.h" | sed 'y%./+-%__p_%'`
1372echo $ac_n "checking for $dir/include/tcl.h""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +00001373echo "configure:1374: checking for $dir/include/tcl.h" >&5
drh75897232000-05-29 14:26:00 +00001374if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
1375 echo $ac_n "(cached) $ac_c" 1>&6
1376else
1377 if test "$cross_compiling" = yes; then
1378 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
1379else
1380 if test -r $dir/include/tcl.h; then
1381 eval "ac_cv_file_$ac_safe=yes"
1382 else
1383 eval "ac_cv_file_$ac_safe=no"
1384 fi
1385fi
1386fi
1387if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
1388 echo "$ac_t""yes" 1>&6
1389 found=yes
1390else
1391 echo "$ac_t""no" 1>&6
1392
1393fi
1394
1395 if test "$found" = "yes"; then
1396 TARGET_TCL_INC="-I$dir/include"
1397 break
1398 fi
1399 done
1400fi
drh6d313162000-09-21 13:01:35 +00001401if test "$found" = "no"; then
1402 TARGET_TCL_INC="-DNO_TCL=1"
1403fi
drh75897232000-05-29 14:26:00 +00001404
1405
1406##########
1407# Figure out what C libraries are required to compile programs
1408# that use GDBM.
1409#
1410if test "$config_TARGET_GDBM_LIBS" != ""; then
1411 TARGET_GDBM_LIBS="$config_TARGET_GDBM_LIBS"
1412else
1413 CC=$TARGET_CC
1414 LIBS=""
1415
1416echo $ac_n "checking for library containing gdbm_open""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +00001417echo "configure:1418: checking for library containing gdbm_open" >&5
drh75897232000-05-29 14:26:00 +00001418if eval "test \"`echo '$''{'ac_cv_search_gdbm_open'+set}'`\" = set"; then
1419 echo $ac_n "(cached) $ac_c" 1>&6
1420else
1421 ac_func_search_save_LIBS="$LIBS"
1422ac_cv_search_gdbm_open="no"
1423cat > conftest.$ac_ext <<EOF
drh297ecf12001-04-05 15:57:13 +00001424#line 1425 "configure"
drh75897232000-05-29 14:26:00 +00001425#include "confdefs.h"
1426/* Override any gcc2 internal prototype to avoid an error. */
1427/* We use char because int might match the return type of a gcc2
1428 builtin and then its argument prototype would still apply. */
1429char gdbm_open();
1430
1431int main() {
1432gdbm_open()
1433; return 0; }
1434EOF
drh297ecf12001-04-05 15:57:13 +00001435if { (eval echo configure:1436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
drh75897232000-05-29 14:26:00 +00001436 rm -rf conftest*
1437 ac_cv_search_gdbm_open="none required"
1438else
1439 echo "configure: failed program was:" >&5
1440 cat conftest.$ac_ext >&5
1441fi
1442rm -f conftest*
1443test "$ac_cv_search_gdbm_open" = "no" && for i in gdbm; do
1444LIBS="-l$i $ac_func_search_save_LIBS"
1445cat > conftest.$ac_ext <<EOF
drh297ecf12001-04-05 15:57:13 +00001446#line 1447 "configure"
drh75897232000-05-29 14:26:00 +00001447#include "confdefs.h"
1448/* Override any gcc2 internal prototype to avoid an error. */
1449/* We use char because int might match the return type of a gcc2
1450 builtin and then its argument prototype would still apply. */
1451char gdbm_open();
1452
1453int main() {
1454gdbm_open()
1455; return 0; }
1456EOF
drh297ecf12001-04-05 15:57:13 +00001457if { (eval echo configure:1458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
drh75897232000-05-29 14:26:00 +00001458 rm -rf conftest*
1459 ac_cv_search_gdbm_open="-l$i"
1460break
1461else
1462 echo "configure: failed program was:" >&5
1463 cat conftest.$ac_ext >&5
1464fi
1465rm -f conftest*
1466done
1467LIBS="$ac_func_search_save_LIBS"
1468fi
1469
1470echo "$ac_t""$ac_cv_search_gdbm_open" 1>&6
1471if test "$ac_cv_search_gdbm_open" != "no"; then
1472 test "$ac_cv_search_gdbm_open" = "none required" || LIBS="$ac_cv_search_gdbm_open $LIBS"
1473
1474else :
1475
1476fi
1477 TARGET_GDBM_LIBS="$LIBS"
1478fi
1479
1480
1481##########
1482# Figure out where to get the GDBM header files.
1483#
1484echo $ac_n "checking GDBM header files""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +00001485echo "configure:1486: checking GDBM header files" >&5
drh75897232000-05-29 14:26:00 +00001486found=no
1487if test "$config_TARGET_GDBM_INC" != ""; then
1488 TARGET_GDBM_INC=$config_TARGET_GDBM_INC
1489 found=yes
1490fi
1491if test "$found" = "yes"; then
drh5fc27f92000-06-12 17:49:22 +00001492 echo "$ac_t""$TARGET_GDBM_INC" 1>&6
drh75897232000-05-29 14:26:00 +00001493else
1494 echo "$ac_t""not specified: still searching..." 1>&6
1495 ac_safe=`echo "gdbm.h" | sed 'y%./+-%__p_%'`
1496echo $ac_n "checking for gdbm.h""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +00001497echo "configure:1498: checking for gdbm.h" >&5
drh75897232000-05-29 14:26:00 +00001498if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1499 echo $ac_n "(cached) $ac_c" 1>&6
1500else
1501 cat > conftest.$ac_ext <<EOF
drh297ecf12001-04-05 15:57:13 +00001502#line 1503 "configure"
drh75897232000-05-29 14:26:00 +00001503#include "confdefs.h"
1504#include <gdbm.h>
1505EOF
1506ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
drh297ecf12001-04-05 15:57:13 +00001507{ (eval echo configure:1508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
drh75897232000-05-29 14:26:00 +00001508ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1509if test -z "$ac_err"; then
1510 rm -rf conftest*
1511 eval "ac_cv_header_$ac_safe=yes"
1512else
1513 echo "$ac_err" >&5
1514 echo "configure: failed program was:" >&5
1515 cat conftest.$ac_ext >&5
1516 rm -rf conftest*
1517 eval "ac_cv_header_$ac_safe=no"
1518fi
1519rm -f conftest*
1520fi
1521if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1522 echo "$ac_t""yes" 1>&6
1523 found=yes
1524else
1525 echo "$ac_t""no" 1>&6
1526fi
1527
1528fi
1529if test "$found" = "no"; then
1530 for dir in /usr/local /usr/pkg /usr/contrib; do
1531
1532ac_safe=`echo "$dir/include/gdbm.h" | sed 'y%./+-%__p_%'`
1533echo $ac_n "checking for $dir/include/gdbm.h""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +00001534echo "configure:1535: checking for $dir/include/gdbm.h" >&5
drh75897232000-05-29 14:26:00 +00001535if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
1536 echo $ac_n "(cached) $ac_c" 1>&6
1537else
1538 if test "$cross_compiling" = yes; then
1539 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
1540else
1541 if test -r $dir/include/gdbm.h; then
1542 eval "ac_cv_file_$ac_safe=yes"
1543 else
1544 eval "ac_cv_file_$ac_safe=no"
1545 fi
1546fi
1547fi
1548if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
1549 echo "$ac_t""yes" 1>&6
1550 found=yes
1551else
1552 echo "$ac_t""no" 1>&6
1553
1554fi
1555
1556 if test "$found" = "yes"; then
1557 TARGET_GDBM_INC="-I$dir/include"
1558 break
1559 fi
1560 done
1561fi
1562
1563
1564##########
1565# Figure out what C libraries are required to compile programs
1566# that use "readline()" library.
1567#
1568if test "$config_TARGET_READLINE_LIBS" != ""; then
1569 TARGET_READLINE_LIBS="$config_TARGET_READLINE_LIBS"
1570else
1571 CC=$TARGET_CC
1572 LIBS=""
1573
1574echo $ac_n "checking for library containing readline""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +00001575echo "configure:1576: checking for library containing readline" >&5
drh75897232000-05-29 14:26:00 +00001576if eval "test \"`echo '$''{'ac_cv_search_readline'+set}'`\" = set"; then
1577 echo $ac_n "(cached) $ac_c" 1>&6
1578else
1579 ac_func_search_save_LIBS="$LIBS"
1580ac_cv_search_readline="no"
1581cat > conftest.$ac_ext <<EOF
drh297ecf12001-04-05 15:57:13 +00001582#line 1583 "configure"
drh75897232000-05-29 14:26:00 +00001583#include "confdefs.h"
1584/* Override any gcc2 internal prototype to avoid an error. */
1585/* We use char because int might match the return type of a gcc2
1586 builtin and then its argument prototype would still apply. */
1587char readline();
1588
1589int main() {
1590readline()
1591; return 0; }
1592EOF
drh297ecf12001-04-05 15:57:13 +00001593if { (eval echo configure:1594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
drh75897232000-05-29 14:26:00 +00001594 rm -rf conftest*
1595 ac_cv_search_readline="none required"
1596else
1597 echo "configure: failed program was:" >&5
1598 cat conftest.$ac_ext >&5
1599fi
1600rm -f conftest*
1601test "$ac_cv_search_readline" = "no" && for i in readline; do
1602LIBS="-l$i $ac_func_search_save_LIBS"
1603cat > conftest.$ac_ext <<EOF
drh297ecf12001-04-05 15:57:13 +00001604#line 1605 "configure"
drh75897232000-05-29 14:26:00 +00001605#include "confdefs.h"
1606/* Override any gcc2 internal prototype to avoid an error. */
1607/* We use char because int might match the return type of a gcc2
1608 builtin and then its argument prototype would still apply. */
1609char readline();
1610
1611int main() {
1612readline()
1613; return 0; }
1614EOF
drh297ecf12001-04-05 15:57:13 +00001615if { (eval echo configure:1616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
drh75897232000-05-29 14:26:00 +00001616 rm -rf conftest*
1617 ac_cv_search_readline="-l$i"
1618break
1619else
1620 echo "configure: failed program was:" >&5
1621 cat conftest.$ac_ext >&5
1622fi
1623rm -f conftest*
1624done
1625LIBS="$ac_func_search_save_LIBS"
1626fi
1627
1628echo "$ac_t""$ac_cv_search_readline" 1>&6
1629if test "$ac_cv_search_readline" != "no"; then
1630 test "$ac_cv_search_readline" = "none required" || LIBS="$ac_cv_search_readline $LIBS"
1631
1632else :
1633
1634fi
1635 TARGET_READLINE_LIBS="$LIBS"
1636fi
1637
1638
1639##########
1640# Figure out where to get the READLINE header files.
1641#
1642echo $ac_n "checking readline header files""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +00001643echo "configure:1644: checking readline header files" >&5
drh75897232000-05-29 14:26:00 +00001644found=no
1645if test "$config_TARGET_READLINE_INC" != ""; then
1646 TARGET_READLINE_INC=$config_TARGET_READLINE_INC
1647 found=yes
1648fi
1649if test "$found" = "yes"; then
1650 echo "$ac_t""$TARGET_READLINE_INC" 1>&6
1651else
1652 echo "$ac_t""not specified: still searching..." 1>&6
1653 ac_safe=`echo "readline.h" | sed 'y%./+-%__p_%'`
1654echo $ac_n "checking for readline.h""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +00001655echo "configure:1656: checking for readline.h" >&5
drh75897232000-05-29 14:26:00 +00001656if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1657 echo $ac_n "(cached) $ac_c" 1>&6
1658else
1659 cat > conftest.$ac_ext <<EOF
drh297ecf12001-04-05 15:57:13 +00001660#line 1661 "configure"
drh75897232000-05-29 14:26:00 +00001661#include "confdefs.h"
1662#include <readline.h>
1663EOF
1664ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
drh297ecf12001-04-05 15:57:13 +00001665{ (eval echo configure:1666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
drh75897232000-05-29 14:26:00 +00001666ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1667if test -z "$ac_err"; then
1668 rm -rf conftest*
1669 eval "ac_cv_header_$ac_safe=yes"
1670else
1671 echo "$ac_err" >&5
1672 echo "configure: failed program was:" >&5
1673 cat conftest.$ac_ext >&5
1674 rm -rf conftest*
1675 eval "ac_cv_header_$ac_safe=no"
1676fi
1677rm -f conftest*
1678fi
1679if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1680 echo "$ac_t""yes" 1>&6
1681 found=yes
1682else
1683 echo "$ac_t""no" 1>&6
1684fi
1685
1686fi
1687if test "$found" = "no"; then
1688 for dir in /usr /usr/local /usr/local/readline /usr/contrib; do
1689
1690ac_safe=`echo "$dir/include/readline.h" | sed 'y%./+-%__p_%'`
1691echo $ac_n "checking for $dir/include/readline.h""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +00001692echo "configure:1693: checking for $dir/include/readline.h" >&5
drh75897232000-05-29 14:26:00 +00001693if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
1694 echo $ac_n "(cached) $ac_c" 1>&6
1695else
1696 if test "$cross_compiling" = yes; then
1697 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
1698else
1699 if test -r $dir/include/readline.h; then
1700 eval "ac_cv_file_$ac_safe=yes"
1701 else
1702 eval "ac_cv_file_$ac_safe=no"
1703 fi
1704fi
1705fi
1706if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
1707 echo "$ac_t""yes" 1>&6
1708 found=yes
1709else
1710 echo "$ac_t""no" 1>&6
1711
1712fi
1713
1714 if test "$found" = "yes"; then
1715 TARGET_READLINE_INC="-I$dir/include"
1716 break
1717 fi
1718
1719ac_safe=`echo "$dir/include/readline/readline.h" | sed 'y%./+-%__p_%'`
1720echo $ac_n "checking for $dir/include/readline/readline.h""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +00001721echo "configure:1722: checking for $dir/include/readline/readline.h" >&5
drh75897232000-05-29 14:26:00 +00001722if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
1723 echo $ac_n "(cached) $ac_c" 1>&6
1724else
1725 if test "$cross_compiling" = yes; then
1726 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
1727else
1728 if test -r $dir/include/readline/readline.h; then
1729 eval "ac_cv_file_$ac_safe=yes"
1730 else
1731 eval "ac_cv_file_$ac_safe=no"
1732 fi
1733fi
1734fi
1735if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
1736 echo "$ac_t""yes" 1>&6
1737 found=yes
1738else
1739 echo "$ac_t""no" 1>&6
1740
1741fi
1742
1743 if test "$found" = "yes"; then
1744 TARGET_READLINE_INC="-I$dir/include/readline"
1745 break
1746 fi
1747 done
1748fi
1749if test "$found" = "yes"; then
drh82ad3832000-07-31 13:38:24 +00001750 if test "$TARGET_READLINE_LIBS" = ""; then
1751 TARGET_HAVE_READLINE=0
1752 else
1753 TARGET_HAVE_READLINE=1
1754 fi
drh75897232000-05-29 14:26:00 +00001755else
1756 TARGET_HAVE_READLINE=0
1757fi
1758
1759
1760
1761#########
drh2dfbbca2000-07-28 14:32:48 +00001762# Figure out whether or not we have a "usleep()" function.
1763#
1764echo $ac_n "checking for usleep""... $ac_c" 1>&6
drh297ecf12001-04-05 15:57:13 +00001765echo "configure:1766: checking for usleep" >&5
drh2dfbbca2000-07-28 14:32:48 +00001766if eval "test \"`echo '$''{'ac_cv_func_usleep'+set}'`\" = set"; then
1767 echo $ac_n "(cached) $ac_c" 1>&6
1768else
1769 cat > conftest.$ac_ext <<EOF
drh297ecf12001-04-05 15:57:13 +00001770#line 1771 "configure"
drh2dfbbca2000-07-28 14:32:48 +00001771#include "confdefs.h"
1772/* System header to define __stub macros and hopefully few prototypes,
1773 which can conflict with char usleep(); below. */
1774#include <assert.h>
1775/* Override any gcc2 internal prototype to avoid an error. */
1776/* We use char because int might match the return type of a gcc2
1777 builtin and then its argument prototype would still apply. */
1778char usleep();
1779
1780int main() {
1781
1782/* The GNU C library defines this for functions which it implements
1783 to always fail with ENOSYS. Some functions are actually named
1784 something starting with __ and the normal name is an alias. */
1785#if defined (__stub_usleep) || defined (__stub___usleep)
1786choke me
1787#else
1788usleep();
1789#endif
1790
1791; return 0; }
1792EOF
drh297ecf12001-04-05 15:57:13 +00001793if { (eval echo configure:1794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
drh2dfbbca2000-07-28 14:32:48 +00001794 rm -rf conftest*
1795 eval "ac_cv_func_usleep=yes"
1796else
1797 echo "configure: failed program was:" >&5
1798 cat conftest.$ac_ext >&5
1799 rm -rf conftest*
1800 eval "ac_cv_func_usleep=no"
1801fi
1802rm -f conftest*
1803fi
1804
1805if eval "test \"`echo '$ac_cv_func_'usleep`\" = yes"; then
1806 echo "$ac_t""yes" 1>&6
1807 TARGET_CFLAGS="$TARGET_CFLAGS -DHAVE_USLEEP=1"
1808else
1809 echo "$ac_t""no" 1>&6
1810fi
1811
1812
1813#########
drh75897232000-05-29 14:26:00 +00001814# Generate the output files.
1815#
1816trap '' 1 2 15
1817cat > confcache <<\EOF
1818# This file is a shell script that caches the results of configure
1819# tests run on this system so they can be shared between configure
1820# scripts and configure runs. It is not useful on other systems.
1821# If it contains results you don't want to keep, you may remove or edit it.
1822#
1823# By default, configure uses ./config.cache as the cache file,
1824# creating it if it does not exist already. You can give configure
1825# the --cache-file=FILE option to use a different cache file; that is
1826# what configure does when it calls configure scripts in
1827# subdirectories, so they share the cache.
1828# Giving --cache-file=/dev/null disables caching, for debugging configure.
1829# config.status only pays attention to the cache file if you give it the
1830# --recheck option to rerun configure.
1831#
1832EOF
1833# The following way of writing the cache mishandles newlines in values,
1834# but we know of no workaround that is simple, portable, and efficient.
1835# So, don't put newlines in cache variables' values.
1836# Ultrix sh set writes to stderr and can't be redirected directly,
1837# and sets the high bit in the cache file unless we assign to the vars.
1838(set) 2>&1 |
1839 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1840 *ac_space=\ *)
1841 # `set' does not quote correctly, so add quotes (double-quote substitution
1842 # turns \\\\ into \\, and sed turns \\ into \).
1843 sed -n \
1844 -e "s/'/'\\\\''/g" \
1845 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1846 ;;
1847 *)
1848 # `set' quotes correctly as required by POSIX, so do not add quotes.
1849 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1850 ;;
1851 esac >> confcache
1852if cmp -s $cache_file confcache; then
1853 :
1854else
1855 if test -w $cache_file; then
1856 echo "updating cache $cache_file"
1857 cat confcache > $cache_file
1858 else
1859 echo "not updating unwritable cache $cache_file"
1860 fi
1861fi
1862rm -f confcache
1863
1864trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1865
1866test "x$prefix" = xNONE && prefix=$ac_default_prefix
1867# Let make expand exec_prefix.
1868test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1869
1870# Any assignment to VPATH causes Sun make to only execute
1871# the first set of double-colon rules, so remove it if not needed.
1872# If there is a colon in the path, we need to keep it.
1873if test "x$srcdir" = x.; then
1874 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1875fi
1876
1877trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1878
1879# Transform confdefs.h into DEFS.
1880# Protect against shell expansion while executing Makefile rules.
1881# Protect against Makefile macro expansion.
1882cat > conftest.defs <<\EOF
1883s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
1884s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
1885s%\[%\\&%g
1886s%\]%\\&%g
1887s%\$%$$%g
1888EOF
1889DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1890rm -f conftest.defs
1891
1892
1893# Without the "./", some shells look in PATH for config.status.
1894: ${CONFIG_STATUS=./config.status}
1895
1896echo creating $CONFIG_STATUS
1897rm -f $CONFIG_STATUS
1898cat > $CONFIG_STATUS <<EOF
1899#! /bin/sh
1900# Generated automatically by configure.
1901# Run this file to recreate the current configuration.
1902# This directory was configured as follows,
1903# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1904#
1905# $0 $ac_configure_args
1906#
1907# Compiler output produced by configure, useful for debugging
1908# configure, is in ./config.log if it exists.
1909
1910ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1911for ac_option
1912do
1913 case "\$ac_option" in
1914 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1915 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1916 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1917 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1918 echo "$CONFIG_STATUS generated by autoconf version 2.13"
1919 exit 0 ;;
1920 -help | --help | --hel | --he | --h)
1921 echo "\$ac_cs_usage"; exit 0 ;;
1922 *) echo "\$ac_cs_usage"; exit 1 ;;
1923 esac
1924done
1925
1926ac_given_srcdir=$srcdir
1927
1928trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1929EOF
1930cat >> $CONFIG_STATUS <<EOF
1931
1932# Protect against being on the right side of a sed subst in config.status.
1933sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1934 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1935$ac_vpsub
1936$extrasub
1937s%@SHELL@%$SHELL%g
1938s%@CFLAGS@%$CFLAGS%g
1939s%@CPPFLAGS@%$CPPFLAGS%g
1940s%@CXXFLAGS@%$CXXFLAGS%g
1941s%@FFLAGS@%$FFLAGS%g
1942s%@DEFS@%$DEFS%g
1943s%@LDFLAGS@%$LDFLAGS%g
1944s%@LIBS@%$LIBS%g
1945s%@exec_prefix@%$exec_prefix%g
1946s%@prefix@%$prefix%g
1947s%@program_transform_name@%$program_transform_name%g
1948s%@bindir@%$bindir%g
1949s%@sbindir@%$sbindir%g
1950s%@libexecdir@%$libexecdir%g
1951s%@datadir@%$datadir%g
1952s%@sysconfdir@%$sysconfdir%g
1953s%@sharedstatedir@%$sharedstatedir%g
1954s%@localstatedir@%$localstatedir%g
1955s%@libdir@%$libdir%g
1956s%@includedir@%$includedir%g
1957s%@oldincludedir@%$oldincludedir%g
1958s%@infodir@%$infodir%g
1959s%@mandir@%$mandir%g
1960s%@program_prefix@%$program_prefix%g
1961s%@CC@%$CC%g
1962s%@BUILD_CC@%$BUILD_CC%g
1963s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g
1964s%@BUILD_LIBS@%$BUILD_LIBS%g
1965s%@RANLIB@%$RANLIB%g
1966s%@TARGET_CC@%$TARGET_CC%g
1967s%@TARGET_CFLAGS@%$TARGET_CFLAGS%g
1968s%@TARGET_LINK@%$TARGET_LINK%g
1969s%@TARGET_LFLAGS@%$TARGET_LFLAGS%g
1970s%@TARGET_RANLIB@%$TARGET_RANLIB%g
1971s%@TARGET_AR@%$TARGET_AR%g
drh297ecf12001-04-05 15:57:13 +00001972s%@ENCODING@%$ENCODING%g
drh75897232000-05-29 14:26:00 +00001973s%@BUILD_EXEEXT@%$BUILD_EXEEXT%g
1974s%@OS_UNIX@%$OS_UNIX%g
1975s%@OS_WIN@%$OS_WIN%g
1976s%@TARGET_EXEEXT@%$TARGET_EXEEXT%g
1977s%@TARGET_LIBS@%$TARGET_LIBS%g
1978s%@TARGET_TCL_LIBS@%$TARGET_TCL_LIBS%g
1979s%@CPP@%$CPP%g
1980s%@TARGET_TCL_INC@%$TARGET_TCL_INC%g
1981s%@TARGET_GDBM_LIBS@%$TARGET_GDBM_LIBS%g
1982s%@TARGET_GDBM_INC@%$TARGET_GDBM_INC%g
1983s%@TARGET_READLINE_LIBS@%$TARGET_READLINE_LIBS%g
1984s%@TARGET_READLINE_INC@%$TARGET_READLINE_INC%g
1985s%@TARGET_HAVE_READLINE@%$TARGET_HAVE_READLINE%g
1986
1987CEOF
1988EOF
1989
1990cat >> $CONFIG_STATUS <<\EOF
1991
1992# Split the substitutions into bite-sized pieces for seds with
1993# small command number limits, like on Digital OSF/1 and HP-UX.
1994ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1995ac_file=1 # Number of current file.
1996ac_beg=1 # First line for current file.
1997ac_end=$ac_max_sed_cmds # Line after last line for current file.
1998ac_more_lines=:
1999ac_sed_cmds=""
2000while $ac_more_lines; do
2001 if test $ac_beg -gt 1; then
2002 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
2003 else
2004 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
2005 fi
2006 if test ! -s conftest.s$ac_file; then
2007 ac_more_lines=false
2008 rm -f conftest.s$ac_file
2009 else
2010 if test -z "$ac_sed_cmds"; then
2011 ac_sed_cmds="sed -f conftest.s$ac_file"
2012 else
2013 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
2014 fi
2015 ac_file=`expr $ac_file + 1`
2016 ac_beg=$ac_end
2017 ac_end=`expr $ac_end + $ac_max_sed_cmds`
2018 fi
2019done
2020if test -z "$ac_sed_cmds"; then
2021 ac_sed_cmds=cat
2022fi
2023EOF
2024
2025cat >> $CONFIG_STATUS <<EOF
2026
2027CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
2028EOF
2029cat >> $CONFIG_STATUS <<\EOF
2030for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
2031 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
2032 case "$ac_file" in
2033 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
2034 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
2035 *) ac_file_in="${ac_file}.in" ;;
2036 esac
2037
2038 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
2039
2040 # Remove last slash and all that follows it. Not all systems have dirname.
2041 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2042 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
2043 # The file is in a subdirectory.
2044 test ! -d "$ac_dir" && mkdir "$ac_dir"
2045 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
2046 # A "../" for each directory in $ac_dir_suffix.
2047 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2048 else
2049 ac_dir_suffix= ac_dots=
2050 fi
2051
2052 case "$ac_given_srcdir" in
2053 .) srcdir=.
2054 if test -z "$ac_dots"; then top_srcdir=.
2055 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
2056 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2057 *) # Relative path.
2058 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2059 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2060 esac
2061
2062
2063 echo creating "$ac_file"
2064 rm -f "$ac_file"
2065 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
2066 case "$ac_file" in
2067 *Makefile*) ac_comsub="1i\\
2068# $configure_input" ;;
2069 *) ac_comsub= ;;
2070 esac
2071
2072 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
2073 sed -e "$ac_comsub
2074s%@configure_input@%$configure_input%g
2075s%@srcdir@%$srcdir%g
2076s%@top_srcdir@%$top_srcdir%g
2077" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
2078fi; done
2079rm -f conftest.s*
2080
2081EOF
2082cat >> $CONFIG_STATUS <<EOF
2083
2084EOF
2085cat >> $CONFIG_STATUS <<\EOF
2086
2087exit 0
2088EOF
2089chmod +x $CONFIG_STATUS
2090rm -fr confdefs* $ac_clean_files
2091test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2092