summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 13 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 0b6d634..ec090fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -86,11 +86,17 @@ AC_CHECK_LIB([GLEW],
[],
AC_MSG_ERROR([GLEW required]))
DEMO_CFLAGS="$DEMO_CFLAGS $GLEW_CFLAGS"
-DEMO_LIBS="$DEMO_CFLAGS $GLEW_LIBS"
+DEMO_LIBS="$DEMO_LIBS $GLEW_LIBS"
PKG_CHECK_MODULES(EGL, [egl], [egl_enabled=yes], [egl_enabled=no])
PKG_CHECK_MODULES(GLESV1, [glesv1_cm], [glesv1_enabled=yes], [glesv1_enabled=no])
PKG_CHECK_MODULES(GLESV2, [glesv2], [glesv2_enabled=yes], [glesv2_enabled=no])
+PKG_CHECK_MODULES(OSMESA, [osmesa], [osmesa_enabled=yes], [osmesa_enabled=no])
+dnl The OSMesa .pc uses OSMesa32, while we want to build with other versions
+dnl too.
+OSMESA32_LIBS=$OSMESA_LIBS
+OSMESA16_LIBS=`echo $OSMESA_LIBS | sed 's|32|16|g'
+OSMESA_LIBS=`echo $OSMESA_LIBS | sed 's|32||g'
dnl Compiler macros
case "$host_os" in
@@ -174,6 +180,10 @@ AC_SUBST([GLUT_CFLAGS])
AC_SUBST([GLUT_LIBS])
AC_SUBST([X11_CFLAGS])
AC_SUBST([X11_LIBS])
+AC_SUBST([OSMESA_CFLAGS])
+AC_SUBST([OSMESA_LIBS])
+AC_SUBST([OSMESA16_LIBS])
+AC_SUBST([OSMESA32_LIBS])
AC_SUBST([MESA_GLAPI])
AM_CONDITIONAL(HAVE_EGL, test "x$egl_enabled" = "xyes")
@@ -181,6 +191,7 @@ AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes")
AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes")
AM_CONDITIONAL(HAVE_GLUT, test "x$glut_enabled" = "xyes")
AM_CONDITIONAL(HAVE_X11, test "x$x11_enabled" = "xyes")
+AM_CONDITIONAL(HAVE_OSMESA, test "x$osmesa_enabled" = "xyes")
AM_CONDITIONAL(BUILD_GLTRACE, false)
AM_CONDITIONAL(HAVE_MESA_SOURCE, test "x$mesa_source_enabled" = "xyes")
@@ -195,6 +206,7 @@ AC_OUTPUT([
src/fp/Makefile
src/fpglsl/Makefile
src/glsl/Makefile
+ src/osdemos/Makefile
src/perf/Makefile
src/rbug/Makefile
src/redbook/Makefile