git_sha1_gen: catch any error the same way
[mesa.git] / configure.ac
index cfc53de608ea5b18aceee2723c8cba0775017182..6302aa2b0c86e050c3d49b9b8ec6291a94188f40 100644 (file)
@@ -74,7 +74,7 @@ AC_SUBST([OPENCL_VERSION])
 # in the first entry.
 LIBDRM_REQUIRED=2.4.75
 LIBDRM_RADEON_REQUIRED=2.4.71
-LIBDRM_AMDGPU_REQUIRED=2.4.81
+LIBDRM_AMDGPU_REQUIRED=2.4.82
 LIBDRM_INTEL_REQUIRED=2.4.75
 LIBDRM_NVVIEUX_REQUIRED=2.4.66
 LIBDRM_NOUVEAU_REQUIRED=2.4.66
@@ -1681,19 +1681,26 @@ if test "x$WAYLAND_SCANNER" = x; then
     AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
 fi
 
+PKG_CHECK_EXISTS([wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED], [have_wayland_protocols=yes], [have_wayland_protocols=no])
+if test "x$have_wayland_protocols" = xyes; then
+    ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
+fi
+AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
+
 # Do per platform setups and checks
 platforms=`IFS=', '; echo $with_platforms`
 for plat in $platforms; do
     case "$plat" in
     wayland)
 
-        PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED wayland-server >= $WAYLAND_REQUIRED wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED])
-        ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`
-        AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
+        PKG_CHECK_MODULES([WAYLAND], [wayland-client >= $WAYLAND_REQUIRED wayland-server >= $WAYLAND_REQUIRED])
 
         if test "x$WAYLAND_SCANNER" = "x:"; then
                 AC_MSG_ERROR([wayland-scanner is needed to compile the wayland platform])
         fi
+        if test "x$have_wayland_protocols" = xno; then
+                AC_MSG_ERROR([wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED is needed to compile the wayland platform])
+        fi
         DEFINES="$DEFINES -DHAVE_WAYLAND_PLATFORM"
         ;;
 
@@ -2357,7 +2364,7 @@ dnl Architectures to build SWR library for
 AC_ARG_WITH([swr-archs],
     [AS_HELP_STRING([--with-swr-archs@<:@=DIRS...@:>@],
         [comma delimited swr architectures list, e.g.
-        "avx,avx2" @<:@default="avx,avx2"@:>@])],
+        "avx,avx2,knl,skx" @<:@default="avx,avx2"@:>@])],
     [with_swr_archs="$withval"],
     [with_swr_archs="avx,avx2"])
 
@@ -2521,6 +2528,20 @@ if test -n "$with_gallium_drivers"; then
                     AC_SUBST([SWR_AVX2_CXXFLAGS])
                     HAVE_SWR_AVX2=yes
                     ;;
+                xknl)
+                    swr_require_cxx_feature_flags "KNL" "defined(__AVX512F__) && defined(__AVX512ER__)" \
+                        ",-march=knl,-xMIC-AVX512" \
+                        SWR_KNL_CXXFLAGS
+                    AC_SUBST([SWR_KNL_CXXFLAGS])
+                    HAVE_SWR_KNL=yes
+                    ;;
+                xskx)
+                    swr_require_cxx_feature_flags "SKX" "defined(__AVX512F__) && defined(__AVX512BW__)" \
+                        ",-march=skylake-avx512,-xCORE-AVX512" \
+                        SWR_SKX_CXXFLAGS
+                    AC_SUBST([SWR_SKX_CXXFLAGS])
+                    HAVE_SWR_SKX=yes
+                    ;;
                 *)
                     AC_MSG_ERROR([unknown SWR build architecture '$arch'])
                     ;;
@@ -2528,7 +2549,9 @@ if test -n "$with_gallium_drivers"; then
             done
 
             if test "x$HAVE_SWR_AVX" != xyes -a \
-                    "x$HAVE_SWR_AVX2" != xyes; then
+                    "x$HAVE_SWR_AVX2" != xyes -a \
+                    "x$HAVE_SWR_KNL" != xyes -a \
+                    "x$HAVE_SWR_SKX" != xyes -a; then
                AC_MSG_ERROR([swr enabled but no swr architectures selected])
             fi
 
@@ -2571,6 +2594,8 @@ fi
 
 AM_CONDITIONAL(HAVE_SWR_AVX, test "x$HAVE_SWR_AVX" = xyes)
 AM_CONDITIONAL(HAVE_SWR_AVX2, test "x$HAVE_SWR_AVX2" = xyes)
+AM_CONDITIONAL(HAVE_SWR_KNL, test "x$HAVE_SWR_KNL" = xyes)
+AM_CONDITIONAL(HAVE_SWR_SKX, test "x$HAVE_SWR_SKX" = xyes)
 
 dnl We need to validate some needed dependencies for renderonly drivers.
 
@@ -2873,7 +2898,6 @@ AC_CONFIG_FILES([Makefile
                  src/mesa/gl.pc
                  src/mesa/drivers/dri/dri.pc
                  src/mesa/drivers/dri/common/Makefile
-                 src/mesa/drivers/dri/common/xmlpool/Makefile
                  src/mesa/drivers/dri/i915/Makefile
                  src/mesa/drivers/dri/i965/Makefile
                  src/mesa/drivers/dri/Makefile
@@ -2887,6 +2911,7 @@ AC_CONFIG_FILES([Makefile
                  src/mesa/main/tests/Makefile
                  src/util/Makefile
                  src/util/tests/hash_table/Makefile
+                 src/util/xmlpool/Makefile
                  src/vulkan/Makefile])
 
 AC_OUTPUT