mirror of
https://git.yoctoproject.org/libmatchboxwm2
synced 2025-11-03 20:55:44 +08:00
We currently use XRenderFindVisualFormat to determine if a particular window has an alpha component so libmatchbox itself depents on the xrender extension library when support for composite is enabled.
308 lines
8.5 KiB
Plaintext
308 lines
8.5 KiB
Plaintext
# mbwm package version number, (as distinct from shared library version)
|
|
# An odd minor number indicates in-progress development, (eg. from Git)
|
|
# An even minor number indicates a released version.
|
|
m4_define([mbwm_major_version], [1])
|
|
m4_define([mbwm_minor_version], [9999])
|
|
m4_define([mbwm_micro_version], [0])
|
|
|
|
m4_define([mbwm_version],
|
|
[mbwm_major_version.mbwm_minor_version.mbwm_micro_version])
|
|
|
|
# Change this only when breaking the API
|
|
m4_define([mbwm_api_version], [2.0])
|
|
|
|
AC_PREREQ(2.63)
|
|
AC_INIT([matchbox], mbwm_version, [mallum@handhelds.org])
|
|
AC_CONFIG_SRCDIR([matchbox/mb-wm-manager.c])
|
|
|
|
AM_INIT_AUTOMAKE(1.11 foreign dist-bzip2)
|
|
AM_SILENT_RULES([yes])
|
|
|
|
MBWM_VERSION=mbwm_version
|
|
AC_SUBST(MBWM_VERSION)
|
|
|
|
MBWM_API_VERSION=mbwm_api_version
|
|
AC_SUBST(MBWM_API_VERSION)
|
|
|
|
clutter_package="clutter-1.0 >= 1.5.6"
|
|
|
|
AC_PROG_CC
|
|
|
|
LT_PREREQ([2.2.6])
|
|
LT_INIT([disable-static])
|
|
|
|
AC_HEADER_STDC
|
|
AC_CHECK_HEADERS([stdlib.h string.h])
|
|
AC_C_CONST
|
|
AC_CHECK_FUNCS([memset strdup strncasecmp])
|
|
|
|
GTK_DOC_CHECK([1.13], [--flavour no-tmpl])
|
|
|
|
# we don't want to build the documentation from a Git clone unless we
|
|
# explicitly tell configure to do so; this allows avoiding to recurse into
|
|
# the documentation directory when building Matchbox2 inside Poky for a
|
|
# target device that doesn't have gtk-doc installed. for reference
|
|
# see: http://bugzilla.openedhand.com/show_bug.cgi?id=1047
|
|
#
|
|
# we use autogen.sh as it exists only inside the Git clones, and it
|
|
# is not packaged into tarballs.
|
|
AM_CONDITIONAL([BUILD_GTK_DOC], [test "x$enable_gtk_doc" = "xyes" || test ! -f "autogen.sh"])
|
|
|
|
needed_pkgs="x11 glib-2.0"
|
|
|
|
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],
|
|
[png_theme=$enableval], [png_theme=no])
|
|
|
|
AC_ARG_WITH(pango,
|
|
[ --with-pango Use of pango for text layout],
|
|
[use_pango=$withval], [use_pango=no])
|
|
|
|
AC_ARG_ENABLE(compositing,
|
|
[ --enable-compositing Enable support for compositing],
|
|
[compositing=$enableval], [compositing=no])
|
|
|
|
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
|
|
* xrender
|
|
* clutter],
|
|
[managers=$enableval], [managers=no])
|
|
|
|
if test "x$use_pango" = "xyes"; then
|
|
needed_pkgs="$needed_pkgs pangoxft "
|
|
fi
|
|
|
|
if ! test "x$use_pango" = "xyes" -o "x$use_pango" = "xyes"; then
|
|
needed_pkgs="$needed_pkgs xft "
|
|
fi
|
|
|
|
if test "x$png_theme" = "xyes"; then
|
|
needed_pkgs="$needed_pkgs libpng12 "
|
|
fi
|
|
|
|
if test "x$compositing" != xno; then
|
|
needed_pkgs="$needed_pkgs xcomposite xdamage xrender"
|
|
fi
|
|
|
|
all_managers="simple,maemo,xrender,clutter"
|
|
|
|
included_managers=""
|
|
# If no managers specified, include all
|
|
if test "x$managers" = xyes ; then
|
|
included_managers="$all_composite_managers"
|
|
else
|
|
if test "x$managers" != xno ; then
|
|
included_managers="$managers"
|
|
fi
|
|
fi
|
|
|
|
MANAGER_DEFINE=
|
|
|
|
IFS="${IFS= }"; save_ifs="$IFS"; IFS=","
|
|
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 $manager in
|
|
simple )
|
|
;;
|
|
maemo )
|
|
;;
|
|
clutter )
|
|
needed_pkgs="$needed_pkgs $clutter_package xcomposite xdamage "
|
|
;;
|
|
esac
|
|
|
|
MANAGER_DEFINE="$MANAGER_DEFINE -DMANAGER_`echo $manager|tr 'a-z' 'A-Z'`"
|
|
eval MANAGER_$manager=yes
|
|
done
|
|
IFS="$save_ifs"
|
|
|
|
AC_SUBST(MANAGER_DEFINE)
|
|
|
|
|
|
MBWM_WANT_DEBUG=0
|
|
if test "x$want_debug" = "xyes"; then
|
|
MBWM_WANT_DEBUG=1
|
|
MBWM_DEBUG_CFLAGS="-O0 $MBWM_DEBUG_CFLAGS"
|
|
MBWM_DEBUG_LDFLAGS="$MBWM_DEBUG_LDFLAGS -rdynamic"
|
|
fi
|
|
AC_SUBST(MBWM_WANT_DEBUG)
|
|
|
|
USE_PANGO=0
|
|
if test "$use_pango" = yes; then
|
|
USE_PANGO=1
|
|
fi
|
|
AC_SUBST(USE_PANGO)
|
|
|
|
THEME_PNG=0
|
|
AM_CONDITIONAL(THEME_PNG, [test "x$png_theme" = "xyes"])
|
|
if test "$png_theme" = yes; then
|
|
THEME_PNG=1
|
|
fi
|
|
AC_SUBST(THEME_PNG)
|
|
|
|
# only build simple theme if png theme disabled
|
|
THEME_SIMPLE=0
|
|
AM_CONDITIONAL(THEME_SIMPLE, [test "x$use_png" != "xyes"])
|
|
if test "$use_png" != yes; then
|
|
THEME_SIMPLE=1
|
|
fi
|
|
AC_SUBST(THEME_SIMPLE)
|
|
|
|
PKG_CHECK_MODULES(MBWM, $needed_pkgs)
|
|
MBWM_PKGREQUIRES="$MBWM_PKGREQUIRES $needed_pkgs"
|
|
AC_SUBST(MBWM_PKGREQUIRES)
|
|
|
|
ENABLE_COMPOSITE=0
|
|
AM_CONDITIONAL(ENABLE_COMPOSITE, [test "x$compositing" != "xno"])
|
|
if test x"$compositing" != xno; then
|
|
ENABLE_COMPOSITE=1
|
|
fi
|
|
AC_SUBST(ENABLE_COMPOSITE)
|
|
|
|
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_XRENDER_MANAGER, [test x"$MANAGER_xrender" = xyes])
|
|
if test x"$MANAGER_xrender" = xyes; then
|
|
ENABLE_XRENDER_MANAGER=1
|
|
MANAGERS="$MANAGERS xrender"
|
|
fi
|
|
AC_SUBST(ENABLE_XRENDER_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
|
|
AC_DEFINE(HAVE_CLUTTER_GLX, [1], [Using clutter glx backend])
|
|
elif test x"$clutter_backend" = xeglx; then
|
|
AC_DEFINE(HAVE_CLUTTER_EGLX, [1], [Using clutter eglx backend])
|
|
fi
|
|
fi
|
|
AC_SUBST(ENABLE_CLUTTER_MANAGER)
|
|
|
|
AC_SUBST(MANAGERS)
|
|
|
|
PKG_CHECK_MODULES(XFIXES, xfixes >= 4.0, have_xfixes=yes, have_xfixes=no)
|
|
|
|
if test x$have_xfixes = xyes; then
|
|
AC_DEFINE(HAVE_XFIXES, [1], [Use XFixes ext to really hide cursor])
|
|
MBWM_PKGREQUIRES="$MBWM_PKGREQUIRES xfixes >= 0.4"
|
|
fi
|
|
|
|
PKG_CHECK_MODULES(XEXT, xext, have_xext=yes, have_xext=no)
|
|
|
|
if test x$have_xext = xyes; then
|
|
AC_DEFINE(HAVE_XEXT, [1], [Use Xext ext])
|
|
MBWM_PKGREQUIRES="$MBWM_PKGREQUIRES xext"
|
|
fi
|
|
|
|
PKG_CHECK_MODULES(XCURSOR, xcursor, have_xcursor=yes, have_xcursor=no)
|
|
|
|
if test x$have_xcursor = xyes; then
|
|
AC_DEFINE(HAVE_XCURSOR, [1], [Use XCursor to sync pointer themes])
|
|
fi
|
|
|
|
AC_CHECK_HEADERS([expat.h],
|
|
[],
|
|
[AC_MSG_ERROR([Unable to locate required expat header])])
|
|
|
|
AC_CHECK_LIB(expat, [XML_ParserCreate],
|
|
[MBWM_LIBS="$MBWM_LIBS -lexpat"],
|
|
[AC_MSG_ERROR([Required expat library not found])])
|
|
|
|
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 $MANAGER_DEFINE"
|
|
MBWM_LIBS="$MBWM_LIBS $XFIXES_LIBS $XEXT_LIBS $XCURSOR_LIBS $MBWM_EXTRA_LIBS"
|
|
|
|
AC_SUBST([MBWM_CFLAGS])
|
|
AC_SUBST([MBWM_LIBS])
|
|
AC_SUBST([MBWM_INCS])
|
|
AC_SUBST([MBWM_DEBUG_CFLAGS])
|
|
AC_SUBST([MBWM_DEBUG_LDFLAGS])
|
|
|
|
AC_OUTPUT([
|
|
Makefile
|
|
matchbox-$MBWM_API_VERSION.pc:matchbox.pc.in
|
|
matchbox/Makefile
|
|
matchbox/mb-wm-config.h
|
|
managers/Makefile
|
|
managers/simple/Makefile
|
|
managers/maemo/Makefile
|
|
managers/maemo/theme/Makefile
|
|
managers/clutter/Makefile
|
|
managers/xrender/Makefile
|
|
data/Makefile
|
|
data/themes/Makefile
|
|
data/themes/Default/Makefile
|
|
data/themes/PngSample/Makefile
|
|
doc/Makefile
|
|
doc/reference/Makefile
|
|
doc/reference/matchbox/Makefile
|
|
doc/reference/matchbox/version.xml
|
|
util/Makefile
|
|
])
|
|
|
|
echo "
|
|
Matchbox Window Manager II
|
|
==========================
|
|
|
|
Directories:
|
|
source code location: ${srcdir}
|
|
install prefix : ${prefix}
|
|
|
|
Documentation:
|
|
Build API Reference : ${enable_gtk_doc}
|
|
|
|
Extension:
|
|
Xfixes : ${have_xfixes}
|
|
Xext : ${have_xext}
|
|
Xcursor : ${have_xcursor}
|
|
|
|
Themes:
|
|
PNG theme : ${png_theme}
|
|
Pango integration : ${use_pango}
|
|
|
|
Managers:
|
|
Simple manager : ${MANAGER_simple}
|
|
Maemo manager : ${MANAGER_maemo}
|
|
Clutter manager : ${MANAGER_clutter}
|
|
|
|
Miscel:
|
|
Compositing support : ${compositing}
|
|
Build matchbox-remote : ${matchbox_remote}
|
|
Debugging output : ${want_debug}
|
|
"
|