2 include (CheckIncludeFile)
5 set (CMAKE_REQUIRED_INCLUDES ${GEOIP_INCLUDE_DIR})
8 check_include_file (GeoIP.h GEOIP_H)
11 find_library (GEOIP_LIBRARY GeoIP)
13 if (NOT GEOIP_LIBRARY AND GEOIP_INCLUDE_DIR)
14 find_library (GEOIP_LIBRARY GeoIP
15 PATHS ${GEOIP_INCLUDE_DIR}
19 if (NOT GEOIP_LIBRARY)
20 set (ENABLE_IP2COUNTRY FALSE)
21 message (STATUS "GeoIP lib not found, disabling support")
23 message (STATUS "GeoIP found useable")
26 set (ENABLE_IP2COUNTRY FALSE)
27 message (STATUS "GeoIP headers not found, disabling support")
30 unset (CMAKE_REQUIRED_INCLUDES)
32 if (GEOIP_INCLUDE_DIR)
33 set (CMAKE_REQUIRED_INCLUDES)