Fossil SCM

By default, force the zlib in the source tree to be used.

mistachkin 2016-01-11 22:17 UTC trunk
Commit 7b4153ff03982b8afc9acb3631b677916d5c749f
1 file changed +22 -14
+22 -14
--- auto.def
+++ auto.def
@@ -4,11 +4,11 @@
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 => {Look for zlib in the given path or in the source tree}
1010
with-exec-rel-paths=0
1111
=> {Enable relative paths for external diff/gdiff}
1212
with-legacy-mv-rm=0 => {Enable legacy behavior for mv/rm (skip checkout files)}
1313
with-th1-docs=0 => {Enable TH1 for embedded documentation pages}
1414
with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages}
@@ -280,24 +280,32 @@
280280
user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support"
281281
}
282282
}
283283
284284
if {[opt-bool with-miniz]} {
285
- define FOSSIL_ENABLE_MINIZ 1
286
- msg-result "Using miniz for compression"
285
+ define FOSSIL_ENABLE_MINIZ 1
286
+ msg-result "Using miniz for compression"
287287
} 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
- }
288
+ # Check for zlib, using the given location if specified
289
+ set zlibpath [opt-val with-zlib]
290
+ if {$zlibpath in {auto ""}} {
291
+ set zlibdir [file dirname $autosetup(dir)]/compat/zlib
292
+ cc-with [list -cflags "-I$zlibdir"]
293
+ define-append EXTRA_CFLAGS -I$zlibdir
294
+ define-append LIBS $zlibdir/libz.a
295
+ msg-result "Using zlib in source tree"
296
+ } else {
297
+ if {$zlibpath ne ""} {
298
+ cc-with [list -cflags "-I$zlibpath -L$zlibpath"]
299
+ define-append EXTRA_CFLAGS -I$zlibpath
300
+ define-append EXTRA_LDFLAGS -L$zlibpath
301
+ msg-result "Using zlib from $zlibpath"
302
+ }
303
+ if {![cc-check-includes zlib.h] || ![cc-check-function-in-lib inflateEnd z]} {
304
+ user-error "zlib not found please install it or specify the location with --with-zlib"
305
+ }
306
+ }
299307
}
300308
301309
# Network functions require libraries on some systems
302310
cc-check-function-in-lib gethostbyname nsl
303311
if {![cc-check-function-in-lib socket {socket network}]} {
304312
--- auto.def
+++ auto.def
@@ -4,11 +4,11 @@
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 +280,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,11 @@
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 => {Look for zlib in the given path or in the source tree}
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 +280,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 in {auto ""}} {
291 set zlibdir [file dirname $autosetup(dir)]/compat/zlib
292 cc-with [list -cflags "-I$zlibdir"]
293 define-append EXTRA_CFLAGS -I$zlibdir
294 define-append LIBS $zlibdir/libz.a
295 msg-result "Using zlib in source tree"
296 } else {
297 if {$zlibpath ne ""} {
298 cc-with [list -cflags "-I$zlibpath -L$zlibpath"]
299 define-append EXTRA_CFLAGS -I$zlibpath
300 define-append EXTRA_LDFLAGS -L$zlibpath
301 msg-result "Using zlib from $zlibpath"
302 }
303 if {![cc-check-includes zlib.h] || ![cc-check-function-in-lib inflateEnd z]} {
304 user-error "zlib not found please install it or specify the location with --with-zlib"
305 }
306 }
307 }
308
309 # Network functions require libraries on some systems
310 cc-check-function-in-lib gethostbyname nsl
311 if {![cc-check-function-in-lib socket {socket network}]} {
312

Keyboard Shortcuts

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