blob: 47193587229cfebe591eed96afedcebd3fefa929 [file] [log] [blame]
Brad Bishopc1d34332019-09-09 14:56:00 -04001From 98a9eff357959d1113e33a615c2178751d5b2054 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Thu, 22 Aug 2019 10:50:21 +0800
4Subject: [PATCH 2/2] 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
Brad Bishopc1d34332019-09-09 14:56:00 -040015index 65db61e..6486aac 100644
Brad Bishopd7bf8c12018-02-25 22:55:05 -050016--- a/configure.ac
17+++ b/configure.ac
Brad Bishopc1d34332019-09-09 14:56:00 -040018@@ -977,6 +977,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=
Brad Bishopc1d34332019-09-09 14:56:00 -040041@@ -1010,15 +1026,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--
Brad Bishopc1d34332019-09-09 14:56:00 -0400692.7.4
Brad Bishopd7bf8c12018-02-25 22:55:05 -050070