aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2015-08-14 18:20:35 -0700
committerPaul Eggert2015-08-14 18:22:12 -0700
commit200c2b10faf298bf65e8b6dbd0cb9ef00b2f95d6 (patch)
tree8fb169d026c584681a77034d9ae4bd07ddf34b6b
parent0abf56df5de778d02e8acccb2044fcd6e7e4953c (diff)
downloademacs-200c2b10faf298bf65e8b6dbd0cb9ef00b2f95d6.tar.gz
emacs-200c2b10faf298bf65e8b6dbd0cb9ef00b2f95d6.zip
Default to inotify instead of gfile
* configure.ac (with_file_notification): Fix typo that prevented suppression of file notification if HAVE_NS. (NOTIFY_OBJ): Prefer inotify to gfile if both exist and with_file_notification is 'yes' (Bug#21241). * etc/NEWS: Mention this.
-rw-r--r--configure.ac34
-rw-r--r--etc/NEWS4
2 files changed, 20 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index 16d4484c21b..9f8089f8809 100644
--- a/configure.ac
+++ b/configure.ac
@@ -365,7 +365,7 @@ AC_ARG_WITH([file-notification],[AS_HELP_STRING([--with-file-notification=LIB],
365 * ) AC_MSG_ERROR(['--with-file-notification=$withval' is invalid; 365 * ) AC_MSG_ERROR(['--with-file-notification=$withval' is invalid;
366this option's value should be 'yes', 'no', 'gfile', 'inotify' or 'w32'. 366this option's value should be 'yes', 'no', 'gfile', 'inotify' or 'w32'.
367'yes' is a synonym for 'w32' on MS-Windows, for 'no' on Nextstep, 367'yes' is a synonym for 'w32' on MS-Windows, for 'no' on Nextstep,
368otherwise for the first of 'gfile' or 'inotify' that is usable.]) 368otherwise for the first of 'inotify' or 'gfile' that is usable.])
369 ;; 369 ;;
370 esac 370 esac
371 with_file_notification=$val 371 with_file_notification=$val
@@ -2674,7 +2674,7 @@ NOTIFY_SUMMARY=no
2674 2674
2675dnl FIXME? Don't auto-detect on NS, but do allow someone to specify 2675dnl FIXME? Don't auto-detect on NS, but do allow someone to specify
2676dnl a particular library. This doesn't make much sense? 2676dnl a particular library. This doesn't make much sense?
2677if test "${HAVE_ns}" = yes && test ${with_file_notification} = yes; then 2677if test "${HAVE_NS}" = yes && test ${with_file_notification} = yes; then
2678 with_file_notification=no 2678 with_file_notification=no
2679fi 2679fi
2680 2680
@@ -2694,22 +2694,7 @@ case $with_file_notification,$opsys in
2694 fi ;; 2694 fi ;;
2695esac 2695esac
2696 2696
2697dnl g_file_monitor exists since glib 2.18. G_FILE_MONITOR_EVENT_MOVED 2697dnl inotify is available only on GNU/Linux.
2698dnl has been added in glib 2.24. It has been tested under
2699dnl GNU/Linux only. We take precedence over inotify, but this makes
2700dnl only sense when glib has been compiled with inotify support. How
2701dnl to check?
2702case $with_file_notification,$NOTIFY_OBJ in
2703 gfile, | yes,)
2704 EMACS_CHECK_MODULES([GFILENOTIFY], [gio-2.0 >= 2.24])
2705 if test "$HAVE_GFILENOTIFY" = "yes"; then
2706 AC_DEFINE(HAVE_GFILENOTIFY, 1, [Define to 1 if using GFile.])
2707 NOTIFY_OBJ=gfilenotify.o
2708 NOTIFY_SUMMARY="yes -lgio (gfile)"
2709 fi ;;
2710esac
2711
2712dnl inotify is only available on GNU/Linux.
2713case $with_file_notification,$NOTIFY_OBJ in 2698case $with_file_notification,$NOTIFY_OBJ in
2714 inotify, | yes,) 2699 inotify, | yes,)
2715 AC_CHECK_HEADER(sys/inotify.h) 2700 AC_CHECK_HEADER(sys/inotify.h)
@@ -2723,6 +2708,19 @@ case $with_file_notification,$NOTIFY_OBJ in
2723 fi ;; 2708 fi ;;
2724esac 2709esac
2725 2710
2711dnl g_file_monitor exists since glib 2.18. G_FILE_MONITOR_EVENT_MOVED
2712dnl has been added in glib 2.24. It has been tested under
2713dnl GNU/Linux only.
2714case $with_file_notification,$NOTIFY_OBJ in
2715 gfile,* | yes,)
2716 EMACS_CHECK_MODULES([GFILENOTIFY], [gio-2.0 >= 2.24])
2717 if test "$HAVE_GFILENOTIFY" = "yes"; then
2718 AC_DEFINE(HAVE_GFILENOTIFY, 1, [Define to 1 if using GFile.])
2719 NOTIFY_OBJ=gfilenotify.o
2720 NOTIFY_SUMMARY="yes -lgio (gfile)"
2721 fi ;;
2722esac
2723
2726case $with_file_notification,$NOTIFY_OBJ in 2724case $with_file_notification,$NOTIFY_OBJ in
2727 yes,* | no,* | *,?*) ;; 2725 yes,* | no,* | *,?*) ;;
2728 *) AC_MSG_ERROR([File notification '$with_file_notification' requested but requirements not found.]) ;; 2726 *) AC_MSG_ERROR([File notification '$with_file_notification' requested but requirements not found.]) ;;
diff --git a/etc/NEWS b/etc/NEWS
index f131981647d..bbcdc0c340a 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -43,6 +43,10 @@ or by sticking with Emacs 24.4.
43If gnustep-config is not available, the old heuristics are used. 43If gnustep-config is not available, the old heuristics are used.
44 44
45--- 45---
46** 'configure' now prefers inotify to gfile for file notification,
47unless gfile is explicitly requested via --with-file-notification='gfile'.
48
49---
46** The configure option '--with-pkg-config-prog' has been removed. 50** The configure option '--with-pkg-config-prog' has been removed.
47Use './configure PKG_CONFIG=/full/name/of/pkg-config' if you need to. 51Use './configure PKG_CONFIG=/full/name/of/pkg-config' if you need to.
48 52