Fossil SCM
At configure-time, disable SQLITE_HAVE_ZLIB if zlib does not contain compressBound(). This resolves a build failure on Martin G.'s QNX system.
Commit
ac3e326adf180ee427954b0f32e43135f24542292b3bc7b5ae021dd605a24f29
Parent
921edd2e51aca6a…
2 files changed
+3
+6
+3
| --- Makefile.in | ||
| +++ Makefile.in | ||
| @@ -92,10 +92,13 @@ | ||
| 92 | 92 | MAKE_COMPILATION_DB = @MAKE_COMPILATION_DB@ |
| 93 | 93 | |
| 94 | 94 | .PHONY: all tags |
| 95 | 95 | |
| 96 | 96 | include $(SRCDIR)/main.mk |
| 97 | +SQLITE_OPTIONS += @SQLITE_OPTIONS_EXT@ | |
| 98 | +SHELL_OPTIONS += @SQLITE_OPTIONS_EXT@ | |
| 99 | +# ^^^ must come after main.mk is included | |
| 97 | 100 | |
| 98 | 101 | distclean: clean |
| 99 | 102 | -rm -f autoconfig.h config.log Makefile |
| 100 | 103 | -rm -f cscope.out tags |
| 101 | 104 | |
| 102 | 105 |
| --- Makefile.in | |
| +++ Makefile.in | |
| @@ -92,10 +92,13 @@ | |
| 92 | MAKE_COMPILATION_DB = @MAKE_COMPILATION_DB@ |
| 93 | |
| 94 | .PHONY: all tags |
| 95 | |
| 96 | include $(SRCDIR)/main.mk |
| 97 | |
| 98 | distclean: clean |
| 99 | -rm -f autoconfig.h config.log Makefile |
| 100 | -rm -f cscope.out tags |
| 101 | |
| 102 |
| --- Makefile.in | |
| +++ Makefile.in | |
| @@ -92,10 +92,13 @@ | |
| 92 | MAKE_COMPILATION_DB = @MAKE_COMPILATION_DB@ |
| 93 | |
| 94 | .PHONY: all tags |
| 95 | |
| 96 | include $(SRCDIR)/main.mk |
| 97 | SQLITE_OPTIONS += @SQLITE_OPTIONS_EXT@ |
| 98 | SHELL_OPTIONS += @SQLITE_OPTIONS_EXT@ |
| 99 | # ^^^ must come after main.mk is included |
| 100 | |
| 101 | distclean: clean |
| 102 | -rm -f autoconfig.h config.log Makefile |
| 103 | -rm -f cscope.out tags |
| 104 | |
| 105 |
M
auto.def
+6
| --- auto.def | ||
| +++ auto.def | ||
| @@ -112,10 +112,12 @@ | ||
| 112 | 112 | define USE_LINENOISE 0 |
| 113 | 113 | define USE_MMAN_H 0 |
| 114 | 114 | define USE_SEE 0 |
| 115 | 115 | define SQLITE3_ORIGIN 0 |
| 116 | 116 | # SQLITE3_ORIGIN 0 = src/sqlite3, 1=src/sqlite3-see.c, 2=client-provided |
| 117 | +define SQLITE_OPTIONS_EXT "" | |
| 118 | +# SQLITE_OPTIONS_EXT => build-dependent CFLAGS for sqlite3.c and shell.c | |
| 117 | 119 | |
| 118 | 120 | # Maintain the C89/C90-style order of variable declarations before statements. |
| 119 | 121 | # Check if the compiler supports the respective warning flag. |
| 120 | 122 | if {[cctest -cflags -Wdeclaration-after-statement]} { |
| 121 | 123 | define-append EXTRA_CFLAGS -Wdeclaration-after-statement |
| @@ -401,10 +403,14 @@ | ||
| 401 | 403 | msg-result "Linked to zlib via default library path" |
| 402 | 404 | } else { |
| 403 | 405 | define-append EXTRA_LDFLAGS "$lcheck" |
| 404 | 406 | msg-result "Linked to zlib via $lcheck" |
| 405 | 407 | } |
| 408 | + if {![check-function-in-lib compressBound z]} { | |
| 409 | + puts "Notice: disabling zlib compression in the SQL shell" | |
| 410 | + define-append SQLITE_OPTIONS_EXT {-USQLITE_HAVE_ZLIB} | |
| 411 | + } | |
| 406 | 412 | break |
| 407 | 413 | } |
| 408 | 414 | } |
| 409 | 415 | set ::zlib_lib -lz |
| 410 | 416 | } |
| 411 | 417 |
| --- auto.def | |
| +++ auto.def | |
| @@ -112,10 +112,12 @@ | |
| 112 | define USE_LINENOISE 0 |
| 113 | define USE_MMAN_H 0 |
| 114 | define USE_SEE 0 |
| 115 | define SQLITE3_ORIGIN 0 |
| 116 | # SQLITE3_ORIGIN 0 = src/sqlite3, 1=src/sqlite3-see.c, 2=client-provided |
| 117 | |
| 118 | # Maintain the C89/C90-style order of variable declarations before statements. |
| 119 | # Check if the compiler supports the respective warning flag. |
| 120 | if {[cctest -cflags -Wdeclaration-after-statement]} { |
| 121 | define-append EXTRA_CFLAGS -Wdeclaration-after-statement |
| @@ -401,10 +403,14 @@ | |
| 401 | msg-result "Linked to zlib via default library path" |
| 402 | } else { |
| 403 | define-append EXTRA_LDFLAGS "$lcheck" |
| 404 | msg-result "Linked to zlib via $lcheck" |
| 405 | } |
| 406 | break |
| 407 | } |
| 408 | } |
| 409 | set ::zlib_lib -lz |
| 410 | } |
| 411 |
| --- auto.def | |
| +++ auto.def | |
| @@ -112,10 +112,12 @@ | |
| 112 | define USE_LINENOISE 0 |
| 113 | define USE_MMAN_H 0 |
| 114 | define USE_SEE 0 |
| 115 | define SQLITE3_ORIGIN 0 |
| 116 | # SQLITE3_ORIGIN 0 = src/sqlite3, 1=src/sqlite3-see.c, 2=client-provided |
| 117 | define SQLITE_OPTIONS_EXT "" |
| 118 | # SQLITE_OPTIONS_EXT => build-dependent CFLAGS for sqlite3.c and shell.c |
| 119 | |
| 120 | # Maintain the C89/C90-style order of variable declarations before statements. |
| 121 | # Check if the compiler supports the respective warning flag. |
| 122 | if {[cctest -cflags -Wdeclaration-after-statement]} { |
| 123 | define-append EXTRA_CFLAGS -Wdeclaration-after-statement |
| @@ -401,10 +403,14 @@ | |
| 403 | msg-result "Linked to zlib via default library path" |
| 404 | } else { |
| 405 | define-append EXTRA_LDFLAGS "$lcheck" |
| 406 | msg-result "Linked to zlib via $lcheck" |
| 407 | } |
| 408 | if {![check-function-in-lib compressBound z]} { |
| 409 | puts "Notice: disabling zlib compression in the SQL shell" |
| 410 | define-append SQLITE_OPTIONS_EXT {-USQLITE_HAVE_ZLIB} |
| 411 | } |
| 412 | break |
| 413 | } |
| 414 | } |
| 415 | set ::zlib_lib -lz |
| 416 | } |
| 417 |