aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAntonio Quartulli2019-06-16 01:02:12 +0200
committerGert Doering2019-06-16 10:16:49 +0200
commit1e894662c6a455e6ab7aa1bb2d9a8d3296265199 (patch)
treeb1d38bad8a8510061a03672cfd154128f5648898 /configure.ac
parentbebd25a0e3a2aba0b1f98463a87b24db6c419a66 (diff)
downloadopenvpn-1e894662c6a455e6ab7aa1bb2d9a8d3296265199.zip
openvpn-1e894662c6a455e6ab7aa1bb2d9a8d3296265199.tar.gz
t_net.sh: make bash dep explicit and run only if SITNL is compiled
The t_net script currently has #!/bin/sh but it implicitly assume to be using bash. This is fine on most distros, but some do not have sh pointing to bash by default, thus breaking the script. Explicitly use bash to avoid failures. On the other hand, run this unit-test only if SITNL was enabled at compile time. This test was designed with SITNL in mind and it is not yet ready for other backends. Running only when SITNL is enabled implies running on Linux only therefore we are guaranteed that bash will always work. While at it, also add a comment as of why the t_client.rc file is sourced. Signed-off-by: Antonio Quartulli <antonio@openvpn.net> Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <20190615230213.14888-1-a@unstable.cc> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18547.html Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 2d78098..8c95e31 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1226,11 +1226,14 @@ else
enable_plugin_down_root="no"
fi
+AM_CONDITIONAL([HAVE_SITNL], [false])
+
if test "${enable_iproute2}" = "yes"; then
test -z "${IPROUTE}" && AC_MSG_ERROR([ip utility is required but missing])
AC_DEFINE([ENABLE_IPROUTE], [1], [enable iproute2 support])
else if test "${have_sitnl}" = "yes"; then
AC_DEFINE([ENABLE_SITNL], [1], [enable sitnl support])
+ AM_CONDITIONAL([HAVE_SITNL], [true])
else if test "${WIN32}" != "yes" -a "${have_sitnl}" != "yes"; then
test -z "${ROUTE}" && AC_MSG_ERROR([route utility is required but missing])
test -z "${IFCONFIG}" && AC_MSG_ERROR([ifconfig utility is required but missing])