forked from radii/perfkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
204 lines (169 loc) · 6.65 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
193
194
195
196
197
198
199
200
201
202
203
204
dnl ************************************************************************
dnl Versioning Macros
dnl ************************************************************************
m4_define([perfkit_major_version], [0])
m4_define([perfkit_minor_version], [1])
m4_define([perfkit_micro_version], [1])
m4_define([perfkit_version],
[perfkit_major_version.perfkit_minor_version.perfkit_micro_version])
m4_define([perfkit_binary_age], [m4_eval(100 * perfkit_minor_version +
perfkit_micro_version)])
m4_define([lt_current], [m4_eval(100 * perfkit_minor_version +
perfkit_micro_version - perfkit_interface_age)])
m4_define([lt_revision], [perfkit_interface_age])
m4_define([lt_age], [m4_eval(perfkit_binary_age - perfkit_interface_age)])
dnl ************************************************************************
dnl Initialize Automake
dnl ************************************************************************
AC_PREREQ([2.64])
AC_INIT([perfkit],[perfkit_version])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([build/m4])
AM_INIT_AUTOMAKE([1.10])
AM_MAINTAINER_MODE([enable])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
AS_AM_REALLY_SILENT
# Check for programs
AC_PROG_CC
AM_PROG_CC_C_O
AM_PROG_VALAC([0.9.2])
AM_PATH_GLIB_2_0
# Initialize libtool
LT_PREREQ([2.2])
LT_INIT
dnl ************************************************************************
dnl Versioning Definitions
dnl ************************************************************************
PK_MAJOR_VERSION=perfkit_major_version
PK_MINOR_VERSION=perfkit_minor_version
PK_MICRO_VERSION=perfkit_micro_version
PK_API_VERSION=1.0
PK_VERSION=perfkit_version
AC_SUBST(PK_MAJOR_VERSION)
AC_SUBST(PK_MINOR_VERSION)
AC_SUBST(PK_MICRO_VERSION)
AC_SUBST(PK_API_VERSION)
AC_SUBST(PK_VERSION)
dnl ************************************************************************
dnl Check for Required Modules
dnl ************************************************************************
PKG_CHECK_MODULES(PERFKIT_AGENT, [gobject-2.0 >= 2.26
gthread-2.0 >= 2.26
gmodule-2.0 >= 2.26
gio-2.0 >= 2.26])
PKG_CHECK_MODULES(PERFKIT_TOOLS, [gobject-2.0 >= 2.26
gthread-2.0 >= 2.26
gio-2.0 >= 2.26])
PKG_CHECK_MODULES(PERFKIT, [gobject-2.0 >= 2.26
gthread-2.0 >= 2.26
gio-2.0 >= 2.26])
PKG_CHECK_MODULES(PERFKIT_GUI, [gobject-2.0 >= 2.26
gthread-2.0 >= 2.26
gtk+-2.0 >= 2.20])
PKG_CHECK_MODULES(PERFKIT_PROFILER, [gobject-2.0 >= 2.26
gthread-2.0 >= 2.26
gtk+-2.0 >= 2.20
clutter-gtk-0.10 >= 0.10.4])
PKG_CHECK_MODULES(DBUS, [dbus-glib-1 >= 0.80])
PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.20])
dnl ************************************************************************
dnl Enable additional DBUS features
dnl ************************************************************************
PKG_CHECK_MODULES(DBUS_0_82, [dbus-glib-1 >= 0.82],
[have_dbus_0_82=yes],
[have_dbus_0_82=no])
AM_CONDITIONAL(HAVE_DBUS_0_82, test "x$have_dbus_0_82" = "xyes")
dnl ************************************************************************
dnl Enable extra debugging options
dnl ************************************************************************
m4_define([debug_default],
[m4_if(m4_eval(perfkit_minor_version % 2), [1],
[yes], [minimum])])
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
[turn on debugging @<:@default=debug_default@:>@])],
[],
[enable_debug=debug_default])
AS_CASE([$enable_debug],
[yes], [
test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
PERFKIT_DEBUG_CFLAGS="-DPERFKIT_TRACE -DPERFKIT_DEBUG"
],
[minimum], [
PERFKIT_DEBUG_CFLAGS="-DG_DISABLE_CAST_CHECKS"
],
[no], [
PERFKIT_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
],
[AC_MSG_ERROR([Unknown argument to --enable-debug])]
)
AC_SUBST(PERFKIT_DEBUG_CFLAGS)
dnl ************************************************************************
dnl Additional Headers
dnl ************************************************************************
AC_CHECK_HEADERS([readline/readline.h readline/history.h],
[],
[AC_MSG_ERROR([Readline headers were not found.])])
dnl ************************************************************************
dnl Unit Tests
dnl ************************************************************************
AC_PATH_PROG([GTESTER], [gtester])
AC_PATH_PROG([GTESTER_REPORT], [gtester-report])
AM_CONDITIONAL(ENABLE_GLIB_TEST, test "x$enable_glibtest" = "xyes")
dnl ************************************************************************
dnl Miscellaneous
dnl ************************************************************************
GTK_DOC_CHECK([1.11])
GOBJECT_INTROSPECTION_CHECK([0.6.7])
SHAMROCK_EXPAND_LIBDIR
SHAMROCK_EXPAND_BINDIR
SHAMROCK_EXPAND_DATADIR
dnl ************************************************************************
dnl Output
dnl ************************************************************************
AC_CONFIG_FILES([
Makefile
data/Makefile
data/ui/Makefile
data/icons/Makefile
data/settings/Makefile
doc/Makefile
doc/reference/Makefile
doc/reference/perfkit/Makefile
doc/reference/perfkit/version.xml
doc/reference/perfkit-agent/Makefile
doc/reference/perfkit-agent/version.xml
doc/reference/perfkit-gui/Makefile
doc/reference/perfkit-gui/version.xml
tools/Makefile
perfkit/Makefile
perfkit/connections/Makefile
perfkit/pk-version.h
perfkit/perfkit-1.0.pc
perfkit-agent/Makefile
perfkit-agent/sources/Makefile
perfkit-agent/encoders/Makefile
perfkit-agent/listeners/Makefile
perfkit-agent/pka-version.h
perfkit-gui/Makefile
perfkit-gui/pkg-version.h
uber/Makefile
perfkit-profiler/Makefile
perfkit-profiler/ppg-version.h
bindings/Makefile
bindings/vala/Makefile
tests/Makefile
tests/perfkit/Makefile
tests/perfkit-agent/Makefile
tests/test-suite/Makefile
])
AC_OUTPUT
echo ""
echo "Perfkit $VERSION"
echo ""
echo " Prefix.....................: ${prefix}"
echo " Debug Level................: ${enable_debug}"
echo " Compiler Flags.............: ${CFLAGS}"
echo " Enable API Reference.......: ${enable_gtk_doc}"
echo " Enable Test Suite..........: ${enable_glibtest}"
echo ""