Fossil SCM

By default, use the automatic zlib detection. When --with-zlib=tree is used, use zlib from the source tree.

mistachkin 2016-01-11 22:47 trunk merge
Commit 8435adc47150796470a75856d225b67ecb3c2264
1 file changed +23 -14
+23 -14
--- auto.def
+++ auto.def
@@ -4,11 +4,12 @@
44
55
options {
66
with-openssl:path|auto|none
77
=> {Look for OpenSSL in the given path, or auto or none}
88
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}
1011
with-exec-rel-paths=0
1112
=> {Enable relative paths for external diff/gdiff}
1213
with-legacy-mv-rm=0 => {Enable legacy behavior for mv/rm (skip checkout files)}
1314
with-th1-docs=0 => {Enable TH1 for embedded documentation pages}
1415
with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages}
@@ -280,24 +281,32 @@
280281
user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support"
281282
}
282283
}
283284
284285
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"
287288
} 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
+ }
299308
}
300309
301310
# Network functions require libraries on some systems
302311
cc-check-function-in-lib gethostbyname nsl
303312
if {![cc-check-function-in-lib socket {socket network}]} {
304313
--- 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

Keyboard Shortcuts

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