blob: bd04824bb1c089742027c67cea5932ce121d3c62 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
##########################################################################
# Enable netmap support
##########################################################################
netmap_support=no
AC_ARG_ENABLE([netmap_support],
[ --enable-netmap-support include netmap IO support],
[if test x$enableval = xyes; then
netmap_support=yes
fi])
##########################################################################
# Set optional netmap path
##########################################################################
AC_ARG_WITH([netmap-path],
AC_HELP_STRING([--with-netmap-path=DIR path to netmap root directory],
[(or in the default path if not specified).]),
[NETMAP_PATH=$withval
NETMAP_CPPFLAGS="-isystem $NETMAP_PATH/sys"
netmap_support=yes],[])
##########################################################################
# Save and set temporary compilation flags
##########################################################################
OLD_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$NETMAP_CPPFLAGS $CPPFLAGS"
##########################################################################
# Check for netmap availability
##########################################################################
if test x$netmap_support = xyes
then
AC_CHECK_HEADERS([net/netmap_user.h], [],
[AC_MSG_FAILURE(["can't find netmap header"])])
AC_DEFINE([ODP_NETMAP], [1],
[Define to 1 to enable netmap IO support])
AC_SUBST([NETMAP_CPPFLAGS])
else
netmap_support=no
fi
##########################################################################
# Restore old saved variables
##########################################################################
CPPFLAGS=$OLD_CPPFLAGS
AM_CONDITIONAL([netmap_support], [test x$netmap_support = xyes ])
|