build: Improve D-Bus checks for cross-compilation

This commit is contained in:
Marcel Holtmann 2011-03-28 19:21:12 +02:00
parent a801835cfa
commit dbb62eb0e9
1 changed files with 6 additions and 0 deletions

View File

@ -82,6 +82,10 @@ fi
PKG_CHECK_MODULES(DBUS, dbus-1 >= 1.0, dummy=yes,
AC_MSG_ERROR(D-Bus >= 1.0 is required))
saved_CFLAGS="$CFLAGS"
saved_LIBS="$LIBS"
CFLAGS="$CFLAGS $DBUS_CFLAGS"
LIBS="$LIBS $DBUS_LIBS"
AC_CHECK_LIB(dbus-1, dbus_watch_get_unix_fd, dummy=yes,
AC_DEFINE(NEED_DBUS_WATCH_GET_UNIX_FD, 1,
[Define to 1 if you need the dbus_watch_get_unix_fd() function.]))
@ -89,6 +93,8 @@ AC_CHECK_LIB(dbus-1, dbus_connection_can_send_type, dummy=yes,
AC_DEFINE(NEED_DBUS_CONNECTION_CAN_SEND_TYPE, 1,
[Define to 1 if you need the dbus_connection_can_send_type() function.]
))
CFLAGS="$saved_CFLAGS"
LIBS="$saved_LIBS"
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)