]> err.no Git - mapper/commitdiff
Make HAL optional even if requested
authorKaj-Michael Lang <milang@tal.org>
Thu, 10 Apr 2008 11:15:58 +0000 (14:15 +0300)
committerKaj-Michael Lang <milang@tal.org>
Thu, 10 Apr 2008 11:15:58 +0000 (14:15 +0300)
configure.ac

index 188337067cf80d1dd558e1567d6d284dd313134e..7714e9e3d6ea5682bc2c832f8f7eb438c10713a8 100644 (file)
@@ -134,10 +134,14 @@ else
 fi
 
 if test "x$enable_hal" = "xyes" ; then
-  PKG_CHECK_MODULES(HAL, hal)
-  AC_SUBST(HAL_LIBS)
-  AC_SUBST(HAL_CFLAGS)
-  AC_DEFINE([WITH_HAL], 1, [Listen to special events using hal])
+  PKG_CHECK_MODULES(HAL, hal, HAVE_HAL=yes, HAVE_HAL=no)
+  if test "x$HAVE_HAL" = "xyes"; then
+   AC_SUBST(HAL_LIBS)
+   AC_SUBST(HAL_CFLAGS)
+   AC_DEFINE([WITH_HAL], 1, [Listen to special events using HAL])
+  else
+   AC_MSG_NOTICE([HAL support requested but not found, disabling])
+  fi
 fi
 
 AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)