diff --git a/configure.ac b/configure.ac index eb10ff50e..7c85eaf42 100644 --- a/configure.ac +++ b/configure.ac @@ -583,6 +583,7 @@ AS_CASE(["$ARG_WITH_LIBGEOIP"], ], [ AC_MSG_RESULT([no]) ARG_WITH_LIBGEOIP="no" + AC_DEFINE([WITH_SHIPPED_GEOIP_H],[1],[Define to use shipped copy of GeoIP.h]) ]) ], [AC_MSG_RESULT([$ARG_WITH_LIBGEOIP]) diff --git a/include/libtorrent/Makefile.am b/include/libtorrent/Makefile.am index e4e92bc84..96c682590 100644 --- a/include/libtorrent/Makefile.am +++ b/include/libtorrent/Makefile.am @@ -1,5 +1,9 @@ includedir = @includedir@/libtorrent +if WITH_SHIPPED_GEOIP +GEOIP_H = GeoIP.h +endif + nobase_include_HEADERS = \ alert.hpp \ alert_types.hpp \ @@ -33,7 +37,6 @@ nobase_include_HEADERS = \ file_pool.hpp \ file_storage.hpp \ fingerprint.hpp \ - GeoIP.h \ gzip.hpp \ hasher.hpp \ http_connection.hpp \ @@ -90,6 +93,8 @@ nobase_include_HEADERS = \ web_peer_connection.hpp \ xml_parse.hpp \ \ + $(GEOIP_H) \ + \ aux_/session_impl.hpp \ \ extensions/logger.hpp \ diff --git a/include/libtorrent/aux_/session_impl.hpp b/include/libtorrent/aux_/session_impl.hpp index 1db5ac9f2..db39abc86 100644 --- a/include/libtorrent/aux_/session_impl.hpp +++ b/include/libtorrent/aux_/session_impl.hpp @@ -39,7 +39,11 @@ POSSIBILITY OF SUCH DAMAGE. #include #ifndef TORRENT_DISABLE_GEO_IP +#ifdef WITH_SHIPPED_GEOIP_H #include "libtorrent/GeoIP.h" +#else +#include +#endif #endif #ifdef _MSC_VER