Skip to content

Commit

Permalink
Add checks for libcap-ng support
Browse files Browse the repository at this point in the history
  • Loading branch information
holtmann committed Oct 2, 2009
1 parent 1d7afe8 commit 9373fdb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions acinclude.m4
Expand Up @@ -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)
Expand All @@ -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}
Expand Down Expand Up @@ -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}
])
Expand Down Expand Up @@ -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")
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Expand Up @@ -42,6 +42,7 @@ AC_PATH_GSTREAMER
AC_PATH_USB
AC_PATH_NETLINK
AC_PATH_SNDFILE
AC_PATH_CAPNG

AC_ARG_BLUEZ

Expand Down

0 comments on commit 9373fdb

Please sign in to comment.