diff options
author | Gustavo Sverzut Barbieri <barbieri@gmail.com> | 2012-12-06 13:02:59 +0000 |
---|---|---|
committer | Gustavo Sverzut Barbieri <barbieri@gmail.com> | 2012-12-06 13:02:59 +0000 |
commit | 6a5eaacc6ada22808ec8515ef2b414883f4f59fe (patch) | |
tree | 11ddc57ab808907ac2652e57a2f1cde8335eec81 /m4/eio_check_options.m4 | |
parent | e3178a936d09c417ad9935c2304bf211fe8de345 (diff) | |
download | efl-6a5eaacc6ada22808ec8515ef2b414883f4f59fe.tar.gz |
efl: common inotify checks, simplified.
Another try to make inotify checks more common.
This time uses AC_CHECK_HEADERS() as for others, that already define
HAVE_SYS_INOTIFY_H, then uses that.
I still kept AM_CONDITIONAL([HAVE_INOTIFY]) because I plan to convert
ecore_file to the same, smarter, method that is used in eio (compiling
the file depending on the backend.
SVN revision: 80358
Diffstat (limited to 'm4/eio_check_options.m4')
-rw-r--r-- | m4/eio_check_options.m4 | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/m4/eio_check_options.m4 b/m4/eio_check_options.m4 index 485dd85595..5fb901273c 100644 --- a/m4/eio_check_options.m4 +++ b/m4/eio_check_options.m4 @@ -1,47 +1,3 @@ -dnl use: EIO_CHECK_INOTIFY([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -AC_DEFUN([EIO_CHECK_INOTIFY], -[ -_eio_have_inotify="no" - -dnl We need to check if the right inotify version is accessible - -dnl It is hard to find a good test on how to check the correct -dnl inotify version. They changed the headers a lot. -dnl in kernel 2.6.13 __NR_inotify_init was added to the defined syscalls -dnl in asm/unistd.h and IN_MOVE_SELF was added to linux/inotify.h -dnl so with this check you need a very new kernel and kernel-headers! - -if ! test "x${have_windows}" = "xyes" ; then - - AC_CHECK_LIB([c], [inotify_init], - [ - AC_DEFINE([HAVE_INOTIFY], [1], [ File monitoring with Inotify ]) - AC_DEFINE([HAVE_SYS_INOTIFY], [1], [ File monitoring with Inotify - sys/inotify.h ]) - _eio_have_inotify="yes" - ], - [ - AC_TRY_COMPILE( - [ -#include <asm/unistd.h> -#include <linux/inotify.h> - ], - [ -int a = __NR_inotify_init; int b = IN_MOVE_SELF; - ], - [ - AC_DEFINE([HAVE_INOTIFY], [1], [ File monitoring with Inotify ]) - _eio_have_inotify="yes" - ], - [_eio_have_inotify="no"]) - ]) -fi - -AC_MSG_CHECKING([whether inotify is to be used for filemonitoring]) -AC_MSG_RESULT([${_eio_have_inotify}]) - -AS_IF([test "x${_eio_have_inotify}" = "xyes"], [$1], [$2]) -]) - dnl use: EIO_CHECK_NOTIFY_WIN32([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) AC_DEFUN([EIO_CHECK_NOTIFY_WIN32], [ |