blob: 71b78090c307d796c95772d9c72474f738b5f43e [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From 74eed61dec8702c89f3e121d577ea9db25c961a4 Mon Sep 17 00:00:00 2001
2From: Jackie Huang <jackie.huang@windriver.com>
3Date: Mon, 11 Jan 2016 02:52:16 -0500
4Subject: [PATCH] configure.ac: add option for libcap
5
6Upstream-Status: Pending
7
8Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
9---
10 configure.ac | 37 ++++++++++++++++++++++++++++---------
11 1 file changed, 28 insertions(+), 9 deletions(-)
12
13diff --git a/configure.ac b/configure.ac
14index 066d3d7..6e4266b 100644
15--- a/configure.ac
16+++ b/configure.ac
17@@ -948,6 +948,23 @@ fi
18 dnl Set by FR_SMART_CHECKLIB
19 LIBS="${old_LIBS}"
20
21+dnl #
22+dnl # extra argument: --with-libcap
23+dnl #
24+WITH_LIBCAP=yes
25+AC_ARG_WITH(libcap,
26+[ --with-licap use licap for debugger checks. (default=yes)],
27+[ case "$withval" in
28+ no)
29+ WITH_LIBCAP=no
30+ ;;
31+ *)
32+ WITH_LIBCAP=yes
33+ ;;
34+ esac ]
35+)
36+
37+
38 dnl Check for cap
39 dnl extra argument: --with-cap-lib-dir=DIR
40 cap_lib_dir=
41@@ -981,15 +998,17 @@ AC_ARG_WITH(cap-include-dir,
42 ;;
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
67 VL_LIB_READLINE
68--
691.9.1
70