0002-configure.ac-add-option-for-libcap.patch 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. From 404f18da62e3708c9b290ee4eaf8461911df5475 Mon Sep 17 00:00:00 2001
  2. From: Changqing Li <changqing.li@windriver.com>
  3. Date: Thu, 22 Aug 2019 10:50:21 +0800
  4. Subject: [PATCH] configure.ac: add option for libcap
  5. Upstream-Status: Pending
  6. Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
  7. Signed-off-by: Changqing Li <changqing.li@windriver.com>
  8. Fetch from: http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-connectivity/freeradius/files
  9. Signed-off-by: David Gouarin <david.gouarin@thalesgroup.com>
  10. Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
  11. Upstream: https://github.com/FreeRADIUS/freeradius-server/pull/4632
  12. ---
  13. configure.ac | 36 +++++++++++++++++++++++++++---------
  14. 1 file changed, 27 insertions(+), 9 deletions(-)
  15. diff --git a/configure.ac b/configure.ac
  16. index c72511ab39..de016b28e5 100644
  17. --- a/configure.ac
  18. +++ b/configure.ac
  19. @@ -941,6 +941,22 @@ fi
  20. dnl Set by FR_SMART_CHECKLIB
  21. LIBS="${old_LIBS}"
  22. +dnl #
  23. +dnl # extra argument: --with-libcap
  24. +dnl #
  25. +WITH_LIBCAP=yes
  26. +AC_ARG_WITH(libcap,
  27. +[ --with-licap use licap for debugger checks. (default=yes)],
  28. +[ case "$withval" in
  29. + no)
  30. + WITH_LIBCAP=no
  31. + ;;
  32. + *)
  33. + WITH_LIBCAP=yes
  34. + ;;
  35. + esac ]
  36. +)
  37. +
  38. dnl Check for cap
  39. dnl extra argument: --with-cap-lib-dir=DIR
  40. cap_lib_dir=
  41. @@ -974,15 +990,17 @@ AC_ARG_WITH(cap-include-dir,
  42. ;;
  43. esac])
  44. -smart_try_dir="$cap_lib_dir"
  45. -FR_SMART_CHECK_LIB(cap, cap_get_proc)
  46. -if test "x$ac_cv_lib_cap_cap_get_proc" != "xyes"; then
  47. - AC_MSG_WARN([cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>.])
  48. -else
  49. - AC_DEFINE(HAVE_LIBCAP, 1,
  50. - [Define to 1 if you have the `cap' library (-lcap).]
  51. - )
  52. - HAVE_LIBCAP=1
  53. +if test "x$WITH_LIBCAP" = xyes; then
  54. + smart_try_dir="$cap_lib_dir"
  55. + FR_SMART_CHECK_LIB(cap, cap_get_proc)
  56. + if test "x$ac_cv_lib_cap_cap_get_proc" != "xyes"; then
  57. + AC_MSG_WARN([cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>.])
  58. + else
  59. + AC_DEFINE(HAVE_LIBCAP, 1,
  60. + [Define to 1 if you have the `cap' library (-lcap).]
  61. + )
  62. + HAVE_LIBCAP=1
  63. + fi
  64. fi
  65. dnl #
  66. --
  67. 2.17.1