diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 152 |
1 files changed, 62 insertions, 90 deletions
diff --git a/configure.ac b/configure.ac index 8ed5c26..2184dec 100644 --- a/configure.ac +++ b/configure.ac @@ -66,17 +66,9 @@ AC_ARG_WITH(gtk, [ --with-gtk With GTK integration support], [use_gtk=$withval], [use_gtk=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(compositing, + [ --enable-compositing Enable support for compositing], + [compositing=$enableval], [compositing=no]) AC_ARG_ENABLE(glib-main-loop, [ --enable-glib-main-loop Enable use of glib main loop], @@ -86,6 +78,17 @@ AC_ARG_ENABLE(matchbox-remote, [ --enable-matchbox-remote Enable matchbox remote control utility], [matchbox_remote=$enableval], [matchbox_remote=no]) +dnl due to an autoconf bug, commas in the first arg to +dnl AC_HELP_STRING cause problems. +dnl AC_HELP_STRING([--with-managers=MANAGER1 MANAGER2 ...], +dnl [build the specified composite managers]) +AC_ARG_ENABLE(managers, +[ --enable-managers=MANAGER1,MANAGER2,... + Build the specified managers. Available managers are: + * simple + * maemo + * clutter], + [managers=$enableval], [managers=no]) if test "x$use_pango" = "xyes"; then needed_pkgs="$needed_pkgs pangoxft " @@ -103,43 +106,33 @@ if test "x$png_theme" = "xyes"; then needed_pkgs="$needed_pkgs libpng12 " fi -if test "x$composite_managers" != xno -a \ - "x$composite_managers" != "xframework-only"; then +if test "x$compositing" != xno; then needed_pkgs="$needed_pkgs xcomposite xdamage " fi -all_composite_managers="xrender,clutter" +all_managers="simple,maemo,clutter" -included_composite_managers="" -# If no composite managers specified, include all -if test "x$composite_managers" = xyes ; then - included_composite_managers="$all_composite_managers" +included_managers="" +# If no managers specified, include all +if test "x$managers" = xyes ; then + included_managers="$all_composite_managers" else - if test "x$composite_managers" != xno ; then - included_composite_managers="$composite_managers" + if test "x$managers" != xno ; then + included_managers="$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= +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]) +for manager in $included_managers; do + if ! echo "$all_managers" | egrep -q "(^|,)$manager(\$|,)"; then + AC_MSG_ERROR([the specified manager $manager does not exist]) fi - case $composite_manager in - xrender ) - needed_pkgs="$needed_pkgs xcomposite xdamage " - MBWM_EXTRA_LIBS="$MBWM_EXTRA_LIBS -lm" + case $manager in + simple ) + ;; + maemo ) ;; clutter ) needed_pkgs="$needed_pkgs $clutter_package xcomposite xdamage " @@ -147,13 +140,12 @@ for composite_manager in $included_composite_managers; do ;; esac - COMPOSITE_MANAGER_DEFINE="$COMPOSITE_MANAGER_DEFINE \ - -DCOMPOSITE_MANAGER_`echo $composite_manager|tr 'a-z' 'A-Z'`" - eval COMPOSITE_MANAGER_$composite_manager=yes + MANAGER_DEFINE="$MANAGER_DEFINE -DMANAGER_`echo $manager|tr 'a-z' 'A-Z'`" + eval MANAGER_$manager=yes done IFS="$save_ifs" -AC_SUBST(COMPOSITE_MANAGER_DEFINE) +AC_SUBST(MANAGER_DEFINE) MBWM_WANT_DEBUG=0 @@ -202,19 +194,33 @@ PKG_CHECK_MODULES(MBWM, $needed_pkgs) MBWM_PKGREQUIRES="$MBWM_PKGREQUIRES $needed_pkgs" AC_SUBST(MBWM_PKGREQUIRES) -COMP_MGR_BACKEND=0 ENABLE_COMPOSITE=0 -AM_CONDITIONAL(ENABLE_COMPOSITE, [test "x$comp_mgr" != "xno"]) -if test x"$comp_mgr" != xno; then +AM_CONDITIONAL(ENABLE_COMPOSITE, [test "x$compositing" != "xno"]) +if test x"$compositing" != xno; then ENABLE_COMPOSITE=1 fi AC_SUBST(ENABLE_COMPOSITE) -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 +AM_CONDITIONAL(ENABLE_MATCHBOX_REMOTE, [test "x$matchbox_remote" = "xyes"]) + +AM_CONDITIONAL(ENABLE_SIMPLE_MANAGER, [test x"$MANAGER_simple" = xyes]) +if test x"$MANAGER_simple" = xyes; then + ENABLE_SIMPLE_MANAGER=1 + MANAGERS="$MANAGERS simple" +fi +AC_SUBST(ENABLE_SIMPLE_MANAGER) + +AM_CONDITIONAL(ENABLE_MAEMO_MANAGER, [test x"$MANAGER_maemo" = xyes]) +if test x"$MANAGER_maemo" = xyes; then + ENABLE_MAEMO_MANAGER=1 + MANAGERS="$MANAGERS maemo" +fi +AC_SUBST(ENABLE_MAEMO_MANAGER) + +AM_CONDITIONAL(ENABLE_CLUTTER_MANAGER, [test x"$MANAGER_clutter" = xyes]) +if test x"$MANAGER_clutter" = xyes; then + ENABLE_CLUTTER_MANAGER=1 + MANAGERS="$MANAGERS clutter" clutter_backend=$($PKG_CONFIG $clutter_package --variable=backend) if test x"$clutter_backend" = xglx; then @@ -223,42 +229,7 @@ if test x"$COMPOSITE_MANAGER_clutter" = xyes; then AC_DEFINE(HAVE_CLUTTER_EGLX, [1], [Using clutter eglx backend]) fi fi -AC_SUBST(ENABLE_CLUTTER_COMPOSITE_MANAGER) - -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(ENABLE_XRENDER_COMPOSITE_MANAGER) - -AM_CONDITIONAL(COMP_MGR_BACKEND, [test "x$COMP_MGR_BACKEND" = "x1"]) -AC_SUBST(COMP_MGR_BACKEND) - -AM_CONDITIONAL(ENABLE_MATCHBOX_REMOTE, [test "x$matchbox_remote" = "xyes"]) - -AC_ARG_ENABLE(simple-manager, - [ --disable-simple-manager Do not build simple window manager], - [simple_manager=$enableval], - [ - if test "x$libmatchbox" = "xyes"; then - simple_manager=no - else - simple_manager=yes - fi]) - -AC_ARG_ENABLE(maemo-manager, - [ --enable-maemo-manager Build maemo window manager], - [maemo_manager=$enableval], [maemo_manager=no]) - -if test $simple_manager = yes; then - MANAGERS="$MANAGERS simple" -fi - -if test $maemo_manager = yes; then - MANAGERS="$MANAGERS maemo" -fi +AC_SUBST(ENABLE_CLUTTER_MANAGER) AC_SUBST(MANAGERS) @@ -283,7 +254,7 @@ if test x$have_xcursor = xyes; then fi MBWM_INCS='-I$(top_srcdir) -I$(top_srcdir)/matchbox -I$(top_builddir)' -MBWM_CFLAGS="$MBWM_CFLAGS $MBWM_DEBUG_CFLAGS $XFIXES_CFLAGS $XEXT_CFLAGS $XCURSOR_CFLAGS" +MBWM_CFLAGS="$MBWM_CFLAGS $MBWM_DEBUG_CFLAGS $XFIXES_CFLAGS $XEXT_CFLAGS $XCURSOR_CFLAGS $MANAGER_DEFINE" MBWM_LIBS="$MBWM_LIBS $XFIXES_LIBS $XEXT_LIBS $XCURSOR_LIBS $MBWM_EXTRA_LIBS" AC_SUBST([MBWM_CFLAGS]) @@ -301,6 +272,7 @@ managers/Makefile managers/simple/Makefile managers/maemo/Makefile managers/maemo/theme/Makefile +managers/clutter/Makefile data/Makefile data/themes/Makefile data/themes/Default/Makefile @@ -334,12 +306,12 @@ echo " Pango integration : ${use_pango} Managers: - Simple manager : ${simple_manager} - Maemo manager : ${maemo_manager} - - Compositing managers : ${comp_mgr} + Simple manager : ${MANAGER_simple} + Maemo manager : ${MANAGER_maemo} + Clutter manager : ${MANAGER_clutter} Miscel: + Compositing support : ${compositing} Glib main loop : ${gmloop} Build matchbox-remote : ${matchbox_remote} Debugging output : ${want_debug} |