Make the autotools buildsystem use the SQLite library as provided by the operating system #59
Comments
Giel uploaded file makes the autoconf build system use the system-provided SQLite library when available |
Giel changed status from |
Giel edited the issue description |
Giel commented I've just done a regression test and found out that aside from SQLite 3.5.4 Warzone works with 3.5.5 and 3.5.6. From 3.5.7 and onwards we seem to experience trouble with SQLite's PhysicsFS VFS layer ([browser:trunk/lib/sqlite3/physfs_vfs.c@5982 physfs_vfs.c]). |
Giel uploaded file Updated patch that accepts SQLite versions 3.5.5 and 3.5.6 in addition to 3.5.4 |
Giel uploaded file Updated patch that accepts SQLite versions >= 3.5.4 and < 3.6; possible due to r5984 |
Giel commented [5984] fixed the cause why 3.5.7 through 3.5.9 didn't work. Note that 3.6.x probably still doesn't work because the VFS API has been changed for that release (and I don't feel like maintaining a VFS for both 3.5.x and 3.6.x). |
Giel commented Replying to Warzone2100/old-trac-import#59 (comment:2):
I've got a patch ready that'll update both SQLite to 3.6.2 and [browser:trunk/lib/sqlite3/physfs_vfs.c@6005 physfs_vfs.c] to conform with SQLite's VFS API change. I still don't like maintaining the VFS for both 3.5.x and 3.6.x. However if I change the version requirement to ">= 3.6.0" in the configure script this shouldn't pose a problem. In either case I'll wait with this change until after committing this change. |
Giel changed status from |
Giel changed resolution from `` to |
Giel commented Applied in [6018] |
DevUrandom changed component from |
DevUrandom changed blocking which not transferred by tractive |
DevUrandom changed blockedby which not transferred by tractive |
Buginator removed milestone (was |
Buginator commented Milestone 2.2 deleted |
resolution_fixed
type_patch (an actual patch, not a request for one)
| by GielThis patch alters the configure script and automake system such that, whenever the system provides SQLite libraries (through pkg-config), it will use those instead of the SQLite version we have included in our own source code.
I've currently set it to only link with the version 3.5.4 of SQLite (i.e. the same version we provide), because I've confirmed that Warzone breaks with 3.5.9. (I.e. we fail to load the campaign with that version).
This patch changes the way that the [browser:trunk/lib/sqlite3/sqlite3.h sqlite3.h] header is included. Instead of #includeing from "[browser:trunk/lib/sqlite3/sqlite3.h lib/sqlite3/sqlite3.h]" we now #include <sqlite3.h>. This allows to select either of our own header or the OS provided one at compile time. To accomplish this, however, I had to alter the preprocessor parameters for all build systems and had to move physfs_vfs.[ch] to lib/framework/ (out of lib/sqlite3/ to be precise).
The autotools, win32 raw makefile, Code::Blocks and MSVC build systems should have been updated correctly.
Xcode will still require an update.
NOTE:
Before applying the patch you might need to move lib/sqlite3/physfs_vfs.[ch] to lib/framework/
PS If no one objects I'll commit this in about a week.
Issue migrated from trac:59 at 2022-04-15 17:41:10 -0700
The text was updated successfully, but these errors were encountered: