0003-fix-disable-tcpkill.patch 1.2 KB

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