AC_MSG_CHECKING([whether $CXX supports -fvisibility=hidden])
VISIBILITY_CXXFLAGS="-fvisibility=hidden"
CXXFLAGS="$CXXFLAGS $VISIBILITY_CXXFLAGS"
+ AC_LANG_PUSH([C++])
AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]),
[VISIBILITY_CXXFLAGS="" ; AC_MSG_RESULT([no])]);
+ AC_LANG_POP([C++])
# Restore CXXFLAGS; VISIBILITY_CXXFLAGS are added to it where needed.
CXXFLAGS=$save_CXXFLAGS
CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"
fi
+dnl even if the compiler appears to support it, using visibility attributes isn't
+dnl going to do anything useful currently on cygwin apart from emit lots of warnings
+case "$host_os" in
+cygwin*)
+ VISIBILITY_CFLAGS=""
+ VISIBILITY_CXXFLAGS=""
+ ;;
+esac
+
AC_SUBST([VISIBILITY_CFLAGS])
AC_SUBST([VISIBILITY_CXXFLAGS])
VG_LIB_NAME='lib$(VG_LIB).'${LIB_EXTENSION}
GLAPI_LIB_NAME='lib$(GLAPI_LIB).'${LIB_EXTENSION}
WAYLAND_EGL_LIB_NAME='lib$(WAYLAND_EGL_LIB).'${LIB_EXTENSION}
+GBM_LIB_NAME='lib$(GBM_LIB).'${LIB_EXTENSION}
GL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
GLU_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLU_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
VG_LIB_GLOB=${LIB_PREFIX_GLOB}'$(VG_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
GLAPI_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLAPI_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
WAYLAND_EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(WAYLAND_EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
+GBM_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GBM_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*'
AC_SUBST([GL_LIB_NAME])
AC_SUBST([GLU_LIB_NAME])
AC_SUBST([VG_LIB_NAME])
AC_SUBST([GLAPI_LIB_NAME])
AC_SUBST([WAYLAND_EGL_LIB_NAME])
+AC_SUBST([GBM_LIB_NAME])
AC_SUBST([GL_LIB_GLOB])
AC_SUBST([GLU_LIB_GLOB])
AC_SUBST([VG_LIB_GLOB])
AC_SUBST([GLAPI_LIB_GLOB])
AC_SUBST([WAYLAND_EGL_LIB_GLOB])
+AC_SUBST([GBM_LIB_GLOB])
dnl
dnl Arch/platform-specific settings
[enable support for OpenGL ES 2.x API @<:@default=no@:>@])],
[enable_gles2="$enableval"],
[enable_gles2=no])
-AC_ARG_ENABLE([gles-overlay],
- [AS_HELP_STRING([--enable-gles-overlay],
- [DEPRECATED. Same as --enable-gles1 and --enable-gles2])],
- [enable_gles1="$enableval"; enable_gles2="$enableval"],
- [])
AC_ARG_ENABLE([openvg],
[AS_HELP_STRING([--enable-openvg],
[enable support for OpenVG API @<:@default=no@:>@])],
[disable EGL library @<:@default=enabled@:>@])],
[enable_egl="$enableval"],
[enable_egl=yes])
+AC_ARG_ENABLE([gbm],
+ [AS_HELP_STRING([--enable-gbm],
+ [enable gbm library @<:@default=auto@:>@])],
+ [enable_gbm="$enableval"],
+ [enable_gbm=auto])
+AC_ARG_ENABLE([gallium_egl],
+ [AS_HELP_STRING([--enable-gallium-egl],
+ [enable optional EGL state tracker (not required
+ for EGL support in Gallium with OpenGL and OpenGL ES)
+ @<:@default=disable@:>@])],
+ [enable_gallium_egl="$enableval"],
+ [enable_gallium_egl=no])
+AC_ARG_ENABLE([gallium_gbm],
+ [AS_HELP_STRING([--enable-gallium-gbm],
+ [enable optional gbm state tracker (not required for
+ gbm support in Gallium)
+ @<:@default=disable@:>@])],
+ [enable_gallium_gbm="$enableval"],
+ [enable_gallium_gbm=no])
# Option for Gallium drivers
-GALLIUM_DRIVERS_DEFAULT="r300,swrast"
+GALLIUM_DRIVERS_DEFAULT="r300,r600,swrast"
AC_ARG_WITH([gallium-drivers],
[AS_HELP_STRING([--with-gallium-drivers@<:@=DIRS...@:>@],
[comma delimited Gallium drivers list, e.g.
"i915,i965,nouveau,r300,r600,svga,swrast"
- @<:@default=r300,swrast@:>@])],
+ @<:@default=r300,r600,swrast@:>@])],
[with_gallium_drivers="$withval"],
[with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT"])
else
# should check these...
X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
- GL_LIB_DEPS="$X_LIBS -lX11 -lXext -lXxf86vm -lXdamage -lXfixes"
+ if test "x$HAVE_XF86VIDMODE" == xyes; then
+ GL_LIB_DEPS="$X_LIBS -lX11 -lXext -lXxf86vm -lXdamage -lXfixes"
+ else
+ GL_LIB_DEPS="$X_LIBS -lX11 -lXext -lXdamage -lXfixes"
+ fi
GL_PC_LIB_PRIV="$GL_LIB_DEPS"
GL_PC_CFLAGS="$X11_INCLUDES"
SRC_DIRS="$SRC_DIRS egl"
EGL_LIB_DEPS="$DLOPEN_LIBS $SELINUX_LIBS -lpthread"
EGL_DRIVERS_DIRS=""
- GALLIUM_STATE_TRACKERS_DIRS="egl $GALLIUM_STATE_TRACKERS_DIRS"
- GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS egl"
- HAVE_ST_EGL="yes"
if test "$enable_static" != yes; then
# build egl_glx when libGL is built
AC_SUBST([EGL_LIB_DEPS])
AC_SUBST([EGL_DRIVERS_DIRS])
+dnl
+dnl gbm configuration
+dnl
+if test "x$enable_gbm" = xauto; then
+ case "$with_egl_platforms" in
+ *drm*)
+ enable_gbm=yes ;;
+ *)
+ enable_gbm=no ;;
+ esac
+fi
+if test "x$enable_gbm" = xyes; then
+ SRC_DIRS="$SRC_DIRS gbm"
+ GBM_BACKEND_DIRS=""
+
+ PKG_CHECK_MODULES([LIBUDEV], [libudev], [],
+ AC_MSG_ERROR([gbm needs udev]))
+ GBM_LIB_DEPS="$DLOPEN_LIBS $LIBUDEV_LIBS"
+
+ if test "$mesa_driver" = dri; then
+ GBM_BACKEND_DIRS="$GBM_BACKEND_DIRS dri"
+ if test "$SHARED_GLAPI" -eq 0; then
+ AC_MSG_ERROR([gbm_dri requires --enable-shared-glapi])
+ fi
+ fi
+fi
+AC_SUBST([GBM_LIB_DEPS])
+AC_SUBST([GBM_BACKEND_DIRS])
+GBM_PC_REQ_PRIV="libudev"
+GBM_PC_LIB_PRIV="$DLOPEN_LIBS"
+GBM_PC_CFLAGS=
+AC_SUBST([GBM_PC_REQ_PRIV])
+AC_SUBST([GBM_PC_LIB_PRIV])
+AC_SUBST([GBM_PC_CFLAGS])
+
+dnl
+dnl EGL Gallium configuration
+dnl
+if test "x$enable_gallium_egl" = xyes; then
+ if test "x$with_gallium_drivers" = x; then
+ AC_MSG_ERROR([cannot enable egl_gallium without Gallium])
+ fi
+ if test "x$enable_egl" = xno; then
+ AC_MSG_ERROR([cannot enable egl_gallium without EGL])
+ fi
+
+ GALLIUM_STATE_TRACKERS_DIRS="egl $GALLIUM_STATE_TRACKERS_DIRS"
+ GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS egl-static"
+ HAVE_ST_EGL="yes"
+fi
+
+dnl
+dnl gbm Gallium configuration
+dnl
+if test "x$enable_gallium_gbm" = xyes; then
+ if test "x$with_gallium_drivers" = x; then
+ AC_MSG_ERROR([cannot enable gbm_gallium without Gallium])
+ fi
+ if test "x$enable_gbm" = xno; then
+ AC_MSG_ERROR([cannot enable gbm_gallium without gbm])
+ fi
+
+ GALLIUM_STATE_TRACKERS_DIRS="gbm $GALLIUM_STATE_TRACKERS_DIRS"
+ GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS gbm"
+ HAVE_ST_GBM="yes"
+fi
+
dnl
dnl X.Org DDX configuration
dnl
if test "x$with_gallium_drivers" = x; then
AC_MSG_ERROR([cannot enable OpenVG without Gallium])
fi
+ if test "x$enable_gallium_egl" = xno; then
+ AC_MSG_ERROR([cannot enable OpenVG without egl_gallium])
+ fi
EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(VG_LIB)'
VG_LIB_DEPS="$VG_LIB_DEPS $SELINUX_LIBS -lpthread"
if test "x$with_gallium_drivers" != x; then
SRC_DIRS="$SRC_DIRS gallium gallium/winsys gallium/targets"
AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no])
+else
+ LLVM_CONFIG=no
fi
AC_SUBST([LLVM_CFLAGS])
"x11,drm" @<:@default=auto@:>@])],
[with_egl_platforms="$withval"],
[with_egl_platforms=yes])
-AC_ARG_WITH([egl-displays],
- [AS_HELP_STRING([--with-egl-displays@<:@=DIRS...@:>@],
- [DEPRECATED. Use --with-egl-platforms instead])],
- [with_egl_platforms="$withval"])
EGL_PLATFORMS=""
WAYLAND_EGL_LIB_DEPS=""
yes)
if test "x$enable_egl" = xyes && test "x$mesa_driver" != xosmesa; then
EGL_PLATFORMS="x11"
- if test "$mesa_driver" = dri; then
- EGL_PLATFORMS="$EGL_PLATFORMS drm"
- fi
fi
;;
*)
WAYLAND_EGL_LIB_DEPS="$WAYLAND_LIBS $LIBDRM_LIBS"
GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland"
fi
+ if test "$plat" = "drm" && test "x$enable_gbm" = no; then
+ AC_MSG_ERROR([EGL platform drm needs gbm])
+ fi
done
EGL_PLATFORMS="$egl_platforms"
;;
ln -s autoconf configs/current
])
+dnl Sort the dirs alphabetically
+GALLIUM_TARGET_DIRS=`echo $GALLIUM_TARGET_DIRS|tr " " "\n"|sort|tr "\n" " "`
+GALLIUM_WINSYS_DIRS=`echo $GALLIUM_WINSYS_DIRS|tr " " "\n"|sort|tr "\n" " "`
+GALLIUM_DRIVERS_DIRS=`echo $GALLIUM_DRIVERS_DIRS|tr " " "\n"|sort|tr "\n" " "`
+GALLIUM_STATE_TRACKERS_DIRS=`echo $GALLIUM_STATE_TRACKERS_DIRS|tr " " "\n"|sort|tr "\n" " "`
+
AC_OUTPUT
dnl
egl_drivers="$egl_drivers builtin:egl_$d"
done
- if test "$enable_gallium" = yes -a "$HAVE_ST_EGL" = yes; then
+ if test "x$HAVE_ST_EGL" = xyes; then
echo " EGL drivers: ${egl_drivers} egl_gallium"
echo " EGL Gallium STs:$EGL_CLIENT_APIS"
else