Revved to 1.19.1 for GNOME 2.19.1.
[atk.git] / configure.in
blobf4f230a85782ecdf904836fccf12df82c77ad337
1 dnl Process this file with autoconf to produce a configure script.
3 AC_PREREQ(2.54)
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], [19])
20 m4_define([atk_micro_version], [1])
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 AM_CONFIG_HEADER(config.h)
47 AM_INIT_AUTOMAKE
49 dnl ==========================================================================
50 dnl
51 dnl If you add a version number here, you *must* add an AC_SUBST line for
52 dnl it too, or it will never make it into the spec file!
53 dnl
54 dnl ==========================================================================
56 ATK_MAJOR_VERSION=atk_major_version
57 ATK_MINOR_VERSION=atk_minor_version
58 ATK_MICRO_VERSION=atk_micro_version
59 ATK_VERSION=atk_version
60 ATK_API_VERSION=atk_api_version
61 ATK_INTERFACE_AGE=atk_interface_age
62 ATK_BINARY_AGE=atk_binary_age
64 AC_SUBST(ATK_MAJOR_VERSION)
65 AC_SUBST(ATK_MINOR_VERSION)
66 AC_SUBST(ATK_VERSION)
67 AC_SUBST(ATK_API_VERSION)
68 AC_SUBST(ATK_MICRO_VERSION)
69 AC_SUBST(ATK_INTERFACE_AGE)
70 AC_SUBST(ATK_BINARY_AGE)
72 dnl libtool versioning
73 LT_VERSION_INFO=lt_version_info
74 LT_CURRENT_MINUS_AGE=lt_current_minus_age
75 AC_SUBST(LT_VERSION_INFO)
76 AC_SUBST(LT_CURRENT_MINUS_AGE)
78 dnl ==========================================================================
80 GETTEXT_PACKAGE=atk10
81 AC_SUBST(GETTEXT_PACKAGE)
82 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, ["$GETTEXT_PACKAGE"],
83   [Define the gettext package to be used])
85 AC_PROG_CC
86 AM_DISABLE_STATIC
87 AC_LIBTOOL_WIN32_DLL
88 AM_PROG_LIBTOOL
90 AC_MSG_CHECKING([for some Win32 platform])
91 case "$host" in
92   *-*-mingw*|*-*-cygwin*)
93     platform_win32=yes
94     ;;
95   *)
96     platform_win32=no
97     ;;
98 esac
99 AC_MSG_RESULT([$platform_win32])
100 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
102 AC_MSG_CHECKING([for native Win32 platform])
103 case "$host" in
104   *-*-mingw*)
105     atk_native_win32=yes
106     ;;
107   *)
108     atk_native_win32=no
109     ;;
110 esac
111 AC_MSG_RESULT([$atk_native_win32])
112 AM_CONDITIONAL(OS_WIN32, test "$atk_native_win32" = "yes")
114 if test "$atk_native_win32" = "yes"; then
115   AC_CHECK_TOOL(WINDRES, windres, no)
116   if test "$WINDRES" = no; then
117     AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
118   fi
119   AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
122 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
124 dnl Cache $ACLOCAL_FLAGS
125 AC_CACHE_CHECK([for aclocal flags], ac_cv_atk_aclocal_flags,[
126    ac_cv_atk_aclocal_flags="$ACLOCAL_FLAGS"
128 ACLOCAL="$ACLOCAL $ac_cv_atk_aclocal_flags"
130 AC_ARG_ENABLE(rebuilds,
131               [AC_HELP_STRING([--disable-rebuilds],
132                               [disable all source autogeneration rules])],,
133               [enable_rebuilds=yes])
135 changequote(,)dnl
136 if test "x$GCC" = "xyes"; then
137   case " $CFLAGS " in
138   *[\ \ ]-Wall[\ \      ]*) ;;
139   *) CFLAGS="$CFLAGS -Wall" ;;
140   esac
142 changequote([,])dnl
144 AM_PATH_GLIB_2_0(2.5.7,have_no_export=true,have_no_export=false)
145 if test "x$have_no_export" = "xtrue"; then
146    GLIB_REQUIRED_VERSION=2.5.7
147    glib_no_export_package="gmodule-no-export-2.0"
148 else
149    GLIB_REQUIRED_VERSION=2.0.0
150    glib_no_export_package=
152 GLIB_PACKAGES="gobject-2.0 $glib_no_export_package"
153 AC_SUBST(GLIB_PACKAGES)
154 AC_SUBST(GLIB_REQUIRED_VERSION)
156 dnl This PATH_GLIB is somewhat redundant, but does a sanity compile and 
157 dnl importantly defines the GLIB_GENMARSHAL variable for subst into the
158 dnl Makefile
159 AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :,
160   AC_MSG_ERROR([
161 *** GLIB $GLIB_REQUIRED_VERSION or better is required. The latest version of 
162 *** GLIB is always available from ftp://ftp.gtk.org/. If GLIB is installed
163 *** but not in the same location as pkg-config add the location of the file 
164 *** glib-2.0.pc to the environment variable PKG_CONFIG_PATH.]),
165   gobject gmodule-no-export)
167 PKG_CHECK_MODULES(DEP, glib-2.0 >= $GLIB_REQUIRED_VERSION $GLIB_PACKAGES, ,
168   AC_MSG_ERROR([
169         *** GLib not found. You can find it on ftp://ftp.gtk.org
170         *** Errors follow:
171             $DEP_PKG_ERRORS]))
173 # Rerun PKG_CONFIG to add gthread-2.0 cflags, but not libs
174 DEP_CFLAGS=`$PKG_CONFIG --cflags $GLIB_PACKAGES gthread-2.0`
176 ALL_LINGUAS="af am ar as az be be@latin bg bn bn_IN bs ca cs cy da de dz el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu id is it ja ka kn ko ku li lt lv mk ml mn mr ms nb ne nl nn or pa pl pt pt_BR ro ru rw sk sl sq sr sr@Latn sr@ije sv ta te th tk tr tt ug uk vi wa xh yi zh_CN zh_HK zh_TW"
177 AM_GLIB_GNU_GETTEXT
179 AC_CHECK_FUNCS(bind_textdomain_codeset)
181 GNOME_DOC_INIT
182 GTK_DOC_CHECK([1.0])
184 # define a MAINT-like variable REBUILD which is set if Perl
185 # and awk are found, so autogenerated sources can be rebuilt
187 AC_PROG_AWK
188 AC_CHECK_PROGS(PERL, perl5 perl)
190 REBUILD=\#
191 if test "x$enable_rebuilds" = "xyes" && \
192         test -n "$PERL" && \
193         $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
194      test -n "$AWK" ; then
195   REBUILD=
197 AC_SUBST(REBUILD)
199 AC_CONFIG_FILES([
200 Makefile
201 po/Makefile.in
202 atk.pc
203 atk-uninstalled.pc
204 atk/Makefile
205 atk/atk.rc
206 tests/Makefile
207 docs/Makefile
208 docs/version.xml
209 atk.spec
210 atk-zip.sh
213 AC_OUTPUT