1AC_INIT([mos_release], version-0.3, [[email protected]])
2
3# Check for cc
4AC_PROG_CC
5#AC_PROG_INSTALL
6AC_PROG_RANLIB
7#LT_INIT
8AM_PROG_CC_C_O
9#AC_PROG_LIBTOOL
10AC_LANG(C)
11AC_DISABLE_OPTION_CHECKING
12
13# Check for scheduling
14AC_CHECK_HEADER(linux/sched.h,,,)
15# Check for pthreads
16AC_CHECK_HEADER(pthread.h,,,)
17# Check for numa
18AC_CHECK_HEADER(numa.h,,,)
19AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h stddef.h stdlib.h string.h strings.h sys/param.h sys/time.h unistd.h])
20
21# Check for typedefs, structures, and compiler characteristics
22AC_C_INLINE
23AC_TYPE_OFF_T
24AC_TYPE_SIZE_T
25AC_TYPE_SSIZE_T
26AC_TYPE_UINT16_T
27AC_TYPE_UINT32_T
28AC_TYPE_UINT8_T
29
30# Checks for library functions.
31AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
32AC_FUNC_MALLOC
33AC_CHECK_FUNCS([ftruncate gettimeofday memset strcasecmp strchr strpbrk strrchr strstr])
34
35# Reset DPDK to 0
36AC_SUBST(DPDK, 0)
37# Reset PSIO to 0
38AC_SUBST(PSIO, 0)
39# Reset Netmap to 0
40AC_SUBST(NETMAP, 0)
41
42# Enable dpdk
43AC_ARG_ENABLE([dpdk],
44	  AS_HELP_STRING([--enable-dpdk], [Enable dpdk-16.04]))
45
46AS_IF([test "x$enable_dpdk" = "xyes"], [
47	 dnl Do the stuff needed for enabling the feature
48      	 AC_SUBST(DPDK, 1)
49])
50
51# Enable netmap
52AC_ARG_ENABLE([netmap],
53	  AS_HELP_STRING([--enable-netmap], [Enable netmap]))
54
55AS_IF([test "x$enable_netmap" = "xyes"], [
56	 dnl Do the stuff needed for enabling the feature
57      	 AC_SUBST(NETMAP, 1)
58])
59
60# Enable psio
61AC_ARG_ENABLE([psio],
62	  AS_HELP_STRING([--enable-psio], [Enable packetshader I/O]))
63
64AS_IF([test "x$enable_psio" = "xyes"], [
65	 dnl Do the stuff needed for enabling the feature
66      	 AC_SUBST(PSIO, 1)
67])
68
69if test "$DPDK" == "0" && test "$PSIO" == "0" && test "$NETMAP" == "0"
70then
71        AC_MSG_ERROR([Packet I/O library is missing. Please set either dpdk, netmap or psio as your I/O lib.I am choosing pcap as your I/O lib!])
72fi
73
74AC_OUTPUT(../core/src/Makefile)
75AC_OUTPUT(../samples/epserver/Makefile)
76AC_OUTPUT(../samples/epwget/Makefile)
77AC_OUTPUT(../samples/midstat/Makefile)
78AC_OUTPUT(../samples/simple_firewall/Makefile)
79AC_OUTPUT(../samples/nat/Makefile)
80
81