7409a89ea559fa412f161a364e30a0d2e6c404bc
[platform/core/uifw/at-spi2-atk.git] / configure.ac
1 AC_INIT([at-spi2-atk], [2.9.4], [accessibility-atspi@lists.linux-foundation.org])
2 AC_CONFIG_AUX_DIR(config)
3
4 AT_SPI_ATK_MAJOR_VERSION=0
5 AT_SPI_ATK_MINOR_VERSION=3
6 AT_SPI_ATK_INTERFACE_AGE=0
7 AT_SPI_ATK_BINARY_AGE=0
8 AT_SPI_ATK_VERSION="$AT_SPI_MAJOR_VERSION.$AT_SPI_MINOR_VERSION"
9 AC_SUBST(AT_SPI_ATK_VERSION)
10
11 # libtool versioning
12 LT_RELEASE=$AT_SPI_MAJOR_VERSION.$AT_SPI_MINOR_VERSION
13 LT_CURRENT=0
14 LT_REVISION=0
15 LT_AGE=0
16 LT_VERSION_INFO='-version-info ${LT_CURRENT}:${LT_REVISION}:${LT_AGE}'
17 AC_SUBST(LT_VERSION_INFO)
18 AC_SUBST(LT_RELEASE)
19 AC_SUBST(LT_CURRENT)
20 AC_SUBST(LT_REVISION)
21 AC_SUBST(LT_AGE)
22
23 AM_INIT_AUTOMAKE([-Wall foreign no-dist-gzip dist-xz])
24
25 # Enable silent build when available (Automake 1.11)
26 m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
27
28 AC_PROG_CC
29 AM_DISABLE_STATIC
30 AM_PROG_LIBTOOL
31 PKG_PROG_PKG_CONFIG
32
33 GETTEXT_PACKAGE="${PACKAGE}"
34 AC_SUBST(GETTEXT_PACKAGE)
35
36 AC_CONFIG_HEADERS([config.h])
37
38 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0])
39 AC_SUBST(DBUS_LIBS)
40 AC_SUBST(DBUS_CFLAGS)
41
42 PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.32.0])
43 AC_SUBST(GLIB_LIBS)
44 AC_SUBST(GLIB_CFLAGS)
45
46 PKG_CHECK_MODULES(GOBJ, [gobject-2.0 >= 2.0.0])
47 AC_SUBST(GOBJ_LIBS)
48 AC_SUBST(GOBJ_CFLAGS)
49
50 PKG_CHECK_MODULES(GMODULE, [gmodule-2.0 >= 2.0.0])      
51 AC_SUBST(GMODULE_LIBS)
52 AC_SUBST(GMODULE_CFLAGS)
53
54 PKG_CHECK_MODULES(ATK, [atk >= 2.9.4])
55 AC_SUBST(ATK_LIBS)
56 AC_SUBST(ATK_CFLAGS)
57
58 PKG_CHECK_MODULES(ATSPI, [atspi-2 >= 2.9.4])
59 AC_SUBST(ATSPI_LIBS)
60 AC_SUBST(ATSPI_CFLAGS)
61
62 GLIB_GSETTINGS
63
64 AC_ARG_ENABLE(p2p, [  --enable-p2p  Allow peer-to-peer DBus connections [default=yes]], enable_p2p="$enableval", enable_p2p=yes)
65
66 #libtool option to strip symbols starting with cspi
67 LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^cspi]].*"'
68 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
69
70 # Extra libraries for sockets added by Willie Walker
71 # based upon how SunStudio libraries work.
72 #
73 if test "$GCC" = yes; then
74     EXTRA_SOCKET_LIBS=""
75 else
76     EXTRA_SOCKET_LIBS="-lsocket -lnsl"
77 fi
78 AC_SUBST(EXTRA_SOCKET_LIBS)
79
80 dnl find sizes & alignments
81 orig_CPPFLAGS=$CPPFLAGS
82 CPPFLAGS="$CPPFLAGS $DBUS_CFLAGS"
83 CPPFLAGS=$orig_CPPFLAGS 
84
85 if test "x$GCC" = xyes; then
86         CFLAGS="$CFLAGS -Werror-implicit-function-declaration"
87 fi
88
89 if test "x$enable_p2p" = "xno"; then
90         P2P_CFLAGS=-DDISABLE_P2P
91 fi
92
93 AC_SUBST(P2P_CFLAGS)
94
95 AC_CONFIG_FILES([Makefile
96                  atk-bridge-2.0.pc
97                  droute/Makefile
98                  atk-adaptor/Makefile
99                  atk-adaptor/adaptors/Makefile
100                  atk-adaptor/gtk-2.0/Makefile
101                 ])
102
103 AC_OUTPUT