]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Simplification the ./configure script. Carry Makefile CFLAGS and OPTS through
authordrh <>
Thu, 1 Aug 2024 23:30:29 +0000 (23:30 +0000)
committerdrh <>
Thu, 1 Aug 2024 23:30:29 +0000 (23:30 +0000)
into builttclext.tcl.  Fix a bug in tclsqlite.c introduced by the previous
check-in.

FossilOrigin-Name: 72a80aa0abb121a23f8cc1eb1af04ba06c733a7a40c06f1fe9e62f2a0a26ca6e

Makefile.in
configure
configure.ac
manifest
manifest.uuid
src/tclsqlite.c
tool/buildtclext.tcl

index 61fcf6e7d6dbcbcfda979942aa2f66ebb613ae4e..4e804f889a5a71f77639549a19d1313a7df24ef0 100644 (file)
@@ -1561,7 +1561,7 @@ install:  sqlite3$(TEXE) lib_install sqlite3.h sqlite3.pc ${HAVE_TCL:1=tcl_instal
 # by --with-tclsh=
 #
 tclextension:  tclsqlite3.c
-       $(TCLSH_CMD) $(TOP)/tool/buildtclext.tcl --build-only
+       $(TCLSH_CMD) $(TOP)/tool/buildtclext.tcl --build-only --cc $(CC) $(CFLAGS) $(OPT_FEATURE_FLAGS) $(OPTS)
 
 # Install the SQLite TCL extension in a way that is appropriate for $TCLSH_CMD
 # to find it.
index 744410589bc634eead0260f0e9e7a22add504d4e..3486ebc03478762240cd65091bfd2a42e509bebb 100755 (executable)
--- a/configure
+++ b/configure
@@ -795,17 +795,7 @@ VERSION
 program_prefix
 TCLLIBDIR
 HAVE_TCL
-TCL_SHLIB_SUFFIX
-TCL_STUB_LIB_SPEC
-TCL_STUB_LIB_FLAG
-TCL_STUB_LIB_FILE
 TCL_LIB_SPEC
-TCL_LIB_FLAG
-TCL_LIB_FILE
-TCL_INCLUDE_SPEC
-TCL_SRC_DIR
-TCL_BIN_DIR
-TCL_VERSION
 TCLSH_CMD
 INSTALL_DATA
 INSTALL_SCRIPT
@@ -3944,13 +3934,13 @@ if ${lt_cv_nm_interface+:} false; then :
 else
   lt_cv_nm_interface="BSD nm"
   echo "int some_variable = 0;" > conftest.$ac_ext
-  (eval echo "\"\$as_me:3947: $ac_compile\"" >&5)
+  (eval echo "\"\$as_me:3937: $ac_compile\"" >&5)
   (eval "$ac_compile" 2>conftest.err)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:3950: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval echo "\"\$as_me:3940: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
   cat conftest.err >&5
-  (eval echo "\"\$as_me:3953: output\"" >&5)
+  (eval echo "\"\$as_me:3943: output\"" >&5)
   cat conftest.out >&5
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
     lt_cv_nm_interface="MS dumpbin"
@@ -5156,7 +5146,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5159 "configure"' > conftest.$ac_ext
+  echo '#line 5149 "configure"' > conftest.$ac_ext
   if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -6681,11 +6671,11 @@ else
    -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:6684: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:6674: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:6688: \$? = $ac_status" >&5
+   echo "$as_me:6678: \$? = $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.
@@ -7020,11 +7010,11 @@ else
    -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:7023: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7013: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7027: \$? = $ac_status" >&5
+   echo "$as_me:7017: \$? = $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.
@@ -7125,11 +7115,11 @@ else
    -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:7128: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7118: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7132: \$? = $ac_status" >&5
+   echo "$as_me:7122: \$? = $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
@@ -7180,11 +7170,11 @@ else
    -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:7183: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7173: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7187: \$? = $ac_status" >&5
+   echo "$as_me:7177: \$? = $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
@@ -9560,7 +9550,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 9563 "configure"
+#line 9553 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -9656,7 +9646,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 9659 "configure"
+#line 9649 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10397,16 +10387,9 @@ if test x"${with_tcl}" != x; then
 $as_echo "loading TCL configuration from ${tclconfig}" >&6; }
     . ${tclconfig}
 
-
-
-
-
-
-
-
-
-
-
+    # There are lots of other configuration variables that are provided by the
+    # tclConfig.sh file and that could be included here.  But as of right now,
+    # TCL_LIB_SPEC is the only what that the Makefile uses.
   fi
   if test x"$TCLSH_CMD" == x; then
     TCLSH_CMD=${TCL_EXEC_PREFIX}/bin/tclsh${TCL_VERSION}
index 404a80bffd329054fcba9bf7c740be56a90a6a81..fba0755e62eb96ac93234d8d5c103c2c9cce7b7d 100644 (file)
@@ -144,17 +144,10 @@ if test x"${with_tcl}" != x; then
   if test x"${tclconfig}" != x; then
     AC_MSG_RESULT([loading TCL configuration from ${tclconfig}])
     . ${tclconfig}
-    AC_SUBST(TCL_VERSION)
-    AC_SUBST(TCL_BIN_DIR)
-    AC_SUBST(TCL_SRC_DIR)
-    AC_SUBST(TCL_INCLUDE_SPEC)
-    AC_SUBST(TCL_LIB_FILE)
-    AC_SUBST(TCL_LIB_FLAG)
     AC_SUBST(TCL_LIB_SPEC)
-    AC_SUBST(TCL_STUB_LIB_FILE)
-    AC_SUBST(TCL_STUB_LIB_FLAG)
-    AC_SUBST(TCL_STUB_LIB_SPEC)
-    AC_SUBST(TCL_SHLIB_SUFFIX)
+    # There are lots of other configuration variables that are provided by the
+    # tclConfig.sh file and that could be included here.  But as of right now,
+    # TCL_LIB_SPEC is the only what that the Makefile uses.
   fi
   if test x"$TCLSH_CMD" == x; then
     TCLSH_CMD=${TCL_EXEC_PREFIX}/bin/tclsh${TCL_VERSION}
index 15bb5252ff6c0ff5fa427bcb7e55559d3c0b8d2a..26917c15b6c4cded28aa54d981c35555306db603 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,9 +1,9 @@
-C Add\sthe\stclextension-list\smakefile\starget.\s\sThe\sthe\smakefile\srunning\son\sMac.
-D 2024-08-01T23:00:37.841
+C Simplification\sthe\s./configure\sscript.\s\sCarry\sMakefile\sCFLAGS\sand\sOPTS\sthrough\ninto\sbuilttclext.tcl.\s\sFix\sa\sbug\sin\stclsqlite.c\sintroduced\sby\sthe\sprevious\ncheck-in.
+D 2024-08-01T23:30:29.441
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
-F Makefile.in 4fc6dc2def18b4a2e8fb4c4cad04699e829b3fcefa85974ec71a4a9110a0ea88
+F Makefile.in 3de6a3420170d4f6fac8fd0f338db422ce100be1e64c1e8cb62b85876ebc5fca
 F Makefile.linux-gcc f3842a0b1efbfbb74ac0ef60e56b301836d05b4d867d014f714fa750048f1ab6
 F Makefile.msc 993f8addade63bcac7192416e7161ceee60edcee2376299ea48b2a74c66ac2d5
 F README.md 6358805260a03ebead84e168bbf3740ddf3f683b477e478567186aa7afb490d3
@@ -35,8 +35,8 @@ F autoconf/tea/win/nmakehlp.c b01f822eabbe1ed2b64e70882d97d48402b42d2689a1ea0034
 F autoconf/tea/win/rules.vc 7b3bb2ef32ade0f3f14d951231811678722725e3bca240dd9727ae0dfe10f6a5
 F config.guess 883205ddf25b46f10c181818bf42c09da9888884af96f79e1719264345053bd6
 F config.sub c2d0260f17f3e4bc0b6808fccf1b291cb5e9126c14fc5890efc77b9fd0175559
-F configure 7657b4eaced7589ee0259f7c99ca0b71fe3d47b7fdcc13844b64f77d3084c082 x
-F configure.ac 6c41bb7a160c3c057af689f5fbf44bd290ccf2fb68be63b3f8d6a9062b224832
+F configure 33192bee7d11f68a2be3a1ddf1dc4aa02060675f0bfb48eaf61b63fcd45abedf x
+F configure.ac 1665604ede8e83da1454f26eb19dcc7cff70f1b21d305616b6c7cea2d107c005
 F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
 F doc/F2FS.txt c1d4a0ae9711cfe0e1d8b019d154f1c29e0d3abfe820787ba1e9ed7691160fcd
 F doc/compile-for-windows.md e8635eea9153dcd6a51fd2740666ebc4492b3813cb1ac31cd8e99150df91762d
@@ -768,7 +768,7 @@ F src/sqliteInt.h b77218c425891c7c90506c77fd2eb13bae03628d065b44fffeb37401cd955a
 F src/sqliteLimit.h 6878ab64bdeb8c24a1d762d45635e34b96da21132179023338c93f820eee6728
 F src/status.c cb11f8589a6912af2da3bb1ec509a94dd8ef27df4d4c1a97e0bcf2309ece972b
 F src/table.c 0f141b58a16de7e2fbe81c308379e7279f4c6b50eb08efeec5892794a0ba30d1
-F src/tclsqlite.c 9bd7443f5db3250dbb073aa6f046a52f939832ac0193c710d6fffb6ca68674be
+F src/tclsqlite.c c6888598f08dee3d9112a38ef42c8f5c89ca7f3190f4694744d0b84250f4bf8c
 F src/tclsqlite.h c6af51f31a2b2172d674608763a4b98fdf5cd587e4025053e546fb8077757262
 F src/test1.c 51159784f29d3dfd4b50fd6ed9c43c8f7f36925c501a3ad3083528e5e5544bd7
 F src/test2.c 7ebc518e6735939d8979273a6f7b1d9b5702babf059f6ad62499f7f60a9eb9a3
@@ -2093,7 +2093,7 @@ F tool/GetTclKit.bat d84033c6a93dfe735d247f48ba00292a1cc284dcf69963e5e672444e045
 F tool/Replace.cs 02c67258801c2fb5f63231e0ac0f220b4b36ba91
 F tool/build-all-msvc.bat c817b716e0edeecaf265a6775b63e5f45c34a6544f1d4114a222701ed5ac79ab x
 F tool/build-shell.sh f193b5e3eb4afcb4abbf96bf1475be6cfb74763ee2e50c82bc7ca105e8a136c5
-F tool/buildtclext.tcl 23a986cfcb0338e02ad277cebd94d92b37a9cd848fe168f088fa80ca973b4d79
+F tool/buildtclext.tcl d6e880173bec323f30c0505c5f82eb29c5661bd501d33b5b7a3b5507269dc4f9
 F tool/cg_anno.tcl c1f875f5a4c9caca3d59937b16aff716f8b1883935f1b4c9ae23124705bc8099 x
 F tool/checkSpacing.c 810e51703529a204fc4e1eb060e9ab663e3c06d2
 F tool/cktclsh.sh 6075eef9c6b9ba4b38fef2ca2a66d25f2311bd3c610498d18a9b01f861629cca
@@ -2202,8 +2202,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 534f8344abbda78e841edafe84c27ea8b1dfdecb9ab51271772a7f7264ef5b8c
-R 2909fb7ee21646cc58011e08d136b308
+P 2f667cc8e54167342e17e63e1a017388365ebf4cd379f9c16c12e4603b34a326
+R 79bc0ffb836cbf05c7dcfd1908280244
 U drh
-Z d8a3255efb288995807535829d58616f
+Z c826d5650b7fb369e6f2edfd17fa30c3
 # Remove this line to create a well-formed Fossil manifest.
index 01a9c859f100a104b1870419eb1014cf9cc05e19..a4767bc367009d0c4cd2cebbfe64fbce6eff1db5 100644 (file)
@@ -1 +1 @@
-2f667cc8e54167342e17e63e1a017388365ebf4cd379f9c16c12e4603b34a326
+72a80aa0abb121a23f8cc1eb1af04ba06c733a7a40c06f1fe9e62f2a0a26ca6e
index 51049b4d211886ff35e90365467291fef2e38ddc..0c8888fd48d33d3ef0a444aca2eee880f959c0d6 100644 (file)
@@ -371,7 +371,7 @@ static int SQLITE_TCLAPI incrblobOutput(
 
 /* The datatype of Tcl_DriverWideSeekProc changes between tcl8.6 and tcl9.0 */
 #if TCL_MAJOR_VERSION==9
-# define WideSeekProcType long lone
+# define WideSeekProcType long long
 #else
 # define WideSeekProcType Tcl_WideInt
 #endif
index 26067ecd870e758e646f3531d625024a8da7cc80..8d6d0c25b0c739fc7b69ac5ea13f59a948decdea 100644 (file)
@@ -11,15 +11,20 @@ to running this script.  Use "make tclsqlite3.c" to generate that file.
 Options:
 
    --build-only         Only build the extension, don't install it
+   --cc COMPILER        Build using this compiler
    --info               Show info on existing SQLite TCL extension installs
    --install-only       Install an extension previously build
-   --uninstall          Uninstall the extension}
+   --uninstall          Uninstall the extension
+
+Other options are retained and passed through into the compiler.}
 
 
 set build 1
 set install 1
 set uninstall 0
 set infoonly 0
+set CC {}
+set OPTS {}
 for {set ii 0} {$ii<[llength $argv]} {incr ii} {
   set a0 [lindex $argv $ii]
   if {$a0=="--install-only"} {
@@ -30,6 +35,11 @@ for {set ii 0} {$ii<[llength $argv]} {incr ii} {
     set uninstall 1
   } elseif {$a0=="--info"} {
     set infoonly 1
+  } elseif {$a0=="--cc" && $ii+1<[llength $argv]} {
+    incr ii
+    set CC [lindex $argv $ii]
+  } elseif {[string match -* $a0]} {
+    append OPTS " $a0"
   } else {
     puts stderr "Unknown option: \"$a0\"\n"
     puts stderr $help
@@ -84,15 +94,12 @@ set TCLMAJOR 8
 regexp {TCL_MAJOR_VERSION='(\d)'} $tclConfig all TCLMAJOR
 set SUFFIX so
 regexp {TCL_SHLIB_SUFFIX='\.([^']+)'} $tclConfig all SUFFIX
-set CC gcc
-regexp {TCL_CC='([^']+)'} $tclConfig all CC
+if {$CC==""} {
+  set CC gcc
+  regexp {TCL_CC='([^']+)'} $tclConfig all CC
+}
 set CFLAGS -fPIC
 regexp {TCL_SHLIB_CFLAGS='([^']+)'} $tclConfig all CFLAGS
-set opt {}
-regexp {TCL_CFLAGS_OPTIMIZE='([^']+)'} $tclConfig all opt
-if {$opt!=""} {
-  append CFLAGS " $opt"
-}
 set LIBS {}
 regexp {TCL_STUB_LIB_SPEC='([^']+)'} $tclConfig all LIBS
 set INC "-I$srcdir/src"
@@ -104,6 +111,9 @@ if {$inc!=""} {
 set cmd {}
 regexp {TCL_SHLIB_LD='([^']+)'} $tclConfig all cmd
 set LDFLAGS "$INC -DUSE_TCL_STUBS"
+if {[string length $OPTS]>1} {
+  append LDFLAGS $OPTS
+}
 set CMD [subst $cmd]
 if {$TCLMAJOR>8} {
   set OUT libtcl9sqlite$VERSION.$SUFFIX
@@ -197,7 +207,12 @@ package ifneeded sqlite3 $VERSION \\
   #
   set cmd "$CMD tclsqlite3.c -o $OUT $LIBS"
   puts $cmd
-  exec {*}$cmd
+  if {[catch {
+    exec {*}$cmd
+  } errmsg]} {
+    puts $errmsg
+    exit 1
+  }
 }