summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-02-03 14:33:13 -0800
committerMarcel Holtmann <marcel@holtmann.org>2010-02-03 14:33:13 -0800
commit69c1b49a87d41bff7be972b29c2ead7f72c2a1e7 (patch)
tree6b279b9dd3b2503e879827948e9f0d1534cda515
parentd1f115e6126a05af177279f3c4db466eb201f7fb (diff)
downloadbluez-69c1b49a87d41bff7be972b29c2ead7f72c2a1e7.tar.gz
Update configure checks for libcap-ng and libnl
-rw-r--r--acinclude.m427
-rwxr-xr-xbootstrap-configure1
-rw-r--r--configure.ac22
3 files changed, 21 insertions, 29 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index be4fb1d32..2e4444d44 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -146,18 +146,6 @@ AC_DEFUN([AC_PATH_USB], [
[Define to 1 if you need the usb_interrupt_read() function.]))
])
-AC_DEFUN([AC_PATH_NETLINK], [
- PKG_CHECK_MODULES(NETLINK, libnl-1, netlink_found=yes, netlink_found=no)
- AC_SUBST(NETLINK_CFLAGS)
- 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)
@@ -169,9 +157,7 @@ AC_DEFUN([AC_ARG_BLUEZ], [
optimization_enable=yes
fortify_enable=yes
pie_enable=yes
- capng_enable=${capng_found}
sndfile_enable=${sndfile_found}
- netlink_enable=no
hal_enable=${hal_found}
usb_enable=${usb_found}
alsa_enable=${alsa_found}
@@ -209,10 +195,6 @@ 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}
])
@@ -249,10 +231,6 @@ AC_DEFUN([AC_ARG_BLUEZ], [
usb_enable=${enableval}
])
- AC_ARG_ENABLE(netlink, AC_HELP_STRING([--enable-netlink], [enable NETLINK support]), [
- netlink_enable=${enableval}
- ])
-
AC_ARG_ENABLE(tracer, AC_HELP_STRING([--enable-tracer], [install Tracing daemon]), [
tracer_enable=${enableval}
])
@@ -336,12 +314,7 @@ 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")
AM_CONDITIONAL(SBC, test "${alsa_enable}" = "yes" || test "${gstreamer_enable}" = "yes")
AM_CONDITIONAL(ALSA, test "${alsa_enable}" = "yes" && test "${alsa_found}" = "yes")
diff --git a/bootstrap-configure b/bootstrap-configure
index 1a57f9eb2..7456103fe 100755
--- a/bootstrap-configure
+++ b/bootstrap-configure
@@ -17,6 +17,7 @@ fi
--localstatedir=/var \
--libexecdir=/lib \
--enable-netlink \
+ --enable-capng \
--enable-tracer \
--enable-tools \
--enable-bccmd \
diff --git a/configure.ac b/configure.ac
index 199d2adcb..2976d8f94 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,11 +40,29 @@ AC_PATH_GLIB
AC_PATH_ALSA
AC_PATH_GSTREAMER
AC_PATH_USB
-AC_PATH_NETLINK
AC_PATH_SNDFILE
-AC_PATH_CAPNG
AC_ARG_BLUEZ
+AC_ARG_ENABLE(capng, AC_HELP_STRING([--enable-capng],
+ [enable capabilities support]), [enable_capng=${enableval}])
+if (test "${enable_capng}" = "yes"); then
+ PKG_CHECK_MODULES(CAPNG, libcap-ng, dummy=yes,
+ AC_MSG_ERROR(Capabilities library is required))
+ AC_SUBST(CAPNG_CFLAGS)
+ AC_SUBST(CAPNG_LIBS)
+ AC_DEFINE(HAVE_CAPNG, 1, [Define to 1 if you have capabilities library.])
+fi
+
+AC_ARG_ENABLE(netlink, AC_HELP_STRING([--enable-netlink],
+ [enable netlink support]), [enable_netlink=${enableval}])
+if (test "${enable_netlink}" = "yes"); then
+ PKG_CHECK_MODULES(NETLINK, libnl-1, dummy=yes,
+ AC_MSG_ERROR(Netlink library is required))
+ AC_SUBST(NETLINK_CFLAGS)
+ AC_SUBST(NETLINK_LIBS)
+fi
+AM_CONDITIONAL(NETLINK, test "${enable_netlink}" = "yes")
+
AC_OUTPUT(Makefile scripts/bluetooth.rules doc/version.xml
src/bluetoothd.8 bluez.pc)