Fossil SCM
Adjustments to auto.def to accommodate "./configure --static" on pkg-config based systems, in an attempt to address [forum:/forumpost/34877e8716 | a forum post reporing a build failure]. It's on a branch because my closest test VM isn't close enough to the reported environment, so we'll need the OP to carry the ball the next step.
Commit
a09870705156815654d779d99ae4c0b9fe3b5e9a7b0aa585578c2761985e220d
Parent
d327660804fe3bd…
1 file changed
+7
-1
M
auto.def
+7
-1
| --- auto.def | ||
| +++ auto.def | ||
| @@ -285,10 +285,11 @@ | ||
| 285 | 285 | lappend libs -lgdi32 -lwsock32 -lcrypt32 |
| 286 | 286 | } |
| 287 | 287 | if {[info exists ::zlib_lib]} { |
| 288 | 288 | lappend libs $::zlib_lib |
| 289 | 289 | } |
| 290 | + lappend libs [get-define EXTRA_LDFLAGS] | |
| 290 | 291 | msg-quiet cc-with [list -cflags $cflags -libs $libs] { |
| 291 | 292 | if {[cc-check-includes openssl/ssl.h] && \ |
| 292 | 293 | [cc-check-functions SSL_new]} { |
| 293 | 294 | incr rc |
| 294 | 295 | } |
| @@ -360,11 +361,16 @@ | ||
| 360 | 361 | set found [check-for-openssl "ssl in source tree" "$cflags $ldflags" $ssllibs] |
| 361 | 362 | } else { |
| 362 | 363 | if {$ssldirs in {auto ""}} { |
| 363 | 364 | catch { |
| 364 | 365 | set cflags [exec pkg-config openssl --cflags-only-I] |
| 365 | - set ldflags [exec pkg-config openssl --libs-only-L] | |
| 366 | + if {[opt-bool static]} { | |
| 367 | + set ldflags [exec pkg-config openssl --libs] | |
| 368 | + append ldflags " -lpthread" | |
| 369 | + } else { | |
| 370 | + set ldflags [exec pkg-config openssl --libs-only-L] | |
| 371 | + } | |
| 366 | 372 | set found [check-for-openssl "ssl via pkg-config" "$cflags $ldflags"] |
| 367 | 373 | } msg |
| 368 | 374 | if {!$found} { |
| 369 | 375 | set ssldirs "{} /usr/sfw /usr/local/ssl /usr/lib/ssl /usr/ssl \ |
| 370 | 376 | /usr/pkg /usr/local /usr /usr/local/opt/openssl" |
| 371 | 377 |
| --- auto.def | |
| +++ auto.def | |
| @@ -285,10 +285,11 @@ | |
| 285 | lappend libs -lgdi32 -lwsock32 -lcrypt32 |
| 286 | } |
| 287 | if {[info exists ::zlib_lib]} { |
| 288 | lappend libs $::zlib_lib |
| 289 | } |
| 290 | msg-quiet cc-with [list -cflags $cflags -libs $libs] { |
| 291 | if {[cc-check-includes openssl/ssl.h] && \ |
| 292 | [cc-check-functions SSL_new]} { |
| 293 | incr rc |
| 294 | } |
| @@ -360,11 +361,16 @@ | |
| 360 | set found [check-for-openssl "ssl in source tree" "$cflags $ldflags" $ssllibs] |
| 361 | } else { |
| 362 | if {$ssldirs in {auto ""}} { |
| 363 | catch { |
| 364 | set cflags [exec pkg-config openssl --cflags-only-I] |
| 365 | set ldflags [exec pkg-config openssl --libs-only-L] |
| 366 | set found [check-for-openssl "ssl via pkg-config" "$cflags $ldflags"] |
| 367 | } msg |
| 368 | if {!$found} { |
| 369 | set ssldirs "{} /usr/sfw /usr/local/ssl /usr/lib/ssl /usr/ssl \ |
| 370 | /usr/pkg /usr/local /usr /usr/local/opt/openssl" |
| 371 |
| --- auto.def | |
| +++ auto.def | |
| @@ -285,10 +285,11 @@ | |
| 285 | lappend libs -lgdi32 -lwsock32 -lcrypt32 |
| 286 | } |
| 287 | if {[info exists ::zlib_lib]} { |
| 288 | lappend libs $::zlib_lib |
| 289 | } |
| 290 | lappend libs [get-define EXTRA_LDFLAGS] |
| 291 | msg-quiet cc-with [list -cflags $cflags -libs $libs] { |
| 292 | if {[cc-check-includes openssl/ssl.h] && \ |
| 293 | [cc-check-functions SSL_new]} { |
| 294 | incr rc |
| 295 | } |
| @@ -360,11 +361,16 @@ | |
| 361 | set found [check-for-openssl "ssl in source tree" "$cflags $ldflags" $ssllibs] |
| 362 | } else { |
| 363 | if {$ssldirs in {auto ""}} { |
| 364 | catch { |
| 365 | set cflags [exec pkg-config openssl --cflags-only-I] |
| 366 | if {[opt-bool static]} { |
| 367 | set ldflags [exec pkg-config openssl --libs] |
| 368 | append ldflags " -lpthread" |
| 369 | } else { |
| 370 | set ldflags [exec pkg-config openssl --libs-only-L] |
| 371 | } |
| 372 | set found [check-for-openssl "ssl via pkg-config" "$cflags $ldflags"] |
| 373 | } msg |
| 374 | if {!$found} { |
| 375 | set ssldirs "{} /usr/sfw /usr/local/ssl /usr/lib/ssl /usr/ssl \ |
| 376 | /usr/pkg /usr/local /usr /usr/local/opt/openssl" |
| 377 |