summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMake/Modules/FindGuichan.cmake7
-rwxr-xr-xconfigure.ac3
2 files changed, 10 insertions, 0 deletions
diff --git a/CMake/Modules/FindGuichan.cmake b/CMake/Modules/FindGuichan.cmake
index 1623b00d..dbc863e2 100644
--- a/CMake/Modules/FindGuichan.cmake
+++ b/CMake/Modules/FindGuichan.cmake
@@ -85,6 +85,13 @@ FOREACH (COMPONENT ${Guichan_FIND_COMPONENTS})
MESSAGE(FATAL_ERROR "Could NOT find Guichan component ${COMPONENT}")
ENDIF ()
+ # Check guichan >= 0.8.0 by searching for the widgetlistener.hpp file.
+ SET(Guichan_HEADER "guichan/widgetlistener.hpp")
+ IF (NOT EXISTS ${Guichan_INCLUDE_DIR}/${Guichan_HEADER})
+ SET(GUICHAN_FOUND FALSE)
+ MESSAGE(FATAL_ERROR "Guichan version is less than 0.8.0")
+ ENDIF()
+
IF (NOT Guichan_FIND_QUIETLY AND NOT Guichan_QUIET)
MESSAGE(STATUS "Found Guichan ${COMPONENT}: ${Guichan_LIBRARY_${COMPONENT}}")
ENDIF ()
diff --git a/configure.ac b/configure.ac
index d1f375f6..b1ceceec 100755
--- a/configure.ac
+++ b/configure.ac
@@ -37,6 +37,9 @@ AC_MSG_ERROR([ *** Unable to find Guichan library (http://guichan.sf.net/)]))
AC_CHECK_HEADERS([guichan.hpp], ,
AC_MSG_ERROR([ *** Guichan library found but cannot find headers (http://guichan.sf.net/)]))
+AC_CHECK_HEADERS([guichan/widgetlistener.hpp], ,
+AC_MSG_ERROR([ *** Guichan library version is found but version is < 0.8.0 (http://guichan.sf.net/)]))
+
if test -n "$SDL_CONFIG"; then
LIBS="$LIBS `$SDL_CONFIG --libs`"
CPPFLAGS="$CPPFLAGS `$SDL_CONFIG --cflags`"