-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure.in
173 lines (138 loc) · 4.17 KB
/
configure.in
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
# -*-m4-*- Process this file with autoconf to produce a configure script.
######################################################################
#
# General system tests required for building platform independent
# stuff.
#
#
AC_INIT([Bubbling Load Monitor], 2.0.17, [email protected], bubblemon)
AC_CONFIG_SRCDIR(src/bubblemon.h)
# Install in /usr by default since many GNOME installations aren't
# aware of the existence of /usr/local.
AC_PREFIX_DEFAULT(/usr)
AM_INIT_AUTOMAKE([1.5])
AC_PREREQ(2.61)
AM_CONFIG_HEADER(config.h)
AC_PROG_INTLTOOL([0.35])
# Compiler setup
AC_PROG_CC
if test "x$GCC" = "xyes"; then
# -Wno-missing-field-initializers is because of
# http://bugs.debian.org/509663
#
# -Wno-unused-parameter is because in gnome2-ui.c our function
# prototypes are decided by the GNOME API, and we have to accept
# some parameters we never use.
CFLAGS="-g -O2 -Wall -Werror -Wextra -Wno-unused-parameter -Wno-missing-field-initializers"
AC_SUBST(CFLAGS)
fi
AM_PROG_CC_STDC
AC_ISC_POSIX
AC_HEADER_STDC
# Find some more or less non-standard data types
AC_CHECK_TYPE(u_int32_t, unsigned int)
AC_CHECK_TYPE(u_int16_t, unsigned short int)
AC_CHECK_TYPE(u_int8_t, unsigned char)
# Find out whether we are on a big-endian system
AC_C_BIGENDIAN
# For i18n and l10n
ALL_LINGUAS="sv fr pl de ko fi da pt ro es no hu it is ru ca pt_BR nl"
# Check if the user wants all languages to be compiled
AC_ARG_WITH(
all-linguas,
[ --with-all-linguas Compile support for all avaliable languages],
all_linguas=yes)
if test "x$all_linguas" = "xyes"; then
LINGUAS=$ALL_LINGUAS
fi
AC_MSG_CHECKING(what languages to include)
AC_MSG_RESULT($LINGUAS)
GETTEXT_PACKAGE=bubblemon
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Gettext wants to know...])
AC_SUBST(GETTEXT_PACKAGE)
# For i18n and l10n (continued)
AM_GNU_GETTEXT([external])
# Where do we put locale information?
if test "x$prefix" = "xNONE"; then
LOCALEDIR=$ac_default_prefix/share/locale
else
LOCALEDIR=$prefix/share/locale
fi
AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR", [Where language files get installed])
# We need the exp2() function for generating the tool tip
AC_SEARCH_LIBS(exp2, m)
######################################################################
#
# Bubblemon specific tests
#
#
# Check if the user wants to enable profiling
AC_ARG_ENABLE(
profiling,
[ --enable-profiling Pass profiling options to the compiler],
profiling=yes)
if test "x$profiling" = "xyes"; then
AC_MSG_CHECKING(what profiling flags to pass to the compiler)
profilingFLAGS="-pg"
CFLAGS="$CFLAGS $profilingFLAGS"
AC_MSG_RESULT($profilingFLAGS)
AC_DEFINE([ENABLE_PROFILING], [], [Build a bubblemon that bubbles a lot for a minute and then exits])
AC_MSG_WARN()
AC_MSG_WARN(You have enabled profiling by specifying the --enable-profiling switch.)
AC_MSG_WARN(Please don't install the applet the usual way; read the file PROFILING)
AC_MSG_WARN(for instructions.)
AC_MSG_WARN()
fi
PKG_CHECK_MODULES(libgtop,
[libgtop-2.0 >= 2.0.0],
,
AC_MSG_ERROR([libgtop 2.0 not found.]))
##############################
# GNOME 2.x specific tests
AC_ARG_ENABLE(
[gnome2],
[ --disable-gnome2 do not build GNOME 2 applet],
[gnome2=$enableval],
[gnome2=yes])
if test "x$gnome2" = "xyes"; then
PKG_CHECK_MODULES(GNOME2,
[libpanelapplet-2.0 >= 2.0.0],
,
AC_MSG_ERROR([GNOME2 panel applet library not found.]))
fi
##############################
# XFCE4 specific tests
AC_ARG_ENABLE(
[xfce4],
[ --enable-xfce4 build XFCE4 plugin],
[xfce4=$enableval],
[xfce4=no])
if test "x$xfce4" = "xyes"; then
PKG_CHECK_MODULES(XFCE,
[libxfcegui4-1.0 >= 4.3.20
libxfce4panel-1.0 >= 4.3.20],
,
AC_MSG_ERROR([XFCE4 panel plugin libraries not found.]))
fi
AC_SUBST(BUBBLEMON_CFLAGS)
AC_SUBST(BUBBLEMON_LIBS)
######################################################################
#
# Output our test results
#
#
AC_OUTPUT([
Makefile
m4/Makefile
po/Makefile.in
po/Makefile
src/Makefile
gnome/Makefile
pixmaps/Makefile
man/Makefile
man/bubblemon-gnome2.1
man/hu/Makefile
man/hu/bubblemon-gnome2.1
man/sv/Makefile
man/sv/bubblemon-gnome2.1
])