1 AC_INIT([at-spi2-core], [2.9.3], [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])
31 LT_INIT([disable-static])
34 AC_CONFIG_HEADERS([config.h])
36 dnl translation of at-spi strings
37 IT_PROG_INTLTOOL([0.40.0])
40 GETTEXT_PACKAGE="${PACKAGE}"
41 AC_SUBST(GETTEXT_PACKAGE)
43 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0])
47 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.26.0])
50 AC_CHECK_LIB([glib-2.0], [g_ptr_array_new_with_free_func], [:],
51 [AC_MSG_ERROR([The version of glib-2.0 found does not define ]
52 [g_ptr_array_new_with_free_func. Please upgrade glib.])],
55 PKG_CHECK_MODULES(GOBJ, [gobject-2.0 >= 2.0.0])
59 PKG_CHECK_MODULES(GIO, [gio-2.0 >= 2.28])
63 # --------------------------------------------------------------------
64 # Find DL functionality
66 AC_CHECK_LIB(c, dlopen, DL_LIBS="",
67 AC_CHECK_LIB(dl, dlopen, DL_LIBS="-ldl",
68 AC_MSG_ERROR([Could not find a library with the dlopen function])
76 if test x$no_x = xyes ; then
77 AC_MSG_ERROR([X development libraries not found])
79 X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
85 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
86 AC_CHECK_LIB(Xtst, XTestFakeKeyEvent, XTST_LIBS=-lXtst,[
87 AC_MSG_ERROR([Couldn't find the Xtst library. Check config.log])],
90 LIBS="$LIBS $save_LIBS"
94 AC_CHECK_LIB(X11, XkbQueryExtension, have_xkb="maybe", have_xkb="no", $X_LIBS)
95 if test "x$have_xkb" = "xmaybe"; then
96 AC_CHECK_HEADER([X11/XKBlib.h], have_xkb=yes)
98 if test "x$have_xkb" = "xyes"; then
99 AC_DEFINE([HAVE_XKB], [], [Xkb is present])
101 LIBS="$LIBS $save_LIBS"
105 AC_CHECK_LIB(Xi, XOpenDevice, have_xinput="maybe", have_xinput="no", $X_LIBS)
106 if test "x$have_xinput" = "xmaybe"; then
109 AC_CHECK_HEADER([X11/extensions/XInput.h], [have_xinput="yes"])
112 if test "x$have_xinput" != "xyes"; then
113 AC_MSG_ERROR([Couldn't find the XInput library. Check config.log for details])
116 AC_SUBST(XINPUT_LIBS)
117 LIBS="$LIBS $save_LIBS"
122 [AS_HELP_STRING([--enable-xevie],
123 [Build with XEViE support [default=yes]])],
124 enable_xevie="$enableval", enable_xevie=yes)
126 if test x$enable_xevie = xyes ; then
128 AC_CHECK_LIB(Xext, XevieStart, have_xevie="yes", have_xevie="no", $X_LIBS)
130 if test "x$have_xevie" = "xyes"; then
132 AC_DEFINE([HAVE_XEVIE], [], [Xevie is present])
134 AC_CHECK_LIB(Xevie, XevieQueryVersion, have_xevie="maybe",,$X_LIBS)
135 if test "x$have_xevie" = "xmaybe"; then
136 AC_CHECK_HEADER(X11/extensions/Xevie.h, have_xevie=yes, [],
137 [[#include <X11/Xlib.h>
139 if test "x$have_xevie" = "xyes"; then
140 XEVIE_LIBS="-lXext -lXevie"
141 AC_DEFINE([HAVE_XEVIE], [], [Xevie is present])
147 LIBS="$LIBS $save_LIBS"
149 AC_ARG_WITH([dbus_daemondir],
150 [AS_HELP_STRING([--with-dbus-daemondir=<directory>],
151 [Directory where the DBUS daemon is installed])],
152 [DBUS_DAEMON="$with_dbus_daemondir/dbus-daemon"],
153 [AC_PATH_PROG([DBUS_DAEMON], [dbus-daemon], [XXXDBUSDAEMONNOTFOUND],
154 [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR]dnl
155 [/libexec$PATH_SEPARATOR/usr/libexec$PATH_SEPARATOR/usr/local/bin]dnl
156 [$PATH_SEPARATOR/usr/pkg/bin])]
158 if test "$DBUS_DAEMON" = "XXXDBUSDAEMONNOTFOUND"; then
159 DBUS_DAEMON = "$bindir/dbus-daemon"
160 AC_MSG_WARN([at-spi2 relies on dbus, and the dbus-daemon was not found])
161 AC_MSG_WARN([we assume that it will be installed in "$bindir"])
163 AC_SUBST(DBUS_DAEMON)
165 AC_ARG_WITH(dbus-services,
166 [AS_HELP_STRING([--with-dbus-services=<directory>],
167 [where D-BUS services directory is])])
168 if ! test -z "$with_dbus_services" ; then
169 DBUS_SERVICES_DIR="$with_dbus_services"
171 DBUS_SERVICES_DIR="$datadir/dbus-1/services"
173 AC_SUBST(DBUS_SERVICES_DIR)
175 AC_PATH_PROG(GLIB_MKENUMS, glib-mkenums)
177 GOBJECT_INTROSPECTION_CHECK([0.9.6])
179 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
181 dnl find sizes & alignments
182 orig_CPPFLAGS=$CPPFLAGS
183 CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS"
184 DBIND_CHECK_ALIGNOF(char)
185 DBIND_CHECK_ALIGNOF(dbus_bool_t)
186 DBIND_CHECK_ALIGNOF(dbus_int16_t)
187 DBIND_CHECK_ALIGNOF(dbus_int32_t)
188 DBIND_CHECK_ALIGNOF(dbus_int64_t)
189 DBIND_CHECK_ALIGNOF(double)
190 DBIND_CHECK_ALIGNOF(dbind_pointer)
191 DBIND_CHECK_ALIGNOF(dbind_struct)
193 GTK_DOC_CHECK([1.09])
195 if test "x$GCC" = xyes; then
196 CFLAGS="$CFLAGS -Werror-implicit-function-declaration"
198 CPPFLAGS=$orig_CPPFLAGS
199 AC_CONFIG_FILES([Makefile po/Makefile.in
207 doc/libatspi/Makefile
210 atspi-2-uninstalled.pc