blob: 894cd95b0faaf9d1079d911779bf6720e339ecdc [file] [log] [blame]
From e8522284ef326bd9f222e04c4a970ffafa56fba6 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sat, 3 Nov 2018 23:23:36 +0100
Subject: [PATCH] fix --disable-tcpkill
If the user uses --disable-tcpkill, build can fail if libnet is not
found on the system.
To fix this, move AC_CHECK_LIB to found libnet outside AC_ARG_ENABLE
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Upstream: https://github.com/jpr5/ngrep/pull/15
---
configure.in | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/configure.in b/configure.in
index dbef39b..7c3dd43 100644
--- a/configure.in
+++ b/configure.in
@@ -173,13 +173,11 @@ dnl
AC_ARG_ENABLE(tcpkill,
[ --enable-tcpkill enable connection killing support (default off)],
-[
- AC_CHECK_LIB(net, libnet_init,,echo !!! error: tcpkill feature enabled but no libnet found; exit)
- use_tcpkill="$enableval"
-],
+[ use_tcpkill="$enableval" ],
[ use_tcpkill="no" ])
if test $use_tcpkill = yes; then
+ AC_CHECK_LIB(net, libnet_init,,echo !!! error: tcpkill feature enabled but no libnet found; exit)
USE_TCPKILL="1"
EXTRA_OBJS="$EXTRA_OBJS tcpkill.o"
EXTRA_DEFINES="$EXTRA_DEFINES $(libnet-config --defines)"
--
2.17.1