-
Notifications
You must be signed in to change notification settings - Fork 6
/
configure.ac
183 lines (153 loc) · 3.81 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
## Process this file with autoconf to produce a configure script.
#
AC_INIT([maemo-launcher], [0.35])
AC_PREREQ([2.59])
AC_CONFIG_SRCDIR([launcher/launcher.c])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.7 foreign])
AM_MAINTAINER_MODE
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_C_CONST
AC_HEADER_STDC
AC_MSG_CHECKING([for prctl with PR_SET_NAME support])
AC_LINK_IFELSE([
#include <sys/prctl.h>
int main()
{
char name[] = "name-test";
prctl(PR_SET_NAME, name);
return 0;
}
], [AC_DEFINE([HAVE_PRCTL_SET_NAME], [1],
[Define to 1 if prctl has PR_SET_NAME support])
prctl=yes],
[prctl=no])
AC_MSG_RESULT([$prctl])
#
# Launcher dependencies
#
PKG_CHECK_MODULES([DBUS], [
dbus-1 >= 0.60
])
#
# Booster modules section
#
AC_ARG_ENABLE([hildon-booster],
[AS_HELP_STRING([--enable-hildon-booster],
[link with hildon libs to reduce runtime linker time])],
[case "${enableval}" in
(yes) hildon_booster=true ;;
(no) hildon_booster=false ;;
(*) AC_MSG_ERROR([bad value ${enableval} for --enable-hildon-booster]) ;;
esac], [hildon_booster=false])
PKG_CHECK_MODULES([BOOSTER_GTK], [
gtk+-2.0 >= 2.6.4
fontconfig
])
if test x$hildon_booster = xtrue
then
PKG_CHECK_MODULES([BOOSTER_HILDON], [
glib-2.0
gio-2.0
libpulse
gnome-vfs-2.0 >= 2.8.0
alarm
libosso
libhildonmime
hildon-fm-2
libhildondesktop-1
hildon-1
libi18n
telepathy-glib
libedataserver-1.2
libedata-book-1.2
libmodest-dbus-client-1.0
sqlite3
conic
])
# Hack to add some more common items not available via pkg-config.
LIBS="$LIBS -ljpeg -lgvfscommon"
fi
AC_ARG_ENABLE([qt-booster],
[AS_HELP_STRING([--enable-qt-booster],
[link with QT libs to reduce runtime linker time])],
[case "${enableval}" in
(yes) qt_booster=true ;;
(no) qt_booster=false ;;
(*) AC_MSG_ERROR([bad value ${enableval} for --enable-qt-booster]) ;;
esac], [qt_booster=false])
AM_CONDITIONAL([USE_QT_BOOSTER], [test x$qt_booster = xtrue])
if test x$qt_booster = xtrue
then
PKG_CHECK_MODULES([BOOSTER_QT], [
QtCore
QtDBus
QtGui
])
fi
AC_ARG_ENABLE([cpp-booster],
[AS_HELP_STRING([--enable-cpp-booster],
[link with libstdc++ to reduce runtime linker time])],
[case "${enableval}" in
(yes) cpp_booster=true ;;
(no) cpp_booster=false ;;
(*) AC_MSG_ERROR([bad value ${enableval} for --enable-cpp-booster]) ;;
esac], [cpp_booster=false])
AM_CONDITIONAL([USE_CPP_BOOSTER], [test x$cpp_booster = xtrue])
if test x$cpp_booster = xtrue
then
GLIBS=$LIBS
AC_CHECK_LIB(stdc++, main,,AC_MSG_ERROR(gdu configure option requires libstdc++))
LIBS=$GLIBS
fi
#
# Test client program
#
PIC="-fPIC"
AC_SUBST([PIC])
AC_ARG_ENABLE([pie],
[AS_HELP_STRING([--enable-pie],
[link the client as a PIE])],
[case "${enableval}" in
yes) pie=true ;;
no) pie=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-pie]) ;;
esac], [pie=false])
AM_CONDITIONAL([USE_PIE], [test x$pie = xtrue])
PKG_CHECK_MODULES([APP_HILDON], [
gtk+-2.0 >= 2.6.4
hildon-1
], [build_app_hildon=true], [build_app_hildon=false])
AM_CONDITIONAL([BUILD_APP_HILDON], [test x$build_app_hildon = xtrue])
AC_ARG_ENABLE([client],
[AS_HELP_STRING([--enable-client],
[build the test client])],
[case "${enableval}" in
yes) client=true ;;
no) client=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-client]) ;;
esac], [client=false])
AM_CONDITIONAL([BUILD_CLIENT], [test x$client = xtrue])
if test x$client = xtrue
then
PKG_CHECK_MODULES([CLIENT], [
$GTK_DEPENDS
hildon-1
])
fi
AC_CONFIG_FILES([
Makefile
launcher/Makefile
launcher/maemo-launcher-app.pc:launcher/launcher.pc.in
launcher/maemo-launcher-booster.pc:launcher/booster.pc.in
launcher/maemo-invoker.1:launcher/invoker.1.in
launcher/maemo-summoner.1:launcher/summoner.1.in
launcher/maemo-launcher.1:launcher/launcher.1.in
client/Makefile
])
AC_OUTPUT