summaryrefslogtreecommitdiff
path: root/openvpn/configure.ac
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-07-21 01:11:36 +0200
committerArne Schwabe <arne@rfc2549.org>2012-07-21 01:11:36 +0200
commitb179d94eb3b87e46721e7060386ff1a2f64669a6 (patch)
tree2d602225b423424100d022085376a36a765d0ff9 /openvpn/configure.ac
parent266db4b701d38f52fa246af45778bb2fcee9893c (diff)
Update openvpn to Version 2.3_alpha3
Diffstat (limited to 'openvpn/configure.ac')
-rw-r--r--openvpn/configure.ac84
1 files changed, 83 insertions, 1 deletions
diff --git a/openvpn/configure.ac b/openvpn/configure.ac
index 913ace63..d3d974dc 100644
--- a/openvpn/configure.ac
+++ b/openvpn/configure.ac
@@ -194,6 +194,38 @@ AC_ARG_ENABLE(
)
AC_ARG_ENABLE(
+ [plugin-auth-pam],
+ [AS_HELP_STRING([--disable-plugin-auth-pam], [disable auth-pam plugin @<:@default=platform specific@:>@])],
+ ,
+ [
+ case "$host" in
+ *-*-openbsd*) enable_plugin_auth_pam="no";;
+ *-mingw*) enable_plugin_auth_pam="no";;
+ *) enable_plugin_auth_pam="yes";;
+ esac
+ ]
+)
+
+AC_ARG_ENABLE(
+ [plugin-down-root],
+ [AS_HELP_STRING([--disable-plugin-down-root], [disable down-root plugin @<:@default=platform specific@:>@])],
+ ,
+ [
+ case "$host" in
+ *-mingw*) enable_plugin_down_root="no";;
+ *) enable_plugin_down_root="yes";;
+ esac
+ ]
+)
+
+AC_ARG_ENABLE(
+ [pam-dlopen],
+ [AS_HELP_STRING([--enable-pam-dlopen], [dlopen libpam @<:@default=no@:>@])],
+ ,
+ [enable_pam_dlopen="no"]
+)
+
+AC_ARG_ENABLE(
[strict],
[AS_HELP_STRING([--enable-strict], [enable strict compiler warnings (debugging option) @<:@default=no@:>@])],
,
@@ -229,6 +261,12 @@ AC_ARG_ENABLE(
)
AC_ARG_WITH(
+ [special-build],
+ [AS_HELP_STRING([--with-special-build=STRING], [specify special build string])],
+ [test -n "${withval}" && AC_DEFINE_UNQUOTED([CONFIGURE_SPECIAL_BUILD], ["${withval}"], [special build string])]
+)
+
+AC_ARG_WITH(
[mem-check],
[AS_HELP_STRING([--with-mem-check=TYPE], [build with debug memory checking, TYPE=no|dmalloc|valgrind|ssl @<:@default=no@:>@])],
[
@@ -252,6 +290,14 @@ AC_ARG_WITH(
[with_crypto_library="openssl"]
)
+AC_ARG_WITH(
+ [plugindir],
+ [AS_HELP_STRING([--with-plugindir], [plugin directory @<:@default=LIBDIR/openvpn@:>@])],
+ ,
+ [with_plugindir="\$(libdir)/openvpn/plugins"]
+)
+
+
AC_DEFINE_UNQUOTED([TARGET_ALIAS], ["${host}"], [A string representing our host])
case "$host" in
*-*-linux*)
@@ -277,6 +323,7 @@ case "$host" in
*-*-darwin*)
AC_DEFINE([TARGET_DARWIN], [1], [Are we running on Mac OS X?])
AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["M"], [Target prefix])
+ have_tap_header="yes"
dnl some Mac OS X tendering (we use vararg macros...)
CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
;;
@@ -293,6 +340,7 @@ case "$host" in
;;
*)
AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["X"], [Target prefix])
+ have_tap_header="yes"
;;
esac
@@ -616,6 +664,16 @@ AC_CHECK_LIB(
)
AC_SUBST([SELINUX_LIBS])
+AC_ARG_VAR([LIBPAM_CFLAGS], [C compiler flags for libpam])
+AC_ARG_VAR([LIBPAM_LIBS], [linker flags for libpam])
+if test -z "${LIBPAM_LIBS}"; then
+ AC_CHECK_LIB(
+ [pam],
+ [pam_start],
+ [LIBPAM_LIBS="-lpam"]
+ )
+fi
+
case "${with_mem_check}" in
valgrind)
AC_CHECK_HEADER(
@@ -747,7 +805,7 @@ if test "${with_crypto_library}" = "polarssl" ; then
#include <polarssl/version.h>
]],
[[
-#if POLARSSL_VERSION_NUMBER <= 0x01010000
+#if POLARSSL_VERSION_NUMBER < 0x01010000
#error invalid version
#endif
]]
@@ -886,6 +944,9 @@ if test "${enable_plugins}" = "yes"; then
OPTIONAL_DL_LIBS="${DL_LIBS}"
AC_DEFINE([ENABLE_PLUGIN], [1], [Enable systemd support])
test "${enable_eurephia}" = "yes" && AC_DEFINE([ENABLE_EUREPHIA], [1], [Enable support for the eurephia plug-in])
+else
+ enable_plugin_auth_pam="no"
+ enable_plugin_down_root="no"
fi
if test "${enable_iproute2}" = "yes"; then
@@ -937,6 +998,17 @@ if test "${WIN32}" = "yes"; then
test -z "${MAN2HTML}" && AC_MSG_ERROR([man2html is required for win32])
fi
+if test "${enable_plugin_auth_pam}" = "yes"; then
+ PLUGIN_AUTH_PAM_CFLAGS="${LIBPAM_CFLAGS}"
+ if test "${enable_pam_dlopen}" = "yes"; then
+ AC_DEFINE([USE_PAM_DLOPEN], [1], [dlopen libpam])
+ PLUGIN_AUTH_PAM_LIBS="${DL_LIBS}"
+ else
+ test -z "${LIBPAM_LIBS}" && AC_MSG_ERROR([libpam required but missing])
+ PLUGIN_AUTH_PAM_LIBS="${LIBPAM_LIBS}"
+ fi
+fi
+
CONFIGURE_DEFINES="`set | grep '^enable_.*=' ; set | grep '^with_.*='`"
AC_DEFINE_UNQUOTED([CONFIGURE_DEFINES], ["`echo ${CONFIGURE_DEFINES}`"], [Configuration settings])
@@ -959,10 +1031,17 @@ AC_SUBST([OPTIONAL_LZO_LIBS])
AC_SUBST([OPTIONAL_PKCS11_HELPER_CFLAGS])
AC_SUBST([OPTIONAL_PKCS11_HELPER_LIBS])
+AC_SUBST([PLUGIN_AUTH_PAM_CFLAGS])
+AC_SUBST([PLUGIN_AUTH_PAM_LIBS])
+
AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"])
AM_CONDITIONAL([GIT_CHECKOUT], [test "${GIT_CHECKOUT}" = "yes"])
+AM_CONDITIONAL([ENABLE_PLUGIN_AUTH_PAM], [test "${enable_plugin_auth_pam}" = "yes"])
+AM_CONDITIONAL([ENABLE_PLUGIN_DOWN_ROOT], [test "${enable_plugin_down_root}" = "yes"])
+plugindir="${with_plugindir}"
sampledir="\$(docdir)/sample"
+AC_SUBST([plugindir])
AC_SUBST([sampledir])
AC_CONFIG_FILES([
@@ -979,6 +1058,9 @@ AC_CONFIG_FILES([
src/compat/Makefile
src/openvpn/Makefile
src/openvpnserv/Makefile
+ src/plugins/Makefile
+ src/plugins/auth-pam/Makefile
+ src/plugins/down-root/Makefile
tests/Makefile
sample/Makefile
doc/Makefile