From: drh Date: Sat, 27 Nov 2004 15:52:16 +0000 (+0000) Subject: Disable the cursors. "make install" now builds and installs a TCL package X-Git-Tag: version-3.6.10~3999 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4b2266ae4ca32b77ef361a7d49b79e932275e672;p=thirdparty%2Fsqlite.git Disable the cursors. "make install" now builds and installs a TCL package for SQLite if TCL is installed on the system. (CVS 2153) FossilOrigin-Name: d75014c299496a02f6850545beb0ab669802bf87 --- diff --git a/Makefile.in b/Makefile.in index 82462bea3a..3b203e9d1a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -28,20 +28,6 @@ BCC = @BUILD_CC@ @BUILD_CFLAGS@ # TCC = @TARGET_CC@ @TARGET_CFLAGS@ -I. -I${TOP}/src -DNDEBUG -# Some standard variables and programs -# -prefix = @prefix@ -exec_prefix = @exec_prefix@ -libdir = @libdir@ -INSTALL = @INSTALL@ -LIBTOOL = ./libtool -RELEASE = @ALLOWRELEASE@ - -# libtool compile/link/install -LTCOMPILE = $(LIBTOOL) --mode=compile $(TCC) -LTLINK = $(LIBTOOL) --mode=link $(TCC) -LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL) - # Compiler options needed for programs that use the TCL library. # TCC += @TCL_INCLUDE_SPEC@ @@ -74,19 +60,49 @@ LIBPTHREAD=@TARGET_THREAD_LIB@ # TEMP_STORE = -DTEMP_STORE=@TEMP_STORE@ +# Version numbers and release number for the SQLite being compiled. +# +VERSION = @VERSION@ +RELEASE = @RELEASE@ + # Filename extensions # BEXE = @BUILD_EXEEXT@ TEXE = @TARGET_EXEEXT@ -# The following variable is "1" to cause the TCL extension library to -# be build from the "all" target. +# The following variable is "1" if the configure script was able to locate +# the tclConfig.sh file. It is an empty string otherwise. When this +# variable is "1", the TCL extension library (libtclsqlite3.so) is built +# and installed. # HAVE_TCL = @HAVE_TCL@ +# The suffix used on shared libraries. Ex: ".dll", ".so", ".dylib" +# +SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@ + +# The directory into which to store package information for + +# Some standard variables and programs +# +prefix = @prefix@ +exec_prefix = @exec_prefix@ +libdir = @libdir@ +INSTALL = @INSTALL@ +LIBTOOL = ./libtool +ALLOWRELEASE = @ALLOWRELEASE@ + +# libtool compile/link/install +LTCOMPILE = $(LIBTOOL) --mode=compile $(TCC) +LTLINK = $(LIBTOOL) --mode=link $(TCC) +LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL) + # You should not have to change anything below this line ############################################################################### +OPTS += -DSQLITE_OMIT_CURSOR # Cursors do not work at this time +TCC += -DSQLITE_OMIT_CURSOR + # Object files for the SQLite library. # LIBOBJ = attach.lo auth.lo btree.lo build.lo cursor.lo date.lo \ @@ -206,11 +222,11 @@ last_change: $(SRC) libsqlite3.la: $(LIBOBJ) $(LTLINK) -o libsqlite3.la $(LIBOBJ) $(LIBPTHREAD) \ - ${RELEASE} -rpath $(libdir) -version-info "8:6:8" + ${ALLOWRELEASE} -rpath $(libdir) -version-info "8:6:8" libtclsqlite3.la: tclsqlite.lo libsqlite3.la $(LTLINK) -o libtclsqlite3.la tclsqlite.lo \ - $(LIBOJB) @TCL_STUB_LIB_SPEC@ $(LIBPTHREAD) \ + $(LIBOBJ) @TCL_STUB_LIB_SPEC@ $(LIBPTHREAD) \ -rpath $(libdir)/sqlite \ -version-info "8:6:8" @@ -339,8 +355,7 @@ select.lo: $(TOP)/src/select.c $(HDR) $(LTCOMPILE) -c $(TOP)/src/select.c sqlite3.h: $(TOP)/src/sqlite.h.in - sed -e s/--VERS--/`cat ${TOP}/VERSION`/ \ - $(TOP)/src/sqlite.h.in >sqlite3.h + sed -e s/--VERS--/$(RELEASE)/ $(TOP)/src/sqlite.h.in >sqlite3.h table.lo: $(TOP)/src/table.c $(HDR) $(LTCOMPILE) -c $(TOP)/src/table.c @@ -572,7 +587,7 @@ doc: common.tcl $(DOC) mkdir -p doc mv $(DOC) doc -install: sqlite3 libsqlite3.la sqlite3.h +install: sqlite3 libsqlite3.la sqlite3.h ${HAVE_TCL:1=tcl_install} $(INSTALL) -d $(DESTDIR)$(libdir) $(LTINSTALL) libsqlite3.la $(DESTDIR)$(libdir) $(INSTALL) -d $(DESTDIR)$(exec_prefix)/bin @@ -582,6 +597,9 @@ install: sqlite3 libsqlite3.la sqlite3.h $(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig; $(INSTALL) -m 0644 sqlite3.pc $(DESTDIR)$(libdir)/pkgconfig; +tcl_install: libtclsqlite3.la + tclsh $(TOP)/tclinstaller.tcl $(VERSION) + clean: rm -f *.lo *.la *.o sqlite3$(TEXE) libsqlite3.la rm -f sqlite3.h opcodes.* diff --git a/configure b/configure index a60bc8f467..650ced598b 100755 --- a/configure +++ b/configure @@ -463,7 +463,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CPP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA program_prefix VERSION BUILD_CC BUILD_CFLAGS BUILD_LIBS TARGET_CC TARGET_CFLAGS TARGET_LINK TARGET_LFLAGS TARGET_RANLIB TARGET_AR THREADSAFE TARGET_THREAD_LIB ALLOWRELEASE TEMP_STORE BUILD_EXEEXT OS_UNIX OS_WIN TARGET_EXEEXT TARGET_LIBS TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIBS TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC HAVE_TCL TARGET_READLINE_LIBS TARGET_READLINE_INC TARGET_HAVE_READLINE LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CPP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA program_prefix VERSION RELEASE BUILD_CC BUILD_CFLAGS BUILD_LIBS TARGET_CC TARGET_CFLAGS TARGET_LINK TARGET_LFLAGS TARGET_RANLIB TARGET_AR THREADSAFE TARGET_THREAD_LIB ALLOWRELEASE TEMP_STORE BUILD_EXEEXT OS_UNIX OS_WIN TARGET_EXEEXT TARGET_LIBS TCL_VERSION TCL_BIN_DIR TCL_SRC_DIR TCL_LIBS TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIB_FLAG TCL_LIB_SPEC TCL_STUB_LIB_FILE TCL_STUB_LIB_FLAG TCL_STUB_LIB_SPEC HAVE_TCL TARGET_READLINE_LIBS TARGET_READLINE_INC TARGET_HAVE_READLINE LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -1495,7 +1495,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # The following RCS revision string applies to configure.in -# $Revision: 1.26 $ +# $Revision: 1.27 $ ######### # Programs needed @@ -18422,10 +18422,11 @@ if test "$program_prefix" = "NONE"; then fi -if test -f VERSION; then - VERSION=`cat VERSION` - echo "Version set to $VERSION" -fi +VERSION=`cat $srcdir/VERSION | sed 's/^\([0-9]*\.*[0-9]*\).*/\1/'` +echo "Version set to $VERSION" + +RELEASE=`cat $srcdir/VERSION` +echo "Release set to $RELEASE" ######### @@ -20995,6 +20996,7 @@ s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@program_prefix@,$program_prefix,;t t s,@VERSION@,$VERSION,;t t +s,@RELEASE@,$RELEASE,;t t s,@BUILD_CC@,$BUILD_CC,;t t s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t s,@BUILD_LIBS@,$BUILD_LIBS,;t t diff --git a/configure.ac b/configure.ac index d95fa36b13..c95377de77 100644 --- a/configure.ac +++ b/configure.ac @@ -1,9 +1,4 @@ # -# This file describes a "configure" script that is used to build -# makefiles for a particular platform. Process this file using -# Autoconf version 1.13 in order to generate that script. All -# lines of this file up to the AC_INIT macro are ignored. -# # The build process allows for using a cross-compiler. But the default # action is to target the same platform that we are running on. The # configure script needs to discover the following properties of the @@ -65,7 +60,8 @@ # TCL_* # # Lots of values are read in from the tclConfig.sh script, -# if that script is available. +# if that script is available. This values are used for +# constructing and installing the TCL extension. # # TARGET_READLINE_LIBS # @@ -120,7 +116,7 @@ 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.12 $ +# $Revision: 1.13 $ ######### # Programs needed @@ -136,11 +132,12 @@ if test "$program_prefix" = "NONE"; then fi AC_SUBST(program_prefix) -if test -f VERSION; then - VERSION=`cat VERSION` - echo "Version set to $VERSION" -fi +VERSION=[`cat $srcdir/VERSION | sed 's/^\([0-9]*\.*[0-9]*\).*/\1/'`] +echo "Version set to $VERSION" AC_SUBST(VERSION) +RELEASE=`cat $srcdir/VERSION` +echo "Release set to $RELEASE" +AC_SUBST(RELEASE) ######### # Check to see if the --with-hints=FILE option is used. If there is none, diff --git a/manifest b/manifest index 67fc82ea56..919334c554 100644 --- a/manifest +++ b/manifest @@ -1,6 +1,6 @@ -C The\sconfigure\sscript\snow\sautomatically\sdetects\stclConfig.sh\sand\sbuilds\sthe\nTcl\sextension\sonly\sif\stclConfig.sh\sis\spresent.\s\sThe\sTcl\sextension\scan\sbe\ndisabled\susing\s--disable-tcl.\s(CVS\s2152) -D 2004-11-25T13:50:01 -F Makefile.in 323399124557d568541dc377780679b19df80f40 +C Disable\sthe\scursors.\s\s"make\sinstall"\snow\sbuilds\sand\sinstalls\sa\sTCL\spackage\nfor\sSQLite\sif\sTCL\sis\sinstalled\son\sthe\ssystem.\s(CVS\s2153) +D 2004-11-27T15:52:16 +F Makefile.in 30a4edb59e7b6d1595d3398b627560c4b47ff7ab F Makefile.linux-gcc a9e5a0d309fa7c38e7c14d3ecf7690879d3a5457 F README a01693e454a00cc117967e3f9fdab2d4d52e9bc1 F VERSION 342b6d5fde93b6d45023e2fee0163dda6464b9d6 @@ -10,8 +10,8 @@ F art/SQLite.gif 1bbb94484963f1382e27e1c5e86dd0c1061eba2b F art/SQLiteLogo3.tiff b9e6bf022ae939bc986cddb8ab99583ca1b02cb3 F config.guess 2103e94b15dc57112d7b9ee152c6fac5288895b4 F config.sub 9bf686ec001ae7bc53f5b3563c90c62d4c6d48be -F configure 4b52c5747661a4864365ab4cd6ca6e2f6ef9c86a x -F configure.ac acefb1bd62d62959f6288353c2d7b3d65785fc4b +F configure 7bddb59f07f10377569c8ad76351ce44d95858f8 x +F configure.ac 8bb95fd240baf3968eeb12985000b2ac4b8e9306 F doc/lemon.html f0f682f50210928c07e562621c3b7e8ab912a538 F doc/report1.txt a031aaf37b185e4fa540223cb516d3bccec7eeac F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 @@ -83,6 +83,7 @@ F src/vdbeapi.c 74be7f96c0a1ac275661f8b32276ac521d9ce37c F src/vdbeaux.c dc06bbb8511d07f8d45ed2ea760f35f0736a690c F src/vdbemem.c 5876c8abf4374fef671f4fd8dc333ef3fc95a2f0 F src/where.c f9d3b6f2243a0eb9065fa4c465fe0831a64b7db7 +F tclinstaller.tcl 36478c3bbfc5b93ceac42d94e3c736937b808432 F test/all.test 929bfa932b55e75c96fe2203f7650ba451c1862c F test/alter.test 95c57a4f461fa81293e0dccef7f83889aadb169a F test/attach.test f39069efd4394422798f249df9a31489aa941ee1 @@ -261,7 +262,7 @@ F www/tclsqlite.tcl 560ecd6a916b320e59f2917317398f3d59b7cc25 F www/vdbe.tcl 095f106d93875c94b47367384ebc870517431618 F www/version3.tcl 092a01f5ef430d2c4acc0ae558d74c4bb89638a0 F www/whentouse.tcl fdacb0ba2d39831e8a6240d05a490026ad4c4e4c -P 0ad4ed87ce1112663ca94805dea167372485396a -R 8eb4a1911a6d9341ac20110203ec6e63 +P 12424bef7770f3d256d386251477a1da78be2bde +R cb5714e0d126a2a4bbea5655c8a2079c U drh -Z 0cc9ef7bf73b18d792c309c66172b724 +Z 37958e4e7f56b2ee1d4002e37fda394f diff --git a/manifest.uuid b/manifest.uuid index 7a039ca7b2..06560fed88 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -12424bef7770f3d256d386251477a1da78be2bde \ No newline at end of file +d75014c299496a02f6850545beb0ab669802bf87 \ No newline at end of file diff --git a/tclinstaller.tcl b/tclinstaller.tcl new file mode 100644 index 0000000000..3059643d66 --- /dev/null +++ b/tclinstaller.tcl @@ -0,0 +1,28 @@ +# This script attempts to install SQLite3 so that it can be used +# by TCL. Invoke this script with single argument which is the +# version number of SQLite. Example: +# +# tclsh tclinstaller.tcl 3.0 +# +set VERSION [lindex $argv 0] +set LIBFILE .libs/libtclsqlite3[info sharedlibextension] +set LIBDIR [lindex $auto_path 0] +set LIBNAME [file tail $LIBFILE] +set LIB $LIBDIR/sqlite3/$LIBNAME + +file delete -force $LIBDIR/sqlite3 +file mkdir $LIBDIR/sqlite3 +set fd [open $LIBDIR/sqlite3/pkgIndex.tcl w] +puts $fd "package ifneeded sqlite3 $VERSION \[list load $LIB sqlite3\]" +close $fd + +# We cannot use [file copy] because that will just make a copy of +# a symbolic link. We have to open and copy the file for ourselves. +# +set in [open $LIBFILE] +fconfigure $in -translation binary +set out [open $LIB w] +fconfigure $out -translation binary +puts -nonewline $out [read $in] +close $in +close $out