Changeset View
Changeset View
Standalone View
Standalone View
sysutils/inotify-tools/files/patch-libinotify
- This file was added.
Check libinotify via pkg-config as it maybe installed in non-default directories | |||||
--- configure.ac.orig 2018-01-06 11:10:51 UTC | |||||
+++ configure.ac | |||||
@@ -44,11 +44,16 @@ AM_CONDITIONAL([STATIC_BINARY_ENABLE], test "$STATIC_B | |||||
# Checks for libraries. | |||||
+AC_CHECK_FUNCS([inotify_init],, [PKG_CHECK_MODULES(LIBINOTIFY, libinotify)]) | |||||
# Checks for header files. | |||||
AC_CHECK_HEADERS([sys/inotify.h mcheck.h]) | |||||
AC_LANG(C) | |||||
AC_MSG_CHECKING([whether sys/inotify.h actually works]) | |||||
+ac_save_CFLAGS=$CFLAGS | |||||
+ac_save_LIBS=$LIBS | |||||
+CFLAGS="$CFLAGS $LIBINOTIFY_CFLAGS" | |||||
+LIBS="$LIBS $LIBINOTIFY_LIBS" | |||||
AC_COMPILE_IFELSE( | |||||
[AC_LANG_PROGRAM([[#include <sys/inotify.h>]], | |||||
[[return (-1 == inotify_init());]] | |||||
@@ -56,6 +59,8 @@ AC_COMPILE_IFELSE( | |||||
[AC_MSG_RESULT([yup]); AC_DEFINE([SYS_INOTIFY_H_EXISTS_AND_WORKS],[1],[sys/inotify.h exists and works correctly])], | |||||
[AC_MSG_RESULT([nope, using own inotify headers])] | |||||
) | |||||
+CFLAGS=$ac_save_CFLAGS | |||||
+LIBS=$ac_save_LIBS | |||||
# Checks for typedefs, structures, and compiler characteristics. | |||||
AC_C_CONST | |||||
--- libinotifytools/src/Makefile.am.orig 2018-01-06 11:10:51 UTC | |||||
+++ libinotifytools/src/Makefile.am | |||||
@@ -1,6 +1,8 @@ | |||||
SUBDIRS = inotifytools | |||||
lib_LTLIBRARIES = libinotifytools.la | |||||
+libinotifytools_la_CFLAGS = $(LIBINOTIFY_CFLAGS) | |||||
+libinotifytools_la_LIBADD = $(LIBINOTIFY_LIBS) | |||||
libinotifytools_la_SOURCES = inotifytools.c inotifytools_p.h redblack.c redblack.h | |||||
libinotifytools_la_LDFLAGS = -version-info 4:1:4 | |||||
--- src/Makefile.am.orig 2018-01-06 11:10:51 UTC | |||||
+++ src/Makefile.am | |||||
@@ -9,3 +9,5 @@ LDADD = ../libinotifytools/src/libinotifytools.la | |||||
if STATIC_BINARY_ENABLE | |||||
AM_LDFLAGS = -static-libtool-libs | |||||
endif | |||||
+ | |||||
+AM_CFLAGS += $(LIBINOTIFY_CFLAGS) |