[PATCH] wineserver: link to the inotify library on non-Linux systems

Damjan Jovanovic damjan.jov at gmail.com
Fri Apr 12 00:17:31 CDT 2019


Outside Linux, wineserver fails to link when sys/inotify.h
is present, as it tries to find inotify symbols in libc,
which doesn't have them. The inotify symbols are in libinotify.so.
Detect it properly, and link to it where available.

Does not regenerate "configure".

Signed-off-by: Damjan Jovanovic <damjan.jov at gmail.com>
---
 configure.ac       | 11 ++++++++++-
 server/Makefile.in |  2 +-
 2 files changed, 11 insertions(+), 2 deletions(-)
-------------- next part --------------
diff --git a/configure.ac b/configure.ac
index bb02ec4d59..eacd45044f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,6 +57,7 @@ AC_ARG_WITH(gsm,       AS_HELP_STRING([--without-gsm],[do not use libgsm (GSM 06
 AC_ARG_WITH(gssapi,    AS_HELP_STRING([--without-gssapi],[do not use GSSAPI (Kerberos SSP support)]))
 AC_ARG_WITH(gstreamer, AS_HELP_STRING([--without-gstreamer],[do not use GStreamer (codecs support)]))
 AC_ARG_WITH(hal,       AS_HELP_STRING([--without-hal],[do not use HAL (dynamic device support)]))
+AC_ARG_WITH(inotify,   AS_HELP_STRING([--without-inotify],[do not use inotify (filesystem change notifications)]))
 AC_ARG_WITH(jpeg,      AS_HELP_STRING([--without-jpeg],[do not use JPEG]))
 AC_ARG_WITH(krb5,      AS_HELP_STRING([--without-krb5],[do not use krb5 (Kerberos)]))
 AC_ARG_WITH(ldap,      AS_HELP_STRING([--without-ldap],[do not use LDAP]),
@@ -496,7 +497,6 @@ AC_CHECK_HEADERS(\
 	sys/event.h \
 	sys/exec_elf.h \
 	sys/filio.h \
-	sys/inotify.h \
 	sys/ioctl.h \
 	sys/ipc.h \
 	sys/limits.h \
@@ -1351,6 +1351,15 @@ fi
 WINE_WARNING_WITH(xslt,[test "x$ac_cv_lib_soname_xslt" = "x"],
                  [libxslt ${notice_platform}development files not found, xslt won't be supported.])
 
+dnl **** Check for inotify ****
+if test "x$with_inotify" != "xno"
+then
+    WINE_PACKAGE_FLAGS(INOTIFY,[libinotify],,,,
+        [AC_CHECK_HEADER([sys/inotify.h])])
+fi
+WINE_WARNING_WITH(inotify,[test "$ac_cv_header_sys_inotify_h" != "yes"],
+                 [libinotify ${notice_platform}development files not found (or too old), filesystem change notifications won't be supported.])
+
 dnl **** Check for libdbus ****
 if test "x$with_dbus" != "xno"
 then
diff --git a/server/Makefile.in b/server/Makefile.in
index 29f17f3157..b39bd30305 100644
--- a/server/Makefile.in
+++ b/server/Makefile.in
@@ -50,4 +50,4 @@ MANPAGES = \
 	wineserver.fr.UTF-8.man.in \
 	wineserver.man.in
 
-EXTRALIBS = $(LDEXECFLAGS) -lwine $(POLL_LIBS) $(RT_LIBS)
+EXTRALIBS = $(LDEXECFLAGS) -lwine $(POLL_LIBS) $(RT_LIBS) $(INOTIFY_LIBS)


More information about the wine-devel mailing list