1 dnl Process this file with autoconf to produce a configure script.
6 AC_SUBST(ATK_MAJOR_VERSION)
7 AC_SUBST(ATK_MINOR_VERSION)
10 AM_INIT_AUTOMAKE(atk, 0.1)
16 AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
19 if test "x$GCC" = "xyes"; then
21 *[\ \ ]-Wall[\ \ ]*) ;;
22 *) CFLAGS="$CFLAGS -Wall" ;;
27 GLIB_PACKAGES="gobject-2.0 gmodule-2.0 gthread-2.0"
28 AC_SUBST(GLIB_PACKAGES)
29 GLIB_REQUIRED_VERSION=1.3.2
31 PANGO_PACKAGES="pango"
32 AC_SUBST(PANGO_PACKAGES)
34 dnl This PATH_GLIB is somewhat redundant, but does a sanity compile and
35 dnl importantly defines the GLIB_GENMARSHAL variable for subst into the
37 AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION)
39 PKG_CHECK_MODULES(DEP, glib-2.0 >= $GLIB_REQUIRED_VERSION $GLIB_PACKAGES $PANGO_PACKAGES, , AC_MSG_ERROR([
40 *** GLib or Pango not found. You can find these on ftp://ftp.gtk.org
44 if $PKG_CONFIG --uninstalled $GLIB_PACKAGES $PANGO_PACKAGES; then
47 AC_CHECK_LIB(pango, pango_context_new, :, AC_MSG_ERROR([
48 *** Can't link to Pango. Pango is required to build
49 *** GTK+. For more information see http://www.pango.org]), $DEP_LIBS)
52 AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
54 gtk_doc_min_version=0.6
56 gtk_doc_version=`gtkdoc-mkdb --version`
57 AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
59 exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
60 ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
69 dnl Let people disable the gtk-doc stuff.
70 AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
72 if test x$enable_gtk_doc = xauto ; then
73 if test x$GTKDOC = xtrue ; then
80 dnl NOTE: We need to use a separate automake conditional for this
81 dnl to make this work with the tarballs.
82 AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
84 # define a MAINT-like variable REBUILD which is set if Perl
85 # and awk are found, so autogenerated sources can be rebuilt
88 AC_CHECK_PROGS(PERL, perl5 perl)
91 if test "x$enable_rebuilds" = "xyes" && \
93 $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \