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.

wyoung 2020-12-14 18:31 trunk
Commit a09870705156815654d779d99ae4c0b9fe3b5e9a7b0aa585578c2761985e220d
1 file changed +7 -1
+7 -1
--- auto.def
+++ auto.def
@@ -285,10 +285,11 @@
285285
lappend libs -lgdi32 -lwsock32 -lcrypt32
286286
}
287287
if {[info exists ::zlib_lib]} {
288288
lappend libs $::zlib_lib
289289
}
290
+ lappend libs [get-define EXTRA_LDFLAGS]
290291
msg-quiet cc-with [list -cflags $cflags -libs $libs] {
291292
if {[cc-check-includes openssl/ssl.h] && \
292293
[cc-check-functions SSL_new]} {
293294
incr rc
294295
}
@@ -360,11 +361,16 @@
360361
set found [check-for-openssl "ssl in source tree" "$cflags $ldflags" $ssllibs]
361362
} else {
362363
if {$ssldirs in {auto ""}} {
363364
catch {
364365
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
+ }
366372
set found [check-for-openssl "ssl via pkg-config" "$cflags $ldflags"]
367373
} msg
368374
if {!$found} {
369375
set ssldirs "{} /usr/sfw /usr/local/ssl /usr/lib/ssl /usr/ssl \
370376
/usr/pkg /usr/local /usr /usr/local/opt/openssl"
371377
--- 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

Keyboard Shortcuts

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