Doc fixes, and a (minor) API fix to AccessibleStreamableContent_seek.
[platform/upstream/at-spi2-core.git] / configure.in
1 AC_INIT(idl/Accessibility.idl)
2
3 AT_SPI_MAJOR_VERSION=0
4 AT_SPI_MINOR_VERSION=12
5 AT_SPI_MICRO_VERSION=0
6 AT_SPI_INTERFACE_AGE=0
7 AT_SPI_BINARY_AGE=0
8 AT_SPI_VERSION="$AT_SPI_MAJOR_VERSION.$AT_SPI_MINOR_VERSION.$AT_SPI_MICRO_VERSION"
9 AM_INIT_AUTOMAKE(at-spi, $AT_SPI_VERSION)
10 AC_SUBST(AT_SPI_MAJOR_VERSION)
11 AC_SUBST(AT_SPI_MINOR_VERSION)
12 AC_SUBST(AT_SPI_MICRO_VERSION)
13 AC_SUBST(AT_SPI_INTERFACE_AGE)
14 AC_SUBST(AT_SPI_BINARY_AGE)
15
16 # libtool versioning
17 LT_RELEASE=$AT_SPI_MAJOR_VERSION.$AT_SPI_MINOR_VERSION
18 LT_CURRENT=`expr $AT_SPI_MICRO_VERSION - $AT_SPI_INTERFACE_AGE`
19 LT_REVISION=$AT_SPI_INTERFACE_AGE
20 LT_AGE=`expr $AT_SPI_BINARY_AGE - $AT_SPI_INTERFACE_AGE`
21 LT_VERSION_INFO='-version-info ${LT_CURRENT}:${LT_REVISION}:${LT_AGE}'
22 AC_SUBST(LT_VERSION_INFO)
23 AC_SUBST(LT_RELEASE)
24 AC_SUBST(LT_CURRENT)
25 AC_SUBST(LT_REVISION)
26 AC_SUBST(LT_AGE)
27
28 dnl Specify a header configuration file
29 AM_CONFIG_HEADER(config.h)
30
31 dnl Initialize maintainer mode
32 AM_MAINTAINER_MODE
33
34 AC_PROG_INTLTOOL
35
36 dnl Checks for programs
37 AC_PROG_CC
38 AC_PROG_INSTALL
39 AC_ISC_POSIX
40
41 GNOME_COMMON_INIT
42 GNOME_PLATFORM_GNOME_2(yes, force)
43 GNOME_COMPILE_WARNINGS(maximum)
44
45 dnl Initialize libtool
46 AM_DISABLE_STATIC
47 AM_PROG_LIBTOOL
48
49 dnl internationalization support
50 dnl ALL_LINGUAS=""
51 dnl AM_GLIB_GNU_GETTEXT
52
53 AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
54
55 gtk_doc_min_version=0.6
56 if $GTKDOC ; then
57     gtk_doc_version=`gtkdoc-mkdb --version`
58     AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
59     if perl <<EOF ; then
60         exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
61             ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
62 EOF
63       AC_MSG_RESULT(yes)
64    else
65       AC_MSG_RESULT(no)
66         GTKDOC=false
67    fi
68 fi
69
70 dnl Let people disable the gtk-doc stuff.
71 AC_ARG_ENABLE(gtk-doc, [  --enable-gtk-doc  Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
72
73 if test x$enable_gtk_doc = xauto ; then
74   if test x$GTKDOC = xtrue ; then
75     enable_gtk_doc=yes
76   else
77     enable_gtk_doc=no
78   fi
79 fi
80
81 dnl NOTE: We need to use a separate automake conditional for this
82 dnl       to make this work with the tarballs.
83 AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
84
85 AC_PATH_XTRA
86
87 if test x$no_x = xyes ; then
88   AC_MSG_ERROR([X development libraries not found])
89 else
90   X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
91 fi
92
93 AC_SUBST(X_LIBS)
94
95 dnl Checks for libraries
96 PKG_CHECK_MODULES(LIBSPI, \
97         libbonobo-2.0 >= 1.107.0 \
98         atk >= 0.10 \
99         gtk+-2.0 >= 1.3.12 \
100         gail >= 0.11)
101 AC_SUBST(LIBSPI_LIBS)
102 AC_SUBST(LIBSPI_CFLAGS)
103
104 PKG_CHECK_MODULES(REGISTRYD, \
105         libbonobo-2.0 >= 1.107.0 \
106         gtk+-2.0 \
107         atk >= 0.10)
108 AC_SUBST(REGISTRYD_LIBS)
109 AC_SUBST(REGISTRYD_CFLAGS)
110
111 PKG_CHECK_MODULES(TESTS, \
112         libbonobo-2.0 >= 1.107.0 \
113         atk >= 0.10 \
114         gtk+-2.0 >= 2.0.0 \
115         gail >= 0.11)
116 AC_SUBST(TESTS_LIBS)
117 AC_SUBST(TESTS_CFLAGS)
118
119 PKG_CHECK_MODULES(UTILS, \
120         libbonobo-2.0 >= 1.107.0 \
121         gtk+-2.0 >= 2.0.0 \
122         gdk-pixbuf-2.0 >= 2.0.0
123         gdk-pixbuf-xlib-2.0 >= 2.0.0)
124 AC_SUBST(UTILS_LIBS)
125 AC_SUBST(UTILS_CFLAGS)
126
127 PKG_CHECK_MODULES(ATK_BRIDGE, \
128         libbonobo-2.0 >= 1.107.0 \
129         atk >= 0.10)
130 AC_SUBST(ATK_BRIDGE_LIBS)
131 AC_SUBST(ATK_BRIDGE_CFLAGS)
132
133 PKG_CHECK_MODULES(LIBCSPI, \
134         libbonobo-2.0 >= 1.107.0 \
135         atk >= 1.0.0)
136 AC_SUBST(LIBCSPI_LIBS)
137 AC_SUBST(LIBCSPI_CFLAGS)
138
139 dnl orbit-idl.
140 ORBIT_IDL="`$PKG_CONFIG --variable=orbit_idl ORBit-2.0`"
141 AC_SUBST(ORBIT_IDL)
142
143 dnl Bonobo and Bonobo-Activation idl files
144 BONOBO_ACTIVATION_IDL_DIR="`$PKG_CONFIG --variable=idldir bonobo-activation-2.0`"
145 LIBBONOBO_IDL_DIR="`$PKG_CONFIG --variable=idldir libbonobo-2.0`"
146 AC_SUBST(BONOBO_ACTIVATION_IDL_DIR)
147 AC_SUBST(LIBBONOBO_IDL_DIR)
148
149 dnl path to Xtst
150 AC_CHECK_LIB(Xtst, XTestFakeKeyEvent, XTST_LIBS=-lXtst)
151 if test "x$XTST_LIBS" = x; then
152   save_LIBS="$LIBS"
153   for xtstpath in /usr/X11R6/lib /usr/openwin/lib; do
154     LIBS="-L$xtstpath -lXtst"
155     AC_MSG_CHECKING(for -lXtst in $xtstpath)
156     AC_TRY_LINK([], [XTestFakeKeyEvent()], [
157         AC_MSG_RESULT(yes)
158         XTST_LIBS="-L$xtstpath -lXtst"
159         LIBS="$save_LIBS"
160         break],[AC_MSG_RESULT(no)])
161   done
162   if test "x$XTST_LIBS" = x; then
163     AC_MSG_ERROR(Couldn't find the Xtst library. Check config.log for details)
164   fi
165 fi
166 AC_SUBST(XTST_LIBS)
167
168 AC_SUBST(CFLAGS)
169 AC_SUBST(CPPFLAGS)
170 AC_SUBST(LDFLAGS)
171
172 AC_CHECK_LIB(popt, poptGetContext, [POPT_LIBS="-lpopt"],
173 AC_MSG_ERROR([popt is required to build at-spi.
174 You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/]))
175 AC_SUBST(POPT_LIBS)
176 AC_MSG_CHECKING([for POPT_ARG_FLOAT in popt.h])
177 AC_TRY_CPP([#include <popt.h>
178 #ifndef POPT_ARG_FLOAT
179 #error popt too old
180 #endif], AC_MSG_RESULT(yes), [
181   AC_MSG_RESULT(no)
182   AC_MSG_ERROR([A newer version of popt is required to build at-spi.
183 You can download the latest version from ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/])
184 ])
185
186 AC_OUTPUT([
187 Makefile
188 libspi-1.0.pc
189 cspi-1.0.pc
190 docs/Makefile
191 docs/reference/Makefile
192 docs/reference/cspi/Makefile
193 idl/Makefile
194 libspi/Makefile
195 registryd/Makefile
196 registryd/Accessibility_Registry.server
197 atk-bridge/Makefile
198 test/Makefile
199 cspi/Makefile
200 cspi/bonobo/Makefile
201 util/Makefile
202 util/Accessibility_Util.server
203 ])
204
205 echo "AT-SPI setup:
206
207         Source code location:   ${srcdir}
208         Compiler:               ${CC} 
209         Prefix:                 ${prefix}
210
211         Welcome to the wonderful world of Accessibility.
212            http://developer.gnome.org/projects/gap/
213 "