summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlaforge <laforge>2002-07-30 08:00:47 +0000
committerlaforge <laforge>2002-07-30 08:00:47 +0000
commitdc8cc03aa1c0879ac600967ca37b36aa6fb7ddf6 (patch)
tree80b164819c4162cb62304a79603ccd64418b48f3
parent468c6fb8fec0809988e19ebbbed6191d9fcee461 (diff)
make ulogd_PCAP build conditional to the existance of pcap.h
-rw-r--r--Makefile.in5
-rw-r--r--Rules.make.in2
-rw-r--r--configure.in4
-rw-r--r--pcap/Makefile.in30
-rw-r--r--pcap/ulogd_PCAP.c (renamed from extensions/ulogd_PCAP.c)4
5 files changed, 41 insertions, 4 deletions
diff --git a/Makefile.in b/Makefile.in
index a0f353f..b39e8f7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -15,6 +15,11 @@ else
SUBDIRS+=pgsql
endif
+ifeq (x@HAVE_PCAP_H@,x)
+else
+SUBDIRS+=pcap
+endif
+
# Normally You should not need to change anything below
all: recurse ulogd
diff --git a/Rules.make.in b/Rules.make.in
index 68699be..0f9c937 100644
--- a/Rules.make.in
+++ b/Rules.make.in
@@ -26,7 +26,7 @@ LIBS=@LIBS@
# Names of the plugins to be compiled
-ULOGD_SL:=BASE OPRINT PWSNIFF LOGEMU PCAP LOCALTIME
+ULOGD_SL:=BASE OPRINT PWSNIFF LOGEMU LOCALTIME
# mysql output support
#ULOGD_SL+=MYSQL
diff --git a/configure.in b/configure.in
index 06cbff1..4a749eb 100644
--- a/configure.in
+++ b/configure.in
@@ -8,6 +8,7 @@ AC_PROG_INSTALL
dnl Checks for libraries.
AC_CHECK_LIB(dl, dlopen)
+AC_CHECK_HEADERS(pcap.h)
dnl Checks for header files.
AC_HEADER_DIRENT
@@ -181,8 +182,9 @@ AC_SUBST(DB_DEF)
AC_SUBST(EXTRA_MYSQL_DEF)
AC_SUBST(DATABASE_DRIVERS)
+AC_SUBST(HAVE_PCAP_H)
AM_CONDITIONAL(HAVE_MYSQL, test x$mysqldir != x)
AM_CONDITIONAL(HAVE_PGSQL, test x$pgsqldir != x)
-AC_OUTPUT(extensions/Makefile doc/Makefile conffile/Makefile libipulog/Makefile mysql/Makefile pgsql/Makefile Makefile Rules.make)
+AC_OUTPUT(extensions/Makefile doc/Makefile conffile/Makefile libipulog/Makefile mysql/Makefile pgsql/Makefile pcap/Makefile Makefile Rules.make)
diff --git a/pcap/Makefile.in b/pcap/Makefile.in
new file mode 100644
index 0000000..9a31edb
--- /dev/null
+++ b/pcap/Makefile.in
@@ -0,0 +1,30 @@
+#
+
+# Normally You should not need to change anything below
+#
+include @top_srcdir@/Rules.make
+
+CFLAGS+=-I@top_srcdir@ -I@top_srcdir@/libipulog/include -I@top_srcdir@/conffile
+SH_CFLAGS:=$(CFLAGS) -fPIC
+
+SHARED_LIBS=ulogd_PCAP.so
+
+all: $(SHARED_LIBS)
+
+distrib:
+
+$(SHARED_LIBS): %.so: %_sh.o
+ ld -shared -o $@ $<
+
+%_sh.o: %.c
+ $(CC) $(SH_CFLAGS) -o $@ -c $<
+
+clean:
+ rm -f $(SHARED_LIBS) *.o
+
+distclean:
+ rm -f Makefile
+
+install: all
+ @INSTALL@ -m 755 -d $(DESTDIR)$(ULOGD_LIB_PATH)
+ @INSTALL@ -m 755 *.so $(DESTDIR)$(ULOGD_LIB_PATH)
diff --git a/extensions/ulogd_PCAP.c b/pcap/ulogd_PCAP.c
index 547982e..d7e5912 100644
--- a/extensions/ulogd_PCAP.c
+++ b/pcap/ulogd_PCAP.c
@@ -1,4 +1,4 @@
-/* ulogd_PCAP.c, Version $Revision: 1.9 $
+/* ulogd_PCAP.c, Version $Revision: 1.1 $
*
* ulogd output target for writing pcap-style files (like tcpdump)
*
@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: ulogd_LOGEMU.c,v 1.9 2002/04/27 19:45:51 laforge Exp $
+ * $Id: ulogd_PCAP.c,v 1.1 2002/06/13 12:55:21 laforge Exp $
*
*/