forked from pool/quota
49 lines
1.9 KiB
Diff
49 lines
1.9 KiB
Diff
--- configure.in
|
|
+++ configure.in
|
|
@@ -96,23 +96,15 @@
|
|
fi
|
|
AC_SUBST(EXT2LIBS)
|
|
|
|
-AC_ARG_WITH(dbus_include,
|
|
- [ --with-dbus_include=path Path to directory with dbus include directory [default=/usr/include/dbus-1.0/]],
|
|
- DBUS_INCLUDE="$with_dbus_include",
|
|
- DBUS_INCLUDE="/usr/include/dbus-1.0/")
|
|
-AC_ARG_WITH(dbus_arch_include,
|
|
- [ --with-dbus_arch_include=path Path to directory with dbus arch-dependent include directory [default=/usr/lib/dbus-1.0/include/]],
|
|
- DBUS_ARCH_INCLUDE="$with_dbus_arch_include",
|
|
- DBUS_ARCH_INCLUDE="/usr/lib/dbus-1.0/include/")
|
|
+PKG_CHECK_MODULES(DBUS, dbus-1)
|
|
|
|
AC_ARG_ENABLE(netlink,
|
|
[ --enable-netlink=[yes/no/try] Compile daemon receiving quota messages via netlink [default=no].],
|
|
,
|
|
enable_netlink="no")
|
|
if test "x$enable_netlink" != "xno"; then
|
|
- AC_CHECK_LIB(nl, genl_register, NETLINKLIBS="-lnl $NETLINKLIBS")
|
|
- AC_CHECK_LIB(dbus-1, dbus_bus_get, NETLINKLIBS="-ldbus-1 $NETLINKLIBS")
|
|
- if test "${ac_cv_lib_nl_genl_register}" != "yes" -o "${ac_cv_lib_dbus_1_dbus_bus_get}" != "yes"; then
|
|
+ AC_CHECK_LIB(nl, genl_register, NETLINKLIBS="-lnl $DBUS_LIBS $NETLINKLIBS")
|
|
+ if test -z "$NETLINKLIBS" -o -z "$DBUS_LIBS" ; then
|
|
if test "x$enable_netlink" = "xyes"; then
|
|
AC_MSG_ERROR([Required libraries for quota netlink daemon not found.])
|
|
else
|
|
@@ -121,16 +113,13 @@
|
|
enable_netlink="no"
|
|
NETLINKLIBS=""
|
|
else
|
|
- oldCPPFLAGS="$CPPFLAGS"
|
|
- CPPFLAGS="-I $DBUS_INCLUDE -I $DBUS_ARCH_INCLUDE $CPPFLAGS"
|
|
- AC_CHECK_HEADERS(dbus/dbus.h, have_dbus="yes")
|
|
- if test "x$have_dbus" != "xyes"; then
|
|
+ CPPFLAGS="$DBUS_CFLAGS $CPPFLAGS"
|
|
+ if test -z "$DBUS_LIBS" ; then
|
|
if test "x$enable_netlink" = "xyes"; then
|
|
AC_MSG_ERROR([Required headers for quota netlink daemon not found.])
|
|
else
|
|
AC_MSG_WARN([Quota netlink daemon won't be compiled. Required headers not found.])
|
|
fi
|
|
- CPPFLAGS="$oldCPPFLAGS"
|
|
NETLINKLIBS=""
|
|
enable_netlink="no"
|
|
else
|