diff options
| author | Paul Eggert | 2015-08-14 18:20:35 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-08-14 18:22:12 -0700 |
| commit | 200c2b10faf298bf65e8b6dbd0cb9ef00b2f95d6 (patch) | |
| tree | 8fb169d026c584681a77034d9ae4bd07ddf34b6b | |
| parent | 0abf56df5de778d02e8acccb2044fcd6e7e4953c (diff) | |
| download | emacs-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.ac | 34 | ||||
| -rw-r--r-- | etc/NEWS | 4 |
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; |
| 366 | this option's value should be 'yes', 'no', 'gfile', 'inotify' or 'w32'. | 366 | this 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, |
| 368 | otherwise for the first of 'gfile' or 'inotify' that is usable.]) | 368 | otherwise 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 | ||
| 2675 | dnl FIXME? Don't auto-detect on NS, but do allow someone to specify | 2675 | dnl FIXME? Don't auto-detect on NS, but do allow someone to specify |
| 2676 | dnl a particular library. This doesn't make much sense? | 2676 | dnl a particular library. This doesn't make much sense? |
| 2677 | if test "${HAVE_ns}" = yes && test ${with_file_notification} = yes; then | 2677 | if test "${HAVE_NS}" = yes && test ${with_file_notification} = yes; then |
| 2678 | with_file_notification=no | 2678 | with_file_notification=no |
| 2679 | fi | 2679 | fi |
| 2680 | 2680 | ||
| @@ -2694,22 +2694,7 @@ case $with_file_notification,$opsys in | |||
| 2694 | fi ;; | 2694 | fi ;; |
| 2695 | esac | 2695 | esac |
| 2696 | 2696 | ||
| 2697 | dnl g_file_monitor exists since glib 2.18. G_FILE_MONITOR_EVENT_MOVED | 2697 | dnl inotify is available only on GNU/Linux. |
| 2698 | dnl has been added in glib 2.24. It has been tested under | ||
| 2699 | dnl GNU/Linux only. We take precedence over inotify, but this makes | ||
| 2700 | dnl only sense when glib has been compiled with inotify support. How | ||
| 2701 | dnl to check? | ||
| 2702 | case $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 ;; | ||
| 2710 | esac | ||
| 2711 | |||
| 2712 | dnl inotify is only available on GNU/Linux. | ||
| 2713 | case $with_file_notification,$NOTIFY_OBJ in | 2698 | case $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 ;; |
| 2724 | esac | 2709 | esac |
| 2725 | 2710 | ||
| 2711 | dnl g_file_monitor exists since glib 2.18. G_FILE_MONITOR_EVENT_MOVED | ||
| 2712 | dnl has been added in glib 2.24. It has been tested under | ||
| 2713 | dnl GNU/Linux only. | ||
| 2714 | case $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 ;; | ||
| 2722 | esac | ||
| 2723 | |||
| 2726 | case $with_file_notification,$NOTIFY_OBJ in | 2724 | case $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.]) ;; |
| @@ -43,6 +43,10 @@ or by sticking with Emacs 24.4. | |||
| 43 | If gnustep-config is not available, the old heuristics are used. | 43 | If gnustep-config is not available, the old heuristics are used. |
| 44 | 44 | ||
| 45 | --- | 45 | --- |
| 46 | ** 'configure' now prefers inotify to gfile for file notification, | ||
| 47 | unless 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. |
| 47 | Use './configure PKG_CONFIG=/full/name/of/pkg-config' if you need to. | 51 | Use './configure PKG_CONFIG=/full/name/of/pkg-config' if you need to. |
| 48 | 52 | ||