]> git.ipfire.org Git - thirdparty/openvpn.git/commit - configure.ac
sample-plugins: Partially autotoolize the sample-plugins build
authorDavid Sommerseth <davids@openvpn.net>
Wed, 16 Sep 2020 14:19:56 +0000 (16:19 +0200)
committerGert Doering <gert@greenie.muc.de>
Wed, 16 Sep 2020 14:22:44 +0000 (16:22 +0200)
commit0b5141d8f946a274bf27b3592ac07dc9c6b0ee71
tree68f52d3464bd3ece8d2d1bbe6c59425e5974866b
parent81b6a7e75b343e324a44b4476c89c596d7b6c74b
sample-plugins: Partially autotoolize the sample-plugins build

The sample-plugins have their own set of build/winbuild scripts in each
of these plugin directories.  This does not give a good way to reuse
various macros the autoconf/automake/configure process enables; which
can contain important macros to make some code build without errors or
warnings.

Normally we would embrace the full autoconf/automake approach. But this
is sample code which we only want to build per request and the built
code should not be installed anywhere via 'make install'.  But since we
do use libtool other plug-ins being installed and automake gets kind of
cranky when it comes to define certain build targets not following the
expected use cases, we try to only embrace just enough of automake to
get our main goals achieved.

This changeset kicks out the build scripts and replaces them with a
single Makefile.plugins file, which defines the plugins we want to build
by default when running 'make from the sample-plugins directory.
Neither of these plugins are otherwise built by default.  No sample-plugins
are being installed.  But we have enough strings attached to automake
to grab the CFLAGS and LDFLAGS used by the rest of the code.  This also
makes it easy to use #include "config.h" in sample code, to also get
various macros defined by the ./configure run.

This patch does not touch the winbuild scripts, as it seems building
these sample-plugins on Windows requires a bit different compile and
linking steps than *nix systems in general.

Signed-off-by: David Sommerseth <davids@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20200916141956.1277-1-davids@openvpn.net>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg21020.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
configure.ac
sample/sample-plugins/Makefile.am [new file with mode: 0644]
sample/sample-plugins/Makefile.plugins [new file with mode: 0644]
sample/sample-plugins/README [new file with mode: 0644]
sample/sample-plugins/defer/README [deleted file]
sample/sample-plugins/defer/build [deleted file]
sample/sample-plugins/keying-material-exporter-demo/build [deleted file]
sample/sample-plugins/log/build [deleted file]
sample/sample-plugins/simple/README [deleted file]
sample/sample-plugins/simple/build [deleted file]