1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT([geanyvc], [0.4], [yurand2@gmail.com])
4 AM_INIT_AUTOMAKE([1.9 foreign])
6 AM_CONFIG_HEADER(config.h)
12 LIBTOOL="$LIBTOOL --silent"
19 PKG_CHECK_MODULES(GEANY, [geany >= 0.15])
23 GEANY_VERSION=`$PKG_CONFIG --modversion geany`
24 GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
27 dnl Check for GtkSpell support
28 AC_MSG_CHECKING([whether to use GtkSpell])
29 AC_ARG_ENABLE(gtkspell,
30 [ --disable-gtkspell Do not use GtkSpell in editor],
31 [ac_cv_enable_gtkspell=$enableval], [ac_cv_enable_gtkspell=yes])
32 if test "$ac_cv_enable_gtkspell" = yes; then
34 AC_MSG_CHECKING([whether GtkSpell is available])
35 if $PKG_CONFIG gtkspell-2.0 ; then
37 CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gtkspell-2.0`"
38 LIBS="$LIBS `$PKG_CONFIG --libs gtkspell-2.0`"
39 AC_DEFINE(USE_GTKSPELL, 1, Use GtkSpell in editor)
42 ac_cv_enable_gtkspell=no
49 GETTEXT_PACKAGE=geanyvc
50 AC_SUBST(GETTEXT_PACKAGE)
51 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
53 ALL_LINGUAS="`sed -e '/^#/d' $srcdir/po/LINGUAS`" # take all languages found in file po/LINGUAS
56 # workaround for intltool bug (http://bugzilla.gnome.org/show_bug.cgi?id=490845)
57 if test "x$MSGFMT" = "xno"; then
58 AC_MSG_ERROR([msgfmt not found. Please install the gettext package.])
61 # intltool hack to define install_sh on Debian/Ubuntu systems
62 if test "x$install_sh" = "x"; then
63 install_sh="`pwd`/install-sh"
67 # get the plugin installed at the correct location for Geany
68 # TODO find a way to NOT override --libdir command line option if given
69 libdir="`$PKG_CONFIG --variable=libdir geany`/geany"
72 PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], [
73 AC_SUBST(CHECK_CFLAGS)
75 AM_CONDITIONAL(UNITTESTS, true)
77 AM_CONDITIONAL(UNITTESTS, false)
86 echo "----------------------------------------"
87 echo "Install geanyvc in : ${libdir}"
88 echo "Using Geany version : ${GEANY_VERSION}"
89 echo "Using GTK version : ${GTK_VERSION}"
90 echo "Building with GtkSpell support : ${ac_cv_enable_gtkspell}"
92 echo "Configuration is done OK."