Release atk 1.29.92.
[atk.git] / configure.in
blob72b2d296bcf1958be71195e20d98f7480cc211c1
1 dnl Process this file with autoconf to produce a configure script.
3 AC_PREREQ(2.62)
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], [29])
20 m4_define([atk_micro_version], [92])
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)])
41 AC_INIT(atk, [atk_version],
42         [http://bugzilla.gnome.org/enter_bug.cgi?product=atk])
43 AC_CONFIG_SRCDIR([ChangeLog])
45 AC_CONFIG_MACRO_DIR([m4])
47 AM_CONFIG_HEADER(config.h)
49 AM_INIT_AUTOMAKE([-Wno-portability])
51 dnl ==========================================================================
52 dnl
53 dnl If you add a version number here, you *must* add an AC_SUBST line for
54 dnl it too, or it will never make it into the spec file!
55 dnl
56 dnl ==========================================================================
58 ATK_MAJOR_VERSION=atk_major_version
59 ATK_MINOR_VERSION=atk_minor_version
60 ATK_MICRO_VERSION=atk_micro_version
61 ATK_VERSION=atk_version
62 ATK_API_VERSION=atk_api_version
63 ATK_INTERFACE_AGE=atk_interface_age
64 ATK_BINARY_AGE=atk_binary_age
66 AC_SUBST(ATK_MAJOR_VERSION)
67 AC_SUBST(ATK_MINOR_VERSION)
68 AC_SUBST(ATK_VERSION)
69 AC_SUBST(ATK_API_VERSION)
70 AC_SUBST(ATK_MICRO_VERSION)
71 AC_SUBST(ATK_INTERFACE_AGE)
72 AC_SUBST(ATK_BINARY_AGE)
74 dnl libtool versioning
75 LT_VERSION_INFO=lt_version_info
76 LT_CURRENT_MINUS_AGE=lt_current_minus_age
77 AC_SUBST(LT_VERSION_INFO)
78 AC_SUBST(LT_CURRENT_MINUS_AGE)
80 dnl ==========================================================================
82 GETTEXT_PACKAGE=atk10
83 AC_SUBST(GETTEXT_PACKAGE)
84 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"],
85   [Define the gettext package to be used])
87 AC_PROG_CC
88 AM_DISABLE_STATIC
89 AC_LIBTOOL_WIN32_DLL
90 AM_PROG_LIBTOOL
92 AC_MSG_CHECKING([for some Win32 platform])
93 case "$host" in
94   *-*-mingw*|*-*-cygwin*)
95     platform_win32=yes
96     ;;
97   *)
98     platform_win32=no
99     ;;
100 esac
101 AC_MSG_RESULT([$platform_win32])
102 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
104 AC_MSG_CHECKING([for native Win32 platform])
105 case "$host" in
106   *-*-mingw*)
107     atk_native_win32=yes
108     case "$host" in
109       x86_64-*-*)
110         LIB_EXE_MACHINE_FLAG=X64
111         ;;
112       *)
113         LIB_EXE_MACHINE_FLAG=X86
114         ;;
115     esac
116     ;;
117   *)
118     atk_native_win32=no
119     ;;
120 esac
121 AC_MSG_RESULT([$atk_native_win32])
122 AM_CONDITIONAL(OS_WIN32, test "$atk_native_win32" = "yes")
124 AC_SUBST(LIB_EXE_MACHINE_FLAG)
126 if test "$atk_native_win32" = "yes"; then
127   AC_CHECK_TOOL(WINDRES, windres, no)
128   if test "$WINDRES" = no; then
129     AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
130   fi
131   AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
134 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
136 dnl Cache $ACLOCAL_FLAGS
137 AC_CACHE_CHECK([for aclocal flags], ac_cv_atk_aclocal_flags,[
138    ac_cv_atk_aclocal_flags="$ACLOCAL_FLAGS"
140 ACLOCAL="$ACLOCAL $ac_cv_atk_aclocal_flags"
142 AC_ARG_ENABLE(rebuilds,
143               [AC_HELP_STRING([--disable-rebuilds],
144                               [disable all source autogeneration rules])],,
145               [enable_rebuilds=yes])
147 CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES"
149 changequote(,)dnl
150 if test "x$GCC" = "xyes"; then
151   case " $CFLAGS " in
152   *[\ \ ]-Wall[\ \      ]*) ;;
153   *) CFLAGS="$CFLAGS -Wall" ;;
154   esac
156 changequote([,])dnl
158 GLIB_REQUIRED_VERSION=2.0.0
159 GLIB_PACKAGES="gobject-2.0"
160 AC_SUBST(GLIB_PACKAGES)
161 AC_SUBST(GLIB_REQUIRED_VERSION)
163 dnl This PATH_GLIB is somewhat redundant, but does a sanity compile and 
164 dnl importantly defines the GLIB_GENMARSHAL variable for subst into the
165 dnl Makefile
166 AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :,
167   AC_MSG_ERROR([
168 *** GLIB $GLIB_REQUIRED_VERSION or better is required. The latest version of 
169 *** GLIB is always available from ftp://ftp.gtk.org/. If GLIB is installed
170 *** but not in the same location as pkg-config add the location of the file 
171 *** glib-2.0.pc to the environment variable PKG_CONFIG_PATH.]),
172   gobject)
174 PKG_CHECK_MODULES(DEP, glib-2.0 >= $GLIB_REQUIRED_VERSION $GLIB_PACKAGES, ,
175   AC_MSG_ERROR([
176         *** GLib not found. You can find it on ftp://ftp.gtk.org
177         *** Errors follow:
178             $DEP_PKG_ERRORS]))
180 # Rerun PKG_CONFIG to add gthread-2.0 cflags, but not libs
181 DEP_CFLAGS=`$PKG_CONFIG --cflags $GLIB_PACKAGES gthread-2.0`
183 ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
184 AM_GLIB_GNU_GETTEXT
186 AC_CHECK_FUNCS(bind_textdomain_codeset)
188 GOBJECT_INTROSPECTION_CHECK([0.6.7])
190 GTK_DOC_CHECK([1.0])
192 # define a MAINT-like variable REBUILD which is set if Perl
193 # and awk are found, so autogenerated sources can be rebuilt
195 AC_PROG_AWK
196 AC_CHECK_PROGS(PERL, perl5 perl)
198 REBUILD=\#
199 if test "x$enable_rebuilds" = "xyes" && \
200         test -n "$PERL" && \
201         $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
202      test -n "$AWK" ; then
203   REBUILD=
205 AC_SUBST(REBUILD)
207 AC_CONFIG_FILES([
208 Makefile
209 po/Makefile.in
210 atk.pc
211 atk-uninstalled.pc
212 atk/Makefile
213 atk/atk.rc
214 tests/Makefile
215 docs/Makefile
216 docs/version.xml
217 atk.spec
218 atk-zip.sh
221 AC_OUTPUT