[PATCH 2/3 v2] Add build suppport for VPNC.

Mohamed Abbas mabbas at linux.intel.com
Mon Jan 17 12:33:17 PST 2011


initial
---
 Makefile.plugins |   27 +++++++++++++++++++++++++++
 configure.ac     |   20 ++++++++++++++++++++
 2 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/Makefile.plugins b/Makefile.plugins
index 025e972..9402298 100644
--- a/Makefile.plugins
+++ b/Makefile.plugins
@@ -130,11 +130,32 @@ plugins_openvpn_la_LDFLAGS = $(plugin_ldflags)
 endif
 endif
 
+if VPNC
+if VPNC_BUILTIN
+builtin_modules += vpnc
+builtin_sources += plugins/vpnc.c
+builtin_cflags += -DVPNC=\"@VPNC@\"
+else
+plugin_LTLIBRARIES += plugins/vpnc.la
+plugin_objects += $(plugins_vpnc_la_OBJECTS)
+plugins_vpnc_la_SOURCES = plugins/vpn.h plugins/vpn.c \
+						plugins/vpnc.c
+plugins_vpnc_la_CFLAGS = $(plugin_cflags) -DVPNC=\"@VPNC@\" \
+					-DSTATEDIR=\""$(statedir)"\" \
+					-DSCRIPTDIR=\""$(build_scriptdir)"\"
+plugins_vpnc_la_LDFLAGS = $(plugin_ldflags)
+endif
+endif
+
 if OPENCONNECT_BUILTIN
 builtin_sources += plugins/vpn.c plugins/vpn.h
 else
 if OPENVPN_BUILTIN
 builtin_sources += plugins/vpn.c plugins/vpn.h
+else
+if VPNC_BUILTIN
+builtin_sources += plugins/vpn.c plugins/vpn.h
+endif
 endif
 endif
 
@@ -243,6 +264,12 @@ if OPENCONNECT
 script_PROGRAMS += scripts/openconnect-script
 
 scripts_openconnect_script_LDADD = @DBUS_LIBS@
+else
+if VPNC
+script_PROGRAMS += scripts/vpnc-script
+
+scripts_vpnc_script_LDADD = @DBUS_LIBS@
+endif
 endif
 
 if OPENVPN
diff --git a/configure.ac b/configure.ac
index a0a1dca..07cd053 100644
--- a/configure.ac
+++ b/configure.ac
@@ -135,6 +135,26 @@ fi
 AM_CONDITIONAL(OPENVPN, test "${enable_openvpn}" != "no")
 AM_CONDITIONAL(OPENVPN_BUILTIN, test "${enable_openvpn}" = "builtin")
 
+AC_ARG_WITH(vpnc, AC_HELP_STRING([--with-vpnc=PROGRAM],
+	[specify location of vpnc binary]), [path_vpnc=${withval}])
+
+AC_ARG_ENABLE(vpnc,
+	AC_HELP_STRING([--enable-vpnc], [enable vpnc support]),
+		[enable_vpnc=${enableval}], [enable_vpnc="no"])
+if (test "${enable_vpnc}" != "no"); then
+	if (test -z "${path_vpnc}"); then
+		AC_PATH_PROG(VPNC, [vpnc], [], $PATH:/sbin:/usr/sbin)
+	else
+		VPNC="${path_vpnc}"
+		AC_SUBST(VPNC)
+	fi
+fi
+AM_CONDITIONAL(VPNC, test "${enable_vpnc}" != "no")
+AM_CONDITIONAL(VPNC_BUILTIN, test "${enable_vpnc}" = "builtin")
+
+AC_ARG_WITH(vpnc, AC_HELP_STRING([--with-pptp=PROGRAM],
+	[specify location of pptp binary]), [path_pptp=${withval}])
+
 AC_ARG_ENABLE(loopback,
 	AC_HELP_STRING([--enable-loopback], [enable loopback support]),
 			[enable_loopback=${enableval}], [enable_loopback="no"])
-- 
1.7.3.4




More information about the connman mailing list