[Mesa-dev] [PATCH] configure.ac: Check for expat when building just vulkan
Jussi Kukkonen
jussi.kukkonen at intel.com
Mon Aug 28 07:07:46 UTC 2017
Intel vulkan drivers also need expat: make sure EXPAT_LIBS is set even
if dri is disabled.
---
configure.ac | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index 61d98e28e0..01a8b24736 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1778,6 +1778,16 @@ if test "x$with_dri_drivers" = xno; then
with_dri_drivers=''
fi
+# Check for expat, needed by dri and intel drivers
+PKG_CHECK_MODULES([EXPAT], [expat], [have_expat=yes],
+ # expat version 2.0 and earlier do not provide expat.pc
+ [AC_CHECK_HEADER([expat.h],
+ [AC_CHECK_LIB([expat],[XML_ParserCreate],
+ [have_expat=yes
+ EXPAT_LIBS="-lexpat"],
+ [have_expat=no])],
+ [have_expat=no])])
+
dnl If $with_dri_drivers is yes, drivers will be added through
dnl platform checks. Set DEFINES and LIB_DEPS
if test "x$enable_dri" = xyes; then
@@ -1811,14 +1821,9 @@ if test "x$enable_dri" = xyes; then
with_dri_drivers="i915 i965 nouveau r200 radeon swrast"
fi
- # Check for expat
- PKG_CHECK_MODULES([EXPAT], [expat], [],
- # expat version 2.0 and earlier do not provide expat.pc
- [AC_CHECK_HEADER([expat.h],[],
- [AC_MSG_ERROR([Expat headers required for DRI not found])])
- AC_CHECK_LIB([expat],[XML_ParserCreate],[],
- [AC_MSG_ERROR([Expat library required for DRI not found])])
- EXPAT_LIBS="-lexpat"])
+ if test "x$have_expat" = "xno"; then
+ AC_MSG_ERROR([Expat library required for DRI was not found])
+ fi
# put all the necessary libs together
DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIBS -lm $PTHREAD_LIBS $DLOPEN_LIBS"
@@ -1957,6 +1962,9 @@ if test -n "$with_vulkan_drivers"; then
xintel)
require_libdrm "ANV"
require_x11_dri3 "ANV"
+ if test "x$have_expat" = "xno"; then
+ AC_MSG_ERROR([Expat library required for Intel Vulkan driver was not found])
+ fi
HAVE_INTEL_VULKAN=yes
;;
xradeon)
--
2.14.1
More information about the mesa-dev
mailing list