AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"])
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([-Werror=incompatible-pointer-types], [CFLAGS="$CFLAGS -Werror=incompatible-pointer-types"])
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"])
GL_LIB="$DEFAULT_GL_LIB_NAME"
OSMESA_LIB=OSMesa
+AC_ARG_WITH([egl-lib-suffix],
+ [AS_HELP_STRING([--with-egl-lib-suffix@<:@=NAME@:>@],
+ [specify EGL library suffix @<:@default=none@:>@])],
+ [EGL_LIB_SUFFIX=$withval],
+ [EGL_LIB_SUFFIX=""])
+AC_ARG_WITH([gles-lib-suffix],
+ [AS_HELP_STRING([--with-gles-lib-suffix@<:@=NAME@:>@],
+ [specify GLES library suffix @<:@default=none@:>@])],
+ [GLES_LIB_SUFFIX=$withval],
+ [GLES_LIB_SUFFIX=""])
+AS_IF([test "x$EGL_LIB_SUFFIX" = xyes], [EGL_LIB_SUFFIX=""])
+AS_IF([test "x$GLES_LIB_SUFFIX" = xyes], [GLES_LIB_SUFFIX=""])
+
+if test "x$enable_libglvnd" = xyes -a "x$EGL_LIB_SUFFIX" != x; then
+ AC_MSG_ERROR([EGL lib suffix can't be used with libglvnd])
+fi
+
+AC_ARG_WITH([platform-sdk-version],
+ [AS_HELP_STRING([--with-platform-sdk-version@<:@=NAME@:>@],
+ [specify Android platform SDK version @<:@default=none@:>@])],
+ [platform_sdk_version=$withval],
+ [platform_sdk_version=""])
+
dnl
dnl Mangled Mesa support
dnl
OSMESA_LIB="Mangled${OSMESA_LIB}"
fi
AC_SUBST([GL_LIB])
+AC_SUBST([EGL_LIB_SUFFIX])
+AC_SUBST([GLES_LIB_SUFFIX])
AC_SUBST([OSMESA_LIB])
dnl HACK when building glx + glvnd we ship gl.pc, despite that glvnd should do it
;;
android)
- PKG_CHECK_MODULES([ANDROID], [cutils hardware sync])
+ if test -n "$platform_sdk_version" && test "$platform_sdk_version" -ge 26; then
+ PKG_CHECK_MODULES([ANDROID], [cutils hardware nativewindow sync])
+ else
+ PKG_CHECK_MODULES([ANDROID], [cutils hardware sync])
+ fi
+
if test -n "$with_gallium_drivers"; then
PKG_CHECK_MODULES([BACKTRACE], [backtrace])
fi
dri3_modifier_modules="xcb-dri3 >= $XCBDRI3_MODIFIERS_REQUIRED xcb-present >= $XCBPRESENT_MODIFIERS_REQUIRED"
PKG_CHECK_MODULES([XCB_DRI3_MODIFIERS], [$dri3_modifier_modules], [have_dri3_modifiers=yes], [have_dri3_modifiers=no])
- if test "x$have_dri3_modifiers" == xyes; then
+ if test "x$have_dri3_modifiers" = xyes; then
DEFINES="$DEFINES -DHAVE_DRI3_MODIFIERS"
fi
fi
dnl the LLVM library propagated in the Libs.private of the respective .pc
dnl file which ensures complete dependency information when statically
dnl linking.
- if test "x$enable_glx" == xgallium-xlib; then
+ if test "x$enable_glx" = xgallium-xlib; then
GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $LLVM_LIBS"
fi
if test "x$enable_gallium_osmesa" = xyes; then