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.

41 lines
1.5 KiB

  1. --- a/configure.ac
  2. +++ b/configure.ac
  3. @@ -50,6 +50,25 @@
  4. AS_HELP_STRING([--enable-systemd], [Build systemd support]),
  5. [enable_systemd="$enableval"], [enable_systemd="no"])
  6. +AC_ARG_WITH([libtirpc],
  7. + AS_HELP_STRING([--with-libtirpc], [Use libtirpc as RPC implementation (instead of sunrpc)]),
  8. + [], [ with_libtirpc=no ])
  9. +
  10. +AS_IF([test "x$with_libtirpc" != xno],
  11. + [PKG_CHECK_MODULES([TIRPC],
  12. + [libtirpc],
  13. + [RPC_CFLAGS=$TIRPC_CFLAGS; RPC_LIBS=$TIRPC_LIBS;],
  14. + [AC_MSG_ERROR([libtirpc requested, but library not found.])]
  15. + )],
  16. + [AC_CHECK_HEADER(rpc/rpc.h,
  17. + [RPC_CFLAGS=""; RPC_LIBS="";],
  18. + [AC_MSG_ERROR([sunrpc requested, but headers are not present.])]
  19. + )]
  20. +)
  21. +
  22. +AC_SUBST(RPC_CFLAGS)
  23. +AC_SUBST(RPC_LIBS)
  24. +
  25. PKG_CHECK_MODULES([LIBNFNETLINK], [libnfnetlink >= 1.0.1])
  26. PKG_CHECK_MODULES([LIBMNL], [libmnl >= 1.0.3])
  27. PKG_CHECK_MODULES([LIBNETFILTER_CONNTRACK], [libnetfilter_conntrack >= 1.0.7])
  28. --- a/src/helpers/Makefile.am
  29. +++ b/src/helpers/Makefile.am
  30. @@ -30,8 +30,8 @@
  31. ct_helper_mdns_la_CFLAGS = $(HELPER_CFLAGS)
  32. ct_helper_rpc_la_SOURCES = rpc.c
  33. -ct_helper_rpc_la_LDFLAGS = $(HELPER_LDFLAGS)
  34. -ct_helper_rpc_la_CFLAGS = $(HELPER_CFLAGS)
  35. +ct_helper_rpc_la_LDFLAGS = $(HELPER_LDFLAGS) $(RPC_LIBS)
  36. +ct_helper_rpc_la_CFLAGS = $(HELPER_CFLAGS) $(RPC_CFLAGS)
  37. ct_helper_tftp_la_SOURCES = tftp.c
  38. ct_helper_tftp_la_LDFLAGS = $(HELPER_LDFLAGS)