1 AC_INIT([at-spi2-core], [0.3.90], [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 AC_CHECK_LIB(dl, dlopen)
55 if test x$no_x = xyes ; then
56 AC_MSG_ERROR([X development libraries not found])
58 X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
64 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
65 AC_CHECK_LIB(Xtst, XTestFakeKeyEvent, XTST_LIBS=-lXtst,[
66 AC_MSG_ERROR([Couldn't find the Xtst library. Check config.log])],
69 LIBS="$LIBS $save_LIBS"
73 AC_CHECK_LIB(X11, XkbQueryExtension, have_xkb="maybe", have_xkb="no", $X_LIBS)
74 if test "x$have_xkb" = "xmaybe"; then
75 AC_CHECK_HEADER([X11/XKBlib.h], have_xkb=yes)
77 if test "x$have_xkb" = "xyes"; then
78 AC_DEFINE([HAVE_XKB], [], [Xkb is present])
80 LIBS="$LIBS $save_LIBS"
84 AC_CHECK_LIB(Xi, XOpenDevice, have_xinput="maybe", have_xinput="no", $X_LIBS)
85 if test "x$have_xinput" = "xmaybe"; then
88 AC_CHECK_HEADER([X11/extensions/XInput.h], [have_xinput="yes"])
91 if test "x$have_xinput" != "xyes"; then
92 AC_MSG_ERROR([Couldn't find the XInput library. Check config.log for details])
96 LIBS="$LIBS $save_LIBS"
101 [AS_HELP_STRING([--enable-xevie],
102 [Build with XEViE support [default=yes]])],
103 enable_xevie="$enableval", enable_xevie=yes)
105 if test x$enable_xevie = xyes ; then
107 AC_CHECK_LIB(Xext, XevieStart, have_xevie="yes", have_xevie="no", $X_LIBS)
109 if test "x$have_xevie" = "xyes"; then
111 AC_DEFINE([HAVE_XEVIE], [], [Xevie is present])
113 AC_CHECK_LIB(Xevie, XevieQueryVersion, have_xevie="maybe",,$X_LIBS)
114 if test "x$have_xevie" = "xmaybe"; then
115 AC_CHECK_HEADER(X11/extensions/Xevie.h, have_xevie=yes, [],
116 [[#include <X11/Xlib.h>
118 if test "x$have_xevie" = "xyes"; then
119 XEVIE_LIBS="-lXext -lXevie"
120 AC_DEFINE([HAVE_XEVIE], [], [Xevie is present])
126 LIBS="$LIBS $save_LIBS"
128 AC_ARG_VAR([DEFAULT_ATSPI_INTROSPECTION_PATH],
129 [Set the default path for the install of DBus introspection XML ]
130 [relative to the pkgdatadir.])
131 if test -z "$DEFAULT_ATSPI_INTROSPECTION_PATH"; then
132 DEFAULT_ATSPI_INTROSPECTION_PATH=at-spi2/dbus
135 AC_ARG_WITH([dbus_daemondir],
136 [AS_HELP_STRING([--with-dbus-daemondir=<directory>],
137 [Directory where the DBUS daemon is installed])],
138 [DBUS_DAEMON="$with_dbus_daemondir/dbus-daemon"],
139 [AC_PATH_PROG([DBUS_DAEMON], [dbus-daemon], [XXXDBUSDAEMONNOTFOUND],
140 [$PATH$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR]dnl
141 [/libexec$PATH_SEPARATOR/usr/libexec$PATH_SEPARATOR/usr/local/bin]dnl
142 [$PATH_SEPARATOR/usr/pkg/bin])]
144 if test "$DBUS_DAEMON" = "XXXDBUSDAEMONNOTFOUND"; then
145 DBUS_DAEMON = "$bindir/dbus-daemon"
146 AC_MSG_WARN([at-spi2 relies on dbus, and the dbus-daemon was not found])
147 AC_MSG_WARN([we assume that it will be installed in "$bindir"])
149 AC_SUBST(DBUS_DAEMON)
151 AC_ARG_WITH(dbus-services,
152 [AS_HELP_STRING([--with-dbus-services=<directory>],
153 [where D-BUS services directory is])])
154 if ! test -z "$with_dbus_services" ; then
155 DBUS_SERVICES_DIR="$with_dbus_services"
157 DBUS_SERVICES_DIR="$datadir/dbus-1/services"
159 AC_SUBST(DBUS_SERVICES_DIR)
161 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
163 AC_ARG_ENABLE([relocate],
164 [AS_HELP_STRING([--enable-relocate],
165 [Relocate to coexist with CORBA @<:@default=no@:>@])],
166 [enable_relocate="$enableval"],
167 [enable_relocate=no])
168 if test x$enable_relocate = xyes ; then
169 AC_DEFINE(RELOCATE, , [Relocate to coexist with CORBA])
171 AM_CONDITIONAL(RELOCATE, test x$enable_relocate = xyes)
173 AC_CONFIG_FILES([Makefile