Release v0.3.4
[platform/upstream/at-spi2-core.git] / configure.ac
1 AC_INIT([at-spi2-core], [0.3.4], [accessibility-atspi@lists.linux-foundation.org])
2 AC_CONFIG_AUX_DIR(config)
3 AC_CONFIG_MACRO_DIR([m4])
4
5 AT_SPI_CORE_MAJOR_VERSION=0
6 AT_SPI_CORE_MINOR_VERSION=1
7 AT_SPI_CORE_MICRO_VERSION=3
8 AT_SPI_CORE_VERSION="$AT_SPI_CORE_MAJOR_VERSION.$AT_SPI_CORE_MINOR_VERSION"
9 AC_SUBST(AT_SPI_CORE_VERSION)
10
11 LT_RELEASE=$AT_SPI_CORE_VERSION
12 LT_CURRENT=0
13 LT_REVISION=1
14 LT_AGE=0
15 LT_VERSION_INFO='-version-info ${LT_CURRENT}:${LT_REVISION}:${LT_AGE}'
16 AC_SUBST(LT_VERSION_INFO)
17 AC_SUBST(LT_RELEASE)
18 AC_SUBST(LT_CURRENT)
19 AC_SUBST(LT_REVISION)
20 AC_SUBST(LT_AGE)
21
22 AM_INIT_AUTOMAKE([-Wall foreign])
23
24 AC_PROG_CC
25 AM_DISABLE_STATIC
26 AM_PROG_LIBTOOL
27 PKG_PROG_PKG_CONFIG
28
29 AC_CONFIG_HEADERS([config.h])
30
31 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0])
32 AC_SUBST(DBUS_LIBS)
33 AC_SUBST(DBUS_CFLAGS)
34
35 PKG_CHECK_MODULES(GLIB, [glib-2.0])
36 AC_SUBST(GLIB_LIBS)
37 AC_SUBST(GLIB_CFLAGS)
38
39 PKG_CHECK_MODULES(DBUS_GLIB, [dbus-glib-1 >= 0.7.0])
40 AC_SUBST(DBUS_GLIB_LIBS)
41 AC_SUBST(DBUS_GLIB_CFLAGS)
42
43 PKG_CHECK_MODULES(GOBJ, [gobject-2.0 >= 2.0.0])
44 AC_SUBST(GOBJ_LIBS)
45 AC_SUBST(GOBJ_CFLAGS)
46
47 AC_CHECK_LIB(dl, dlopen)
48
49 AC_PATH_XTRA
50
51 if test x$no_x = xyes ; then
52         AC_MSG_ERROR([X development libraries not found])
53 else
54         X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
55 fi
56 AC_SUBST(X_LIBS)
57
58 #LIBS="$LIBS $X_LIBS"
59 AC_CHECK_LIB(Xtst, XTestFakeKeyEvent, XTST_LIBS=-lXtst,[
60         AC_MSG_ERROR([Couldn't find the Xtst library. Check config.log])],
61         -lX11 -lXext)
62 AC_SUBST(XTST_LIBS)
63
64 have_xkb=
65 AC_CHECK_LIB(X11, XkbQueryExtension, have_xkb="maybe")
66 if test "x$have_xkb" = "xmaybe"; then 
67         AC_CHECK_HEADER(X11/XKBlib.h, have_xkb=yes)
68 fi
69 if test "x$have_xkb" = "xyes"; then
70         AC_MSG_RESULT(yes)
71         AC_DEFINE([HAVE_XKB], [], Xkb is present)
72 fi
73
74 have_xinput=
75 AC_CHECK_LIB(Xi, XOpenDevice, XINPUT_LIBS=-lXi,,-lXext)
76 if test "x$XINPUT_LIBS" = x; then
77         AC_MSG_ERROR(Couldn't find the XInput library. Check config.log for details)
78 fi                             
79 AC_CHECK_HEADER(X11/extensions/XInput.h, have_xinput=yes)
80 AC_SUBST(XINPUT_LIBS)
81
82 AC_ARG_ENABLE(xevie, [--enable-xevie  Build with XEViE support [default=yes]], enable_xevie="$enableval", enable_xevie=yes)
83
84 if test x$enable_xevie = xyes ; then
85         have_xevie=
86         AC_CHECK_LIB(Xext, XevieStart, have_xevie="yes")
87
88         if test "x$have_xevie" = "xyes"; then
89                 XEVIE_LIBS="-lXext"
90                 AC_DEFINE([HAVE_XEVIE], [], Xevie is present)
91         else
92            AC_CHECK_LIB(Xevie, XevieQueryVersion, have_xevie="maybe",,-lXevie -lXext)
93            if test "x$have_xevie" = "xmaybe"; then
94               AC_CHECK_HEADER(X11/extensions/Xevie.h, have_xevie=yes, [], [#include <X11/Xlib.h>])
95               if test "x$have_xevie" = "xyes"; then
96                       XEVIE_LIBS="-lXext -lXevie"              
97                       AC_DEFINE([HAVE_XEVIE], [], Xevie is present)
98               fi
99            fi   
100         fi
101         AC_SUBST(XEVIE_LIBS)
102 fi
103
104 AC_ARG_VAR([DEFAULT_ATSPI_INTROSPECTION_PATH],
105            [Set the default path for the install ofDBus introspection XML
106             relative to the pkgdatadir.])
107 if test -z "$DEFAULT_ATSPI_INTROSPECTION_PATH"; then
108           DEFAULT_ATSPI_INTROSPECTION_PATH=at-spi2/dbus
109 fi
110
111 AS_AC_EXPAND(EXPANDED_BINDIR, "$bindir")
112 AC_ARG_WITH(dbus_daemondir, AS_HELP_STRING([--with-dbus-daemondir=[dirname]],[Directory where the DBUS daemon is installed]))
113 if test -z "$with_dbus_daemondir" ; then
114     DBUS_DAEMONDIR=$EXPANDED_BINDIR
115 else
116     DBUS_DAEMONDIR=$with_dbus_daemondir
117 fi
118 AC_SUBST(DBUS_DAEMONDIR)
119 AC_DEFINE_UNQUOTED(DBUS_DAEMONDIR,"$DBUS_DAEMONDIR", [Directory for installing the DBUS daemon])
120
121 AC_ARG_WITH(dbus-services,
122            [AC_HELP_STRING([--with-dbus-services=<dir>],
123            [where D-BUS services directory is])])
124 if ! test -z "$with_dbus_services" ; then
125            DBUS_SERVICES_DIR="$with_dbus_services"
126 else
127            DBUS_SERVICES_DIR="$datadir/dbus-1/services"
128 fi
129 AC_SUBST(DBUS_SERVICES_DIR)
130
131 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
132
133 AC_ARG_ENABLE(relocate, [  --enable-relocate  Relocate to coexist with CORBA [default=no]], enable_relocate="$enableval", enable_relocate=no)
134 if test x$enable_relocate = xyes ; then
135         AC_DEFINE(RELOCATE, , [Relocate to coexist with CORBA])
136 fi
137 AM_CONDITIONAL(RELOCATE, test x$enable_relocate = xyes)
138
139 AC_CONFIG_FILES([Makefile
140                  xml/Makefile
141                  registryd/Makefile])
142
143 AC_OUTPUT