Disable wxUSE_FSWATCHER under Unix if neither inotify nor kqueue is available.
Don't define wxUSE_FSWATCHER as 1 in configure if we can't implement it. Also add a check to wx/unix/chkconf.h to verify that we didn't end up with an inconsistent configuration somehow. Closes #11670. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63306 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
38
configure
vendored
38
configure
vendored
@@ -42595,13 +42595,8 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
if test "$wxUSE_FSWATCHER" = "yes"; then
|
if test "$wxUSE_FSWATCHER" = "yes"; then
|
||||||
cat >>confdefs.h <<\_ACEOF
|
if test "$wxUSE_MSW" != "1"; then
|
||||||
#define wxUSE_FSWATCHER 1
|
if test "$wxUSE_UNIX" = "yes"; then
|
||||||
_ACEOF
|
|
||||||
|
|
||||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS fswatcher"
|
|
||||||
|
|
||||||
if test "$wxUSE_UNIX" = "yes"; then
|
|
||||||
|
|
||||||
for ac_header in sys/inotify.h
|
for ac_header in sys/inotify.h
|
||||||
do
|
do
|
||||||
@@ -42660,12 +42655,12 @@ fi
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
if test "$ac_cv_header_sys_inotify_h" = "yes"; then
|
if test "$ac_cv_header_sys_inotify_h" = "yes"; then
|
||||||
cat >>confdefs.h <<\_ACEOF
|
cat >>confdefs.h <<\_ACEOF
|
||||||
#define wxHAS_INOTIFY 1
|
#define wxHAS_INOTIFY 1
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
for ac_header in sys/event.h
|
for ac_header in sys/event.h
|
||||||
do
|
do
|
||||||
@@ -42724,17 +42719,30 @@ fi
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
if test "$ac_cv_header_sys_event_h" = "yes"; then
|
if test "$ac_cv_header_sys_event_h" = "yes"; then
|
||||||
cat >>confdefs.h <<\_ACEOF
|
cat >>confdefs.h <<\_ACEOF
|
||||||
#define wxHAS_KQUEUE 1
|
#define wxHAS_KQUEUE 1
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
else
|
else
|
||||||
{ echo "$as_me:$LINENO: WARNING: No native wxFileSystemWatcher implementation available for on this platform" >&5
|
wxUSE_FSWATCHER=no
|
||||||
echo "$as_me: WARNING: No native wxFileSystemWatcher implementation available for on this platform" >&2;}
|
fi
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
wxUSE_FSWATCHER=no
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$wxUSE_FSWATCHER" = "yes"; then
|
||||||
|
cat >>confdefs.h <<\_ACEOF
|
||||||
|
#define wxUSE_FSWATCHER 1
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS fswatcher"
|
||||||
|
else
|
||||||
|
{ echo "$as_me:$LINENO: WARNING: wxFileSystemWatcher won't be available on this platform" >&5
|
||||||
|
echo "$as_me: WARNING: wxFileSystemWatcher won't be available on this platform" >&2;}
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
35
configure.in
35
configure.in
@@ -5562,22 +5562,33 @@ dnl File system watcher checks
|
|||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
|
|
||||||
if test "$wxUSE_FSWATCHER" = "yes"; then
|
if test "$wxUSE_FSWATCHER" = "yes"; then
|
||||||
AC_DEFINE(wxUSE_FSWATCHER)
|
dnl wxFileSystemWatcher is always available under MSW but we need either
|
||||||
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS fswatcher"
|
dnl inotify or kqueue support in the system for it under Unix (this
|
||||||
|
dnl includes OS X which does have kqueue but no other platforms)
|
||||||
if test "$wxUSE_UNIX" = "yes"; then
|
if test "$wxUSE_MSW" != "1"; then
|
||||||
AC_CHECK_HEADERS(sys/inotify.h,,, [AC_INCLUDES_DEFAULT()])
|
if test "$wxUSE_UNIX" = "yes"; then
|
||||||
if test "$ac_cv_header_sys_inotify_h" = "yes"; then
|
AC_CHECK_HEADERS(sys/inotify.h,,, [AC_INCLUDES_DEFAULT()])
|
||||||
AC_DEFINE(wxHAS_INOTIFY)
|
if test "$ac_cv_header_sys_inotify_h" = "yes"; then
|
||||||
else
|
AC_DEFINE(wxHAS_INOTIFY)
|
||||||
AC_CHECK_HEADERS(sys/event.h,,, [AC_INCLUDES_DEFAULT()])
|
|
||||||
if test "$ac_cv_header_sys_event_h" = "yes"; then
|
|
||||||
AC_DEFINE(wxHAS_KQUEUE)
|
|
||||||
else
|
else
|
||||||
AC_MSG_WARN([No native wxFileSystemWatcher implementation available for on this platform])
|
AC_CHECK_HEADERS(sys/event.h,,, [AC_INCLUDES_DEFAULT()])
|
||||||
|
if test "$ac_cv_header_sys_event_h" = "yes"; then
|
||||||
|
AC_DEFINE(wxHAS_KQUEUE)
|
||||||
|
else
|
||||||
|
wxUSE_FSWATCHER=no
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
wxUSE_FSWATCHER=no
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$wxUSE_FSWATCHER" = "yes"; then
|
||||||
|
AC_DEFINE(wxUSE_FSWATCHER)
|
||||||
|
SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS fswatcher"
|
||||||
|
else
|
||||||
|
AC_MSG_WARN([wxFileSystemWatcher won't be available on this platform])
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
|
@@ -21,6 +21,17 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif /* wxUSE_CONSOLE_EVENTLOOP */
|
#endif /* wxUSE_CONSOLE_EVENTLOOP */
|
||||||
|
|
||||||
|
#if wxUSE_FSWATCHER
|
||||||
|
# if !defined(wxHAS_INOTIFY) && !defined(wxHAS_KQUEUE)
|
||||||
|
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||||
|
# error "wxFileSystemWatcher requires either inotify() or kqueue()"
|
||||||
|
# else
|
||||||
|
# undef wxUSE_FSWATCHER
|
||||||
|
# define wxUSE_FSWATCHER 0
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#endif /* wxUSE_FSWATCHER */
|
||||||
|
|
||||||
#if wxUSE_GSTREAMER
|
#if wxUSE_GSTREAMER
|
||||||
# if !wxUSE_THREADS
|
# if !wxUSE_THREADS
|
||||||
# ifdef wxABORT_ON_CONFIG_ERROR
|
# ifdef wxABORT_ON_CONFIG_ERROR
|
||||||
|
Reference in New Issue
Block a user