Commit 671d4bfc authored by Glenn Morris's avatar Glenn Morris

* 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.
parent a773ed9a
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.
......
......@@ -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
......
......@@ -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.
* 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment