blob: 8ef3c4bdf9ef513521b619762cfe8da864270502 [file] [log] [blame]
Andrew Geisslerc5535c92023-01-27 16:10:19 -06001From 9548dc5e1a6c835cd4f387ba384d8f3f14c3fc8b Mon Sep 17 00:00:00 2001
Brad Bishopc1d34332019-09-09 14:56:00 -04002From: Changqing Li <changqing.li@windriver.com>
3Date: Thu, 22 Aug 2019 10:50:21 +0800
Andrew Geisslerc5535c92023-01-27 16:10:19 -06004Subject: [PATCH] configure.ac: add option for libcap
Brad Bishopd7bf8c12018-02-25 22:55:05 -05005
6Upstream-Status: Pending
7
8Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Brad Bishopc1d34332019-09-09 14:56:00 -04009Signed-off-by: Changqing Li <changqing.li@windriver.com>
Brad Bishopd7bf8c12018-02-25 22:55:05 -050010---
Brad Bishopc1d34332019-09-09 14:56:00 -040011 configure.ac | 36 +++++++++++++++++++++++++++---------
12 1 file changed, 27 insertions(+), 9 deletions(-)
Brad Bishopd7bf8c12018-02-25 22:55:05 -050013
14diff --git a/configure.ac b/configure.ac
Andrew Geisslerc5535c92023-01-27 16:10:19 -060015index ef8fced680..263098f7fd 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050016--- a/configure.ac
17+++ b/configure.ac
Andrew Geisslerc5535c92023-01-27 16:10:19 -060018@@ -1161,6 +1161,22 @@ fi
Brad Bishopd7bf8c12018-02-25 22:55:05 -050019 dnl Set by FR_SMART_CHECKLIB
20 LIBS="${old_LIBS}"
21
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+
Brad Bishopd7bf8c12018-02-25 22:55:05 -050038 dnl Check for cap
39 dnl extra argument: --with-cap-lib-dir=DIR
40 cap_lib_dir=
Andrew Geisslerc5535c92023-01-27 16:10:19 -060041@@ -1194,15 +1210,17 @@ AC_ARG_WITH(cap-include-dir,
Brad Bishopd7bf8c12018-02-25 22:55:05 -050042 ;;
43 esac])
44
45-smart_try_dir="$cap_lib_dir"
46-FR_SMART_CHECK_LIB(cap, cap_get_proc)
47-if test "x$ac_cv_lib_cap_cap_get_proc" != "xyes"; then
48- AC_MSG_WARN([cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>.])
49-else
50- AC_DEFINE(HAVE_LIBCAP, 1,
51- [Define to 1 if you have the `cap' library (-lcap).]
52- )
53- HAVE_LIBCAP=1
54+if test "x$WITH_LIBCAP" = xyes; then
55+ smart_try_dir="$cap_lib_dir"
56+ FR_SMART_CHECK_LIB(cap, cap_get_proc)
57+ if test "x$ac_cv_lib_cap_cap_get_proc" != "xyes"; then
58+ AC_MSG_WARN([cap library not found, debugger checks will not be enabled. Use --with-cap-lib-dir=<path>.])
59+ else
60+ AC_DEFINE(HAVE_LIBCAP, 1,
61+ [Define to 1 if you have the `cap' library (-lcap).]
62+ )
63+ HAVE_LIBCAP=1
64+ fi
65 fi
66
Brad Bishopc1d34332019-09-09 14:56:00 -040067 dnl #
Brad Bishopd7bf8c12018-02-25 22:55:05 -050068--
Andrew Geisslerc5535c92023-01-27 16:10:19 -0600692.25.1
Brad Bishopd7bf8c12018-02-25 22:55:05 -050070