summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-02-05 07:54:38 +0100
committerEric Anholt <[email protected]>2012-02-29 11:52:40 -0800
commit28d92eff73a0821e7a73b04d3f50e715850dc5e9 (patch)
treee0e85bea5184ef416ddf8bbe53c99e3bda9b9f2c
parentd019cf9124210f8feaca532e3d24cbddcff54061 (diff)
egl: Clean up some flow of EGL platform handling.
The default case code was set up in a separate way, while this makes it more normal. I wanted to add code to the explicit x11 platform and default x11 platform cases in the next commit. Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r--configure.ac33
1 files changed, 15 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index ac06e8002a9..e9f00b34bc3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1682,23 +1682,21 @@ AC_ARG_WITH([egl-platforms],
[comma delimited native platforms libEGL supports, e.g.
"x11,drm" @<:@default=auto@:>@])],
[with_egl_platforms="$withval"],
- [with_egl_platforms=yes])
+ [if test "x$enable_egl" = xyes; then
+ with_egl_platforms="x11"
+ else
+ with_egl_platforms=""
+ fi])
EGL_PLATFORMS=""
-case "$with_egl_platforms" in
-yes)
- if test "x$enable_egl" = xyes; then
- EGL_PLATFORMS="x11"
- fi
- ;;
-*)
- if test "x$enable_egl" != xyes; then
- AC_MSG_ERROR([cannot build egl state tracker without EGL library])
- fi
- # verify the requested driver directories exist
- egl_platforms=`IFS=', '; echo $with_egl_platforms`
- for plat in $egl_platforms; do
+if test "x$with_egl_platforms" != "x" -a "x$enable_egl" != xyes; then
+ AC_MSG_ERROR([cannot build egl state tracker without EGL library])
+fi
+
+# verify the requested driver directories exist
+egl_platforms=`IFS=', '; echo $with_egl_platforms`
+for plat in $egl_platforms; do
test -d "$srcdir/src/gallium/state_trackers/egl/$plat" || \
AC_MSG_ERROR([EGL platform '$plat' does not exist])
if test "$plat" = "fbdev"; then
@@ -1722,10 +1720,9 @@ yes)
waylandno|drmno)
AC_MSG_ERROR([cannot build $plat platfrom without udev]) ;;
esac
- done
- EGL_PLATFORMS="$egl_platforms"
- ;;
-esac
+done
+
+EGL_PLATFORMS="$egl_platforms"
AC_SUBST([EGL_PLATFORMS])
AC_ARG_WITH([egl-driver-dir],