]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
plugin: Remove GNUism in openvpn-plugin.h generation
authorChristian Hesse <mail@eworm.de>
Fri, 27 Jan 2017 08:49:27 +0000 (09:49 +0100)
committerDavid Sommerseth <davids@openvpn.net>
Fri, 27 Jan 2017 14:46:35 +0000 (15:46 +0100)
The plugin path handling cleanup (4590c383) introduced GNUism and broke
builds on system not using GNU Make (like *BSD).

Revert back to let configure generate the header file. Instead let make
add an extra CFLAG that defines PLUGIN_LIBDIR.

Signed-off-by: Christian Hesse <mail@eworm.de>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20170127084927.21040-1-list@eworm.de>
URL: http://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13966.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
(cherry picked from commit 631812fe29c69d0034628ab8321cb4016cb4fc2d)

configure.ac
include/Makefile.am
include/openvpn-plugin.h.in
src/openvpn/Makefile.am

index f305c54880ddd37564c71870bd6f3f631e321a5c..b29f8b410dfb69bce1145c3bb4a1ba011f0636ec 100644 (file)
@@ -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])
 
index 37962a6f21e2cb74497bf7ff00425160e5696e61..a52c4278bce00ee3453ba590ed0ef0645466535d 100644 (file)
@@ -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 $@
index a084fc1a7d0bacb0bbae4e5da34569ef86156080..0b303520a305448003541afae306e0221aaa4410 100644 (file)
@@ -27,8 +27,6 @@
 
 #define OPENVPN_PLUGIN_VERSION 3
 
-#define PLUGIN_LIBDIR "@PLUGINDIR@"
-
 #ifdef ENABLE_CRYPTO
 #ifdef ENABLE_CRYPTO_MBEDTLS
 #include <mbedtls/x509_crt.h>
index bea294b3559deec1d6c49ac4a1f3ed4439265f73..3f9785531627de28cde32934dee5b3c10da31aec 100644 (file)
@@ -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