blob: dbf4986751300a3d930f3a0cdabf2057f9db0fc0 [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
528# $Revision: 1.1 $
529
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. **
543**************************************************************************" 1>&2; exit 1; }
544fi
545
546#########
547# Set up an appropriate program prefix
548#
549if test "$program_prefix" = "NONE"; then
550 program_prefix=""
551fi
552
553
554#########
555# Check to see if the --with-hints=FILE option is used. If there is none,
556# then check for a files named "$host.hints" and ../$hosts.hints where
557# $host is the hostname of the build system. If still no hints are
558# found, try looking in $system.hints and ../$system.hints where
559# $system is the result of uname -s.
560#
561# Check whether --with-hints or --without-hints was given.
562if test "${with_hints+set}" = set; then
563 withval="$with_hints"
564 hints=$withval
565fi
566
567if test "$hints" = ""; then
568 host=`hostname | sed 's/\..*//'`
569 if test -r $host.hints; then
570 hints=$host.hints
571 else
572 if test -r ../$host.hints; then
573 hints=../$host.hints
574 fi
575 fi
576fi
577if test "$hints" = ""; then
578 sys=`uname -s`
579 if test -r $sys.hints; then
580 hints=$sys.hints
581 else
582 if test -r ../$sys.hints; then
583 hints=../$sys.hints
584 fi
585 fi
586fi
587if test "$hints" != ""; then
588 echo "$ac_t""reading hints from $hints" 1>&6
589 . $hints
590fi
591
592#########
593# Locate a compiler for the build machine. This compiler should
594# generate command-line programs that run on the build machine.
595#
596default_build_cflags="-g"
597if test "$config_BUILD_CC" = ""; then
598 # Extract the first word of "gcc", so it can be a program name with args.
599set dummy gcc; ac_word=$2
600echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
601echo "configure:602: checking for $ac_word" >&5
602if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
603 echo $ac_n "(cached) $ac_c" 1>&6
604else
605 if test -n "$CC"; then
606 ac_cv_prog_CC="$CC" # Let the user override the test.
607else
608 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
609 ac_dummy="$PATH"
610 for ac_dir in $ac_dummy; do
611 test -z "$ac_dir" && ac_dir=.
612 if test -f $ac_dir/$ac_word; then
613 ac_cv_prog_CC="gcc"
614 break
615 fi
616 done
617 IFS="$ac_save_ifs"
618fi
619fi
620CC="$ac_cv_prog_CC"
621if test -n "$CC"; then
622 echo "$ac_t""$CC" 1>&6
623else
624 echo "$ac_t""no" 1>&6
625fi
626
627if test -z "$CC"; then
628 # Extract the first word of "cc", so it can be a program name with args.
629set dummy cc; ac_word=$2
630echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
631echo "configure:632: checking for $ac_word" >&5
632if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
633 echo $ac_n "(cached) $ac_c" 1>&6
634else
635 if test -n "$CC"; then
636 ac_cv_prog_CC="$CC" # Let the user override the test.
637else
638 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
639 ac_prog_rejected=no
640 ac_dummy="$PATH"
641 for ac_dir in $ac_dummy; do
642 test -z "$ac_dir" && ac_dir=.
643 if test -f $ac_dir/$ac_word; then
644 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
645 ac_prog_rejected=yes
646 continue
647 fi
648 ac_cv_prog_CC="cc"
649 break
650 fi
651 done
652 IFS="$ac_save_ifs"
653if test $ac_prog_rejected = yes; then
654 # We found a bogon in the path, so make sure we never use it.
655 set dummy $ac_cv_prog_CC
656 shift
657 if test $# -gt 0; then
658 # We chose a different compiler from the bogus one.
659 # However, it has the same basename, so the bogon will be chosen
660 # first if we set CC to just the basename; use the full file name.
661 shift
662 set dummy "$ac_dir/$ac_word" "$@"
663 shift
664 ac_cv_prog_CC="$@"
665 fi
666fi
667fi
668fi
669CC="$ac_cv_prog_CC"
670if test -n "$CC"; then
671 echo "$ac_t""$CC" 1>&6
672else
673 echo "$ac_t""no" 1>&6
674fi
675
676 if test -z "$CC"; then
677 case "`uname -s`" in
678 *win32* | *WIN32*)
679 # Extract the first word of "cl", so it can be a program name with args.
680set dummy cl; ac_word=$2
681echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
682echo "configure:683: checking for $ac_word" >&5
683if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
684 echo $ac_n "(cached) $ac_c" 1>&6
685else
686 if test -n "$CC"; then
687 ac_cv_prog_CC="$CC" # Let the user override the test.
688else
689 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
690 ac_dummy="$PATH"
691 for ac_dir in $ac_dummy; do
692 test -z "$ac_dir" && ac_dir=.
693 if test -f $ac_dir/$ac_word; then
694 ac_cv_prog_CC="cl"
695 break
696 fi
697 done
698 IFS="$ac_save_ifs"
699fi
700fi
701CC="$ac_cv_prog_CC"
702if test -n "$CC"; then
703 echo "$ac_t""$CC" 1>&6
704else
705 echo "$ac_t""no" 1>&6
706fi
707 ;;
708 esac
709 fi
710 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
711fi
712
713echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
714echo "configure:715: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
715
716ac_ext=c
717# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
718ac_cpp='$CPP $CPPFLAGS'
719ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
720ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
721cross_compiling=$ac_cv_prog_cc_cross
722
723cat > conftest.$ac_ext << EOF
724
725#line 726 "configure"
726#include "confdefs.h"
727
728main(){return(0);}
729EOF
730if { (eval echo configure:731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
731 ac_cv_prog_cc_works=yes
732 # If we can't run a trivial program, we are probably using a cross compiler.
733 if (./conftest; exit) 2>/dev/null; then
734 ac_cv_prog_cc_cross=no
735 else
736 ac_cv_prog_cc_cross=yes
737 fi
738else
739 echo "configure: failed program was:" >&5
740 cat conftest.$ac_ext >&5
741 ac_cv_prog_cc_works=no
742fi
743rm -fr conftest*
744ac_ext=c
745# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
746ac_cpp='$CPP $CPPFLAGS'
747ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
748ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
749cross_compiling=$ac_cv_prog_cc_cross
750
751echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
752if test $ac_cv_prog_cc_works = no; then
753 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
754fi
755echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
756echo "configure:757: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
757echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
758cross_compiling=$ac_cv_prog_cc_cross
759
760echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
761echo "configure:762: checking whether we are using GNU C" >&5
762if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
763 echo $ac_n "(cached) $ac_c" 1>&6
764else
765 cat > conftest.c <<EOF
766#ifdef __GNUC__
767 yes;
768#endif
769EOF
770if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
771 ac_cv_prog_gcc=yes
772else
773 ac_cv_prog_gcc=no
774fi
775fi
776
777echo "$ac_t""$ac_cv_prog_gcc" 1>&6
778
779if test $ac_cv_prog_gcc = yes; then
780 GCC=yes
781else
782 GCC=
783fi
784
785ac_test_CFLAGS="${CFLAGS+set}"
786ac_save_CFLAGS="$CFLAGS"
787CFLAGS=
788echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
789echo "configure:790: checking whether ${CC-cc} accepts -g" >&5
790if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
791 echo $ac_n "(cached) $ac_c" 1>&6
792else
793 echo 'void f(){}' > conftest.c
794if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
795 ac_cv_prog_cc_g=yes
796else
797 ac_cv_prog_cc_g=no
798fi
799rm -f conftest*
800
801fi
802
803echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
804if test "$ac_test_CFLAGS" = set; then
805 CFLAGS="$ac_save_CFLAGS"
806elif test $ac_cv_prog_cc_g = yes; then
807 if test "$GCC" = yes; then
808 CFLAGS="-g -O2"
809 else
810 CFLAGS="-g"
811 fi
812else
813 if test "$GCC" = yes; then
814 CFLAGS="-O2"
815 else
816 CFLAGS=
817 fi
818fi
819
820 if test "$cross_compiling" = "yes"; then
821 { echo "configure: error: unable to find a compiler for building build tools" 1>&2; exit 1; }
822 fi
823 BUILD_CC=$CC
824 default_build_cflags=$CFLAGS
825else
826 BUILD_CC=$config_BUILD_CC
827 echo $ac_n "checking host compiler""... $ac_c" 1>&6
828echo "configure:829: checking host compiler" >&5
829 CC=$BUILD_CC
830 echo "$ac_t""$BUILD_CC" 1>&6
831fi
832echo $ac_n "checking switches for the host compiler""... $ac_c" 1>&6
833echo "configure:834: checking switches for the host compiler" >&5
834if test "$config_BUILD_CFLAGS" != ""; then
835 CFLAGS=$config_BUILD_CFLAGS
836 BUILD_CFLAGS=$config_BUILD_CFLAGS
837else
838 BUILD_CFLAGS=$default_build_cflags
839fi
840echo "$ac_t""$BUILD_CFLAGS" 1>&6
841if test "$config_BUILD_LIBS" != ""; then
842 BUILD_LIBS=$config_BUILD_LIBS
843fi
844
845
846
847
848##########
849# Locate a compiler that converts C code into *.o files that run on
850# the target machine.
851#
852echo $ac_n "checking target compiler""... $ac_c" 1>&6
853echo "configure:854: checking target compiler" >&5
854if test "$config_TARGET_CC" != ""; then
855 TARGET_CC=$config_TARGET_CC
856else
857 TARGET_CC=$BUILD_CC
858fi
859echo "$ac_t""$TARGET_CC" 1>&6
860echo $ac_n "checking switches on the target compiler""... $ac_c" 1>&6
861echo "configure:862: checking switches on the target compiler" >&5
862if test "$config_TARGET_CFLAGS" != ""; then
863 TARGET_CFLAGS=$config_TARGET_CFLAGS
864else
865 TARGET_CFLAGS=$BUILD_CFLAGS
866fi
867echo "$ac_t""$TARGET_CFLAGS" 1>&6
868echo $ac_n "checking target linker""... $ac_c" 1>&6
869echo "configure:870: checking target linker" >&5
870if test "$config_TARGET_LINK" = ""; then
871 TARGET_LINK=$TARGET_CC
872else
873 TARGET_LINK=$config_TARGET_LINK
874fi
875echo "$ac_t""$TARGET_LINK" 1>&6
876echo $ac_n "checking switches on the target compiler""... $ac_c" 1>&6
877echo "configure:878: checking switches on the target compiler" >&5
878if test "$config_TARGET_TFLAGS" != ""; then
879 TARGET_TFLAGS=$config_TARGET_TFLAGS
880else
881 TARGET_TFLAGS=$BUILD_CFLAGS
882fi
883if test "$config_TARGET_RANLIB" != ""; then
884 TARGET_RANLIB=$config_TARGET_RANLIB
885else
886 # Extract the first word of "ranlib", so it can be a program name with args.
887set dummy ranlib; ac_word=$2
888echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
889echo "configure:890: checking for $ac_word" >&5
890if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
891 echo $ac_n "(cached) $ac_c" 1>&6
892else
893 if test -n "$RANLIB"; then
894 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
895else
896 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
897 ac_dummy="$PATH"
898 for ac_dir in $ac_dummy; do
899 test -z "$ac_dir" && ac_dir=.
900 if test -f $ac_dir/$ac_word; then
901 ac_cv_prog_RANLIB="ranlib"
902 break
903 fi
904 done
905 IFS="$ac_save_ifs"
906 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
907fi
908fi
909RANLIB="$ac_cv_prog_RANLIB"
910if test -n "$RANLIB"; then
911 echo "$ac_t""$RANLIB" 1>&6
912else
913 echo "$ac_t""no" 1>&6
914fi
915
916 TARGET_RANLIB=$RANLIB
917fi
918if test "$config_TARGET_AR" != ""; then
919 TARGET_RANLIB=$config_TARGET_AR
920else
921 TARGET_AR='ar cr'
922fi
923echo "$ac_t""$TARGET_TFLAGS" 1>&6
924
925
926
927
928
929
930
931# Set the $cross variable if we are cross-compiling. Make
932# it 0 if we are not.
933#
934echo $ac_n "checking if host and target compilers are the same""... $ac_c" 1>&6
935echo "configure:936: checking if host and target compilers are the same" >&5
936if test "$BUILD_CC" = "$TARGET_CC"; then
937 cross=0
938 echo "$ac_t""yes" 1>&6
939else
940 cross=1
941 echo "$ac_t""no" 1>&6
942fi
943
944###########
945# Lots of things are different if we are compiling for Windows using
946# the CYGWIN environment. So check for that special case and handle
947# things accordingly.
948#
949echo $ac_n "checking if executables have the .exe suffix""... $ac_c" 1>&6
950echo "configure:951: checking if executables have the .exe suffix" >&5
951if test "$config_BUILD_EXEEXT" = ".exe"; then
952 CYGWIN=yes
953 echo "$ac_t""yes" 1>&6
954else
955 echo "$ac_t""unknown" 1>&6
956fi
957if test "$CYGWIN" != "yes"; then
958 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
959echo "configure:960: checking for Cygwin environment" >&5
960if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
961 echo $ac_n "(cached) $ac_c" 1>&6
962else
963 cat > conftest.$ac_ext <<EOF
964#line 965 "configure"
965#include "confdefs.h"
966
967int main() {
968
969#ifndef __CYGWIN__
970#define __CYGWIN__ __CYGWIN32__
971#endif
972return __CYGWIN__;
973; return 0; }
974EOF
975if { (eval echo configure:976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
976 rm -rf conftest*
977 ac_cv_cygwin=yes
978else
979 echo "configure: failed program was:" >&5
980 cat conftest.$ac_ext >&5
981 rm -rf conftest*
982 ac_cv_cygwin=no
983fi
984rm -f conftest*
985rm -f conftest*
986fi
987
988echo "$ac_t""$ac_cv_cygwin" 1>&6
989CYGWIN=
990test "$ac_cv_cygwin" = yes && CYGWIN=yes
991fi
992if test "$CYGWIN" = "yes"; then
993 BUILD_EXEEXT=.exe
994else
995 BUILD_EXEEXT=""
996fi
997if test "$cross" = "0"; then
998 TARGET_EXEEXT=$BUILD_EXEEXT
999else
1000 TARGET_EXEEXT=$config_TARGET_EXEEXT
1001fi
1002if test "$TARGET_EXEEXT" = ".exe"; then
1003 OS_UNIX=0
1004 OS_WIN=1
1005 tclsubdir=win
1006else
1007 OS_UNIX=1
1008 OS_WIN=0
1009 tclsubdir=unix
1010fi
1011TARGET_CFLAGS="$TARGET_CFLAGS -DOS_UNIX=$OS_UNIX -DOS_WIN=$OS_WIN"
1012
1013
1014
1015
1016
1017
1018##########
1019# Extract generic linker options from the environment.
1020#
1021if test "$config_TARGET_LIBS" != ""; then
1022 TARGET_LIBS=$config_TARGET_LIBS
1023else
1024 TARGET_LIBS=""
1025fi
1026
1027
1028##########
1029# Figure out what C libraries are required to compile Tcl programs.
1030#
1031if test "$config_TARGET_TCL_LIBS" != ""; then
1032 TARGET_TCL_LIBS="$config_TARGET_TCL_LIBS"
1033else
1034 if test "$with_tcl" != ""; then
1035 extra=`echo $with_tcl/$tclsubdir/libtcl8*.a`
1036 fi
1037 CC=$TARGET_CC
1038 echo $ac_n "checking for sin""... $ac_c" 1>&6
1039echo "configure:1040: checking for sin" >&5
1040if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
1041 echo $ac_n "(cached) $ac_c" 1>&6
1042else
1043 cat > conftest.$ac_ext <<EOF
1044#line 1045 "configure"
1045#include "confdefs.h"
1046/* System header to define __stub macros and hopefully few prototypes,
1047 which can conflict with char sin(); below. */
1048#include <assert.h>
1049/* Override any gcc2 internal prototype to avoid an error. */
1050/* We use char because int might match the return type of a gcc2
1051 builtin and then its argument prototype would still apply. */
1052char sin();
1053
1054int main() {
1055
1056/* The GNU C library defines this for functions which it implements
1057 to always fail with ENOSYS. Some functions are actually named
1058 something starting with __ and the normal name is an alias. */
1059#if defined (__stub_sin) || defined (__stub___sin)
1060choke me
1061#else
1062sin();
1063#endif
1064
1065; return 0; }
1066EOF
1067if { (eval echo configure:1068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1068 rm -rf conftest*
1069 eval "ac_cv_func_sin=yes"
1070else
1071 echo "configure: failed program was:" >&5
1072 cat conftest.$ac_ext >&5
1073 rm -rf conftest*
1074 eval "ac_cv_func_sin=no"
1075fi
1076rm -f conftest*
1077fi
1078
1079if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
1080 echo "$ac_t""yes" 1>&6
1081 LIBS=""
1082else
1083 echo "$ac_t""no" 1>&6
1084LIBS="-lm"
1085fi
1086
1087 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
1088echo "configure:1089: checking for dlopen in -ldl" >&5
1089ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
1090if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1091 echo $ac_n "(cached) $ac_c" 1>&6
1092else
1093 ac_save_LIBS="$LIBS"
1094LIBS="-ldl $LIBS"
1095cat > conftest.$ac_ext <<EOF
1096#line 1097 "configure"
1097#include "confdefs.h"
1098/* Override any gcc2 internal prototype to avoid an error. */
1099/* We use char because int might match the return type of a gcc2
1100 builtin and then its argument prototype would still apply. */
1101char dlopen();
1102
1103int main() {
1104dlopen()
1105; return 0; }
1106EOF
1107if { (eval echo configure:1108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1108 rm -rf conftest*
1109 eval "ac_cv_lib_$ac_lib_var=yes"
1110else
1111 echo "configure: failed program was:" >&5
1112 cat conftest.$ac_ext >&5
1113 rm -rf conftest*
1114 eval "ac_cv_lib_$ac_lib_var=no"
1115fi
1116rm -f conftest*
1117LIBS="$ac_save_LIBS"
1118
1119fi
1120if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1121 echo "$ac_t""yes" 1>&6
1122 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1123 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1124 cat >> confdefs.h <<EOF
1125#define $ac_tr_lib 1
1126EOF
1127
1128 LIBS="-ldl $LIBS"
1129
1130else
1131 echo "$ac_t""no" 1>&6
1132fi
1133
1134 otherlibs=$LIBS
1135 if test "$extra" != ""; then
1136 LIBS=$extra
1137 else
1138 LIBS=""
1139
1140echo $ac_n "checking for library containing Tcl_Init""... $ac_c" 1>&6
1141echo "configure:1142: checking for library containing Tcl_Init" >&5
1142if eval "test \"`echo '$''{'ac_cv_search_Tcl_Init'+set}'`\" = set"; then
1143 echo $ac_n "(cached) $ac_c" 1>&6
1144else
1145 ac_func_search_save_LIBS="$LIBS"
1146ac_cv_search_Tcl_Init="no"
1147cat > conftest.$ac_ext <<EOF
1148#line 1149 "configure"
1149#include "confdefs.h"
1150/* Override any gcc2 internal prototype to avoid an error. */
1151/* We use char because int might match the return type of a gcc2
1152 builtin and then its argument prototype would still apply. */
1153char Tcl_Init();
1154
1155int main() {
1156Tcl_Init()
1157; return 0; }
1158EOF
1159if { (eval echo configure:1160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1160 rm -rf conftest*
1161 ac_cv_search_Tcl_Init="none required"
1162else
1163 echo "configure: failed program was:" >&5
1164 cat conftest.$ac_ext >&5
1165fi
1166rm -f conftest*
1167test "$ac_cv_search_Tcl_Init" = "no" && for i in tcl8.4 tcl8.3 tcl8.2 tcl8.1 tcl8.0 tcl80 tcl; do
1168LIBS="-l$i $otherlibs $ac_func_search_save_LIBS"
1169cat > conftest.$ac_ext <<EOF
1170#line 1171 "configure"
1171#include "confdefs.h"
1172/* Override any gcc2 internal prototype to avoid an error. */
1173/* We use char because int might match the return type of a gcc2
1174 builtin and then its argument prototype would still apply. */
1175char Tcl_Init();
1176
1177int main() {
1178Tcl_Init()
1179; return 0; }
1180EOF
1181if { (eval echo configure:1182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1182 rm -rf conftest*
1183 ac_cv_search_Tcl_Init="-l$i"
1184break
1185else
1186 echo "configure: failed program was:" >&5
1187 cat conftest.$ac_ext >&5
1188fi
1189rm -f conftest*
1190done
1191LIBS="$ac_func_search_save_LIBS"
1192fi
1193
1194echo "$ac_t""$ac_cv_search_Tcl_Init" 1>&6
1195if test "$ac_cv_search_Tcl_Init" != "no"; then
1196 test "$ac_cv_search_Tcl_Init" = "none required" || LIBS="$ac_cv_search_Tcl_Init $LIBS"
1197
1198else :
1199
1200fi
1201 fi
1202 TARGET_TCL_LIBS="$LIBS $otherlibs"
1203fi
1204
1205
1206##########
1207# Figure out where to get the TCL header files.
1208#
1209echo $ac_n "checking TCL header files""... $ac_c" 1>&6
1210echo "configure:1211: checking TCL header files" >&5
1211found=no
1212if test "$config_TARGET_TCL_INC" != ""; then
1213 TARGET_TCL_INC=$config_TARGET_TCL_INC
1214 found=yes
1215else
1216 if test "$with_tcl" != ""; then
1217 TARGET_TCL_INC="-I$with_tcl/generic -I$with_tcl/$tclsubdir"
1218 found=yes
1219 else
1220 TARGET_TCL_INC=""
1221 found=no
1222 fi
1223fi
1224if test "$found" = "yes"; then
1225 echo "$ac_t""$TARGET_TCL_INC" 1>&6
1226else
1227 echo "$ac_t""not specified: still searching..." 1>&6
1228 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1229echo "configure:1230: checking how to run the C preprocessor" >&5
1230# On Suns, sometimes $CPP names a directory.
1231if test -n "$CPP" && test -d "$CPP"; then
1232 CPP=
1233fi
1234if test -z "$CPP"; then
1235if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1236 echo $ac_n "(cached) $ac_c" 1>&6
1237else
1238 # This must be in double quotes, not single quotes, because CPP may get
1239 # substituted into the Makefile and "${CC-cc}" will confuse make.
1240 CPP="${CC-cc} -E"
1241 # On the NeXT, cc -E runs the code through the compiler's parser,
1242 # not just through cpp.
1243 cat > conftest.$ac_ext <<EOF
1244#line 1245 "configure"
1245#include "confdefs.h"
1246#include <assert.h>
1247Syntax Error
1248EOF
1249ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1250{ (eval echo configure:1251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1251ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1252if test -z "$ac_err"; then
1253 :
1254else
1255 echo "$ac_err" >&5
1256 echo "configure: failed program was:" >&5
1257 cat conftest.$ac_ext >&5
1258 rm -rf conftest*
1259 CPP="${CC-cc} -E -traditional-cpp"
1260 cat > conftest.$ac_ext <<EOF
1261#line 1262 "configure"
1262#include "confdefs.h"
1263#include <assert.h>
1264Syntax Error
1265EOF
1266ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1267{ (eval echo configure:1268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1268ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1269if test -z "$ac_err"; then
1270 :
1271else
1272 echo "$ac_err" >&5
1273 echo "configure: failed program was:" >&5
1274 cat conftest.$ac_ext >&5
1275 rm -rf conftest*
1276 CPP="${CC-cc} -nologo -E"
1277 cat > conftest.$ac_ext <<EOF
1278#line 1279 "configure"
1279#include "confdefs.h"
1280#include <assert.h>
1281Syntax Error
1282EOF
1283ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1284{ (eval echo configure:1285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1285ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1286if test -z "$ac_err"; then
1287 :
1288else
1289 echo "$ac_err" >&5
1290 echo "configure: failed program was:" >&5
1291 cat conftest.$ac_ext >&5
1292 rm -rf conftest*
1293 CPP=/lib/cpp
1294fi
1295rm -f conftest*
1296fi
1297rm -f conftest*
1298fi
1299rm -f conftest*
1300 ac_cv_prog_CPP="$CPP"
1301fi
1302 CPP="$ac_cv_prog_CPP"
1303else
1304 ac_cv_prog_CPP="$CPP"
1305fi
1306echo "$ac_t""$CPP" 1>&6
1307
1308ac_safe=`echo "tcl.h" | sed 'y%./+-%__p_%'`
1309echo $ac_n "checking for tcl.h""... $ac_c" 1>&6
1310echo "configure:1311: checking for tcl.h" >&5
1311if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1312 echo $ac_n "(cached) $ac_c" 1>&6
1313else
1314 cat > conftest.$ac_ext <<EOF
1315#line 1316 "configure"
1316#include "confdefs.h"
1317#include <tcl.h>
1318EOF
1319ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1320{ (eval echo configure:1321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1321ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1322if test -z "$ac_err"; then
1323 rm -rf conftest*
1324 eval "ac_cv_header_$ac_safe=yes"
1325else
1326 echo "$ac_err" >&5
1327 echo "configure: failed program was:" >&5
1328 cat conftest.$ac_ext >&5
1329 rm -rf conftest*
1330 eval "ac_cv_header_$ac_safe=no"
1331fi
1332rm -f conftest*
1333fi
1334if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1335 echo "$ac_t""yes" 1>&6
1336 found=yes
1337else
1338 echo "$ac_t""no" 1>&6
1339fi
1340
1341fi
1342if test "$found" = "no"; then
1343 for dir in /usr/local /usr/X11* /usr/pkg /usr/contrib /usr; do
1344
1345ac_safe=`echo "$dir/include/tcl.h" | sed 'y%./+-%__p_%'`
1346echo $ac_n "checking for $dir/include/tcl.h""... $ac_c" 1>&6
1347echo "configure:1348: checking for $dir/include/tcl.h" >&5
1348if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
1349 echo $ac_n "(cached) $ac_c" 1>&6
1350else
1351 if test "$cross_compiling" = yes; then
1352 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
1353else
1354 if test -r $dir/include/tcl.h; then
1355 eval "ac_cv_file_$ac_safe=yes"
1356 else
1357 eval "ac_cv_file_$ac_safe=no"
1358 fi
1359fi
1360fi
1361if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
1362 echo "$ac_t""yes" 1>&6
1363 found=yes
1364else
1365 echo "$ac_t""no" 1>&6
1366
1367fi
1368
1369 if test "$found" = "yes"; then
1370 TARGET_TCL_INC="-I$dir/include"
1371 break
1372 fi
1373 done
1374fi
1375
1376
1377##########
1378# Figure out what C libraries are required to compile programs
1379# that use GDBM.
1380#
1381if test "$config_TARGET_GDBM_LIBS" != ""; then
1382 TARGET_GDBM_LIBS="$config_TARGET_GDBM_LIBS"
1383else
1384 CC=$TARGET_CC
1385 LIBS=""
1386
1387echo $ac_n "checking for library containing gdbm_open""... $ac_c" 1>&6
1388echo "configure:1389: checking for library containing gdbm_open" >&5
1389if eval "test \"`echo '$''{'ac_cv_search_gdbm_open'+set}'`\" = set"; then
1390 echo $ac_n "(cached) $ac_c" 1>&6
1391else
1392 ac_func_search_save_LIBS="$LIBS"
1393ac_cv_search_gdbm_open="no"
1394cat > conftest.$ac_ext <<EOF
1395#line 1396 "configure"
1396#include "confdefs.h"
1397/* Override any gcc2 internal prototype to avoid an error. */
1398/* We use char because int might match the return type of a gcc2
1399 builtin and then its argument prototype would still apply. */
1400char gdbm_open();
1401
1402int main() {
1403gdbm_open()
1404; return 0; }
1405EOF
1406if { (eval echo configure:1407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1407 rm -rf conftest*
1408 ac_cv_search_gdbm_open="none required"
1409else
1410 echo "configure: failed program was:" >&5
1411 cat conftest.$ac_ext >&5
1412fi
1413rm -f conftest*
1414test "$ac_cv_search_gdbm_open" = "no" && for i in gdbm; do
1415LIBS="-l$i $ac_func_search_save_LIBS"
1416cat > conftest.$ac_ext <<EOF
1417#line 1418 "configure"
1418#include "confdefs.h"
1419/* Override any gcc2 internal prototype to avoid an error. */
1420/* We use char because int might match the return type of a gcc2
1421 builtin and then its argument prototype would still apply. */
1422char gdbm_open();
1423
1424int main() {
1425gdbm_open()
1426; return 0; }
1427EOF
1428if { (eval echo configure:1429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1429 rm -rf conftest*
1430 ac_cv_search_gdbm_open="-l$i"
1431break
1432else
1433 echo "configure: failed program was:" >&5
1434 cat conftest.$ac_ext >&5
1435fi
1436rm -f conftest*
1437done
1438LIBS="$ac_func_search_save_LIBS"
1439fi
1440
1441echo "$ac_t""$ac_cv_search_gdbm_open" 1>&6
1442if test "$ac_cv_search_gdbm_open" != "no"; then
1443 test "$ac_cv_search_gdbm_open" = "none required" || LIBS="$ac_cv_search_gdbm_open $LIBS"
1444
1445else :
1446
1447fi
1448 TARGET_GDBM_LIBS="$LIBS"
1449fi
1450
1451
1452##########
1453# Figure out where to get the GDBM header files.
1454#
1455echo $ac_n "checking GDBM header files""... $ac_c" 1>&6
1456echo "configure:1457: checking GDBM header files" >&5
1457found=no
1458if test "$config_TARGET_GDBM_INC" != ""; then
1459 TARGET_GDBM_INC=$config_TARGET_GDBM_INC
1460 found=yes
1461fi
1462if test "$found" = "yes"; then
1463 echo "$ac_t""$TARGET_TCL_INC" 1>&6
1464else
1465 echo "$ac_t""not specified: still searching..." 1>&6
1466 ac_safe=`echo "gdbm.h" | sed 'y%./+-%__p_%'`
1467echo $ac_n "checking for gdbm.h""... $ac_c" 1>&6
1468echo "configure:1469: checking for gdbm.h" >&5
1469if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1470 echo $ac_n "(cached) $ac_c" 1>&6
1471else
1472 cat > conftest.$ac_ext <<EOF
1473#line 1474 "configure"
1474#include "confdefs.h"
1475#include <gdbm.h>
1476EOF
1477ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1478{ (eval echo configure:1479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1479ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1480if test -z "$ac_err"; then
1481 rm -rf conftest*
1482 eval "ac_cv_header_$ac_safe=yes"
1483else
1484 echo "$ac_err" >&5
1485 echo "configure: failed program was:" >&5
1486 cat conftest.$ac_ext >&5
1487 rm -rf conftest*
1488 eval "ac_cv_header_$ac_safe=no"
1489fi
1490rm -f conftest*
1491fi
1492if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1493 echo "$ac_t""yes" 1>&6
1494 found=yes
1495else
1496 echo "$ac_t""no" 1>&6
1497fi
1498
1499fi
1500if test "$found" = "no"; then
1501 for dir in /usr/local /usr/pkg /usr/contrib; do
1502
1503ac_safe=`echo "$dir/include/gdbm.h" | sed 'y%./+-%__p_%'`
1504echo $ac_n "checking for $dir/include/gdbm.h""... $ac_c" 1>&6
1505echo "configure:1506: checking for $dir/include/gdbm.h" >&5
1506if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
1507 echo $ac_n "(cached) $ac_c" 1>&6
1508else
1509 if test "$cross_compiling" = yes; then
1510 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
1511else
1512 if test -r $dir/include/gdbm.h; then
1513 eval "ac_cv_file_$ac_safe=yes"
1514 else
1515 eval "ac_cv_file_$ac_safe=no"
1516 fi
1517fi
1518fi
1519if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
1520 echo "$ac_t""yes" 1>&6
1521 found=yes
1522else
1523 echo "$ac_t""no" 1>&6
1524
1525fi
1526
1527 if test "$found" = "yes"; then
1528 TARGET_GDBM_INC="-I$dir/include"
1529 break
1530 fi
1531 done
1532fi
1533
1534
1535##########
1536# Figure out what C libraries are required to compile programs
1537# that use "readline()" library.
1538#
1539if test "$config_TARGET_READLINE_LIBS" != ""; then
1540 TARGET_READLINE_LIBS="$config_TARGET_READLINE_LIBS"
1541else
1542 CC=$TARGET_CC
1543 LIBS=""
1544
1545echo $ac_n "checking for library containing readline""... $ac_c" 1>&6
1546echo "configure:1547: checking for library containing readline" >&5
1547if eval "test \"`echo '$''{'ac_cv_search_readline'+set}'`\" = set"; then
1548 echo $ac_n "(cached) $ac_c" 1>&6
1549else
1550 ac_func_search_save_LIBS="$LIBS"
1551ac_cv_search_readline="no"
1552cat > conftest.$ac_ext <<EOF
1553#line 1554 "configure"
1554#include "confdefs.h"
1555/* Override any gcc2 internal prototype to avoid an error. */
1556/* We use char because int might match the return type of a gcc2
1557 builtin and then its argument prototype would still apply. */
1558char readline();
1559
1560int main() {
1561readline()
1562; return 0; }
1563EOF
1564if { (eval echo configure:1565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1565 rm -rf conftest*
1566 ac_cv_search_readline="none required"
1567else
1568 echo "configure: failed program was:" >&5
1569 cat conftest.$ac_ext >&5
1570fi
1571rm -f conftest*
1572test "$ac_cv_search_readline" = "no" && for i in readline; do
1573LIBS="-l$i $ac_func_search_save_LIBS"
1574cat > conftest.$ac_ext <<EOF
1575#line 1576 "configure"
1576#include "confdefs.h"
1577/* Override any gcc2 internal prototype to avoid an error. */
1578/* We use char because int might match the return type of a gcc2
1579 builtin and then its argument prototype would still apply. */
1580char readline();
1581
1582int main() {
1583readline()
1584; return 0; }
1585EOF
1586if { (eval echo configure:1587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1587 rm -rf conftest*
1588 ac_cv_search_readline="-l$i"
1589break
1590else
1591 echo "configure: failed program was:" >&5
1592 cat conftest.$ac_ext >&5
1593fi
1594rm -f conftest*
1595done
1596LIBS="$ac_func_search_save_LIBS"
1597fi
1598
1599echo "$ac_t""$ac_cv_search_readline" 1>&6
1600if test "$ac_cv_search_readline" != "no"; then
1601 test "$ac_cv_search_readline" = "none required" || LIBS="$ac_cv_search_readline $LIBS"
1602
1603else :
1604
1605fi
1606 TARGET_READLINE_LIBS="$LIBS"
1607fi
1608
1609
1610##########
1611# Figure out where to get the READLINE header files.
1612#
1613echo $ac_n "checking readline header files""... $ac_c" 1>&6
1614echo "configure:1615: checking readline header files" >&5
1615found=no
1616if test "$config_TARGET_READLINE_INC" != ""; then
1617 TARGET_READLINE_INC=$config_TARGET_READLINE_INC
1618 found=yes
1619fi
1620if test "$found" = "yes"; then
1621 echo "$ac_t""$TARGET_READLINE_INC" 1>&6
1622else
1623 echo "$ac_t""not specified: still searching..." 1>&6
1624 ac_safe=`echo "readline.h" | sed 'y%./+-%__p_%'`
1625echo $ac_n "checking for readline.h""... $ac_c" 1>&6
1626echo "configure:1627: checking for readline.h" >&5
1627if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1628 echo $ac_n "(cached) $ac_c" 1>&6
1629else
1630 cat > conftest.$ac_ext <<EOF
1631#line 1632 "configure"
1632#include "confdefs.h"
1633#include <readline.h>
1634EOF
1635ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1636{ (eval echo configure:1637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1637ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1638if test -z "$ac_err"; then
1639 rm -rf conftest*
1640 eval "ac_cv_header_$ac_safe=yes"
1641else
1642 echo "$ac_err" >&5
1643 echo "configure: failed program was:" >&5
1644 cat conftest.$ac_ext >&5
1645 rm -rf conftest*
1646 eval "ac_cv_header_$ac_safe=no"
1647fi
1648rm -f conftest*
1649fi
1650if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1651 echo "$ac_t""yes" 1>&6
1652 found=yes
1653else
1654 echo "$ac_t""no" 1>&6
1655fi
1656
1657fi
1658if test "$found" = "no"; then
1659 for dir in /usr /usr/local /usr/local/readline /usr/contrib; do
1660
1661ac_safe=`echo "$dir/include/readline.h" | sed 'y%./+-%__p_%'`
1662echo $ac_n "checking for $dir/include/readline.h""... $ac_c" 1>&6
1663echo "configure:1664: checking for $dir/include/readline.h" >&5
1664if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
1665 echo $ac_n "(cached) $ac_c" 1>&6
1666else
1667 if test "$cross_compiling" = yes; then
1668 { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
1669else
1670 if test -r $dir/include/readline.h; then
1671 eval "ac_cv_file_$ac_safe=yes"
1672 else
1673 eval "ac_cv_file_$ac_safe=no"
1674 fi
1675fi
1676fi
1677if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
1678 echo "$ac_t""yes" 1>&6
1679 found=yes
1680else
1681 echo "$ac_t""no" 1>&6
1682
1683fi
1684
1685 if test "$found" = "yes"; then
1686 TARGET_READLINE_INC="-I$dir/include"
1687 break
1688 fi
1689
1690ac_safe=`echo "$dir/include/readline/readline.h" | sed 'y%./+-%__p_%'`
1691echo $ac_n "checking for $dir/include/readline/readline.h""... $ac_c" 1>&6
1692echo "configure:1693: checking for $dir/include/readline/readline.h" >&5
1693if 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/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/readline"
1716 break
1717 fi
1718 done
1719fi
1720if test "$found" = "yes"; then
1721 TARGET_HAVE_READLINE=1
1722else
1723 TARGET_HAVE_READLINE=0
1724fi
1725
1726
1727
1728#########
1729# Generate the output files.
1730#
1731trap '' 1 2 15
1732cat > confcache <<\EOF
1733# This file is a shell script that caches the results of configure
1734# tests run on this system so they can be shared between configure
1735# scripts and configure runs. It is not useful on other systems.
1736# If it contains results you don't want to keep, you may remove or edit it.
1737#
1738# By default, configure uses ./config.cache as the cache file,
1739# creating it if it does not exist already. You can give configure
1740# the --cache-file=FILE option to use a different cache file; that is
1741# what configure does when it calls configure scripts in
1742# subdirectories, so they share the cache.
1743# Giving --cache-file=/dev/null disables caching, for debugging configure.
1744# config.status only pays attention to the cache file if you give it the
1745# --recheck option to rerun configure.
1746#
1747EOF
1748# The following way of writing the cache mishandles newlines in values,
1749# but we know of no workaround that is simple, portable, and efficient.
1750# So, don't put newlines in cache variables' values.
1751# Ultrix sh set writes to stderr and can't be redirected directly,
1752# and sets the high bit in the cache file unless we assign to the vars.
1753(set) 2>&1 |
1754 case `(ac_space=' '; set | grep ac_space) 2>&1` in
1755 *ac_space=\ *)
1756 # `set' does not quote correctly, so add quotes (double-quote substitution
1757 # turns \\\\ into \\, and sed turns \\ into \).
1758 sed -n \
1759 -e "s/'/'\\\\''/g" \
1760 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
1761 ;;
1762 *)
1763 # `set' quotes correctly as required by POSIX, so do not add quotes.
1764 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
1765 ;;
1766 esac >> confcache
1767if cmp -s $cache_file confcache; then
1768 :
1769else
1770 if test -w $cache_file; then
1771 echo "updating cache $cache_file"
1772 cat confcache > $cache_file
1773 else
1774 echo "not updating unwritable cache $cache_file"
1775 fi
1776fi
1777rm -f confcache
1778
1779trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
1780
1781test "x$prefix" = xNONE && prefix=$ac_default_prefix
1782# Let make expand exec_prefix.
1783test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
1784
1785# Any assignment to VPATH causes Sun make to only execute
1786# the first set of double-colon rules, so remove it if not needed.
1787# If there is a colon in the path, we need to keep it.
1788if test "x$srcdir" = x.; then
1789 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
1790fi
1791
1792trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
1793
1794# Transform confdefs.h into DEFS.
1795# Protect against shell expansion while executing Makefile rules.
1796# Protect against Makefile macro expansion.
1797cat > conftest.defs <<\EOF
1798s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
1799s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
1800s%\[%\\&%g
1801s%\]%\\&%g
1802s%\$%$$%g
1803EOF
1804DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
1805rm -f conftest.defs
1806
1807
1808# Without the "./", some shells look in PATH for config.status.
1809: ${CONFIG_STATUS=./config.status}
1810
1811echo creating $CONFIG_STATUS
1812rm -f $CONFIG_STATUS
1813cat > $CONFIG_STATUS <<EOF
1814#! /bin/sh
1815# Generated automatically by configure.
1816# Run this file to recreate the current configuration.
1817# This directory was configured as follows,
1818# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1819#
1820# $0 $ac_configure_args
1821#
1822# Compiler output produced by configure, useful for debugging
1823# configure, is in ./config.log if it exists.
1824
1825ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
1826for ac_option
1827do
1828 case "\$ac_option" in
1829 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
1830 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
1831 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
1832 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
1833 echo "$CONFIG_STATUS generated by autoconf version 2.13"
1834 exit 0 ;;
1835 -help | --help | --hel | --he | --h)
1836 echo "\$ac_cs_usage"; exit 0 ;;
1837 *) echo "\$ac_cs_usage"; exit 1 ;;
1838 esac
1839done
1840
1841ac_given_srcdir=$srcdir
1842
1843trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
1844EOF
1845cat >> $CONFIG_STATUS <<EOF
1846
1847# Protect against being on the right side of a sed subst in config.status.
1848sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
1849 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
1850$ac_vpsub
1851$extrasub
1852s%@SHELL@%$SHELL%g
1853s%@CFLAGS@%$CFLAGS%g
1854s%@CPPFLAGS@%$CPPFLAGS%g
1855s%@CXXFLAGS@%$CXXFLAGS%g
1856s%@FFLAGS@%$FFLAGS%g
1857s%@DEFS@%$DEFS%g
1858s%@LDFLAGS@%$LDFLAGS%g
1859s%@LIBS@%$LIBS%g
1860s%@exec_prefix@%$exec_prefix%g
1861s%@prefix@%$prefix%g
1862s%@program_transform_name@%$program_transform_name%g
1863s%@bindir@%$bindir%g
1864s%@sbindir@%$sbindir%g
1865s%@libexecdir@%$libexecdir%g
1866s%@datadir@%$datadir%g
1867s%@sysconfdir@%$sysconfdir%g
1868s%@sharedstatedir@%$sharedstatedir%g
1869s%@localstatedir@%$localstatedir%g
1870s%@libdir@%$libdir%g
1871s%@includedir@%$includedir%g
1872s%@oldincludedir@%$oldincludedir%g
1873s%@infodir@%$infodir%g
1874s%@mandir@%$mandir%g
1875s%@program_prefix@%$program_prefix%g
1876s%@CC@%$CC%g
1877s%@BUILD_CC@%$BUILD_CC%g
1878s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g
1879s%@BUILD_LIBS@%$BUILD_LIBS%g
1880s%@RANLIB@%$RANLIB%g
1881s%@TARGET_CC@%$TARGET_CC%g
1882s%@TARGET_CFLAGS@%$TARGET_CFLAGS%g
1883s%@TARGET_LINK@%$TARGET_LINK%g
1884s%@TARGET_LFLAGS@%$TARGET_LFLAGS%g
1885s%@TARGET_RANLIB@%$TARGET_RANLIB%g
1886s%@TARGET_AR@%$TARGET_AR%g
1887s%@BUILD_EXEEXT@%$BUILD_EXEEXT%g
1888s%@OS_UNIX@%$OS_UNIX%g
1889s%@OS_WIN@%$OS_WIN%g
1890s%@TARGET_EXEEXT@%$TARGET_EXEEXT%g
1891s%@TARGET_LIBS@%$TARGET_LIBS%g
1892s%@TARGET_TCL_LIBS@%$TARGET_TCL_LIBS%g
1893s%@CPP@%$CPP%g
1894s%@TARGET_TCL_INC@%$TARGET_TCL_INC%g
1895s%@TARGET_GDBM_LIBS@%$TARGET_GDBM_LIBS%g
1896s%@TARGET_GDBM_INC@%$TARGET_GDBM_INC%g
1897s%@TARGET_READLINE_LIBS@%$TARGET_READLINE_LIBS%g
1898s%@TARGET_READLINE_INC@%$TARGET_READLINE_INC%g
1899s%@TARGET_HAVE_READLINE@%$TARGET_HAVE_READLINE%g
1900
1901CEOF
1902EOF
1903
1904cat >> $CONFIG_STATUS <<\EOF
1905
1906# Split the substitutions into bite-sized pieces for seds with
1907# small command number limits, like on Digital OSF/1 and HP-UX.
1908ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
1909ac_file=1 # Number of current file.
1910ac_beg=1 # First line for current file.
1911ac_end=$ac_max_sed_cmds # Line after last line for current file.
1912ac_more_lines=:
1913ac_sed_cmds=""
1914while $ac_more_lines; do
1915 if test $ac_beg -gt 1; then
1916 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
1917 else
1918 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
1919 fi
1920 if test ! -s conftest.s$ac_file; then
1921 ac_more_lines=false
1922 rm -f conftest.s$ac_file
1923 else
1924 if test -z "$ac_sed_cmds"; then
1925 ac_sed_cmds="sed -f conftest.s$ac_file"
1926 else
1927 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
1928 fi
1929 ac_file=`expr $ac_file + 1`
1930 ac_beg=$ac_end
1931 ac_end=`expr $ac_end + $ac_max_sed_cmds`
1932 fi
1933done
1934if test -z "$ac_sed_cmds"; then
1935 ac_sed_cmds=cat
1936fi
1937EOF
1938
1939cat >> $CONFIG_STATUS <<EOF
1940
1941CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
1942EOF
1943cat >> $CONFIG_STATUS <<\EOF
1944for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
1945 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
1946 case "$ac_file" in
1947 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
1948 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
1949 *) ac_file_in="${ac_file}.in" ;;
1950 esac
1951
1952 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
1953
1954 # Remove last slash and all that follows it. Not all systems have dirname.
1955 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
1956 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
1957 # The file is in a subdirectory.
1958 test ! -d "$ac_dir" && mkdir "$ac_dir"
1959 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
1960 # A "../" for each directory in $ac_dir_suffix.
1961 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
1962 else
1963 ac_dir_suffix= ac_dots=
1964 fi
1965
1966 case "$ac_given_srcdir" in
1967 .) srcdir=.
1968 if test -z "$ac_dots"; then top_srcdir=.
1969 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
1970 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
1971 *) # Relative path.
1972 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
1973 top_srcdir="$ac_dots$ac_given_srcdir" ;;
1974 esac
1975
1976
1977 echo creating "$ac_file"
1978 rm -f "$ac_file"
1979 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
1980 case "$ac_file" in
1981 *Makefile*) ac_comsub="1i\\
1982# $configure_input" ;;
1983 *) ac_comsub= ;;
1984 esac
1985
1986 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
1987 sed -e "$ac_comsub
1988s%@configure_input@%$configure_input%g
1989s%@srcdir@%$srcdir%g
1990s%@top_srcdir@%$top_srcdir%g
1991" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
1992fi; done
1993rm -f conftest.s*
1994
1995EOF
1996cat >> $CONFIG_STATUS <<EOF
1997
1998EOF
1999cat >> $CONFIG_STATUS <<\EOF
2000
2001exit 0
2002EOF
2003chmod +x $CONFIG_STATUS
2004rm -fr confdefs* $ac_clean_files
2005test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
2006