dnl LLVM versions
LLVM_REQUIRED_GALLIUM=3.3.0
LLVM_REQUIRED_OPENCL=3.6.0
-LLVM_REQUIRED_R600=3.8.0
-LLVM_REQUIRED_RADEONSI=3.8.0
+LLVM_REQUIRED_R600=3.9.0
+LLVM_REQUIRED_RADEONSI=3.9.0
LLVM_REQUIRED_RADV=3.9.0
LLVM_REQUIRED_SWR=3.9.0
AC_SUBST([DEFINES])
android=no
case "$host_os" in
-*-android)
+*-android*)
android=yes
;;
linux*|*-gnu*|gnu*|cygwin*)
CFLAGS=$save_CFLAGS
AC_ARG_ENABLE(pwr8,
- [AS_HELP_STRING([--disable-pwr8-inst],
+ [AS_HELP_STRING([--disable-pwr8],
[disable POWER8-specific instructions])],
[enable_pwr8=$enableval], [enable_pwr8=auto])
dnl
AC_ARG_ENABLE([asm],
[AS_HELP_STRING([--disable-asm],
- [disable assembly usage @<:@default=enabled on supported plaforms@:>@])],
+ [disable assembly usage @<:@default=enabled on supported platforms@:>@])],
[enable_asm="$enableval"],
[enable_asm=yes]
)
if test "x$LIBUNWIND" = "xyes"; then
PKG_CHECK_MODULES(LIBUNWIND, libunwind)
- if test "x$HAVE_LIBUNWIND" != "xyes"; then
- AC_MSG_ERROR([libunwind requested but not installed.])
- fi
AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
fi
-AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$LIBUNWIND" = xyes])
-
dnl Options for APIs
AC_ARG_ENABLE([opengl],
esac
PKG_CHECK_MODULES([GLVND], libglvnd >= 0.2.0)
- PKG_CHECK_VAR(LIBGLVND_DATADIR, libglvnd, datadir)
+ LIBGLVND_DATADIR=`$PKG_CONFIG --variable=datadir libglvnd`
AC_SUBST([LIBGLVND_DATADIR])
DEFINES="${DEFINES} -DUSE_LIBGLVND=1"
DEFINES="$DEFINES -DGLX_X86_READONLY_TEXT"
fi
+dnl
+dnl DEPRECATED: EGL Platforms configuration
+dnl
+AC_ARG_WITH([egl-platforms],
+ [AS_HELP_STRING([--with-egl-platforms@<:@=DIRS...@:>@],
+ [DEPRECATED: use --with-platforms instead@<:@default=auto@:>@])],
+ [with_egl_platforms="$withval"],
+ [with_egl_platforms=auto])
+
+if test "x$with_egl_platforms" = xauto; then
+ if test "x$enable_egl" = xyes; then
+ if test "x$enable_gbm" = xyes; then
+ with_egl_platforms="x11,drm"
+ else
+ with_egl_platforms="x11"
+ fi
+ else
+ with_egl_platforms=""
+ fi
+else
+ AC_MSG_WARN([--with-egl-platforms is deprecated. Use --with-platforms instead.])
+fi
+
+dnl
+dnl Platforms configuration
+dnl
+AC_ARG_WITH([platforms],
+ [AS_HELP_STRING([--with-platforms@<:@=DIRS...@:>@],
+ [comma delimited native platforms libEGL/Vulkan/other supports, e.g.
+ "x11,drm,wayland,surfaceless..." @<:@default=auto@:>@])],
+ [with_platforms="$withval"],
+ [with_platforms=auto])
+
+# For the time being, we still reuse the EGL named variables/defines.
+if test "x$with_platforms" != xauto; then
+ with_egl_platforms=$with_platforms
+fi
+
+PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
+ WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
+ WAYLAND_SCANNER='')
+if test "x$WAYLAND_SCANNER" = x; then
+ AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
+fi
+
+# Do per-EGL platform setups and checks
+egl_platforms=`IFS=', '; echo $with_egl_platforms`
+for plat in $egl_platforms; do
+ case "$plat" in
+ wayland)
+
+ 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 egl platform])
+ fi
+ ;;
+
+ x11)
+ PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED xcb-xfixes])
+ ;;
+
+ drm)
+ test "x$enable_gbm" = "xno" &&
+ AC_MSG_ERROR([EGL platform drm needs gbm])
+ ;;
+
+ surfaceless)
+ ;;
+
+ android)
+ PKG_CHECK_MODULES([ANDROID], [cutils hardware sync])
+ ;;
+
+ *)
+ AC_MSG_ERROR([EGL platform '$plat' does not exist])
+ ;;
+ esac
+
+ case "$plat" in
+ wayland|drm|surfaceless)
+ require_libdrm "Platform $plat"
+ ;;
+ esac
+done
+
+AM_CONDITIONAL(HAVE_PLATFORM_X11, echo "$egl_platforms" | grep -q 'x11')
+AM_CONDITIONAL(HAVE_PLATFORM_WAYLAND, echo "$egl_platforms" | grep -q 'wayland')
+AM_CONDITIONAL(HAVE_EGL_PLATFORM_DRM, echo "$egl_platforms" | grep -q 'drm')
+AM_CONDITIONAL(HAVE_EGL_PLATFORM_SURFACELESS, echo "$egl_platforms" | grep -q 'surfaceless')
+AM_CONDITIONAL(HAVE_EGL_PLATFORM_ANDROID, echo "$egl_platforms" | grep -q 'android')
+
dnl
dnl More DRI setup
dnl
dnl
AM_CONDITIONAL(HAVE_GALLIUM, test -n "$with_gallium_drivers")
-dnl
-dnl EGL Platforms configuration
-dnl
-AC_ARG_WITH([egl-platforms],
- [AS_HELP_STRING([--with-egl-platforms@<:@=DIRS...@:>@],
- [comma delimited native platforms libEGL supports, e.g.
- "x11,drm" @<:@default=auto@:>@])],
- [with_egl_platforms="$withval"],
- [if test "x$enable_egl" = xyes; then
- if test "x$enable_gbm" = xyes; then
- with_egl_platforms="x11,drm"
- else
- with_egl_platforms="x11"
- fi
- else
- with_egl_platforms=""
- fi])
-
-if test "x$with_egl_platforms" != "x" -a "x$enable_egl" != xyes; then
- AC_MSG_ERROR([cannot build egl state tracker without EGL library])
-fi
-
-PKG_CHECK_MODULES([WAYLAND_SCANNER], [wayland-scanner],
- WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`,
- WAYLAND_SCANNER='')
-if test "x$WAYLAND_SCANNER" = x; then
- AC_PATH_PROG([WAYLAND_SCANNER], [wayland-scanner], [:])
-fi
-
-# Do per-EGL platform setups and checks
-egl_platforms=`IFS=', '; echo $with_egl_platforms`
-for plat in $egl_platforms; do
- case "$plat" in
- wayland)
-
- 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 egl platform])
- fi
- ;;
-
- x11)
- PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb xcb-dri2 >= $XCBDRI2_REQUIRED xcb-xfixes])
- ;;
-
- drm)
- test "x$enable_gbm" = "xno" &&
- AC_MSG_ERROR([EGL platform drm needs gbm])
- ;;
-
- surfaceless)
- ;;
-
- android)
- PKG_CHECK_MODULES([ANDROID], [cutils hardware sync])
- ;;
-
- *)
- AC_MSG_ERROR([EGL platform '$plat' does not exist])
- ;;
- esac
-
- case "$plat" in
- wayland|drm|surfaceless)
- require_libdrm "Platform $plat"
- ;;
- esac
-done
-
# libEGL wants to default to the first platform specified in
# ./configure. parse that here.
if test "x$egl_platforms" != "x"; then
EGL_NATIVE_PLATFORM="_EGL_INVALID_PLATFORM"
fi
-AM_CONDITIONAL(HAVE_PLATFORM_X11, echo "$egl_platforms" | grep -q 'x11')
-AM_CONDITIONAL(HAVE_PLATFORM_WAYLAND, echo "$egl_platforms" | grep -q 'wayland')
-AM_CONDITIONAL(HAVE_EGL_PLATFORM_DRM, echo "$egl_platforms" | grep -q 'drm')
-AM_CONDITIONAL(HAVE_EGL_PLATFORM_SURFACELESS, echo "$egl_platforms" | grep -q 'surfaceless')
-AM_CONDITIONAL(HAVE_EGL_PLATFORM_ANDROID, echo "$egl_platforms" | grep -q 'android')
-
AC_SUBST([EGL_NATIVE_PLATFORM])
AC_SUBST([EGL_CFLAGS])
;;
*)
AC_MSG_ERROR([$1 requires one of these:
- 1) --with-egl-platforms=drm (X, Wayland, offscreen rendering based on DRM)
- 2) --with-egl-platforms=surfaceless (offscreen only)
+ 1) --with-platforms=drm (X, Wayland, offscreen rendering based on DRM)
+ 2) --with-platforms=surfaceless (offscreen only)
Recommended options: drm,x11])
;;
esac
xvirgl)
HAVE_GALLIUM_VIRGL=yes
require_libdrm "virgl"
- require_basic_egl "virgl"
+ if test "x$enable_egl" = xyes; then
+ require_basic_egl "virgl"
+ fi
;;
*)
AC_MSG_ERROR([Unknown Gallium driver: $driver])
echo ""
echo " EGL: $enable_egl"
if test "$enable_egl" = yes; then
- echo " EGL platforms: $egl_platforms"
egl_drivers=""
if test "x$enable_dri" != "xno"; then
echo " GBM: no"
fi
+ echo " EGL/Vulkan/VL platforms: $egl_platforms"
+
# Vulkan
echo ""
if test "x$VULKAN_DRIVERS" != x; then
echo " Shared-glapi: $enable_shared_glapi"
dnl Compiler options
-# cleanup the CFLAGS/CXXFLAGS/DEFINES vars
+# cleanup the CFLAGS/CXXFLAGS/LDFLAGS/DEFINES vars
cflags=`echo $CFLAGS | \
$SED 's/^ *//;s/ */ /;s/ *$//'`
cxxflags=`echo $CXXFLAGS | \
$SED 's/^ *//;s/ */ /;s/ *$//'`
+ldflags=`echo $LDFLAGS | $SED 's/^ *//;s/ */ /;s/ *$//'`
defines=`echo $DEFINES | $SED 's/^ *//;s/ */ /;s/ *$//'`
echo ""
echo " CFLAGS: $cflags"
echo " CXXFLAGS: $cxxflags"
+echo " LDFLAGS: $ldflags"
echo " Macros: $defines"
echo ""
if test "x$enable_llvm" = xyes; then