2014-03-08 23:05:56 +04:00
|
|
|
# If not 1, append revision to the version number and enable other development stuff
|
|
|
|
m4_define([gala_released], [0])
|
|
|
|
|
2014-03-09 00:48:48 +04:00
|
|
|
m4_define([gala_major_version], [0])
|
|
|
|
m4_define([gala_minor_version], [1])
|
2014-03-08 23:05:56 +04:00
|
|
|
m4_define([gala_micro_version], [0])
|
|
|
|
m4_define([gala_nano_version], [0])
|
|
|
|
|
|
|
|
# If library source has changed since last release, increment revision
|
|
|
|
# If interfaces have been removed or changed since last release,
|
|
|
|
# increment current and set revision to 0
|
|
|
|
# If interfaces have been added since last release, increment age
|
|
|
|
# If interfaces have been removed since last release, set age to 0
|
|
|
|
m4_define([gala_lt_current], [0])
|
|
|
|
m4_define([gala_lt_revision], [0])
|
|
|
|
m4_define([gala_lt_age], [0])
|
|
|
|
|
|
|
|
# Display the nano_version only if it's not '0'
|
|
|
|
m4_define([gala_base_version],
|
|
|
|
gala_major_version.gala_minor_version.gala_micro_version)
|
|
|
|
m4_define([gala_full_version],
|
|
|
|
[m4_if(gala_nano_version, [0],
|
|
|
|
gala_base_version, gala_base_version.gala_nano_version)])
|
|
|
|
|
|
|
|
# Extend version with bzr revision for non-release builds
|
|
|
|
m4_define([gala_version], m4_if(gala_released, [1],
|
|
|
|
[gala_full_version], [m4_esyscmd([build-aux/bzr-version-gen gala_full_version])]))
|
|
|
|
m4_define([gala_major_minor_version], gala_major_version.gala_minor_version)
|
|
|
|
m4_define([gala_module_version], gala_lt_current)
|
|
|
|
|
|
|
|
AC_INIT([gala], gala_version,
|
|
|
|
[https://bugs.launchpad.net/gala], [gala],
|
|
|
|
[https://launchpad.net/gala])
|
2014-03-08 23:55:34 +04:00
|
|
|
AC_DEFINE(RELEASE_NAME, "Window Manager.", Codename of this release)
|
2014-03-08 23:05:56 +04:00
|
|
|
AC_DEFINE(VERSION_INFO, m4_if(gala_released, [1], "Release", "Development"), Version info for package)
|
|
|
|
|
|
|
|
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
|
|
|
|
|
|
|
AC_PREREQ([2.65])
|
|
|
|
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
AC_CONFIG_AUX_DIR([build-aux])
|
|
|
|
AC_CONFIG_SRCDIR([Makefile.am])
|
|
|
|
AC_CONFIG_HEADERS(config.h)
|
|
|
|
AC_CONFIG_SRCDIR([configure.ac])
|
|
|
|
AM_INIT_AUTOMAKE([1.11 tar-ustar dist-xz no-dist-gzip -Wno-portability subdir-objects])
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
|
|
|
AC_PROG_CC
|
|
|
|
AM_PROG_CC_C_O
|
|
|
|
AC_DISABLE_STATIC
|
|
|
|
LT_INIT
|
|
|
|
PKG_PROG_PKG_CONFIG([0.21])
|
|
|
|
|
2014-03-09 00:13:48 +04:00
|
|
|
GLIB_GSETTINGS
|
|
|
|
|
2014-03-08 23:05:56 +04:00
|
|
|
AC_SUBST([CFLAGS])
|
|
|
|
AC_SUBST([CPPFLAGS])
|
|
|
|
AC_SUBST([LDFLAGS])
|
|
|
|
|
|
|
|
LT_CURRENT=gala_lt_current
|
|
|
|
LT_REVISION=gala_lt_revision
|
|
|
|
LT_AGE=gala_lt_age
|
|
|
|
AC_SUBST([LT_CURRENT])
|
|
|
|
AC_SUBST([LT_REVISION])
|
|
|
|
AC_SUBST([LT_AGE])
|
|
|
|
|
|
|
|
GALA_MAJOR_MINOR_VERSION=gala_major_minor_version
|
|
|
|
AC_SUBST([GALA_MAJOR_MINOR_VERSION])
|
|
|
|
|
|
|
|
API_VERSION=0.2
|
|
|
|
AC_SUBST([API_VERSION])
|
|
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------
|
|
|
|
# Vala
|
|
|
|
# -----------------------------------------------------------
|
2014-03-22 11:15:41 +04:00
|
|
|
VALA_MIN_VERSION=0.22.0
|
2014-03-08 23:05:56 +04:00
|
|
|
|
|
|
|
AM_PROG_VALAC([$VALA_MIN_VERSION])
|
|
|
|
if test "x$VALAC" = "x"; then
|
|
|
|
AC_MSG_ERROR([Vala requested but valac >= $VALA_MIN_VERSION is not installed])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_PATH_PROG([VAPIGEN], [vapigen], [])
|
|
|
|
if test "x$VAPIGEN" = "x"; then
|
|
|
|
AC_MSG_ERROR([Vala must be built with --enable-vapigen])
|
|
|
|
fi
|
|
|
|
|
|
|
|
# -----------------------------------------------------------
|
|
|
|
# Dependencies
|
|
|
|
# -----------------------------------------------------------
|
|
|
|
GTK_MIN_VERSION=3.4.0
|
|
|
|
GLIB_MIN_VERSION=2.32.0
|
|
|
|
PLANK_MIN_VERSION=0.3.0
|
2014-03-09 21:04:43 +04:00
|
|
|
MUTTER_MIN_VERSION=3.8.4
|
|
|
|
MUTTER_API="3.8"
|
2014-03-08 23:05:56 +04:00
|
|
|
|
|
|
|
GALA_CORE_PKGS="gobject-2.0 >= $GLIB_MIN_VERSION \
|
|
|
|
glib-2.0 >= $GLIB_MIN_VERSION \
|
|
|
|
gio-2.0 >= $GLIB_MIN_VERSION \
|
|
|
|
gio-unix-2.0 >= $GLIB_MIN_VERSION \
|
|
|
|
gmodule-2.0 \
|
|
|
|
gtk+-3.0 >= $GTK_MIN_VERSION \
|
|
|
|
gdk-x11-3.0 >= $GTK_MIN_VERSION \
|
|
|
|
libbamf3 \
|
2014-05-01 14:09:14 +04:00
|
|
|
clutter-1.0 \
|
2014-03-08 23:05:56 +04:00
|
|
|
clutter-gtk-1.0 \
|
|
|
|
granite \
|
2014-03-09 15:29:09 +04:00
|
|
|
libmutter >= $MUTTER_MIN_VERSION \
|
2014-03-08 23:05:56 +04:00
|
|
|
gee-0.8 \
|
|
|
|
gnome-desktop-3.0 \
|
|
|
|
plank >= $PLANK_MIN_VERSION"
|
|
|
|
|
|
|
|
GALA_CORE_VALA_PKGS="--pkg gio-unix-2.0 \
|
|
|
|
--pkg gmodule-2.0 \
|
|
|
|
--pkg gtk+-3.0 \
|
|
|
|
--pkg gdk-x11-3.0 \
|
|
|
|
--pkg libbamf3 \
|
|
|
|
--pkg libmutter \
|
2014-05-01 14:09:14 +04:00
|
|
|
--pkg clutter-1.0 \
|
2014-03-08 23:05:56 +04:00
|
|
|
--pkg clutter-gtk-1.0 \
|
|
|
|
--pkg granite \
|
|
|
|
--pkg gee-0.8 \
|
|
|
|
--pkg gdesktopenums-3.0 \
|
|
|
|
--pkg gnome-desktop-3.0 \
|
|
|
|
--pkg xfixes-4.0 \
|
|
|
|
--pkg plank"
|
|
|
|
|
2014-07-20 00:46:45 +04:00
|
|
|
VALAFLAGS="--target-glib=2.32"
|
|
|
|
VALAFLAGS_CORE="--thread"
|
2014-03-08 23:05:56 +04:00
|
|
|
|
|
|
|
PKG_CHECK_MODULES(GALA_CORE, $GALA_CORE_PKGS)
|
|
|
|
|
2014-03-09 00:58:06 +04:00
|
|
|
# Plugins
|
|
|
|
PLUGIN_LDFLAGS="-module -avoid-version"
|
|
|
|
AC_SUBST([PLUGIN_LDFLAGS])
|
|
|
|
|
2014-03-08 23:05:56 +04:00
|
|
|
# -----------------------------------------------------------
|
|
|
|
# Optional Dependencies
|
|
|
|
# -----------------------------------------------------------
|
|
|
|
|
|
|
|
# 3.10
|
2014-05-01 14:06:54 +04:00
|
|
|
PKG_CHECK_MODULES(MUTTER310, [libmutter >= 3.9], [have_mutter310=yes], [have_mutter310=no])
|
2014-03-08 23:05:56 +04:00
|
|
|
if test "x$have_mutter310" = "xyes" ; then
|
2014-05-01 14:06:54 +04:00
|
|
|
PKG_CHECK_MODULES(MUTTER310, [libmutter >= 3.10.4])
|
2014-03-08 23:05:56 +04:00
|
|
|
VALAFLAGS="$VALAFLAGS --define HAS_MUTTER310"
|
2014-03-09 16:09:33 +04:00
|
|
|
MUTTER_API="3.10"
|
2014-03-08 23:05:56 +04:00
|
|
|
fi
|
|
|
|
|
|
|
|
# 3.12
|
2014-05-01 14:06:54 +04:00
|
|
|
PKG_CHECK_MODULES(MUTTER312, [libmutter >= 3.11], [have_mutter312=yes], [have_mutter312=no])
|
2014-03-08 23:05:56 +04:00
|
|
|
if test "x$have_mutter312" = "xyes" ; then
|
2014-09-30 19:00:49 +04:00
|
|
|
PKG_CHECK_MODULES(MUTTER312, [libmutter >= 3.12.2])
|
2014-03-08 23:05:56 +04:00
|
|
|
VALAFLAGS="$VALAFLAGS --define HAS_MUTTER312"
|
2014-03-09 16:09:33 +04:00
|
|
|
MUTTER_API="3.12"
|
2014-03-08 23:05:56 +04:00
|
|
|
fi
|
|
|
|
|
2014-05-01 14:06:54 +04:00
|
|
|
# 3.14
|
|
|
|
PKG_CHECK_MODULES(MUTTER314, [libmutter >= 3.13], [have_mutter314=yes], [have_mutter314=no])
|
|
|
|
if test "x$have_mutter314" = "xyes" ; then
|
2014-09-30 19:00:49 +04:00
|
|
|
PKG_CHECK_MODULES(MUTTER314, [libmutter >= 3.14.0])
|
2014-05-01 14:06:54 +04:00
|
|
|
VALAFLAGS="$VALAFLAGS --define HAS_MUTTER314"
|
|
|
|
MUTTER_API="3.14"
|
|
|
|
fi
|
|
|
|
|
2014-07-21 19:45:32 +04:00
|
|
|
# -----------------------------------------------------------
|
|
|
|
# Dependencies for Notifications plugin
|
|
|
|
# -----------------------------------------------------------
|
|
|
|
|
|
|
|
NOTIFICATION_PLUGIN_PKGS="libcanberra \
|
2014-08-10 11:31:27 +04:00
|
|
|
libcanberra-gtk3"
|
2014-07-21 19:45:32 +04:00
|
|
|
|
|
|
|
NOTIFICATION_PLUGIN_VALA_PKGS="--pkg libcanberra \
|
|
|
|
--pkg libcanberra-gtk"
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES(NOTIFICAION_PLUGIN, $NOTIFICATION_PLUGIN_PKGS)
|
|
|
|
|
|
|
|
AC_SUBST([NOTIFICATION_PLUGIN_VALA_PKGS])
|
|
|
|
|
2014-03-08 23:05:56 +04:00
|
|
|
# -----------------------------------------------------------
|
2014-07-30 15:48:13 +04:00
|
|
|
# Additional configure flags
|
2014-03-08 23:05:56 +04:00
|
|
|
# -----------------------------------------------------------
|
|
|
|
|
|
|
|
# Enable Vala debug-flag by default for non-release builds
|
|
|
|
AC_ARG_ENABLE([debug],
|
|
|
|
AS_HELP_STRING([--disable-debug],[compile without debug code]),
|
|
|
|
[enable_debug=$enableval], [m4_if(gala_released, [1], [enable_debug=no], [enable_debug=yes])])
|
|
|
|
if test "x$enable_debug" = "xyes" ; then
|
2014-07-20 00:46:45 +04:00
|
|
|
VALAFLAGS_CORE="$VALAFLAGS_CORE -g"
|
2014-03-08 23:05:56 +04:00
|
|
|
fi
|
|
|
|
|
2014-07-20 00:46:45 +04:00
|
|
|
GALA_CORE_VALAFLAGS="$VALAFLAGS $VALAFLAGS_CORE $GALA_CORE_VALA_PKGS"
|
2014-03-08 23:05:56 +04:00
|
|
|
AC_SUBST(GALA_CORE_VALAFLAGS)
|
2014-07-20 00:46:45 +04:00
|
|
|
GALA_DOCS_VALAFLAGS="$VALAFLAGS $GALA_CORE_VALA_PKGS"
|
|
|
|
AC_SUBST(GALA_DOCS_VALAFLAGS)
|
|
|
|
|
2014-07-30 15:48:13 +04:00
|
|
|
# -----------------------------------------------------------
|
|
|
|
# Additional build flags
|
|
|
|
# -----------------------------------------------------------
|
|
|
|
|
|
|
|
# Use RUNPATH instead of RPATH if needed
|
|
|
|
CFLAGS="$CFLAGS -Wl,--enable-new-dtags"
|
|
|
|
|
2014-07-20 00:46:45 +04:00
|
|
|
# -----------------------------------------------------------
|
|
|
|
# Documentation
|
|
|
|
# -----------------------------------------------------------
|
|
|
|
VALADOC_MIN_VERSION=0.3.1
|
|
|
|
|
|
|
|
AC_ARG_ENABLE([docs],
|
|
|
|
AS_HELP_STRING([--enable-docs],[Enable documentation generation]),
|
|
|
|
[enable_docs=$enableval], [enable_docs=no])
|
|
|
|
AM_CONDITIONAL([ENABLE_DOCS], [test "x$enable_docs" = "xyes"])
|
|
|
|
|
|
|
|
have_valadoc=no
|
|
|
|
if test "x$enable_docs" = "xyes"; then
|
|
|
|
# make sure the library is new enough and the program exists
|
|
|
|
PKG_CHECK_MODULES([VALADOC], [valadoc-1.0 >= $VALADOC_MIN_VERSION])
|
|
|
|
AC_PATH_PROG([VALADOC], [valadoc], [:])
|
|
|
|
AS_IF([test "$VALADOC" != :], have_valadoc=yes)
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL([HAVE_VALADOC], [test "x$have_valadoc" = "xyes"])
|
|
|
|
|
|
|
|
if test "x$enable_docs" = "xyes" -a "x$have_valadoc" != "xyes"; then
|
|
|
|
AC_MSG_ERROR([Doc building requested but valadoc not installed.])
|
|
|
|
fi
|
|
|
|
|
2014-03-08 23:05:56 +04:00
|
|
|
|
|
|
|
# -----------------------------------------------------------
|
|
|
|
# Gettext
|
|
|
|
# -----------------------------------------------------------
|
|
|
|
GETTEXT_PACKAGE=AC_PACKAGE_NAME
|
|
|
|
AC_SUBST(GETTEXT_PACKAGE)
|
|
|
|
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"], [Define the gettext package to be used])
|
|
|
|
IT_PROG_INTLTOOL([0.35.0])
|
|
|
|
|
|
|
|
|
|
|
|
# -----------------------------------------------------------
|
|
|
|
# Final output
|
|
|
|
# -----------------------------------------------------------
|
|
|
|
AC_CONFIG_FILES([
|
|
|
|
Makefile
|
|
|
|
src/Makefile
|
|
|
|
lib/Makefile
|
2014-07-20 00:46:45 +04:00
|
|
|
docs/Makefile
|
2014-03-08 23:05:56 +04:00
|
|
|
data/Makefile
|
2014-10-05 11:13:15 +04:00
|
|
|
data/icons/Makefile
|
2014-03-08 23:05:56 +04:00
|
|
|
vapi/Makefile
|
2014-03-08 23:55:34 +04:00
|
|
|
plugins/Makefile
|
2014-06-23 19:41:54 +04:00
|
|
|
plugins/notify/Makefile
|
2014-03-08 23:55:34 +04:00
|
|
|
plugins/zoom/Makefile
|
2014-03-09 00:48:48 +04:00
|
|
|
po/Makefile.in
|
2014-03-08 23:05:56 +04:00
|
|
|
])
|
|
|
|
|
|
|
|
AC_OUTPUT
|
|
|
|
|
|
|
|
echo "
|
|
|
|
${PACKAGE} ${VERSION}
|
|
|
|
|
|
|
|
Prefix......................: ${prefix}
|
|
|
|
Vala Compiler...............: ${VALAC}
|
|
|
|
Vala Flags..................: ${VALAFLAGS}
|
|
|
|
C Compiler Flags............: ${CFLAGS}
|
|
|
|
|
2014-03-09 16:09:33 +04:00
|
|
|
Using Mutter................: ${MUTTER_API}
|
2014-07-20 00:46:45 +04:00
|
|
|
|
|
|
|
Documentation...............: ${have_valadoc}
|
2014-03-08 23:05:56 +04:00
|
|
|
"
|