-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.ac
192 lines (165 loc) · 4.99 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
AC_INIT(hildon-desktop, 2.9.0)
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AC_CANONICAL_HOST
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_C_CONST
AC_HEADER_STDC
AC_HEADER_STDBOOL
AC_CHECK_HEADERS([ftw.h],
AC_DEFINE([HAVE_FTW_H], 1,
[Define to 1 if ftw.h is available]))
AC_CHECK_FUNCS([nftw])
AC_MSG_CHECKING([for GNU ftw extensions])
AC_TRY_COMPILE([#define _XOPEN_SOURCE 500
#define _GNU_SOURCE
#include <ftw.h>], [int flags = FTW_ACTIONRETVAL;], gtk_ok=yes, gtk_ok=no)
if test $gtk_ok = yes; then
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_GNU_FTW, 1, [Have GNU ftw])
else
AC_MSG_RESULT([no])
fi
AM_PROG_CC_C_O
AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
#++++++++++++++++++
# Misc build flags
#++++++++++++++++++
CFLAGS="$CFLAGS -Wall -Wno-format-extra-args -ansi -Wmissing-prototypes -Wmissing-declarations -Werror -std=gnu99 -DG_DISABLE_CAST_CHECKS -fgnu89-inline"
AC_SUBST(CFLAGS)
# gettext
ALL_LINGUAS="en_GB"
AC_SUBST(ALL_LINGUAS)
AM_GLIB_GNU_GETTEXT
AC_DEFINE(GETTEXT_PACKAGE, ["maemo-af-desktop"], [Localisation domain])
# check if MB2 should be linked statically
AC_ARG_ENABLE(static_mb2,
[ --enable-static-mb2 Link to MB2 statically [default=no]],
[ac_cv_enable_static_mb2=$enableval],[ac_cv_enable_static_mb2=no])
AC_MSG_CHECKING([whether to statically link Matchbox2])
if test "$ac_cv_enable_static_mb2" = yes; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
# Use maemo-launcher?
AC_ARG_ENABLE(maemo-launcher,
[ --enable-maemo-launcher compile with maemo-launcher [default=no]],,
enable_maemo_launcher=no)
if test "x$enable_maemo_launcher" = "xyes"; then
PKG_CHECK_MODULES(MAEMO_LAUNCHER, [maemo-launcher-app])
AC_SUBST(MAEMO_LAUNCHER_CFLAGS)
AC_SUBST(MAEMO_LAUNCHER_LIBS)
fi
# do we want a11y support?
AC_ARG_ENABLE(a11y,
[ --enable-a11y Enable Accessibility (requires cail) [default=no]],
[ac_cv_enable_a11y=$enableval],[ac_cv_enable_a11y=no])
AC_MSG_CHECKING([whether to enable a11y])
AC_PATH_PROG(PKG_CONFIG, pkg-config, yes)
if test "$ac_cv_enable_a11y" = yes; then
echo "ac_cv_enable_a11y: Forced off."
ac_cv_enable_a11y=no
if test "x$PKG_CONFIG" != "xno"; then
echo "ac_cv_enable_a11y: Have pkg-config: $PKG_CONFIG"
if $PKG_CONFIG --exists cail; then
echo "ac_cv_enable_a11y: pkg-config says cail exists"
ac_cv_enable_a11y=yes ;
echo "ac_cv_enable_a11y: Turned on."
else
echo "ac_cv_enable_a11y: $PKG_CONFIG --exists cail failed"
fi
else
echo "ac_cv_enable_a11y: Do not have pkg-config: $PKG_CONFIG"
fi
fi
if test "$ac_cv_enable_a11y" = yes; then
AC_MSG_RESULT(yes)
PKG_CHECK_MODULES(HDA, cail)
AC_SUBST(HDA_LIBS)
AC_SUBST(HDA_CFLAGS)
A11Y_DIR="a11y"
AC_SUBST(A11Y_DIR)
A11Y_LA="a11y/liba11y.la"
AC_SUBST(A11Y_LA)
else
AC_MSG_RESULT(no)
AC_DEFINE(DISABLE_A11Y, [], ["Disabled a11y macro"])
fi
#+++++++++++++++++++++
# Dependencies checks
#+++++++++++++++++++++
if test "$ac_cv_enable_static_mb2" = yes; then
PKG_CHECK_MODULES([MB2], [libmatchbox2-0.1])
MB2_STATIC_LIB=/usr/lib/libmatchbox2-0.1.a
PKG_CHECK_MODULES(HD, [clutter-0.8 dnl
glib-2.0 >= 2.12 dnl
gthread-2.0 dnl
dbus-1 dnl
x11 dnl
xcomposite dnl
xfixes dnl
xrandr dnl
gtk+-2.0 dnl
gconf-2.0 dnl
hildon-1 dnl
libhildondesktop-1 dnl
libcanberra dnl
gnome-vfs-2.0 dnl
libgnome-menu dnl
gdk-pixbuf-xlib-2.0 dnl
pangoxft dnl
xft dnl
profile dnl
mce])
else
MB2_CFLAGS=''
MB2_STATIC_LIB=''
PKG_CHECK_MODULES(HD, [clutter-0.8 dnl
glib-2.0 >= 2.12 dnl
gthread-2.0 dnl
dbus-1 dnl
x11 dnl
xcomposite dnl
xfixes dnl
xrandr dnl
gtk+-2.0 dnl
gconf-2.0 dnl
hildon-1 dnl
libhildondesktop-1 dnl
libcanberra dnl
gnome-vfs-2.0 dnl
libgnome-menu dnl
gdk-pixbuf-xlib-2.0 dnl
xft dnl
libmatchbox2-0.1 dnl
profile dnl
mce])
fi
HD_INCS='-I$(top_srcdir)/src -I$(top_srcdir)/src/home -I$(top_srcdir)/src/mb -I$(top_srcdir)/src/util -I$(top_srcdir)/src/a11y'
# only CFLAGS are needed from MB2 since we are statically linking
AC_SUBST(MB2_CFLAGS)
AC_SUBST(MB2_STATIC_LIB)
AC_SUBST(HD_LIBS)
AC_SUBST(HD_CFLAGS)
AC_SUBST(HD_INCS)
AC_CONFIG_FILES([
Makefile
src/Makefile
src/mb/Makefile
src/home/Makefile
src/launcher/Makefile
src/tidy/Makefile
src/util/Makefile
src/a11y/Makefile
src/a11y/launcher/Makefile
src/a11y/home/Makefile
src/a11y/tail/Makefile
data/Makefile
data/menu/Makefile
data/applications/Makefile
tests/Makefile
])
AC_OUTPUT