From 0b8aa3c5f07f27ce8e78733b81c1a142b99666aa Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Thu, 11 Jul 2013 12:46:53 +0200 Subject: configure, netsniff-ng: make netsniff-ng's geoip dependency optional Geoip dependency should not be mandatory as it's not a core part of netsniff-ng. This also facilitates compilation on platforms where geoip is not available. Signed-off-by: Daniel Borkmann --- netsniff-ng/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'netsniff-ng') diff --git a/netsniff-ng/Makefile b/netsniff-ng/Makefile index 2f64c0f..fb913d6 100644 --- a/netsniff-ng/Makefile +++ b/netsniff-ng/Makefile @@ -1,5 +1,4 @@ -netsniff-ng-libs = -lGeoIP \ - $(shell pkg-config --libs libnl-3.0) \ +netsniff-ng-libs = $(shell pkg-config --libs libnl-3.0) \ $(shell pkg-config --libs libnl-genl-3.0) \ -lpthread \ -lz @@ -7,6 +6,9 @@ netsniff-ng-libs = -lGeoIP \ ifeq ($(CONFIG_LIBPCAP), 1) netsniff-ng-libs += -lpcap endif +ifeq ($(CONFIG_LIBGEOIP), 1) +netsniff-ng-libs += -lGeoIP +endif netsniff-ng-objs = dissector.o \ dissector_eth.o \ @@ -58,13 +60,15 @@ netsniff-ng-objs = dissector.o \ ring.o \ tprintf.o \ timer.o \ - geoip.o \ mac80211.o \ netsniff-ng.o ifeq ($(CONFIG_LIBPCAP), 1) netsniff-ng-objs += bpf_comp.o endif +ifeq ($(CONFIG_LIBGEOIP), 1) +netsniff-ng-objs += geoip.o +endif ifeq ($(CONFIG_HWTSTAMP), 1) netsniff-ng-objs += tstamping.o endif -- cgit v1.2.3-54-g00ecf