Allow using versions of libnotify < 0.7 in wxGTK.

libnotify 0.4.5 included in Ubuntu Lucid (10.04) can be used for implementing
wxNotificationMessage too, there is only a minor difference with 0.7 API. So
while we stick check for 0.7 initially, accept lower versions too if 0.7 is
not available.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2012-09-09 13:36:43 +00:00
parent 82213cb04e
commit 2eb92b0da8
4 changed files with 180 additions and 11 deletions

View File

@@ -5668,17 +5668,26 @@ if test "$WXGTK2" = 1; then
if test "$wxUSE_NOTIFICATION_MESSAGE" = "yes" ; then
if test "$wxUSE_LIBNOTIFY" = "yes" ; then
HAVE_LIBNOTIFY=0
PKG_CHECK_MODULES(LIBNOTIFY, [libnotify >= 0.7],
[
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $LIBNOTIFY_LIBS"
CFLAGS="$LIBNOTIFY_CFLAGS $CFLAGS"
CXXFLAGS="$LIBNOTIFY_CFLAGS $CXXFLAGS"
AC_DEFINE(wxUSE_LIBNOTIFY)
HAVE_LIBNOTIFY=1
AC_DEFINE(wxUSE_LIBNOTIFY_0_7)
],
[
AC_MSG_WARN([libnotify not found, wxNotificationMessage will use generic implementation.])
PKG_CHECK_MODULES(LIBNOTIFY, [libnotify >= 0.4],
[HAVE_LIBNOTIFY=1],
[AC_MSG_WARN([libnotify not found, wxNotificationMessage will use generic implementation.])]
)
]
)
if test "$HAVE_LIBNOTIFY" = "1" ; then
GUI_TK_LIBRARY="$GUI_TK_LIBRARY $LIBNOTIFY_LIBS"
CFLAGS="$LIBNOTIFY_CFLAGS $CFLAGS"
CXXFLAGS="$LIBNOTIFY_CFLAGS $CXXFLAGS"
AC_DEFINE(wxUSE_LIBNOTIFY)
fi
fi
fi