0007-configure.ac-add-option-for-collectdclient.patch 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. From b8c75df6e252a1c0648448d6d561826ee9c464dd Mon Sep 17 00:00:00 2001
  2. From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
  3. Date: Tue, 26 Jul 2022 18:02:21 +0200
  4. Subject: [PATCH] configure.ac: add option for collectdclient
  5. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
  6. Upstream: https://github.com/FreeRADIUS/freeradius-server/pull/4632
  7. ---
  8. configure.ac | 34 +++++++++++++++++++++++++---------
  9. 1 file changed, 25 insertions(+), 9 deletions(-)
  10. diff --git a/configure.ac b/configure.ac
  11. index f760a5b236..f431da6db5 100644
  12. --- a/configure.ac
  13. +++ b/configure.ac
  14. @@ -1070,6 +1070,20 @@ if test "x$WITH_PCAP" = xyes; then
  15. LIBS="${old_LIBS}"
  16. fi
  17. +dnl extra argument: --with-collectdclient=yes/no
  18. +WITH_COLLECTDCLIENT=yes
  19. +AC_ARG_WITH(collectdclient,
  20. +[ --with-collectdclient use collectd client. (default=yes)],
  21. +[ case "$withval" in
  22. + no)
  23. + WITH_COLLECTDCLIENT=no
  24. + ;;
  25. + *)
  26. + WITH_COLLECTDCLIENT=yes
  27. + ;;
  28. + esac ]
  29. +)
  30. +
  31. dnl Check for collectdclient
  32. dnl extra argument: --with-collectdclient-lib-dir=DIR
  33. collectdclient_lib_dir=
  34. @@ -1103,16 +1117,18 @@ AC_ARG_WITH(collectdclient-include-dir,
  35. ;;
  36. esac])
  37. -smart_try_dir="$collectdclient_lib_dir"
  38. -FR_SMART_CHECK_LIB(collectdclient, lcc_connect)
  39. -if test "x$ac_cv_lib_collectdclient_lcc_connect" != "xyes"; then
  40. - AC_MSG_WARN([collectdclient library not found. Use --with-collectdclient-lib-dir=<path>.])
  41. -else
  42. - COLLECTDC_LIBS="${smart_lib}"
  43. - COLLECTDC_LDFLAGS="${smart_ldflags}"
  44. +if test "x$WITH_COLLECTDCLIENT" = xyes; then
  45. + smart_try_dir="$collectdclient_lib_dir"
  46. + FR_SMART_CHECK_LIB(collectdclient, lcc_connect)
  47. + if test "x$ac_cv_lib_collectdclient_lcc_connect" != "xyes"; then
  48. + AC_MSG_WARN([collectdclient library not found. Use --with-collectdclient-lib-dir=<path>.])
  49. + else
  50. + COLLECTDC_LIBS="${smart_lib}"
  51. + COLLECTDC_LDFLAGS="${smart_ldflags}"
  52. + fi
  53. + dnl Set by FR_SMART_CHECKLIB
  54. + LIBS="${old_LIBS}"
  55. fi
  56. -dnl Set by FR_SMART_CHECKLIB
  57. -LIBS="${old_LIBS}"
  58. dnl #
  59. dnl # extra argument: --with-libcap
  60. --
  61. 2.35.3