Fossil SCM
Make sure to add the zlib library to LIBS even when configure is run without any arguments.
Commit
eb0cf27ab7c92bd15b1319f329e787c1484c1c34
Parent
d653a1a854cdfd3…
1 file changed
+11
-4
M
auto.def
+11
-4
| --- auto.def | ||
| +++ auto.def | ||
| @@ -187,12 +187,12 @@ | ||
| 187 | 187 | msg-checking "Checking for $msg..." |
| 188 | 188 | set rc 0 |
| 189 | 189 | if {[is_mingw]} { |
| 190 | 190 | lappend libs -lgdi32 -lwsock32 |
| 191 | 191 | } |
| 192 | - if {[info exists ::zlib_for_ssl]} { | |
| 193 | - lappend libs $::zlib_for_ssl | |
| 192 | + if {[info exists ::zlib_lib]} { | |
| 193 | + lappend libs $::zlib_lib | |
| 194 | 194 | } |
| 195 | 195 | msg-quiet cc-with [list -cflags $cflags -libs $libs] { |
| 196 | 196 | if {[cc-check-includes openssl/ssl.h] && \ |
| 197 | 197 | [cc-check-functions SSL_new]} { |
| 198 | 198 | incr rc |
| @@ -229,11 +229,11 @@ | ||
| 229 | 229 | user-error "The zlib in source tree directory does not exist" |
| 230 | 230 | } |
| 231 | 231 | cc-with [list -cflags "-I$zlibdir -L$zlibdir"] |
| 232 | 232 | define-append EXTRA_CFLAGS -I$zlibdir |
| 233 | 233 | define-append LIBS $zlibdir/libz.a |
| 234 | - set ::zlib_for_ssl $zlibdir/libz.a | |
| 234 | + set ::zlib_lib $zlibdir/libz.a | |
| 235 | 235 | msg-result "Using zlib in source tree" |
| 236 | 236 | } else { |
| 237 | 237 | if {$zlibpath ni {auto ""}} { |
| 238 | 238 | cc-with [list -cflags "-I$zlibpath -L$zlibpath"] |
| 239 | 239 | define-append EXTRA_CFLAGS -I$zlibpath |
| @@ -241,11 +241,11 @@ | ||
| 241 | 241 | msg-result "Using zlib from $zlibpath" |
| 242 | 242 | } |
| 243 | 243 | if {![cc-check-includes zlib.h] || ![check-function-in-lib inflateEnd z]} { |
| 244 | 244 | user-error "zlib not found please install it or specify the location with --with-zlib" |
| 245 | 245 | } |
| 246 | - set ::zlib_for_ssl -lz | |
| 246 | + set ::zlib_lib -lz | |
| 247 | 247 | } |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | 250 | set ssldirs [opt-val with-openssl] |
| 251 | 251 | if {$ssldirs ne "none"} { |
| @@ -299,10 +299,13 @@ | ||
| 299 | 299 | if {[info exists ssllibs]} { |
| 300 | 300 | define-append LIBS $ssllibs |
| 301 | 301 | } else { |
| 302 | 302 | define-append LIBS -lssl -lcrypto |
| 303 | 303 | } |
| 304 | + if {[info exists ::zlib_lib]} { | |
| 305 | + define-append LIBS $::zlib_lib | |
| 306 | + } | |
| 304 | 307 | if {[is_mingw]} { |
| 305 | 308 | define-append LIBS -lgdi32 -lwsock32 |
| 306 | 309 | } |
| 307 | 310 | msg-result "HTTPS support enabled" |
| 308 | 311 | |
| @@ -313,10 +316,14 @@ | ||
| 313 | 316 | } |
| 314 | 317 | } |
| 315 | 318 | } else { |
| 316 | 319 | user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support" |
| 317 | 320 | } |
| 321 | +} else { | |
| 322 | + if {[info exists ::zlib_lib]} { | |
| 323 | + define-append LIBS $::zlib_lib | |
| 324 | + } | |
| 318 | 325 | } |
| 319 | 326 | |
| 320 | 327 | set tclpath [opt-val with-tcl] |
| 321 | 328 | if {$tclpath ne ""} { |
| 322 | 329 | set tclprivatestubs [opt-bool with-tcl-private-stubs] |
| 323 | 330 |
| --- auto.def | |
| +++ auto.def | |
| @@ -187,12 +187,12 @@ | |
| 187 | msg-checking "Checking for $msg..." |
| 188 | set rc 0 |
| 189 | if {[is_mingw]} { |
| 190 | lappend libs -lgdi32 -lwsock32 |
| 191 | } |
| 192 | if {[info exists ::zlib_for_ssl]} { |
| 193 | lappend libs $::zlib_for_ssl |
| 194 | } |
| 195 | msg-quiet cc-with [list -cflags $cflags -libs $libs] { |
| 196 | if {[cc-check-includes openssl/ssl.h] && \ |
| 197 | [cc-check-functions SSL_new]} { |
| 198 | incr rc |
| @@ -229,11 +229,11 @@ | |
| 229 | user-error "The zlib in source tree directory does not exist" |
| 230 | } |
| 231 | cc-with [list -cflags "-I$zlibdir -L$zlibdir"] |
| 232 | define-append EXTRA_CFLAGS -I$zlibdir |
| 233 | define-append LIBS $zlibdir/libz.a |
| 234 | set ::zlib_for_ssl $zlibdir/libz.a |
| 235 | msg-result "Using zlib in source tree" |
| 236 | } else { |
| 237 | if {$zlibpath ni {auto ""}} { |
| 238 | cc-with [list -cflags "-I$zlibpath -L$zlibpath"] |
| 239 | define-append EXTRA_CFLAGS -I$zlibpath |
| @@ -241,11 +241,11 @@ | |
| 241 | msg-result "Using zlib from $zlibpath" |
| 242 | } |
| 243 | if {![cc-check-includes zlib.h] || ![check-function-in-lib inflateEnd z]} { |
| 244 | user-error "zlib not found please install it or specify the location with --with-zlib" |
| 245 | } |
| 246 | set ::zlib_for_ssl -lz |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | set ssldirs [opt-val with-openssl] |
| 251 | if {$ssldirs ne "none"} { |
| @@ -299,10 +299,13 @@ | |
| 299 | if {[info exists ssllibs]} { |
| 300 | define-append LIBS $ssllibs |
| 301 | } else { |
| 302 | define-append LIBS -lssl -lcrypto |
| 303 | } |
| 304 | if {[is_mingw]} { |
| 305 | define-append LIBS -lgdi32 -lwsock32 |
| 306 | } |
| 307 | msg-result "HTTPS support enabled" |
| 308 | |
| @@ -313,10 +316,14 @@ | |
| 313 | } |
| 314 | } |
| 315 | } else { |
| 316 | user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support" |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | set tclpath [opt-val with-tcl] |
| 321 | if {$tclpath ne ""} { |
| 322 | set tclprivatestubs [opt-bool with-tcl-private-stubs] |
| 323 |
| --- auto.def | |
| +++ auto.def | |
| @@ -187,12 +187,12 @@ | |
| 187 | msg-checking "Checking for $msg..." |
| 188 | set rc 0 |
| 189 | if {[is_mingw]} { |
| 190 | lappend libs -lgdi32 -lwsock32 |
| 191 | } |
| 192 | if {[info exists ::zlib_lib]} { |
| 193 | lappend libs $::zlib_lib |
| 194 | } |
| 195 | msg-quiet cc-with [list -cflags $cflags -libs $libs] { |
| 196 | if {[cc-check-includes openssl/ssl.h] && \ |
| 197 | [cc-check-functions SSL_new]} { |
| 198 | incr rc |
| @@ -229,11 +229,11 @@ | |
| 229 | user-error "The zlib in source tree directory does not exist" |
| 230 | } |
| 231 | cc-with [list -cflags "-I$zlibdir -L$zlibdir"] |
| 232 | define-append EXTRA_CFLAGS -I$zlibdir |
| 233 | define-append LIBS $zlibdir/libz.a |
| 234 | set ::zlib_lib $zlibdir/libz.a |
| 235 | msg-result "Using zlib in source tree" |
| 236 | } else { |
| 237 | if {$zlibpath ni {auto ""}} { |
| 238 | cc-with [list -cflags "-I$zlibpath -L$zlibpath"] |
| 239 | define-append EXTRA_CFLAGS -I$zlibpath |
| @@ -241,11 +241,11 @@ | |
| 241 | msg-result "Using zlib from $zlibpath" |
| 242 | } |
| 243 | if {![cc-check-includes zlib.h] || ![check-function-in-lib inflateEnd z]} { |
| 244 | user-error "zlib not found please install it or specify the location with --with-zlib" |
| 245 | } |
| 246 | set ::zlib_lib -lz |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | set ssldirs [opt-val with-openssl] |
| 251 | if {$ssldirs ne "none"} { |
| @@ -299,10 +299,13 @@ | |
| 299 | if {[info exists ssllibs]} { |
| 300 | define-append LIBS $ssllibs |
| 301 | } else { |
| 302 | define-append LIBS -lssl -lcrypto |
| 303 | } |
| 304 | if {[info exists ::zlib_lib]} { |
| 305 | define-append LIBS $::zlib_lib |
| 306 | } |
| 307 | if {[is_mingw]} { |
| 308 | define-append LIBS -lgdi32 -lwsock32 |
| 309 | } |
| 310 | msg-result "HTTPS support enabled" |
| 311 | |
| @@ -313,10 +316,14 @@ | |
| 316 | } |
| 317 | } |
| 318 | } else { |
| 319 | user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support" |
| 320 | } |
| 321 | } else { |
| 322 | if {[info exists ::zlib_lib]} { |
| 323 | define-append LIBS $::zlib_lib |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | set tclpath [opt-val with-tcl] |
| 328 | if {$tclpath ne ""} { |
| 329 | set tclprivatestubs [opt-bool with-tcl-private-stubs] |
| 330 |