SQLite Forum

create sqlite3_analyzer from trunk
Login
Old thread, but I have an observation to add: when configure is being run with the --disable-tcl argument, the Makefile variables needed to build anything tcl-ish (including sqlite3_analyzer) are not set properly (TCC, LIBTCL). "make sqlite3_analyzer" will therefore fail.

So I think tcl headers and libraries should be looked for even in the presence of --disable-tcl. See the attached patch for how it might work. I hereby declare this patch to be public domain, no strings attached, which I'd gladly repeat in form of an [affidavit](https://sqlite.org/copyright.html) if you tell me how to do this.

BTW, after running automake, I get errors about the recently added AMALGAMATION_LINE_MACROS.

```
Index: configure.ac
==================================================================
--- configure.ac
+++ configure.ac
@@ -287,13 +287,11 @@
 # This code is derived from the SC_PATH_TCLCONFIG and SC_LOAD_TCLCONFIG
 # macros in the in the tcl.m4 file of the standard TCL distribution.
 # Those macros could not be used directly since we have to make some
 # minor changes to accomodate systems that do not have TCL installed.
 #
-AC_ARG_ENABLE(tcl, AC_HELP_STRING([--disable-tcl],[do not build TCL extension]),
-      [use_tcl=$enableval],[use_tcl=yes])
-if test "${use_tcl}" = "yes" ; then
+use_tcl=yes
   AC_ARG_WITH(tcl, AC_HELP_STRING([--with-tcl=DIR],[directory containing tcl configuration (tclConfig.sh)]), with_tclconfig=${withval})
   AC_MSG_CHECKING([for Tcl configuration])
   AC_CACHE_VAL(ac_cv_c_tclconfig,[
     # First check to see if --with-tcl was specified.
     if test x"${with_tclconfig}" != x ; then
@@ -455,15 +453,17 @@
     AC_SUBST(TCL_STUB_LIB_FILE)
     AC_SUBST(TCL_STUB_LIB_FLAG)
     AC_SUBST(TCL_STUB_LIB_SPEC)
     AC_SUBST(TCL_SHLIB_SUFFIX)
   fi
-fi
-if test "${use_tcl}" = "no" ; then
+
+AC_ARG_ENABLE(tcl, AC_HELP_STRING([--disable-tcl],[do not build TCL extension]),
+      [tcl_ext=$enableval],[tcl_ext=yes])
+if test "${use_tcl}" = "yes" -a "${tcl_ext}" = "yes"; then
+  HAVE_TCL=1
+else
   HAVE_TCL=""
-else
-  HAVE_TCL=1
 fi
 AC_SUBST(HAVE_TCL)
 
 ##########
 # Figure out what C libraries are required to compile programs
```