AC_PREREQ(2.52)

AC_INIT(gnomeradio, 1.5.99, http://mfcn.ilo.de/gnomeradio)
AC_CONFIG_SRCDIR(src/gui.c)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)

ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"

AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)

AC_PROG_INTLTOOL([0.21])

AM_PROG_LIBTOOL
AC_ISC_POSIX
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET


ALL_LINGUAS="am az be ca cs da de en_CA en_GB es eu fi fr he hr hu it ja lv ml mn nl no pl pt pt_BR ru rw sk sr sr@Latn sv tr uk vi zh_CN"
AM_GLIB_GNU_GETTEXT
GETTEXT_PACKAGE=gnomeradio
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", GETTEXT_PACKAGE)


PKG_CHECK_MODULES(GNOMERADIO, libgnomeui-2.0 gconf-2.0)
AC_SUBST(GNOMERADIO_CFLAGS)
AC_SUBST(GNOMERADIO_LIBS)
AC_SUBST(LIRC)


AC_PATH_PROG(GCONFTOOL, gconftool-2, no)

if test x"$GCONFTOOL" = xno; then
  AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
fi

AM_GCONF_SOURCE_2

LIRC=""
if test "$enable_lirc" != "no"; then
  AC_CHECK_LIB(lirc_client, lirc_init,
    AC_DEFINE(HAVE_LIRC, 1, HAVE_LIRC) LIRC="-llirc_client",,)
else
  echo "*** lirc disabled"
fi

AC_ARG_ENABLE(install_schemas,
       [  --disable-install-schemas        Disable installation of the gconf schemas])
AM_CONDITIONAL(INSTALL_SCHEMAS, test x$enable_install_schemas != xno)

AC_OUTPUT([
gnomeradio.spec
Makefile
src/Makefile
po/Makefile.in
pixmaps/Makefile
docs/Makefile
docs/C/Makefile
])

