This adds compilation of the ft2nfdump binary using flow-tools-dev instead of using local sources.
You might want to fix my autofoo as I have little to know knowledge of how to do it correctly but it works :) --- bin/Makefile.am | 2 -- bin/ft2nfdump.c | 2 -- configure.in | 35 ++++++----------------------------- debian/rules | 2 +- 4 files changed, 7 insertions(+), 34 deletions(-) diff --git a/bin/Makefile.am b/bin/Makefile.am index 16fbf4e..bada1dc 100755 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -91,8 +91,6 @@ nftest_SOURCES = nftest.c $(common) $(filter) $(filelzo) if FT2NFDUMP ft2nfdump_SOURCES = ft2nfdump.c $(common) $(filelzo) $(util) ft2nfdump_LDADD = -lft -lz -ft2nfdump_LDADD += @FT_LDFLAGS@ -ft2nfdump_CFLAGS = @FT_INCLUDES@ endif EXTRA_DIST = inline.c collector_inline.c nffile_inline.c nfdump_inline.c heapsort_inline.c applybits_inline.c test.sh nfdump.test.out parse_cvs.pl diff --git a/bin/ft2nfdump.c b/bin/ft2nfdump.c index 0332cb3..12957c8 100644 --- a/bin/ft2nfdump.c +++ b/bin/ft2nfdump.c @@ -68,8 +68,6 @@ #include "nfx.h" #include "launch.h" -#include "ftbuild.h" - /* Global defines */ #define MAXRECORDS 30 diff --git a/configure.in b/configure.in index ecfef93..7db82dc 100755 --- a/configure.in +++ b/configure.in @@ -70,19 +70,6 @@ if test "x$ac_cv_prog_LEX" = "xflex"; then LFLAGS=-i fi -# Check if we need to build the flow-tools converter -# FIXME? This should use flow-tools-dev if possible, not local sources.. -AC_ARG_WITH(ftpath, -[ --with-ftpath=PATH Expect flow-tool sources in PATH; default ../flow-tools-0.67], -if test "x$with_ftpath" = "xyes" ; then - WHERE_FTPATH="../flow-tools-0.67" -else - WHERE_FTPATH=$with_ftpath -fi -, -WHERE_FTPATH="../flow-tools-0.67" -) - AC_ARG_WITH(rrdpath, [ --with-rrdpath=PATH Expect RRD installed in PATH; default /usr/local], if test "x$with_rrdpath" = "xyes" ; then @@ -98,22 +85,14 @@ fi #Tidz up? esp not using in source dist flow-tools AC_ARG_ENABLE(ftconv, [ --enable-ftconv Build the flow-tools to nfdump converter; default is NO], -AC_CHECK_LIB(z, zlibVersion,, +[AC_CHECK_LIB(z, zlibVersion,, AC_MSG_ERROR(Link with "-lz" failed! (Need zlib >= 1.0.2)) ) -if test -d "$WHERE_FTPATH"; then - if test ! -f "$WHERE_FTPATH/lib/ftlib.h"; then - AC_MSG_ERROR(ftlib.h file not found in flow-tools directory '$WHERE_FTPATH'. Use --with-ftpath=PATH) - fi - if test ! -f "$WHERE_FTPATH/lib/libft.a"; then - AC_MSG_ERROR(libft.a not found in flow-tools directory '$WHERE_FTPATH'. Build flow tools first) - fi - FT_INCLUDES="-I$WHERE_FTPATH/src -I$WHERE_FTPATH/lib" - FT_LDFLAGS="-L$WHERE_FTPATH/lib" -else - AC_MSG_ERROR(flow-tools directory '$WHERE_FTPATH' does not exists. Use --with-ftpath=PATH) -fi -AM_CONDITIONAL(FT2NFDUMP, true) +AC_CHECK_HEADERS([ftlib.h]) +AC_CHECK_LIB(ft, ftio_init,, +AC_MSG_ERROR(Link with "-lft" failed!) +) +AM_CONDITIONAL(FT2NFDUMP, true)] , AM_CONDITIONAL(FT2NFDUMP, false) ) @@ -167,8 +146,6 @@ AC_CHECK_MEMBER([struct sockaddr.sa_len], #include <sys/socket.h>]) #AC_SUBST(opt_objects) -AC_SUBST(FT_INCLUDES) -AC_SUBST(FT_LDFLAGS) AC_SUBST(LFLAGS) diff --git a/debian/rules b/debian/rules index 2b38004..fbce714 100755 --- a/debian/rules +++ b/debian/rules @@ -13,7 +13,7 @@ include /usr/share/cdbs/1/class/makefile.mk DEB_CONFIGURE_EXTRA_FLAGS +=--enable-compat15 # Enable extra configure flags -DEB_CONFIGURE_EXTRA_FLAGS +=--enable-nfprofile +DEB_CONFIGURE_EXTRA_FLAGS +=--enable-nfprofile --enable-ftconv # Build nfdump with nfprofile for nfsen # --enable-nfprofile -- 1.7.5.4 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org