--- a/configure.in Mon Jan 28 02:38:09 2008 +0000 +++ b/configure.in Wed Mar 26 11:56:12 2008 +0000 @@ -22,6 +22,18 @@ [if test "$enableval" == "yes"; then AC_DEFINE(ENABLE_WATCH, 1, [Enable watchpoints]) fi] ) +AC_ARG_WITH( osmesa, + AS_HELP_STRING( [--with-osmesa], [Build with the osmesa GL library (software rendering)]), + [], [with_osmesa=no]) + +AS_IF([test "x$with_osmesa" != xno], [ + AC_CHECK_LIB([OSMesa], [OSMesaCreateContext], [], + [AC_MSG_FAILURE( [--with-osmesa was given, but OSMesa library could not be found])]) + AC_CHECK_HEADER([GL/osmesa.h], [], + [AC_MSG_FAILURE( [--with-osmesa was given, but osmesa.h could not be found])]) + ]) +AM_CONDITIONAL(OSMESA_DRIVER, [test "x$with_osmesa" != xno]) + dnl ----------- Check for mandatory dependencies -------------- dnl Building on MAC? AC_CHECK_HEADER([Carbon/Carbon.h], [ @@ -41,6 +53,7 @@ exit 1]) if test "$APPLE_BUILD" != 'yes'; then +if test "x$with_osmesa" == "xno"; then AC_CHECK_LIB(GL, glXQueryVersion, [], [ echo "The OpenGL library (libGL.so) could not be found, but is required." exit 1]) @@ -48,6 +61,7 @@ echo "The OpenGL header files (eg GL/gl.h) could not be found, but are required." exit 1]) fi +fi dnl Check for GTK (required for unix systems) PKG_CHECK_MODULES(GTK, gtk+-2.0, [