AC_PREREQ(2.53)
AC_INIT(netbook-launcher, 1.6.21, [])
AM_INIT_AUTOMAKE()
AC_CONFIG_SRCDIR(src/main.c)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE

AC_ISC_POSIX
AC_PROG_CC
AC_STDC_HEADERS
AC_PROG_LIBTOOL

dnl i18n
GETTEXT_PACKAGE=netbook-launcher
AC_SUBST(GETTEXT_PACKAGE)
AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Define to the Gettext package name])
ALL_LINGUAS="`cat "$srcdir/po/LINGUAS" | grep -v '^#'`"

IT_PROG_INTLTOOL([0.34])
AM_GLIB_GNU_GETTEXT

dnl gconf
AC_PATH_PROG(GCONFTOOL, gconftool-2)
AM_GCONF_SOURCE_2

if test "x$GCC" = "xyes"; then
        GCC_FLAGS="-g -Wall -Werror"
fi

AC_SUBST(GCC_FLAGS)

PKG_CHECK_MODULES(DEPS, 
                  clutter-0.8
                  clutter-gtk-0.8
                  clutter-x11-0.8
                  glib-2.0
                  gthread-2.0
                  gobject-2.0
                  gtk+-2.0
                  gconf-2.0 
                  pango
                  libgnome-menu
                  gnome-desktop-2.0
                  libgnomeui-2.0
                  libwnck-1.0
                  libstartup-notification-1.0
                  dbus-1
                  dbus-glib-1
                  )
AC_SUBST(DEPS_CFLAGS)
AC_SUBST(DEPS_LIBS)

AC_PATH_PROG(GCONFTOOL, gconftool-2)
AM_GCONF_SOURCE_2

AC_OUTPUT([
Makefile
data/Makefile
tidy/Makefile
src/Makefile
po/Makefile.in
])
