/ Check-in [264f2331]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Release 2.0-alpha-1 (CVS 247)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:264f23315e682909abb47912f48733f641772a4c
User & Date: drh 2001-09-15 00:58:00
Context
2001-09-15
00:59
Removing some surplus files. (CVS 1723) check-in: 8ad996fd user: drh tags: trunk
00:58
Release 2.0-alpha-1 (CVS 247) check-in: 264f2331 user: drh tags: trunk
00:57
Everything is working on Linux. This is release 2.0-Alpha-1. (CVS 246) check-in: 14474fa1 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Makefile.in.

1
2
3
4










5

6
7
8
9
10
11
12
13
14
15

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
..
41
42
43
44
45
46
47









48
49
50
51
52
53
54
...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
...
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
#!/usr/make
#
# Makefile for SQLITE











# The toplevel directory of the source tree

#
TOP = @srcdir@

# C Compiler and options for use in building executables that
# will run on the platform that is doing the build.
#
BCC = @BUILD_CC@ @BUILD_CFLAGS@

# C Compile and options for use in building executables that 
# will run on the target platform.

#
TCC = @TARGET_CC@ @TARGET_CFLAGS@ -I. -I${TOP}/src

# Tools used to build a static library.
#
AR = @TARGET_AR@
RANLIB = @TARGET_RANLIB@

# Compiler options needed for programs that use the GDBM library.
#
GDBM_FLAGS = @TARGET_GDBM_INC@

# The library that programs using GDBM must link against.
#
LIBGDBM = @TARGET_GDBM_LIBS@

# Compiler options needed for programs that use the TCL library.
#
TCL_FLAGS = @TARGET_TCL_INC@

# The library that programs using TCL must link against.
#
LIBTCL = @TARGET_TCL_LIBS@
................................................................................
#
READLINE_FLAGS = -DHAVE_READLINE=@TARGET_HAVE_READLINE@ @TARGET_READLINE_INC@

# The library that programs using readline() must link against.
#
LIBREADLINE = @TARGET_READLINE_LIBS@










# Object files for the SQLite library.
#
LIBOBJ = btree.o build.o delete.o expr.o insert.o \
         main.o pager.o parse.o printf.o random.o select.o table.o \
         tokenize.o update.o util.o vdbe.o where.o tclsqlite.o

# All of the source code files.
................................................................................

libsqlite.a:	$(LIBOBJ)
	$(AR) libsqlite.a $(LIBOBJ)
	$(RANLIB) libsqlite.a

sqlite:	$(TOP)/src/shell.c libsqlite.a sqlite.h
	$(TCC) $(READLINE_FLAGS) -o sqlite $(TOP)/src/shell.c \
		libsqlite.a $(LIBGDBM) $(LIBREADLINE)

# Rules to build the LEMON compiler generator
#
lemon:	$(TOP)/tool/lemon.c $(TOP)/tool/lempar.c
	$(BCC) -o lemon $(TOP)/tool/lemon.c
	cp $(TOP)/tool/lempar.c .

................................................................................
   sqlite.h  \
   $(TOP)/src/btree.h \
   $(TOP)/src/sqliteInt.h  \
   $(TOP)/src/vdbe.h  \
   parse.h

btree.o:	$(TOP)/src/btree.c $(HDR) $(TOP)/src/pager.h
	$(TCC) $(GDBM_FLAGS) -c $(TOP)/src/btree.c

build.o:	$(TOP)/src/build.c $(HDR)
	$(TCC) $(GDBM_FLAGS) -c $(TOP)/src/build.c

main.o:	$(TOP)/src/main.c $(HDR)
	$(TCC) $(GDBM_FLAGS) -c $(TOP)/src/main.c

pager.o:	$(TOP)/src/pager.c $(HDR) $(TOP)/src/pager.h
	$(TCC) $(GDBM_FLAGS) -c $(TOP)/src/pager.c

parse.o:	parse.c $(HDR)
	$(TCC) $(GDBM_FLAGS) -c parse.c

parse.h:	parse.c

parse.c:	$(TOP)/src/parse.y lemon
	cp $(TOP)/src/parse.y .
	./lemon parse.y

sqlite.h:	$(TOP)/src/sqlite.h.in 
	sed -e s/--VERS--/`cat ${TOP}/VERSION`/ \
            -e s/--ENCODING--/@ENCODING@/ \
                 $(TOP)/src/sqlite.h.in >sqlite.h

tokenize.o:	$(TOP)/src/tokenize.c $(HDR)
	$(TCC) $(GDBM_FLAGS) -c $(TOP)/src/tokenize.c

util.o:	$(TOP)/src/util.c $(HDR)
	$(TCC) $(GDBM_FLAGS) -c $(TOP)/src/util.c

vdbe.o:	$(TOP)/src/vdbe.c $(HDR)
	$(TCC) $(GDBM_FLAGS) -c $(TOP)/src/vdbe.c

where.o:	$(TOP)/src/where.c $(HDR)
	$(TCC) $(GDBM_FLAGS) -c $(TOP)/src/where.c

delete.o:	$(TOP)/src/delete.c $(HDR)
	$(TCC) $(GDBM_FLAGS) -c $(TOP)/src/delete.c

expr.o:	$(TOP)/src/expr.c $(HDR)
	$(TCC) $(GDBM_FLAGS) -c $(TOP)/src/expr.c

insert.o:	$(TOP)/src/insert.c $(HDR)
	$(TCC) $(GDBM_FLAGS) -c $(TOP)/src/insert.c

random.o:	$(TOP)/src/random.c $(HDR)
	$(TCC) $(GDBM_FLAGS) -c $(TOP)/src/random.c

select.o:	$(TOP)/src/select.c $(HDR)
	$(TCC) $(GDBM_FLAGS) -c $(TOP)/src/select.c

table.o:	$(TOP)/src/table.c $(HDR)
	$(TCC) $(GDBM_FLAGS) -c $(TOP)/src/table.c

update.o:	$(TOP)/src/update.c $(HDR)
	$(TCC) $(GDBM_FLAGS) -c $(TOP)/src/update.c

tclsqlite.o:	$(TOP)/src/tclsqlite.c $(HDR)
	$(TCC) $(GDBM_FLAGS) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c

printf.o:	$(TOP)/src/printf.c $(HDR)
	$(TCC) $(GDBM_FLAGS) $(TCL_FLAGS) -c $(TOP)/src/printf.c

gdbmdump:	$(TOP)/tool/gdbmdump.c
	$(TCC) $(GDBM_FLAGS) -o gdbmdump $(TOP)/tool/gdbmdump.c $(LIBGDBM)

tclsqlite:	$(TOP)/src/tclsqlite.c libsqlite.a
	$(TCC) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite \
		$(TOP)/src/tclsqlite.c libsqlite.a $(LIBGDBM) $(LIBTCL)

testfixture:	$(TOP)/src/tclsqlite.c libsqlite.a $(TESTSRC)
	$(TCC) $(TCL_FLAGS) -DTCLSH=1 -DSQLITE_TEST=1 -o testfixture \
		$(TESTSRC) $(TOP)/src/tclsqlite.c \
		libsqlite.a $(LIBGDBM) $(LIBTCL)

test:	testfixture sqlite
	./testfixture $(TOP)/test/all.test

sqlite.tar.gz:	
	pwd=`pwd`; cd $(TOP)/..; tar czf $$pwd/sqlite.tar.gz sqlite




|
>
>
>
>
>
>
>
>
>
>
|
>









|
>








<
<
<
<
<
<
<
<







 







>
>
>
>
>
>
>
>
>







 







|







 







|


|


|


|


|









|



|


|


|


|


|


|


|


|


|


|


|


|


|
<
<
<



|




|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35








36
37
38
39
40
41
42
..
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
...
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
...
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203



204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
#!/usr/make
#
# Makefile for SQLITE
#
# This makefile is suppose to be configured automatically using the
# autoconf.  But if that does not work for you, you can configure
# the makefile manually.  Just set the parameters below to values that
# work well for your system.
#
# If the configure script does not work out-of-the-box, you might
# be able to get it to work by giving it some hints.  See the comment
# at the beginning of configure.in for additional information.
#

# The toplevel directory of the source tree.  This is the directory
# that contains this "Makefile.in" and the "configure.in" script.
#
TOP = @srcdir@

# C Compiler and options for use in building executables that
# will run on the platform that is doing the build.
#
BCC = @BUILD_CC@ @BUILD_CFLAGS@

# C Compile and options for use in building executables that 
# will run on the target platform.  (BCC and TCC are usually the
# same unless your are cross-compiling.)
#
TCC = @TARGET_CC@ @TARGET_CFLAGS@ -I. -I${TOP}/src

# Tools used to build a static library.
#
AR = @TARGET_AR@
RANLIB = @TARGET_RANLIB@









# Compiler options needed for programs that use the TCL library.
#
TCL_FLAGS = @TARGET_TCL_INC@

# The library that programs using TCL must link against.
#
LIBTCL = @TARGET_TCL_LIBS@
................................................................................
#
READLINE_FLAGS = -DHAVE_READLINE=@TARGET_HAVE_READLINE@ @TARGET_READLINE_INC@

# The library that programs using readline() must link against.
#
LIBREADLINE = @TARGET_READLINE_LIBS@

# Should the database engine assume text is coded as UTF-8 or iso8859?
#
# ENCODING  = UTF8
# ENCODING  = ISO8859
ENCODING = @ENCODING@

# You should not have to change anything below this line
###############################################################################

# Object files for the SQLite library.
#
LIBOBJ = btree.o build.o delete.o expr.o insert.o \
         main.o pager.o parse.o printf.o random.o select.o table.o \
         tokenize.o update.o util.o vdbe.o where.o tclsqlite.o

# All of the source code files.
................................................................................

libsqlite.a:	$(LIBOBJ)
	$(AR) libsqlite.a $(LIBOBJ)
	$(RANLIB) libsqlite.a

sqlite:	$(TOP)/src/shell.c libsqlite.a sqlite.h
	$(TCC) $(READLINE_FLAGS) -o sqlite $(TOP)/src/shell.c \
		libsqlite.a $(LIBREADLINE)

# Rules to build the LEMON compiler generator
#
lemon:	$(TOP)/tool/lemon.c $(TOP)/tool/lempar.c
	$(BCC) -o lemon $(TOP)/tool/lemon.c
	cp $(TOP)/tool/lempar.c .

................................................................................
   sqlite.h  \
   $(TOP)/src/btree.h \
   $(TOP)/src/sqliteInt.h  \
   $(TOP)/src/vdbe.h  \
   parse.h

btree.o:	$(TOP)/src/btree.c $(HDR) $(TOP)/src/pager.h
	$(TCC) -c $(TOP)/src/btree.c

build.o:	$(TOP)/src/build.c $(HDR)
	$(TCC) -c $(TOP)/src/build.c

main.o:	$(TOP)/src/main.c $(HDR)
	$(TCC) -c $(TOP)/src/main.c

pager.o:	$(TOP)/src/pager.c $(HDR) $(TOP)/src/pager.h
	$(TCC) -c $(TOP)/src/pager.c

parse.o:	parse.c $(HDR)
	$(TCC) -c parse.c

parse.h:	parse.c

parse.c:	$(TOP)/src/parse.y lemon
	cp $(TOP)/src/parse.y .
	./lemon parse.y

sqlite.h:	$(TOP)/src/sqlite.h.in 
	sed -e s/--VERS--/`cat ${TOP}/VERSION`/ \
            -e s/--ENCODING--/$(ENCODING)/ \
                 $(TOP)/src/sqlite.h.in >sqlite.h

tokenize.o:	$(TOP)/src/tokenize.c $(HDR)
	$(TCC) -c $(TOP)/src/tokenize.c

util.o:	$(TOP)/src/util.c $(HDR)
	$(TCC) -c $(TOP)/src/util.c

vdbe.o:	$(TOP)/src/vdbe.c $(HDR)
	$(TCC) -c $(TOP)/src/vdbe.c

where.o:	$(TOP)/src/where.c $(HDR)
	$(TCC) -c $(TOP)/src/where.c

delete.o:	$(TOP)/src/delete.c $(HDR)
	$(TCC) -c $(TOP)/src/delete.c

expr.o:	$(TOP)/src/expr.c $(HDR)
	$(TCC) -c $(TOP)/src/expr.c

insert.o:	$(TOP)/src/insert.c $(HDR)
	$(TCC) -c $(TOP)/src/insert.c

random.o:	$(TOP)/src/random.c $(HDR)
	$(TCC) -c $(TOP)/src/random.c

select.o:	$(TOP)/src/select.c $(HDR)
	$(TCC) -c $(TOP)/src/select.c

table.o:	$(TOP)/src/table.c $(HDR)
	$(TCC) -c $(TOP)/src/table.c

update.o:	$(TOP)/src/update.c $(HDR)
	$(TCC) -c $(TOP)/src/update.c

tclsqlite.o:	$(TOP)/src/tclsqlite.c $(HDR)
	$(TCC) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c

printf.o:	$(TOP)/src/printf.c $(HDR)
	$(TCC) $(TCL_FLAGS) -c $(TOP)/src/printf.c




tclsqlite:	$(TOP)/src/tclsqlite.c libsqlite.a
	$(TCC) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite \
		$(TOP)/src/tclsqlite.c libsqlite.a $(LIBTCL)

testfixture:	$(TOP)/src/tclsqlite.c libsqlite.a $(TESTSRC)
	$(TCC) $(TCL_FLAGS) -DTCLSH=1 -DSQLITE_TEST=1 -o testfixture \
		$(TESTSRC) $(TOP)/src/tclsqlite.c \
		libsqlite.a $(LIBTCL)

test:	testfixture sqlite
	./testfixture $(TOP)/test/all.test

sqlite.tar.gz:	
	pwd=`pwd`; cd $(TOP)/..; tar czf $$pwd/sqlite.tar.gz sqlite

Changes to VERSION.

1
1.1.0
|
1
2.0-alpha-1

Changes to configure.

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
...
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
...
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
...
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
...
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
...
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
...
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
...
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
...
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
...
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
...
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
...
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
...
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
....
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
....
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
....
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
....
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
....
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
....
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
....
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
....
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
....
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
....
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602






















1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
....
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
....
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
....
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
....
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
....
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
....
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
  --with-hints=FILE       Read configuration options from FILE"
ac_help="$ac_help
  --enable-utf8           Use UTF-8 encodings"
ac_help="$ac_help
  --disable-gdbm          Omit the GDBM drivers"

# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
................................................................................
else
  ac_n= ac_c='\c' ac_t=
fi



# The following RCS revision string applies to configure.in
# $Revision: 1.10 $

#########
# Make sure we are not building in a subdirectory of the source tree.
#

temp=`echo $srcdir | grep '[^./]'`

................................................................................
# generate command-line programs that run on the build machine.
#
default_build_cflags="-g"
if test "$config_BUILD_CC" = ""; then
  # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:608: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
................................................................................
  echo "$ac_t""no" 1>&6
fi

if test -z "$CC"; then
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:638: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
................................................................................

  if test -z "$CC"; then
    case "`uname -s`" in
    *win32* | *WIN32*)
      # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:689: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
................................................................................
 ;;
    esac
  fi
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:721: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

cat > conftest.$ac_ext << EOF

#line 732 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cc_cross=no
  else
    ac_cv_prog_cc_cross=yes
  fi
................................................................................
cross_compiling=$ac_cv_prog_cc_cross

echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:763: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross

echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:768: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi

echo "$ac_t""$ac_cv_prog_gcc" 1>&6
................................................................................
  GCC=
fi

ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:796: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_g=yes
else
................................................................................
    { echo "configure: error: unable to find a compiler for building build tools" 1>&2; exit 1; }
  fi
  BUILD_CC=$CC
  default_build_cflags=$CFLAGS
else
  BUILD_CC=$config_BUILD_CC
  echo $ac_n "checking host compiler""... $ac_c" 1>&6
echo "configure:835: checking host compiler" >&5
  CC=$BUILD_CC
  echo "$ac_t""$BUILD_CC" 1>&6
fi
echo $ac_n "checking switches for the host compiler""... $ac_c" 1>&6
echo "configure:840: checking switches for the host compiler" >&5
if test "$config_BUILD_CFLAGS" != ""; then
  CFLAGS=$config_BUILD_CFLAGS
  BUILD_CFLAGS=$config_BUILD_CFLAGS
else
  BUILD_CFLAGS=$default_build_cflags
fi
echo "$ac_t""$BUILD_CFLAGS" 1>&6
................................................................................


##########
# Locate a compiler that converts C code into *.o files that run on
# the target machine.
#
echo $ac_n "checking target compiler""... $ac_c" 1>&6
echo "configure:860: checking target compiler" >&5
if test "$config_TARGET_CC" != ""; then
  TARGET_CC=$config_TARGET_CC
else
  TARGET_CC=$BUILD_CC
fi
echo "$ac_t""$TARGET_CC" 1>&6
echo $ac_n "checking switches on the target compiler""... $ac_c" 1>&6
echo "configure:868: checking switches on the target compiler" >&5
if test "$config_TARGET_CFLAGS" != ""; then
  TARGET_CFLAGS=$config_TARGET_CFLAGS
else
  TARGET_CFLAGS=$BUILD_CFLAGS
fi
echo "$ac_t""$TARGET_CFLAGS" 1>&6
echo $ac_n "checking target linker""... $ac_c" 1>&6
echo "configure:876: checking target linker" >&5
if test "$config_TARGET_LINK" = ""; then
  TARGET_LINK=$TARGET_CC
else
  TARGET_LINK=$config_TARGET_LINK
fi
echo "$ac_t""$TARGET_LINK" 1>&6
echo $ac_n "checking switches on the target compiler""... $ac_c" 1>&6
echo "configure:884: checking switches on the target compiler" >&5
if test "$config_TARGET_TFLAGS" != ""; then
  TARGET_TFLAGS=$config_TARGET_TFLAGS
else
  TARGET_TFLAGS=$BUILD_CFLAGS
fi
if test "$config_TARGET_RANLIB" != ""; then
  TARGET_RANLIB=$config_TARGET_RANLIB
else
  # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:896: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
................................................................................



# Set the $cross variable if we are cross-compiling.  Make
# it 0 if we are not.
#
echo $ac_n "checking if host and target compilers are the same""... $ac_c" 1>&6
echo "configure:942: checking if host and target compilers are the same" >&5
if test "$BUILD_CC" = "$TARGET_CC"; then
  cross=0
  echo "$ac_t""yes" 1>&6
else
  cross=1
  echo "$ac_t""no" 1>&6
fi
................................................................................
  enableval="$enable_utf8"
  :
else
  enable_utf8=no
fi

echo $ac_n "checking character encoding""... $ac_c" 1>&6
echo "configure:963: checking character encoding" >&5
if test "$enable_utf8" = "no"; then
  ENCODING=ISO8859
  echo "$ac_t""iso8859" 1>&6
else
  ENCODING=UTF8
  echo "$ac_t""UTF-8" 1>&6
fi
................................................................................

###########
# Lots of things are different if we are compiling for Windows using
# the CYGWIN environment.  So check for that special case and handle
# things accordingly.
#
echo $ac_n "checking if executables have the .exe suffix""... $ac_c" 1>&6
echo "configure:979: checking if executables have the .exe suffix" >&5
if test "$config_BUILD_EXEEXT" = ".exe"; then
  CYGWIN=yes
  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""unknown" 1>&6
fi
if test "$CYGWIN" != "yes"; then
  echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
echo "configure:988: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 993 "configure"
#include "confdefs.h"

int main() {

#ifndef __CYGWIN__
#define __CYGWIN__ __CYGWIN32__
#endif
return __CYGWIN__;
; return 0; }
EOF
if { (eval echo configure:1004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_cygwin=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_cygwin=no
................................................................................
  TARGET_TCL_LIBS="$config_TARGET_TCL_LIBS"
else
  if test "$with_tcl" != ""; then
    extra=`echo $with_tcl/$tclsubdir/libtcl8*.a`
  fi
  CC=$TARGET_CC
  echo $ac_n "checking for sin""... $ac_c" 1>&6
echo "configure:1068: checking for sin" >&5
if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1073 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char sin(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
................................................................................
choke me
#else
sin();
#endif

; return 0; }
EOF
if { (eval echo configure:1096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_sin=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_sin=no"
................................................................................
  LIBS=""
else
  echo "$ac_t""no" 1>&6
LIBS="-lm"
fi

  echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:1117: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ldl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1125 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dlopen();

int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:1136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
................................................................................
  otherlibs=$LIBS
  if test "$extra" != ""; then
    LIBS=$extra
  else 
    LIBS=""
    
echo $ac_n "checking for library containing Tcl_Init""... $ac_c" 1>&6
echo "configure:1170: checking for library containing Tcl_Init" >&5
if eval "test \"`echo '$''{'ac_cv_search_Tcl_Init'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_func_search_save_LIBS="$LIBS"
ac_cv_search_Tcl_Init="no"
cat > conftest.$ac_ext <<EOF
#line 1177 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char Tcl_Init();

int main() {
Tcl_Init()
; return 0; }
EOF
if { (eval echo configure:1188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_Tcl_Init="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
test "$ac_cv_search_Tcl_Init" = "no" && for i in         tcl8.4 tcl8.3 tcl8.2 tcl8.1 tcl8.0 tcl80 tcl; do
LIBS="-l$i $otherlibs $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 1199 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char Tcl_Init();

int main() {
Tcl_Init()
; return 0; }
EOF
if { (eval echo configure:1210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_Tcl_Init="-l$i"
break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
................................................................................
fi


##########
# Figure out where to get the TCL header files.
#
echo $ac_n "checking TCL header files""... $ac_c" 1>&6
echo "configure:1239: checking TCL header files" >&5
found=no
if test "$config_TARGET_TCL_INC" != ""; then
  TARGET_TCL_INC=$config_TARGET_TCL_INC
  found=yes
else
  if test "$with_tcl" != ""; then
    TARGET_TCL_INC="-I$with_tcl/generic -I$with_tcl/$tclsubdir"
................................................................................
  fi
fi
if test "$found" = "yes"; then
  echo "$ac_t""$TARGET_TCL_INC" 1>&6
else
  echo "$ac_t""not specified: still searching..." 1>&6
  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1258: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
................................................................................
else
    # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and "${CC-cc}" will confuse make.
  CPP="${CC-cc} -E"
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.
  cat > conftest.$ac_ext <<EOF
#line 1273 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
#line 1290 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -nologo -E"
  cat > conftest.$ac_ext <<EOF
#line 1307 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
................................................................................
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6

ac_safe=`echo "tcl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tcl.h""... $ac_c" 1>&6
echo "configure:1339: checking for tcl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1344 "configure"
#include "confdefs.h"
#include <tcl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
................................................................................

fi
if test "$found" = "no"; then
  for dir in /usr/local /usr/X11 /usr/X11R6 /usr/pkg /usr/contrib /usr; do
    
ac_safe=`echo "$dir/include/tcl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $dir/include/tcl.h""... $ac_c" 1>&6
echo "configure:1376: checking for $dir/include/tcl.h" >&5
if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
    { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
else
  if test -r $dir/include/tcl.h; then
................................................................................
    fi
  done
fi
if test "$found" = "no"; then
  TARGET_TCL_INC="-DNO_TCL=1"
fi


##########
# Figure out what C libraries are required to compile programs
# that use GDBM.
#
use_gdbm=true
# Check whether --enable-gdbm or --disable-gdbm was given.
if test "${enable_gdbm+set}" = set; then
  enableval="$enable_gdbm"
  use_gdbm=$enableval
else
  use_gdbm=true

fi

if test "$use_gdbm" = "no"; then use_gdbm=false; fi
if test "$use_gdbm" = "yes"; then use_gdbm=true; fi
if $use_gdbm; then
  if test "$config_TARGET_GDBM_LIBS" != ""; then
    TARGET_GDBM_LIBS="$config_TARGET_GDBM_LIBS"
  else
    CC=$TARGET_CC
    LIBS=""
    
echo $ac_n "checking for library containing gdbm_open""... $ac_c" 1>&6
echo "configure:1433: checking for library containing gdbm_open" >&5
if eval "test \"`echo '$''{'ac_cv_search_gdbm_open'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_func_search_save_LIBS="$LIBS"
ac_cv_search_gdbm_open="no"
cat > conftest.$ac_ext <<EOF
#line 1440 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gdbm_open();

int main() {
gdbm_open()
; return 0; }
EOF
if { (eval echo configure:1451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_gdbm_open="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
test "$ac_cv_search_gdbm_open" = "no" && for i in gdbm; do
LIBS="-l$i  $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 1462 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char gdbm_open();

int main() {
gdbm_open()
; return 0; }
EOF
if { (eval echo configure:1473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_gdbm_open="-l$i"
break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
done
LIBS="$ac_func_search_save_LIBS"
fi

echo "$ac_t""$ac_cv_search_gdbm_open" 1>&6
if test "$ac_cv_search_gdbm_open" != "no"; then
  test "$ac_cv_search_gdbm_open" = "none required" || LIBS="$ac_cv_search_gdbm_open $LIBS"
  
else :
  
fi
    TARGET_GDBM_LIBS="$LIBS"
  fi
fi


##########
# Figure out where to get the GDBM header files.
#
if $use_gdbm; then
  echo $ac_n "checking GDBM header files""... $ac_c" 1>&6
echo "configure:1503: checking GDBM header files" >&5
  found=no
  if test "$config_TARGET_GDBM_INC" != ""; then
    TARGET_GDBM_INC=$config_TARGET_GDBM_INC
    found=yes
  fi
  if test "$found" = "yes"; then
    echo "$ac_t""$TARGET_GDBM_INC" 1>&6
  else
    echo "$ac_t""not specified: still searching..." 1>&6
    ac_safe=`echo "gdbm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for gdbm.h""... $ac_c" 1>&6
echo "configure:1515: checking for gdbm.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1520 "configure"
#include "confdefs.h"
#include <gdbm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1525: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  found=yes
else
  echo "$ac_t""no" 1>&6
fi

  fi
  if test "$found" = "no"; then
    for dir in /usr/local /usr/pkg /usr/contrib; do
      
ac_safe=`echo "$dir/include/gdbm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $dir/include/gdbm.h""... $ac_c" 1>&6
echo "configure:1552: checking for $dir/include/gdbm.h" >&5
if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
    { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
else
  if test -r $dir/include/gdbm.h; then
    eval "ac_cv_file_$ac_safe=yes"
  else
    eval "ac_cv_file_$ac_safe=no"
  fi
fi
fi
if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
  echo "$ac_t""yes" 1>&6
  found=yes
else
  echo "$ac_t""no" 1>&6

fi

      if test "$found" = "yes"; then
        TARGET_GDBM_INC="-I$dir/include"
        break
      fi
    done
  fi
else
  TARGET_GDBM_INC="-DDISABLE_GDBM"
fi


##########
# Figure out what C libraries are required to compile programs
# that use "readline()" library.
#
if test "$config_TARGET_READLINE_LIBS" != ""; then
  TARGET_READLINE_LIBS="$config_TARGET_READLINE_LIBS"
else
  CC=$TARGET_CC
  LIBS=""
  
echo $ac_n "checking for library containing readline""... $ac_c" 1>&6
echo "configure:1596: checking for library containing readline" >&5
if eval "test \"`echo '$''{'ac_cv_search_readline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_func_search_save_LIBS="$LIBS"
ac_cv_search_readline="no"
cat > conftest.$ac_ext <<EOF
#line 1603 "configure"






















#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char readline();

int main() {
readline()
; return 0; }
EOF
if { (eval echo configure:1614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_readline="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
test "$ac_cv_search_readline" = "no" && for i in readline; do
LIBS="-l$i  $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 1625 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char readline();

int main() {
readline()
; return 0; }
EOF
if { (eval echo configure:1636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_readline="-l$i"
break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
................................................................................
fi


##########
# Figure out where to get the READLINE header files.
#
echo $ac_n "checking readline header files""... $ac_c" 1>&6
echo "configure:1664: checking readline header files" >&5
found=no
if test "$config_TARGET_READLINE_INC" != ""; then
  TARGET_READLINE_INC=$config_TARGET_READLINE_INC
  found=yes
fi
if test "$found" = "yes"; then
  echo "$ac_t""$TARGET_READLINE_INC" 1>&6
else
  echo "$ac_t""not specified: still searching..." 1>&6
  ac_safe=`echo "readline.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for readline.h""... $ac_c" 1>&6
echo "configure:1676: checking for readline.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1681 "configure"
#include "confdefs.h"
#include <readline.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
................................................................................

fi
if test "$found" = "no"; then
  for dir in /usr /usr/local /usr/local/readline /usr/contrib; do
    
ac_safe=`echo "$dir/include/readline.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $dir/include/readline.h""... $ac_c" 1>&6
echo "configure:1713: checking for $dir/include/readline.h" >&5
if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
    { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
else
  if test -r $dir/include/readline.h; then
................................................................................
    if test "$found" = "yes"; then
      TARGET_READLINE_INC="-I$dir/include"
      break
    fi
    
ac_safe=`echo "$dir/include/readline/readline.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $dir/include/readline/readline.h""... $ac_c" 1>&6
echo "configure:1742: checking for $dir/include/readline/readline.h" >&5
if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
    { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
else
  if test -r $dir/include/readline/readline.h; then
................................................................................



#########
# Figure out whether or not we have a "usleep()" function.
#
echo $ac_n "checking for usleep""... $ac_c" 1>&6
echo "configure:1786: checking for usleep" >&5
if eval "test \"`echo '$''{'ac_cv_func_usleep'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1791 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char usleep(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
................................................................................
choke me
#else
usleep();
#endif

; return 0; }
EOF
if { (eval echo configure:1814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_usleep=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_usleep=no"
................................................................................
s%@OS_UNIX@%$OS_UNIX%g
s%@OS_WIN@%$OS_WIN%g
s%@TARGET_EXEEXT@%$TARGET_EXEEXT%g
s%@TARGET_LIBS@%$TARGET_LIBS%g
s%@TARGET_TCL_LIBS@%$TARGET_TCL_LIBS%g
s%@CPP@%$CPP%g
s%@TARGET_TCL_INC@%$TARGET_TCL_INC%g
s%@TARGET_GDBM_LIBS@%$TARGET_GDBM_LIBS%g
s%@TARGET_GDBM_INC@%$TARGET_GDBM_INC%g
s%@TARGET_READLINE_LIBS@%$TARGET_READLINE_LIBS%g
s%@TARGET_READLINE_INC@%$TARGET_READLINE_INC%g
s%@TARGET_HAVE_READLINE@%$TARGET_HAVE_READLINE%g

CEOF
EOF








<
<







 







|







 







|







 







|







 







|







 







|










|




|







 







|




|








|







 







|







 







|




|







 







|







|







|







|











|







 







|







 







|







 







|








|




|










|







 







|




|







 







|







 







|







|










|







 







|






|










|










|










|







 







|







 







|







 







|





|










|





|










|





|







 







|




|




|







 







|







 










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<









|






|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>










|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







|











|




|




|







 







|







 







|







 







|




|







 







|







 







<
<







11
12
13
14
15
16
17


18
19
20
21
22
23
24
...
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
...
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
...
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
...
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
...
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
...
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
...
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
...
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
...
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
...
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
...
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
...
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
....
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
....
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
....
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
....
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
....
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
....
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
....
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
....
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
....
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
....
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
















































































































































































1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457






















1458
1459
1460
1461
1462
1463
1464
....
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
....
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
....
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
....
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
....
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
....
1816
1817
1818
1819
1820
1821
1822


1823
1824
1825
1826
1827
1828
1829
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_help="$ac_help
  --with-hints=FILE       Read configuration options from FILE"
ac_help="$ac_help
  --enable-utf8           Use UTF-8 encodings"



# Initialize some variables set by options.
# The variables have the same names as the options, with
# dashes changed to underlines.
build=NONE
cache_file=./config.cache
exec_prefix=NONE
................................................................................
else
  ac_n= ac_c='\c' ac_t=
fi



# The following RCS revision string applies to configure.in
# $Revision: 1.11 $

#########
# Make sure we are not building in a subdirectory of the source tree.
#

temp=`echo $srcdir | grep '[^./]'`

................................................................................
# generate command-line programs that run on the build machine.
#
default_build_cflags="-g"
if test "$config_BUILD_CC" = ""; then
  # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:606: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
................................................................................
  echo "$ac_t""no" 1>&6
fi

if test -z "$CC"; then
  # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:636: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
................................................................................

  if test -z "$CC"; then
    case "`uname -s`" in
    *win32* | *WIN32*)
      # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:687: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
................................................................................
 ;;
    esac
  fi
  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
fi

echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:719: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

cat > conftest.$ac_ext << EOF

#line 730 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
if { (eval echo configure:735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  ac_cv_prog_cc_works=yes
  # If we can't run a trivial program, we are probably using a cross compiler.
  if (./conftest; exit) 2>/dev/null; then
    ac_cv_prog_cc_cross=no
  else
    ac_cv_prog_cc_cross=yes
  fi
................................................................................
cross_compiling=$ac_cv_prog_cc_cross

echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
if test $ac_cv_prog_cc_works = no; then
  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:761: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross

echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:766: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.c <<EOF
#ifdef __GNUC__
  yes;
#endif
EOF
if { 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
  ac_cv_prog_gcc=yes
else
  ac_cv_prog_gcc=no
fi
fi

echo "$ac_t""$ac_cv_prog_gcc" 1>&6
................................................................................
  GCC=
fi

ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:794: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  echo 'void f(){}' > conftest.c
if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  ac_cv_prog_cc_g=yes
else
................................................................................
    { echo "configure: error: unable to find a compiler for building build tools" 1>&2; exit 1; }
  fi
  BUILD_CC=$CC
  default_build_cflags=$CFLAGS
else
  BUILD_CC=$config_BUILD_CC
  echo $ac_n "checking host compiler""... $ac_c" 1>&6
echo "configure:833: checking host compiler" >&5
  CC=$BUILD_CC
  echo "$ac_t""$BUILD_CC" 1>&6
fi
echo $ac_n "checking switches for the host compiler""... $ac_c" 1>&6
echo "configure:838: checking switches for the host compiler" >&5
if test "$config_BUILD_CFLAGS" != ""; then
  CFLAGS=$config_BUILD_CFLAGS
  BUILD_CFLAGS=$config_BUILD_CFLAGS
else
  BUILD_CFLAGS=$default_build_cflags
fi
echo "$ac_t""$BUILD_CFLAGS" 1>&6
................................................................................


##########
# Locate a compiler that converts C code into *.o files that run on
# the target machine.
#
echo $ac_n "checking target compiler""... $ac_c" 1>&6
echo "configure:858: checking target compiler" >&5
if test "$config_TARGET_CC" != ""; then
  TARGET_CC=$config_TARGET_CC
else
  TARGET_CC=$BUILD_CC
fi
echo "$ac_t""$TARGET_CC" 1>&6
echo $ac_n "checking switches on the target compiler""... $ac_c" 1>&6
echo "configure:866: checking switches on the target compiler" >&5
if test "$config_TARGET_CFLAGS" != ""; then
  TARGET_CFLAGS=$config_TARGET_CFLAGS
else
  TARGET_CFLAGS=$BUILD_CFLAGS
fi
echo "$ac_t""$TARGET_CFLAGS" 1>&6
echo $ac_n "checking target linker""... $ac_c" 1>&6
echo "configure:874: checking target linker" >&5
if test "$config_TARGET_LINK" = ""; then
  TARGET_LINK=$TARGET_CC
else
  TARGET_LINK=$config_TARGET_LINK
fi
echo "$ac_t""$TARGET_LINK" 1>&6
echo $ac_n "checking switches on the target compiler""... $ac_c" 1>&6
echo "configure:882: checking switches on the target compiler" >&5
if test "$config_TARGET_TFLAGS" != ""; then
  TARGET_TFLAGS=$config_TARGET_TFLAGS
else
  TARGET_TFLAGS=$BUILD_CFLAGS
fi
if test "$config_TARGET_RANLIB" != ""; then
  TARGET_RANLIB=$config_TARGET_RANLIB
else
  # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:894: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test -n "$RANLIB"; then
  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
................................................................................



# Set the $cross variable if we are cross-compiling.  Make
# it 0 if we are not.
#
echo $ac_n "checking if host and target compilers are the same""... $ac_c" 1>&6
echo "configure:940: checking if host and target compilers are the same" >&5
if test "$BUILD_CC" = "$TARGET_CC"; then
  cross=0
  echo "$ac_t""yes" 1>&6
else
  cross=1
  echo "$ac_t""no" 1>&6
fi
................................................................................
  enableval="$enable_utf8"
  :
else
  enable_utf8=no
fi

echo $ac_n "checking character encoding""... $ac_c" 1>&6
echo "configure:961: checking character encoding" >&5
if test "$enable_utf8" = "no"; then
  ENCODING=ISO8859
  echo "$ac_t""iso8859" 1>&6
else
  ENCODING=UTF8
  echo "$ac_t""UTF-8" 1>&6
fi
................................................................................

###########
# Lots of things are different if we are compiling for Windows using
# the CYGWIN environment.  So check for that special case and handle
# things accordingly.
#
echo $ac_n "checking if executables have the .exe suffix""... $ac_c" 1>&6
echo "configure:977: checking if executables have the .exe suffix" >&5
if test "$config_BUILD_EXEEXT" = ".exe"; then
  CYGWIN=yes
  echo "$ac_t""yes" 1>&6
else
  echo "$ac_t""unknown" 1>&6
fi
if test "$CYGWIN" != "yes"; then
  echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
echo "configure:986: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 991 "configure"
#include "confdefs.h"

int main() {

#ifndef __CYGWIN__
#define __CYGWIN__ __CYGWIN32__
#endif
return __CYGWIN__;
; return 0; }
EOF
if { (eval echo configure:1002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  ac_cv_cygwin=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  ac_cv_cygwin=no
................................................................................
  TARGET_TCL_LIBS="$config_TARGET_TCL_LIBS"
else
  if test "$with_tcl" != ""; then
    extra=`echo $with_tcl/$tclsubdir/libtcl8*.a`
  fi
  CC=$TARGET_CC
  echo $ac_n "checking for sin""... $ac_c" 1>&6
echo "configure:1066: checking for sin" >&5
if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1071 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char sin(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
................................................................................
choke me
#else
sin();
#endif

; return 0; }
EOF
if { (eval echo configure:1094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_sin=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_sin=no"
................................................................................
  LIBS=""
else
  echo "$ac_t""no" 1>&6
LIBS="-lm"
fi

  echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
echo "configure:1115: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_save_LIBS="$LIBS"
LIBS="-ldl  $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1123 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char dlopen();

int main() {
dlopen()
; return 0; }
EOF
if { (eval echo configure:1134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_lib_$ac_lib_var=no"
................................................................................
  otherlibs=$LIBS
  if test "$extra" != ""; then
    LIBS=$extra
  else 
    LIBS=""
    
echo $ac_n "checking for library containing Tcl_Init""... $ac_c" 1>&6
echo "configure:1168: checking for library containing Tcl_Init" >&5
if eval "test \"`echo '$''{'ac_cv_search_Tcl_Init'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_func_search_save_LIBS="$LIBS"
ac_cv_search_Tcl_Init="no"
cat > conftest.$ac_ext <<EOF
#line 1175 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char Tcl_Init();

int main() {
Tcl_Init()
; return 0; }
EOF
if { (eval echo configure:1186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_Tcl_Init="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
test "$ac_cv_search_Tcl_Init" = "no" && for i in         tcl8.4 tcl8.3 tcl8.2 tcl8.1 tcl8.0 tcl80 tcl; do
LIBS="-l$i $otherlibs $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 1197 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char Tcl_Init();

int main() {
Tcl_Init()
; return 0; }
EOF
if { (eval echo configure:1208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_Tcl_Init="-l$i"
break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
................................................................................
fi


##########
# Figure out where to get the TCL header files.
#
echo $ac_n "checking TCL header files""... $ac_c" 1>&6
echo "configure:1237: checking TCL header files" >&5
found=no
if test "$config_TARGET_TCL_INC" != ""; then
  TARGET_TCL_INC=$config_TARGET_TCL_INC
  found=yes
else
  if test "$with_tcl" != ""; then
    TARGET_TCL_INC="-I$with_tcl/generic -I$with_tcl/$tclsubdir"
................................................................................
  fi
fi
if test "$found" = "yes"; then
  echo "$ac_t""$TARGET_TCL_INC" 1>&6
else
  echo "$ac_t""not specified: still searching..." 1>&6
  echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1256: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
  CPP=
fi
if test -z "$CPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
................................................................................
else
    # This must be in double quotes, not single quotes, because CPP may get
  # substituted into the Makefile and "${CC-cc}" will confuse make.
  CPP="${CC-cc} -E"
  # On the NeXT, cc -E runs the code through the compiler's parser,
  # not just through cpp.
  cat > conftest.$ac_ext <<EOF
#line 1271 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -E -traditional-cpp"
  cat > conftest.$ac_ext <<EOF
#line 1288 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  CPP="${CC-cc} -nologo -E"
  cat > conftest.$ac_ext <<EOF
#line 1305 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  :
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
................................................................................
else
  ac_cv_prog_CPP="$CPP"
fi
echo "$ac_t""$CPP" 1>&6

ac_safe=`echo "tcl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for tcl.h""... $ac_c" 1>&6
echo "configure:1337: checking for tcl.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1342 "configure"
#include "confdefs.h"
#include <tcl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
................................................................................

fi
if test "$found" = "no"; then
  for dir in /usr/local /usr/X11 /usr/X11R6 /usr/pkg /usr/contrib /usr; do
    
ac_safe=`echo "$dir/include/tcl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $dir/include/tcl.h""... $ac_c" 1>&6
echo "configure:1374: checking for $dir/include/tcl.h" >&5
if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
    { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
else
  if test -r $dir/include/tcl.h; then
................................................................................
    fi
  done
fi
if test "$found" = "no"; then
  TARGET_TCL_INC="-DNO_TCL=1"
fi


##########
# Figure out what C libraries are required to compile programs
















































































































































































# that use "readline()" library.
#
if test "$config_TARGET_READLINE_LIBS" != ""; then
  TARGET_READLINE_LIBS="$config_TARGET_READLINE_LIBS"
else
  CC=$TARGET_CC
  LIBS=""
  
echo $ac_n "checking for library containing readline""... $ac_c" 1>&6
echo "configure:1418: checking for library containing readline" >&5
if eval "test \"`echo '$''{'ac_cv_search_readline'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  ac_func_search_save_LIBS="$LIBS"
ac_cv_search_readline="no"
cat > conftest.$ac_ext <<EOF
#line 1425 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char readline();

int main() {
readline()
; return 0; }
EOF
if { (eval echo configure:1436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  ac_cv_search_readline="none required"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
rm -f conftest*
test "$ac_cv_search_readline" = "no" && for i in readline; do
LIBS="-l$i  $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
#line 1447 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
char readline();

int main() {
readline()
; return 0; }
EOF
if { (eval echo configure:1458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then






















  rm -rf conftest*
  ac_cv_search_readline="-l$i"
break
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
fi
................................................................................
fi


##########
# Figure out where to get the READLINE header files.
#
echo $ac_n "checking readline header files""... $ac_c" 1>&6
echo "configure:1486: checking readline header files" >&5
found=no
if test "$config_TARGET_READLINE_INC" != ""; then
  TARGET_READLINE_INC=$config_TARGET_READLINE_INC
  found=yes
fi
if test "$found" = "yes"; then
  echo "$ac_t""$TARGET_READLINE_INC" 1>&6
else
  echo "$ac_t""not specified: still searching..." 1>&6
  ac_safe=`echo "readline.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for readline.h""... $ac_c" 1>&6
echo "configure:1498: checking for readline.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1503 "configure"
#include "confdefs.h"
#include <readline.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
  rm -rf conftest*
  eval "ac_cv_header_$ac_safe=yes"
else
  echo "$ac_err" >&5
  echo "configure: failed program was:" >&5
................................................................................

fi
if test "$found" = "no"; then
  for dir in /usr /usr/local /usr/local/readline /usr/contrib; do
    
ac_safe=`echo "$dir/include/readline.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $dir/include/readline.h""... $ac_c" 1>&6
echo "configure:1535: checking for $dir/include/readline.h" >&5
if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
    { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
else
  if test -r $dir/include/readline.h; then
................................................................................
    if test "$found" = "yes"; then
      TARGET_READLINE_INC="-I$dir/include"
      break
    fi
    
ac_safe=`echo "$dir/include/readline/readline.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $dir/include/readline/readline.h""... $ac_c" 1>&6
echo "configure:1564: checking for $dir/include/readline/readline.h" >&5
if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  if test "$cross_compiling" = yes; then
    { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
else
  if test -r $dir/include/readline/readline.h; then
................................................................................



#########
# Figure out whether or not we have a "usleep()" function.
#
echo $ac_n "checking for usleep""... $ac_c" 1>&6
echo "configure:1608: checking for usleep" >&5
if eval "test \"`echo '$''{'ac_cv_func_usleep'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  cat > conftest.$ac_ext <<EOF
#line 1613 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
    which can conflict with char usleep(); below.  */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
    builtin and then its argument prototype would still apply.  */
................................................................................
choke me
#else
usleep();
#endif

; return 0; }
EOF
if { (eval echo configure:1636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  eval "ac_cv_func_usleep=yes"
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  eval "ac_cv_func_usleep=no"
................................................................................
s%@OS_UNIX@%$OS_UNIX%g
s%@OS_WIN@%$OS_WIN%g
s%@TARGET_EXEEXT@%$TARGET_EXEEXT%g
s%@TARGET_LIBS@%$TARGET_LIBS%g
s%@TARGET_TCL_LIBS@%$TARGET_TCL_LIBS%g
s%@CPP@%$CPP%g
s%@TARGET_TCL_INC@%$TARGET_TCL_INC%g


s%@TARGET_READLINE_LIBS@%$TARGET_READLINE_LIBS%g
s%@TARGET_READLINE_INC@%$TARGET_READLINE_INC%g
s%@TARGET_HAVE_READLINE@%$TARGET_HAVE_READLINE%g

CEOF
EOF

Changes to configure.in.

71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
...
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
...
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
...
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
#
#    TARGET_TCL_INC
#
#        This variables define the directory that contain header
#        files for Tcl.  If the compiler is able to find <tcl.h>
#        on its own, then this can be blank.
#
#    TARGET_GDBM_LIBS
#
#        This is the library directives passed to the target linker
#        that cause the executable to link against GDBM.  This might
#        be a switch like "-lgdbm" or pathnames of library file
#        like "../../src/libgdbm.a".
#
#    TARGET_GDBM_INC
#
#        This variables define the directory that contain header
#        files for GDBM.  If the compiler is able to find <gdbm.h>
#        on its own, then this can be blank.
#
#    TARGET_READLINE_LIBS
#
#        This is the library directives passed to the target linker
#        that cause the executable to link against GDBM.  This might
#        be a switch like "-lreadline" or pathnames of library file
#        like "../../src/libreadline.a".
#
#    TARGET_READLINE_INC
#
#        This variables define the directory that contain header
#        files for the readline library.  If the compiler is able 
#        to find <readline.h> on its own, then this can be blank.
#
................................................................................
#        The name of the linker that combines *.o files generated
#        by TARGET_CC into executables for the target platform.
#
#    TARGET_LIBS
#
#        Additional libraries or other switch that the target linker needs
#        to build an executable on the target.  Do not include
#        on this list any libraries in TARGET_TCL_LIBS, TARGET_GDBM_LIBS,
#        TARGET_READLINE_LIBS, etc.
#
#    TARGET_EXEEXT
#
#        The filename extension for executables on the
#        target platform.  "" for Unix and ".exe" for windows.
#
................................................................................
# the corresponding code.
#
AC_INIT(src/sqlite.h.in)

dnl Put the RCS revision string after AC_INIT so that it will also
dnl show in in configure.
# The following RCS revision string applies to configure.in
# $Revision: 1.10 $

#########
# Make sure we are not building in a subdirectory of the source tree.
#
changequote(<<<,>>>)
temp=`echo $srcdir | grep '[^./]'`
changequote([,])
................................................................................
  done
fi
if test "$found" = "no"; then
  TARGET_TCL_INC="-DNO_TCL=1"
fi
AC_SUBST(TARGET_TCL_INC)

##########
# Figure out what C libraries are required to compile programs
# that use GDBM.
#
use_gdbm=true
AC_ARG_ENABLE(gdbm, 
[  --disable-gdbm          Omit the GDBM drivers],
  use_gdbm=$enableval, use_gdbm=true
)
if test "$use_gdbm" = "no"; then use_gdbm=false; fi
if test "$use_gdbm" = "yes"; then use_gdbm=true; fi
if $use_gdbm; then
  if test "$config_TARGET_GDBM_LIBS" != ""; then
    TARGET_GDBM_LIBS="$config_TARGET_GDBM_LIBS"
  else
    CC=$TARGET_CC
    LIBS=""
    AC_SEARCH_LIBS(gdbm_open, gdbm,,,)
    TARGET_GDBM_LIBS="$LIBS"
  fi
fi
AC_SUBST(TARGET_GDBM_LIBS)

##########
# Figure out where to get the GDBM header files.
#
if $use_gdbm; then
  AC_MSG_CHECKING([GDBM header files])
  found=no
  if test "$config_TARGET_GDBM_INC" != ""; then
    TARGET_GDBM_INC=$config_TARGET_GDBM_INC
    found=yes
  fi
  if test "$found" = "yes"; then
    AC_MSG_RESULT($TARGET_GDBM_INC)
  else
    AC_MSG_RESULT(not specified: still searching...)
    AC_CHECK_HEADER(gdbm.h, [found=yes])
  fi
  if test "$found" = "no"; then
    for dir in /usr/local /usr/pkg /usr/contrib; do
      AC_CHECK_FILE($dir/include/gdbm.h, found=yes)
      if test "$found" = "yes"; then
        TARGET_GDBM_INC="-I$dir/include"
        break
      fi
    done
  fi
else
  TARGET_GDBM_INC="-DDISABLE_GDBM"
fi
AC_SUBST(TARGET_GDBM_INC)

##########
# Figure out what C libraries are required to compile programs
# that use "readline()" library.
#
if test "$config_TARGET_READLINE_LIBS" != ""; then
  TARGET_READLINE_LIBS="$config_TARGET_READLINE_LIBS"
else







<
<
<
<
<
<
<
<
<
<
<
<
<



|
|
|







 







|







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







71
72
73
74
75
76
77













78
79
80
81
82
83
84
85
86
87
88
89
90
..
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
...
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
...
419
420
421
422
423
424
425





















































426
427
428
429
430
431
432
#
#    TARGET_TCL_INC
#
#        This variables define the directory that contain header
#        files for Tcl.  If the compiler is able to find <tcl.h>
#        on its own, then this can be blank.
#













#    TARGET_READLINE_LIBS
#
#        This is the library directives passed to the target linker
#        that cause the executable to link against the readline library.
#        This might be a switch like "-lreadline" or pathnames of library
#        file like "../../src/libreadline.a".
#
#    TARGET_READLINE_INC
#
#        This variables define the directory that contain header
#        files for the readline library.  If the compiler is able 
#        to find <readline.h> on its own, then this can be blank.
#
................................................................................
#        The name of the linker that combines *.o files generated
#        by TARGET_CC into executables for the target platform.
#
#    TARGET_LIBS
#
#        Additional libraries or other switch that the target linker needs
#        to build an executable on the target.  Do not include
#        on this list any libraries in TARGET_TCL_LIBS and
#        TARGET_READLINE_LIBS, etc.
#
#    TARGET_EXEEXT
#
#        The filename extension for executables on the
#        target platform.  "" for Unix and ".exe" for windows.
#
................................................................................
# the corresponding code.
#
AC_INIT(src/sqlite.h.in)

dnl Put the RCS revision string after AC_INIT so that it will also
dnl show in in configure.
# The following RCS revision string applies to configure.in
# $Revision: 1.11 $

#########
# Make sure we are not building in a subdirectory of the source tree.
#
changequote(<<<,>>>)
temp=`echo $srcdir | grep '[^./]'`
changequote([,])
................................................................................
  done
fi
if test "$found" = "no"; then
  TARGET_TCL_INC="-DNO_TCL=1"
fi
AC_SUBST(TARGET_TCL_INC)






















































##########
# Figure out what C libraries are required to compile programs
# that use "readline()" library.
#
if test "$config_TARGET_READLINE_LIBS" != ""; then
  TARGET_READLINE_LIBS="$config_TARGET_READLINE_LIBS"
else

Changes to test/rowid.test.

20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
261
262
263
264
265
266
267


#   http://www.hwaci.com/drh/
#
#***********************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this file is testing the magic ROWID column that is
# found on all tables.
#
# $Id: rowid.test,v 1.2 2001/08/19 18:19:46 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# Basic ROWID functionality tests.
#
do_test rowid-1.1 {
................................................................................
  }
} {4}

do_test rowid-5.1 {
  execsql {DELETE FROM t1 WHERE _rowid_ IN (SELECT oid FROM t1 WHERE x>8)}
  execsql {SELECT max(x) FROM t1}
} {8}









|







 







>
>
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
...
261
262
263
264
265
266
267
268
269
#   http://www.hwaci.com/drh/
#
#***********************************************************************
# This file implements regression tests for SQLite library.  The
# focus of this file is testing the magic ROWID column that is
# found on all tables.
#
# $Id: rowid.test,v 1.3 2001/09/15 00:58:01 drh Exp $

set testdir [file dirname $argv0]
source $testdir/tester.tcl

# Basic ROWID functionality tests.
#
do_test rowid-1.1 {
................................................................................
  }
} {4}

do_test rowid-5.1 {
  execsql {DELETE FROM t1 WHERE _rowid_ IN (SELECT oid FROM t1 WHERE x>8)}
  execsql {SELECT max(x) FROM t1}
} {8}

finish_test

Deleted tool/gdbmdump.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
** Copyright (c) 1999, 2000 D. Richard Hipp
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public
** License as published by the Free Software Foundation; either
** version 2 of the License, or (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
** General Public License for more details.
** 
** You should have received a copy of the GNU General Public
** License along with this library; if not, write to the
** Free Software Foundation, Inc., 59 Temple Place - Suite 330,
** Boston, MA  02111-1307, USA.
**
** Author contact information:
**   drh@hwaci.com
**   http://www.hwaci.com/drh/
**
*************************************************************************
** A utility to dump the entire contents of a GDBM table in a 
** readable format.
*/
#include <stdio.h>
#include <ctype.h>
#include <gdbm.h>
#include <stdlib.h>

static void print_data(char *zPrefix, datum p){
  int i, j;

  printf("%-5s: ", zPrefix);
  for(i=0; i<p.dsize; i+=20){
    for(j=i; j<p.dsize && j<i+20; j++){
      printf("%02x", 0xff & p.dptr[j]);
      if( (j&3)==3 ) printf(" ");
    }
    while( j<i+20 ){
      printf("  ");
      if( (j&3)==3 ) printf(" ");
      j++;
    }
    printf(" ");
    for(j=i; j<p.dsize && j<i+20; j++){
      int c = p.dptr[j];
      if( !isprint(c) ){ c = '.'; }
      putchar(c);
    }
    printf("\n");
    if( i+20<p.dsize ) printf("       ");
  }
}

static int gdbm_dump(char *zFilename){
  GDBM_FILE p;
  datum data, key, next;

  p = gdbm_open(zFilename, 0, GDBM_READER, 0, 0);
  if( p==0 ){
    fprintf(stderr,"can't open file \"%s\"\n", zFilename);
    return 1;
  }
  key = gdbm_firstkey(p);
  while( key.dptr ){
    print_data("key",key);
    data = gdbm_fetch(p, key);
    if( data.dptr ){
      print_data("data",data);
      free( data.dptr );
    }
    next = gdbm_nextkey(p, key);
    free( key.dptr );
    key = next;
    printf("\n");
  }
  gdbm_close(p);
  return 0;
}

int main(int argc, char **argv){
  int i;
  int nErr = 0;
  for(i=1; i<argc; i++){
    nErr += gdbm_dump(argv[i]);
  }
  return nErr;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































Deleted tool/gdbmstat.c.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/*
** Copyright (c) 1999, 2000 D. Richard Hipp
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public
** License as published by the Free Software Foundation; either
** version 2 of the License, or (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
** General Public License for more details.
** 
** You should have received a copy of the GNU General Public
** License along with this library; if not, write to the
** Free Software Foundation, Inc., 59 Temple Place - Suite 330,
** Boston, MA  02111-1307, USA.
**
** Author contact information:
**   drh@hwaci.com
**   http://www.hwaci.com/drh/
**
*************************************************************************
** A utility print statistics about the content of a GDBM database.
*/
#include <stdio.h>
#include <ctype.h>
#include <gdbm.h>
#include <stdlib.h>

static int bins[] = {
  4, 8, 12, 16, 24,
  32, 40, 48, 56, 64,
  80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256,
  288, 320, 352, 384, 416, 448, 480, 512, 1024, 2048, 4096, 8192,
  16384, 32768, 65536,
};
#define NBIN (sizeof(bins)/sizeof(bins[0])+1)

static int gAllSize[NBIN];
static int gCount;
static int gTotal;
static int gMax;
static int gKey;
static int gMaxKey;

static int gdbm_stat(char *zFilename){
  GDBM_FILE p;
  datum data, key, next;
  int nEntry = 0;
  int keyTotal = 0;
  int dataTotal = 0;
  int allTotal = 0;
  int lMax = 0;
  int keySize[NBIN], dataSize[NBIN], allSize[NBIN];
  int i, priorSize;

  p = gdbm_open(zFilename, 0, GDBM_READER, 0, 0);
  if( p==0 ){
    fprintf(stderr,"can't open file \"%s\"\n", zFilename);
    return 1;
  }
  for(i=0; i<NBIN; i++){
    keySize[i] = 0;
    dataSize[i] = 0;
    allSize[i] = 0;
  }
  key = gdbm_firstkey(p);
  while( key.dptr ){
    int all;
    nEntry++;
    gCount++;
    keyTotal += key.dsize;
    for(i=0; i<NBIN-1 && key.dsize>bins[i]; i++){}
    keySize[i]++;
    gKey += key.dsize;
    if( key.dsize>gMaxKey ) gMaxKey = key.dsize;
    data = gdbm_fetch(p, key);
    if( data.dptr==0 ) data.dsize = 0;
    dataTotal += data.dsize;
    for(i=0; i<NBIN-1 && data.dsize>bins[i]; i++){}
    dataSize[i]++;
    all = key.dsize + data.dsize;
    allTotal += all;
    gTotal += all;
    if( all>gMax ) gMax = all;
    if( all>lMax ) lMax = all;
    for(i=0; i<NBIN-1 && all>bins[i]; i++){}
    allSize[i]++;
    gAllSize[i]++;
    next = gdbm_nextkey(p, key);
    free( key.dptr );
    key = next;
  }
  gdbm_close(p);
  printf("%s:\n", zFilename);
  printf("  entries: %d\n", nEntry);
  printf("  keysize: %d (%d per entry)\n", 
       keyTotal, nEntry>0 ? (keyTotal+nEntry-1)/nEntry : 0);
  printf("  datasize: %d (%d per entry)\n",
       dataTotal, nEntry>0 ? (dataTotal+nEntry-1)/nEntry : 0);
  printf("  size: %d (%d per entry)\n",
       allTotal, nEntry>0 ? (allTotal+nEntry-1)/nEntry : 0);
  priorSize = 0;
  for(i=0; i<NBIN-1; i++){
    if( keySize[i]==0 && dataSize[i]==0 ) continue;
    printf("%5d..%-5d   %7d  %7d  %7d\n", priorSize, bins[i], keySize[i],
      dataSize[i], allSize[i]);
    priorSize = bins[i]+1;
  }
  if( keySize[NBIN-1]>0 || dataSize[NBIN-1]>0 ){
    printf("%5d..%-5d   %7d  %7d  %7d\n", priorSize, lMax,
       keySize[NBIN-1], dataSize[NBIN-1], allSize[NBIN-1]);
  }
  return 0;
}

int main(int argc, char **argv){
  int i, ps, sum;
  int nErr = 0;
  for(i=1; i<argc; i++){
    nErr += gdbm_stat(argv[i]);
  }
  printf("*****************************************************************\n");
  printf("Entries:      %d\n", gCount);
  printf("Size:         %d\n", gTotal);
  printf("Avg Size:     %d\n", gCount>0 ? (gTotal + gCount - 1)/gCount : 0);
  printf("Key Size:     %d\n", gKey);
  printf("Avg Key Size: %d\n", gCount>0 ? (gKey + gCount - 1)/gCount : 0);
  printf("Max Key Size: %d\n\n", gMaxKey);
  ps = 0;
  sum = 0;
  for(i=0; i<NBIN-1; i++){
    if( gAllSize[i]==0 ) continue;
    sum += gAllSize[i];
    printf("%5d..%-5d   %8d  %3d%%\n", 
      ps, bins[i], gAllSize[i], sum*100/gCount);
    ps = bins[i]+1;
  }
  if( gAllSize[NBIN-1]>0 ){
    printf("%5d..%-5d   %8d  100%%\n", ps, gMax, gAllSize[NBIN-1]);
  }
  return nErr;
}
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<