Fossil SCM
Use -lz_shared for system zlib on MorphOS
Commit
d913362cc492b60dc94f24a86f983bb6a8928c27019a3f9e3d9abef356e17203
Parent
1ff1a55d8cb8552…
1 file changed
+4
-3
M
auto.def
+4
-3
| --- auto.def | ||
| +++ auto.def | ||
| @@ -428,25 +428,26 @@ | ||
| 428 | 428 | } |
| 429 | 429 | if {![info exists cfound]} { |
| 430 | 430 | user-error "zlib.h not found; either install it or specify its location via --with-zlib" |
| 431 | 431 | } |
| 432 | 432 | foreach lcheck [lreverse $ldtry] { |
| 433 | - if {[cc-with [list -cflags "$cfound $lcheck"] {check-function-in-lib inflateEnd z}]} { | |
| 433 | + if {[is_morphos] && $lcheck eq ""} {set lib z_shared} {set lib z} | |
| 434 | + if {[cc-with [list -cflags "$cfound $lcheck"] {check-function-in-lib inflateEnd $lib}]} { | |
| 434 | 435 | if {$lcheck eq ""} { |
| 435 | 436 | msg-result "Linked to zlib via default library path" |
| 436 | 437 | } else { |
| 437 | 438 | define-append EXTRA_LDFLAGS "$lcheck" |
| 438 | 439 | msg-result "Linked to zlib via $lcheck" |
| 439 | 440 | } |
| 440 | - if {![check-function-in-lib compressBound z]} { | |
| 441 | + if {![check-function-in-lib compressBound $lib]} { | |
| 441 | 442 | puts "Notice: disabling zlib compression in the SQL shell" |
| 442 | 443 | define-append SQLITE_OPTIONS_EXT {-USQLITE_HAVE_ZLIB} |
| 443 | 444 | } |
| 444 | 445 | break |
| 445 | 446 | } |
| 446 | 447 | } |
| 447 | - set ::zlib_lib -lz | |
| 448 | + set ::zlib_lib "-l$lib" | |
| 448 | 449 | } |
| 449 | 450 | }; # handle-zlib |
| 450 | 451 | handle-zlib |
| 451 | 452 | |
| 452 | 453 | # |
| 453 | 454 |
| --- auto.def | |
| +++ auto.def | |
| @@ -428,25 +428,26 @@ | |
| 428 | } |
| 429 | if {![info exists cfound]} { |
| 430 | user-error "zlib.h not found; either install it or specify its location via --with-zlib" |
| 431 | } |
| 432 | foreach lcheck [lreverse $ldtry] { |
| 433 | if {[cc-with [list -cflags "$cfound $lcheck"] {check-function-in-lib inflateEnd z}]} { |
| 434 | if {$lcheck eq ""} { |
| 435 | msg-result "Linked to zlib via default library path" |
| 436 | } else { |
| 437 | define-append EXTRA_LDFLAGS "$lcheck" |
| 438 | msg-result "Linked to zlib via $lcheck" |
| 439 | } |
| 440 | if {![check-function-in-lib compressBound z]} { |
| 441 | puts "Notice: disabling zlib compression in the SQL shell" |
| 442 | define-append SQLITE_OPTIONS_EXT {-USQLITE_HAVE_ZLIB} |
| 443 | } |
| 444 | break |
| 445 | } |
| 446 | } |
| 447 | set ::zlib_lib -lz |
| 448 | } |
| 449 | }; # handle-zlib |
| 450 | handle-zlib |
| 451 | |
| 452 | # |
| 453 |
| --- auto.def | |
| +++ auto.def | |
| @@ -428,25 +428,26 @@ | |
| 428 | } |
| 429 | if {![info exists cfound]} { |
| 430 | user-error "zlib.h not found; either install it or specify its location via --with-zlib" |
| 431 | } |
| 432 | foreach lcheck [lreverse $ldtry] { |
| 433 | if {[is_morphos] && $lcheck eq ""} {set lib z_shared} {set lib z} |
| 434 | if {[cc-with [list -cflags "$cfound $lcheck"] {check-function-in-lib inflateEnd $lib}]} { |
| 435 | if {$lcheck eq ""} { |
| 436 | msg-result "Linked to zlib via default library path" |
| 437 | } else { |
| 438 | define-append EXTRA_LDFLAGS "$lcheck" |
| 439 | msg-result "Linked to zlib via $lcheck" |
| 440 | } |
| 441 | if {![check-function-in-lib compressBound $lib]} { |
| 442 | puts "Notice: disabling zlib compression in the SQL shell" |
| 443 | define-append SQLITE_OPTIONS_EXT {-USQLITE_HAVE_ZLIB} |
| 444 | } |
| 445 | break |
| 446 | } |
| 447 | } |
| 448 | set ::zlib_lib "-l$lib" |
| 449 | } |
| 450 | }; # handle-zlib |
| 451 | handle-zlib |
| 452 | |
| 453 | # |
| 454 |