Fossil SCM
More zlib detection before OpenSSL detection.
Commit
fd2842c08ab747a3616a2cc067b031d212f6024e
Parent
acbee54e8ba8a3b…
1 file changed
+25
-25
M
auto.def
+25
-25
| --- auto.def | ||
| +++ auto.def | ||
| @@ -230,10 +230,35 @@ | ||
| 230 | 230 | } else { |
| 231 | 231 | msg-result "no" |
| 232 | 232 | return 0 |
| 233 | 233 | } |
| 234 | 234 | } |
| 235 | + | |
| 236 | +if {[opt-bool with-miniz]} { | |
| 237 | + define FOSSIL_ENABLE_MINIZ 1 | |
| 238 | + msg-result "Using miniz for compression" | |
| 239 | +} else { | |
| 240 | + # Check for zlib, using the given location if specified | |
| 241 | + set zlibpath [opt-val with-zlib] | |
| 242 | + if {$zlibpath eq "tree"} { | |
| 243 | + set zlibdir [file dirname $autosetup(dir)]/compat/zlib | |
| 244 | + cc-with [list -cflags "-I$zlibdir"] | |
| 245 | + define-append EXTRA_CFLAGS -I$zlibdir | |
| 246 | + define-append LIBS $zlibdir/libz.a | |
| 247 | + msg-result "Using zlib in source tree" | |
| 248 | + } else { | |
| 249 | + if {$zlibpath ni {auto ""}} { | |
| 250 | + cc-with [list -cflags "-I$zlibpath -L$zlibpath"] | |
| 251 | + define-append EXTRA_CFLAGS -I$zlibpath | |
| 252 | + define-append EXTRA_LDFLAGS -L$zlibpath | |
| 253 | + msg-result "Using zlib from $zlibpath" | |
| 254 | + } | |
| 255 | + if {![cc-check-includes zlib.h] || ![cc-check-function-in-lib inflateEnd z]} { | |
| 256 | + user-error "zlib not found please install it or specify the location with --with-zlib" | |
| 257 | + } | |
| 258 | + } | |
| 259 | +} | |
| 235 | 260 | |
| 236 | 261 | set ssldirs [opt-val with-openssl] |
| 237 | 262 | if {$ssldirs ne "none"} { |
| 238 | 263 | set found 0 |
| 239 | 264 | if {$ssldirs in {auto ""}} { |
| @@ -280,35 +305,10 @@ | ||
| 280 | 305 | } else { |
| 281 | 306 | user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support" |
| 282 | 307 | } |
| 283 | 308 | } |
| 284 | 309 | |
| 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 | 310 | # Network functions require libraries on some systems |
| 311 | 311 | cc-check-function-in-lib gethostbyname nsl |
| 312 | 312 | if {![cc-check-function-in-lib socket {socket network}]} { |
| 313 | 313 | # Last resort, may be Windows |
| 314 | 314 | if {[string match *mingw* [get-define host]]} { |
| 315 | 315 |
| --- auto.def | |
| +++ auto.def | |
| @@ -230,10 +230,35 @@ | |
| 230 | } else { |
| 231 | msg-result "no" |
| 232 | return 0 |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | set ssldirs [opt-val with-openssl] |
| 237 | if {$ssldirs ne "none"} { |
| 238 | set found 0 |
| 239 | if {$ssldirs in {auto ""}} { |
| @@ -280,35 +305,10 @@ | |
| 280 | } else { |
| 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 | # Last resort, may be Windows |
| 314 | if {[string match *mingw* [get-define host]]} { |
| 315 |
| --- auto.def | |
| +++ auto.def | |
| @@ -230,10 +230,35 @@ | |
| 230 | } else { |
| 231 | msg-result "no" |
| 232 | return 0 |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | if {[opt-bool with-miniz]} { |
| 237 | define FOSSIL_ENABLE_MINIZ 1 |
| 238 | msg-result "Using miniz for compression" |
| 239 | } else { |
| 240 | # Check for zlib, using the given location if specified |
| 241 | set zlibpath [opt-val with-zlib] |
| 242 | if {$zlibpath eq "tree"} { |
| 243 | set zlibdir [file dirname $autosetup(dir)]/compat/zlib |
| 244 | cc-with [list -cflags "-I$zlibdir"] |
| 245 | define-append EXTRA_CFLAGS -I$zlibdir |
| 246 | define-append LIBS $zlibdir/libz.a |
| 247 | msg-result "Using zlib in source tree" |
| 248 | } else { |
| 249 | if {$zlibpath ni {auto ""}} { |
| 250 | cc-with [list -cflags "-I$zlibpath -L$zlibpath"] |
| 251 | define-append EXTRA_CFLAGS -I$zlibpath |
| 252 | define-append EXTRA_LDFLAGS -L$zlibpath |
| 253 | msg-result "Using zlib from $zlibpath" |
| 254 | } |
| 255 | if {![cc-check-includes zlib.h] || ![cc-check-function-in-lib inflateEnd z]} { |
| 256 | user-error "zlib not found please install it or specify the location with --with-zlib" |
| 257 | } |
| 258 | } |
| 259 | } |
| 260 | |
| 261 | set ssldirs [opt-val with-openssl] |
| 262 | if {$ssldirs ne "none"} { |
| 263 | set found 0 |
| 264 | if {$ssldirs in {auto ""}} { |
| @@ -280,35 +305,10 @@ | |
| 305 | } else { |
| 306 | user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support" |
| 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 | # Last resort, may be Windows |
| 314 | if {[string match *mingw* [get-define host]]} { |
| 315 |