This repository was archived by the owner on Aug 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathconfigure.ac
192 lines (152 loc) · 5.04 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
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
AC_INIT([giggle],[0.4.91],
[http://bugzilla.gnome.org/enter_bug.cgi?product=giggle])
AC_SUBST([LIBGIGGLE_ABI], [0:0:0])
AC_SUBST([LIBGIGGLE_GIT_ABI], [0:0:0])
AC_CONFIG_SRCDIR([src/giggle-main.c])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([-Wall -Werror])
AC_CONFIG_HEADERS([config.h])
AC_DISABLE_STATIC
CXX=no
F77=no
LT_PREREQ([2.2])
LT_INIT
AC_ISC_POSIX
AC_PROG_CC
AC_HEADER_STDC
AM_PATH_GLIB_2_0
dnl Defined in acinclude.m4
IMENDIO_COMPILE_WARNINGS
dnl ------------------
dnl | Pkgconfig checks |---------------------------------------
dnl ------------------
PKG_CHECK_MODULES(GIGGLE, [
gio-2.0 >= 2.18
glib-2.0 >= 2.18
gthread-2.0 >= 2.16
gtk+-2.0 >= 2.12
gtksourceview-2.0 > 2.0
libglade-2.0 > 2.4
])
dnl -----------------------
dnl | Evolution Data Server |-----------------------------------
dnl -----------------------
AC_ARG_ENABLE([evolution-data-server],
[AS_HELP_STRING([--disable-evolution-data-server],
[disable features using Evolution Data Server])],,
[enable_evolution_data_server=yes])
if test "$enable_evolution_data_server" = "yes"
then
PKG_CHECK_MODULES(EBOOK, [libebook-1.2])
AC_DEFINE(ENABLE_EDS, 1, [Use features from libebook])
fi
AM_CONDITIONAL([ENABLE_EDS], [test "$enable_evolution_data_server" = "yes"])
dnl ------------------
dnl | terminal support |-----------------------------------
dnl ------------------
AC_ARG_ENABLE([terminal],
[AS_HELP_STRING([--disable-terminal],
[disable features using vte terminal widget])],,
[enable_terminal=yes])
if test "$enable_terminal" = "yes"
then
PKG_CHECK_MODULES(VTE, [vte >= 0.17])
AC_DEFINE(ENABLE_VTE, 1, [Use features from vte])
fi
AM_CONDITIONAL([ENABLE_VTE], [test "$enable_terminal" = "yes"])
dnl ----------------------
dnl | library requirements |-----------------------------------
dnl ----------------------
AC_DEFINE(_GNU_SOURCE, 1, [Enable GNU Extensions])
dnl Make sure that strptime can be used (read: has gnu extensions)
AC_MSG_CHECKING([for GNU extensions of strptime()])
AC_RUN_IFELSE(
AC_LANG_PROGRAM(
[[#include <time.h>]],
[[const char* date = "1168635922 +0100"; struct tm tm;
char const* returned = strptime(date, "%s %z", &tm);
return (!returned || *returned ? 1 : 0);]]),
[AC_MSG_RESULT(available)
AC_DEFINE([STRPTIME_HAS_GNU], [1],
[strptime() has GNU extensions %s and %z])],
[AC_MSG_RESULT(not available)])
dnl Figure out which format string to use for time_t
AC_MSG_CHECKING([size of time_t type])
AC_RUN_IFELSE(
AC_LANG_PROGRAM(
[[#include <time.h>]],
[[return (sizeof (time_t) == sizeof (long) ? 0 : 1);]]),
[AC_MSG_RESULT(long)
AC_DEFINE([GIGGLE_FORMAT_TIME_T], ["ld"], [format string for time_t])],
[AC_MSG_RESULT(int)
AC_DEFINE([GIGGLE_FORMAT_TIME_T], ["d"], [format string for time_t])])
dnl ------------------
dnl | Language Support |---------------------------------------
dnl ------------------
GETTEXT_PACKAGE=giggle
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[Gettext package name])
AM_GLIB_DEFINE_LOCALEDIR(LOCALEDIR)
AM_GLIB_GNU_GETTEXT
IT_PROG_INTLTOOL([0.35.0])
AC_SUBST([CONFIG_STATUS_DEPENDENCIES],['$(top_srcdir)/po/LINGUAS'])
dnl -----------------------
dnl | GTK+ platform check |----------------------------------
dnl -----------------------
IGE_PLATFORM_CHECK
if test "x$IGE_PLATFORM" = xx11; then
PLATFORM_CFLAGS=
PLATFORM_LDFLAGS=
else
PLATFORM_CFLAGS=
PLATFORM_LDFLAGS="-framework Carbon"
fi
AC_SUBST(PLATFORM_CFLAGS)
AC_SUBST(PLATFORM_LDFLAGS)
dnl -----------------------
dnl | GIT command detection |----------------------------------
dnl -----------------------
AC_ARG_WITH([git-command],
[AS_HELP_STRING([--with-git-command=PATH], [path to git command])])
GIT_COMMAND=$with_git_command
if test x"$GIT_COMMAND" = x; then
AC_PATH_PROG(GIT_COMMAND, git, [no])
else
if ! test -x "$GIT_COMMAND"; then
GIT_COMMAND=no
fi
fi
if test "$GIT_COMMAND" = no; then
AC_MSG_ERROR([git command not found in path])
else
AC_SUBST(GIT_COMMAND)
AC_DEFINE_UNQUOTED(GIT_COMMAND,"$GIT_COMMAND",[GIT command path])
fi
dnl -----------------------------------------------------------
dnl This will cause the automake generated makefiles to pass the
dnl correct flags to aclocal.
ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
AC_SUBST(ACLOCAL_AMFLAGS)
SHAVE_INIT([.])
AC_CONFIG_FILES([
shave
shave-libtool
Makefile
data/Makefile
libgiggle/Makefile
libgiggle-git/Makefile
plugins/Makefile
src/Makefile
pixmaps/Makefile
po/Makefile.in
test/Makefile
])
AC_OUTPUT
echo
echo "Prefix: $prefix"
echo "GIT command path: $GIT_COMMAND"
echo "Use Evolution Data Server: $enable_evolution_data_server"
echo "Use VTE terminal widget: $enable_terminal"
echo