Fossil SCM

Use -lz_shared for system zlib on MorphOS

js 2025-04-23 08:08 morphos
Commit d913362cc492b60dc94f24a86f983bb6a8928c27019a3f9e3d9abef356e17203
1 file changed +4 -3
+4 -3
--- auto.def
+++ auto.def
@@ -428,25 +428,26 @@
428428
}
429429
if {![info exists cfound]} {
430430
user-error "zlib.h not found; either install it or specify its location via --with-zlib"
431431
}
432432
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}]} {
434435
if {$lcheck eq ""} {
435436
msg-result "Linked to zlib via default library path"
436437
} else {
437438
define-append EXTRA_LDFLAGS "$lcheck"
438439
msg-result "Linked to zlib via $lcheck"
439440
}
440
- if {![check-function-in-lib compressBound z]} {
441
+ if {![check-function-in-lib compressBound $lib]} {
441442
puts "Notice: disabling zlib compression in the SQL shell"
442443
define-append SQLITE_OPTIONS_EXT {-USQLITE_HAVE_ZLIB}
443444
}
444445
break
445446
}
446447
}
447
- set ::zlib_lib -lz
448
+ set ::zlib_lib "-l$lib"
448449
}
449450
}; # handle-zlib
450451
handle-zlib
451452
452453
#
453454
--- 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

Keyboard Shortcuts

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