You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

84 lines
2.6 KiB

  1. From a1b392b4156db984ab2b695a4a70d113f70cb9b8 Mon Sep 17 00:00:00 2001
  2. From: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
  3. Date: Wed, 5 Feb 2014 14:18:57 +0100
  4. Subject: [PATCH 6/6] configure: add --without-ipulog option to disable
  5. libipulog build
  6. This is a compat library used for netfilter ULOG target.
  7. ULOG only works with IPv4. NFLOG has replaced ULOG.
  8. Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
  9. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  10. ---
  11. configure.ac | 5 +++++
  12. include/libnetfilter_log/Makefile.am | 5 ++++-
  13. src/Makefile.am | 6 +++++-
  14. utils/Makefile.am | 7 +++++--
  15. 4 files changed, 19 insertions(+), 4 deletions(-)
  16. --- a/configure.ac
  17. +++ b/configure.ac
  18. @@ -24,6 +24,11 @@ case "$host" in
  19. *) AC_MSG_ERROR([Linux only, dude!]);;
  20. esac
  21. +AC_ARG_WITH([ipulog],
  22. + AC_HELP_STRING([--without-ipulog], [don't build libipulog compat library]),
  23. + [ipulog_skip=1], [ipulog_skip=0])
  24. +AM_CONDITIONAL([BUILD_IPULOG], [test $ipulog_skip = 0])
  25. +
  26. dnl Dependencies
  27. PKG_CHECK_MODULES([LIBNFNETLINK], [libnfnetlink >= 0.0.41])
  28. --- a/include/libnetfilter_log/Makefile.am
  29. +++ b/include/libnetfilter_log/Makefile.am
  30. @@ -1,3 +1,6 @@
  31. -pkginclude_HEADERS = libnetfilter_log.h libipulog.h linux_nfnetlink_log.h
  32. +pkginclude_HEADERS = libnetfilter_log.h linux_nfnetlink_log.h
  33. +if BUILD_IPULOG
  34. +pkginclude_HEADERS += libipulog.h
  35. +endif
  36. --- a/src/Makefile.am
  37. +++ b/src/Makefile.am
  38. @@ -22,14 +22,18 @@ LIBVERSION=2:0:1
  39. include ${top_srcdir}/Make_global.am
  40. -lib_LTLIBRARIES = libnetfilter_log.la libnetfilter_log_libipulog.la
  41. +lib_LTLIBRARIES = libnetfilter_log.la
  42. libnetfilter_log_la_LDFLAGS = -Wc,-nostartfiles -lnfnetlink \
  43. -version-info $(LIBVERSION)
  44. libnetfilter_log_la_SOURCES = libnetfilter_log.c
  45. libnetfilter_log_la_LIBADD = ${LIBNFNETLINK_LIBS}
  46. +if BUILD_IPULOG
  47. +lib_LTLIBRARIES += libnetfilter_log_libipulog.la
  48. +
  49. libnetfilter_log_libipulog_la_LDFLAGS = -Wc,-nostartfiles \
  50. -version-info 1:0:0
  51. libnetfilter_log_libipulog_la_LIBADD = libnetfilter_log.la
  52. libnetfilter_log_libipulog_la_SOURCES = libipulog_compat.c
  53. +endif
  54. --- a/utils/Makefile.am
  55. +++ b/utils/Makefile.am
  56. @@ -1,12 +1,15 @@
  57. include ${top_srcdir}/Make_global.am
  58. -check_PROGRAMS = nfulnl_test ulog_test
  59. +check_PROGRAMS = nfulnl_test
  60. nfulnl_test_SOURCES = nfulnl_test.c
  61. nfulnl_test_LDADD = ../src/libnetfilter_log.la
  62. nfulnl_test_LDFLAGS = -dynamic
  63. +if BUILD_IPULOG
  64. +check_PROGRAMS += ulog_test
  65. +
  66. ulog_test_SOURCES = ulog_test.c
  67. ulog_test_LDADD = ../src/libnetfilter_log_libipulog.la ../src/libnetfilter_log.la
  68. ulog_test_LDFLAGS = -dynamic
  69. -
  70. +endif