]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
make ulogd_PCAP build conditional to the existance of pcap.h
authorlaforge <laforge>
Tue, 30 Jul 2002 08:00:47 +0000 (08:00 +0000)
committerlaforge <laforge>
Tue, 30 Jul 2002 08:00:47 +0000 (08:00 +0000)
Makefile.in
Rules.make.in
configure.in
pcap/Makefile.in [new file with mode: 0644]
pcap/ulogd_PCAP.c [moved from extensions/ulogd_PCAP.c with 97% similarity]

index a0f353f6f6211a1022c57e0760b082cd3da6e4bb..b39e8f79e176f25453e0d138de2e9d9fcf758fa7 100644 (file)
@@ -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
index 68699be4e417107bad8df13904d045e6ad81ae88..0f9c9376271899f189f5ae5846fe505db1569c4e 100644 (file)
@@ -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
index 06cbff12e86cbbf0e7a9f4d3ba6cf3d3fc88ad68..4a749ebc625be53b486ea3a6dc28c38714da9f0f 100644 (file)
@@ -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 (file)
index 0000000..9a31edb
--- /dev/null
@@ -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)
similarity index 97%
rename from extensions/ulogd_PCAP.c
rename to pcap/ulogd_PCAP.c
index 547982e629a41899a8e796488fb49458345ae857..d7e5912624ff23a36fcb33cff2fd6539583c7941 100644 (file)
@@ -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 $
  *
  */