forked from alarm-clock-applet/alarm-clock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
165 lines (129 loc) · 4.61 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
# ***************************************************************************
# *** configure.ac for ALARM-CLOCK ***
# ***************************************************************************
m4_define([alarm_clock_major_version], [0])
m4_define([alarm_clock_minor_version], [3])
m4_define([alarm_clock_micro_version], [4])
m4_define([alarm_clock_version],
[alarm_clock_major_version.alarm_clock_minor_version.alarm_clock_micro_version])
AC_INIT([alarm-clock], [alarm_clock_version],
[https://bugs.launchpad.net/alarm-clock],
[alarm-clock-applet])
AC_CONFIG_SRCDIR([src])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign 1.11 -Wall silent-rules])
AM_MAINTAINER_MODE([enable])
AM_SILENT_RULES([yes])
# Substitute variables
ALARM_CLOCK_MAJOR_VERSION=alarm_clock_major_version
ALARM_CLOCK_MINOR_VERSION=alarm_clock_minor_version
ALARM_CLOCK_MICRO_VERSION=alarm_clock_micro_version
AC_SUBST(ALARM_CLOCK_MAJOR_VERSION)
AC_SUBST(ALARM_CLOCK_MINOR_VERSION)
AC_SUBST(ALARM_CLOCK_MICRO_VERSION)
PKG_PROG_PKG_CONFIG
AC_PROG_CC
AC_PROG_INSTALL
# *****
# GNOME
# *****
GNOME_COMMON_INIT
GNOME_DEBUG_CHECK
GNOME_COMPILE_WARNINGS([maximum])
GNOME_MAINTAINER_MODE_DEFINES
# ***************************
# Check for required packages
# ***************************
GLIB_REQUIRED=2.16.0
GTK_REQUIRED=2.12.0
PKG_CHECK_MODULES(BASE, [glib-2.0 >= $GLIB_REQUIRED gmodule-2.0])
PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= $GTK_REQUIRED])
PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0])
PKG_CHECK_MODULES(GNOME,
[gconf-2.0
gio-2.0
gnome-icon-theme
libnotify >= 0.4.1
libxml-2.0
unique-1.0])
# Check for gconftool
AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
if test x"$GCONFTOOL" = xno; then
AC_MSG_ERROR([gconftool-2 executable not found in your path - is gconf installed?])
fi
AM_GCONF_SOURCE_2
#
# Check for libnotify 0.7
#
PKG_CHECK_MODULES(LIBNOTIFY_0_7, libnotify >= 0.7, have_libnotify_0_7=yes, have_libnotify_0_7=no)
if test x$have_libnotify_0_7 = xyes ; then
AC_DEFINE(HAVE_LIBNOTIFY_0_7, 1, [Have libnotify 0.7])
fi
AM_CONDITIONAL(HAVE_LIBNOTIFY_0_7, test x$have_libnotify_0_7 = xyes)
#
# Check for AppIndicator (optional)
#
APPINDICATOR_REQUIRED=0.0.7
AC_ARG_ENABLE(appindicator,
AS_HELP_STRING([--enable-appindicator[=@<:@no/auto/yes@:>@]],[Build support for application indicators ]),
[enable_appindicator=$enableval],
[enable_appindicator="auto"])
if test x$enable_appindicator = xauto ; then
PKG_CHECK_EXISTS([appindicator-0.1 >= $APPINDICATOR_REQUIRED],
enable_appindicator="yes",
enable_appindicator="no")
fi
if test x"$enable_appindicator" = xyes ; then
PKG_CHECK_EXISTS([appindicator-0.1],,
AC_MSG_ERROR([appindicator-0.1 is not installed]))
PKG_CHECK_MODULES(APP_INDICATOR,
[appindicator-0.1 >= 0.4.90],
[have_appindicator_0_4_90=yes],
[have_appindicator_0_4_90=no;
PKG_CHECK_MODULES(APP_INDICATOR, [appindicator-0.1 >= $APPINDICATOR_REQUIRED])])
# AC_SUBST(APP_INDICATOR_CFLAGS)
# AC_SUBST(APP_INDICATOR_LIBS)
AC_DEFINE(HAVE_APP_INDICATOR, 1, [Have AppIndicator])
if test "$have_appindicator_0_4_90" = "yes"; then
AC_DEFINE(HAVE_APP_INDICATOR_0_4_90, 1, [Have AppIndicator 0.4.90])
fi
fi
AM_CONDITIONAL(HAVE_APP_INDICATOR, test x"$enable_appindicator" = xyes)
# ********************
# Internationalisation
# ********************
IT_PROG_INTLTOOL([0.40.0])
GETTEXT_PACKAGE=alarm-clock-applet
AC_SUBST([GETTEXT_PACKAGE])
#ALL_LINGUAS=""
AM_GLIB_GNU_GETTEXT
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [gettext domain])
#localedir='$(datadir)/locale'
# *******************
# Run in source tree?
# *******************
AC_ARG_ENABLE(run-in-source-tree,
AC_HELP_STRING([--disable-run-in-source-tree],
[disable search for UI files and plugins in local directory]),,
enable_run_in_source_tree=yes)
if test x$enable_run_in_source_tree = xyes; then
AC_DEFINE(ALARM_CLOCK_RUN_IN_SOURCE_TREE, 1, [enable search for UI files and plugins in local directory])
fi
# ****************************
AC_CONFIG_FILES([Makefile
src/Makefile
src/tests/Makefile
data/Makefile
data/icons/Makefile
po/Makefile.in])
AC_OUTPUT
# ****************************
echo "
*************************************************
$PACKAGE_NAME $VERSION
Configure summary:
prefix: ${prefix}
source code location: ${srcdir}
application indicators: ${enable_appindicator}
*************************************************
"