AC_PREREQ(2.59)

AC_INIT([telepathy-indicator], [0.3.0], [ken.vandine@canonical.com])
AC_COPYRIGHT([Copyright 2011 Canonical])

AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE([1.9])

AM_MAINTAINER_MODE

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_C_O
AC_STDC_HEADERS
AC_PROG_LIBTOOL
PKG_PROG_PKG_CONFIG

AC_SUBST(VERSION)

m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])

###########################
# Gettext
###########################
GETTEXT_PACKAGE="$PACKAGE"
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [gettext domain])
AM_GLIB_GNU_GETTEXT
IT_PROG_INTLTOOL([0.35.0])


###########################
# Dependencies
###########################

GLIB_REQUIRED=2.28
TELEPATHY_GLIB_REQUIRED=0.11.12
UNITY_REQUIRED=3.4.0
PKG_CHECK_MODULES(TPI,
                  glib-2.0 >= $GLIB_REQUIRED
                  gobject-2.0
                  gtk+-3.0
                  messaging-menu
                  telepathy-glib >= $TELEPATHY_GLIB_REQUIRED
                  unity >= $UNITY_REQUIRED
                  )
AC_SUBST(TPI_CFLAGS)
AC_SUBST(TPI_LIBS)

###########################
# Files
###########################

AC_CONFIG_FILES([
Makefile
data/Makefile
src/Makefile
po/Makefile.in
])

AC_OUTPUT

###########################
# Results
###########################

AC_MSG_NOTICE([

telepathy-indicator configuration:

        Prefix:                 $prefix
])
