Wait UPnP service responses for 3s before add port mappings
[amule.git] / cmake / ip2country.cmake
blob12f5071303b8fbb2c4738b36fce677a582051bef
1 if (NOT GEOIP_LIBRARY)
2         include (CheckIncludeFile)
4         if (GEOIP_INCLUDE_DIR)
5                 set (CMAKE_REQUIRED_INCLUDES ${GEOIP_INCLUDE_DIR})
6         endif()
8         check_include_file (GeoIP.h GEOIP_H)
10         if (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}
16                         )
17                 endif()
19                 if (NOT GEOIP_LIBRARY)
20                         set (ENABLE_IP2COUNTRY FALSE)
21                         message (STATUS "GeoIP lib not found, disabling support")
22                 else()
23                         message (STATUS "GeoIP found useable")
24                 endif()
25         else()
26                 set (ENABLE_IP2COUNTRY FALSE)
27                 message (STATUS "GeoIP headers not found, disabling support")
28         endif()
30         unset (CMAKE_REQUIRED_INCLUDES)
32         if (GEOIP_INCLUDE_DIR)
33                 set (CMAKE_REQUIRED_INCLUDES)
34         endif()
35 endif()