aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2008-03-08 01:44:20 +0000
committerRobert Bragg <robert@linux.intel.com>2008-03-08 01:44:20 +0000
commit0b08f758d945f75adb317a36d356d1c515d42eba (patch)
treedf6f2ed04ff928bd1b3a015e53b6e0f464e1af94 /configure.ac
parent1585793677ecaabf7165e16952bf5df22a8e36e1 (diff)
downloadlibmatchboxwm2-0b08f758d945f75adb317a36d356d1c515d42eba.tar.gz
libmatchboxwm2-0b08f758d945f75adb317a36d356d1c515d42eba.tar.bz2
libmatchboxwm2-0b08f758d945f75adb317a36d356d1c515d42eba.zip
2008-03-08 Robert Bragg <bob@o-hand.com>
* configure.ac * matchbox/comp-mgr/Makefile.am * matchbox/comp-mgr/mb-wm-comp-mgr-xrender.c * matchbox/comp-mgr/mb-wm-comp-mgr-xrender.h * matchbox/core/mb-window-manager.c * matchbox/managers/simple/Makefile.am * matchbox/managers/simple/matchbox-window-manager-2-simple.c * matchbox/mb-wm-config.h.in Adds an --enable-composite-managers=A,B,C.. config option and renames the "default" composite manager to "xrender"
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac121
1 files changed, 81 insertions, 40 deletions
diff --git a/configure.ac b/configure.ac
index d5dda26..361fd75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,6 +38,9 @@ AC_CHECK_FUNCS([memset strdup strncasecmp])
needed_pkgs="x11 "
+AC_ARG_ENABLE(debug,
+ [ --enable-debug Enable verbose debugging output],
+ [want_debug=$enableval], [want_debug=no])
AC_ARG_ENABLE(png-theme,
[ --enable-png-theme Enable PNG-based theme],
@@ -51,18 +54,17 @@ AC_ARG_WITH(gtk,
[ --with-gtk With GTK integration support],
[use_gtk=$withval], [use_gtk=no])
-AC_ARG_ENABLE(debug,
- [ --enable-debug Enable verbose debugging output],
- [want_debug=$enableval], [want_debug=no])
-
-AC_ARG_ENABLE(compositing-manager,
- [ --enable-compositing-manager@<:@=BACKEND@:>@ Enable compositing manager,
- optionally choosing compositor backend. Available
- backends are:
- 'default' (XRender based backend),
- 'clutter' (Clutter based backend),
- 'framework-only' (Compositing frameworks without a backend).],
- [comp_mgr=$enableval], [comp_mgr=no])
+dnl due to an autoconf bug, commas in the first arg to
+dnl AC_HELP_STRING cause problems.
+dnl AC_HELP_STRING([--with-composite-managers=MANAGER1 MANAGER2 ...],
+dnl [build the specified composite managers])
+AC_ARG_ENABLE(composite_managers,
+[ --enable-composite-managers=MANAGER1,MANAGER2,...
+ Build the specified composite managers. Available managers are:
+ * framework-only
+ * xrender
+ * clutter],
+ [composite_managers=$enableval], [composite_managers=no])
AC_ARG_ENABLE(glib-main-loop,
[ --enable-glib-main-loop Enable use of glib main loop],
@@ -89,18 +91,57 @@ if test "x$use_gtk" = "xyes"; then
needed_pkgs="$needed_pkgs gtk+-2.0 "
fi
-case $comp_mgr in
- yes | default ) comp_mgr="yes (default)"
- needed_pkgs="$needed_pkgs xcomposite xdamage " ;;
+if test "x$composite_managers" != xno -a \
+ "x$composite_managers" != "xframework-only"; then
+ needed_pkgs="$needed_pkgs xcomposite xdamage "
+fi
+
+all_composite_managers="xrender,clutter"
+
+included_composite_managers=""
+# If no composite managers specified, include all
+if test "x$composite_managers" = xyes ; then
+ included_composite_managers="$all_composite_managers"
+else
+ if test "x$composite_managers" != xno ; then
+ included_composite_managers="$composite_managers"
+ fi
+fi
+
+comp_mgr="no"
+if test "x$composite_managers" != xno ; then
+ comp_mgr="yes ($included_composite_managers)"
+fi
+
+AC_MSG_RESULT($included_composite_managers)
+
+COMPOSITE_MANAGER_DEFINE=
+
+IFS="${IFS= }"; save_ifs="$IFS"; IFS=","
+for composite_manager in $included_composite_managers; do
+ if echo "framework-only,$all_composite_managers" | egrep "(^|,)$composite_manager(\$|,)" > /dev/null; then
+ :
+ else
+ AC_MSG_ERROR([the specified composite_manager $composite_manager does not exist])
+ fi
+ case $composite_manager in
+ xrender )
+ needed_pkgs="$needed_pkgs xcomposite xdamage "
+ MBWM_EXTRA_LIBS="$MBWM_EXTRA_LIBS -lm"
+ ;;
+ clutter )
+ needed_pkgs="$needed_pkgs clutter-0.7 xcomposite xdamage "
+ ;;
+ esac
- clutter ) comp_mgr="yes (clutter)"
- needed_pkgs="$needed_pkgs clutter-0.7 xcomposite xdamage "
- gmloop="yes" ;;
+ COMPOSITE_MANAGER_DEFINE="$COMPOSITE_MANAGER_DEFINE \
+ -DCOMPOSITE_MANAGER_`echo $composite_manager|tr 'a-z' 'A-Z'`"
+ eval COMPOSITE_MANAGER_$composite_manager=yes
+done
+IFS="$save_ifs"
- framework-only ) comp_mgr="yes (framework only)" ;;
+AC_SUBST(COMPOSITE_MANAGER_DEFINE)
- * ) comp_mgr ="no" ;;
-esac
if test "x$want_debug" = "xyes"; then
MBWM_DEBUG_CFLAGS="-O0 $MBWM_DEBUG_CFLAGS -DMBWM_WANT_DEBUG"
@@ -150,26 +191,26 @@ AC_SUBST(USE_GTK)
COMP_MGR_BACKEND=0
ENABLE_COMPOSITE=0
AM_CONDITIONAL(ENABLE_COMPOSITE, [test "x$comp_mgr" != "xno"])
-if test "$comp_mgr" != no; then
+if test x"$comp_mgr" != xno; then
ENABLE_COMPOSITE=1
fi
AC_SUBST(ENABLE_COMPOSITE)
-USE_CLUTTER=0
-AM_CONDITIONAL(USE_CLUTTER, [test "x$comp_mgr" = "xyes (clutter)"])
-if test "$comp_mgr" = "yes (clutter)"; then
- USE_CLUTTER=1
+ENABLE_CLUTTER_COMPOSITE_MANAGER=0
+AM_CONDITIONAL(ENABLE_CLUTTER_COMPOSITE_MANAGER, [test x"$COMPOSITE_MANAGER_clutter" = xyes])
+if test x"$COMPOSITE_MANAGER_clutter" = xyes; then
+ ENABLE_CLUTTER_COMPOSITE_MANAGER=1
COMP_MGR_BACKEND=1
fi
-AC_SUBST(USE_CLUTTER)
+AC_SUBST(ENABLE_CLUTTER_COMPOSITE_MANAGER)
-DEFAULT_COMP_MGR=0
-AM_CONDITIONAL(DEFAULT_COMP_MGR, [test "x$comp_mgr" = "xyes (default)"])
-if test "$comp_mgr" = "yes (default)"; then
- DEFAULT_COMP_MGR=1
+ENABLE_XRENDER_COMPOSITE_MANAGER=0
+AM_CONDITIONAL(ENABLE_XRENDER_COMPOSITE_MANAGER, [test x"$COMPOSITE_MANAGER_xrender" = xyes])
+if test x"$COMPOSITE_MANAGER_xrender" = xyes; then
+ ENABLE_XRENDER_COMPOSITE_MANAGER=1
COMP_MGR_BACKEND=1
fi
-AC_SUBST(DEFAULT_COMP_MGR)
+AC_SUBST(ENABLE_XRENDER_COMPOSITE_MANAGER)
AM_CONDITIONAL(COMP_MGR_BACKEND, [test "x$COMP_MGR_BACKEND" = "x1"])
AC_SUBST(COMP_MGR_BACKEND)
@@ -216,19 +257,19 @@ fi
MBWM_INCS='-I$(top_srcdir) -I$(top_srcdir)/matchbox/core -I$(top_srcdir)/matchbox/client-types -I$(top_srcdir)/matchbox/theme-engines -I$(top_srcdir)/matchbox/comp-mgr'
MBWM_CORE_LIB='$(top_builddir)/matchbox/core/libmatchbox-window-manager-2-core.a'
-MBWM_CLIENT_LIBS='$(top_builddir)/matchbox/client-types'
-MBWM_THEME_LIBS='$(top_builddir)/matchbox/theme-engines'
-MBWM_COMPMGR_LIBS='$(top_builddir)/matchbox/comp-mgr'
+MBWM_CLIENT_BUILDDIR='$(top_builddir)/matchbox/client-types'
+MBWM_THEME_BUILDDIR='$(top_builddir)/matchbox/theme-engines'
+MBWM_COMPMGR_BUILDDIR='$(top_builddir)/matchbox/comp-mgr'
MBWM_CFLAGS="$MBWM_CFLAGS $MBWM_DEBUG_CFLAGS $THEME_PNG_CFLAGS $XFIXES_CFLAGS $XEXT_CFLAGS $XCURSOR_CFLAGS"
-MBWM_LIBS="$MBWM_LIBS $THEME_PNG_LIBS $XFIXES_LIBS $XEXT_LIBS $XCURSOR_LIBS"
+MBWM_LIBS="$MBWM_LIBS $THEME_PNG_LIBS $XFIXES_LIBS $XEXT_LIBS $XCURSOR_LIBS $MBWM_EXTRA_LIBS"
AC_SUBST([MBWM_CFLAGS])
AC_SUBST([MBWM_LIBS])
AC_SUBST([MBWM_CORE_LIB])
AC_SUBST([MBWM_INCS])
-AC_SUBST([MBWM_CLIENT_LIBS])
-AC_SUBST([MBWM_THEME_LIBS])
-AC_SUBST([MBWM_COMPMGR_LIBS])
+AC_SUBST([MBWM_CLIENT_BUILDDIR])
+AC_SUBST([MBWM_THEME_BUILDDIR])
+AC_SUBST([MBWM_COMPMGR_BUILDDIR])
AC_SUBST([MBWM_DEBUG_CFLAGS])
AC_SUBST([MBWM_DEBUG_LDFLAGS])
@@ -274,7 +315,7 @@ echo "
Simple manager : ${simple_manager}
Maemo manager : ${maemo_manager}
- Compositing manager : ${comp_mgr}
+ Compositing managers : ${comp_mgr}
Miscel:
Glib main loop : ${gmloop}