Fossil SCM

auto.def: Fail on error if zlib wasn't detected; also pass working zlib flags to later configure probes

danshearer 2026-08-17 10:45 UTC trunk
Commit f78e530b62a4337f41ee004d5cb13d59b0ab0e7e2546cc6aef32bb178619e0b6
1 file changed +10
+10
--- auto.def
+++ auto.def
@@ -430,17 +430,27 @@
430430
msg-result "Linked to zlib via default library path"
431431
} else {
432432
define-append EXTRA_LDFLAGS "$lcheck"
433433
msg-result "Linked to zlib via $lcheck"
434434
}
435
+ # Keep the flags that worked for every later probe too, in the
436
+ # persistent form of cc-with, as the --with-zlib=tree branch above
437
+ # already does. check-for-openssl appends $::zlib_lib to its own link
438
+ # test, and without these it links a bare -lz against a path autosetup
439
+ # has not been told about, then reports OpenSSL as missing.
440
+ cc-with [list -cflags "$cfound $lcheck"]
441
+ set lfound $lcheck
435442
if {![check-function-in-lib compressBound z]} {
436443
puts "Notice: disabling zlib compression in the SQL shell"
437444
define-append SQLITE_OPTIONS_EXT {-USQLITE_HAVE_ZLIB}
438445
}
439446
break
440447
}
441448
}
449
+ if {![info exists lfound]} {
450
+ user-error "zlib not linkable; either install it or specify its location via --with-zlib"
451
+ }
442452
set ::zlib_lib -lz
443453
}
444454
}; # handle-zlib
445455
handle-zlib
446456
447457
--- auto.def
+++ auto.def
@@ -430,17 +430,27 @@
430 msg-result "Linked to zlib via default library path"
431 } else {
432 define-append EXTRA_LDFLAGS "$lcheck"
433 msg-result "Linked to zlib via $lcheck"
434 }
 
 
 
 
 
 
 
435 if {![check-function-in-lib compressBound z]} {
436 puts "Notice: disabling zlib compression in the SQL shell"
437 define-append SQLITE_OPTIONS_EXT {-USQLITE_HAVE_ZLIB}
438 }
439 break
440 }
441 }
 
 
 
442 set ::zlib_lib -lz
443 }
444 }; # handle-zlib
445 handle-zlib
446
447
--- auto.def
+++ auto.def
@@ -430,17 +430,27 @@
430 msg-result "Linked to zlib via default library path"
431 } else {
432 define-append EXTRA_LDFLAGS "$lcheck"
433 msg-result "Linked to zlib via $lcheck"
434 }
435 # Keep the flags that worked for every later probe too, in the
436 # persistent form of cc-with, as the --with-zlib=tree branch above
437 # already does. check-for-openssl appends $::zlib_lib to its own link
438 # test, and without these it links a bare -lz against a path autosetup
439 # has not been told about, then reports OpenSSL as missing.
440 cc-with [list -cflags "$cfound $lcheck"]
441 set lfound $lcheck
442 if {![check-function-in-lib compressBound z]} {
443 puts "Notice: disabling zlib compression in the SQL shell"
444 define-append SQLITE_OPTIONS_EXT {-USQLITE_HAVE_ZLIB}
445 }
446 break
447 }
448 }
449 if {![info exists lfound]} {
450 user-error "zlib not linkable; either install it or specify its location via --with-zlib"
451 }
452 set ::zlib_lib -lz
453 }
454 }; # handle-zlib
455 handle-zlib
456
457

Keyboard Shortcuts

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