aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authordvn <git@dvn.me>2018-06-23 23:34:46 +0200
committerdvn <git@dvn.me>2018-06-24 11:45:27 +0200
commit6661aa497507a4843712946b454551fabaa666b5 (patch)
treefa2ac3b88a9a09ecf4eeb1a82646c848f22e8dda /configure.ac
parentb550d58cb1d4ad39f491dd742bfee360a1f74963 (diff)
downloadgnunet-6661aa497507a4843712946b454551fabaa666b5.tar.gz
gnunet-6661aa497507a4843712946b454551fabaa666b5.zip
Issue 5352 'iptables is hardcoded': Check for iptables (and ifconfig) in $PATH during the configure phase of the build process. This also creates a variable of the full path to iptables. Next step is to replace the hardcoded path with this variable in the code.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 26 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index c6910c1de..204859556 100644
--- a/configure.ac
+++ b/configure.ac
@@ -198,11 +198,24 @@ AC_CHECK_LIB(c, getloadavg, AC_DEFINE(HAVE_GETLOADAVG,1,[getloadavg supported]))
198AC_CHECK_PROG(VAR_GETOPT_BINARY, getopt, true, false) 198AC_CHECK_PROG(VAR_GETOPT_BINARY, getopt, true, false)
199AM_CONDITIONAL(HAVE_GETOPT_BINARY, $VAR_GETOPT_BINARY) 199AM_CONDITIONAL(HAVE_GETOPT_BINARY, $VAR_GETOPT_BINARY)
200 200
201AC_CHECK_PROG(VAR_SSH_BINARY,ssh,true,false) 201AC_CHECK_PROG(VAR_SSH_BINARY, ssh, true, false)
202AM_CONDITIONAL(HAVE_SSH_BINARY, $VAR_SSH_BINARY) 202AM_CONDITIONAL(HAVE_SSH_BINARY, $VAR_SSH_BINARY)
203AM_CONDITIONAL(HAVE_SSH_KEY, ssh -D 12345 -o "BatchMode yes" -o "UserKnownHostsFile /tmp/gnunet_test_cosks_ssh_garbage" -o "StrictHostKeyChecking no" 127.0.0.1 echo -n) 203AM_CONDITIONAL(HAVE_SSH_KEY, ssh -D 12345 -o "BatchMode yes" -o "UserKnownHostsFile /tmp/gnunet_test_cosks_ssh_garbage" -o "StrictHostKeyChecking no" 127.0.0.1 echo -n)
204rm -f /tmp/gnunet_test_cosks_ssh_garbage 204rm -f /tmp/gnunet_test_cosks_ssh_garbage
205 205
206# iptables is a soft requirement to run tests
207AC_PATH_TARGET_TOOL(VAR_IPTABLES_BINARY, iptables, false)
208
209if test x"$VAR_IPTABLES_BINARY" != x"false"
210then
211AC_DEFINE_UNQUOTED([IPTABLES], "$VAR_IPTABLES_BINARY", [Path to iptables])
212else
213AC_MSG_WARN([warning: 'iptables' not found.])
214fi
215
216
217AC_CHECK_PROG(VAR_IFCONFIG_BINARY, ifconfig, true, false)
218AC_MSG_WARN([warning: 'ifconfig' not found.])
206 219
207AC_CHECK_MEMBER(struct tm.tm_gmtoff, 220AC_CHECK_MEMBER(struct tm.tm_gmtoff,
208 [AC_DEFINE(HAVE_TM_GMTOFF, 1, 221 [AC_DEFINE(HAVE_TM_GMTOFF, 1,
@@ -1768,6 +1781,18 @@ then
1768 AC_MSG_NOTICE([WARNING: jansson library not found. json support will not be compiled.]) 1781 AC_MSG_NOTICE([WARNING: jansson library not found. json support will not be compiled.])
1769fi 1782fi
1770 1783
1784# warn user if iptables is not found
1785if test "$VAR_IPTABLES_BINARY" = "false"
1786then
1787AC_MSG_NOTICE([WARNING: iptables not found. some modules may not have full functionality.])
1788fi
1789
1790# warn user if ifconfig is not found
1791if test "$VAR_IFCONFIG_BINARY" = "false"
1792then
1793AC_MSG_NOTICE([WARNING: ifconfig not found. some modules may not have full functionality.])
1794fi
1795
1771#gnutls 1796#gnutls
1772if test x$gnutls != xtrue 1797if test x$gnutls != xtrue
1773then 1798then