diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-10-02 11:39:32 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-10-02 11:39:32 +0200 |
commit | 9373fdb4870ff446df53058a4152c3121a0b38d1 (patch) | |
tree | 3ee2971d319a3f4ddfe664bcbf85c37ecebb2d08 /acinclude.m4 | |
parent | 1d7afe82114b8bf0688cbf1cb852babb36cac7d1 (diff) | |
download | bluez-9373fdb4870ff446df53058a4152c3121a0b38d1.tar.gz |
Add checks for libcap-ng support
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 44f7c72b3..1a3d939b1 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -148,6 +148,12 @@ AC_DEFUN([AC_PATH_NETLINK], [ AC_SUBST(NETLINK_LIBS) ]) +AC_DEFUN([AC_PATH_CAPNG], [ + PKG_CHECK_MODULES(CAPNG, libcap-ng, capng_found=yes, capng_found=no) + AC_SUBST(CAPNG_CFLAGS) + AC_SUBST(CAPNG_LIBS) +]) + AC_DEFUN([AC_PATH_SNDFILE], [ PKG_CHECK_MODULES(SNDFILE, sndfile, sndfile_found=yes, sndfile_found=no) AC_SUBST(SNDFILE_CFLAGS) @@ -159,6 +165,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [ optimization_enable=yes fortify_enable=yes pie_enable=yes + capng_eanble=${capng_found} sndfile_enable=${sndfile_found} netlink_enable=no hal_enable=${hal_found} @@ -196,6 +203,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [ pie_enable=${enableval} ]) + AC_ARG_ENABLE(capng, AC_HELP_STRING([--disable-capng], [disable capabilities dropping]), [ + capng_enable=${enableval} + ]) + AC_ARG_ENABLE(network, AC_HELP_STRING([--disable-network], [disable network plugin]), [ network_enable=${enableval} ]) @@ -311,6 +322,10 @@ AC_DEFUN([AC_ARG_BLUEZ], [ AC_DEFINE(HAVE_LIBUSB, 1, [Define to 1 if you have USB library.]) fi + if (test "${capng_enable}" = "yes" && test "${capng_found}" = "yes"); then + AC_DEFINE(HAVE_CAPNG, 1, [Define to 1 if you have capabilities library.]) + fi + AM_CONDITIONAL(SNDFILE, test "${sndfile_enable}" = "yes" && test "${sndfile_found}" = "yes") AM_CONDITIONAL(NETLINK, test "${netlink_enable}" = "yes" && test "${netlink_found}" = "yes") AM_CONDITIONAL(USB, test "${usb_enable}" = "yes" && test "${usb_found}" = "yes") |