rm -f config.cache

AC_PREREQ(2.59)
AC_INIT([diversity-nav], [0.0.1], [raster@openmoko.org])
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.8 foreign])

AC_CANONICAL_BUILD
AC_CANONICAL_HOST

AC_PROG_CC
AM_PROG_LIBTOOL
AC_HEADER_STDC

ALL_LINGUAS="fr it"
AC_SUBST(ALL_LINGUAS)

AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION(0.14)

#MODULE_ARCH="$host_os-$host_cpu"
#AC_SUBST(MODULE_ARCH)
#AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
#datadir="${libdir}/enlightenment/modules/${PACKAGE}"

localedir=${datadir}/locale
AC_SUBST(LOCALEDIR, "${localedir}")
AC_DEFINE_UNQUOTED(LOCALEDIR, "${localedir}", "Module Locale Directory")

#
# Check EFL Libs
#
PKG_CHECK_MODULES(EFL, [ecore, ecore-file, evas, edje >= 0.5.0, etk])
AC_ARG_WITH(edje-cc,
[  --with-edje-cc=PATH              specify a specific path to edje_cc],
[
  v=$withval;
  edje_cc=$v
  echo "  Enlightenment edje_cc explicitly set to "$edje_cc;
],[
  edje_cc=$(pkg-config --variable=prefix edje)/bin/edje_cc
])
AC_SUBST(edje_cc)
	
PKG_CHECK_MODULES(EDBUS, edbus)

CFLAGS="-Wall $CFLAGS"

AC_OUTPUT([
Makefile
diversity-nav.desktop
src/Makefile
src/widgets/Makefile
tools/Makefile
dbus/Makefile
po/Makefile
data/Makefile
data/themes/Makefile
data/themes/fonts/Makefile
data/themes/images/Makefile
],[])
