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.
Commit
be12316b902c4e282efcd0cab3aa1f0f177c1a8a6e2534bde19897a87267727b
Parent
304503ed24a2f3c…
1 file changed
+9
-3
M
auto.def
+9
-3
| --- auto.def | ||
| +++ auto.def | ||
| @@ -466,11 +466,19 @@ | ||
| 466 | 466 | set cflags "" |
| 467 | 467 | set ldflags "" |
| 468 | 468 | } else { |
| 469 | 469 | set msg "openssl in $dir" |
| 470 | 470 | 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 | + } | |
| 472 | 480 | } |
| 473 | 481 | if {[check-for-openssl $msg "$cflags $ldflags"]} { |
| 474 | 482 | incr found |
| 475 | 483 | break |
| 476 | 484 | } |
| @@ -488,12 +496,10 @@ | ||
| 488 | 496 | } |
| 489 | 497 | if {$found} { |
| 490 | 498 | define FOSSIL_ENABLE_SSL |
| 491 | 499 | define-append EXTRA_CFLAGS $cflags |
| 492 | 500 | define-append EXTRA_LDFLAGS $ldflags |
| 493 | - define-append CFLAGS $cflags | |
| 494 | - define-append LDFLAGS $ldflags | |
| 495 | 501 | if {[info exists ssllibs]} { |
| 496 | 502 | define-append LIBS $ssllibs |
| 497 | 503 | } else { |
| 498 | 504 | define-append LIBS -lssl -lcrypto |
| 499 | 505 | } |
| 500 | 506 |
| --- 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 |