dnl Process this file with autoconf to produce a configure script.

AC_INIT(configure.in)
AM_INIT_AUTOMAKE(gcalctool, 4.4.22)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE

AC_PROG_INTLTOOL

AC_ISC_POSIX
AC_PROG_CC
AM_PROG_CC_STDC
AC_HEADER_STDC

pkg_modules="gtk+-2.0 >= 1.3.13"
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)

LIBGNOME_REQUIRED=2.0.0
LIBGNOMEUI_REQUIRED=2.0.0

PKG_CHECK_MODULES(GNOME_UTILS, libgnome-2.0 >= $LIBGNOME_REQUIRED libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED)
AC_SUBST(GNOME_UTILS_CFLAGS)
AC_SUBST(GNOME_UTILS_LIBS)

PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 1.1.9)
AC_SUBST(GCONF_CFLAGS)
AC_SUBST(GCONF_LIBS)

dnl ********************
dnl scrollkeeper checks
dnl ********************

AC_PATH_PROG(SCROLLKEEPER_CONFIG, scrollkeeper-config,no)
if test x$SCROLLKEEPER_CONFIG = xno; then
  AC_MSG_ERROR(Couldn't find scrollkeeper-config. Please install the scrollkeeper package)
fi

dnl *******************************
dnl Internationalization
dnl *******************************

GETTEXT_PACKAGE=gcalctool
AC_PREREQ(2.53)
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")

dnl Add the languages which your application supports here.
AM_PROG_LIBTOOL
ALL_LINGUAS="am ar az be bg bn bs ca cs cy da de el en_CA en_GB es eu fa fi fr ga gu he hi hr hu id it ja ko lt mk ml mn ms nb nl no or pa pl pt pt_BR ro ru sk sl sq sr sr@Latn sv ta th tk uk vi zh_CN zh_TW"
AM_GLIB_GNU_GETTEXT

dnl Use -Wall if we have gcc.
changequote(,)dnl
if test "x$GCC" = "xyes"; then
  case " $CFLAGS " in
  *[\ \	]-Wall[\ \	]*) ;;
  *) CFLAGS="$CFLAGS -Wall" ;;
  esac
fi
changequote([,])dnl

dnl Checking for gconftool-2
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

AC_OUTPUT([
Makefile
gcalctool/Makefile
po/Makefile.in
help/Makefile
help/C/Makefile
help/de/Makefile
help/es/Makefile
help/fr/Makefile
help/it/Makefile
help/ja/Makefile
help/ko/Makefile
help/sv/Makefile
help/zh_CN/Makefile
help/zh_HK/Makefile
help/zh_TW/Makefile
])
