gitg/configure.ac

316 lines
8.6 KiB
Text
Raw Normal View History

2008-06-23 22:04:20 +00:00
dnl Process this file with autoconf to produce a configure script.
2011-02-26 14:39:41 +00:00
AC_PREREQ([2.64])
2008-06-23 22:04:20 +00:00
m4_define(gitg_major_version, 0)
2011-02-26 09:31:31 +00:00
m4_define(gitg_minor_version, 2)
2011-09-01 18:58:39 +00:00
m4_define(gitg_micro_version, 5)
2008-06-23 22:04:20 +00:00
m4_define(gitg_version, gitg_major_version.gitg_minor_version.gitg_micro_version)
2011-02-26 14:39:41 +00:00
AC_INIT([gitg],
[gitg_version],
[https://bugzilla.gnome.org/enter_bug.cgi?product=gitg],
[gitg],
[http://live.gnome.org/Gitg])
AC_CONFIG_HEADERS([config.h])
2012-04-14 11:46:39 +00:00
AC_CONFIG_SRCDIR([gitg/gitg.vala])
2008-06-23 22:04:20 +00:00
AC_CONFIG_MACRO_DIR([m4])
2011-02-26 14:39:41 +00:00
AC_CONFIG_AUX_DIR([build-aux])
2008-06-23 22:04:20 +00:00
AC_DEFINE(GITG_MAJOR_VERSION, gitg_major_version, [GitG major version])
AC_SUBST(GITG_MAJOR_VERSION, gitg_major_version)
AC_DEFINE(GITG_MINOR_VERSION, gitg_minor_version, [GitG minor version])
AC_SUBST(GITG_MINOR_VERSION, gitg_minor_version)
AC_DEFINE(GITG_MICRO_VERSION, gitg_micro_version, [GitG micro version])
AC_SUBST(GITG_MICRO_VERSION, gitg_micro_version)
2011-07-21 13:34:30 +00:00
AM_INIT_AUTOMAKE([1.11 tar-ustar dist-xz no-dist-gzip -Wno-portability])
2011-02-26 14:39:41 +00:00
AM_MAINTAINER_MODE([enable])
2008-06-23 22:04:20 +00:00
2011-02-26 14:39:41 +00:00
AM_SILENT_RULES([yes])
2008-06-23 22:04:20 +00:00
2011-02-26 14:39:41 +00:00
# Check for programs
2008-06-23 22:04:20 +00:00
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PATH_PROG(GZIP, gzip)
2012-10-30 13:14:44 +00:00
AM_PATH_PYTHON([3.2.3])
AM_PROG_VALAC([0.20.1.23])
2012-04-14 11:46:39 +00:00
AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
2012-04-14 11:46:39 +00:00
AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources)
2012-07-17 07:55:09 +00:00
AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache-3.0)
AC_PATH_PROG(VALADOC, valadoc)
2011-02-26 14:39:41 +00:00
# Initialize libtool
LT_PREREQ([2.2])
2012-04-14 11:46:39 +00:00
LT_INIT(disable-static)
2008-06-23 22:04:20 +00:00
# i18n stuff
IT_PROG_INTLTOOL([0.40.0])
AM_GNU_GETTEXT_VERSION([0.17])
AM_GNU_GETTEXT([external])
2008-06-23 22:04:20 +00:00
GETTEXT_PACKAGE=gitg
2012-04-14 11:46:39 +00:00
dnl adl_RECURSIVE_EVAL(VALUE, RESULT)
dnl =================================
dnl Interpolate the VALUE in loop until it doesn't change,
dnl and set the result to $RESULT.
dnl WARNING: It's easy to get an infinite loop with some unsane input.
AC_DEFUN([adl_RECURSIVE_EVAL],
[_lcl_receval="$1"
$2=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
_lcl_receval_old=''
while test "[$]_lcl_receval_old" != "[$]_lcl_receval"; do
_lcl_receval_old="[$]_lcl_receval"
eval _lcl_receval="\"[$]_lcl_receval\""
done
echo "[$]_lcl_receval")`])
adl_RECURSIVE_EVAL("$datadir/gitg", [GITG_DATADIR])
adl_RECURSIVE_EVAL("$datadir/locale", [GITG_LOCALEDIR])
adl_RECURSIVE_EVAL("$libdir/gitg", [GITG_LIBDIR])
2008-06-23 22:04:20 +00:00
AC_SUBST(GETTEXT_PACKAGE)
2012-04-14 11:46:39 +00:00
2008-06-23 22:04:20 +00:00
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
2012-04-14 11:46:39 +00:00
AC_DEFINE_UNQUOTED(GITG_DATADIR,"$GITG_DATADIR", [data dir])
AC_DEFINE_UNQUOTED(GITG_LOCALEDIR,"$GITG_LOCALEDIR", [locale dir])
AC_DEFINE_UNQUOTED(GITG_LIBDIR,"$GITG_LIBDIR", [lib dir])
2008-06-23 22:04:20 +00:00
2010-08-28 13:34:21 +00:00
AC_CHECK_LIB([m], [sinf])
2012-07-06 16:47:42 +00:00
GLIB_REQUIRED_VERSION=2.32
GTK_REQUIRED_VERSION=3.9.0
GTKSOURCEVIEW_REQUIRED_VERSION=3.1.3
2012-04-14 11:46:39 +00:00
INTROSPECTION_REQUIRED=0.10.1
2013-06-23 12:40:04 +00:00
WEBKITGTK_REQUIRED_VERSION=1.9.92
LIBGIT2_GLIB_REQUIRED_VERSION=0.0.7
2012-04-14 11:46:39 +00:00
PKG_CHECK_MODULES(LIBGITG, [
gthread-2.0 >= $GLIB_REQUIRED_VERSION
glib-2.0 >= $GLIB_REQUIRED_VERSION
gobject-2.0 >= $GLIB_REQUIRED_VERSION
gmodule-2.0 >= $GLIB_REQUIRED_VERSION
gio-2.0 >= $GLIB_REQUIRED_VERSION
gio-unix-2.0 >= $GLIB_REQUIRED_VERSION
2012-04-14 11:46:39 +00:00
gobject-introspection-1.0 >= $INTROSPECTION_REQUIRED
libgit2-glib-1.0 >= $LIBGIT2_GLIB_REQUIRED_VERSION
2013-06-23 12:40:04 +00:00
gtk+-3.0 >= $GTK_REQUIRED_VERSION
webkit2gtk-3.0 >= $WEBKITGTK_REQUIRED_VERSION
gee-0.8
json-glib-1.0
])
AC_ARG_ENABLE(docs,
[AS_HELP_STRING([--enable-docs],
[enable generating documentation [default=no]])],
[enable_docs=$enableval])
if test "$enable_docs" = "yes"; then
if test "$VALADOC" = ""; then
AC_MSG_ERROR([could not find valadoc])
fi
fi
AM_CONDITIONAL(ENABLE_DOCS, test "$enable_docs" = "yes")
AC_ARG_ENABLE(deprecations,
[AS_HELP_STRING([--enable-deprecations],
[warn about deprecated usages [default=no]])],
[enable_deprecations=$enableval])
2012-04-14 11:46:39 +00:00
if test "x$USE_MAINTAINER_MODE" = "xyes"; then
LIBGITG_CFLAGS="$LIBGITG_CFLAGS -Wall -Werror -Wuninitialized -Wmissing-declarations"
enable_deprecations="yes"
fi
if test "$enable_deprecations" = "yes"; then
2012-04-14 11:46:39 +00:00
LIBGITG_CFLAGS="$LIBGITG_CFLAGS \
-DG_DISABLE_DEPRECATED \
-DGDK_DISABLE_DEPRECATED \
-DGTK_DISABLE_DEPRECATED \
-DGDK_PIXBUF_DISABLE_DEPRECATED \
2011-01-03 04:21:05 +00:00
-DGNOME_DISABLE_DEPRECATED \
-DGSEAL_ENABLE"
2010-05-29 16:01:14 +00:00
fi
AC_ARG_ENABLE(debug,
[AS_HELP_STRING([--disable-debug],
[disable debug information [default=yes]])],
[enable_debug=$enableval], [enable_debug=yes])
2012-07-06 17:36:06 +00:00
GITG_VALAFLAGS="--target-glib 2.32"
if test "x$enable_debug" = "xyes"; then
2012-04-14 11:46:39 +00:00
LIBGITG_CFLAGS="$LIBGITG_CFLAGS -g -O0"
2012-07-06 17:36:06 +00:00
GITG_VALAFLAGS="$GITG_VALAFLAGS -g --save-temps"
AC_DEFINE([ENABLE_DEBUG],[1],[Whether debugging support is enabled])
2010-06-07 07:28:37 +00:00
fi
2013-06-23 12:40:04 +00:00
LIBGITG_CFLAGS="$LIBGITG_CFLAGS -DLIBSOUP_USE_UNSTABLE_REQUEST_API"
2012-04-14 11:46:39 +00:00
AC_SUBST(LIBGITG_CFLAGS)
AC_SUBST(LIBGITG_LIBS)
2010-08-28 13:34:21 +00:00
2012-07-06 17:36:06 +00:00
AC_SUBST(GITG_VALAFLAGS)
2013-06-23 12:40:04 +00:00
LIBGITG_EXT_CFLAGS="$LIBGITG_CFLAGS"
LIBGITG_EXT_LIBS="$LIBGITG_LIBS"
2011-03-24 11:44:24 +00:00
2012-04-14 11:46:39 +00:00
AC_SUBST(LIBGITG_EXT_CFLAGS)
AC_SUBST(LIBGITG_EXT_LIBS)
2011-03-28 08:33:13 +00:00
2012-07-27 15:42:30 +00:00
LIBPEAS_REQUIRED_VERSION=1.5.0
LIBPEAS_GTK_REQUIRED_VERSION=1.5.0
2012-04-14 11:46:39 +00:00
PKG_CHECK_MODULES(GITG, [
gtksourceview-3.0 >= $GTKSOURCEVIEW_REQUIRED_VERSION
gsettings-desktop-schemas
libpeas-1.0 >= $LIBPEAS_REQUIRED_VERSION
libpeas-gtk-1.0 >= $LIBPEAS_GTK_REQUIRED_VERSION
])
2013-06-23 12:40:04 +00:00
GITG_CFLAGS="$LIBGITG_CFLAGS $GITG_CFLAGS"
GITG_LIBS="$LIBGITG_LIBS $GITG_LIBS -lm"
2012-04-14 11:46:39 +00:00
AC_SUBST(GITG_CFLAGS)
AC_SUBST(GITG_LIBS)
GOBJECT_INTROSPECTION_REQUIRE($INTROSPECTION_REQUIRED)
AC_SUBST(INTROSPECTION_REQUIRED)
GNOME_COMPILE_WARNINGS([maximum])
2010-05-29 16:01:14 +00:00
2010-12-30 23:47:23 +00:00
GLIB_GSETTINGS
2011-03-27 13:50:17 +00:00
GLADE_UI_REQUIRED=3.2
AC_ARG_ENABLE([glade-catalog],
[AS_HELP_STRING([--enable-glade-catalog[=@<:@no/auto/yes@:>@]],
2011-03-27 15:53:52 +00:00
[Install a glade catalog file [default=no]])],
2011-03-27 13:50:17 +00:00
[glade_catalog=$enableval],
[glade_catalog="no"])
2011-03-27 13:50:17 +00:00
2011-03-27 15:53:52 +00:00
AM_CONDITIONAL([GLADE_CATALOG], [ test "$glade_catalog" = "yes" ])
2011-03-27 13:50:17 +00:00
2011-03-27 15:53:52 +00:00
AS_IF([ test "$glade_catalog" = "yes" ],
[PKG_CHECK_EXISTS(GLADE, [gladeui-2.0 >= $GLADE_UI_REQUIRED])
AC_MSG_CHECKING([for Glade catalog dir])
GLADE_CATALOG_DIR=`$PKG_CONFIG --variable=catalogdir gladeui-2.0 2>&AS_MESSAGE_LOG_FD`
AC_MSG_RESULT([$GLADE_CATALOG_DIR])
AC_SUBST(GLADE_CATALOG_DIR)])
2011-03-27 13:50:17 +00:00
2012-04-14 11:46:39 +00:00
GITG_PLUGIN_DATADIR="$datadir/gitg/plugins"
AC_SUBST(GITG_PLUGIN_DATADIR)
GITG_PLUGIN_LIBDIR="$libdir/gitg/plugins"
AC_SUBST(GITG_PLUGIN_LIBDIR)
GITG_PLUGIN_CFLAGS="$GITG_CFLAGS"
2012-04-15 12:57:30 +00:00
GITG_PLUGIN_LIBS="$GITG_LIBS \
\$(top_builddir)/libgd/libgd.la \
2012-04-15 12:57:30 +00:00
\$(top_builddir)/libgitg/libgitg-1.0.la \
2013-06-23 12:40:04 +00:00
\$(top_builddir)/libgitg-ext/libgitg-ext-1.0.la"
2012-04-14 11:46:39 +00:00
AC_SUBST(GITG_PLUGIN_CFLAGS)
AC_SUBST(GITG_PLUGIN_LIBS)
GITG_PLUGIN_LIBTOOL_FLAGS="-module -avoid-version"
AC_SUBST(GITG_PLUGIN_LIBTOOL_FLAGS)
GITG_PLUGIN_VALAFLAGS=" \
--pkg Ggit-1.0 \
2012-07-12 18:52:07 +00:00
--pkg libgitg-ext-1.0 \
--pkg libgitg-1.0 \
--pkg gio-2.0 \
--pkg gtk+-3.0 \
--pkg gtksourceview-3.0 \
--pkg libpeas-1.0 \
2013-05-26 06:28:34 +00:00
--pkg gee-0.8 \
--pkg json-glib-1.0 \
--pkg libsoup-2.4 \
--pkg webkit2gtk-3.0 \
2012-07-12 18:52:07 +00:00
--pkg config \
--pkg gd-1.0 \
2012-07-06 17:36:06 +00:00
\$(GITG_VALAFLAGS) \
--vapidir \$(top_srcdir)/vapi \
2012-07-12 18:52:07 +00:00
--vapidir \$(top_builddir)/libgitg \
--vapidir \$(top_builddir)/libgitg-ext \
--vapidir \$(top_builddir)/libgd"
2012-04-14 11:46:39 +00:00
AC_SUBST(GITG_PLUGIN_VALAFLAGS)
dnl ===========================================================================
dnl Check for python
dnl ===========================================================================
PYGOBJECT_REQUIRED=3.0.0
AC_ARG_ENABLE([python],
AS_HELP_STRING([--enable-python[=@<:@no/auto/yes@:>@]],[Build with python support]),
[enable_python=$enableval],
[enable_python="auto"])
if test "x$enable_python" = "xauto"; then
PKG_CHECK_EXISTS([pygobject-3.0 >= $PYGOBJECT_REQUIRED],
[enable_python=yes],[enable_python=no])
fi
if test "x$enable_python" = "xyes"; then
PKG_CHECK_MODULES(PYTHON, [pygobject-3.0 >= $PYGOBJECT_REQUIRED])
pyoverridesdir=`$PYTHON -c "import gi; print(gi._overridesdir)"`
AC_SUBST(pyoverridesdir)
fi
AM_CONDITIONAL(ENABLE_PYTHON, test x"$enable_python" = "xyes")
2013-02-14 10:32:55 +00:00
dnl libgd
LIBGD_INIT([
2013-02-18 14:35:39 +00:00
tagged-entry
_view-common
2013-02-14 10:32:55 +00:00
static
vapi
])
2008-06-23 22:04:20 +00:00
AC_CONFIG_FILES([
Makefile
2013-02-14 10:32:55 +00:00
libgd/Makefile
libgitg/Makefile
2012-04-14 11:46:39 +00:00
libgitg/libgitg-1.0.pc
2013-06-29 12:46:33 +00:00
libgitg/tests/Makefile
2012-04-14 11:46:39 +00:00
libgitg-ext/Makefile
libgitg-ext/libgitg-ext-1.0.pc
2008-06-23 22:04:20 +00:00
gitg/Makefile
data/Makefile
data/gitg.desktop.in
2009-01-29 19:25:30 +00:00
data/icons/Makefile
2010-12-30 23:47:23 +00:00
data/org.gnome.gitg.gschema.xml.in
2008-06-23 22:04:20 +00:00
po/Makefile.in
tests/Makefile
2012-04-14 11:46:39 +00:00
plugins/Makefile
2012-07-17 07:55:09 +00:00
plugins/diff/Makefile
plugins/diff/icons/Makefile
plugins/files/Makefile
2008-06-23 22:04:20 +00:00
])
AC_OUTPUT
echo "
Configuration:
Source code location: ${srcdir}
Compiler: ${CC}
2011-03-27 13:50:17 +00:00
Glade catalog: ${glade_catalog}
2011-03-28 08:33:13 +00:00
Debug enabled: ${enable_debug}
2012-04-14 11:46:39 +00:00
Python support: ${enable_python}
2008-06-23 22:04:20 +00:00
"