summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorpierre lamot <pierre.lamot@openwide.fr>2015-02-26 14:37:45 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-03-12 07:43:59 +0100
commitd958afd9fd7078a6eaee17df0a0b1e71504fc3b1 (patch)
treef514b4f3cb5d7cec654371fc6f029800695e4648 /configure.ac
parentae4389a7bd8a6807c3df041cde7c1357b0c13a0c (diff)
eio: add OSX implementation of eio_monitor based on FSEvent
this patch adds an implementation of eio_monitor based on FSEvent for OSX. This implentation has some limitations compared to inotify implementation. Folowing events are not detected: - EIO_MONITOR_FILE_CLOSED - EIO_MONITOR_SELF_RENAME - EIO_MONITOR_SELF_DELETED It should be noted that some events that happend before the call to eio_monitor_add can be catched. This is why sleep timers have been added in the test suite. Tests have been added to check uncovered scenarios. some things might still be improved: - self_deleted events for files might be handled by checking the file_name manually - self_deleted events for directories might be handled by setting kFSEventStreamCreateFlagWatchRoot. I've noticed by doing so that a lot more unwanted event are raised Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac67
1 files changed, 51 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac
index 82da49d..2996474 100644
--- a/configure.ac
+++ b/configure.ac
@@ -417,19 +417,8 @@ sys/mman.h \
417netinet/in.h \ 417netinet/in.h \
418]) 418])
419 419
420have_inotify="${ac_cv_header_sys_inotify_h}"
421AM_CONDITIONAL([HAVE_INOTIFY], [test "x${have_inotify}" = "xyes"])
422
423have_notify_win32="${have_win32}"
424AC_DEFINE_IF([HAVE_NOTIFY_WIN32],
425 [test "x${have_notify_win32}" = "xyes"], [1],
426 [File monitoring with Windows notification])
427AM_CONDITIONAL([HAVE_NOTIFY_WIN32], [test "x${have_notify_win32}" = "xyes"])
428
429
430EFL_CHECK_PATH_MAX 420EFL_CHECK_PATH_MAX
431 421
432
433#### Checks for types 422#### Checks for types
434 423
435# wchar_t 424# wchar_t
@@ -1329,11 +1318,11 @@ AC_ARG_ENABLE([cocoa],
1329 ], 1318 ],
1330 [want_cocoa="no"]) 1319 [want_cocoa="no"])
1331 1320
1332 if test "${want_cocoa}" = "yes"; then 1321if test "${want_cocoa}" = "yes"; then
1333 #test cocoa requirements (objc and Cocoa/Cocoa.h) 1322 #test cocoa requirements (objc and Cocoa/Cocoa.h)
1334 cocoa_ldflags="" 1323 cocoa_ldflags=""
1335 have_cocoa="no" 1324 have_cocoa="no"
1336 m4_ifdef([AC_PROG_OBJC], 1325 m4_ifdef([AC_PROG_OBJC],
1337 [ 1326 [
1338 if test "x${have_gnu_objc}" = "xyes" ; then 1327 if test "x${have_gnu_objc}" = "xyes" ; then
1339 AC_LANG_PUSH([Objective C]) 1328 AC_LANG_PUSH([Objective C])
@@ -1368,6 +1357,38 @@ window = [[NSWindow alloc]
1368fi 1357fi
1369AC_SUBST(cocoa_ldflags) 1358AC_SUBST(cocoa_ldflags)
1370 1359
1360if test "x${want_cocoa}" = "xyes"; then
1361 #test cocoa requirements (objc and Cocoa/Cocoa.h)
1362 cocoa_coreservices_ldflags=""
1363 have_cocoa_coreservices="no"
1364 m4_ifdef([AC_PROG_OBJC],
1365 [
1366 if test "x${have_gnu_objc}" = "xyes" ; then
1367 AC_LANG_PUSH([Objective C])
1368 LIBS_save="$LIBS"
1369 LIBS="$LIBS -framework CoreServices"
1370 AC_LINK_IFELSE(
1371 [AC_LANG_PROGRAM(
1372 [[
1373#include <CoreServices/CoreServices.h>
1374 ]],
1375 [[
1376//test function here
1377 ]])],
1378 [
1379 have_cocoa_coreservices="yes"
1380 cocoa_coreservices_ldflags="-framework CoreServices"
1381 ],
1382 [have_cocoa_coreservices="no"])
1383 LIBS="$LIBS_save"
1384 AC_MSG_CHECKING([whether Cocoa CoreServices framework is supported])
1385 AC_MSG_RESULT([${have_cocoa_coreservices}])
1386 AC_LANG_POP([Objective C])
1387 fi
1388 ])
1389fi
1390AC_SUBST(cocoa_coreservices_ldflags)
1391
1371# Drm 1392# Drm
1372AC_ARG_ENABLE([drm], 1393AC_ARG_ENABLE([drm],
1373 [AS_HELP_STRING([--enable-drm],[enable drm engine. @<:@default=disabled@:>@])], 1394 [AS_HELP_STRING([--enable-drm],[enable drm engine. @<:@default=disabled@:>@])],
@@ -3969,6 +3990,20 @@ EFL_ADD_LIBS([EIO], [-lm])
3969### Checks for linker characteristics 3990### Checks for linker characteristics
3970 3991
3971### Checks for library functions 3992### Checks for library functions
3993have_inotify="${ac_cv_header_sys_inotify_h}"
3994AM_CONDITIONAL([HAVE_INOTIFY], [test "x${have_inotify}" = "xyes"])
3995
3996have_notify_win32="${have_win32}"
3997AC_DEFINE_IF([HAVE_NOTIFY_WIN32],
3998 [test "x${have_notify_win32}" = "xyes"], [1],
3999 [File monitoring with Windows notification])
4000AM_CONDITIONAL([HAVE_NOTIFY_WIN32], [test "x${have_notify_win32}" = "xyes"])
4001
4002AC_DEFINE_IF([HAVE_NOTIFY_COCOA],
4003 [test "x${have_darwin}" = "xyes"], [1],
4004 [File monitoring with fsevent notification])
4005AM_CONDITIONAL([HAVE_NOTIFY_COCOA], [test "x${have_darwin}" = "xyes"])
4006
3972 4007
3973EFL_LIB_END([Eio]) 4008EFL_LIB_END([Eio])
3974dnl TODO: remove these ifdefs from code! 4009dnl TODO: remove these ifdefs from code!