Fossil SCM

Make sure to add the zlib library to LIBS even when configure is run without any arguments.

mistachkin 2016-01-31 00:51 trunk
Commit eb0cf27ab7c92bd15b1319f329e787c1484c1c34
1 file changed +11 -4
+11 -4
--- auto.def
+++ auto.def
@@ -187,12 +187,12 @@
187187
msg-checking "Checking for $msg..."
188188
set rc 0
189189
if {[is_mingw]} {
190190
lappend libs -lgdi32 -lwsock32
191191
}
192
- if {[info exists ::zlib_for_ssl]} {
193
- lappend libs $::zlib_for_ssl
192
+ if {[info exists ::zlib_lib]} {
193
+ lappend libs $::zlib_lib
194194
}
195195
msg-quiet cc-with [list -cflags $cflags -libs $libs] {
196196
if {[cc-check-includes openssl/ssl.h] && \
197197
[cc-check-functions SSL_new]} {
198198
incr rc
@@ -229,11 +229,11 @@
229229
user-error "The zlib in source tree directory does not exist"
230230
}
231231
cc-with [list -cflags "-I$zlibdir -L$zlibdir"]
232232
define-append EXTRA_CFLAGS -I$zlibdir
233233
define-append LIBS $zlibdir/libz.a
234
- set ::zlib_for_ssl $zlibdir/libz.a
234
+ set ::zlib_lib $zlibdir/libz.a
235235
msg-result "Using zlib in source tree"
236236
} else {
237237
if {$zlibpath ni {auto ""}} {
238238
cc-with [list -cflags "-I$zlibpath -L$zlibpath"]
239239
define-append EXTRA_CFLAGS -I$zlibpath
@@ -241,11 +241,11 @@
241241
msg-result "Using zlib from $zlibpath"
242242
}
243243
if {![cc-check-includes zlib.h] || ![check-function-in-lib inflateEnd z]} {
244244
user-error "zlib not found please install it or specify the location with --with-zlib"
245245
}
246
- set ::zlib_for_ssl -lz
246
+ set ::zlib_lib -lz
247247
}
248248
}
249249
250250
set ssldirs [opt-val with-openssl]
251251
if {$ssldirs ne "none"} {
@@ -299,10 +299,13 @@
299299
if {[info exists ssllibs]} {
300300
define-append LIBS $ssllibs
301301
} else {
302302
define-append LIBS -lssl -lcrypto
303303
}
304
+ if {[info exists ::zlib_lib]} {
305
+ define-append LIBS $::zlib_lib
306
+ }
304307
if {[is_mingw]} {
305308
define-append LIBS -lgdi32 -lwsock32
306309
}
307310
msg-result "HTTPS support enabled"
308311
@@ -313,10 +316,14 @@
313316
}
314317
}
315318
} else {
316319
user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support"
317320
}
321
+} else {
322
+ if {[info exists ::zlib_lib]} {
323
+ define-append LIBS $::zlib_lib
324
+ }
318325
}
319326
320327
set tclpath [opt-val with-tcl]
321328
if {$tclpath ne ""} {
322329
set tclprivatestubs [opt-bool with-tcl-private-stubs]
323330
--- 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

Keyboard Shortcuts

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