Added atk-bridge/bridge.c to POTFILES.skip, and commented configure.in,
[platform/upstream/at-spi2-core.git] / configure.in
1 AC_INIT(idl/Accessibility.idl)
2
3 AT_SPI_MAJOR_VERSION=1
4 AT_SPI_MINOR_VERSION=4
5 AT_SPI_MICRO_VERSION=0
6 AT_SPI_INTERFACE_AGE=0
7 AT_SPI_BINARY_AGE=0
8 AT_SPI_VERSION="$AT_SPI_MAJOR_VERSION.$AT_SPI_MINOR_VERSION.$AT_SPI_MICRO_VERSION"
9 AM_INIT_AUTOMAKE(at-spi, $AT_SPI_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=9
19 LT_REVISION=14
20 LT_AGE=9
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 dnl Specify a header configuration file
29 AM_CONFIG_HEADER(config.h)
30
31 dnl Initialize maintainer mode
32 AM_MAINTAINER_MODE
33
34 AC_PROG_INTLTOOL
35
36 dnl Checks for programs
37 AC_PROG_CC
38 AC_PROG_INSTALL
39 AC_ISC_POSIX
40
41 GNOME_COMMON_INIT
42 GNOME_PLATFORM_GNOME_2(yes, force)
43 GNOME_COMPILE_WARNINGS(maximum)
44
45 dnl Initialize libtool
46 AM_DISABLE_STATIC
47 AM_PROG_LIBTOOL
48
49 dnl internationalization support; uncomment if translatable strings are reintroduced
50 dnl ALL_LINGUAS="ar az be bn ca cs cy da de el en_GB eo es et eu fa fi fr he hi hr id is it ja ko lt mn ms ne nl nn no pa pl pt_BR pt ro ru sk sl sq sr@ije sr@Latn sr sv uk vi zh_CN"
51 dnl AM_GLIB_GNU_GETTEXT
52
53 GTK_DOC_CHECK ([1.0])
54
55 dnl NOTE: We need to use a separate automake conditional for this
56 dnl       to make this work with the tarballs.
57 AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
58
59 AC_PATH_XTRA
60
61 if test x$no_x = xyes ; then
62   AC_MSG_ERROR([X development libraries not found])
63 else
64   X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
65 fi
66
67 AC_SUBST(X_LIBS)
68
69 dnl Check for obsolete (mis-numbered) versions of at-spi
70 dnl oldlibs=`echo $(libdir)/libspi.so.1.*`
71 dnl if test $$oldlibs != "$(libdir)/libspi.so.1.*" ; then
72 dnl   AC_MSG_ERROR(Old libspi.1.x library found in $libdir. Please remove $(libdir)/libspi.so.1 and $$oldlibs)
73 dnl fi
74
75 dnl Checks for libraries
76 PKG_CHECK_MODULES(LIBSPI, \
77         libbonobo-2.0 >= 1.107.0 \
78         atk >= 1.3.4 \
79         gtk+-2.0 > 2.0.0 \
80         gail >= 1.3.0)
81 AC_SUBST(LIBSPI_LIBS)
82 AC_SUBST(LIBSPI_CFLAGS)
83
84 PKG_CHECK_MODULES(REGISTRYD, \
85         libbonobo-2.0 >= 1.107.0 \
86         gtk+-2.0 > 2.0.0 \
87         atk >= 1.3.4)
88 AC_SUBST(REGISTRYD_LIBS)
89 AC_SUBST(REGISTRYD_CFLAGS)
90
91 PKG_CHECK_MODULES(TESTS, \
92         libbonobo-2.0 >= 1.107.0 \
93         atk >= 1.3.4 \
94         gtk+-2.0 > 2.0.0 \
95         gail >= 1.3.0)
96 AC_SUBST(TESTS_LIBS)
97 AC_SUBST(TESTS_CFLAGS)
98
99 PKG_CHECK_MODULES(ATK_BRIDGE, \
100         libbonobo-2.0 >= 1.107.0 \
101         atk >= 1.3.4)
102 AC_SUBST(ATK_BRIDGE_LIBS)
103 AC_SUBST(ATK_BRIDGE_CFLAGS)
104
105 PKG_CHECK_MODULES(LIBCSPI, \
106         libbonobo-2.0 >= 1.107.0 \
107         atk >= 1.3.4)
108 AC_SUBST(LIBCSPI_LIBS)
109 AC_SUBST(LIBCSPI_CFLAGS)
110
111 dnl orbit-idl.
112 ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
113 AC_SUBST(ORBIT_IDL)
114
115 dnl Bonobo and Bonobo-Activation idl files
116 BONOBO_ACTIVATION_IDL_DIR="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
117 LIBBONOBO_IDL_DIR="`$PKG_CONFIG --variable=idldir libbonobo-2.0`"
118 AC_SUBST(BONOBO_ACTIVATION_IDL_DIR)
119 AC_SUBST(LIBBONOBO_IDL_DIR)
120
121 CFLAGS="$CFLAGS $X_LIBS"
122 dnl path to Xtst
123 AC_CHECK_LIB(Xtst, XTestFakeKeyEvent, XTST_LIBS=-lXtst,[
124         AC_MSG_ERROR([Couldn't find the Xtst library. Check config.log])],
125         -lX11 -lXext)
126 AC_SUBST(XTST_LIBS)
127
128 have_xkb=
129 AC_CHECK_LIB(X11, XkbQueryExtension, have_xkb="maybe")
130 if test "x$have_xkb" = "xmaybe"; then 
131   AC_CHECK_HEADER(X11/XKBlib.h, have_xkb=yes)
132 fi
133 if test "x$have_xkb" = "xyes"; then
134   AC_MSG_RESULT(yes)
135   AC_DEFINE(HAVE_XKB)
136 fi
137
138 have_xinput=
139 AC_CHECK_LIB(Xi, XOpenDevice, XINPUT_LIBS=-lXi)
140 if test "x$XINPUT_LIBS" = x; then
141   AC_MSG_ERROR(Couldn't find the XInput library. Check config.log for details)
142 fi                             
143 AC_CHECK_HEADER(X11/extensions/XInput.h, have_xinput=yes)
144 AC_SUBST(XINPUT_LIBS)
145
146 dnl Allow disabling XEViE.
147 AC_ARG_ENABLE(xevie, [  --enable-xevie  Build with XEViE support [default=yes]], enable_xevie="$enableval", enable_xevie=yes)
148
149 if test x$enable_xevie = xyes ; then
150   have_xevie=
151     AC_CHECK_LIB(Xext, XevieQueryVersion, have_xevie="yes")
152
153   if test "x$have_xevie" = "xyes"; then
154     XEVIE_LIBS=-lXext
155     AC_DEFINE(HAVE_XEVIE)
156   fi
157   AC_SUBST(XEVIE_LIBS)
158 fi
159
160 dnl CFLAGS="$CFLAGS -Wall"
161 AC_SUBST(CFLAGS)
162 AC_SUBST(CPPFLAGS)
163 AC_SUBST(LDFLAGS)
164
165 AC_CHECK_LIB(popt, poptGetContext, [POPT_LIBS="-lpopt"],
166 AC_MSG_ERROR([popt is required to build at-spi.
167 You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/]))
168 AC_SUBST(POPT_LIBS)
169 AC_MSG_CHECKING([for POPT_ARG_FLOAT in popt.h])
170 AC_TRY_CPP([#include <popt.h>
171 #ifndef POPT_ARG_FLOAT
172 #error popt too old
173 #endif], AC_MSG_RESULT(yes), [
174   AC_MSG_RESULT(no)
175   AC_MSG_ERROR([A newer version of popt is required to build at-spi.
176 You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/])
177 ])
178
179 REBUILD=\#
180 if test "x$enable_rebuilds" = "xyes" && \
181         test -n "$PERL" && \
182         $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
183      test -n "$AWK" ; then
184   REBUILD=
185 fi
186 AC_SUBST(REBUILD)
187
188 AC_OUTPUT([
189 Makefile
190 libspi-1.0.pc
191 libspi-1.0-uninstalled.pc
192 cspi-1.0.pc
193 cspi-1.0-uninstalled.pc
194 docs/Makefile
195 docs/reference/Makefile
196 docs/reference/cspi/Makefile
197 idl/Makefile
198 libspi/Makefile
199 registryd/Makefile
200 atk-bridge/Makefile
201 test/Makefile
202 cspi/Makefile
203 cspi/bonobo/Makefile
204 ])
205
206 echo "AT-SPI setup:
207
208         Source code location:   ${srcdir}
209         Compiler:               ${CC} 
210         Prefix:                 ${prefix}
211
212         Welcome to the wonderful world of Accessibility.
213            http://developer.gnome.org/projects/gap/
214 "