summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aa7f357)
raw | patch | inline | side by side (parent: aa7f357)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 24 Jul 2016 14:43:30 +0000 (16:43 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sun, 24 Jul 2016 14:45:52 +0000 (16:45 +0200) |
Hal needs dbus, but we need pkg-config to tell us that.
Now that pkg-config is not optional anymore, rewrite the
check to always use it. Also add a check for the header.
Fixes building the uuid plugin on Solaris 11.3
Now that pkg-config is not optional anymore, rewrite the
check to always use it. Also add a check for the header.
Fixes building the uuid plugin on Solaris 11.3
configure.ac | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index c69842cc3ccf14fee6c7becc0be5248729379688..e3d09da6c063fc5eb5f1435a0bfc3a86a1eca9ec 100644 (file)
--- a/configure.ac
+++ b/configure.ac
AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
dnl Check for HAL (hardware abstraction library)
-with_libhal="yes"
-AC_CHECK_LIB(hal,libhal_device_property_exists,
- [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])],
- [with_libhal="no"])
-if test "x$with_libhal" = "xyes"; then
- if test "x$PKG_CONFIG" != "x"; then
- BUILD_WITH_LIBHAL_CFLAGS="`$PKG_CONFIG --cflags hal`"
- BUILD_WITH_LIBHAL_LIBS="`$PKG_CONFIG --libs hal`"
- AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
- AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
- fi
-fi
+with_libhal="no"
+PKG_CHECK_MODULES([HAL], [hal],
+ [
+ SAVE_LIBS="$LIBS"
+ LIBS="$HAL_LIBS $LIBS"
+ AC_CHECK_LIB([hal], [libhal_device_property_exists],
+ [
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$HAL_CFLAGS $CPPFLAGS"
+ AC_CHECK_HEADERS([libhal.h],
+ [
+ with_libhal="yes"
+ BUILD_WITH_LIBHAL_CFLAGS="$HAL_CFLAGS"
+ BUILD_WITH_LIBHAL_LIBS="$HAL_LIBS"
+ ])
+ CPPFLAGS="$SAVE_CPPFLAGS"
+ ],
+ []
+ )
+ LIBS="$SAVE_LIBS"
+ ]
+)
+AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
+AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
+
SAVE_LIBS="$LIBS"
AC_CHECK_LIB([pthread],