DEFINES="$DEFINES -DHAVE_LIBDRM"
fi
+case "$host_os" in
+linux*)
+ need_libudev=yes ;;
+*)
+ need_libudev=no ;;
+esac
+
PKG_CHECK_MODULES([LIBUDEV], [libudev >= $LIBUDEV_REQUIRED],
have_libudev=yes, have_libudev=no)
esac
fi
if test "x$enable_gbm" = xyes; then
- if test x"$have_libudev" != xyes; then
+ if test "x$need_libudev$have_libudev" = xyesno; then
AC_MSG_ERROR([gbm requires udev >= $LIBUDEV_REQUIRED])
fi
fi
fi
AM_CONDITIONAL(HAVE_GBM, test "x$enable_gbm" = xyes)
-GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED"
+if test "x$need_libudev" = xyes; then
+ GBM_PC_REQ_PRIV="libudev >= $LIBUDEV_REQUIRED"
+else
+ GBM_PC_REQ_PRIV=""
+fi
GBM_PC_LIB_PRIV="$DLOPEN_LIBS"
AC_SUBST([GBM_PC_REQ_PRIV])
AC_SUBST([GBM_PC_LIB_PRIV])
;;
esac
- case "$plat$have_libudev" in
- waylandno|drmno)
+ case "$plat$need_libudev$have_libudev" in
+ waylandyesno|drmyesno)
AC_MSG_ERROR([cannot build $plat platform without udev >= $LIBUDEV_REQUIRED]) ;;
esac
done
gallium_require_drm_loader() {
if test "x$enable_gallium_loader" = xyes; then
- if test "x$have_libudev" != xyes; then
+ if test "x$need_libudev$have_libudev" = xyesno; then
AC_MSG_ERROR([Gallium drm loader requires libudev >= $LIBUDEV_REQUIRED])
fi
if test "x$have_libdrm" != xyes; then