9454c4e765859a1149d005355e8b4310804898aa
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / ipsec-tools / ipsec-tools.mk
1 ################################################################################
2 #
3 # ipsec-tools
4 #
5 ################################################################################
6
7 IPSEC_TOOLS_VERSION_MAJOR = 0.8
8 IPSEC_TOOLS_VERSION = $(IPSEC_TOOLS_VERSION_MAJOR).2
9 IPSEC_TOOLS_SOURCE = ipsec-tools-$(IPSEC_TOOLS_VERSION).tar.bz2
10 IPSEC_TOOLS_SITE = http://ftp.sunet.se/pub/NetBSD/misc/ipsec-tools/$(IPSEC_TOOLS_VERSION_MAJOR)
11 IPSEC_TOOLS_INSTALL_STAGING = YES
12 IPSEC_TOOLS_MAKE = $(MAKE1)
13 IPSEC_TOOLS_DEPENDENCIES = openssl flex host-flex
14
15 # configure hardcodes -Werror, so override CFLAGS on make invocation
16 IPSEC_TOOLS_MAKE_OPTS = CFLAGS='$(TARGET_CFLAGS)'
17
18 # openssl uses zlib, so we need to explicitly link with it when static
19 ifeq ($(BR2_STATIC_LIBS),y)
20 IPSEC_TOOLS_CONF_ENV += LIBS=-lz
21 endif
22
23 IPSEC_TOOLS_CONF_OPTS = \
24           --without-libpam \
25           --disable-gssapi \
26           --with-kernel-headers=$(STAGING_DIR)/usr/include
27
28 ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_ADMINPORT),y)
29 IPSEC_TOOLS_CONF_OPTS += --enable-adminport
30 else
31 IPSEC_TOOLS_CONF_OPTS += --disable-adminport
32 endif
33
34 ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_NATT),y)
35 IPSEC_TOOLS_CONF_OPTS += --enable-natt
36 else
37 IPSEC_TOOLS_CONF_OPTS += --disable-natt
38 endif
39
40 ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_FRAG),y)
41 IPSEC_TOOLS_CONF_OPTS += --enable-frag
42 else
43 IPSEC_TOOLS_CONF_OPTS += --disable-frag
44 endif
45
46 ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_DPD),y)
47 IPSEC_TOOLS_CONF_OPTS += --enable-dpd
48 else
49 IPSEC_TOOLS_CONF_OPTS += --disable-dpd
50 endif
51
52 ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_STATS),y)
53 IPSEC_TOOLS_CONF_OPTS += --enable-stats
54 else
55 IPSEC_TOOLS_CONF_OPTS += --disable-stats
56 endif
57
58 ifneq ($(BR2_PACKAGE_IPSEC_TOOLS_READLINE),y)
59 IPSEC_TOOLS_CONF_OPTS += --without-readline
60 else
61 IPSEC_DEPENDENCIES += readline
62 endif
63
64 ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_HYBRID),y)
65 IPSEC_TOOLS_CONF_OPTS += --enable-hybrid
66 else
67 IPSEC_TOOLS_CONF_OPTS += --disable-hybrid
68 endif
69
70 ifeq ($(BR2_PACKAGE_IPSEC_SECCTX_DISABLE),y)
71 IPSEC_TOOLS_CONF_OPTS += --enable-security-context=no
72 endif
73 ifeq ($(BR2_PACKAGE_IPSEC_SECCTX_ENABLE),y)
74 IPSEC_TOOLS_CONF_OPTS += --enable-security-context=yes
75 endif
76 ifeq ($(BR2_PACKAGE_IPSEC_SECCTX_KERNEL),y)
77 IPSEC_TOOLS_CONF_OPTS += --enable-security-context=kernel
78 endif
79
80 $(eval $(autotools-package))