summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-05-20 15:23:31 -0700
committerEric Anholt <eric@anholt.net>2010-05-20 15:32:40 -0700
commit702155dadd39479398134f69bba4cce3ec2fdd25 (patch)
treec0eeeb0371d278dc405db4498fe467212b70fa0d /configure.ac
parent63c35bb6374976b8ce20e310a5561a5c43036c92 (diff)
osdemos: Add build system.
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 0b6d6340..ec090fd9 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