diff --git a/configure.ac b/configure.ac index f305c548..b29f8b41 100644 --- a/configure.ac +++ b/configure.ac @@ -38,7 +38,7 @@ AC_DEFINE([OPENVPN_VERSION_MINOR], [PRODUCT_VERSION_MINOR], [OpenVPN minor versi AC_DEFINE([OPENVPN_VERSION_PATCH], ["PRODUCT_VERSION_PATCH"], [OpenVPN patch level - may be a string or integer]) AC_CONFIG_AUX_DIR([.]) -AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_HEADERS([config.h include/openvpn-plugin.h]) AC_CONFIG_SRCDIR([src/openvpn/syshead.h]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/include/Makefile.am b/include/Makefile.am index 37962a6f..a52c4278 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -16,10 +16,3 @@ MAINTAINERCLEANFILES = \ include_HEADERS = \ openvpn-plugin.h \ openvpn-msg.h - -openvpn-plugin.h: openvpn-plugin.h.in Makefile - $(AM_V_GEN)sed -e 's|\@PLUGINDIR\@|$(plugindir)|' \ - -e 's|\@OPENVPN_VERSION_MAJOR\@|$(OPENVPN_VERSION_MAJOR)|' \ - -e 's|\@OPENVPN_VERSION_MINOR\@|$(OPENVPN_VERSION_MINOR)|' \ - -e 's|\@OPENVPN_VERSION_PATCH\@|$(OPENVPN_VERSION_PATCH)|' \ - $< > $@.tmp && mv $@.tmp $@ diff --git a/include/openvpn-plugin.h.in b/include/openvpn-plugin.h.in index a084fc1a..0b303520 100644 --- a/include/openvpn-plugin.h.in +++ b/include/openvpn-plugin.h.in @@ -27,8 +27,6 @@ #define OPENVPN_PLUGIN_VERSION 3 -#define PLUGIN_LIBDIR "@PLUGINDIR@" - #ifdef ENABLE_CRYPTO #ifdef ENABLE_CRYPTO_MBEDTLS #include diff --git a/src/openvpn/Makefile.am b/src/openvpn/Makefile.am index bea294b3..3f978553 100644 --- a/src/openvpn/Makefile.am +++ b/src/openvpn/Makefile.am @@ -27,7 +27,9 @@ 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