Fossil SCM
Further refinements to permit OpenSSL in tree to work consistently.
Commit
08918fabc735c81d963941dab653fe9d5520eaa6
Parent
54307c4d7d90c3d…
1 file changed
+8
-4
M
auto.def
+8
-4
| --- auto.def | ||
| +++ auto.def | ||
| @@ -230,14 +230,13 @@ | ||
| 230 | 230 | define-append EXTRA_LDFLAGS $tclconfig(TCL_LD_FLAGS) |
| 231 | 231 | define FOSSIL_ENABLE_TCL |
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | # Helper for OpenSSL checking |
| 235 | -proc check-for-openssl {msg {cflags {}}} { | |
| 235 | +proc check-for-openssl {msg {cflags {}} {libs {-lssl -lcrypto}}} { | |
| 236 | 236 | msg-checking "Checking for $msg..." |
| 237 | 237 | set rc 0 |
| 238 | - set libs {-lssl -lcrypto} | |
| 239 | 238 | if {[is_mingw]} { |
| 240 | 239 | lappend libs -lgdi32 -lwsock32 |
| 241 | 240 | } |
| 242 | 241 | if {[info exists ::zlib_for_ssl]} { |
| 243 | 242 | lappend libs $::zlib_for_ssl |
| @@ -309,11 +308,12 @@ | ||
| 309 | 308 | user-error "The OpenSSL in source tree directory does not exist" |
| 310 | 309 | } |
| 311 | 310 | set msg "ssl in $ssldir" |
| 312 | 311 | set cflags "-I$ssldir/include" |
| 313 | 312 | set ldflags "-L$ssldir" |
| 314 | - set found [check-for-openssl "ssl in source tree" "$cflags $ldflags"] | |
| 313 | + set ssllibs "$ssldir/libssl.a $ssldir/libcrypto.a" | |
| 314 | + set found [check-for-openssl "ssl in source tree" "$cflags $ldflags" $ssllibs] | |
| 315 | 315 | } else { |
| 316 | 316 | if {$ssldirs in {auto ""}} { |
| 317 | 317 | catch { |
| 318 | 318 | set cflags [exec pkg-config openssl --cflags-only-I] |
| 319 | 319 | set ldflags [exec pkg-config openssl --libs-only-L] |
| @@ -343,11 +343,15 @@ | ||
| 343 | 343 | } |
| 344 | 344 | if {$found} { |
| 345 | 345 | define FOSSIL_ENABLE_SSL |
| 346 | 346 | define-append EXTRA_CFLAGS $cflags |
| 347 | 347 | define-append EXTRA_LDFLAGS $ldflags |
| 348 | - define-append LIBS -lssl -lcrypto | |
| 348 | + if {[info exists ssllibs]} { | |
| 349 | + define-append LIBS $ssllibs | |
| 350 | + } else { | |
| 351 | + define-append LIBS -lssl -lcrypto | |
| 352 | + } | |
| 349 | 353 | if {[is_mingw]} { |
| 350 | 354 | define-append LIBS -lgdi32 -lwsock32 |
| 351 | 355 | } |
| 352 | 356 | msg-result "HTTPS support enabled" |
| 353 | 357 | |
| 354 | 358 |
| --- auto.def | |
| +++ auto.def | |
| @@ -230,14 +230,13 @@ | |
| 230 | define-append EXTRA_LDFLAGS $tclconfig(TCL_LD_FLAGS) |
| 231 | define FOSSIL_ENABLE_TCL |
| 232 | } |
| 233 | |
| 234 | # Helper for OpenSSL checking |
| 235 | proc check-for-openssl {msg {cflags {}}} { |
| 236 | msg-checking "Checking for $msg..." |
| 237 | set rc 0 |
| 238 | set libs {-lssl -lcrypto} |
| 239 | if {[is_mingw]} { |
| 240 | lappend libs -lgdi32 -lwsock32 |
| 241 | } |
| 242 | if {[info exists ::zlib_for_ssl]} { |
| 243 | lappend libs $::zlib_for_ssl |
| @@ -309,11 +308,12 @@ | |
| 309 | user-error "The OpenSSL in source tree directory does not exist" |
| 310 | } |
| 311 | set msg "ssl in $ssldir" |
| 312 | set cflags "-I$ssldir/include" |
| 313 | set ldflags "-L$ssldir" |
| 314 | set found [check-for-openssl "ssl in source tree" "$cflags $ldflags"] |
| 315 | } else { |
| 316 | if {$ssldirs in {auto ""}} { |
| 317 | catch { |
| 318 | set cflags [exec pkg-config openssl --cflags-only-I] |
| 319 | set ldflags [exec pkg-config openssl --libs-only-L] |
| @@ -343,11 +343,15 @@ | |
| 343 | } |
| 344 | if {$found} { |
| 345 | define FOSSIL_ENABLE_SSL |
| 346 | define-append EXTRA_CFLAGS $cflags |
| 347 | define-append EXTRA_LDFLAGS $ldflags |
| 348 | define-append LIBS -lssl -lcrypto |
| 349 | if {[is_mingw]} { |
| 350 | define-append LIBS -lgdi32 -lwsock32 |
| 351 | } |
| 352 | msg-result "HTTPS support enabled" |
| 353 | |
| 354 |
| --- auto.def | |
| +++ auto.def | |
| @@ -230,14 +230,13 @@ | |
| 230 | define-append EXTRA_LDFLAGS $tclconfig(TCL_LD_FLAGS) |
| 231 | define FOSSIL_ENABLE_TCL |
| 232 | } |
| 233 | |
| 234 | # Helper for OpenSSL checking |
| 235 | proc check-for-openssl {msg {cflags {}} {libs {-lssl -lcrypto}}} { |
| 236 | msg-checking "Checking for $msg..." |
| 237 | set rc 0 |
| 238 | if {[is_mingw]} { |
| 239 | lappend libs -lgdi32 -lwsock32 |
| 240 | } |
| 241 | if {[info exists ::zlib_for_ssl]} { |
| 242 | lappend libs $::zlib_for_ssl |
| @@ -309,11 +308,12 @@ | |
| 308 | user-error "The OpenSSL in source tree directory does not exist" |
| 309 | } |
| 310 | set msg "ssl in $ssldir" |
| 311 | set cflags "-I$ssldir/include" |
| 312 | set ldflags "-L$ssldir" |
| 313 | set ssllibs "$ssldir/libssl.a $ssldir/libcrypto.a" |
| 314 | set found [check-for-openssl "ssl in source tree" "$cflags $ldflags" $ssllibs] |
| 315 | } else { |
| 316 | if {$ssldirs in {auto ""}} { |
| 317 | catch { |
| 318 | set cflags [exec pkg-config openssl --cflags-only-I] |
| 319 | set ldflags [exec pkg-config openssl --libs-only-L] |
| @@ -343,11 +343,15 @@ | |
| 343 | } |
| 344 | if {$found} { |
| 345 | define FOSSIL_ENABLE_SSL |
| 346 | define-append EXTRA_CFLAGS $cflags |
| 347 | define-append EXTRA_LDFLAGS $ldflags |
| 348 | if {[info exists ssllibs]} { |
| 349 | define-append LIBS $ssllibs |
| 350 | } else { |
| 351 | define-append LIBS -lssl -lcrypto |
| 352 | } |
| 353 | if {[is_mingw]} { |
| 354 | define-append LIBS -lgdi32 -lwsock32 |
| 355 | } |
| 356 | msg-result "HTTPS support enabled" |
| 357 | |
| 358 |