summaryrefslogtreecommitdiff
path: root/netsniff-ng
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-07-11 12:46:53 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-07-11 12:46:53 +0200
commit0b8aa3c5f07f27ce8e78733b81c1a142b99666aa (patch)
tree9da8a371fedb22dc07ee69ae7e7547214c541edc /netsniff-ng
parente0e8ae1e85f3a835f6bc0e6ff686b2d662b22d77 (diff)
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 <dborkman@redhat.com>
Diffstat (limited to 'netsniff-ng')
-rw-r--r--netsniff-ng/Makefile10
1 files changed, 7 insertions, 3 deletions
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