Use bash variable add operator
[hvlinux.git] / stage4 / pkg / MesaLib
index 80b8017..95e4634 100644 (file)
@@ -2,10 +2,32 @@
 
 hvconfig_pre()
 {
-    CONFIGURE_OPTS="\
-        ${CONFIGURE_OPTS} \
-        --enable-motif \
-        --enable-xcb \
+    local DRI_OPTS="--with-dri-drivers=swrast"
+    local GAL_OPTS="--with-gallium-drivers=svga,swrast"
+
+    if [ -n "${XORG_VIDEO_DRIVER}" ]; then
+        case "${XORG_VIDEO_DRIVER}" in
+           nouveau)
+               DRI_OPTS+=",nouveau"
+               GAL_OPTS+=",nouveau"
+               ;;
+           intel)
+                DRI_OPTS+=",i915,i965"
+                GAL_OPTS+=",i915"
+               ;;
+       esac
+    fi
+
+    CONFIGURE_OPTS+=" \
+        --enable-texture-float \
+        --enable-gles1 \
+        --enable-gles2 \
+        --enable-xa \
+        --enable-shared-glapi \
+        --enable-shared-dricore \
+        --enable-glx-tls \
+        ${DRI_OPTS} \
+        ${GAL_OPTS} \
         ${XORG_CONFIG}"
 
     # Mesa builds with debugging symbols. Remove the -g switch from both CFLAGS