summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac50
1 files changed, 33 insertions, 17 deletions
diff --git a/configure.ac b/configure.ac
index fd300504bf7..33437f54f89 100644
--- a/configure.ac
+++ b/configure.ac
@@ -243,24 +243,28 @@ GLU_LIB_NAME='lib$(GLU_LIB).'${LIB_EXTENSION}
GLUT_LIB_NAME='lib$(GLUT_LIB).'${LIB_EXTENSION}
GLW_LIB_NAME='lib$(GLW_LIB).'${LIB_EXTENSION}
OSMESA_LIB_NAME='lib$(OSMESA_LIB).'${LIB_EXTENSION}
+EGL_LIB_NAME='lib$(EGL_LIB).'${LIB_EXTENSION}
GL_LIB_GLOB='lib$(GL_LIB).*'${LIB_EXTENSION}'*'
GLU_LIB_GLOB='lib$(GLU_LIB).*'${LIB_EXTENSION}'*'
GLUT_LIB_GLOB='lib$(GLUT_LIB).*'${LIB_EXTENSION}'*'
GLW_LIB_GLOB='lib$(GLW_LIB).*'${LIB_EXTENSION}'*'
OSMESA_LIB_GLOB='lib$(OSMESA_LIB).*'${LIB_EXTENSION}'*'
+EGL_LIB_GLOB='lib$(EGL_LIB).*'${LIB_EXTENSION}'*'
AC_SUBST([GL_LIB_NAME])
AC_SUBST([GLU_LIB_NAME])
AC_SUBST([GLUT_LIB_NAME])
AC_SUBST([GLW_LIB_NAME])
AC_SUBST([OSMESA_LIB_NAME])
+AC_SUBST([EGL_LIB_NAME])
AC_SUBST([GL_LIB_GLOB])
AC_SUBST([GLU_LIB_GLOB])
AC_SUBST([GLUT_LIB_GLOB])
AC_SUBST([GLW_LIB_GLOB])
AC_SUBST([OSMESA_LIB_GLOB])
+AC_SUBST([EGL_LIB_GLOB])
dnl
dnl Arch/platform-specific settings
@@ -447,8 +451,6 @@ AC_SUBST([GALLIUM_WINSYS_DIRS])
AC_SUBST([GALLIUM_WINSYS_DRM_DIRS])
AC_SUBST([GALLIUM_DRIVERS_DIRS])
AC_SUBST([GALLIUM_STATE_TRACKERS_DIRS])
-AC_SUBST([RADEON_CFLAGS])
-AC_SUBST([RADEON_LDFLAGS])
dnl
dnl User supplied program configuration
@@ -576,13 +578,6 @@ dri)
GL_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED"
DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED"
- PKG_CHECK_MODULES([LIBDRM_RADEON], [libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED], HAVE_LIBDRM_RADEON=yes, HAVE_LIBDRM_RADEON=no)
-
- if test "$HAVE_LIBDRM_RADEON" = yes; then
- RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS"
- RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS
- fi
-
# find the DRI deps for libGL
if test "$x11_pkgconfig" = yes; then
# add xcb modules if necessary
@@ -802,6 +797,29 @@ AC_SUBST([DRI_DIRS])
AC_SUBST([EXPAT_INCLUDES])
AC_SUBST([DRI_LIB_DEPS])
+case $DRI_DIRS in
+*i915*|*i965*)
+ PKG_CHECK_MODULES([INTEL], [libdrm_intel])
+ ;;
+esac
+
+case $DRI_DIRS in
+*radeon*|*r200*|*r300*|*r600*)
+ PKG_CHECK_MODULES([LIBDRM_RADEON],
+ [libdrm_radeon libdrm >= $LIBDRM_RADEON_REQUIRED],
+ HAVE_LIBDRM_RADEON=yes,
+ HAVE_LIBDRM_RADEON=no)
+
+ if test "$HAVE_LIBDRM_RADEON" = yes; then
+ RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS"
+ RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS
+ fi
+ ;;
+esac
+AC_SUBST([RADEON_CFLAGS])
+AC_SUBST([RADEON_LDFLAGS])
+
+
dnl
dnl OSMesa configuration
dnl
@@ -886,17 +904,15 @@ AC_ARG_ENABLE([egl],
[enable_egl=yes])
if test "x$enable_egl" = xyes; then
SRC_DIRS="$SRC_DIRS egl"
-
- if test "$x11_pkgconfig" = yes; then
- PKG_CHECK_MODULES([EGL], [x11])
- EGL_LIB_DEPS="$EGL_LIBS"
- else
- # should check these...
- EGL_LIB_DEPS="$X_LIBS -lX11"
+ EGL_LIB_DEPS="$DLOPEN_LIBS -lpthread"
+ EGL_DRIVERS_DIRS=""
+ if test "$enable_static" != yes && test "$mesa_driver" != osmesa; then
+ # build egl_glx when libGL is built
+ EGL_DRIVERS_DIRS="glx"
fi
- EGL_LIB_DEPS="$EGL_LIB_DEPS $DLOPEN_LIBS"
fi
AC_SUBST([EGL_LIB_DEPS])
+AC_SUBST([EGL_DRIVERS_DIRS])
dnl
dnl GLU configuration