Add intltool
[platform/core/uifw/at-spi2-atk.git] / configure.ac
1
2 AC_INIT([at-spi], [1.9.0], [accessibility-atspi@lists.linux-foundation.org])
3
4 AT_SPI_MAJOR_VERSION=1
5 AT_SPI_MINOR_VERSION=23
6 AT_SPI_MICRO_VERSION=3
7 AT_SPI_INTERFACE_AGE=0
8 AT_SPI_BINARY_AGE=0
9 AT_SPI_VERSION="$AT_SPI_MAJOR_VERSION.$AT_SPI_MINOR_VERSION.$AT_SPI_MICRO_VERSION"
10 AC_SUBST(AT_SPI_MAJOR_VERSION)
11 AC_SUBST(AT_SPI_MINOR_VERSION)
12 AC_SUBST(AT_SPI_MICRO_VERSION)
13 AC_SUBST(AT_SPI_INTERFACE_AGE)
14 AC_SUBST(AT_SPI_BINARY_AGE)
15
16 # libtool versioning
17 LT_RELEASE=$AT_SPI_MAJOR_VERSION.$AT_SPI_MINOR_VERSION
18 LT_CURRENT=10
19 LT_REVISION=11
20 LT_AGE=10
21 LT_VERSION_INFO='-version-info ${LT_CURRENT}:${LT_REVISION}:${LT_AGE}'
22 AC_SUBST(LT_VERSION_INFO)
23 AC_SUBST(LT_RELEASE)
24 AC_SUBST(LT_CURRENT)
25 AC_SUBST(LT_REVISION)
26 AC_SUBST(LT_AGE)
27
28 AM_INIT_AUTOMAKE([-Wall foreign])
29
30 dnl translation of any at-spi strings: used only for .server
31 IT_PROG_INTLTOOL([0.35.0])
32
33 AC_PROG_CC
34 AM_PATH_PYTHON(2.4)
35 AM_DISABLE_STATIC
36 AM_PROG_LIBTOOL
37 PKG_PROG_PKG_CONFIG
38
39 GETTEXT_PACKAGE="${PACKAGE}"
40 AC_SUBST(GETTEXT_PACKAGE)
41 dnl internationalization support; uncomment if translatable strings are reintroduced
42 AM_GLIB_GNU_GETTEXT
43
44 # AM_GLIB_GNU_GETTEXT above subst. $DATADIRNAME
45 # this is the directory where the *.{mo,gmo} files are installed
46 localedir='${prefix}/${DATADIRNAME}/locale'
47 AC_SUBST(localedir)
48
49 AC_CONFIG_HEADERS([config.h])
50
51 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0])
52 AC_SUBST(DBUS_LIBS)
53 AC_SUBST(DBUS_CFLAGS)
54
55 PKG_CHECK_MODULES(GLIB, [glib-2.0])
56 AC_SUBST(GLIB_LIBS)
57 AC_SUBST(GLIB_CFLAGS)
58
59 PKG_CHECK_MODULES(DBUS_GLIB, [dbus-glib-1 >= 0.7.0])
60 AC_SUBST(DBUS_GLIB_LIBS)
61 AC_SUBST(DBUS_GLIB_CFLAGS)
62
63 PKG_CHECK_MODULES(LIB_XML, [libxml-2.0 >= 2.0.0])
64 AC_SUBST(LIB_XML_LIBS)
65 AC_SUBST(LIB_XML_CFLAGS)
66
67 PKG_CHECK_MODULES(GOBJ, [gobject-2.0 >= 2.0.0])
68 AC_SUBST(GOBJ_LIBS)
69 AC_SUBST(GOBJ_CFLAGS)
70
71 PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.0.0])      
72 AC_SUBST(GMODULE_LIBS)
73 AC_SUBST(GMODULE_CFLAGS)
74
75 PKG_CHECK_MODULES(ATK, [atk >= 1.17.0])
76 AC_SUBST(ATK_LIBS)
77 AC_SUBST(ATK_CFLAGS)
78
79 PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.10.0])
80 AC_SUBST(GTK_LIBS)
81 AC_SUBST(GTK_CFLAGS)
82
83 PKG_CHECK_MODULES(GDK, [gdk-2.0 >= 2.0.0])
84 AC_SUBST(GDK_LIBS)
85 AC_SUBST(GDK_CFLAGS)
86
87 PKG_CHECK_MODULES(GAIL, [gail >= 1.9.0])        
88 AC_SUBST(GAIL_LIBS)
89 AC_SUBST(GAIL_CFLAGS)
90
91 AC_PATH_XTRA
92
93 if test x$no_x = xyes ; then
94         AC_MSG_ERROR([X development libraries not found])
95 else
96         X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
97 fi
98 AC_SUBST(X_LIBS)
99
100 #LIBS="$LIBS $X_LIBS"
101 AC_CHECK_LIB(Xtst, XTestFakeKeyEvent, XTST_LIBS=-lXtst,[
102         AC_MSG_ERROR([Couldn't find the Xtst library. Check config.log])],
103         -lX11 -lXext)
104 AC_SUBST(XTST_LIBS)
105
106 have_xkb=
107 AC_CHECK_LIB(X11, XkbQueryExtension, have_xkb="maybe")
108 if test "x$have_xkb" = "xmaybe"; then 
109         AC_CHECK_HEADER(X11/XKBlib.h, have_xkb=yes)
110 fi
111 if test "x$have_xkb" = "xyes"; then
112         AC_MSG_RESULT(yes)
113         AC_DEFINE([HAVE_XKB], [], Xkb is present)
114 fi
115
116 have_xinput=
117 AC_CHECK_LIB(Xi, XOpenDevice, XINPUT_LIBS=-lXi,,-lXext)
118 if test "x$XINPUT_LIBS" = x; then
119         AC_MSG_ERROR(Couldn't find the XInput library. Check config.log for details)
120 fi                             
121 AC_CHECK_HEADER(X11/extensions/XInput.h, have_xinput=yes)
122 AC_SUBST(XINPUT_LIBS)
123
124 AC_ARG_ENABLE(xevie, [--enable-xevie  Build with XEViE support [default=yes]], enable_xevie="$enableval", enable_xevie=yes)
125
126 if test x$enable_xevie = xyes ; then
127         have_xevie=
128         AC_CHECK_LIB(Xext, XevieStart, have_xevie="yes")
129
130         if test "x$have_xevie" = "xyes"; then
131                 XEVIE_LIBS="-lXext"
132                 AC_DEFINE([HAVE_XEVIE], [], Xevie is present)
133         else
134            AC_CHECK_LIB(Xevie, XevieQueryVersion, have_xevie="maybe",,-lXevie -lXext)
135            if test "x$have_xevie" = "xmaybe"; then
136               AC_CHECK_HEADER(X11/extensions/Xevie.h, have_xevie=yes, [], [#include <X11/Xlib.h>])
137               if test "x$have_xevie" = "xyes"; then
138                       XEVIE_LIBS="-lXext -lXevie"              
139                       AC_DEFINE([HAVE_XEVIE], [], Xevie is present)
140               fi
141            fi   
142         fi
143         AC_SUBST(XEVIE_LIBS)
144 fi
145
146 AC_ARG_VAR([DEFAULT_ATSPI_INTROSPECTION_PATH],
147            [Set the default path for the install ofDBus introspection XML
148             relative to the pkgdatadir.])
149 if test -z "$DEFAULT_ATSPI_INTROSPECTION_PATH"; then
150           DEFAULT_ATSPI_INTROSPECTION_PATH=dbus
151 fi
152
153 AC_ARG_VAR([GTK_MODULE_DIR],
154            [Where to place the atk-adaptor gtk module])
155 if test -z "$GTK_MODULE_DIR"; then
156           GTK_MODULE_DIR=gtk-2.0/modules
157 fi
158
159 dnl find sizes & alignments
160 orig_CPPFLAGS=$CPPFLAGS
161 CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS"
162 DBIND_CHECK_ALIGNOF(char)
163 DBIND_CHECK_ALIGNOF(dbus_bool_t)
164 DBIND_CHECK_ALIGNOF(dbus_int16_t)
165 DBIND_CHECK_ALIGNOF(dbus_int32_t)
166 DBIND_CHECK_ALIGNOF(dbus_int64_t)
167 DBIND_CHECK_ALIGNOF(double)
168 DBIND_CHECK_ALIGNOF(dbind_pointer)
169 DBIND_CHECK_ALIGNOF(dbind_struct)
170 CPPFLAGS=$orig_CPPFLAGS 
171
172 #libtool option to strip symbols starting with cspi
173 #
174 LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^cspi]].*"'
175 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
176
177 AC_CONFIG_FILES([Makefile
178                  po/Makefile.in
179                  libspi-1.0.pc
180                  libspi-1.0-uninstalled.pc
181                  libloginhelper-1.0.pc
182                  cspi-1.0.pc
183                  cspi-1.0-uninstalled.pc
184                  xml/Makefile
185                  tests/Makefile
186                  tools/Makefile
187                  droute/Makefile
188                  spi-common/Makefile
189                  registryd/Makefile
190                  atk-adaptor/Makefile
191                  login-helper/Makefile
192                  tests/dummyatk/Makefile
193                  tests/cspi/Makefile
194                  tests/pyatspi/Makefile
195                  tests/apps/Makefile
196                  dbind/Makefile
197                  cspi/Makefile
198                  dbind-config.h])
199
200 AC_OUTPUT