summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac136
1 files changed, 63 insertions, 73 deletions
diff --git a/configure.ac b/configure.ac
index 2a4e6566..66dc9ca2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -902,7 +902,37 @@ AC_SUBST(LIRC_CFLAGS)
AC_SUBST(LIRC_LIBS)
AM_CONDITIONAL([HAVE_LIRC], [test "x$HAVE_LIRC" = x1])
-#### HAL support (optional) ####
+#### D-Bus support (optional) ####
+
+AC_ARG_ENABLE([dbus],
+ AS_HELP_STRING([--disable-dbus],[Disable optional D-Bus support]))
+
+AS_IF([test "x$enable_dbus" != "xno"],
+ [PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 1.0.0 ], HAVE_DBUS=1, HAVE_DBUS=0)],
+ HAVE_DBUS=0)
+
+AS_IF([test "x$enable_dbus" = "xyes" && test "x$HAVE_DBUS" = "x0"],
+ [AC_MSG_ERROR([*** D-Bus support not found])])
+
+AS_IF([test "x$HAVE_DBUS" = "x1"],
+ [
+ save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS $DBUS_CFLAGS"
+ save_LIBS="$LIBS"; LIBS="$LIBS $DBUS_LIBS"
+ AC_CHECK_FUNCS(dbus_watch_get_unix_fd)
+ CFLAGS="$save_CFLAGS"
+ LIBS="$save_LIBS"
+ ])
+
+AC_SUBST(DBUS_CFLAGS)
+AC_SUBST(DBUS_LIBS)
+AC_SUBST(HAVE_DBUS)
+AM_CONDITIONAL([HAVE_DBUS], [test "x$HAVE_DBUS" = x1])
+AS_IF([test "x$HAVE_DBUS" = "x1"], AC_DEFINE([HAVE_DBUS], 1, [Have D-Bus.]))
+
+PA_MACHINE_ID="${localstatedir}/lib/dbus/machine-id"
+AX_DEFINE_DIR(PA_MACHINE_ID, PA_MACHINE_ID, [D-Bus machine-id file])
+
+#### HAL support (optional), dependant on D-Bus ####
AC_ARG_ENABLE([hal],
AS_HELP_STRING([--disable-hal],[Disable optional HAL support]))
@@ -910,9 +940,10 @@ AC_ARG_ENABLE([hal],
AS_IF([test "x$enable_hal" != "xno" -a \( "x$HAVE_OSS" = "x1" -o "x$HAVE_ALSA" = "x1" \)],
[PKG_CHECK_MODULES(HAL, [ hal >= 0.5.11 ], HAVE_HAL=1, HAVE_HAL=0)],
HAVE_HAL=0)
+AS_IF([test "x$HAVE_DBUS" != "x1"], HAVE_HAL=0)
AS_IF([test "x$enable_hal" = "xyes" && test "x$HAVE_HAL" = "x0"],
- [AC_MSG_ERROR([*** HAL support not found])])
+ [AC_MSG_ERROR([*** HAL support not found (requires D-Bus)])])
AC_SUBST(HAL_CFLAGS)
AC_SUBST(HAL_LIBS)
@@ -920,25 +951,7 @@ AC_SUBST(HAVE_HAL)
AM_CONDITIONAL([HAVE_HAL], [test "x$HAVE_HAL" = x1])
AS_IF([test "x$HAVE_HAL" = "x1"], AC_DEFINE([HAVE_HAL], 1, [Have HAL.]))
-#### UDEV support (optional) ####
-
-AC_ARG_ENABLE([udev],
- AS_HELP_STRING([--disable-udev],[Disable optional UDEV support]))
-
-AS_IF([test "x$enable_udev" != "xno" -a \( "x$HAVE_OSS" = "x1" -o "x$HAVE_ALSA" = "x1" \)],
- [PKG_CHECK_MODULES(UDEV, [ libudev >= 143 ], HAVE_UDEV=1, HAVE_UDEV=0)],
- HAVE_UDEV=0)
-
-AS_IF([test "x$enable_udev" = "xyes" && test "x$HAVE_UDEV" = "x0"],
- [AC_MSG_ERROR([*** UDEV support not found])])
-
-AC_SUBST(UDEV_CFLAGS)
-AC_SUBST(UDEV_LIBS)
-AC_SUBST(HAVE_UDEV)
-AM_CONDITIONAL([HAVE_UDEV], [test "x$HAVE_UDEV" = x1])
-AS_IF([test "x$HAVE_UDEV" = "x1"], AC_DEFINE([HAVE_UDEV], 1, [Have UDEV.]))
-
-#### BlueZ support (optional) ####
+#### BlueZ support (optional, dependant on D-Bus) ####
AC_ARG_ENABLE([bluez],
AS_HELP_STRING([--disable-bluez],[Disable optional BlueZ support]))
@@ -946,83 +959,57 @@ AC_ARG_ENABLE([bluez],
AS_IF([test "x$enable_bluez" != "xno"],
[PKG_CHECK_MODULES(BLUEZ, [ bluez >= 3.0 ], HAVE_BLUEZ=1, HAVE_BLUEZ=0)],
HAVE_BLUEZ=0)
+AS_IF([test "x$HAVE_DBUS" != "x1"], HAVE_BLUEZ=0)
AS_IF([test "x$enable_bluez" = "xyes" && test "x$HAVE_BLUEZ" = "x0"],
- [AC_MSG_ERROR([*** BLUEZ support not found])])
+ [AC_MSG_ERROR([*** BLUEZ support not found (requires D-Bus)])])
AC_SUBST(BLUEZ_CFLAGS)
AC_SUBST(BLUEZ_LIBS)
AC_SUBST(HAVE_BLUEZ)
AM_CONDITIONAL([HAVE_BLUEZ], [test "x$HAVE_BLUEZ" = x1])
-#### D-Bus support (optional) ####
-
-AC_ARG_ENABLE([dbus],
- AS_HELP_STRING([--disable-dbus],[Disable optional D-Bus support]))
-
-AS_IF([test "x$enable_dbus" != "xno"],
- [PKG_CHECK_MODULES(DBUS, [ dbus-1 >= 1.0.0 ], HAVE_DBUS=1, HAVE_DBUS=0)],
- HAVE_DBUS=0)
-
-AS_IF([test "x$enable_dbus" = "xyes" && test "x$HAVE_DBUS" = "x0"],
- [AC_MSG_ERROR([*** D-Bus support not found])])
-
-AS_IF([test "x$HAVE_DBUS" = "x1"],
- [
- save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS $DBUS_CFLAGS"
- save_LIBS="$LIBS"; LIBS="$LIBS $DBUS_LIBS"
- AC_CHECK_FUNCS(dbus_watch_get_unix_fd)
- CFLAGS="$save_CFLAGS"
- LIBS="$save_LIBS"
- ])
+#### UDEV support (optional) ####
-AC_SUBST(DBUS_CFLAGS)
-AC_SUBST(DBUS_LIBS)
-AC_SUBST(HAVE_DBUS)
-AM_CONDITIONAL([HAVE_DBUS], [test "x$HAVE_DBUS" = x1])
-AS_IF([test "x$HAVE_DBUS" = "x1"], AC_DEFINE([HAVE_DBUS], 1, [Have D-Bus.]))
+AC_ARG_ENABLE([udev],
+ AS_HELP_STRING([--disable-udev],[Disable optional UDEV support]))
-PA_MACHINE_ID="${localstatedir}/lib/dbus/machine-id"
-AX_DEFINE_DIR(PA_MACHINE_ID, PA_MACHINE_ID, [D-Bus machine-id file])
+AS_IF([test "x$enable_udev" != "xno" -a \( "x$HAVE_OSS" = "x1" -o "x$HAVE_ALSA" = "x1" \)],
+ [PKG_CHECK_MODULES(UDEV, [ libudev >= 143 ], HAVE_UDEV=1, HAVE_UDEV=0)],
+ HAVE_UDEV=0)
-# HAL and BlueZ depend on D-Bus: So double check if they were explicitly enabled.
-if test "x$HAVE_DBUS" != "x1" ; then
- HAVE_HAL=0
- if test "x$enable_hal" = "xyes"; then
- AC_MSG_ERROR([*** D-Bus support is required by HAL])
- fi
+AS_IF([test "x$enable_udev" = "xyes" && test "x$HAVE_UDEV" = "x0"],
+ [AC_MSG_ERROR([*** UDEV support not found])])
- HAVE_BLUEZ=0
- if test "x$enable_bluez" = "xyes"; then
- AC_MSG_ERROR([*** D-Bus support is required by BLUEZ])
- fi
-fi
+AC_SUBST(UDEV_CFLAGS)
+AC_SUBST(UDEV_LIBS)
+AC_SUBST(HAVE_UDEV)
+AM_CONDITIONAL([HAVE_UDEV], [test "x$HAVE_UDEV" = x1])
+AS_IF([test "x$HAVE_UDEV" = "x1"], AC_DEFINE([HAVE_UDEV], 1, [Have UDEV.]))
-#### HAL compat support (optional) ####
+#### HAL compat support (optional, dependant on UDEV) ####
AC_ARG_ENABLE([hal-compat],
AS_HELP_STRING([--disable-hal-compat],[Disable optional HAL->udev transition compatibility support]))
-if test "x$enable_hal_compat" != "xno" -a "x$HAVE_HAL" = "x0" -a "x$HAVE_UDEV" = "x1"; then
- HAVE_HAL_COMPAT=1
- AC_DEFINE([HAVE_HAL_COMPAT], 1, [Have HAL compatibility.])
-else
- HAVE_HAL_COMPAT=0
-fi
+AS_IF([test "x$enable_hal_compat" != "xno"],
+ [AS_IF([test "x$HAVE_HAL" = "x0" -a "x$HAVE_UDEV" = "x1"], HAVE_HAL_COMPAT=1, HAVE_HAL_COMPAT=0)],
+ HAVE_HAL_COMPAT=0)
+
+AS_IF([test "x$enable_hal_compat" = "xyes" && test "x$HAVE_HAL_COMPAT" = "x0"],
+ [AC_MSG_ERROR([*** HAL-compat support requires UDEV and no HAL])])
AM_CONDITIONAL([HAVE_HAL_COMPAT], [test "x$HAVE_HAL_COMPAT" = x1])
+AS_IF([test "x$HAVE_HAL_COMPAT" = "x1"], AC_DEFINE([HAVE_HAL_COMPAT], 1, [Have HAL compatibility.]))
#### IPv6 connection support (optional) ####
AC_ARG_ENABLE([ipv6],
AS_HELP_STRING([--disable-ipv6],[Disable optional IPv6 support]))
-if test "x$enable_ipv6" != "xno"; then
- AC_DEFINE([HAVE_IPV6], [1], [Define this to enable IPv6 connection support])
- HAVE_IPV6=1
-else
- HAVE_IPV6=0
-fi
+AS_IF([test "x$enable_ipv6" != "xno"], [HAVE_IPV6=1], [HAVE_IPV6=0])
+
+AS_IF([test "x$HAVE_IPV6" = "x1"], AC_DEFINE([HAVE_IPV6], 1, [Define this to enable IPv6 connection support]))
#### OpenSSL support (optional) ####
@@ -1050,6 +1037,9 @@ AS_IF([test "x$with_fftw" != "xno"],
[PKG_CHECK_MODULES(FFTW, [ fftw3f ], HAVE_FFTW=1, HAVE_FFTW=0)],
HAVE_FFTW=0)
+AS_IF([test "x$with_fftw" = "xyes" && test "x$HAVE_FFTW" = "x0"],
+ [AC_MSG_ERROR([*** FFTW support not found])])
+
AM_CONDITIONAL([HAVE_FFTW], [test "x$HAVE_FFTW" = "x1"])
#### ORC (optional) ####