From: Christian Hesse <m...@eworm.de>

Drop --with-plugindir, instead use an environment variable PLUGINDIR
to specify the plugin directory.

This always defines PLUGIN_LIBDIR and enables plugin search path.

Signed-off-by: Christian Hesse <m...@eworm.de>
---
 configure.ac            | 14 ++++++--------
 src/openvpn/Makefile.am |  3 ++-
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/configure.ac b/configure.ac
index f4073d0..5fe652e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -301,13 +301,12 @@ 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_ARG_VAR([PLUGINDIR], [Path of plug-in directory 
@<:@default=LIBDIR/openvpn/plugins@:>@])
+if test -n "${PLUGINDIR}"; then
+       plugindir="${PLUGINDIR}"
+else
+       plugindir="\${libdir}/openvpn/plugins"
+fi
 
 AC_DEFINE_UNQUOTED([TARGET_ALIAS], ["${host}"], [A string representing our 
host])
 case "$host" in
@@ -1245,7 +1244,6 @@ AM_CONDITIONAL([ENABLE_PLUGIN_AUTH_PAM], [test 
"${enable_plugin_auth_pam}" = "ye
 AM_CONDITIONAL([ENABLE_PLUGIN_DOWN_ROOT], [test "${enable_plugin_down_root}" = 
"yes"])
 AM_CONDITIONAL([ENABLE_CRYPTO], [test "${enable_crypto}" = "yes"])
 
-plugindir="${with_plugindir}"
 sampledir="\$(docdir)/sample"
 AC_SUBST([plugindir])
 AC_SUBST([sampledir])
diff --git a/src/openvpn/Makefile.am b/src/openvpn/Makefile.am
index 4c18449..188834a 100644
--- a/src/openvpn/Makefile.am
+++ b/src/openvpn/Makefile.am
@@ -27,7 +27,8 @@ AM_CFLAGS = \
        $(OPTIONAL_CRYPTO_CFLAGS) \
        $(OPTIONAL_LZO_CFLAGS) \
        $(OPTIONAL_LZ4_CFLAGS) \
-       $(OPTIONAL_PKCS11_HELPER_CFLAGS)
+       $(OPTIONAL_PKCS11_HELPER_CFLAGS) \
+       -DPLUGIN_LIBDIR=\"${plugindir}\"
 if WIN32
 # we want unicode entry point but not the macro
 AM_CFLAGS += -municode -UUNICODE
-- 
2.10.2


------------------------------------------------------------------------------
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to