1 AC_INIT([at-spi2-core], [1.91.0], [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 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0])
35 PKG_CHECK_MODULES(GLIB, [glib-2.0])
38 AC_CHECK_LIB([glib-2.0], [g_ptr_array_new_with_free_func], [],
39 [AC_MSG_ERROR([The version of glib-2.0 found does not define ]
40 [g_ptr_array_new_with_free_func. Please upgrade glib.])],
43 PKG_CHECK_MODULES(DBUS_GLIB, [dbus-glib-1 >= 0.7.0])
44 AC_SUBST(DBUS_GLIB_LIBS)
45 AC_SUBST(DBUS_GLIB_CFLAGS)
47 PKG_CHECK_MODULES(GOBJ, [gobject-2.0 >= 2.0.0])
51 # --------------------------------------------------------------------
52 # Find DL functionality
54 AC_CHECK_LIB(c, dlopen, DL_LIBS="",
55 AC_CHECK_LIB(dl, dlopen, DL_LIBS="-ldl",
56 AC_MSG_ERROR([Could not find a library with the dlopen function])
64 if test x$no_x = xyes ; then
65 AC_MSG_ERROR([X development libraries not found])
67 X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
73 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
74 AC_CHECK_LIB(Xtst, XTestFakeKeyEvent, XTST_LIBS=-lXtst,[
75 AC_MSG_ERROR([Couldn't find the Xtst library. Check config.log])],
78 LIBS="$LIBS $save_LIBS"
82 AC_CHECK_LIB(X11, XkbQueryExtension, have_xkb="maybe", have_xkb="no", $X_LIBS)
83 if test "x$have_xkb" = "xmaybe"; then
84 AC_CHECK_HEADER([X11/XKBlib.h], have_xkb=yes)
86 if test "x$have_xkb" = "xyes"; then
87 AC_DEFINE([HAVE_XKB], [], [Xkb is present])
89 LIBS="$LIBS $save_LIBS"
93 AC_CHECK_LIB(Xi, XOpenDevice, have_xinput="maybe", have_xinput="no", $X_LIBS)
94 if test "x$have_xinput" = "xmaybe"; then
97 AC_CHECK_HEADER([X11/extensions/XInput.h], [have_xinput="yes"])
100 if test "x$have_xinput" != "xyes"; then
101 AC_MSG_ERROR([Couldn't find the XInput library. Check config.log for details])
104 AC_SUBST(XINPUT_LIBS)
105 LIBS="$LIBS $save_LIBS"
110 [AS_HELP_STRING([--enable-xevie],
111 [Build with XEViE support [default=yes]])],
112 enable_xevie="$enableval", enable_xevie=yes)
114 if test x$enable_xevie = xyes ; then
116 AC_CHECK_LIB(Xext, XevieStart, have_xevie="yes", have_xevie="no", $X_LIBS)
118 if test "x$have_xevie" = "xyes"; then
120 AC_DEFINE([HAVE_XEVIE], [], [Xevie is present])
122 AC_CHECK_LIB(Xevie, XevieQueryVersion, have_xevie="maybe",,$X_LIBS)
123 if test "x$have_xevie" = "xmaybe"; then
124 AC_CHECK_HEADER(X11/extensions/Xevie.h, have_xevie=yes, [],
125 [[#include <X11/Xlib.h>
127 if test "x$have_xevie" = "xyes"; then
128 XEVIE_LIBS="-lXext -lXevie"
129 AC_DEFINE([HAVE_XEVIE], [], [Xevie is present])
135 LIBS="$LIBS $save_LIBS"
137 AC_ARG_WITH([dbus_daemondir],
138 [AS_HELP_STRING([--with-dbus-daemondir=<directory>],
139 [Directory where the DBUS daemon is installed])],
140 [DBUS_DAEMON="$with_dbus_daemondir/dbus-daemon"],
141 [AC_PATH_PROG([DBUS_DAEMON], [dbus-daemon], [XXXDBUSDAEMONNOTFOUND],
142 [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR]dnl
143 [/libexec$PATH_SEPARATOR/usr/libexec$PATH_SEPARATOR/usr/local/bin]dnl
144 [$PATH_SEPARATOR/usr/pkg/bin])]
146 if test "$DBUS_DAEMON" = "XXXDBUSDAEMONNOTFOUND"; then
147 DBUS_DAEMON = "$bindir/dbus-daemon"
148 AC_MSG_WARN([at-spi2 relies on dbus, and the dbus-daemon was not found])
149 AC_MSG_WARN([we assume that it will be installed in "$bindir"])
151 AC_SUBST(DBUS_DAEMON)
153 AC_ARG_WITH(dbus-services,
154 [AS_HELP_STRING([--with-dbus-services=<directory>],
155 [where D-BUS services directory is])])
156 if ! test -z "$with_dbus_services" ; then
157 DBUS_SERVICES_DIR="$with_dbus_services"
159 DBUS_SERVICES_DIR="$datadir/dbus-1/services"
161 AC_SUBST(DBUS_SERVICES_DIR)
163 GOBJECT_INTROSPECTION_CHECK([0.9.6])
165 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
167 AC_ARG_ENABLE([relocate],
168 [AS_HELP_STRING([--enable-relocate],
169 [Relocate to coexist with CORBA @<:@default=no@:>@])],
170 [enable_relocate="$enableval"],
171 [enable_relocate=no])
172 if test x$enable_relocate = xyes ; then
173 AC_DEFINE(RELOCATE, , [Relocate to coexist with CORBA])
175 AM_CONDITIONAL(RELOCATE, test x$enable_relocate = xyes)
176 AC_SUBST(enable_relocate)
178 AC_CONFIG_FILES([Makefile