Mesa (9.2): build: Add --enable-gallium-osmesa flag.

Matt Turner mattst88 at kemper.freedesktop.org
Thu Aug 22 06:08:42 UTC 2013


Module: Mesa
Branch: 9.2
Commit: c47804d28654858225cec5c482aa0f4ee278c3f3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c47804d28654858225cec5c482aa0f4ee278c3f3

Author: Matt Turner <mattst88 at gmail.com>
Date:   Tue Aug 20 14:16:17 2013 -0700

build: Add --enable-gallium-osmesa flag.

The Gallium implementation is apparently not ready for regular
consumption, so as much as I hate adding more build-time options, here's
another.

Acked-by: Brian Paul <brianp at vmware.com>
(cherry picked from commit 2f142d596f6d950499d5e25d26e011a675c9670c)

---

 configure.ac                           |   31 +++++++++++++++++++++++++------
 src/gallium/state_trackers/Makefile.am |    2 +-
 src/gallium/targets/Makefile.am        |    2 +-
 3 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index bd5c71d..95d9b72 100644
--- a/configure.ac
+++ b/configure.ac
@@ -579,6 +579,11 @@ AC_ARG_ENABLE([osmesa],
         [enable OSMesa library @<:@default=disabled@:>@])],
     [enable_osmesa="$enableval"],
     [enable_osmesa=no])
+AC_ARG_ENABLE([gallium-osmesa],
+    [AS_HELP_STRING([--enable-gallium-osmesa],
+        [enable Gallium implementation of the OSMesa library @<:@default=disabled@:>@])],
+    [enable_gallium_osmesa="$enableval"],
+    [enable_gallium_osmesa=no])
 AC_ARG_ENABLE([egl],
     [AS_HELP_STRING([--disable-egl],
         [disable EGL library @<:@default=enabled@:>@])],
@@ -769,7 +774,13 @@ if test "x$enable_dri" = xyes; then
     GALLIUM_STATE_TRACKERS_DIRS="dri $GALLIUM_STATE_TRACKERS_DIRS"
 fi
 
-if test "x$enable_osmesa" = xyes; then
+if test "x$enable_gallium_osmesa" = xyes; then
+    if test -z "$with_gallium_drivers"; then
+        AC_MSG_ERROR([Cannot enable gallium_osmesa without Gallium])
+    fi
+    if test "x$enable_osmesa" = xyes; then
+        AC_MSG_ERROR([Cannot enable both classic and Gallium OSMesa implementations])
+    fi
     GALLIUM_STATE_TRACKERS_DIRS="osmesa $GALLIUM_STATE_TRACKERS_DIRS"
     GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS osmesa"
 fi
@@ -1135,7 +1146,7 @@ x16|x32)
     ;;
 esac
 
-if test "x$enable_osmesa" = xyes; then
+if test "x$enable_osmesa" = xyes -o "x$enable_gallium_osmesa" = xyes; then
     # only link libraries with osmesa if shared
     if test "$enable_static" = no; then
         OSMESA_LIB_DEPS="-lm $PTHREAD_LIBS $SELINUX_LIBS $DLOPEN_LIBS"
@@ -1962,9 +1973,11 @@ AC_SUBST([ELF_LIB])
 
 AM_CONDITIONAL(NEED_LIBPROGRAM, test "x$with_gallium_drivers" != x -o \
                                      "x$enable_xlib_glx" = xyes -o \
-                                     "x$enable_osmesa" = xyes)
+                                     "x$enable_osmesa" = xyes -o \
+                                     "x$enable_gallium_osmesa" = xyes)
 AM_CONDITIONAL(HAVE_X11_DRIVER, test "x$enable_xlib_glx" = xyes)
 AM_CONDITIONAL(HAVE_OSMESA, test "x$enable_osmesa" = xyes)
+AM_CONDITIONAL(HAVE_GALLIUM_OSMESA, test "x$enable_gallium_osmesa" = xyes)
 
 AM_CONDITIONAL(HAVE_X86_ASM, echo "$DEFINES" | grep 'X86_ASM' >/dev/null 2>&1)
 AM_CONDITIONAL(HAVE_X86_64_ASM, echo "$DEFINES" | grep 'X86_64_ASM' >/dev/null 2>&1)
@@ -2151,11 +2164,17 @@ echo "        OpenVG:          $enable_openvg"
 
 dnl Driver info
 echo ""
-if test "x$enable_osmesa" != xno; then
+case "x$enable_osmesa$enable_gallium_osmesa" in
+xnoyes)
+        echo "        OSMesa:          lib$OSMESA_LIB (Gallium)"
+        ;;
+xyesno)
         echo "        OSMesa:          lib$OSMESA_LIB"
-else
+        ;;
+xnono)
         echo "        OSMesa:          no"
-fi
+        ;;
+esac
 
 if test "x$enable_dri" != xno; then
         # cleanup the drivers var
diff --git a/src/gallium/state_trackers/Makefile.am b/src/gallium/state_trackers/Makefile.am
index c788f9a..5774598 100644
--- a/src/gallium/state_trackers/Makefile.am
+++ b/src/gallium/state_trackers/Makefile.am
@@ -25,7 +25,7 @@ if HAVE_X11_DRIVER
 SUBDIRS += glx
 endif
 
-if HAVE_OSMESA
+if HAVE_GALLIUM_OSMESA
 SUBDIRS += osmesa
 endif
 
diff --git a/src/gallium/targets/Makefile.am b/src/gallium/targets/Makefile.am
index ff09821..6bffc01 100644
--- a/src/gallium/targets/Makefile.am
+++ b/src/gallium/targets/Makefile.am
@@ -26,7 +26,7 @@ if HAVE_X11_DRIVER
 SUBDIRS += libgl-xlib
 endif
 
-if HAVE_OSMESA
+if HAVE_GALLIUM_OSMESA
 SUBDIRS += osmesa
 endif
 




More information about the mesa-commit mailing list