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

diff --git a/Makefile.plugins b/Makefile.plugins
index 64bd8e7..c029111 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 PACRUNNER
diff --git a/configure.ac b/configure.ac
index 66b663c..8a9691d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -168,6 +168,28 @@ 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], [/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_pptp}"); then
+               AC_PATH_PROG(PPTP, [pptp], [/usr/sbin/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(loopback,
        AC_HELP_STRING([--enable-loopback], [enable loopback support]),
                        [enable_loopback=${enableval}], [enable_loopback="no"])
-- 
1.7.1

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

Reply via email to