1 dnl Process this file with autoconf to produce a configure script.
5 AM_CONFIG_HEADER(config.h)
7 dnl ==========================================================================
9 dnl If you add a version number here, you *must* add an AC_SUBST line for
10 dnl it too, or it will never make it into the spec file!
12 dnl ==========================================================================
14 GLIB_REQUIRED_VERSION=2.0.0
15 AC_SUBST(GLIB_REQUIRED_VERSION)
17 dnl ==========================================================================
19 dnl ==========================================================================
22 dnl ATK_MICRO_VERSION += 1;
23 dnl ATK_INTERFACE_AGE += 1;
24 dnl ATK_BINARY_AGE += 1;
25 dnl if any functions have been added, set ATK_INTERFACE_AGE to 0.
26 dnl if backwards compatibility has been broken,
27 dnl set ATK_BINARY_AGE _and_ ATK_INTERFACE_AGE to 0.
33 ATK_VERSION=$ATK_MAJOR_VERSION.$ATK_MINOR_VERSION.$ATK_MICRO_VERSION
35 dnl The X.Y in -latk-X.Y line. This is expected to stay 1.0 until Atk 2.
38 dnl Number of releases since we've added interfaces
43 AC_SUBST(ATK_MAJOR_VERSION)
44 AC_SUBST(ATK_MINOR_VERSION)
46 AC_SUBST(ATK_API_VERSION)
47 AC_SUBST(ATK_MICRO_VERSION)
48 AC_SUBST(ATK_INTERFACE_AGE)
49 AC_SUBST(ATK_BINARY_AGE)
51 dnl libtool versioning
52 lt_current=`expr 100 '*' $ATK_MINOR_VERSION + $ATK_MICRO_VERSION - $ATK_INTERFACE_AGE`
53 lt_revision=$ATK_INTERFACE_AGE
54 lt_age=`expr $ATK_BINARY_AGE - $ATK_INTERFACE_AGE`
55 LT_VERSION_INFO="$lt_current:$lt_revision:$lt_age"
56 LT_CURRENT_MINUS_AGE=`expr $lt_current - $lt_age`
58 AC_SUBST(LT_VERSION_INFO)
59 AC_SUBST(LT_CURRENT_MINUS_AGE)
61 dnl ==========================================================================
63 AM_INIT_AUTOMAKE(atk,$ATK_VERSION)
66 AC_SUBST(GETTEXT_PACKAGE)
67 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
69 ALL_LINGUAS="cs de es en_GB ms no sv"
72 # AM_GLIB_GNU_GETTEXT above substs $DATADIRNAME
73 # this is the directory where the *.{mo,gmo} files are installed
74 atklocaledir='${prefix}/${DATADIRNAME}/locale'
75 AC_SUBST(atklocaledir)
77 AC_CHECK_FUNCS(bind_textdomain_codeset)
84 AC_MSG_CHECKING([for Win32])
93 AC_MSG_RESULT([$atk_native_win32])
94 AM_CONDITIONAL(OS_WIN32, test "$atk_native_win32" = "yes")
96 if test "$atk_native_win32" = "yes"; then
97 AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
99 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
101 dnl Cache $ACLOCAL_FLAGS
102 AC_CACHE_CHECK([for aclocal flags], ac_cv_atk_aclocal_flags,[
103 ac_cv_atk_aclocal_flags="$ACLOCAL_FLAGS"
105 ACLOCAL="$ACLOCAL $ac_cv_atk_aclocal_flags"
107 AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
110 if test "x$GCC" = "xyes"; then
112 *[\ \ ]-Wall[\ \ ]*) ;;
113 *) CFLAGS="$CFLAGS -Wall" ;;
118 GLIB_PACKAGES="gobject-2.0 gmodule-2.0"
119 AC_SUBST(GLIB_PACKAGES)
121 dnl This PATH_GLIB is somewhat redundant, but does a sanity compile and
122 dnl importantly defines the GLIB_GENMARSHAL variable for subst into the
124 AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :,
126 *** GLIB $GLIB_REQUIRED_VERSION or better is required. The latest version of
127 *** GLIB is always available from ftp://ftp.gtk.org/.]),
130 PKG_CHECK_MODULES(DEP, glib-2.0 >= $GLIB_REQUIRED_VERSION $GLIB_PACKAGES, , AC_MSG_ERROR([
131 *** GLib not found. You can find it on ftp://ftp.gtk.org
135 # Rerun PKG_CONFIG to add gthread-2.0 cflags, but not libs
136 DEP_CFLAGS=`$PKG_CONFIG --cflags $GLIB_PACKAGES gthread-2.0`
138 gtk_doc_min_version=0.9
139 AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
142 gtk_doc_version=`gtkdoc-mkdb --version`
143 AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
144 IFS="${IFS= }"; atk_save_IFS="$IFS"; IFS="."
146 for min in $gtk_doc_min_version ; do
148 if test -z $min ; then break; fi
149 if test -z $cur ; then GTKDOC=false; break; fi
150 if test $cur -gt $min ; then break ; fi
151 if test $cur -lt $min ; then GTKDOC=false; break ; fi
162 atktargetlib=libatk-$ATK_API_VERSION.la
164 AC_SUBST(atktargetlib)
166 AC_MSG_CHECKING(whether make is GNU Make)
169 if $ac_make --version 2>/dev/null | grep '^GNU Make ' >/dev/null ; then
170 STRIP_BEGIN='$(strip $(STRIP_DUMMY)'
177 AC_SUBST(STRIP_DUMMY)
178 AC_SUBST(STRIP_BEGIN)
181 dnl Disable the gtk-doc stuff by default to avoid Jade hassles
182 AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc use gtk-doc to build documentation [default=no]], enable_gtk_doc="$enableval", enable_gtk_doc=no)
184 if test x$enable_gtk_doc = xyes ; then
185 if test x$GTKDOC = xtrue ; then
192 dnl NOTE: We need to use a separate automake conditional for this
193 dnl to make this work with the tarballs.
194 AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
196 # define a MAINT-like variable REBUILD which is set if Perl
197 # and awk are found, so autogenerated sources can be rebuilt
200 AC_CHECK_PROGS(PERL, perl5 perl)
203 if test "x$enable_rebuilds" = "xyes" && \
205 $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
206 test -n "$AWK" ; then