autoconf: Fail when --with-state-trackers is incomplete.
authorChia-I Wu <olv@lunarg.com>
Thu, 20 Jan 2011 06:19:13 +0000 (14:19 +0800)
committerChia-I Wu <olv@lunarg.com>
Thu, 20 Jan 2011 07:04:34 +0000 (15:04 +0800)
When --enable-openvg or --enable-gallium-egl is enabled,
--with-state-trackers must have vega or egl.

configure.ac

index d9220c86b598ef26ee7eda65cccf9e1a5522cb9f..f51ad9edc8c968d89714f8469077982c0385a6e3 100644 (file)
@@ -1428,6 +1428,7 @@ yes)
             if test "x$enable_openvg" != xyes; then
                 AC_MSG_ERROR([cannot build vega state tracker without --enable-openvg])
             fi
+            have_st_vega="yes"
             ;;
         esac
 
@@ -1442,6 +1443,14 @@ yes)
         fi
     done
     GALLIUM_STATE_TRACKERS_DIRS="$state_trackers"
+
+    # append --enable-openvg/--enable-gallium-egl to --with-state-trackers
+    if test "x$have_st_vega" != xyes -a "x$enable_openvg" = xyes; then
+        AC_MSG_ERROR([--with-state-trackers specified but vega is missing])
+    fi
+    if test "x$HAVE_ST_EGL" != xyes -a "x$enable_gallium_egl" = xyes; then
+        AC_MSG_ERROR([--with-state-trackers specified but egl is missing])
+    fi
     ;;
 esac