X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=configure.ac;h=ffb8424a07b989473a883ad646e9513c8add0dc7;hb=7039d9299e11c69b14c7bb67ad0124ecde751f4a;hp=4bb89607e2d098768dc0a7c9946b0a08ae388b14;hpb=00979402230e659fff57dec612f60987665157fa;p=mesa.git diff --git a/configure.ac b/configure.ac index 4bb89607e2d..ffb8424a07b 100644 --- a/configure.ac +++ b/configure.ac @@ -78,8 +78,9 @@ LIBDRM_AMDGPU_REQUIRED=2.4.91 LIBDRM_INTEL_REQUIRED=2.4.75 LIBDRM_NVVIEUX_REQUIRED=2.4.66 LIBDRM_NOUVEAU_REQUIRED=2.4.66 -LIBDRM_FREEDRENO_REQUIRED=2.4.91 +LIBDRM_FREEDRENO_REQUIRED=2.4.92 LIBDRM_ETNAVIV_REQUIRED=2.4.89 +LIBDRM_VC4_REQUIRED=2.4.89 dnl Versions for external dependencies DRI2PROTO_REQUIRED=2.8 @@ -89,6 +90,7 @@ LIBOMXIL_TIZONIA_REQUIRED=0.10.0 LIBVA_REQUIRED=0.39.0 VDPAU_REQUIRED=1.1 WAYLAND_REQUIRED=1.11 +WAYLAND_EGL_BACKEND_REQUIRED=3 WAYLAND_PROTOCOLS_REQUIRED=1.8 XCB_REQUIRED=1.9.3 XCBDRI2_REQUIRED=1.8 @@ -106,9 +108,9 @@ dnl LLVM versions LLVM_REQUIRED_GALLIUM=3.3.0 LLVM_REQUIRED_OPENCL=3.9.0 LLVM_REQUIRED_R600=3.9.0 -LLVM_REQUIRED_RADEONSI=4.0.0 -LLVM_REQUIRED_RADV=4.0.0 -LLVM_REQUIRED_SWR=4.0.0 +LLVM_REQUIRED_RADEONSI=5.0.0 +LLVM_REQUIRED_RADV=5.0.0 +LLVM_REQUIRED_SWR=5.0.0 dnl Check for progs AC_PROG_CPP @@ -300,7 +302,10 @@ AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS AX_CHECK_COMPILE_FLAG([-Werror=implicit-function-declaration], [CFLAGS="$CFLAGS -Werror=implicit-function-declaration"]) AX_CHECK_COMPILE_FLAG([-Werror=missing-prototypes], [CFLAGS="$CFLAGS -Werror=missing-prototypes"]) AX_CHECK_COMPILE_FLAG([-Wmissing-prototypes], [CFLAGS="$CFLAGS -Wmissing-prototypes"]) +dnl Dylan Baker: gcc and clang always accepr -Wno-*, hence check for the original warning, then set the no-* flag +AX_CHECK_COMPILE_FLAG([-Wmissing-field-initializers], [CFLAGS="$CFLAGS -Wno-missing-field-initializers"]) AX_CHECK_COMPILE_FLAG([-fno-math-errno], [CFLAGS="$CFLAGS -fno-math-errno"]) + AX_CHECK_COMPILE_FLAG([-fno-trapping-math], [CFLAGS="$CFLAGS -fno-trapping-math"]) AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [VISIBILITY_CFLAGS="-fvisibility=hidden"]) @@ -312,6 +317,7 @@ AX_CHECK_COMPILE_FLAG([-Wall], [CXXFLAGS="$CXXFL AX_CHECK_COMPILE_FLAG([-fno-math-errno], [CXXFLAGS="$CXXFLAGS -fno-math-errno"]) AX_CHECK_COMPILE_FLAG([-fno-trapping-math], [CXXFLAGS="$CXXFLAGS -fno-trapping-math"]) AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [VISIBILITY_CXXFLAGS="-fvisibility=hidden"]) +AX_CHECK_COMPILE_FLAG([-Wmissing-field-initializers], [CXXFLAGS="$CXXFLAGS -Wno-missing-field-initializers"]) AC_LANG_POP([C++]) # Flags to help ensure that certain portions of the code -- and only those @@ -434,28 +440,40 @@ fi AM_CONDITIONAL([SSE41_SUPPORTED], [test x$SSE41_SUPPORTED = x1]) AC_SUBST([SSE41_CFLAGS], $SSE41_CFLAGS) -dnl Check for new-style atomic builtins -AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ +dnl Check for new-style atomic builtins. We first check without linking to +dnl -latomic. +AC_MSG_CHECKING(whether __atomic_load_n is supported) +AC_LINK_IFELSE([AC_LANG_SOURCE([[ +#include int main() { - int n; - return __atomic_load_n(&n, __ATOMIC_ACQUIRE); -}]])], GCC_ATOMIC_BUILTINS_SUPPORTED=1) -if test "x$GCC_ATOMIC_BUILTINS_SUPPORTED" = x1; then - DEFINES="$DEFINES -DUSE_GCC_ATOMIC_BUILTINS" - dnl On some platforms, new-style atomics need a helper library - AC_MSG_CHECKING(whether -latomic is needed) - AC_LINK_IFELSE([AC_LANG_SOURCE([[ - #include struct { uint64_t *v; } x; - int main() { - return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE); - }]])], GCC_ATOMIC_BUILTINS_NEED_LIBATOMIC=no, GCC_ATOMIC_BUILTINS_NEED_LIBATOMIC=yes) - AC_MSG_RESULT($GCC_ATOMIC_BUILTINS_NEED_LIBATOMIC) - if test "x$GCC_ATOMIC_BUILTINS_NEED_LIBATOMIC" = xyes; then - LIBATOMIC_LIBS="-latomic" - fi + return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE) & + (int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL); +}]])], GCC_ATOMIC_BUILTINS_SUPPORTED=yes, GCC_ATOMIC_BUILTINS_SUPPORTED=no) + +dnl If that didn't work, we try linking with -latomic, which is needed on some +dnl platforms. +if test "x$GCC_ATOMIC_BUILTINS_SUPPORTED" != xyes; then + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -latomic" + AC_LINK_IFELSE([AC_LANG_SOURCE([[ + #include + int main() { + struct { + uint64_t *v; + } x; + return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE) & + (int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL); + }]])], GCC_ATOMIC_BUILTINS_SUPPORTED=yes LIBATOMIC_LIBS="-latomic", + GCC_ATOMIC_BUILTINS_SUPPORTED=no) + LDFLAGS=$save_LDFLAGS +fi +AC_MSG_RESULT($GCC_ATOMIC_BUILTINS_SUPPORTED) + +if test "x$GCC_ATOMIC_BUILTINS_SUPPORTED" = xyes; then + DEFINES="$DEFINES -DUSE_GCC_ATOMIC_BUILTINS" fi AC_SUBST([LIBATOMIC_LIBS]) @@ -749,21 +767,6 @@ esac AC_SUBST([LIB_EXT]) -dnl -dnl potentially-infringing-but-nobody-knows-for-sure stuff -dnl -AC_ARG_ENABLE([texture-float], - [AS_HELP_STRING([--enable-texture-float], - [enable floating-point textures and renderbuffers @<:@default=disabled@:>@])], - [enable_texture_float="$enableval"], - [enable_texture_float=no] -) -if test "x$enable_texture_float" = xyes; then - AC_MSG_WARN([Floating-point textures enabled.]) - AC_MSG_WARN([Please consult docs/patents.txt with your lawyer before building Mesa.]) - DEFINES="$DEFINES -DTEXTURE_FLOAT_ENABLED" -fi - dnl dnl Arch/platform-specific settings dnl @@ -869,6 +872,7 @@ AC_HEADER_MAJOR AC_CHECK_HEADER([xlocale.h], [DEFINES="$DEFINES -DHAVE_XLOCALE_H"]) AC_CHECK_HEADER([sys/sysctl.h], [DEFINES="$DEFINES -DHAVE_SYS_SYSCTL_H"]) AC_CHECK_HEADERS([endian.h]) +AC_CHECK_HEADER([dlfcn.h], [DEFINES="$DEFINES -DHAVE_DLFCN_H"]) AC_CHECK_FUNC([strtof], [DEFINES="$DEFINES -DHAVE_STRTOF"]) AC_CHECK_FUNC([mkostemp], [DEFINES="$DEFINES -DHAVE_MKOSTEMP"]) AC_CHECK_FUNC([timespec_get], [DEFINES="$DEFINES -DHAVE_TIMESPEC_GET"]) @@ -1362,7 +1366,7 @@ GALLIUM_DRIVERS_DEFAULT="r300,r600,svga,swrast" AC_ARG_WITH([gallium-drivers], [AS_HELP_STRING([--with-gallium-drivers@<:@=DIRS...@:>@], [comma delimited Gallium drivers list, e.g. - "i915,nouveau,r300,r600,radeonsi,freedreno,pl111,svga,swrast,swr,tegra,vc4,vc5,virgl,etnaviv,imx" + "i915,nouveau,r300,r600,radeonsi,freedreno,pl111,svga,swrast,swr,tegra,v3d,vc4,virgl,etnaviv,imx" @<:@default=r300,r600,svga,swrast@:>@])], [with_gallium_drivers="$withval"], [with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT"]) @@ -1565,6 +1569,7 @@ AM_CONDITIONAL(HAVE_APPLEDRI, test "x$enable_dri" = xyes -a "x$dri_platform" = x AM_CONDITIONAL(HAVE_LMSENSORS, test "x$enable_lmsensors" = xyes ) AM_CONDITIONAL(HAVE_GALLIUM_EXTRA_HUD, test "x$enable_gallium_extra_hud" = xyes ) AM_CONDITIONAL(HAVE_WINDOWSDRI, test "x$enable_dri" = xyes -a "x$dri_platform" = xwindows ) +AM_CONDITIONAL(HAVE_XLEASE, test "x$have_xlease" = xyes ) AC_ARG_ENABLE([shared-glapi], [AS_HELP_STRING([--enable-shared-glapi], @@ -1797,6 +1802,9 @@ for plat in $platforms; do PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client >= $WAYLAND_REQUIRED]) PKG_CHECK_MODULES([WAYLAND_SERVER], [wayland-server >= $WAYLAND_REQUIRED]) PKG_CHECK_MODULES([WAYLAND_PROTOCOLS], [wayland-protocols >= $WAYLAND_PROTOCOLS_REQUIRED]) + if test "x$enable_egl" = xyes; then + PKG_CHECK_MODULES([WAYLAND_EGL], [wayland-egl-backend >= $WAYLAND_EGL_BACKEND_REQUIRED]) + fi WAYLAND_PROTOCOLS_DATADIR=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols` PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner], @@ -1829,6 +1837,9 @@ for plat in $platforms; do android) PKG_CHECK_MODULES([ANDROID], [cutils hardware sync]) + if test -n "$with_gallium_drivers"; then + PKG_CHECK_MODULES([BACKTRACE], [backtrace]) + fi DEFINES="$DEFINES -DHAVE_ANDROID_PLATFORM" ;; @@ -1864,12 +1875,45 @@ if test x"$enable_dri3" = xyes; then fi fi + +if echo "$platforms" | grep -q 'x11' && echo "$platforms" | grep -q 'drm'; then + have_xlease=yes +else + have_xlease=no +fi + +if test x"$have_xlease" = xyes; then + randr_modules="x11-xcb xcb-randr" + PKG_CHECK_MODULES([XCB_RANDR], [$randr_modules]) + xlib_randr_modules="xrandr" + PKG_CHECK_MODULES([XLIB_RANDR], [$xlib_randr_modules]) +fi + AM_CONDITIONAL(HAVE_PLATFORM_X11, echo "$platforms" | grep -q 'x11') AM_CONDITIONAL(HAVE_PLATFORM_WAYLAND, echo "$platforms" | grep -q 'wayland') AM_CONDITIONAL(HAVE_PLATFORM_DRM, echo "$platforms" | grep -q 'drm') AM_CONDITIONAL(HAVE_PLATFORM_SURFACELESS, echo "$platforms" | grep -q 'surfaceless') AM_CONDITIONAL(HAVE_PLATFORM_ANDROID, echo "$platforms" | grep -q 'android') +AC_ARG_ENABLE(xlib-lease, + [AS_HELP_STRING([--enable-xlib-lease] + [enable VK_acquire_xlib_display using X leases])], + [enable_xlib_lease=$enableval], [enable_xlib_lease=auto]) +case "x$enable_xlib_lease" in +xyes) + ;; +xno) + ;; +*) + if echo "$platforms" | grep -q 'x11' && echo "$platforms" | grep -q 'drm'; then + enable_xlib_lease=yes + else + enable_xlib_lease=no + fi +esac + +AM_CONDITIONAL(HAVE_XLIB_LEASE, test "x$enable_xlib_lease" = xyes) + dnl dnl More DRI setup dnl @@ -2088,6 +2132,9 @@ if test -n "$with_vulkan_drivers"; then PKG_CHECK_MODULES([AMDGPU], [libdrm >= $LIBDRM_AMDGPU_REQUIRED libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED]) radeon_llvm_check $LLVM_REQUIRED_RADV "radv" require_x11_dri3 "radv" + if test "x$acv_mako_found" = xno; then + AC_MSG_ERROR([Python mako module v$PYTHON_MAKO_REQUIRED or higher not found]) + fi HAVE_RADEON_VULKAN=yes ;; *) @@ -2205,13 +2252,13 @@ else have_vdpau_platform=no fi -if echo $platforms | grep -q "x11\|drm"; then +if echo $platforms | egrep -q "x11|drm"; then have_omx_platform=yes else have_omx_platform=no fi -if echo $platforms | grep -q "x11\|drm\|wayland"; then +if echo $platforms | egrep -q "x11|drm|wayland"; then have_va_platform=yes else have_va_platform=no @@ -2717,20 +2764,20 @@ if test -n "$with_gallium_drivers"; then ;; xvc4) HAVE_GALLIUM_VC4=yes - require_libdrm "vc4" + PKG_CHECK_MODULES([VC4], [libdrm >= $LIBDRM_VC4_REQUIRED]) PKG_CHECK_MODULES([SIMPENROSE], [simpenrose], [USE_VC4_SIMULATOR=yes; DEFINES="$DEFINES -DUSE_VC4_SIMULATOR"], [USE_VC4_SIMULATOR=no]) ;; - xvc5) - HAVE_GALLIUM_VC5=yes + xv3d) + HAVE_GALLIUM_V3D=yes - PKG_CHECK_MODULES([VC5_SIMULATOR], [v3dv3], - [USE_VC5_SIMULATOR=yes; - DEFINES="$DEFINES -DUSE_VC5_SIMULATOR"], - [AC_MSG_ERROR([vc5 requires the simulator])]) + PKG_CHECK_MODULES([V3D_SIMULATOR], [v3dv3], + [USE_V3D_SIMULATOR=yes; + DEFINES="$DEFINES -DUSE_V3D_SIMULATOR"], + [USE_V3D_SIMULATOR=no]) ;; xpl111) HAVE_GALLIUM_PL111=yes @@ -2750,8 +2797,9 @@ if test -n "$with_gallium_drivers"; then fi # XXX: Keep in sync with LLVM_REQUIRED_SWR -AM_CONDITIONAL(SWR_INVALID_LLVM_VERSION, test "x$LLVM_VERSION" != x4.0.0 -a \ - "x$LLVM_VERSION" != x4.0.1) +AM_CONDITIONAL(SWR_INVALID_LLVM_VERSION, test "x$LLVM_VERSION" != x5.0.0 -a \ + "x$LLVM_VERSION" != x5.0.1 -a \ + "x$LLVM_VERSION" != x5.0.2) if test "x$enable_llvm" = "xyes" -a "$with_gallium_drivers"; then llvm_require_version $LLVM_REQUIRED_GALLIUM "gallium" @@ -2882,8 +2930,8 @@ AM_CONDITIONAL(HAVE_GALLIUM_SWR, test "x$HAVE_GALLIUM_SWR" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_SWRAST, test "x$HAVE_GALLIUM_SOFTPIPE" = xyes -o \ "x$HAVE_GALLIUM_LLVMPIPE" = xyes -o \ "x$HAVE_GALLIUM_SWR" = xyes) +AM_CONDITIONAL(HAVE_GALLIUM_V3D, test "x$HAVE_GALLIUM_V3D" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_VC4, test "x$HAVE_GALLIUM_VC4" = xyes) -AM_CONDITIONAL(HAVE_GALLIUM_VC5, test "x$HAVE_GALLIUM_VC5" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_VIRGL, test "x$HAVE_GALLIUM_VIRGL" = xyes) AM_CONDITIONAL(HAVE_GALLIUM_STATIC_TARGETS, test "x$enable_shared_pipe_drivers" = xno) @@ -2911,7 +2959,7 @@ AM_CONDITIONAL(HAVE_AMD_DRIVERS, test "x$HAVE_GALLIUM_RADEONSI" = xyes -o \ "x$HAVE_RADEON_VULKAN" = xyes) AM_CONDITIONAL(HAVE_BROADCOM_DRIVERS, test "x$HAVE_GALLIUM_VC4" = xyes -o \ - "x$HAVE_GALLIUM_VC5" = xyes) + "x$HAVE_GALLIUM_V3D" = xyes) AM_CONDITIONAL(HAVE_INTEL_DRIVERS, test "x$HAVE_INTEL_VULKAN" = xyes -o \ "x$HAVE_I965_DRI" = xyes) @@ -2922,8 +2970,8 @@ AM_CONDITIONAL(NEED_RADEON_DRM_WINSYS, test "x$HAVE_GALLIUM_R300" = xyes -o \ AM_CONDITIONAL(NEED_WINSYS_XLIB, test "x$enable_glx" = xgallium-xlib) AM_CONDITIONAL(HAVE_GALLIUM_COMPUTE, test x$enable_opencl = xyes) AM_CONDITIONAL(HAVE_GALLIUM_LLVM, test "x$enable_llvm" = xyes) +AM_CONDITIONAL(USE_V3D_SIMULATOR, test x$USE_V3D_SIMULATOR = xyes) AM_CONDITIONAL(USE_VC4_SIMULATOR, test x$USE_VC4_SIMULATOR = xyes) -AM_CONDITIONAL(USE_VC5_SIMULATOR, test x$USE_VC5_SIMULATOR = xyes) AM_CONDITIONAL(HAVE_LIBDRM, test "x$have_libdrm" = xyes) AM_CONDITIONAL(HAVE_OSMESA, test "x$enable_osmesa" = xyes) @@ -2959,7 +3007,7 @@ AC_SUBST([XVMC_MAJOR], 1) AC_SUBST([XVMC_MINOR], 0) AC_SUBST([XA_MAJOR], 2) -AC_SUBST([XA_MINOR], 3) +AC_SUBST([XA_MINOR], 4) AC_SUBST([XA_PATCH], 0) AC_SUBST([XA_VERSION], "$XA_MAJOR.$XA_MINOR.$XA_PATCH") @@ -3008,8 +3056,6 @@ AC_CONFIG_FILES([Makefile src/egl/Makefile src/egl/main/egl.pc src/egl/wayland/wayland-drm/Makefile - src/egl/wayland/wayland-egl/Makefile - src/egl/wayland/wayland-egl/wayland-egl.pc src/gallium/Makefile src/gallium/auxiliary/Makefile src/gallium/auxiliary/pipe-loader/Makefile @@ -3027,8 +3073,8 @@ AC_CONFIG_FILES([Makefile src/gallium/drivers/tegra/Makefile src/gallium/drivers/etnaviv/Makefile src/gallium/drivers/imx/Makefile + src/gallium/drivers/v3d/Makefile src/gallium/drivers/vc4/Makefile - src/gallium/drivers/vc5/Makefile src/gallium/drivers/virgl/Makefile src/gallium/state_trackers/clover/Makefile src/gallium/state_trackers/dri/Makefile @@ -3075,8 +3121,8 @@ AC_CONFIG_FILES([Makefile src/gallium/winsys/sw/wrapper/Makefile src/gallium/winsys/sw/xlib/Makefile src/gallium/winsys/tegra/drm/Makefile + src/gallium/winsys/v3d/drm/Makefile src/gallium/winsys/vc4/drm/Makefile - src/gallium/winsys/vc5/drm/Makefile src/gallium/winsys/virgl/drm/Makefile src/gallium/winsys/virgl/vtest/Makefile src/gbm/Makefile @@ -3111,7 +3157,9 @@ AC_CONFIG_FILES([Makefile src/mesa/state_tracker/tests/Makefile src/util/Makefile src/util/tests/hash_table/Makefile + src/util/tests/set/Makefile src/util/tests/string_buffer/Makefile + src/util/tests/vma/Makefile src/util/xmlpool/Makefile src/vulkan/Makefile])