summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2011-11-15 13:06:20 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-11-15 13:41:44 +0100
commit44cbe333bb30d67463128b0fbd01d2c276142db2 (patch)
tree2b31fb511f184cbc2ff2ad629c8ce6aef5fa9f25
parent764b680c053650985b6f4424c0cdf75b3fbd42b3 (diff)
downloadconnman-44cbe333bb30d67463128b0fbd01d2c276142db2.tar.gz
connman-44cbe333bb30d67463128b0fbd01d2c276142db2.tar.bz2
connman-44cbe333bb30d67463128b0fbd01d2c276142db2.zip
l2tp: Add l2tp makefile and configure file
-rw-r--r--Makefile.plugins18
-rw-r--r--configure.ac22
2 files changed, 40 insertions, 0 deletions
diff --git a/Makefile.plugins b/Makefile.plugins
index bb3a90be..64bd8e7a 100644
--- a/Makefile.plugins
+++ b/Makefile.plugins
@@ -137,6 +137,24 @@ plugins_vpnc_la_LDFLAGS = $(plugin_ldflags)
endif
endif
+if L2TP
+if L2TP_BUILTIN
+builtin_modules += l2tp
+builtin_sources += plugins/l2tp.c
+builtin_vpn_sources = plugins/vpn.c plugins/vpn.h
+builtin_cflags += -DL2TP=\"@L2TP@\"
+else
+plugin_LTLIBRARIES += plugins/l2tp.la
+plugin_objects += $(plugins_l2tp_la_OBJECTS)
+plugins_l2tp_la_SOURCES = plugins/vpn.h plugins/vpn.c \
+ plugins/l2tp.c
+plugins_l2tp_la_CFLAGS = $(plugin_cflags) -DL2TP=\"@L2TP@\" \
+ -DSTATEDIR=\""$(statedir)"\" \
+ -DSCRIPTDIR=\""$(build_scriptdir)"\"
+plugins_l2tp_la_LDFLAGS = $(plugin_ldflags)
+endif
+endif
+
builtin_sources += $(builtin_vpn_sources)
if PACRUNNER
diff --git a/configure.ac b/configure.ac
index 280e587c..ecebbe7f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -155,6 +155,28 @@ fi
AM_CONDITIONAL(VPNC, test "${enable_vpnc}" != "no")
AM_CONDITIONAL(VPNC_BUILTIN, test "${enable_vpnc}" = "builtin")
+AC_ARG_ENABLE(l2tp,
+ AC_HELP_STRING([--enable-l2tp], [enable l2tp support]),
+ [enable_l2tp=${enableval}], [enable_l2tp="no"])
+if (test "${enable_l2tp}" != "no"); then
+ if (test -z "${path_pppd}"); then
+ AC_PATH_PROG(PPPD, [pppd], [/usr/sbin/pppd], $PATH:/sbin:/usr/sbin)
+ else
+ PPPD="${path_pppd}"
+ AC_SUBST(PPPD)
+ fi
+ AC_CHECK_HEADERS(pppd/pppd.h, dummy=yes,
+ AC_MSG_ERROR(ppp header files are required))
+ if (test -z "${path_l2tp}"); then
+ AC_PATH_PROG(L2TP, [xl2tpd], [/usr/sbin/xl2tpd], $PATH:/sbin:/usr/sbin)
+ else
+ L2TP="${path_l2tp}"
+ AC_SUBST(L2TP)
+ fi
+fi
+AM_CONDITIONAL(L2TP, test "${enable_l2tp}" != "no")
+AM_CONDITIONAL(L2TP_BUILTIN, test "${enable_l2tp}" = "builtin")
+
AC_ARG_ENABLE(loopback,
AC_HELP_STRING([--enable-loopback], [enable loopback support]),
[enable_loopback=${enableval}], [enable_loopback="no"])