1 AC_INIT([at-spi2-core], [2.1.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])
26 LT_INIT([disable-static])
29 AC_CONFIG_HEADERS([config.h])
31 dnl translation of at-spi strings
32 IT_PROG_INTLTOOL([0.40.0])
35 GETTEXT_PACKAGE="${PACKAGE}"
36 AC_SUBST(GETTEXT_PACKAGE)
38 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0])
42 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.26.0])
45 AC_CHECK_LIB([glib-2.0], [g_ptr_array_new_with_free_func], [],
46 [AC_MSG_ERROR([The version of glib-2.0 found does not define ]
47 [g_ptr_array_new_with_free_func. Please upgrade glib.])],
50 PKG_CHECK_MODULES(GIO, [gio-2.0 >= 2.26.0])
54 PKG_CHECK_MODULES(GOBJ, [gobject-2.0 >= 2.0.0])
58 PKG_CHECK_MODULES(GIO, [gio-2.0 >= 2.28])
62 # --------------------------------------------------------------------
63 # Find DL functionality
65 AC_CHECK_LIB(c, dlopen, DL_LIBS="",
66 AC_CHECK_LIB(dl, dlopen, DL_LIBS="-ldl",
67 AC_MSG_ERROR([Could not find a library with the dlopen function])
75 if test x$no_x = xyes ; then
76 AC_MSG_ERROR([X development libraries not found])
78 X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
84 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
85 AC_CHECK_LIB(Xtst, XTestFakeKeyEvent, XTST_LIBS=-lXtst,[
86 AC_MSG_ERROR([Couldn't find the Xtst library. Check config.log])],
89 LIBS="$LIBS $save_LIBS"
93 AC_CHECK_LIB(X11, XkbQueryExtension, have_xkb="maybe", have_xkb="no", $X_LIBS)
94 if test "x$have_xkb" = "xmaybe"; then
95 AC_CHECK_HEADER([X11/XKBlib.h], have_xkb=yes)
97 if test "x$have_xkb" = "xyes"; then
98 AC_DEFINE([HAVE_XKB], [], [Xkb is present])
100 LIBS="$LIBS $save_LIBS"
104 AC_CHECK_LIB(Xi, XOpenDevice, have_xinput="maybe", have_xinput="no", $X_LIBS)
105 if test "x$have_xinput" = "xmaybe"; then
108 AC_CHECK_HEADER([X11/extensions/XInput.h], [have_xinput="yes"])
111 if test "x$have_xinput" != "xyes"; then
112 AC_MSG_ERROR([Couldn't find the XInput library. Check config.log for details])
115 AC_SUBST(XINPUT_LIBS)
116 LIBS="$LIBS $save_LIBS"
121 [AS_HELP_STRING([--enable-xevie],
122 [Build with XEViE support [default=yes]])],
123 enable_xevie="$enableval", enable_xevie=yes)
125 if test x$enable_xevie = xyes ; then
127 AC_CHECK_LIB(Xext, XevieStart, have_xevie="yes", have_xevie="no", $X_LIBS)
129 if test "x$have_xevie" = "xyes"; then
131 AC_DEFINE([HAVE_XEVIE], [], [Xevie is present])
133 AC_CHECK_LIB(Xevie, XevieQueryVersion, have_xevie="maybe",,$X_LIBS)
134 if test "x$have_xevie" = "xmaybe"; then
135 AC_CHECK_HEADER(X11/extensions/Xevie.h, have_xevie=yes, [],
136 [[#include <X11/Xlib.h>
138 if test "x$have_xevie" = "xyes"; then
139 XEVIE_LIBS="-lXext -lXevie"
140 AC_DEFINE([HAVE_XEVIE], [], [Xevie is present])
146 LIBS="$LIBS $save_LIBS"
148 AC_ARG_WITH([dbus_daemondir],
149 [AS_HELP_STRING([--with-dbus-daemondir=<directory>],
150 [Directory where the DBUS daemon is installed])],
151 [DBUS_DAEMON="$with_dbus_daemondir/dbus-daemon"],
152 [AC_PATH_PROG([DBUS_DAEMON], [dbus-daemon], [XXXDBUSDAEMONNOTFOUND],
153 [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR]dnl
154 [/libexec$PATH_SEPARATOR/usr/libexec$PATH_SEPARATOR/usr/local/bin]dnl
155 [$PATH_SEPARATOR/usr/pkg/bin])]
157 if test "$DBUS_DAEMON" = "XXXDBUSDAEMONNOTFOUND"; then
158 DBUS_DAEMON = "$bindir/dbus-daemon"
159 AC_MSG_WARN([at-spi2 relies on dbus, and the dbus-daemon was not found])
160 AC_MSG_WARN([we assume that it will be installed in "$bindir"])
162 AC_SUBST(DBUS_DAEMON)
164 AC_ARG_WITH(dbus-services,
165 [AS_HELP_STRING([--with-dbus-services=<directory>],
166 [where D-BUS services directory is])])
167 if ! test -z "$with_dbus_services" ; then
168 DBUS_SERVICES_DIR="$with_dbus_services"
170 DBUS_SERVICES_DIR="$datadir/dbus-1/services"
172 AC_SUBST(DBUS_SERVICES_DIR)
174 GOBJECT_INTROSPECTION_CHECK([0.9.6])
176 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
178 dnl find sizes & alignments
179 orig_CPPFLAGS=$CPPFLAGS
180 CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS"
181 DBIND_CHECK_ALIGNOF(char)
182 DBIND_CHECK_ALIGNOF(dbus_bool_t)
183 DBIND_CHECK_ALIGNOF(dbus_int16_t)
184 DBIND_CHECK_ALIGNOF(dbus_int32_t)
185 DBIND_CHECK_ALIGNOF(dbus_int64_t)
186 DBIND_CHECK_ALIGNOF(double)
187 DBIND_CHECK_ALIGNOF(dbind_pointer)
188 DBIND_CHECK_ALIGNOF(dbind_struct)
190 GTK_DOC_CHECK([1.09])
192 CPPFLAGS=$orig_CPPFLAGS
193 AC_CONFIG_FILES([Makefile po/Makefile.in
201 doc/libatspi/Makefile
203 atspi-2-uninstalled.pc