Fix caching of inotify() availability check in configure
Commit 0fe1146b19
(Cache the result of inotify check in configure,
2020-04-15) was wrong as it defined wxHAS_INOTIFY inside the
AC_CACHE_CHECK(), meaning that this wasn't done at all if the value was
already cached.
Fix this by crrectly defining wxHAS_INOTIFY if inotify() availability
was either detected or cached.
This commit is contained 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)
|
||||
|
Reference in New Issue
Block a user