summaryrefslogtreecommitdiffstats
path: root/src/GeoIP-1.4.0
diff options
context:
space:
mode:
Diffstat (limited to 'src/GeoIP-1.4.0')
-rw-r--r--src/GeoIP-1.4.0/CMakeLists.txt2
-rw-r--r--src/GeoIP-1.4.0/data/CMakeLists.txt7
-rw-r--r--src/GeoIP-1.4.0/libGeoIP/CMakeLists.txt23
-rw-r--r--src/GeoIP-1.4.0/libGeoIP/GeoIP.c5
-rw-r--r--src/GeoIP-1.4.0/libGeoIP/GeoIPCity.c13
-rw-r--r--src/GeoIP-1.4.0/libGeoIP/md5.c2
-rw-r--r--src/GeoIP-1.4.0/libGeoIP/types.h4
7 files changed, 53 insertions, 3 deletions
diff --git a/src/GeoIP-1.4.0/CMakeLists.txt b/src/GeoIP-1.4.0/CMakeLists.txt
new file mode 100644
index 0000000..6e42390
--- /dev/null
+++ b/src/GeoIP-1.4.0/CMakeLists.txt
@@ -0,0 +1,2 @@
+add_subdirectory( data )
+add_subdirectory( libGeoIP )
diff --git a/src/GeoIP-1.4.0/data/CMakeLists.txt b/src/GeoIP-1.4.0/data/CMakeLists.txt
new file mode 100644
index 0000000..627b9ba
--- /dev/null
+++ b/src/GeoIP-1.4.0/data/CMakeLists.txt
@@ -0,0 +1,7 @@
+
+###### GeoIP data
+
+install(
+ FILES GeoIP.dat GeoIP-LICENSE.txt
+ DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/geoip
+)
diff --git a/src/GeoIP-1.4.0/libGeoIP/CMakeLists.txt b/src/GeoIP-1.4.0/libGeoIP/CMakeLists.txt
new file mode 100644
index 0000000..a0b9be0
--- /dev/null
+++ b/src/GeoIP-1.4.0/libGeoIP/CMakeLists.txt
@@ -0,0 +1,23 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}/src
+ ${ZLIB_INCLUDE_DIRS}
+)
+
+
+##### geoip (static)
+
+tde_add_library( geoip STATIC_PIC
+
+ SOURCES
+ GeoIP.c
+ GeoIPCity.c
+ regionName.c
+ timeZone.c
+ GeoIPUpdate.c
+ md5.c
+ LINK
+ ${ZLIB_LIBRARIES}
+)
diff --git a/src/GeoIP-1.4.0/libGeoIP/GeoIP.c b/src/GeoIP-1.4.0/libGeoIP/GeoIP.c
index feb6a40..a055156 100644
--- a/src/GeoIP-1.4.0/libGeoIP/GeoIP.c
+++ b/src/GeoIP-1.4.0/libGeoIP/GeoIP.c
@@ -17,6 +17,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include "GeoIP.h"
#include "GeoIP_internal.h"
@@ -29,6 +33,7 @@
#include <windows.h>
#define snprintf _snprintf
#endif
+
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/GeoIP-1.4.0/libGeoIP/GeoIPCity.c b/src/GeoIP-1.4.0/libGeoIP/GeoIPCity.c
index 2a65759..b5c445a 100644
--- a/src/GeoIP-1.4.0/libGeoIP/GeoIPCity.c
+++ b/src/GeoIP-1.4.0/libGeoIP/GeoIPCity.c
@@ -17,9 +17,14 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <GeoIP.h>
-#include <GeoIP_internal.h>
-#include <GeoIPCity.h>
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "GeoIP.h"
+#include "GeoIP_internal.h"
+#include "GeoIPCity.h"
+
#ifndef WIN32
#include <netdb.h>
#include <netinet/in.h> /* For ntohl */
@@ -27,7 +32,9 @@
#include <windows.h>
#include <winsock.h>
#endif
+
#include <sys/types.h> /* For uint32_t */
+
#ifdef HAVE_STDINT_H
#include <stdint.h> /* For uint32_t */
#endif
diff --git a/src/GeoIP-1.4.0/libGeoIP/md5.c b/src/GeoIP-1.4.0/libGeoIP/md5.c
index 922f75a..0882a3a 100644
--- a/src/GeoIP-1.4.0/libGeoIP/md5.c
+++ b/src/GeoIP-1.4.0/libGeoIP/md5.c
@@ -23,7 +23,9 @@
/* Written by Ulrich Drepper <[email protected]>, 1995. */
/* Heavily modified for GnuPG by <[email protected]> */
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/GeoIP-1.4.0/libGeoIP/types.h b/src/GeoIP-1.4.0/libGeoIP/types.h
index 4a8b80a..0a8a953 100644
--- a/src/GeoIP-1.4.0/libGeoIP/types.h
+++ b/src/GeoIP-1.4.0/libGeoIP/types.h
@@ -21,6 +21,10 @@
#ifndef G10_TYPES_H
#define G10_TYPES_H
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#ifdef HAVE_INTTYPES_H
/* For uint64_t */
#include <inttypes.h>