stephan [Thu, 31 Oct 2024 08:03:35 +0000 (08:03 +0000)]
Remove some proj-assert checks which are not valid on OpenBSD. Ensure that queued up notices about TCL warnings are displayed before leaving sqlite-check-tcl.
stephan [Thu, 31 Oct 2024 07:20:22 +0000 (07:20 +0000)]
Add the .POSIX special target to the main makefiles to hint to the make impl that it should behave POSIXly-correct. Fix the default file extension for static libs in main.mk.
stephan [Thu, 31 Oct 2024 07:01:31 +0000 (07:01 +0000)]
Add more deps to T.tcl.env.sh so that it gets rebuilt if configure is run with a different --with-tcl value. Remove all references to the superfluous XYZdir makefile vars conventionally set by the autotools (they're just noise in this build).
stephan [Thu, 31 Oct 2024 06:52:09 +0000 (06:52 +0000)]
If a file named .default-CFLAGS exists in the build dir, use its contents as the default value of the CFLAGS unless it's overridden by being passed in or in the environment.
stephan [Thu, 31 Oct 2024 01:51:00 +0000 (01:51 +0000)]
Fix a corner case in automatic TCLLIBDIR detection: if the $auto_path list is not empty but none of them refer to an existing dir, the last dir in that list would have been accepted as the TCLLIBDIR. It will now error out instead.
stephan [Thu, 31 Oct 2024 00:56:05 +0000 (00:56 +0000)]
Reimplement how the TCL-related environment vars are made available to make recipes which need them, reducing the console noise and consolidating it with the has_tclconfig flag file. It now uses a generated shell snippet which it sources, rather than inlining all of that shell code.
drh [Wed, 30 Oct 2024 14:03:56 +0000 (14:03 +0000)]
Fix the CLI so that it can use either the canonical Antirez linenoise
(with HAVE_LINENOISE=1) or Steve Bennett's enhanced linenoise that works
on the Win32 console as well as on Unix (with HAVE_LINENOISE=2). The
./configure script detects which one to use and sets HAVE_LINENOISE accordingly.
stephan [Wed, 30 Oct 2024 04:07:16 +0000 (04:07 +0000)]
Remove accommodation of the legacy-named shared libraries from the installation rules, per discussion. Rename install-includes to install-headers. Quote installation target dir names "just in case".
stephan [Wed, 30 Oct 2024 02:06:41 +0000 (02:06 +0000)]
Re-enable exporting of TCLLIBDIR at configure-time so that clients can override it once there rather than having to override it on an arbitrary number of make invocations (which they can still do, but now need not). Based on feedback in [forum:38f6988e57b738e5|forum post 38f6988e57b].
stephan [Wed, 30 Oct 2024 01:47:48 +0000 (01:47 +0000)]
When calculating the TCLLIBDIR in main.mk, allow the user to override it using an environment var or make var assignment, per feedback in [forum:38f6988e57b738e5|forum post 38f6988e57b].
stephan [Tue, 29 Oct 2024 23:42:24 +0000 (23:42 +0000)]
Split the core-most CFLAGS, which should not be overridable (like -fPIC), into CFLAGS.core, so that went CFLAGS=... is passed on in a make invocation the -fPIC flag is not lost (as reported in [forum:39f8c54391d38c72 | forum post 39f8c543]).
stephan [Tue, 29 Oct 2024 23:19:29 +0000 (23:19 +0000)]
Try to detect if --with-readline-cflags is passed a non-cflags value, e.g. readline/readline.h, and fail loudly if it is. The legacy configure accepted that formulation but silently did nothing useful with it and that formulation now causes the auto-completion test to fail, as reported in [forum:f13b8e8f38402367 | forum post f13b8e8f38402367].
stephan [Tue, 29 Oct 2024 19:03:22 +0000 (19:03 +0000)]
Reformulate the readline completion signature compatibility test so that -Wunused-variable in the CFLAGS does not cause it to fail. Problem reported via email.
stephan [Tue, 29 Oct 2024 18:50:25 +0000 (18:50 +0000)]
Rename an almost-name-colliding auto.def function. Fix a refactoring-induced change which broke implicit lookup of tclConfig.sh. Add msg-debug proc to enable toggling of developer-level debug messages via a configure argument.
stephan [Tue, 29 Oct 2024 08:42:06 +0000 (08:42 +0000)]
When either --readline or --editline are explicitly provided but the corresponding feature is not found, fail fatally. If not explicitly requested, simply disable that feature if the lib is not found.
stephan [Tue, 29 Oct 2024 08:01:56 +0000 (08:01 +0000)]
Teach configure --editline to report itself to shell.c as either HAVE_EDITLINE or HAVE_READLINE, depending on which headers are available (editline/readline.h or readline/readline.h, both of which work and some systems only have the latter), but then link against libedit regardless of which one shell.c thinks it is using.
stephan [Tue, 29 Oct 2024 04:21:11 +0000 (04:21 +0000)]
Remove LDFLAGS_LIBZ from sqlite3.pc.in (pkg-config) because it's not needed by the library, only the shell. Re-enable the notice about --disable-static only being partially true.
stephan [Tue, 29 Oct 2024 03:29:45 +0000 (03:29 +0000)]
Remove some dead auto.def code. Link tclsqlite3 shell against the .so instead of .a, analog to [45315f8f275d]. Move some header file tests which are only needed for jimsh into the jimsh compilability check block.
drh [Mon, 28 Oct 2024 22:35:32 +0000 (22:35 +0000)]
Enclose the generated "sqlite3.c" and "sqlite3.h" in a single big #ifdef so
that if they get truncated by more than a little whitespace, they will not
compile and the truncation can be easily detected.
drh [Mon, 28 Oct 2024 16:31:20 +0000 (16:31 +0000)]
The async extension was superseded by WAL mode about 11 years ago, and has
long been deprecated. Remove it from the source tree. (Anybody who really
needs it can still dig it out of the historical records.)
stephan [Mon, 28 Oct 2024 14:16:50 +0000 (14:16 +0000)]
Rename the 'hwaci' auto.def utility API to the more generic 'proj' API, per /chat discussion. Fix a function name typo which caused readline detection to kill the configure in one code path.
stephan [Mon, 28 Oct 2024 02:46:57 +0000 (02:46 +0000)]
Correct the default config value for HAVE_TCL (0 until proven otherwise) and fix the starting dir for SQLITE_AUTORECONFIG (formerly SQLITE_AUTOREMAKE), as reported in [forum:8ab69387008f2f6c | forum post 8ab69387008f2f6c].
stephan [Mon, 28 Oct 2024 02:11:51 +0000 (02:11 +0000)]
Have --enable-editline fail rather than emit a warning which would easily be overlooked by automated builds. The error message explains a potential workaround for activating libedit.
stephan [Sun, 27 Oct 2024 22:18:33 +0000 (22:18 +0000)]
Re-order the auto.def flags logical groups. Add some discrete bold formatting to select configure output. Remove some dead code. Account for behavior misunderstanding of user-notice. Add the start of a 'make help' target. General cosmetic cleanups.
stephan [Sun, 27 Oct 2024 20:04:23 +0000 (20:04 +0000)]
Rename --with-readline-lib/inc to --with-readline-ldflags/cflags, for clarity, but retain the older names as aliases using autosetup's "hidden alias" feature. Rename the newly-added --with-icu-lib to --with-icu-ldflags (with no backwards compatibility).
drh [Sun, 27 Oct 2024 10:48:06 +0000 (10:48 +0000)]
Improvements to the PATTERN option of the "testrunner.tcl joblist" command.
The pattern match is case insensitive and applies to the state and displaytype
in addition to displayname.
stephan [Sun, 27 Oct 2024 08:52:20 +0000 (08:52 +0000)]
Re-add the --disable-static flag to (mostly) disable static lib build. Some components require the static lib and will trump this preference if they are activated.
stephan [Sun, 27 Oct 2024 06:03:27 +0000 (06:03 +0000)]
Makefile.in: include CPPFLAGS in the CFLAGS, as the legacy Makefile.in did, because some downstream scripts rely on that. Remove a duplicated TCLLIBDIR assignment.
stephan [Sun, 27 Oct 2024 05:28:52 +0000 (05:28 +0000)]
configure: document why --enable-editline does not work and emit a warning with a potential alternative/workaround if it's used. Various cosmetic cleanups.
stephan [Sun, 27 Oct 2024 02:27:07 +0000 (02:27 +0000)]
Rename --with-readline-ldflags/cflags to --with-readline-lib/inc because it turns out that ldflags/cflags have (when passed an explicit value) the same semantics the legacy lib/inc flags. Still to-fix is that the no-flag-given readline search behavior differs, and is much more limited, from the legacy configure behavior.
stephan [Sat, 26 Oct 2024 19:16:18 +0000 (19:16 +0000)]
Remove the install-lib makefile dep from install-tcl, as it breaks non-root-user invocations of 'make install-tcl' when the --prefix is left at its default and --with-tcl is explicitly provided.
stephan [Sat, 26 Oct 2024 18:17:17 +0000 (18:17 +0000)]
Add new configure --with-readline-ldflags/cflags/header flags as brute-force method for clients to tell configure how to compile and link against readline.
stephan [Sat, 26 Oct 2024 16:03:04 +0000 (16:03 +0000)]
Patch bundle accumulated via /chat: add missing --enable/disable-shared flag to configure script and update testrunner.tcl for other configure script flag changes.
stephan [Sat, 26 Oct 2024 03:19:29 +0000 (03:19 +0000)]
Expand the libtool-style link support from [0a50e33051] such that if INSTALL_SO_086_LINKS=1 is passed to 'make install' then the libtool-style names are always linked in, regardless of whether they already existed or not. In either case, we unconditionally remove libsqlite3.la because it cannot work with the newly-installed non-libtool .so file.
stephan [Sat, 26 Oct 2024 03:05:20 +0000 (03:05 +0000)]
Disable generation of config.defines.json until/unless it proves interesting. Honor the --disable-largefile flag. When installing libsqlite3.so and an older-style libtool installation is found, re-link the libtool-generated files to the newly-installed ones to retain their historical names.
stephan [Fri, 25 Oct 2024 23:25:49 +0000 (23:25 +0000)]
Use (cc-with {-includes stdint.h}) when checking for the various int types because, despite it being C99, it turns out that we do indeed use it if it's available.
stephan [Fri, 25 Oct 2024 23:03:33 +0000 (23:03 +0000)]
Experimentally: when ./configure CC=foo is used in a non-cross-compilation build and CC_FOR_BUILD is not explicitly provided, force CC_FOR_BUILD to default to CC. This is debatable - see the code comments for the justification.
drh [Fri, 25 Oct 2024 14:39:26 +0000 (14:39 +0000)]
Rework the configure+make system to use autosetup rather than autoconf.
Autosetup runs faster and is easier to maintain, and it allows for common
targets (such as "sqlite3" and "sqlite3.c") to be built within having to
install "tclsh".