summaryrefslogtreecommitdiffstats
path: root/patches/owfs-2.8p6/owfs-2.7p7-pkgconfigize-fuse.diff
diff options
context:
space:
mode:
Diffstat (limited to 'patches/owfs-2.8p6/owfs-2.7p7-pkgconfigize-fuse.diff')
-rw-r--r--patches/owfs-2.8p6/owfs-2.7p7-pkgconfigize-fuse.diff57
1 files changed, 57 insertions, 0 deletions
diff --git a/patches/owfs-2.8p6/owfs-2.7p7-pkgconfigize-fuse.diff b/patches/owfs-2.8p6/owfs-2.7p7-pkgconfigize-fuse.diff
new file mode 100644
index 000000000..8c3334695
--- /dev/null
+++ b/patches/owfs-2.8p6/owfs-2.7p7-pkgconfigize-fuse.diff
@@ -0,0 +1,57 @@
+From: Robert Schwebel <r.schwebel@pengutronix.de>
+Subject: determine fuse with pkg-config
+
+Add pkg-config support to find fuse libs.
+
+Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
+
+---
+ configure.ac | 28 +++++++++++++---------------
+ 1 file changed, 13 insertions(+), 15 deletions(-)
+
+Index: owfs-2.7p26/configure.ac
+===================================================================
+--- owfs-2.7p26.orig/configure.ac
++++ owfs-2.7p26/configure.ac
+@@ -940,18 +940,16 @@ AC_SUBST(LD_EXTRALIBS)
+ AC_SUBST(OSLIBS)
+ AC_MSG_WARN([LD_EXTRALIBS=${LD_EXTRALIBS} OSLIBS=${OSLIBS}])
+
+-AC_ARG_WITH(fuseinclude,
+- [ --with-fuseinclude=DIR FUSE-include from @<:@/usr/local/include@:>@],
+- [fuse_include_path=$withval],
+- [fuse_include_path='/usr/local/include'])
+-AC_SUBST(fuse_include_path)
+-
+-AC_ARG_WITH(fuselib,
+- [ --with-fuselib=DIR FUSE-lib from @<:@/usr/local/lib@:>@],
+- [fuse_lib_path=$withval],
+- [fuse_lib_path='/usr/local/lib'])
+-AC_SUBST(fuse_lib_path)
+-
++# check for fuse
++REQUIRES_FUSE="fuse >= 2.2.0"
++AC_SUBST(REQUIRES_FUSE)
++PKG_CHECK_MODULES([fuse],
++ [${REQUIRES_FUSE}],
++ [],
++ [AC_MSG_RESULT([*** ${REQUIRES_FUSE} not found by pkg-config on your system])]
++)
++AC_SUBST(fuse_CFLAGS)
++AC_SUBST(fuse_LIBS)
+
+ #Check owfs
+ AC_MSG_CHECKING([if owfs is enabled])
+@@ -978,9 +976,9 @@ if test "${ENABLE_OWFS}" != "false" ; th
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LDFLAGS="$LDFLAGS"
+ FUSE_FLAGS="-DFUSE_USE_VERSION=26"
+- FUSE_INCLUDES="-I${fuse_include_path}"
+- FUSE_LIBS="-L${fuse_lib_path}"
+- LD_EXTRALIBS="$save_LD_EXTRALIBS -Wl,--rpath -Wl,${fuse_lib_path}"
++ FUSE_INCLUDES="${fuse_CFLAGS}"
++ FUSE_LIBS="${fuse_LIBS}"
++ LD_EXTRALIBS="$save_LD_EXTRALIBS ${fuse_LIBS}"
+ CPPFLAGS="$save_CPPFLAGS -D_FILE_OFFSET_BITS=64 $FUSE_FLAGS $FUSE_INCLUDES"
+ LDFLAGS="$save_LDFLAGS $FUSE_LIBS"
+