Turn the session extension off by default.  Enable using --enable-session on
configure scripts, or using the SESSION=1 argument to nmake on Windows.

FossilOrigin-Name: e462cde2a50c39cc2f8d8624aada19280b8226eb
diff --git a/Makefile.in b/Makefile.in
index e468762..78480de 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -82,7 +82,6 @@
 # The same set of OMIT and ENABLE flags should be passed to the 
 # LEMON parser generator and the mkkeywordhash tool as well.
 OPT_FEATURE_FLAGS = @OPT_FEATURE_FLAGS@
-OPT_FEATURE_FLAGS += -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK
 
 TCC += $(OPT_FEATURE_FLAGS)
 
diff --git a/Makefile.msc b/Makefile.msc
index e65f99d..3eb50c1 100644
--- a/Makefile.msc
+++ b/Makefile.msc
@@ -264,6 +264,15 @@
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
+!ENDIF
+
+# Enable support for the session extension if the SESSION=1 argument is
+# present on the nmake command-line
+#
+!IFNDEF SESSION
+SESSION = 0
+!ENDIF
+!IF $(SESSION)!=0
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_SESSION=1
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1
 !ENDIF
diff --git a/autoconf/Makefile.am b/autoconf/Makefile.am
index cca23ba..e821159 100644
--- a/autoconf/Makefile.am
+++ b/autoconf/Makefile.am
@@ -1,5 +1,5 @@
 
-AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ @FTS5_FLAGS@ @JSON1_FLAGS@ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE
+AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ @FTS5_FLAGS@ @JSON1_FLAGS@ @SESSION_FLAGS@ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE
 
 lib_LTLIBRARIES = libsqlite3.la
 libsqlite3_la_SOURCES = sqlite3.c
diff --git a/autoconf/Makefile.msc b/autoconf/Makefile.msc
index ed99ce9..dcb69da 100644
--- a/autoconf/Makefile.msc
+++ b/autoconf/Makefile.msc
@@ -249,6 +249,15 @@
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_FTS3=1
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_RTREE=1
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_COLUMN_METADATA=1
+!ENDIF
+
+# Enable support for the session extension if the SESSION=1 argument is
+# present on the nmake command-line
+#
+!IFNDEF SESSION
+SESSION = 0
+!ENDIF
+!IF $(SESSION)!=0
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_SESSION=1
 OPT_FEATURE_FLAGS = $(OPT_FEATURE_FLAGS) -DSQLITE_ENABLE_PREUPDATE_HOOK=1
 !ENDIF
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index f86a39c..d1fe506 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -123,6 +123,18 @@
 #-----------------------------------------------------------------------
 
 #-----------------------------------------------------------------------
+#   --enable-session
+#
+AC_ARG_ENABLE(session, [AS_HELP_STRING(
+  [--enable-session], [enable the session extension [default=no]])], 
+  [], [enable_session=no])
+if test x"$enable_session" == "xyes"; then
+  SESSION_FLAGS="-DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK"
+fi
+AC_SUBST(SESSION_FLAGS)
+#-----------------------------------------------------------------------
+
+#-----------------------------------------------------------------------
 #   --enable-static-shell
 #
 AC_ARG_ENABLE(static-shell, [AS_HELP_STRING(
diff --git a/configure b/configure
index 27cb1ea..3b746fe 100755
--- a/configure
+++ b/configure
@@ -908,6 +908,7 @@
 enable_fts5
 enable_json1
 enable_rtree
+enable_session
 enable_gcov
 '
       ac_precious_vars='build_alias
@@ -1556,6 +1557,7 @@
   --enable-fts5           Enable the FTS5 extension
   --enable-json1          Enable the JSON1 extension
   --enable-rtree          Enable the RTREE extension
+  --enable-session        Enable the SESSION extension
   --enable-gcov           Enable coverage testing using gcov
 
 Optional Packages:
@@ -3923,13 +3925,13 @@
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:3926: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:3928: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:3929: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:3931: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:3932: output\"" >&5)
+  (eval echo "\"\$as_me:3934: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -5135,7 +5137,7 @@
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5138 "configure"' > conftest.$ac_ext
+  echo '#line 5140 "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -6660,11 +6662,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:6663: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:6665: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:6667: \$? = $ac_status" >&5
+   echo "$as_me:6669: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -6999,11 +7001,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7002: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7004: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7006: \$? = $ac_status" >&5
+   echo "$as_me:7008: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7104,11 +7106,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7107: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7109: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7111: \$? = $ac_status" >&5
+   echo "$as_me:7113: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -7159,11 +7161,11 @@
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7162: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7164: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7166: \$? = $ac_status" >&5
+   echo "$as_me:7168: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -9539,7 +9541,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 9542 "configure"
+#line 9544 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -9635,7 +9637,7 @@
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 9638 "configure"
+#line 9640 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11495,6 +11497,20 @@
 fi
 
 #########
+# See whether we should enable the SESSION extension
+# Check whether --enable-session was given.
+if test "${enable_session+set}" = set; then :
+  enableval=$enable_session; enable_session=yes
+else
+  enable_session=no
+fi
+
+if test "${enable_session}" = "yes" ; then
+  OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_SESSION"
+  OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_PREUPDATE_HOOK"
+fi
+
+#########
 # attempt to duplicate any OMITS and ENABLES into the $(OPT_FEATURE_FLAGS) parameter
 for option in $CFLAGS $CPPFLAGS
 do
diff --git a/configure.ac b/configure.ac
index 08c8867..2c97885 100644
--- a/configure.ac
+++ b/configure.ac
@@ -616,6 +616,16 @@
 fi
 
 #########
+# See whether we should enable the SESSION extension
+AC_ARG_ENABLE(session, AC_HELP_STRING([--enable-session],
+      [Enable the SESSION extension]),
+      [enable_session=yes],[enable_session=no])
+if test "${enable_session}" = "yes" ; then
+  OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_SESSION"
+  OPT_FEATURE_FLAGS+=" -DSQLITE_ENABLE_PREUPDATE_HOOK"
+fi
+
+#########
 # attempt to duplicate any OMITS and ENABLES into the $(OPT_FEATURE_FLAGS) parameter
 for option in $CFLAGS $CPPFLAGS
 do
diff --git a/manifest b/manifest
index 27faecd..5a2a7dc 100644
--- a/manifest
+++ b/manifest
@@ -1,8 +1,8 @@
-C Avoid\sleft-shifts\sof\ssigned\sintegers.
-D 2016-05-03T00:04:55.196
-F Makefile.in 9e816d0323e418fbc0f8b2c05fc14e0b3763d9e8
+C Turn\sthe\ssession\sextension\soff\sby\sdefault.\s\sEnable\susing\s--enable-session\son\nconfigure\sscripts,\sor\susing\sthe\sSESSION=1\sargument\sto\snmake\son\sWindows.
+D 2016-05-03T13:14:18.288
+F Makefile.in 9eda6e1c90d05c199c3ec8a7069b0682ad307657
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
-F Makefile.msc 71b8b16cf9393f68e2e2035486ca104872558836
+F Makefile.msc a7f34be67d16284e4208370365a9728094861194
 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7
 F VERSION 5d234da9b5dae329fab75ff75884cfe0a9cb3fda
 F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
@@ -10,11 +10,11 @@
 F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
 F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
 F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
-F autoconf/Makefile.am 42f7eb1fb2b06ddd6c6adab3e4388cc0a237ba40
-F autoconf/Makefile.msc dc0d0500e4a827cb3891d08d846dd6dd40241b51
+F autoconf/Makefile.am 1a47d071e3d5435f8f7ebff7eb6703848bbd65d4
+F autoconf/Makefile.msc ac014aab0b8314d6baa30cbd1dd4ce983f306b5d
 F autoconf/README.first 6c4f34fe115ff55d4e8dbfa3cecf04a0188292f7
 F autoconf/README.txt 4f04b0819303aabaa35fff5f7b257fb0c1ef95f1
-F autoconf/configure.ac d807b567f73a2b0986ccdd206b782cecb4d08fff
+F autoconf/configure.ac e2299fe80eb256dafdc68cf250e37ea1a0a6ec71
 F autoconf/tea/Makefile.in b438a7020446c8a8156e8d97c8914a04833da6fd
 F autoconf/tea/README 3e9a3c060f29a44344ab50aec506f4db903fb873
 F autoconf/tea/aclocal.m4 52c47aac44ce0ddb1f918b6993e8beb8eee88f43
@@ -30,8 +30,8 @@
 F config.guess 226d9a188c6196f3033ffc651cbc9dcee1a42977
 F config.h.in 6376abec766e9a0785178b1823b5a587e9f1ccbc
 F config.sub 9ebe4c3b3dab6431ece34f16828b594fb420da55
-F configure dbd42c55ca6b65e0fb37ef54121755f26a890edf x
-F configure.ac 89e4e02a83d8a1528011f8395621b8c3186b4089
+F configure df9f793ad47eaeb3648a9090fbc0b96955e88b5a x
+F configure.ac 02b972db825685b4b0cca0234b2aa97f71bd15a5
 F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
 F doc/lemon.html e2118945e5f07ed146b45c9cd2b2dd6eabb8ebf2
 F doc/pager-invariants.txt 27fed9a70ddad2088750c4a2b493b63853da2710
@@ -998,7 +998,7 @@
 F test/regexp1.test 497ea812f264d12b6198d6e50a76be4a1973a9d8
 F test/regexp2.test aa7ffcc21350007a78361b82bcf3b74d12227144
 F test/reindex.test 44edd3966b474468b823d481eafef0c305022254
-F test/releasetest.tcl f2519836bebefcc7db36b4946e8028d4885baa59
+F test/releasetest.tcl 7d80014d0245b3f9d02d393d420bf03ca155aec0
 F test/resolver01.test f4022acafda7f4d40eca94dbf16bc5fc4ac30ceb
 F test/rollback.test 458fe73eb3ffdfdf9f6ba3e9b7350a6220414dea
 F test/rollback2.test 8435d6ff0f13f51d2a4181c232e706005fa90fc5
@@ -1486,7 +1486,10 @@
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 5830cf72e9e870830d088399f1ccb03ed6522582
-R 350580348db69c537adc1a64222fc40a
+P 0715ce164333e27671efbec8796f238df98cc287
+R b2e26094738bdcbd727f209d6b0330cd
+T *branch * session-make
+T *sym-session-make *
+T -sym-trunk *
 U drh
-Z 10c9aec7cf14a46e7039005f7f038452
+Z 7002cda7adeb2152eae684546f496804
diff --git a/manifest.uuid b/manifest.uuid
index 9202d19..deb3ca1 100644
--- a/manifest.uuid
+++ b/manifest.uuid
@@ -1 +1 @@
-0715ce164333e27671efbec8796f238df98cc287
\ No newline at end of file
+e462cde2a50c39cc2f8d8624aada19280b8226eb
\ No newline at end of file
diff --git a/test/releasetest.tcl b/test/releasetest.tcl
index 15f64e3..2961fc3 100644
--- a/test/releasetest.tcl
+++ b/test/releasetest.tcl
@@ -51,10 +51,12 @@
   "Default" {
     -O2
     --disable-amalgamation --disable-shared
+    --enable-session
   }
   "Sanitize" {
     CC=clang -fsanitize=undefined
     -DSQLITE_ENABLE_STAT4
+    --enable-session
   }
   "Have-Not" {
     # The "Have-Not" configuration sets all possible -UHAVE_feature options
@@ -106,7 +108,7 @@
     -DSQLITE_ENABLE_OVERSIZE_CELL_CHECK=1
     -DSQLITE_ENABLE_STAT4
     -DSQLITE_ENABLE_STMT_SCANSTATUS
-    --enable-json1 --enable-fts5
+    --enable-json1 --enable-fts5 --enable-session
   }
   "Debug-One" {
     --disable-shared
@@ -132,6 +134,7 @@
     -DSQLITE_ENABLE_RBU
     -DSQLITE_MAX_ATTACHED=125
     -DLONGDOUBLE_TYPE=double
+    --enable-session
   }
   "Device-One" {
     -O2
@@ -168,7 +171,7 @@
     -DSQLITE_OMIT_TRACE=1
     -DSQLITE_TEMP_STORE=3
     -DSQLITE_THREADSAFE=2
-    --enable-json1 --enable-fts5
+    --enable-json1 --enable-fts5 --enable-session
   }
   "Locking-Style" {
     -O2