dnl OSMesa configuration
dnl
if test "$mesa_driver" = xlib; then
- default_xlib_osmesa=yes
+ default_gl_osmesa=yes
else
- default_xlib_osmesa=no
+ default_gl_osmesa=no
fi
-AC_ARG_ENABLE(xlib-osmesa,
- [AS_HELP_STRING([--disable-xlib-osmesa],
- [enable OSMesa on Xlib libGL @<:@default=enabled for xlib driver@:>@])],
- xlib_osmesa="$enableval",
- xlib_osmesa="$default_xlib_osmesa")
-if test "x$xlib_osmesa" = xyes; then
- if test "$mesa_driver" = xlib; then
- DRIVER_DIRS="$DRIVER_DIRS osmesa"
+AC_ARG_ENABLE(gl-osmesa,
+ [AS_HELP_STRING([--enable-gl-osmesa],
+ [enable OSMesa on libGL @<:@default=enabled for xlib driver@:>@])],
+ gl_osmesa="$enableval",
+ gl_osmesa="$default_gl_osmesa")
+if test "x$gl_osmesa" = xyes; then
+ if test "$mesa_driver" = osmesa; then
+ AC_MSG_ERROR([libGL is not available for OSMesa driver])
else
- AC_MSG_ERROR([Can only enable OSMesa on libGL for Xlib])
+ DRIVER_DIRS="$DRIVER_DIRS osmesa"
fi
fi
dnl Driver info
echo ""
echo " Driver: $mesa_driver"
-case "$mesa_driver" in
-xlib|osmesa)
- if echo "$DRIVER_DIRS" | grep 'osmesa' >/dev/null 2>&1; then
- echo " OSMesa: lib$OSMESA_LIB"
- else
- echo " OSMesa: no"
- fi
- ;;
-dri)
+if echo "$DRIVER_DIRS" | grep 'osmesa' >/dev/null 2>&1; then
+ echo " OSMesa: lib$OSMESA_LIB"
+else
+ echo " OSMesa: no"
+fi
+if test "$mesa_driver" = dri; then
# cleanup the drivers var
dri_dirs=`echo $DRI_DIRS | $SED 's/^ *//;s/ */ /;s/ *$//'`
echo " DRI drivers: $dri_dirs"
echo " DRI driver dir: $DRI_DRIVER_INSTALL_DIR"
- ;;
-esac
+fi
dnl Libraries
echo ""
<code>--x-includes</code> and <code>--x-libraries</code> options can
control the use of X for Mesa.
</li>
+<li><code>--enable-gl-osmesa</code> - The <a href="osmesa.html">OSMesa
+library</a> can be built on top of libGL for drivers that provide it.
+This option controls whether to build libOSMesa. By default, this is
+enabled for the Xlib driver and disabled otherwise. Note that this
+option is different than using OSMesa as the driver.
+</li>
<li><code>--enable-debug</code> - This option will enable compiler
options and macros to aid in debugging the Mesa libraries.
</li>
support the Xlib driver.
</li>
-<!-- Xlib specific options -->
-<p>
-<ul>
-<li><code>--disable-xlib-osmesa</code> - By default, the OSMesa library
-will be built and linked to the Xlib enabled libGL. This option disables
-building of libOSMesa.
-</li>
-</ul>
-</p>
-
<a name="dri">
<li><b><em>DRI</em></b> - This mode uses the DRI hardware drivers for
accelerated OpenGL rendering. Enable the DRI drivers with the option
# Figure out what to make here
default:
- @if [ "${DRIVER_DIRS}" = "dri" ] ; then \
- $(MAKE) linux-solo ; \
- elif [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
- $(MAKE) osmesa-only ; \
- elif [ "$(DRIVER_DIRS)" = "beos" ]; then \
- $(MAKE) beos ; \
- elif [ "$(DRIVER_DIRS)" = "directfb" ]; then \
- $(MAKE) directfb ; \
- elif [ "$(DRIVER_DIRS)" = "fbdev osmesa" ]; then \
- $(MAKE) fbdev ; $(MAKE) osmesa-only ; \
- else \
- $(MAKE) stand-alone ; \
- fi
+ @for driver in $(DRIVER_DIRS) ; do \
+ case "$$driver" in \
+ x11) $(MAKE) stand-alone ;; \
+ dri) $(MAKE) linux-solo ;; \
+ osmesa) $(MAKE) osmesa-only ;; \
+ beos) $(MAKE) beos ;; \
+ directfb) $(MAKE) directfb ;; \
+ fbdev) $(MAKE) fbdev ;; \
+ *) echo "$$driver is invalid in DRIVER_DIRS" >&2; exit 1;; \
+ esac ; \
+ done
######################################################################
$(OSMESA_DRIVER_OBJECTS)
-stand-alone: depend subdirs $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
+stand-alone: depend subdirs $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
osmesa-only: depend subdirs $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)
@if [ -e $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME) ]; then \
$(INSTALL) $(TOP)/$(LIB_DIR)/libOSMesa* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \
fi
- @if [ "${DRIVER_DIRS}" = "dri" ] ; then \
- cd drivers/dri ; $(MAKE) install ; \
- fi
+ @for target in $(DRIVER_DIRS); do \
+ case "$$target" in \
+ dri) cd drivers/dri ; $(MAKE) install ;; \
+ esac; \
+ done
## NOT INSTALLED YET:
## $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GLES