Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | From ede5db83e38cc8ad8c9be291cd8985f7ad99f291 Mon Sep 17 00:00:00 2001 |
| 2 | From: Andre McCurdy <armccurdy@gmail.com> |
| 3 | Date: Tue, 16 Feb 2016 14:00:00 -0800 |
| 4 | Subject: [PATCH] fix --disable-static-shell |
| 5 | |
| 6 | Upstream sqlite seems to be moving further and further away from |
| 7 | allowing the sqlite3 command line tool to be dynamically linked with |
| 8 | sqlite. |
| 9 | |
| 10 | The --disable-static-shell configure option added in 3.10.0 no longer |
| 11 | has any effect in 3.11.0. For now patch things up and make it work. |
| 12 | |
| 13 | Upstream-Status: Pending |
| 14 | |
| 15 | Signed-off-by: Andre McCurdy <armccurdy@gmail.com> |
| 16 | --- |
| 17 | Makefile.am | 13 +++++++++++-- |
| 18 | configure.ac | 2 +- |
| 19 | 2 files changed, 12 insertions(+), 3 deletions(-) |
| 20 | |
| 21 | diff --git a/Makefile.am b/Makefile.am |
| 22 | index 0e09cfc..608c0fd 100644 |
| 23 | --- a/Makefile.am |
| 24 | +++ b/Makefile.am |
| 25 | @@ -6,9 +6,18 @@ libsqlite3_la_SOURCES = sqlite3.c |
| 26 | libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8 |
| 27 | |
| 28 | bin_PROGRAMS = sqlite3 |
| 29 | -sqlite3_SOURCES = shell.c sqlite3.c sqlite3.h |
| 30 | -sqlite3_LDADD = @READLINE_LIBS@ |
| 31 | +sqlite3_SOURCES = shell.c sqlite3.h |
| 32 | +EXTRA_sqlite3_SOURCES = sqlite3.c |
| 33 | +sqlite3_LDADD = @EXTRA_SHELL_OBJ@ @READLINE_LIBS@ |
| 34 | sqlite3_DEPENDENCIES = @EXTRA_SHELL_OBJ@ |
| 35 | + |
| 36 | +# Warning: Adding SQLITE_ENABLE_EXPLAIN_COMMENTS to sqlite3_CFLAGS doesn't |
| 37 | +# actually have any effect if we link the sqlite3 command line tool with the |
| 38 | +# libsqlite3.so shared library (which will contain a version of sqlite3.c |
| 39 | +# compiled with the default AM_CFLAGS above). If SQLITE_ENABLE_EXPLAIN_COMMENTS |
| 40 | +# debug is required, then sqlite3 must not be configured with |
| 41 | +# --disable-static-shell |
| 42 | + |
| 43 | sqlite3_CFLAGS = $(AM_CFLAGS) -DSQLITE_ENABLE_EXPLAIN_COMMENTS |
| 44 | |
| 45 | include_HEADERS = sqlite3.h sqlite3ext.h |
| 46 | diff --git a/configure.ac b/configure.ac |
| 47 | index 8e7fd69..ada559e 100644 |
| 48 | --- a/configure.ac |
| 49 | +++ b/configure.ac |
| 50 | @@ -130,7 +130,7 @@ AC_ARG_ENABLE(static-shell, [AS_HELP_STRING( |
| 51 | [statically link libsqlite3 into shell tool [default=yes]])], |
| 52 | [], [enable_static_shell=yes]) |
| 53 | if test x"$enable_static_shell" == "xyes"; then |
| 54 | - EXTRA_SHELL_OBJ=sqlite3.$OBJEXT |
| 55 | + EXTRA_SHELL_OBJ=sqlite3-sqlite3.$OBJEXT |
| 56 | else |
| 57 | EXTRA_SHELL_OBJ=libsqlite3.la |
| 58 | fi |
| 59 | -- |
| 60 | 1.9.1 |
| 61 | |