Skip to content

Commit

Permalink
plugin: Remove GNUism in openvpn-plugin.h generation
Browse files Browse the repository at this point in the history
The plugin path handling cleanup (4590c38) 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>
  • Loading branch information
eworm-de authored and dsommers committed Jan 27, 2017
1 parent 4590c38 commit 631812f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down
7 changes: 0 additions & 7 deletions include/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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 $@
2 changes: 0 additions & 2 deletions include/openvpn-plugin.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 3 additions & 1 deletion src/openvpn/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 631812f

Please sign in to comment.