Fossil SCM

Adjust the --with-openssl=PATH processing so that it looks for the library files both in the top-level directory and in the lib/ subdirectory, as different editions of OpenSSL put them in different places.

drh 2025-02-20 20:00 trunk
Commit be12316b902c4e282efcd0cab3aa1f0f177c1a8a6e2534bde19897a87267727b
1 file changed +9 -3
+9 -3
--- auto.def
+++ auto.def
@@ -466,11 +466,19 @@
466466
set cflags ""
467467
set ldflags ""
468468
} else {
469469
set msg "openssl in $dir"
470470
set cflags "-I$dir/include"
471
- set ldflags "-L$dir"
471
+ if {[file readable $dir/libssl.a]} {
472
+ set ldflags -L$dir
473
+ } elseif {[file readable $dir/lib/libssl.a]} {
474
+ set ldflags -L$dir/lib
475
+ } elseif {[file isdir $dir/lib]} {
476
+ set ldflags "-L$dir -L$dir/lib"
477
+ } else {
478
+ set ldflags -L$dir
479
+ }
472480
}
473481
if {[check-for-openssl $msg "$cflags $ldflags"]} {
474482
incr found
475483
break
476484
}
@@ -488,12 +496,10 @@
488496
}
489497
if {$found} {
490498
define FOSSIL_ENABLE_SSL
491499
define-append EXTRA_CFLAGS $cflags
492500
define-append EXTRA_LDFLAGS $ldflags
493
- define-append CFLAGS $cflags
494
- define-append LDFLAGS $ldflags
495501
if {[info exists ssllibs]} {
496502
define-append LIBS $ssllibs
497503
} else {
498504
define-append LIBS -lssl -lcrypto
499505
}
500506
--- auto.def
+++ auto.def
@@ -466,11 +466,19 @@
466 set cflags ""
467 set ldflags ""
468 } else {
469 set msg "openssl in $dir"
470 set cflags "-I$dir/include"
471 set ldflags "-L$dir"
 
 
 
 
 
 
 
 
472 }
473 if {[check-for-openssl $msg "$cflags $ldflags"]} {
474 incr found
475 break
476 }
@@ -488,12 +496,10 @@
488 }
489 if {$found} {
490 define FOSSIL_ENABLE_SSL
491 define-append EXTRA_CFLAGS $cflags
492 define-append EXTRA_LDFLAGS $ldflags
493 define-append CFLAGS $cflags
494 define-append LDFLAGS $ldflags
495 if {[info exists ssllibs]} {
496 define-append LIBS $ssllibs
497 } else {
498 define-append LIBS -lssl -lcrypto
499 }
500
--- auto.def
+++ auto.def
@@ -466,11 +466,19 @@
466 set cflags ""
467 set ldflags ""
468 } else {
469 set msg "openssl in $dir"
470 set cflags "-I$dir/include"
471 if {[file readable $dir/libssl.a]} {
472 set ldflags -L$dir
473 } elseif {[file readable $dir/lib/libssl.a]} {
474 set ldflags -L$dir/lib
475 } elseif {[file isdir $dir/lib]} {
476 set ldflags "-L$dir -L$dir/lib"
477 } else {
478 set ldflags -L$dir
479 }
480 }
481 if {[check-for-openssl $msg "$cflags $ldflags"]} {
482 incr found
483 break
484 }
@@ -488,12 +496,10 @@
496 }
497 if {$found} {
498 define FOSSIL_ENABLE_SSL
499 define-append EXTRA_CFLAGS $cflags
500 define-append EXTRA_LDFLAGS $ldflags
 
 
501 if {[info exists ssllibs]} {
502 define-append LIBS $ssllibs
503 } else {
504 define-append LIBS -lssl -lcrypto
505 }
506

Keyboard Shortcuts

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