Index: auto.def
--- auto.def.orig
+++ auto.def
@@ -329,7 +329,7 @@ if {[opt-bool with-th1-hooks]} {
 
 if {[opt-bool static]} {
   # XXX: This will not work on all systems.
-  define-append EXTRA_LDFLAGS -static
+  define-append EXTRA_LDFLAGS ${STATIC}
   msg-result "Trying to link statically"
 } else {
   define-append EXTRA_CFLAGS -DFOSSIL_DYNAMIC_BUILD=1
@@ -814,7 +814,8 @@ if {[opt-bool fusefs]} {
   if {[opt-bool static]} {
     msg-result "FuseFS support disabled due to -static"
   } elseif {[cc-check-function-in-lib fuse_mount fuse]} {
-    define-append EXTRA_CFLAGS -DFOSSIL_HAVE_FUSEFS
+    set cflags [exec pkg-config fuse --cflags-only-I]
+    define-append EXTRA_CFLAGS -DFOSSIL_HAVE_FUSEFS $cflags
     define FOSSIL_HAVE_FUSEFS 1
     msg-result "FuseFS support enabled"
   }
