1 AC_INIT([at-spi2-core], [2.21.1], [accessibility-atspi@lists.linux-foundation.org])
3 AC_CONFIG_AUX_DIR(config)
4 AC_CONFIG_MACRO_DIR([m4])
6 AT_SPI_CORE_MAJOR_VERSION=0
7 AT_SPI_CORE_MINOR_VERSION=1
8 AT_SPI_CORE_MICRO_VERSION=3
9 AT_SPI_CORE_VERSION="$AT_SPI_CORE_MAJOR_VERSION.$AT_SPI_CORE_MINOR_VERSION"
10 AC_SUBST(AT_SPI_CORE_VERSION)
12 LT_RELEASE=$AT_SPI_CORE_VERSION
16 LT_VERSION_INFO='-version-info ${LT_CURRENT}:${LT_REVISION}:${LT_AGE}'
17 AC_SUBST(LT_VERSION_INFO)
23 AM_INIT_AUTOMAKE([1.9 -Wall foreign no-dist-gzip dist-xz])
25 # Support silent build rules. Disable
26 # by either passing --disable-silent-rules to configure or passing V=1
28 AM_SILENT_RULES([yes])
32 LT_INIT([disable-static])
35 AC_CONFIG_HEADERS([config.h])
37 dnl translation of at-spi strings
38 IT_PROG_INTLTOOL([0.40.0])
41 GETTEXT_PACKAGE="${PACKAGE}"
42 AC_SUBST(GETTEXT_PACKAGE)
44 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0])
48 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.36.0])
52 PKG_CHECK_MODULES(GOBJ, [gobject-2.0 >= 2.0.0])
56 PKG_CHECK_MODULES(GIO, [gio-2.0 >= 2.28])
60 # --------------------------------------------------------------------
61 # Find DL functionality
63 AC_CHECK_LIB(c, dlopen, DL_LIBS="",
64 AC_CHECK_LIB(dl, dlopen, DL_LIBS="-ldl",
65 AC_MSG_ERROR([Could not find a library with the dlopen function])
74 [AS_HELP_STRING([--disable-x11],
75 [disable the X11 backend])],,
78 if test x$no_x = xyes ; then
79 AC_MSG_WARN([X development libraries not found])
80 AM_CONDITIONAL(USE_X11, false)
81 elif test x$enable_x11 = xauto; then
82 X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
83 AC_DEFINE(HAVE_X11, 1, [Define to use X11])
84 AM_CONDITIONAL(USE_X11, true)
86 AM_CONDITIONAL(USE_X11, false)
93 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
94 AC_CHECK_LIB(Xtst, XTestFakeKeyEvent, XTST_LIBS=-lXtst,[
95 AC_MSG_ERROR([Couldn't find the Xtst library. Check config.log])],
98 LIBS="$LIBS $save_LIBS"
102 AC_CHECK_LIB(X11, XkbQueryExtension, have_xkb="maybe", have_xkb="no", $X_LIBS)
103 if test "x$have_xkb" = "xmaybe"; then
104 AC_CHECK_HEADER([X11/XKBlib.h], have_xkb=yes)
106 if test "x$have_xkb" = "xyes"; then
107 AC_DEFINE([HAVE_XKB], [], [Xkb is present])
109 LIBS="$LIBS $save_LIBS"
113 AC_CHECK_LIB(Xi, XOpenDevice, have_xinput="maybe", have_xinput="no", $X_LIBS)
114 if test "x$have_xinput" = "xmaybe"; then
117 AC_CHECK_HEADER([X11/extensions/XInput.h], [have_xinput="yes"])
120 if test "x$have_xinput" != "xyes"; then
121 AC_MSG_ERROR([Couldn't find the XInput library. Check config.log for details])
124 AC_SUBST(XINPUT_LIBS)
125 LIBS="$LIBS $save_LIBS"
130 [AS_HELP_STRING([--enable-xevie],
131 [Build with XEViE support [default=no]])],
132 enable_xevie="$enableval", enable_xevie=no)
134 if test -z "$backend_set"; then
135 enable_x11_backend=yes
138 if test x$enable_xevie = xyes ; then
140 AC_CHECK_LIB(Xext, XevieStart, have_xevie="yes", have_xevie="no", $X_LIBS)
142 if test "x$have_xevie" = "xyes"; then
144 AC_DEFINE([HAVE_XEVIE], [], [Xevie is present])
146 AC_CHECK_LIB(Xevie, XevieQueryVersion, have_xevie="maybe",,$X_LIBS)
147 if test "x$have_xevie" = "xmaybe"; then
148 AC_CHECK_HEADER(X11/extensions/Xevie.h, have_xevie=yes, [],
149 [[#include <X11/Xlib.h>
151 if test "x$have_xevie" = "xyes"; then
152 XEVIE_LIBS="-lXext -lXevie"
153 AC_DEFINE([HAVE_XEVIE], [], [Xevie is present])
159 LIBS="$LIBS $save_LIBS"
161 AC_ARG_WITH([dbus_daemondir],
162 [AS_HELP_STRING([--with-dbus-daemondir=<directory>],
163 [Directory where the DBUS daemon is installed])],
164 [DBUS_DAEMON="$with_dbus_daemondir/dbus-daemon"],
165 [AC_PATH_PROG([DBUS_DAEMON], [dbus-daemon], [XXXDBUSDAEMONNOTFOUND],
166 [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR]dnl
167 [/libexec$PATH_SEPARATOR/usr/libexec$PATH_SEPARATOR/usr/local/bin]dnl
168 [$PATH_SEPARATOR/usr/pkg/bin])]
170 if test "$DBUS_DAEMON" = "XXXDBUSDAEMONNOTFOUND"; then
171 DBUS_DAEMON = "$bindir/dbus-daemon"
172 AC_MSG_WARN([at-spi2 relies on dbus, and the dbus-daemon was not found])
173 AC_MSG_WARN([we assume that it will be installed in "$bindir"])
175 AC_SUBST(DBUS_DAEMON)
177 AC_ARG_WITH(dbus-services,
178 [AS_HELP_STRING([--with-dbus-services=<directory>],
179 [where D-BUS services directory is])])
180 if ! test -z "$with_dbus_services" ; then
181 DBUS_SERVICES_DIR="$with_dbus_services"
183 DBUS_SERVICES_DIR="$datadir/dbus-1/services"
185 AC_SUBST(DBUS_SERVICES_DIR)
187 AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
189 GOBJECT_INTROSPECTION_CHECK([0.9.6])
191 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
193 dnl find sizes & alignments
194 orig_CPPFLAGS=$CPPFLAGS
195 CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS"
196 AC_CHECK_ALIGNOF(char)
197 AC_CHECK_ALIGNOF(dbus_bool_t, [#include <dbus/dbus.h>])
198 AC_CHECK_ALIGNOF(dbus_int16_t, [#include <dbus/dbus.h>])
199 AC_CHECK_ALIGNOF(dbus_int32_t, [#include <dbus/dbus.h>])
200 AC_CHECK_ALIGNOF(dbus_int64_t, [#include <dbus/dbus.h>])
201 AC_CHECK_ALIGNOF(double, [#include <dbus/dbus.h>])
202 AC_CHECK_ALIGNOF(dbind_pointer, [AC_INCLUDES_DEFAULT
203 typedef void *dbind_pointer;])
204 AC_CHECK_ALIGNOF(dbind_struct, [AC_INCLUDES_DEFAULT
205 typedef struct {char s1;} dbind_struct;])
207 GTK_DOC_CHECK([1.09])
209 if test "x$GCC" = xyes; then
210 CFLAGS="$CFLAGS -Werror-implicit-function-declaration"
212 CPPFLAGS=$orig_CPPFLAGS
213 AC_CONFIG_FILES([Makefile po/Makefile.in
220 doc/libatspi/Makefile
221 doc/libatspi/version.xml
224 atspi-2-uninstalled.pc