fix to not install the local copy of GeoIP.h when linking against system

libgeoip.
This commit is contained in:
cristiangreco 2009-10-12 20:56:17 +00:00
parent 474566fa21
commit 70b0edb9f4
3 changed files with 11 additions and 1 deletions

View File

@ -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])

View File

@ -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 \

View File

@ -39,7 +39,11 @@ POSSIBILITY OF SUCH DAMAGE.
#include <list>
#ifndef TORRENT_DISABLE_GEO_IP
#ifdef WITH_SHIPPED_GEOIP_H
#include "libtorrent/GeoIP.h"
#else
#include <GeoIP.h>
#endif
#endif
#ifdef _MSC_VER