Commit 16901714 authored by 's avatar

Added support for current combo6x card (replaced old combo6 driver).

Regular make support instead of extra_dist.



git-svn-id: file:///home/svn/mapi/trunk@1495 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 4ad519a8
......@@ -8,6 +8,7 @@ ACLOCAL_AMFLAGS = -I .
EXTRA_DIST = COPYING INSTALL applications tests \
config/mapi.conf.dag.entry \
config/mapi.conf.napatech.entry \
config/mapi.conf.combo6.entry \
config/mapi.conf.ipfixflib.entry
dist-hook:
......
[driver]
device=/dev/szedataIIO
driver=mapicombo6drv.so
description=Combo6x capture card
......@@ -323,6 +323,30 @@ else
fi
AC_SUBST_FILE(MAPI_CONF_NAPATECH_ENTRY)
# COMBO6 support
AC_MSG_CHECKING(if COMBO6 cards support is enabled)
AC_ARG_ENABLE(combo6,
AS_HELP_STRING([--enable-combo6], [Enable support for COMBO6 cards]),
[case "${enableval}" in
yes) combo6=true ;;
no) combo6=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-combo6) ;;
esac], [combo6=false])
AM_CONDITIONAL(DRIVER_COMBO6, test x$combo6 = xtrue)
AM_CONDITIONAL(BINARY_COMBO6FLIB, test x$combo6 = xtrue)
# AM_CONDITIONAL(PRECLASSIFICATION, test x$combo = xtrue)
if test x$combo6 = xtrue; then
MAPI_CONF_COMBO6_ENTRY=$srcdir/config/mapi.conf.combo6.entry
MAPI_FUNC_LIBS="${MAPI_FUNC_LIBS}:combo6flib.so"
# AC_DEFINE(PRECLASSIFICATION, 1, [hardware preliminary packet classification])
AC_DEFINE(WITH_COMBO6, 1, [if COMBO6 cards are supported])
AC_MSG_RESULT(yes)
else
MAPI_CONF_COMBO6_ENTRY=/dev/null
AC_MSG_RESULT(no)
fi
AC_SUBST_FILE(MAPI_CONF_COMBO6_ENTRY)
# optional MAPI function libraries
......@@ -644,6 +668,72 @@ AC_SUBST(NAPATECHINC)
AC_SUBST(NAPATECHLIB)
#
# libcombo6 (only for --enable-combo6)
#
AC_MSG_CHECKING([for libcombo6])
AC_ARG_WITH(libcombo6,
AS_HELP_STRING([--with-libcombo6=DIR], [Manual libcombo6 path configuration, in case the configuration script can't find it. Search for libcombo6 in DIR/lib, and for the header file in DIR/include and DIR/include/combo6. Effective only if --enable-combo6 has been previously specified]),
[ case "$withval" in
yes|no)
AC_MSG_RESULT(no)
;;
*)
if test x$combo6 = xfalse; then
AC_MSG_ERROR(Please use --with-libcombo6 only in conjunction with --enable-combo6. You don't need to configure libcombo6 if you are not going to use a Combo6 card.)
else
AC_MSG_RESULT($withval)
incdir=""
if test -f $withval/include/szedata2.h; then
incdir=$withval/include
elif test -f $withval/include/combo6/szedata2.h; then
incdir=$withval/include/combo6
fi
if test "x$incdir" != "x" -a -f $withval/lib/libsze2.so; then
owd=`pwd`
if cd $withval; then withval=`pwd`; cd $owd; fi
COMBO6INC="-I$incdir"
COMBO6LIB="-L$withval/lib -lsze2 -ldbus-1"
else
AC_MSG_ERROR(szedata2.h or libsze2.so not found in $withval/include and $withval/lib)
fi
fi
;;
esac ],
[ if test x$combo6 = xtrue; then
if test -f ${prefix}/include/szedata2.h -a -f ${prefix}/lib/libsze2.so; then
COMBO6INC="-I${prefix}/include"
COMBO6LIB="-L${prefix}/lib -lsze2 -ldbus-1"
elif test -f /opt/combo6/include/szedata2.h -a -f /opt/combo6/lib/libsze2.so; then
COMBO6INC="-I/opt/combo6/include"
COMBO6LIB="-L/opt/combo6/lib -lsze2 -ldbus-1"
elif test -f /opt/combo6/include/combo6/szedata2.h -a -f /opt/combo6/lib/libsze2.so; then
COMBO6INC="-I/opt/combo6/include/combo6"
COMBO6LIB="-L/opt/combo6/lib -lsze2 -ldbus-1"
elif test -f /usr/local/include/szedata2.h -a -f /usr/local/lib/libsze2.so; then
COMBO6INC="-I/usr/local/include"
COMBO6LIB="-L/usr/local/lib -lsze2 -ldbus-1"
elif test -f /usr/local/include/combo6/szedata2.h -a -f /usr/local/lib/libsze2.so; then
COMBO6INC="-I/usr/local/include/combo6"
COMBO6LIB="-L/usr/local/lib -lsze2 -ldbus-1"
elif test -f /usr/include/combo6/szedata2.h; then
COMBO6INC="-I/usr/include/combo6"
COMBO6LIB="-lsze2"
elif test -f /usr/include/szedata2.h; then
COMBO6LIB="szedata2.h"
else
AC_MSG_RESULT(no)
AC_MSG_ERROR([libcombo6 not found])
fi
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi ]
)
AC_SUBST(COMBO6INC)
AC_SUBST(COMBO6LIB)
#
# libnids >= 1.21 (only for --enable-extraflib)
......@@ -916,6 +1006,7 @@ AC_CONFIG_FILES([
src/bpfcompiler/pcap/Makefile
src/dagflib/Makefile
src/napatechflib/Makefile
src/combo6flib/Makefile
src/extraflib/Makefile
applications/Makefile
applications/appmon/Makefile
......@@ -948,6 +1039,9 @@ fi
if test x$napatech = xtrue; then
echo "option: support for Napatech cards"
fi
if test x$combo6 = xtrue; then
echo "option: support for Combo6 cards"
fi
if test x$authentication = xtrue; then
echo "option: authentication on"
fi
......
......@@ -19,6 +19,9 @@ endif
if BINARY_NAPATECHFLIB
BUILD_napatechflib = napatechflib
endif
if BINARY_COMBO6FLIB
BUILD_combo6flib = combo6flib
endif
if BINARY_EXTRAFLIB
BUILD_extraflib = extraflib
endif
......@@ -31,6 +34,7 @@ $(BUILD_ipfixflib) \
$(BUILD_anonflib) \
$(BUILD_dagflib) \
$(BUILD_napatechflib) \
$(BUILD_combo6flib) \
$(BUILD_extraflib)
#DIST_SUBDIRS =
......@@ -66,7 +70,7 @@ mapicommd_SOURCES = mapicommd.c
endif
EXTRA_DIST = errors.mapi combo6flib vod
EXTRA_DIST = errors.mapi vod
dist-hook:
rm -rf `find $(distdir)/combo6flib -name .svn`
......
AM_CPPFLAGS = -I$(srcdir)/.. -I$(srcdir)/../lib -I$(srcdir)/../common -I$(srcdir)/../bpfcompiler @PCAPINC@ @DAGINC@ @NAPATECHINC@ -D_NT_OS_TYPE=_NT_OS_TYPE_LINUX -D_GNU_SOURCE -D_THREAD_SAFE
AM_CPPFLAGS = -I$(srcdir)/.. -I$(srcdir)/../lib -I$(srcdir)/../common -I$(srcdir)/../bpfcompiler @PCAPINC@ @DAGINC@ @NAPATECHINC@ @COMBO6INC@ -D_NT_OS_TYPE=_NT_OS_TYPE_LINUX -D_GNU_SOURCE -D_THREAD_SAFE
libdir = $(pkgdatadir)
if DRIVER_DAG
......@@ -13,7 +13,11 @@ if DRIVER_NAPATECH
BUILD_napatechdrv = mapinapatechdrv.la
endif
lib_LTLIBRARIES = mapinicdrv.la mapivindrv.la $(BUILD_dagdrv) $(BUILD_enp2611drv) $(BUILD_napatechdrv)
if DRIVER_COMBO6
BUILD_combo6drv = mapicombo6drv.la
endif
lib_LTLIBRARIES = mapinicdrv.la mapivindrv.la $(BUILD_dagdrv) $(BUILD_enp2611drv) $(BUILD_napatechdrv) $(BUILD_combo6drv)
# mapi device drivers are dynamically loadable modules (but not standalone
# libraries for users)
......@@ -76,4 +80,17 @@ mapinapatechdrv_la_LIBADD = \
mapinapatechdrv_la_SOURCES = mapinapatechdrv.c mapidlib.c mapidlib.h mapidrv.h
endif
EXTRA_DIST = mapicombo6drv.c
if DRIVER_COMBO6
mapicombo6drv_la_LDFLAGS = -module
mapicombo6drv_la_LIBADD = \
../common/libflist.la \
../common/libmapiipc.la \
../common/libparseconf.la \
../common/libprintfstring.la \
../common/libmapilibhandler.la \
../common/libdebug.la \
-lrt @COMBO6LIB@
mapicombo6drv_la_SOURCES = mapicombo6drv.c mapidlib.c mapidlib.h mapidrv.h
endif
#EXTRA_DIST =
This diff is collapsed.
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