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"
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 # Rerun PKG_CONFIG to add gthread-2.0 cflags, but not libs
45 DEP_CFLAGS=`$PKG_CONFIG --cflags $GLIB_PACKAGES $PANGO_PACKAGES gthread-2.0`
47 if $PKG_CONFIG --uninstalled $GLIB_PACKAGES $PANGO_PACKAGES; then
50 AC_CHECK_LIB(pango, pango_context_new, :, AC_MSG_ERROR([
51 *** Can't link to Pango. Pango is required to build
52 *** GTK+. For more information see http://www.pango.org]), $DEP_LIBS)
55 AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
57 gtk_doc_min_version=0.6
59 gtk_doc_version=`gtkdoc-mkdb --version`
60 AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
62 exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
63 ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
72 dnl Let people disable the gtk-doc stuff.
73 AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
75 if test x$enable_gtk_doc = xauto ; then
76 if test x$GTKDOC = xtrue ; then
83 dnl NOTE: We need to use a separate automake conditional for this
84 dnl to make this work with the tarballs.
85 AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
87 # define a MAINT-like variable REBUILD which is set if Perl
88 # and awk are found, so autogenerated sources can be rebuilt
91 AC_CHECK_PROGS(PERL, perl5 perl)
94 if test "x$enable_rebuilds" = "xyes" && \
96 $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \