-if test "${with_file_notification}" != "no"; then
-
- dnl MS Windows native file monitor is available for mingw32 only.
- if test "${with_file_notification}" = "w32" || \
- ( test "${opsys}" = "mingw32" && \
- test "${with_file_notification}" = "yes" ); then
- AC_CHECK_HEADER(windows.h)
- if test "$ac_cv_header_windows_h" = yes ; then
- AC_DEFINE(HAVE_W32NOTIFY, 1, [Define to 1 to use w32notify.])
- NOTIFY_OBJ=w32notify.o
- NOTIFY_SUMMARY="yes (w32)"
- elif test "${with_file_notification}" = "w32"; then
- AC_MSG_ERROR([File notification `w32' requested but requirements not found.])
- elif test "${opsys}" = "mingw32"; then
- dnl Do not try any further.
- with_file_notification=no
- fi
- fi
-
- dnl g_file_monitor exists since glib 2.18. G_FILE_MONITOR_EVENT_MOVED
- dnl has been added in glib 2.24. It has been tested under
- dnl GNU/Linux only. We take precedence over inotify, but this makes
- dnl only sense when glib has been compiled with inotify support. How
- dnl to check?
- if test "${with_file_notification}" = "gfile" || \
- test "${with_file_notification}" = "yes"; then
- PKG_CHECK_MODULES(GFILENOTIFY, gio-2.0 >= 2.24, HAVE_GFILENOTIFY=yes, HAVE_GFILENOTIFY=no)
- if test "$HAVE_GFILENOTIFY" = "yes"; then
- AC_DEFINE(HAVE_GFILENOTIFY, 1, [Define to 1 if using GFile.])
- NOTIFY_OBJ=gfilenotify.o
- NOTIFY_SUMMARY="yes -lgio (gfile)"
- with_file_notification=gfile
- elif test "${with_file_notification}" = "gfile"; then
- AC_MSG_ERROR([File notification `gfile' requested but requirements not found.])
- fi
- fi
+dnl MS Windows native file monitor is available for mingw32 only.
+case $with_file_notification,$opsys in
+ w32,* | yes,mingw32)
+ AC_CHECK_HEADER(windows.h)
+ if test "$ac_cv_header_windows_h" = yes ; then
+ AC_DEFINE(HAVE_W32NOTIFY, 1, [Define to 1 to use w32notify.])
+ NOTIFY_OBJ=w32notify.o
+ NOTIFY_SUMMARY="yes (w32)"
+ fi ;;
+esac