Fossil SCM
Alternative to check-in [a098707051568156] for getting the --static option to ./configure working on pkg-config based systems.
Commit
6f9d265234e92e25ae6ddd055b9d78fd010642a52a33527a17252f3c28c8b3eb
Parent
5e7dc8a6f51818e…
1 file changed
+8
-1
M
auto.def
+8
-1
| --- auto.def | ||
| +++ auto.def | ||
| @@ -586,11 +586,13 @@ | ||
| 586 | 586 | } |
| 587 | 587 | cc-check-function-in-lib sin m |
| 588 | 588 | |
| 589 | 589 | # Check for the FuseFS library |
| 590 | 590 | if {[opt-bool fusefs]} { |
| 591 | - if {[cc-check-function-in-lib fuse_mount fuse]} { | |
| 591 | + if {[opt-bool static]} { | |
| 592 | + msg-result "FuseFS support disabled due to -static" | |
| 593 | + } elseif {[cc-check-function-in-lib fuse_mount fuse]} { | |
| 592 | 594 | define-append EXTRA_CFLAGS -DFOSSIL_HAVE_FUSEFS |
| 593 | 595 | define FOSSIL_HAVE_FUSEFS 1 |
| 594 | 596 | define-append LIBS -lfuse |
| 595 | 597 | msg-result "FuseFS support enabled" |
| 596 | 598 | } |
| @@ -615,8 +617,13 @@ | ||
| 615 | 617 | if {[check-function-in-lib dlopen dl]} { |
| 616 | 618 | # Some platforms (*BSD) have the dl functions already in libc and no libdl. |
| 617 | 619 | # In such case we can link directly without -ldl. |
| 618 | 620 | define-append LIBS [get-define lib_dlopen] |
| 619 | 621 | } |
| 622 | + | |
| 623 | +if {[opt-bool static]} { | |
| 624 | + define-append EXTRA_LDFLAGS -lpthread | |
| 625 | +} | |
| 626 | + | |
| 620 | 627 | |
| 621 | 628 | make-template Makefile.in |
| 622 | 629 | make-config-header autoconfig.h -auto {USE_* FOSSIL_*} |
| 623 | 630 |
| --- auto.def | |
| +++ auto.def | |
| @@ -586,11 +586,13 @@ | |
| 586 | } |
| 587 | cc-check-function-in-lib sin m |
| 588 | |
| 589 | # Check for the FuseFS library |
| 590 | if {[opt-bool fusefs]} { |
| 591 | if {[cc-check-function-in-lib fuse_mount fuse]} { |
| 592 | define-append EXTRA_CFLAGS -DFOSSIL_HAVE_FUSEFS |
| 593 | define FOSSIL_HAVE_FUSEFS 1 |
| 594 | define-append LIBS -lfuse |
| 595 | msg-result "FuseFS support enabled" |
| 596 | } |
| @@ -615,8 +617,13 @@ | |
| 615 | if {[check-function-in-lib dlopen dl]} { |
| 616 | # Some platforms (*BSD) have the dl functions already in libc and no libdl. |
| 617 | # In such case we can link directly without -ldl. |
| 618 | define-append LIBS [get-define lib_dlopen] |
| 619 | } |
| 620 | |
| 621 | make-template Makefile.in |
| 622 | make-config-header autoconfig.h -auto {USE_* FOSSIL_*} |
| 623 |
| --- auto.def | |
| +++ auto.def | |
| @@ -586,11 +586,13 @@ | |
| 586 | } |
| 587 | cc-check-function-in-lib sin m |
| 588 | |
| 589 | # Check for the FuseFS library |
| 590 | if {[opt-bool fusefs]} { |
| 591 | if {[opt-bool static]} { |
| 592 | msg-result "FuseFS support disabled due to -static" |
| 593 | } elseif {[cc-check-function-in-lib fuse_mount fuse]} { |
| 594 | define-append EXTRA_CFLAGS -DFOSSIL_HAVE_FUSEFS |
| 595 | define FOSSIL_HAVE_FUSEFS 1 |
| 596 | define-append LIBS -lfuse |
| 597 | msg-result "FuseFS support enabled" |
| 598 | } |
| @@ -615,8 +617,13 @@ | |
| 617 | if {[check-function-in-lib dlopen dl]} { |
| 618 | # Some platforms (*BSD) have the dl functions already in libc and no libdl. |
| 619 | # In such case we can link directly without -ldl. |
| 620 | define-append LIBS [get-define lib_dlopen] |
| 621 | } |
| 622 | |
| 623 | if {[opt-bool static]} { |
| 624 | define-append EXTRA_LDFLAGS -lpthread |
| 625 | } |
| 626 | |
| 627 | |
| 628 | make-template Makefile.in |
| 629 | make-config-header autoconfig.h -auto {USE_* FOSSIL_*} |
| 630 |