Fossil SCM
By default, use the automatic zlib detection. When --with-zlib=tree is used, use zlib from the source tree.
Commit
8435adc47150796470a75856d225b67ecb3c2264
Parent
3728aa62ab9ea46…
1 file changed
+23
-14
M
auto.def
+23
-14
| --- auto.def | ||
| +++ auto.def | ||
| @@ -4,11 +4,12 @@ | ||
| 4 | 4 | |
| 5 | 5 | options { |
| 6 | 6 | with-openssl:path|auto|none |
| 7 | 7 | => {Look for OpenSSL in the given path, or auto or none} |
| 8 | 8 | with-miniz=0 => {Use miniz from the source tree} |
| 9 | - with-zlib:path => {Look for zlib in the given path} | |
| 9 | + with-zlib:path|auto|tree | |
| 10 | + => {Look for zlib in the given path, or auto or in the source tree} | |
| 10 | 11 | with-exec-rel-paths=0 |
| 11 | 12 | => {Enable relative paths for external diff/gdiff} |
| 12 | 13 | with-legacy-mv-rm=0 => {Enable legacy behavior for mv/rm (skip checkout files)} |
| 13 | 14 | with-th1-docs=0 => {Enable TH1 for embedded documentation pages} |
| 14 | 15 | with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages} |
| @@ -280,24 +281,32 @@ | ||
| 280 | 281 | user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support" |
| 281 | 282 | } |
| 282 | 283 | } |
| 283 | 284 | |
| 284 | 285 | if {[opt-bool with-miniz]} { |
| 285 | - define FOSSIL_ENABLE_MINIZ 1 | |
| 286 | - msg-result "Using miniz for compression" | |
| 286 | + define FOSSIL_ENABLE_MINIZ 1 | |
| 287 | + msg-result "Using miniz for compression" | |
| 287 | 288 | } else { |
| 288 | - # Check for zlib, using the given location if specified | |
| 289 | - set zlibpath [opt-val with-zlib] | |
| 290 | - if {$zlibpath ne ""} { | |
| 291 | - cc-with [list -cflags "-I$zlibpath -L$zlibpath"] | |
| 292 | - define-append EXTRA_CFLAGS -I$zlibpath | |
| 293 | - define-append EXTRA_LDFLAGS -L$zlibpath | |
| 294 | - msg-result "Using zlib from $zlibpath" | |
| 295 | - } | |
| 296 | - if {![cc-check-includes zlib.h] || ![cc-check-function-in-lib inflateEnd z]} { | |
| 297 | - user-error "zlib not found please install it or specify the location with --with-zlib" | |
| 298 | - } | |
| 289 | + # Check for zlib, using the given location if specified | |
| 290 | + set zlibpath [opt-val with-zlib] | |
| 291 | + if {$zlibpath eq "tree"} { | |
| 292 | + set zlibdir [file dirname $autosetup(dir)]/compat/zlib | |
| 293 | + cc-with [list -cflags "-I$zlibdir"] | |
| 294 | + define-append EXTRA_CFLAGS -I$zlibdir | |
| 295 | + define-append LIBS $zlibdir/libz.a | |
| 296 | + msg-result "Using zlib in source tree" | |
| 297 | + } else { | |
| 298 | + if {$zlibpath ni {auto ""}} { | |
| 299 | + cc-with [list -cflags "-I$zlibpath -L$zlibpath"] | |
| 300 | + define-append EXTRA_CFLAGS -I$zlibpath | |
| 301 | + define-append EXTRA_LDFLAGS -L$zlibpath | |
| 302 | + msg-result "Using zlib from $zlibpath" | |
| 303 | + } | |
| 304 | + if {![cc-check-includes zlib.h] || ![cc-check-function-in-lib inflateEnd z]} { | |
| 305 | + user-error "zlib not found please install it or specify the location with --with-zlib" | |
| 306 | + } | |
| 307 | + } | |
| 299 | 308 | } |
| 300 | 309 | |
| 301 | 310 | # Network functions require libraries on some systems |
| 302 | 311 | cc-check-function-in-lib gethostbyname nsl |
| 303 | 312 | if {![cc-check-function-in-lib socket {socket network}]} { |
| 304 | 313 |
| --- auto.def | |
| +++ auto.def | |
| @@ -4,11 +4,12 @@ | |
| 4 | |
| 5 | options { |
| 6 | with-openssl:path|auto|none |
| 7 | => {Look for OpenSSL in the given path, or auto or none} |
| 8 | with-miniz=0 => {Use miniz from the source tree} |
| 9 | with-zlib:path => {Look for zlib in the given path} |
| 10 | with-exec-rel-paths=0 |
| 11 | => {Enable relative paths for external diff/gdiff} |
| 12 | with-legacy-mv-rm=0 => {Enable legacy behavior for mv/rm (skip checkout files)} |
| 13 | with-th1-docs=0 => {Enable TH1 for embedded documentation pages} |
| 14 | with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages} |
| @@ -280,24 +281,32 @@ | |
| 280 | user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support" |
| 281 | } |
| 282 | } |
| 283 | |
| 284 | if {[opt-bool with-miniz]} { |
| 285 | define FOSSIL_ENABLE_MINIZ 1 |
| 286 | msg-result "Using miniz for compression" |
| 287 | } else { |
| 288 | # Check for zlib, using the given location if specified |
| 289 | set zlibpath [opt-val with-zlib] |
| 290 | if {$zlibpath ne ""} { |
| 291 | cc-with [list -cflags "-I$zlibpath -L$zlibpath"] |
| 292 | define-append EXTRA_CFLAGS -I$zlibpath |
| 293 | define-append EXTRA_LDFLAGS -L$zlibpath |
| 294 | msg-result "Using zlib from $zlibpath" |
| 295 | } |
| 296 | if {![cc-check-includes zlib.h] || ![cc-check-function-in-lib inflateEnd z]} { |
| 297 | user-error "zlib not found please install it or specify the location with --with-zlib" |
| 298 | } |
| 299 | } |
| 300 | |
| 301 | # Network functions require libraries on some systems |
| 302 | cc-check-function-in-lib gethostbyname nsl |
| 303 | if {![cc-check-function-in-lib socket {socket network}]} { |
| 304 |
| --- auto.def | |
| +++ auto.def | |
| @@ -4,11 +4,12 @@ | |
| 4 | |
| 5 | options { |
| 6 | with-openssl:path|auto|none |
| 7 | => {Look for OpenSSL in the given path, or auto or none} |
| 8 | with-miniz=0 => {Use miniz from the source tree} |
| 9 | with-zlib:path|auto|tree |
| 10 | => {Look for zlib in the given path, or auto or in the source tree} |
| 11 | with-exec-rel-paths=0 |
| 12 | => {Enable relative paths for external diff/gdiff} |
| 13 | with-legacy-mv-rm=0 => {Enable legacy behavior for mv/rm (skip checkout files)} |
| 14 | with-th1-docs=0 => {Enable TH1 for embedded documentation pages} |
| 15 | with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages} |
| @@ -280,24 +281,32 @@ | |
| 281 | user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support" |
| 282 | } |
| 283 | } |
| 284 | |
| 285 | if {[opt-bool with-miniz]} { |
| 286 | define FOSSIL_ENABLE_MINIZ 1 |
| 287 | msg-result "Using miniz for compression" |
| 288 | } else { |
| 289 | # Check for zlib, using the given location if specified |
| 290 | set zlibpath [opt-val with-zlib] |
| 291 | if {$zlibpath eq "tree"} { |
| 292 | set zlibdir [file dirname $autosetup(dir)]/compat/zlib |
| 293 | cc-with [list -cflags "-I$zlibdir"] |
| 294 | define-append EXTRA_CFLAGS -I$zlibdir |
| 295 | define-append LIBS $zlibdir/libz.a |
| 296 | msg-result "Using zlib in source tree" |
| 297 | } else { |
| 298 | if {$zlibpath ni {auto ""}} { |
| 299 | cc-with [list -cflags "-I$zlibpath -L$zlibpath"] |
| 300 | define-append EXTRA_CFLAGS -I$zlibpath |
| 301 | define-append EXTRA_LDFLAGS -L$zlibpath |
| 302 | msg-result "Using zlib from $zlibpath" |
| 303 | } |
| 304 | if {![cc-check-includes zlib.h] || ![cc-check-function-in-lib inflateEnd z]} { |
| 305 | user-error "zlib not found please install it or specify the location with --with-zlib" |
| 306 | } |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | # Network functions require libraries on some systems |
| 311 | cc-check-function-in-lib gethostbyname nsl |
| 312 | if {![cc-check-function-in-lib socket {socket network}]} { |
| 313 |