Fossil SCM
auto.def: Fail on error if zlib wasn't detected; also pass working zlib flags to later configure probes
Commit
f78e530b62a4337f41ee004d5cb13d59b0ab0e7e2546cc6aef32bb178619e0b6
Parent
14716af24180686…
1 file changed
+10
M
auto.def
+10
| --- auto.def | ||
| +++ auto.def | ||
| @@ -430,17 +430,27 @@ | ||
| 430 | 430 | msg-result "Linked to zlib via default library path" |
| 431 | 431 | } else { |
| 432 | 432 | define-append EXTRA_LDFLAGS "$lcheck" |
| 433 | 433 | msg-result "Linked to zlib via $lcheck" |
| 434 | 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 | |
| 435 | 442 | if {![check-function-in-lib compressBound z]} { |
| 436 | 443 | puts "Notice: disabling zlib compression in the SQL shell" |
| 437 | 444 | define-append SQLITE_OPTIONS_EXT {-USQLITE_HAVE_ZLIB} |
| 438 | 445 | } |
| 439 | 446 | break |
| 440 | 447 | } |
| 441 | 448 | } |
| 449 | + if {![info exists lfound]} { | |
| 450 | + user-error "zlib not linkable; either install it or specify its location via --with-zlib" | |
| 451 | + } | |
| 442 | 452 | set ::zlib_lib -lz |
| 443 | 453 | } |
| 444 | 454 | }; # handle-zlib |
| 445 | 455 | handle-zlib |
| 446 | 456 | |
| 447 | 457 |
| --- 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 |