diff --git a/configure b/configure index 933b2c52ad..568533f824 100755 --- a/configure +++ b/configure @@ -33166,8 +33166,7 @@ else int main() { return inotify_init(); } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - wx_cv_inotify_usable=yes; $as_echo "#define wxHAS_INOTIFY 1" >>confdefs.h - + wx_cv_inotify_usable=yes else wx_cv_inotify_usable=no @@ -33178,7 +33177,10 @@ rm -f core conftest.err conftest.$ac_objext \ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $wx_cv_inotify_usable" >&5 $as_echo "$wx_cv_inotify_usable" >&6; } - if test "$wx_cv_inotify_usable" = "no"; then + if test "$wx_cv_inotify_usable" = "yes"; then + $as_echo "#define wxHAS_INOTIFY 1" >>confdefs.h + + else for ac_header in sys/event.h do : ac_fn_c_check_header_compile "$LINENO" "sys/event.h" "ac_cv_header_sys_event_h" "$ac_includes_default diff --git a/configure.in b/configure.in index 728af3eb7e..3ff854e79d 100644 --- a/configure.in +++ b/configure.in @@ -5604,11 +5604,13 @@ if test "$wxUSE_FSWATCHER" = "yes"; then wx_cv_inotify_usable, AC_LINK_IFELSE( [AC_LANG_SOURCE([int main() { return inotify_init(); }])], - [wx_cv_inotify_usable=yes; AC_DEFINE(wxHAS_INOTIFY) ], + [wx_cv_inotify_usable=yes], [wx_cv_inotify_usable=no] ) ) - if test "$wx_cv_inotify_usable" = "no"; then + if test "$wx_cv_inotify_usable" = "yes"; then + AC_DEFINE(wxHAS_INOTIFY) + else AC_CHECK_HEADERS(sys/event.h,,, [AC_INCLUDES_DEFAULT()]) if test "$ac_cv_header_sys_event_h" = "yes"; then AC_DEFINE(wxHAS_KQUEUE)