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.

stephan 2024-09-26 17:47 trunk
Commit ac3e326adf180ee427954b0f32e43135f24542292b3bc7b5ae021dd605a24f29
2 files changed +3 +6
--- Makefile.in
+++ Makefile.in
@@ -92,10 +92,13 @@
9292
MAKE_COMPILATION_DB = @MAKE_COMPILATION_DB@
9393
9494
.PHONY: all tags
9595
9696
include $(SRCDIR)/main.mk
97
+SQLITE_OPTIONS += @SQLITE_OPTIONS_EXT@
98
+SHELL_OPTIONS += @SQLITE_OPTIONS_EXT@
99
+# ^^^ must come after main.mk is included
97100
98101
distclean: clean
99102
-rm -f autoconfig.h config.log Makefile
100103
-rm -f cscope.out tags
101104
102105
--- 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
+6
--- auto.def
+++ auto.def
@@ -112,10 +112,12 @@
112112
define USE_LINENOISE 0
113113
define USE_MMAN_H 0
114114
define USE_SEE 0
115115
define SQLITE3_ORIGIN 0
116116
# 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
117119
118120
# Maintain the C89/C90-style order of variable declarations before statements.
119121
# Check if the compiler supports the respective warning flag.
120122
if {[cctest -cflags -Wdeclaration-after-statement]} {
121123
define-append EXTRA_CFLAGS -Wdeclaration-after-statement
@@ -401,10 +403,14 @@
401403
msg-result "Linked to zlib via default library path"
402404
} else {
403405
define-append EXTRA_LDFLAGS "$lcheck"
404406
msg-result "Linked to zlib via $lcheck"
405407
}
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
+ }
406412
break
407413
}
408414
}
409415
set ::zlib_lib -lz
410416
}
411417
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button