---
 Makefile.plugins |   19 +++++++++++++++++++
 configure.ac     |   20 ++++++++++++++++++++
 2 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/Makefile.plugins b/Makefile.plugins
index 4e33524..5b1225d 100644
--- a/Makefile.plugins
+++ b/Makefile.plugins
@@ -155,6 +155,25 @@ plugins_l2tp_la_LDFLAGS = $(plugin_ldflags)
 endif
 endif
 
+if PPTP
+if PPTP_BUILTIN
+builtin_modules += pptp
+builtin_sources += plugins/pptp.c
+builtin_vpn_sources = plugins/vpn.c plugins/vpn.h
+builtin_cflags += -DPPPD=\"@PPPD@\" -DPPTP=\"@PPTP@\"
+else
+plugin_LTLIBRARIES += plugins/pptp.la
+plugin_objects += $(plugins_pptp_la_OBJECTS)
+plugins_pptp_la_SOURCES = plugins/vpn.h plugins/vpn.c \
+                                               plugins/pptp.c
+plugins_pptp_la_CFLAGS = $(plugin_cflags) -DPPPD=\"@PPPD@\" \
+                                       -DPPTP=\"@PPTP@\" \
+                                       -DSTATEDIR=\""$(statedir)"\" \
+                                       -DSCRIPTDIR=\""$(build_scriptdir)"\"
+plugins_pptp_la_LDFLAGS = $(plugin_ldflags)
+endif
+endif
+
 builtin_sources += $(builtin_vpn_sources)
 
 if PORTAL
diff --git a/configure.ac b/configure.ac
index 075255c..9c834ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -126,6 +126,26 @@ fi
 AM_CONDITIONAL(L2TP, test "${enable_l2tp}" != "no")
 AM_CONDITIONAL(L2TP_BUILTIN, test "${enable_l2tp}" = "builtin")
 
+AC_ARG_ENABLE(pptp,
+       AC_HELP_STRING([--enable-pptp], [enable pptp support]),
+                       [enable_pptp=${enableval}], [enable_pptp="no"])
+if (test "${enable_pptp}" != "no"); then
+       if (test -z "${path_pppd}"); then
+               AC_PATH_PROG(PPPD, [pppd], [], $PATH:/sbin:/usr/sbin)
+       else
+               PPPD="${path_pppd}"
+               AC_SUBST(PPPD)
+       fi
+       if (test -z "${path_pptp}"); then
+               AC_PATH_PROG(PPTP, [pptp], [], $PATH:/sbin:/usr/sbin)
+       else
+               PPTP="${path_pptp}"
+               AC_SUBST(PPTP)
+       fi
+fi
+AM_CONDITIONAL(PPTP, test "${enable_pptp}" != "no")
+AM_CONDITIONAL(PPTP_BUILTIN, test "${enable_pptp}" = "builtin")
+
 AC_ARG_ENABLE(portal,
        AC_HELP_STRING([--enable-portal], [enable portal detection support]),
                        [enable_portal=${enableval}], [enable_portal="no"])
-- 
1.7.1

_______________________________________________
connman mailing list
connman@connman.net
http://lists.connman.net/listinfo/connman

Reply via email to