diff options
author | dvn <git@dvn.me> | 2018-06-23 23:34:46 +0200 |
---|---|---|
committer | dvn <git@dvn.me> | 2018-06-24 11:45:27 +0200 |
commit | 6661aa497507a4843712946b454551fabaa666b5 (patch) | |
tree | fa2ac3b88a9a09ecf4eeb1a82646c848f22e8dda /configure.ac | |
parent | b550d58cb1d4ad39f491dd742bfee360a1f74963 (diff) | |
download | gnunet-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.ac | 27 |
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])) | |||
198 | AC_CHECK_PROG(VAR_GETOPT_BINARY, getopt, true, false) | 198 | AC_CHECK_PROG(VAR_GETOPT_BINARY, getopt, true, false) |
199 | AM_CONDITIONAL(HAVE_GETOPT_BINARY, $VAR_GETOPT_BINARY) | 199 | AM_CONDITIONAL(HAVE_GETOPT_BINARY, $VAR_GETOPT_BINARY) |
200 | 200 | ||
201 | AC_CHECK_PROG(VAR_SSH_BINARY,ssh,true,false) | 201 | AC_CHECK_PROG(VAR_SSH_BINARY, ssh, true, false) |
202 | AM_CONDITIONAL(HAVE_SSH_BINARY, $VAR_SSH_BINARY) | 202 | AM_CONDITIONAL(HAVE_SSH_BINARY, $VAR_SSH_BINARY) |
203 | AM_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) | 203 | AM_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) |
204 | rm -f /tmp/gnunet_test_cosks_ssh_garbage | 204 | rm -f /tmp/gnunet_test_cosks_ssh_garbage |
205 | 205 | ||
206 | # iptables is a soft requirement to run tests | ||
207 | AC_PATH_TARGET_TOOL(VAR_IPTABLES_BINARY, iptables, false) | ||
208 | |||
209 | if test x"$VAR_IPTABLES_BINARY" != x"false" | ||
210 | then | ||
211 | AC_DEFINE_UNQUOTED([IPTABLES], "$VAR_IPTABLES_BINARY", [Path to iptables]) | ||
212 | else | ||
213 | AC_MSG_WARN([warning: 'iptables' not found.]) | ||
214 | fi | ||
215 | |||
216 | |||
217 | AC_CHECK_PROG(VAR_IFCONFIG_BINARY, ifconfig, true, false) | ||
218 | AC_MSG_WARN([warning: 'ifconfig' not found.]) | ||
206 | 219 | ||
207 | AC_CHECK_MEMBER(struct tm.tm_gmtoff, | 220 | AC_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.]) |
1769 | fi | 1782 | fi |
1770 | 1783 | ||
1784 | # warn user if iptables is not found | ||
1785 | if test "$VAR_IPTABLES_BINARY" = "false" | ||
1786 | then | ||
1787 | AC_MSG_NOTICE([WARNING: iptables not found. some modules may not have full functionality.]) | ||
1788 | fi | ||
1789 | |||
1790 | # warn user if ifconfig is not found | ||
1791 | if test "$VAR_IFCONFIG_BINARY" = "false" | ||
1792 | then | ||
1793 | AC_MSG_NOTICE([WARNING: ifconfig not found. some modules may not have full functionality.]) | ||
1794 | fi | ||
1795 | |||
1771 | #gnutls | 1796 | #gnutls |
1772 | if test x$gnutls != xtrue | 1797 | if test x$gnutls != xtrue |
1773 | then | 1798 | then |