1 dnl Process this file with autoconf to produce a configure script.
4 AM_INIT_AUTOMAKE(atk, 0.2)
8 # ATK_MICRO_VERSION += 1;
9 # ATK_INTERFACE_AGE += 1;
10 # ATK_BINARY_AGE += 1;
11 # if any functions have been added, set ATK_INTERFACE_AGE to 0.
12 # if backwards compatibility has been broken,
13 # set ATK_BINARY_AGE and ATK_INTERFACE_AGE to 0.
21 ## post-1.0 you'd add MINOR_VERSION in here, i.e. 0.3->1.0->1.0.1->1.0.2
22 ## note that micro version has to go in the libtool stuff below
23 ATK_VERSION=$ATK_MAJOR_VERSION.$ATK_MICRO_VERSION
25 AC_SUBST(ATK_MAJOR_VERSION)
26 AC_SUBST(ATK_MINOR_VERSION)
27 AC_SUBST(ATK_MICRO_VERSION)
31 LT_RELEASE=$ATK_MAJOR_VERSION.$ATK_MINOR_VERSION
32 LT_CURRENT=`expr $ATK_MICRO_VERSION - $ATK_INTERFACE_AGE`
33 LT_REVISION=$ATK_INTERFACE_AGE
34 LT_AGE=`expr $ATK_BINARY_AGE - $ATK_INTERFACE_AGE`
44 AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
47 if test "x$GCC" = "xyes"; then
49 *[\ \ ]-Wall[\ \ ]*) ;;
50 *) CFLAGS="$CFLAGS -Wall" ;;
55 GLIB_PACKAGES="gobject-2.0 gmodule-2.0"
56 AC_SUBST(GLIB_PACKAGES)
57 GLIB_REQUIRED_VERSION=1.3.2
59 dnl This PATH_GLIB is somewhat redundant, but does a sanity compile and
60 dnl importantly defines the GLIB_GENMARSHAL variable for subst into the
62 AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION)
64 PKG_CHECK_MODULES(DEP, glib-2.0 >= $GLIB_REQUIRED_VERSION $GLIB_PACKAGES, , AC_MSG_ERROR([
65 *** GLib not found. You can find it on ftp://ftp.gtk.org
69 # Rerun PKG_CONFIG to add gthread-2.0 cflags, but not libs
70 DEP_CFLAGS=`$PKG_CONFIG --cflags $GLIB_PACKAGES gthread-2.0`
72 AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
74 gtk_doc_min_version=0.6
76 gtk_doc_version=`gtkdoc-mkdb --version`
77 AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
79 exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
80 ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
89 dnl Let people disable the gtk-doc stuff.
90 AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
92 if test x$enable_gtk_doc = xauto ; then
93 if test x$GTKDOC = xtrue ; then
100 dnl NOTE: We need to use a separate automake conditional for this
101 dnl to make this work with the tarballs.
102 AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
104 # define a MAINT-like variable REBUILD which is set if Perl
105 # and awk are found, so autogenerated sources can be rebuilt
108 AC_CHECK_PROGS(PERL, perl5 perl)
111 if test "x$enable_rebuilds" = "xyes" && \
113 $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
114 test -n "$AWK" ; then