Release atk 1.33.6.
[atk.git] / configure.ac
blob20b9908fb7781a63990a22dc93f449eb06348cb8
1 dnl Process this file with autoconf to produce a configure script.
3 AC_PREREQ([2.63])
5 dnl ==========================================================================
6 dnl                              Versioning              
7 dnl ==========================================================================
9 dnl Making releases:
10 dnl   ATK_MICRO_VERSION += 1;
11 dnl   ATK_INTERFACE_AGE += 1;
12 dnl   ATK_BINARY_AGE += 1;
13 dnl if any functions have been added, set ATK_INTERFACE_AGE to 0.
14 dnl if backwards compatibility has been broken,
15 dnl set ATK_BINARY_AGE _and_ ATK_INTERFACE_AGE to 0.
17 dnl The triplet 
18 m4_define([atk_major_version], [1])
19 m4_define([atk_minor_version], [33])
20 m4_define([atk_micro_version], [6])
21 m4_define([atk_version],
22           [atk_major_version.atk_minor_version.atk_micro_version])
24 dnl The X.Y in -latk-X.Y line. This is expected to stay 1.0 until Atk 2.
25 m4_define([atk_api_version], [1.0])
27 dnl Number of releases since we've added interfaces
28 m4_define([atk_interface_age], [1])
30 m4_define([atk_binary_age],
31           [m4_eval(100 * atk_minor_version + 10 + atk_micro_version)])
33 m4_define([lt_current],
34           [m4_eval(100 * atk_minor_version + 10 + atk_micro_version - atk_interface_age)])
35 m4_define([lt_revision], [atk_interface_age])
36 m4_define([lt_age], [m4_eval(atk_binary_age - atk_interface_age)])
37 m4_define([lt_version_info], [lt_current:lt_revision:lt_age])
38 m4_define([lt_current_minus_age], [m4_eval(lt_current - lt_age)])
40 AC_INIT([atk],
41         [atk_version],
42         [http://bugzilla.gnome.org/enter_bug.cgi?product=atk],
43         [atk])
45 AC_CONFIG_HEADERS([config.h])
46 AC_CONFIG_SRCDIR([ChangeLog])
47 AC_CONFIG_MACRO_DIR([m4])
49 AM_INIT_AUTOMAKE([1.10 -Wno-portability])
51 # Support silent build rules, requires at least automake-1.11. Disable
52 # by either passing --disable-silent-rules to configure or passing V=1
53 # to make
54 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
56 dnl ==========================================================================
57 dnl
58 dnl If you add a version number here, you *must* add an AC_SUBST line for
59 dnl it too, or it will never make it into the spec file!
60 dnl
61 dnl ==========================================================================
63 ATK_MAJOR_VERSION=atk_major_version
64 ATK_MINOR_VERSION=atk_minor_version
65 ATK_MICRO_VERSION=atk_micro_version
66 ATK_VERSION=atk_version
67 ATK_API_VERSION=atk_api_version
68 ATK_INTERFACE_AGE=atk_interface_age
69 ATK_BINARY_AGE=atk_binary_age
71 AC_SUBST(ATK_MAJOR_VERSION)
72 AC_SUBST(ATK_MINOR_VERSION)
73 AC_SUBST(ATK_VERSION)
74 AC_SUBST(ATK_API_VERSION)
75 AC_SUBST(ATK_MICRO_VERSION)
76 AC_SUBST(ATK_INTERFACE_AGE)
77 AC_SUBST(ATK_BINARY_AGE)
79 dnl libtool versioning
80 LT_VERSION_INFO=lt_version_info
81 LT_CURRENT_MINUS_AGE=lt_current_minus_age
82 AC_SUBST(LT_VERSION_INFO)
83 AC_SUBST(LT_CURRENT_MINUS_AGE)
85 dnl ==========================================================================
87 # Check for programs
88 AC_PROG_CC
90 # Initialize libtool
91 LT_PREREQ([2.2])
92 LT_INIT([disable-static win32-dll])
94 AC_CHECK_FUNCS(bind_textdomain_codeset)
96 AC_MSG_CHECKING([for some Win32 platform])
97 case "$host" in
98   *-*-mingw*|*-*-cygwin*)
99     platform_win32=yes
100     ;;
101   *)
102     platform_win32=no
103     ;;
104 esac
105 AC_MSG_RESULT([$platform_win32])
106 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
108 AC_MSG_CHECKING([for native Win32 platform])
109 case "$host" in
110   *-*-mingw*)
111     atk_native_win32=yes
112     case "$host" in
113       x86_64-*-*)
114         LIB_EXE_MACHINE_FLAG=X64
115         ;;
116       *)
117         LIB_EXE_MACHINE_FLAG=X86
118         ;;
119     esac
120     ;;
121   *)
122     atk_native_win32=no
123     ;;
124 esac
125 AC_MSG_RESULT([$atk_native_win32])
126 AM_CONDITIONAL(OS_WIN32, test "$atk_native_win32" = "yes")
128 AC_SUBST(LIB_EXE_MACHINE_FLAG)
130 if test "$atk_native_win32" = "yes"; then
131   AC_CHECK_TOOL(WINDRES, windres, no)
132   if test "$WINDRES" = no; then
133     AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
134   fi
135   AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
138 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
140 dnl Cache $ACLOCAL_FLAGS
141 AC_CACHE_CHECK([for aclocal flags], ac_cv_atk_aclocal_flags,[
142    ac_cv_atk_aclocal_flags="$ACLOCAL_FLAGS"
144 ACLOCAL="$ACLOCAL $ac_cv_atk_aclocal_flags"
146 AC_ARG_ENABLE(rebuilds,
147               [AS_HELP_STRING([--disable-rebuilds],
148                               [disable all source autogeneration rules])],,
149               [enable_rebuilds=yes])
151 CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES"
153 changequote(,)dnl
154 if test "x$GCC" = "xyes"; then
155   case " $CFLAGS " in
156   *[\ \ ]-Wall[\ \      ]*) ;;
157   *) CFLAGS="$CFLAGS -Wall" ;;
158   esac
160 changequote([,])dnl
162 GLIB_REQUIRED_VERSION=2.0.0
163 GLIB_PACKAGES="gobject-2.0"
164 AC_SUBST(GLIB_PACKAGES)
165 AC_SUBST(GLIB_REQUIRED_VERSION)
167 dnl This PATH_GLIB is somewhat redundant, but does a sanity compile and 
168 dnl importantly defines the GLIB_GENMARSHAL variable for subst into the
169 dnl Makefile
170 AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :,
171   AC_MSG_ERROR([
172 *** GLIB $GLIB_REQUIRED_VERSION or better is required. The latest version of 
173 *** GLIB is always available from ftp://ftp.gtk.org/. If GLIB is installed
174 *** but not in the same location as pkg-config add the location of the file 
175 *** glib-2.0.pc to the environment variable PKG_CONFIG_PATH.]),
176   gobject)
178 PKG_CHECK_MODULES(DEP, glib-2.0 >= $GLIB_REQUIRED_VERSION $GLIB_PACKAGES, ,
179   AC_MSG_ERROR([
180         *** GLib not found. You can find it on ftp://ftp.gtk.org
181         *** Errors follow:
182             $DEP_PKG_ERRORS]))
184 # Rerun PKG_CONFIG to add gthread-2.0 cflags, but not libs
185 DEP_CFLAGS=`$PKG_CONFIG --cflags $GLIB_PACKAGES gthread-2.0`
187 # i18n stuff
188 GETTEXT_PACKAGE=atk10
189 AC_SUBST(GETTEXT_PACKAGE)
190 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"],
191   [Define the gettext package to be used])
193 ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
194 AM_GLIB_GNU_GETTEXT
196 # Introspection support
197 GOBJECT_INTROSPECTION_CHECK([0.6.7])
199 # Documentation support
200 GTK_DOC_CHECK([1.13])
202 # define a MAINT-like variable REBUILD which is set if Perl
203 # and awk are found, so autogenerated sources can be rebuilt
205 AC_PROG_AWK
206 AC_CHECK_PROGS(PERL, perl5 perl)
208 REBUILD=\#
209 if test "x$enable_rebuilds" = "xyes" && \
210         test -n "$PERL" && \
211         $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
212      test -n "$AWK" ; then
213   REBUILD=
215 AC_SUBST(REBUILD)
217 AC_CONFIG_FILES([
218 Makefile
219 po/Makefile.in
220 atk.pc
221 atk-uninstalled.pc
222 atk/Makefile
223 atk/atk.rc
224 tests/Makefile
225 build/Makefile
226 build/win32/Makefile
227 build/win32/vs9/Makefile
228 docs/Makefile
229 docs/version.xml
230 atk.spec
231 atk-zip.sh
232 config.h.win32
235 AC_OUTPUT