-AM_CONDITIONAL(LOOPBACK, test "${enable_loopback}" != "no")
-AM_CONDITIONAL(LOOPBACK_BUILTIN, test "${enable_loopback}" = "builtin")
-
-AC_ARG_ENABLE(dnsproxy,
- AC_HELP_STRING([--enable-dnsproxy], [enable DNS proxy support]),
- [enable_dnsproxy=${enableval}], [enable_dnsproxy="no"])
-
-AM_CONDITIONAL(DNSPROXY, test "${enable_dnsproxy}" != "no")
-AM_CONDITIONAL(DNSPROXY_BUILTIN, test "${enable_dnsproxy}" = "builtin")
-
-AC_ARG_ENABLE(pacrunner,
- AC_HELP_STRING([--enable-pacrunner], [enable PAC runner support]),
- [enable_pacrunner=${enableval}], [enable_pacrunner="no"])
-
-AM_CONDITIONAL(PACRUNNER, test "${enable_pacrunner}" != "no")
-AM_CONDITIONAL(PACRUNNER_BUILTIN, test "${enable_pacrunner}" = "builtin")
-
-AC_ARG_ENABLE(google,
- AC_HELP_STRING([--enable-google], [enable Google Public DNS support]),
- [enable_google=${enableval}], [enable_google="no"])
-AM_CONDITIONAL(GOOGLE, test "${enable_google}" != "no")
-AM_CONDITIONAL(GOOGLE_BUILTIN, test "${enable_google}" = "builtin")
-
-AC_ARG_ENABLE(meego,
- AC_HELP_STRING([--enable-meego], [enable MeeGo features support]),
- [enable_meego=${enableval}], [enable_meego="no"])
-AM_CONDITIONAL(MEEGO, test "${enable_meego}" != "no")
-AM_CONDITIONAL(MEEGO_BUILTIN, test "${enable_meego}" = "builtin")
+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)
+ if (test -z "${VPNC}"); then
+ AC_MSG_ERROR(vpnc binary not found)
+ fi
+ 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_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(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")