AC_INIT(gnome-python.spec)
AM_CONFIG_HEADER(config.h)

AM_INIT_AUTOMAKE(gnome-python, 1.0.53)
AM_ACLOCAL_INCLUDE(macros)

AC_DISABLE_STATIC
AC_PROG_LIBTOOL

AM_PATH_PYTHON(module)
AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])

AM_PATH_GTK(1.2.6)
AM_PATH_GDK_IMLIB

GNOME_INIT(applets capplet)

AM_PATH_LIBGLADE(build_gladegnome=true, build_gladegnome=false, gnome)
AM_CONDITIONAL(WITH_GLADEGNOME, $build_gladegnome)

AM_CONDITIONAL(WITH_APPLETS, test -n "$GNOME_APPLETS_LIBS")
AM_CONDITIONAL(WITH_CAPPLET, test -n "$GNOME_CAPPLET_LIBS")

dnl XXX FIX ME when there is a gtkhtml.m4 or gnome-config gtkhtml
dnl AM_PATH_GTKHTML(build_gtkhtml=true, build_gtkhtml=false)
AC_ARG_WITH(gtkhtml,    [  --with-gtkhtml          Build with gtkhtml support],
 build_gtkhtml=yes,
 build_gtkhtml=no)
if test "x$build_gtkhtml" != xno; then
  GTKHTML_LIBS=`$GNOME_CONFIG --libs gtkhtml`
  AC_SUBST(GTKHTML_LIBS)
fi
AM_CONDITIONAL(BUILD_GTKHTML, test "x$build_gtkhtml" != xno)

AM_PATH_GLIB

AC_CONFIG_SUBDIRS(pygtk)
AC_OUTPUT(Makefile macros/Makefile
pygnome/Makefile pygnome/generate/Makefile pygnome/gnome/Makefile)


