diff options
author | jkar8572 <jkar8572> | 2008-07-10 15:30:43 +0000 |
---|---|---|
committer | jkar8572 <jkar8572> | 2008-07-10 15:30:43 +0000 |
commit | d2a2c385239f6146324014f235c0c8456a0da86f (patch) | |
tree | 4b6ce171ab2ff3b49425882721e64ff463bfe5dd /configure.in | |
parent | 4a9ad157129463871877b787f4f168aac5383e5c (diff) |
* use PKG_CHECK_MODULES to check for DBUS (Ladislav Michnovic)
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/configure.in b/configure.in index e228d2a..b862db4 100644 --- a/configure.in +++ b/configure.in @@ -96,23 +96,25 @@ if test "x$enable_ext2direct" != "xno"; then 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/") +#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/") 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 + PKG_CHECK_MODULES([DBUS], [dbus-1]) + NETLINKLIBS="$DBUS_LIBS" + 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 + 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 +123,13 @@ if test "x$enable_netlink" != "xno"; then 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 |