Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 270 lines (229 sloc) 9.258 kb
3115443 @djcb * configure.ac: check for webkit
authored
1 ## Copyright (C) 2008-2011 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
2b0aca1 @djcb * initial import of mu - the next generation
authored
2 ##
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 3 of the License, or
6 ## (at your option) any later version.
7 ##
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
12 ##
13 ## You should have received a copy of the GNU General Public License
14 ## along with this program; if not, write to the Free Software Foundation,
15 ## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16
b4de366 @djcb * configure.ac: bump version to 0.9.2, add m4 dir to config
authored
17 AC_INIT([mu],[0.9.2],[http://code.google.com/p/mu0/issues/list])
2b0aca1 @djcb * initial import of mu - the next generation
authored
18 AC_CONFIG_HEADERS([config.h])
a2fd42c @djcb * mu.c => mu.cc: force c++-linking
authored
19 AC_CONFIG_SRCDIR([src/mu.cc])
2b0aca1 @djcb * initial import of mu - the next generation
authored
20 AM_INIT_AUTOMAKE([dist-bzip2])
21
6d2cc60 @djcb * Makefile.am/configure.ac: some changes to make Solaris a bit happier
authored
22 # libtoolize wants to put some stuff in here; if you have an old
23 # autotools/libtool setup. you can try to comment this out
a53f549 @djcb * configure.ac/Makfile.am: add m4 as a macro dir, require stdc
authored
24 AC_CONFIG_MACRO_DIR([m4])
25
5fb788d @djcb * configure.ac: make silent-rules stuff optional
authored
26 # silent build if we have a new enough automake
27 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
f537016 @djcb * configure.ac: use AM_SILENT_RULES to make the build less noisy
authored
28
321cae6 @djcb * updato to build system, don't require too new libtool
authored
29 # for now, use AM_PROG_LIBTOOL, as we don't want to require
30 # a too new setup for autotools/libtool
31 AM_PROG_LIBTOOL
32 #LT_INIT([disable-shared])
2b0aca1 @djcb * initial import of mu - the next generation
authored
33
6f48dbe @djcb * configure.ac, mu-maildir.c: some compatibility updates
authored
34 AS_IF([test x$prefix = xNONE],[
35 prefix=/usr/local])
2b0aca1 @djcb * initial import of mu - the next generation
authored
36 AC_SUBST(prefix)
37
38 AC_PROG_CC
a53f549 @djcb * configure.ac/Makfile.am: add m4 as a macro dir, require stdc
authored
39 AC_PROG_CC_STDC
2b0aca1 @djcb * initial import of mu - the next generation
authored
40 AC_PROG_CXX
41 AC_HEADER_STDC
42
d14727c @djcb * dont't require direntry->d_type; this should help the Solaris build.
authored
43 # we need some special tricks for filesystems that don't have d_type;
44 # e.g. Solaris. See mu-maildir.c. Explicitly disabling it is for
45 # testing purposes only
46 AC_ARG_ENABLE([dirent-d-type],
47 AC_HELP_STRING([--disable-dirent-d-type],
48 [Don't use dirent->d_type, even if you have it]),
49 [], [AC_STRUCT_DIRENT_D_TYPE]
50 )
51 AS_IF([test "x$ac_cv_member_struct_dirent_d_type" != "xyes"],
52 [use_dirent_d_type="no"], [use_dirent_d_type="yes"])
6f48dbe @djcb * configure.ac, mu-maildir.c: some compatibility updates
authored
53
d14727c @djcb * dont't require direntry->d_type; this should help the Solaris build.
authored
54
55 # support for d_ino (inode) in struct dirent is optional; if it's
56 # available we can sort direntries by inode and access them in that
57 # order; this is much faster on some file systems (such as extfs3).
58 # Explicity disabling it is for testing purposes only.
59 AC_ARG_ENABLE([dirent-d-ino],
60 AC_HELP_STRING([--disable-dirent-d-ino],
61 [Don't use dirent->d_ino, even if you have it]),
62 [], [AC_STRUCT_DIRENT_D_INO]
63 )
64 AS_IF([test "x$ac_cv_member_struct_dirent_d_ino" != "xyes"],
65 [use_dirent_d_ino="no"], [use_dirent_d_ino="yes"])
2b0aca1 @djcb * initial import of mu - the next generation
authored
66
148db5a @djcb * configure.ac: cleanups
authored
67
d14727c @djcb * dont't require direntry->d_type; this should help the Solaris build.
authored
68 # we need these
69 AC_CHECK_FUNCS([memset memcpy realpath setlocale strerror])
70
148db5a @djcb * configure.ac: cleanups
authored
71 # require pkg-config
72 AC_PATH_PROG([PKG_CONFIG], [pkg-config], [no])
73 AS_IF([test "x$PKG_CONFIG" = "xno"],[
74 AC_MSG_ERROR([
75 *** The pkg-config script could not be found. Make sure it is
76 *** in your path, or set the PKG_CONFIG environment variable
77 *** to the full path to pkg-config.])
78 ])
79
2b0aca1 @djcb * initial import of mu - the next generation
authored
80 # glib2?
38f5c8a @djcb * make requirement for GIO optional (issue #22)
authored
81 PKG_CHECK_MODULES(GLIB, glib-2.0)
2b0aca1 @djcb * initial import of mu - the next generation
authored
82 AC_SUBST(GLIB_CFLAGS)
83 AC_SUBST(GLIB_LIBS)
6d2cc60 @djcb * Makefile.am/configure.ac: some changes to make Solaris a bit happier
authored
84 glib_version="`pkg-config --modversion glib-2.0`"
85
210895c @djcb * only build test cases when glib version >= 2.22
authored
86 # gtest was introduced in glib 2.16; but we're also using
87 # g_test_log_set_fatal_handler, which was introduced in 2.22
88 PKG_CHECK_MODULES(g_test,glib-2.0 >= 2.22, [have_gtest=yes],[have_gtest=no])
afcd800 @djcb * set up (unit) test framework using gtester
authored
89 AM_CONDITIONAL(HAVE_GTEST, test "x$have_gtest" = "xyes")
f8d9a64 @djcb * configure.ac: add HAVE_GLIB216, so we can use some it's stuff
authored
90 AM_CONDITIONAL(HAVE_GLIB216, test "x$have_gtest" = "xyes")
38f5c8a @djcb * make requirement for GIO optional (issue #22)
authored
91 AS_IF([test "x$have_gtest" = "xno"],[
92 AC_MSG_WARN([You need GLIB version >= 2.16 to build the tests])
93 ])
afcd800 @djcb * set up (unit) test framework using gtester
authored
94
95
0f9bd7c @djcb * update configure.ac for gmime-2.6 support
authored
96 # gmime 2.4 or 2.6? mu has only been tested with gmime-2.4, but Fedora
97 # 14 ships with gmime 2.5.x, which registers itself (pkgconfig) as 2.6
98 # it is reported mu works fine with this new gmime as well, so we support
99 # both; based on patch by GooseYArd
100 PKG_CHECK_MODULES(GMIME,gmime-2.4,[have_gmime_24=yes],[have_gmime_24=no])
101 AS_IF([test "x$have_gmime_24" = "xno"],[
102 PKG_CHECK_MODULES(GMIME,gmime-2.6,[have_gmime_26=yes],[have_gmime_26=no])
103 AS_IF([test "x$have_gmime_26" = "xno"],[
104 AC_MSG_ERROR([
105 *** neither gmime-2.4 nor gmime-2.6 could not be found; please install it
106 *** e.g., in debian/ubuntu the package would be 'libgmime-2.4-dev'
107 *** If you compiled it yourself, you should ensure that the pkgconfig
108 *** installation dir (e.g., /usr/local/lib/pkgconfig) is in your
109 *** PKG_CONFIG_PATH.
6d2cc60 @djcb * Makefile.am/configure.ac: some changes to make Solaris a bit happier
authored
110 ])],[
111 gmime_version="`pkg-config --modversion gmime-2.6`"
112 ])],[
113 gmime_version="`pkg-config --modversion gmime-2.4`"
114 ])
2b0aca1 @djcb * initial import of mu - the next generation
authored
115 AC_SUBST(GMIME_CFLAGS)
116 AC_SUBST(GMIME_LIBS)
0f9bd7c @djcb * update configure.ac for gmime-2.6 support
authored
117
148db5a @djcb * configure.ac: cleanups
authored
118
3115443 @djcb * configure.ac: check for webkit
authored
119 # webkit? needed for the fancy web widget
120 PKG_CHECK_MODULES(WEBKIT,webkit-1.0,[have_webkit=yes],[have_webkit=no])
121 AS_IF([test "x$have_webkit" = "xyes"],[
122 webkit_version="`pkg-config --modversion webkit-1.0`"])
123 AC_SUBST(WEBKIT_CFLAGS)
124 AC_SUBST(WEBKIT_LIBS)
125 AM_CONDITIONAL(HAVE_WEBKIT, [test "x$have_webkit" = "xyes"])
126
623ec34 @djcb * improvements in attachment / mime-part handling:
authored
127 # gio is needed for some widget/ things
128 PKG_CHECK_MODULES(GIO,gio-2.0,[have_gio=yes],[have_gio=no])
129 AS_IF([test "x$have_gio" = "xyes"],[
130 gio_version="`pkg-config --modversion gio-2.0`"])
131 AC_SUBST(GIO_CFLAGS)
132 AC_SUBST(GIO_LIBS)
133 AM_CONDITIONAL(HAVE_WEBKIT, [test "x$have_webkit" = "xyes"])
134
135 # should we build the widgets/ dir?
136 AM_CONDITIONAL(BUILD_WIDGETS, [test "x$have_webkit" = "xyes" -a "x$have_gio" = "xyes"])
148db5a @djcb * configure.ac: cleanups
authored
137
138 # xapian?
139 AC_CHECK_PROG(XAPIAN,xapian-config,xapian-config,no)
140 AM_CONDITIONAL(HAVE_XAPIAN,test "x$XAPIAN" != "xno")
141 AS_IF([test "x$XAPIAN" = "xno"],[
142 AC_MSG_ERROR([
143 *** xapian could not be found; please install it
144 *** e.g., in debian/ubuntu the package would be 'libxapian-dev'
145 *** If you compiled it yourself, you should ensure that xapian-config
146 *** is in your PATH.
147 ])
148 ],[
149 XAPIAN_CXXFLAGS=`$XAPIAN --cxxflags`
150 XAPIAN_LIBS=`$XAPIAN --libs`
151 have_xapian="yes"
152 xapian_version="`xapian-config --version`"
153 ])
154 AC_SUBST(XAPIAN_CXXFLAGS)
155 AC_SUBST(XAPIAN_LIBS)
156
a53f549 @djcb * configure.ac/Makfile.am: add m4 as a macro dir, require stdc
authored
157 # we set the set the version of the Xapian database layout here; it
158 # will become part of the db name, so we can automatically recreate the
159 # database when we incompatible have changes.
160 #
161 # note that MU_XAPIAN_DB_VERSION does not necessarily follow MU
162 # versioning, as we hopefully don't have updates for each version;
163 # also, this has nothing to do with Xapian's software version
321cae6 @djcb * updato to build system, don't require too new libtool
authored
164 AC_DEFINE(MU_XAPIAN_DB_VERSION,["9.0"], ['Schema' version of the database])
148db5a @djcb * configure.ac: cleanups
authored
165
8c372f9 @djcb * configure.ac: use gtk+ 2.x unless there is an explicit --with-gtk3. th...
authored
166 # we test for gtk, which we need if we want to build 'mug'; for
167 # experiments it can try to build with gtk3, but since that is still
168 # under development, you need to explicitly enable this with '--with-gtk3'
169 #
148db5a @djcb * configure.ac: cleanups
authored
170 have_gtk=no
8c372f9 @djcb * configure.ac: use gtk+ 2.x unless there is an explicit --with-gtk3. th...
authored
171 AC_ARG_WITH([gtk3],
172 [AS_HELP_STRING([--with-gtk3],
173 [enable support for gtk3])],
174 [],
175 [with_gtk3=no])
176
177 AS_IF([test "x$with_gtk3" != "xno"],[
178 PKG_CHECK_MODULES(GTK,gtk+-3.0,[have_gtk3=yes],[have_gtk3=no])
179 AC_SUBST(GTK_CFLAGS)
180 AC_SUBST(GTK_LIBS)
6d2cc60 @djcb * Makefile.am/configure.ac: some changes to make Solaris a bit happier
authored
181 gtk_version="`pkg-config --modversion gtk+-3.0`"
8c372f9 @djcb * configure.ac: use gtk+ 2.x unless there is an explicit --with-gtk3. th...
authored
182 ])
2b0aca1 @djcb * initial import of mu - the next generation
authored
183
8c372f9 @djcb * configure.ac: use gtk+ 2.x unless there is an explicit --with-gtk3. th...
authored
184 AS_IF([test "x$have_gtk3" != "xyes"],[
f2f5678 @djcb * try gtk+3 first, then gtk+2; mug works with both
authored
185 PKG_CHECK_MODULES(GTK,gtk+-2.0,[have_gtk2=yes],[have_gtk2=no])
186 AC_SUBST(GTK_CFLAGS)
187 AC_SUBST(GTK_LIBS)
6d2cc60 @djcb * Makefile.am/configure.ac: some changes to make Solaris a bit happier
authored
188 gtk_version="`pkg-config --modversion gtk+-2.0`"
70648b8 @djcb * merge start of simple gtk+ ui for mu: 'mug'
authored
189 ])
f2f5678 @djcb * try gtk+3 first, then gtk+2; mug works with both
authored
190 AM_CONDITIONAL(HAVE_GTK, [test "x$have_gtk2" = "xyes" -o "x$have_gtk3" = "xyes"])
191
6d2cc60 @djcb * Makefile.am/configure.ac: some changes to make Solaris a bit happier
authored
192 if test "x$have_gtk2" = "xyes" -o "x$have_gtk3" = "xyes"; then
193 have_gtk="yes"
194 else
195 have_gtk="no"
196 fi
623ec34 @djcb * improvements in attachment / mime-part handling:
authored
197
198 # check for xdg-open
199 AC_PATH_PROG(XDGOPEN, [xdg-open], [], [$PATH])
200 AS_IF([test "x$XDGOPEN" != "x"],[
201 AC_DEFINE_UNQUOTED([XDGOPEN], ["$XDGOPEN"],[Path to xdg-open])],[
202 AC_MSG_WARN([xdg-open not found, mu cannot open attachments])])
203
6d2cc60 @djcb * Makefile.am/configure.ac: some changes to make Solaris a bit happier
authored
204
8b70e6b @djcb * configure.ac: unbreak McCabe tool checking
authored
205 # check for pmccabe
206 AC_PATH_PROG([PMCCABE],[pmccabe],[pmccabe],[no])
207 AS_IF([test "x$PMCCABE" = "xno"],[
6d2cc60 @djcb * Makefile.am/configure.ac: some changes to make Solaris a bit happier
authored
208 have_pmccabe="no"
148db5a @djcb * configure.ac: cleanups
authored
209 AC_MSG_WARN([
210 *** Developers: you don't seem to have the 'pmccabe' tool installed.
211 *** Please install it if you want to run the automated code checks])
6d2cc60 @djcb * Makefile.am/configure.ac: some changes to make Solaris a bit happier
authored
212 ],[
8b70e6b @djcb * configure.ac: unbreak McCabe tool checking
authored
213 have_pmccabe="yes"
6d2cc60 @djcb * Makefile.am/configure.ac: some changes to make Solaris a bit happier
authored
214 ])
8c372f9 @djcb * configure.ac: use gtk+ 2.x unless there is an explicit --with-gtk3. th...
authored
215
696f086 @djcb * update configure.ac (using autoupdate)
authored
216 AC_CONFIG_FILES([
2b0aca1 @djcb * initial import of mu - the next generation
authored
217 Makefile
218 src/Makefile
afcd800 @djcb * set up (unit) test framework using gtester
authored
219 src/tests/Makefile
b46d591 @djcb * start working on some mu-based widgets (widgets/), create toys2/mug2 f...
authored
220 widgets/Makefile
45c95b0 @djcb * move mug/ to toys/mug
authored
221 toys/Makefile
222 toys/mug/Makefile
b46d591 @djcb * start working on some mu-based widgets (widgets/), create toys2/mug2 f...
authored
223 toys/mug2/Makefile
90c9b61 @djcb * update configuration files
authored
224 man/Makefile
cbeb229 @djcb * configure.ac: add missing m4/Makefile
authored
225 m4/Makefile
37b0ea3 @djcb * small updates
authored
226 contrib/Makefile
2b0aca1 @djcb * initial import of mu - the next generation
authored
227 ])
696f086 @djcb * update configure.ac (using autoupdate)
authored
228 AC_OUTPUT
2b0aca1 @djcb * initial import of mu - the next generation
authored
229
826aeb6 @djcb * Makefile.am, configure.ac: clear up the pmccabe stuff a bit
authored
230 echo
231 echo "mu configuration is complete."
232 echo "-----------------------------"
233
148db5a @djcb * configure.ac: cleanups
authored
234 if test -e ~/.mu/xapian-0.6; then
235 echo "Note: since version 0.7, the Xapian database is no longer stored as "
236 echo "~/.mu/xapian-0.6 but instead simply as ~/.mu/xapian. You can "
237 echo "remove the old <muhome>/xapian-0.6 directory to save some disk space"
238 fi
239
d14727c @djcb * dont't require direntry->d_type; this should help the Solaris build.
authored
240
148db5a @djcb * configure.ac: cleanups
authored
241 echo "Xapian version : $xapian_version"
6d2cc60 @djcb * Makefile.am/configure.ac: some changes to make Solaris a bit happier
authored
242 echo "GLib version : $glib_version"
243 echo "GMime version : $gmime_version"
3115443 @djcb * configure.ac: check for webkit
authored
244
6d2cc60 @djcb * Makefile.am/configure.ac: some changes to make Solaris a bit happier
authored
245 if test "x$have_gtk" != "xno"; then
246 echo "GTK+ version : $gtk_version"
247 fi
248
623ec34 @djcb * improvements in attachment / mime-part handling:
authored
249 if test "x$have_gio" = "xyes"; then
250 echo "GIO version : $gio_version"
251 fi
252
253 if test "x$have_webkit" = "xyes"; then
3115443 @djcb * configure.ac: check for webkit
authored
254 echo "Webkit version : $webkit_version"
255 fi
256
6d2cc60 @djcb * Makefile.am/configure.ac: some changes to make Solaris a bit happier
authored
257 echo
210895c @djcb * only build test cases when glib version >= 2.22
authored
258 echo "Build unit tests (glib >= 2.22) : $have_gtest"
8b70e6b @djcb * configure.ac: unbreak McCabe tool checking
authored
259 echo "Build 'mug' (requires GTK+) : $have_gtk"
260 echo "McCabe's Cyclomatic Complexity tool : $have_pmccabe"
623ec34 @djcb * improvements in attachment / mime-part handling:
authored
261 echo "xdg-open : $XDGOPEN"
d14727c @djcb * dont't require direntry->d_type; this should help the Solaris build.
authored
262 echo
263
6d2cc60 @djcb * Makefile.am/configure.ac: some changes to make Solaris a bit happier
authored
264 echo "Have direntry->d_ino : $use_dirent_d_ino"
265 echo "Have direntry->d_type : $use_dirent_d_type"
6f48dbe @djcb * configure.ac, mu-maildir.c: some compatibility updates
authored
266
525b99f @djcb * configure.ac: configuration fixes; set database layout version
authored
267 echo
826aeb6 @djcb * Makefile.am, configure.ac: clear up the pmccabe stuff a bit
authored
268 echo "type 'make' to build mu, or 'make check' to run the unit tests."
37b0ea3 @djcb * small updates
authored
269 echo "use 'make V=1' to show the detailed output during the build"
Something went wrong with that request. Please try again.