]> git.eshelyaron.com Git - emacs.git/commitdiff
* configure.ac: If with-file-notification=yes, if gfile not found,
authorGlenn Morris <rgm@gnu.org>
Fri, 12 Jul 2013 17:36:42 +0000 (13:36 -0400)
committerGlenn Morris <rgm@gnu.org>
Fri, 12 Jul 2013 17:36:42 +0000 (13:36 -0400)
go on to try inotify (not on MS Windows or Nextstep).

* etc/NEWS: Copyedits.

ChangeLog
configure.ac
etc/NEWS

index e802ee2d15c2caadd950fdc57363320db86fee0d..18ad4b5f4d608ab2063ad5ec357b7d15ecac7996 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-07-12  Glenn Morris  <rgm@gnu.org>
+
+       * configure.ac: If with-file-notification=yes, if gfile not found,
+       go on to try inotify (not on MS Windows or Nextstep).
+
 2013-07-12  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix races with threads and file descriptors.
index 6378ef19288ee282320c188ee9826248aeed4a11..8cd482bc71db31172755453db498fd57c7f0d8a6 100644 (file)
@@ -211,7 +211,8 @@ AC_ARG_WITH([file-notification],[AS_HELP_STRING([--with-file-notification=LIB],
     w | w3 | w32 )     val=w32 ;;
     * ) AC_MSG_ERROR([`--with-file-notification=$withval' is invalid;
 this option's value should be `yes', `no', `gfile', `inotify' or `w32'.
-`yes' is a synonym for `w32' on MS-Windows, and for `gfile' otherwise.])
+`yes' is a synonym for `w32' on MS-Windows, for `no' on Nextstep,
+otherwise for the first of `gfile' or `inotify' that is usable.])
     ;;
    esac
    with_file_notification=$val
@@ -2312,51 +2313,65 @@ AC_SUBST(LIBGNUTLS_CFLAGS)
 NOTIFY_OBJ=
 NOTIFY_SUMMARY=no
 
-dnl Set defaults of $with_file_notification.
-if test "${with_file_notification}" = "yes"; then
-   if test "${opsys}" = "mingw32"; then
-      with_file_notification=w32
-   else
-      if test "${with_ns}" != yes; then
-        with_file_notification=gfile
-      fi
-   fi
-fi
+dnl FIXME?  Don't auto-detect on NS, but do allow someone to specify
+dnl a particular library.  This doesn't make much sense?
+if test "${with_ns}" = yes && test ${with_file_notification} = yes; then
+  with_file_notification=no
+fi
+
+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)"
+     elif test "${with_file_notification}" = "gfile"; then
+        AC_MSG_ERROR([File notification `gfile' requested but requirements not found.])
+     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"; 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)"
-   fi
-fi
-dnl inotify is only available on GNU/Linux.
-if test "${with_file_notification}" = "inotify"; then
-   AC_CHECK_HEADER(sys/inotify.h)
-   if test "$ac_cv_header_sys_inotify_h" = yes ; then
-       AC_CHECK_FUNC(inotify_init1)
-       if test "$ac_cv_func_inotify_init1" = yes; then
-           AC_DEFINE(HAVE_INOTIFY, 1, [Define to 1 to use inotify.])
-          NOTIFY_OBJ=inotify.o
-          NOTIFY_SUMMARY="yes -lglibc (inotify)"
-       fi
+  dnl inotify is only available on GNU/Linux.
+  if test "${with_file_notification}" = "inotify" || \
+    test "${with_file_notification}" = "yes"; then
+     AC_CHECK_HEADER(sys/inotify.h)
+     if test "$ac_cv_header_sys_inotify_h" = yes ; then
+         AC_CHECK_FUNC(inotify_init1)
+         if test "$ac_cv_func_inotify_init1" = yes; then
+             AC_DEFINE(HAVE_INOTIFY, 1, [Define to 1 to use inotify.])
+          NOTIFY_OBJ=inotify.o
+          NOTIFY_SUMMARY="yes -lglibc (inotify)"
+       fi
+     elif test "${with_file_notification}" = "inotify"; then
+        AC_MSG_ERROR([File notification `inotify' requested but requirements not found.])
+    fi
   fi
-fi
-dnl MS Windows native file monitor is available for mingw32 only.
-if test "${with_file_notification}" = "w32"; 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)"
-   fi
-fi
+fi                              dnl ${with_file_notification} != no
+
 if test -n "$NOTIFY_OBJ"; then
    AC_DEFINE(USE_FILE_NOTIFY, 1, [Define to 1 if using file notifications.])
 fi
index 6dd89fcd4d73b4a79e3c94627ab6daa76bd4f138..873af89a7a86795ebd0e2984241d8edfec39ee9a 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -29,34 +29,15 @@ build time, like libacl on GNU/Linux.  To prevent this, use the
 configure option `--disable-acl'.
 
 ** Emacs can be compiled with file notification support.
-The configure option `--with-file-notification=LIB' enables file
-notification support in Emacs.  This option's value should be `yes',
-`no', `gfile', `inotify' or `w32'.  `yes' is a synonym for `w32' on
-MS-Windows, and for `gfile' otherwise.  The default value is `yes'.
+This happens by default if a suitable system library is found at
+build time.  To prevent this, use the configure option
+`--with-file-notification-no'.  See below for file-notify features.
+FIXME?  This feature is not available for the Nextstep port. (?)
 
 ** The configure option --with-crt-dir has been removed.
 It is no longer needed, as the crt*.o files are no longer linked
 specially.
 
-** Emacs for MS-Windows can now be built by running the configure script
-using the MSYS environment and MinGW development tools.
-This is from now on the preferred method of building Emacs on
-MS-Windows.  The Windows-specific configure.bat and makefile.w32-in
-files are deprecated.  See the file nt/INSTALL.MSYS for detailed
-instructions.
-
-Using the Posix configure script and Makefile's also means a change in
-the directory structure of the Emacs installation on Windows.  It is
-now the same as on GNU and Unix systems.  In particular, the auxiliary
-programs, such as cmdproxy.exe and hexl.exe, are in
-libexec/emacs/VERSION/i686-pc-mingw32 (where VERSION is the Emacs
-version), version-independent site-lisp is in share/emacs/site-lisp,
-version-specific Lisp files are in share/emacs/VERSION/lisp and in
-share/emacs/VERSION/site-lisp, Info docs are in share/info, and data
-files are in share/emacs/VERSION/etc.  (Emacs knows about all these
-directories and will find the files in there automatically; there's no
-need to set any variables due to this change.)
-
 ** Directories passed to configure option `--enable-locallisppath' are
 no longer created during installation.
 
@@ -662,6 +643,25 @@ meant to be used by other packages.
 \f
 * Changes in Emacs 24.4 on Non-Free Operating Systems
 
+** Emacs for MS-Windows can now be built by running the configure script
+using the MSYS environment and MinGW development tools.
+This is from now on the preferred method of building Emacs on
+MS-Windows.  The Windows-specific configure.bat and makefile.w32-in
+files are deprecated.  See the file nt/INSTALL.MSYS for detailed
+instructions.
+
+Using the Posix configure script and Makefile's also means a change in
+the directory structure of the Emacs installation on Windows.  It is
+now the same as on GNU and Unix systems.  In particular, the auxiliary
+programs, such as cmdproxy.exe and hexl.exe, are in
+libexec/emacs/VERSION/i686-pc-mingw32 (where VERSION is the Emacs
+version), version-independent site-lisp is in share/emacs/site-lisp,
+version-specific Lisp files are in share/emacs/VERSION/lisp and in
+share/emacs/VERSION/site-lisp, Info docs are in share/info, and data
+files are in share/emacs/VERSION/etc.  (Emacs knows about all these
+directories and will find the files in there automatically; there's no
+need to set any variables due to this change.)
+
 +++
 ** The "generate a backtrace on fatal error" feature now works on MS Windows.
 The backtrace is written to the 'emacs_backtrace.txt' file in the