Mimic test for IPv6 support in GeoIP from autofoo

svn path=/trunk/; revision=39307
This commit is contained in:
Jörg Mayer 2011-10-08 06:09:38 +00:00
parent 59cd698822
commit 03fe88b31f
2 changed files with 13 additions and 4 deletions

View File

@ -25,11 +25,17 @@ INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(GEOIP DEFAULT_MSG GEOIP_LIBRARY GEOIP_INCLUDE_DIR)
IF(GEOIP_FOUND)
SET( GEOIP_LIBRARIES ${GEOIP_LIBRARY} )
SET( GEOIP_INCLUDE_DIRS ${GEOIP_INCLUDE_DIR} )
SET(GEOIP_LIBRARIES ${GEOIP_LIBRARY} )
SET(GEOIP_INCLUDE_DIRS ${GEOIP_INCLUDE_DIR} )
INCLUDE(CheckFunctionExists)
SET(CMAKE_REQUIRED_INCLUDES ${GEOIP_INCLUDE_DIRS})
SET(CMAKE_REQUIRED_LIBRARIES ${GEOIP_LIBRARIES})
CHECK_FUNCTION_EXISTS("GeoIP_country_name_by_ipnum_v6" HAVE_GEOIP_V6)
SET(CMAKE_REQUIRED_INCLUDES "")
SET(CMAKE_REQUIRED_LIBRARIES "")
ELSE(GEOIP_FOUND)
SET( GEOIP_LIBRARIES )
SET( GEOIP_INCLUDE_DIRS )
SET(GEOIP_LIBRARIES )
SET(GEOIP_INCLUDE_DIRS )
ENDIF(GEOIP_FOUND)
MARK_AS_ADVANCED( GEOIP_LIBRARIES GEOIP_INCLUDE_DIRS )

View File

@ -72,6 +72,9 @@
/* Define to use GEOIP library */
#cmakedefine HAVE_GEOIP 1
/* Define if GEOIP library supports IPv6 (GeoIP 1.4.5 and later) */
#cmakedefine HAVE_GEOIP_V6 1
/* Define to use capabilities library */
#cmakedefine HAVE_LIBCAP 1