Commit 978c891a authored by Mike Hibler's avatar Mike Hibler

Different way of determining if pcap_breakloop exists

parent 840c68f2
......@@ -9,7 +9,6 @@ TESTBED_SRCDIR = @top_srcdir@
OBJDIR = ../..
SUBDIR = tools/pcapper
SYSTEM := $(shell uname -s)
RHLVERSION := $(shell cat /etc/redhat-release | sed -e 's/Red Hat Linux release \([0-9]\).*/Linux\1/' | sed -e 's/Fedora Core release \([0-9]\).*/FC\1/')
include $(OBJDIR)/Makeconf
......@@ -39,18 +38,31 @@ LDFLAGS = $(LDSTATIC)
CFLAGS_FBSD = $(CFLAGS) $(TBCFLAGS)
CFLAGS_FBSD_NE = $(CFLAGS)
CFLAGS_LINUX = $(CFLAGS) -I/usr/include/pcap $(TBCFLAGS)
ifneq (,$(findstring FC, $(RHLVERSION)))
# XXX should be configed
CFLAGS_LINUX += -DHAVE_PCAP_BREAKLOOP
endif
LIBS_FBSD = $(PTHREADLIBS) $(TBLIBS) $(PCAPLIBS)
LIBS_FBSD_NE = $(PTHREADLIBS) $(PCAPLIBS)
LIBS_LINUX = -L/usr/lib -lpthread -lpcap $(TBLIBS) -ldl -lz
#
# XXX dynamically-determined Linux stuff, only do on Linux
#
ifeq ($(SYSTEM),Linux)
ifneq ($(wildcard /usr/lib/libpcap.a),)
NOPBL := $(shell nm /usr/lib/libpcap.a | grep -q pcap_breakloop; echo $$?)
else
NOPBL := 1
endif
ifeq ($(NOPBL),0)
CFLAGS_LINUX += -DHAVE_PCAP_BREAKLOOP
endif
ifneq ($(wildcard /usr/kerberos/bin/krb5-config),)
LIBS_LINUX = -L/usr/lib -lpthread -lpcap $(TBLIBS) \
`/usr/kerberos/bin/krb5-config --libs krb5` -ldl -lz
ifneq ($(wildcard /usr/lib/libkrb5support.a),)
LIBS_LINUX += -lkrb5support
endif
endif
endif
# virtual (encapsulated) ethernet
#CFLAGS_FBSD += -DVETH
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment