Fossil SCM

More zlib detection before OpenSSL detection.

mistachkin 2016-01-16 23:10 UTC trunk
Commit fd2842c08ab747a3616a2cc067b031d212f6024e
1 file changed +25 -25
+25 -25
--- auto.def
+++ auto.def
@@ -230,10 +230,35 @@
230230
} else {
231231
msg-result "no"
232232
return 0
233233
}
234234
}
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
+}
235260
236261
set ssldirs [opt-val with-openssl]
237262
if {$ssldirs ne "none"} {
238263
set found 0
239264
if {$ssldirs in {auto ""}} {
@@ -280,35 +305,10 @@
280305
} else {
281306
user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support"
282307
}
283308
}
284309
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
-
310310
# Network functions require libraries on some systems
311311
cc-check-function-in-lib gethostbyname nsl
312312
if {![cc-check-function-in-lib socket {socket network}]} {
313313
# Last resort, may be Windows
314314
if {[string match *mingw* [get-define host]]} {
315315
--- 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

Keyboard Shortcuts

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