dnl Configure script for bug-buddy

AC_INIT(src/bug-buddy.c)

AM_CONFIG_HEADER(config.h)

AM_INIT_AUTOMAKE(bug-buddy, 2.8.0)

AM_MAINTAINER_MODE
AC_PROG_INTLTOOL([0.29])

AC_PATH_PROG(GCONFTOOL, gconftool-2)
AM_GCONF_SOURCE_2

SCROLLKEEPER_REQUIRED=0.3.8
AC_SUBST(SCROLLKEEPER_REQUIRED)

## Begin tests for scrollkeeper
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

AC_PROG_CC
AC_ISC_POSIX
AC_HEADER_STDC

BONOBO_ACTIVATION_REQUIRED="bonobo-activation-2.0 >= 1.0.0"
GDK_PIXBUF_REQUIRED="gdk-pixbuf-2.0 >= 2.0.0"
GMODULE_REQUIRED="gmodule-2.0 >= 2.0.0"
GNOME_DESKTOP_REQUIRED="gnome-desktop-2.0 >= 2.0.0"
GNOME_VFS_REQUIRED="gnome-vfs-2.0 >= 2.0.0"
LIBBONOBO_REQUIRED="libbonobo-2.0 >= 2.0.0"
LIBGNOME_REQUIRED="libgnome-2.0 >= 2.0.0"
LIBGNOMECANVAS_REQUIRED="libgnomecanvas-2.0 >= 2.0.0"
LIBGNOMEUI_REQUIRED="libgnomeui-2.0 >= 2.5.92"
LIBGLADE_REQUIRED="libglade-2.0 >= 2.0.0"
LIBXML_REQUIRED="libxml-2.0 >= 2.4.6"
GTK_REQUIRED="gtk+-2.0 >= 2.3.6"

PKG_CHECK_MODULES(BUG_BUDDY, 
[
	$BONOBO_ACTIVATION_REQUIRED
	$GDK_PIXBUF_REQUIRED
	$GMODULE_REQUIRED
	$GNOME_DESKTOP_REQUIRED
	$GNOME_VFS_REQUIRED
	$LIBBONOBO_REQUIRED
	$LIBGNOME_REQUIRED
	$LIBGNOMECANVAS_REQUIRED
	$LIBGNOMEUI_REQUIRED
	$LIBGLADE_REQUIRED
	$LIBXML_REQUIRED
	$GTK_REQUIRED
])

AC_SUBST(BUG_BUDDY_CFLAGS)
AC_SUBST(BUG_BUDDY_LIBS)

PKG_CHECK_MODULES(GNOME_CRASH, $LIBGNOMEUI_REQUIRED)
AC_SUBST(GNOME_CRASH_CFLAGS)
AC_SUBST(GNOME_CRASH_LIBS)

GETTEXT_PACKAGE=bug-buddy
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")

ALL_LINGUAS="am ar az be bg bn bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu id is it ja ko lt lv mk ml mn ms nb nl nn no or pa pl pt pt_BR ro ru sk sl sq sr sr@Latn sv ta th tr uk vi wa zh_CN zh_TW"
AM_GLIB_GNU_GETTEXT

AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)

                                                                                                                             
AC_ARG_ENABLE(deprecations,AC_HELP_STRING([--enable-deprecations],[warn about deprecated usages]))
                                                                                                                             
AM_CONDITIONAL(ENABLE_DEPRECATIONS, test "x$enable_deprecations" = xyes)


AC_OUTPUT([
bug-buddy.spec
bug-buddy.schemas
Makefile
bugzilla/Makefile
bugzilla/gnome/Makefile
bugzilla/ximian/Makefile
docs/Makefile
docs/C/Makefile
pixmaps/Makefile
po/Makefile.in
src/Makefile
src/bug-buddy.desktop.in
src/bug-buddy-core.desktop.in
])

dnl docs are totally hosed
dnl docs/Makefile
dnl docs/C/Makefile
dnl docs/it/Makefile

echo "

Configuration:

	CFLAGS:	${BUG_BUDDY_CFLAGS}

	LIBS:	${BUG_BUDDY_LIBS}

"
