1 AC_INIT([at-spi2-core], [1.91.5], [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(DBUS_GLIB, [dbus-glib-1 >= 0.7.0])
51 AC_SUBST(DBUS_GLIB_LIBS)
52 AC_SUBST(DBUS_GLIB_CFLAGS)
54 PKG_CHECK_MODULES(GOBJ, [gobject-2.0 >= 2.0.0])
58 # --------------------------------------------------------------------
59 # Find DL functionality
61 AC_CHECK_LIB(c, dlopen, DL_LIBS="",
62 AC_CHECK_LIB(dl, dlopen, DL_LIBS="-ldl",
63 AC_MSG_ERROR([Could not find a library with the dlopen function])
71 if test x$no_x = xyes ; then
72 AC_MSG_ERROR([X development libraries not found])
74 X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
80 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
81 AC_CHECK_LIB(Xtst, XTestFakeKeyEvent, XTST_LIBS=-lXtst,[
82 AC_MSG_ERROR([Couldn't find the Xtst library. Check config.log])],
85 LIBS="$LIBS $save_LIBS"
89 AC_CHECK_LIB(X11, XkbQueryExtension, have_xkb="maybe", have_xkb="no", $X_LIBS)
90 if test "x$have_xkb" = "xmaybe"; then
91 AC_CHECK_HEADER([X11/XKBlib.h], have_xkb=yes)
93 if test "x$have_xkb" = "xyes"; then
94 AC_DEFINE([HAVE_XKB], [], [Xkb is present])
96 LIBS="$LIBS $save_LIBS"
100 AC_CHECK_LIB(Xi, XOpenDevice, have_xinput="maybe", have_xinput="no", $X_LIBS)
101 if test "x$have_xinput" = "xmaybe"; then
104 AC_CHECK_HEADER([X11/extensions/XInput.h], [have_xinput="yes"])
107 if test "x$have_xinput" != "xyes"; then
108 AC_MSG_ERROR([Couldn't find the XInput library. Check config.log for details])
111 AC_SUBST(XINPUT_LIBS)
112 LIBS="$LIBS $save_LIBS"
117 [AS_HELP_STRING([--enable-xevie],
118 [Build with XEViE support [default=yes]])],
119 enable_xevie="$enableval", enable_xevie=yes)
121 if test x$enable_xevie = xyes ; then
123 AC_CHECK_LIB(Xext, XevieStart, have_xevie="yes", have_xevie="no", $X_LIBS)
125 if test "x$have_xevie" = "xyes"; then
127 AC_DEFINE([HAVE_XEVIE], [], [Xevie is present])
129 AC_CHECK_LIB(Xevie, XevieQueryVersion, have_xevie="maybe",,$X_LIBS)
130 if test "x$have_xevie" = "xmaybe"; then
131 AC_CHECK_HEADER(X11/extensions/Xevie.h, have_xevie=yes, [],
132 [[#include <X11/Xlib.h>
134 if test "x$have_xevie" = "xyes"; then
135 XEVIE_LIBS="-lXext -lXevie"
136 AC_DEFINE([HAVE_XEVIE], [], [Xevie is present])
142 LIBS="$LIBS $save_LIBS"
144 AC_ARG_WITH([dbus_daemondir],
145 [AS_HELP_STRING([--with-dbus-daemondir=<directory>],
146 [Directory where the DBUS daemon is installed])],
147 [DBUS_DAEMON="$with_dbus_daemondir/dbus-daemon"],
148 [AC_PATH_PROG([DBUS_DAEMON], [dbus-daemon], [XXXDBUSDAEMONNOTFOUND],
149 [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR]dnl
150 [/libexec$PATH_SEPARATOR/usr/libexec$PATH_SEPARATOR/usr/local/bin]dnl
151 [$PATH_SEPARATOR/usr/pkg/bin])]
153 if test "$DBUS_DAEMON" = "XXXDBUSDAEMONNOTFOUND"; then
154 DBUS_DAEMON = "$bindir/dbus-daemon"
155 AC_MSG_WARN([at-spi2 relies on dbus, and the dbus-daemon was not found])
156 AC_MSG_WARN([we assume that it will be installed in "$bindir"])
158 AC_SUBST(DBUS_DAEMON)
160 AC_ARG_WITH(dbus-services,
161 [AS_HELP_STRING([--with-dbus-services=<directory>],
162 [where D-BUS services directory is])])
163 if ! test -z "$with_dbus_services" ; then
164 DBUS_SERVICES_DIR="$with_dbus_services"
166 DBUS_SERVICES_DIR="$datadir/dbus-1/services"
168 AC_SUBST(DBUS_SERVICES_DIR)
170 GOBJECT_INTROSPECTION_CHECK([0.9.6])
172 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
174 AC_ARG_ENABLE([relocate],
175 [AS_HELP_STRING([--enable-relocate],
176 [Relocate to coexist with CORBA @<:@default=no@:>@])],
177 [enable_relocate="$enableval"],
178 [enable_relocate=no])
179 if test x$enable_relocate = xyes ; then
180 AC_DEFINE(RELOCATE, , [Relocate to coexist with CORBA])
182 AM_CONDITIONAL(RELOCATE, test x$enable_relocate = xyes)
183 AC_SUBST(enable_relocate)
185 dnl find sizes & alignments
186 orig_CPPFLAGS=$CPPFLAGS
187 CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS"
188 DBIND_CHECK_ALIGNOF(char)
189 DBIND_CHECK_ALIGNOF(dbus_bool_t)
190 DBIND_CHECK_ALIGNOF(dbus_int16_t)
191 DBIND_CHECK_ALIGNOF(dbus_int32_t)
192 DBIND_CHECK_ALIGNOF(dbus_int64_t)
193 DBIND_CHECK_ALIGNOF(double)
194 DBIND_CHECK_ALIGNOF(dbind_pointer)
195 DBIND_CHECK_ALIGNOF(dbind_struct)
197 GTK_DOC_CHECK([1.09])
199 CPPFLAGS=$orig_CPPFLAGS
200 AC_CONFIG_FILES([Makefile po/Makefile.in
209 doc/libatspi/Makefile