emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r113396: * configure.ac: If with-file-notification=y


From: Glenn Morris
Subject: [Emacs-diffs] trunk r113396: * configure.ac: If with-file-notification=yes, if gfile not found,
Date: Fri, 12 Jul 2013 17:36:47 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113396
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Fri 2013-07-12 13:36:42 -0400
message:
  * configure.ac: If with-file-notification=yes, if gfile not found,
  go on to try inotify (not on MS Windows or Nextstep).
  
  * etc/NEWS: Copyedits.
modified:
  ChangeLog                      changelog-20091113204419-o5vbwnq5f7feedwu-1538
  configure.ac                   
configure.in-20091113204419-o5vbwnq5f7feedwu-783
  etc/NEWS                       news-20100311060928-aoit31wvzf25yr1z-1
=== modified file 'ChangeLog'
--- a/ChangeLog 2013-07-12 02:03:47 +0000
+++ b/ChangeLog 2013-07-12 17:36:42 +0000
@@ -1,3 +1,8 @@
+2013-07-12  Glenn Morris  <address@hidden>
+
+       * 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  <address@hidden>
 
        Fix races with threads and file descriptors.

=== modified file 'configure.ac'
--- a/configure.ac      2013-07-12 02:03:47 +0000
+++ b/configure.ac      2013-07-12 17:36:42 +0000
@@ -211,7 +211,8 @@
     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 @@
 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 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
-  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
+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 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 ${with_file_notification} != no
+
 if test -n "$NOTIFY_OBJ"; then
    AC_DEFINE(USE_FILE_NOTIFY, 1, [Define to 1 if using file notifications.])
 fi

=== modified file 'etc/NEWS'
--- a/etc/NEWS  2013-07-10 06:26:23 +0000
+++ b/etc/NEWS  2013-07-12 17:36:42 +0000
@@ -29,34 +29,15 @@
 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 @@
 
 * 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]