1
# Copyright © 2000-2004 Marco Pesenti Gritti
2
# Copyright © 2003, 2004, 2005, 2006, 2007 Christian Persch
4
# This program is free software; you can redistribute it and/or modify it
5
# under the terms of the GNU General Public License as published by the
6
# Free Software Foundation; either version 2 of the License, or (at your
7
# option) any later version.
9
# This program is distributed in the hope that it will be useful, but
10
# WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
# General Public License for more details.
14
# You should have received a copy of the GNU General Public License along
15
# with this program; if not, write to the Free Software Foundation, Inc.,
16
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
m4_define([epiphany_version_major],[2])
19
m4_define([epiphany_version_minor],[30])
20
m4_define([epiphany_version_micro],[6])
21
m4_define([epiphany_version],[epiphany_version_major.epiphany_version_minor.epiphany_version_micro])
23
# This can be either "trunk" or "branches/gnome-x-y"
24
m4_define([epiphany_branch],["trunk"])
26
AC_INIT([GNOME Web Browser],[epiphany_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=epiphany],[epiphany])
32
AC_CONFIG_MACRO_DIR([m4])
33
AC_CONFIG_HEADERS([config.h])
34
AC_CONFIG_SRCDIR([configure.ac])
36
EPIPHANY_API_VERSION=2.29
38
# This should stay at the major version of the latest stable releases
39
EPIPHANY_UA_VERSION=2.30
41
AC_SUBST([EPIPHANY_MAJOR],[epiphany_version_major.epiphany_version_minor])
42
AC_SUBST([EPIPHANY_API_VERSION])
43
AC_SUBST([EPIPHANY_UA_VERSION])
45
# for EPHY_CHECK_VERSION
46
AC_SUBST([EPIPHANY_MAJOR_VERSION], [epiphany_version_major])
47
AC_SUBST([EPIPHANY_MINOR_VERSION], [epiphany_version_minor])
48
AC_SUBST([EPIPHANY_MICRO_VERSION], [epiphany_version_micro])
51
BUILDID="$(TZ=UTC0 date +'%Y%m%d')"
54
AM_INIT_AUTOMAKE([1.9 foreign dist-bzip2 no-dist-gzip tar-ustar])
56
# Use AM_SILENT_RULES if present
57
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
59
AM_MAINTAINER_MODE([enable])
61
AC_ENABLE_SHARED([yes])
62
AC_ENABLE_STATIC([no])
73
AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
74
AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
76
IT_PROG_INTLTOOL([0.40.0])
81
GNOME_COMPILE_WARNINGS([maximum])
82
GNOME_MAINTAINER_MODE_DEFINES
87
if test "$enable_maintainer_mode" = "yes"; then
88
AC_DEFINE([MAINTAINER_MODE],[1],[Define to enable 'maintainer-only' behaviour])
90
DEPRECATION_FLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
95
LIBXML_REQUIRED=2.6.12
96
LIBXSLT_REQUIRED=1.1.7
97
LIBSTARTUP_NOTIFICATION_REQUIRED=0.5
98
LIBNOTIFY_REQUIRED=0.4
99
DBUS_GLIB_REQUIRED=0.35
100
WEBKIT_GTK_REQUIRED=1.2.3
101
LIBSOUP_GNOME_REQUIRED=2.29.91
102
GNOME_KEYRING_REQUIRED=2.26.0
104
PKG_CHECK_EXISTS([libnotify >= $LIBNOTIFY_REQUIRED],[have_libnotify=yes],[have_libnotify=no])
107
if test "$have_libnotify" = "yes"; then
108
LIBNOTIFY_PACKAGE="libnotify >= $LIBNOTIFY_REQUIRED"
109
AC_DEFINE([HAVE_LIBNOTIFY],[1],[Define if libnotify is available])
114
AC_MSG_CHECKING([whether to build tests])
115
AC_ARG_ENABLE([tests],
116
AS_HELP_STRING([--enable-tests],[Wheter to build tests (default: yes)]),
117
[], [enable_tests=yes])
118
AC_MSG_RESULT([$enable_tests])
120
AM_CONDITIONAL([ENABLE_TESTS],[test "$enable_tests" = "yes"])
122
PKG_CHECK_MODULES([DEPENDENCIES], [
123
glib-2.0 >= $GLIB_REQUIRED
126
gio-unix-2.0 >= $GLIB_REQUIRED
127
gtk+-2.0 >= $GTK_REQUIRED
128
gtk+-unix-print-2.0 >= $GTK_REQUIRED
132
libxml-2.0 >= $LIBXML_REQUIRED
133
libxslt >= $LIBXSLT_REQUIRED
135
libstartup-notification-1.0 >= $LIBSTARTUP_NOTIFICATION_REQUIRED
137
webkit-1.0 >= $WEBKIT_GTK_REQUIRED
138
libsoup-gnome-2.4 >= $LIBSOUP_GNOME_REQUIRED
139
gnome-keyring-1 >= $GNOME_KEYRING_REQUIRED
146
PKG_CHECK_MODULES([DBUS],[dbus-glib-1 >= $DBUS_GLIB_REQUIRED])
148
AC_PATH_PROG([DBUS_BINDING_TOOL],[dbus-binding-tool],[no])
150
if test "$DBUS_BINDING_TOOL" = "no"; then
151
AC_MSG_ERROR([dbus-binding-tool not found])
160
AC_PATH_PROG([GCONFTOOL], [gconftool-2], [no])
162
if test "$GCONFTOOL" = "no"; then
163
AC_MSG_ERROR([gconftool-2 not found])
170
AC_CHECK_FUNCS([localtime_r memchr memmove memset mkdir mkdtemp realpath sqrt strchr strcspn strdup strerror strrchr strtol strtoul strstr])
173
AC_CHECK_HEADERS([execinfo.h fcntl.h])
179
# Check for -Wdeclaration-after-statement (since gcc 3.4)
181
if test "$enable_maintainer_mode" = "yes"; then
184
_FLAGS="-Wdeclaration-after-statement"
186
CFLAGS="$CFLAGS $_FLAGS"
188
AC_CACHE_CHECK([for compiler $FLAGS option],
189
ac_cv_have_declaration_after_statement,
191
[AC_LANG_SOURCE([[int main () { return 0; }]])],
192
[ac_cv_have_declaration_after_statement="yes"],
193
[ac_cv_have_declaration_after_statement="no"],
194
[ac_cv_have_declaration_after_statement="maybe"])])
196
if test "$ac_cv_have_declaration_after_statement" = "yes"; then
197
MORE_WARN_FLAGS="$MORE_WARN_FLAGS $_FLAGS"
199
CFLAGS="$_SAVE_CFLAGS"
207
AC_CHECK_HEADERS([X11/XF86keysym.h])
211
# *********************
212
# GObject Introspection
213
# *********************
215
GOBJECT_INTROSPECTION_CHECK([0.6.7])
217
if test "$found_introspection" = "yes"; then
218
EPIPHANY_FEATURES="$EPIPHANY_FEATURES introspection"
219
AC_DEFINE([ENABLE_INTROSPECTION], [1], [Define to enable introspection support])
226
AC_MSG_CHECKING([whether Seed support is requested])
227
AC_ARG_ENABLE([seed],
228
[AS_HELP_STRING([--enable-seed],[Enable Seed support (default: disabled)])],
230
AC_MSG_RESULT([$enable_seed])
232
if test "$enable_seed" = "yes" -a "$found_introspection" != "yes"; then
233
AC_MSG_ERROR([GObject introspection support must be enabled for Seed])
236
if test "$enable_seed" = "yes"; then
237
EPIPHANY_FEATURES="$EPIPHANY_FEATURES seed"
239
SEED_REQUIRED=2.27.91
240
PKG_CHECK_MODULES([SEED],[seed >= $SEED_REQUIRED])
242
AC_DEFINE([ENABLE_SEED],[1],[Define to compile with Seed support])
245
AM_CONDITIONAL([ENABLE_SEED],[test "$enable_seed" = "yes"])
247
# *********************
248
# CA Certificate file
249
# Stolen from GIO's TLS
250
# *********************
252
AC_MSG_CHECKING([location of system Certificate Authority list])
254
[AC_HELP_STRING([--with-ca-file=@<:@path@:>@],
255
[path to system Certificate Authority list])])
256
if test "$with_ca_file" = "no"; then
257
AC_MSG_RESULT([disabled])
259
if test -z "$with_ca_file"; then
260
for f in /etc/pki/tls/certs/ca-bundle.crt \
261
/etc/ssl/certs/ca-certificates.crt; do
262
if test -f "$f"; then
266
if test -z "$with_ca_file"; then
267
AC_MSG_ERROR([could not find. Use --with-ca-file=path to set, or --without-ca-file to disable])
271
AC_MSG_RESULT($with_ca_file)
272
if ! test -f "$with_ca_file"; then
273
AC_MSG_ERROR([No such file '$with_ca_file'. Use --with-ca-file=path to set, or --without-ca-file to disable])
275
GTLS_SYSTEM_CA_FILE="$with_ca_file"
277
AC_DEFINE_UNQUOTED([GTLS_SYSTEM_CA_FILE], ["$GTLS_SYSTEM_CA_FILE"], [path to system Certificate Authority list])
284
AC_MSG_CHECKING([whether NSS support is requested])
286
[AS_HELP_STRING([--enable-nss], [Enable NSS support (default: enabled)])],
287
[], [enable_nss=yes])
288
AC_MSG_RESULT([$enable_nss])
290
if test "$enable_nss" = "yes"; then
291
PKG_CHECK_MODULES([NSS], [nss])
293
AC_DEFINE([ENABLE_NSS], [1], [Define to compile with NSS support])
296
AM_CONDITIONAL([ENABLE_NSS],[test "$enable_nss" = "yes"])
298
AC_SUBST([EPIPHANY_FEATURES])
300
# *******************
301
# Additional features
302
# *******************
304
# Zeroconf bookmarks sites
306
AC_MSG_CHECKING([whether to enable zeroconf bookmarks support])
307
AC_ARG_ENABLE([zeroconf],
308
AS_HELP_STRING([--disable-zeroconf],[Whether to enable zeroconf bookmarks support (default: autodetect)]),
309
[], [enable_zeroconf=auto])
310
AC_MSG_RESULT([$enable_zeroconf])
312
if test "$enable_zeroconf" != "no"; then
313
AVAHI_REQUIRED=0.6.22
315
PKG_CHECK_MODULES(AVAHI,
316
[avahi-gobject >= $AVAHI_REQUIRED
317
avahi-client >= $AVAHI_REQUIRED]
318
,[have_avahi=yes],[have_avahi=no])
320
if test "$enable_zeroconf" = "yes" -a "$have_avahi" = "no"; then
321
AC_MSG_ERROR([zeroconf support was requested but avahi not found])
322
elif test "$have_avahi" = "yes"; then
329
if test "$enable_zeroconf" = "yes"; then
330
AC_DEFINE([ENABLE_ZEROCONF],[1],[Define to enable zeroconf bookmarks support])
333
AM_CONDITIONAL([ENABLE_ZEROCONF],[test "$enable_zeroconf" = "yes"])
337
AC_MSG_CHECKING([whether to enable NetworkManager support])
338
AC_ARG_ENABLE([network-manager],
339
AS_HELP_STRING([--enable-network-manager],[Whether to enable automatic network status with NetworkManager (default: disabled)]),
340
[],[enable_network_manager=no])
341
AC_MSG_RESULT([$enable_network_manager])
343
if test "$enable_network_manager" != "no"; then
344
PKG_CHECK_MODULES(NETWORK_MANAGER, NetworkManager, [have_network_manager=yes],[have_network_manager=no])
346
if test "$enable_network_manager" = "yes" -a "$have_network_manager" = "no"; then
347
AC_MSG_ERROR([NetworkManager support requested but NetworkManager headers not found])
348
elif test "$have_network_manager" = "no"; then
349
AC_MSG_WARN([NetworkManager headers not found; disabling NetworkManager support])
353
if test "$enable_network_manager" = "yes"; then
354
AC_DEFINE([ENABLE_NETWORK_MANAGER],[1],[Define for NetworkManager support])
357
AM_CONDITIONAL([ENABLE_NETWORK_MANAGER],[test "$enable_network_manager" = "yes"])
363
# uninstalled share dir to search data
364
AC_DEFINE_UNQUOTED([SHARE_UNINSTALLED_DIR], ["`pwd`/data"], [path to source data dir])
366
# *******************************
368
# *******************************
370
AM_CPPFLAGS="$AM_CPPFLAGS $DEPRECATION_FLAGS"
371
AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS $MORE_WARN_FLAGS"
372
AC_SUBST([AM_CPPFLAGS])
373
AC_SUBST([AM_CFLAGS])
374
AC_SUBST([AM_LDFLAGS])
376
# *******************************
377
# Internationalization
378
# *******************************
380
ISO_CODES_REQUIRED=0.35
382
PKG_CHECK_EXISTS([iso-codes >= $ISO_CODES_REQUIRED],
383
[have_iso_codes=yes],[have_iso_codes=no])
385
if test "$have_iso_codes" = "yes"; then
386
AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
387
if $PKG_CONFIG --variable=domains iso-codes | grep -q 639 && \
388
$PKG_CONFIG --variable=domains iso-codes | grep -q 3166 ; then
394
AC_MSG_RESULT([$result])
397
if test "$have_iso_codes" = "yes"; then
398
AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["`$PKG_CONFIG --variable=prefix iso-codes`"],[ISO codes prefix])
399
AC_DEFINE([HAVE_ISO_CODES],[1],[Define if you have the iso-codes package])
401
AC_MSG_ERROR([iso-codes is required])
404
GETTEXT_PACKAGE=epiphany
405
AC_SUBST([GETTEXT_PACKAGE])
406
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
409
AM_CONDITIONAL([ENABLE_SPELLCHECKER],[false])
415
AC_ARG_WITH([distributor-name],
416
AS_HELP_STRING([--with-distributor-name=name],[Set the distributor name]),
417
[LSB_DISTRIBUTOR="$withval"])
419
if test -z "$LSB_DISTRIBUTOR"; then
420
AC_CHECK_PROGS([LSB_RELEASE], [lsb_release],)
421
if test -n "$LSB_RELEASE"; then
422
# Fallback on lsb_release if available
423
LSB_DISTRIBUTOR=$($LSB_RELEASE -i -s)
425
# Fallback on the product name
426
LSB_DISTRIBUTOR="Epiphany"
430
AC_DEFINE_UNQUOTED([LSB_DISTRIBUTOR],["$LSB_DISTRIBUTOR"],[Distributor name])
443
AC_DEFINE([EPIPHANY_COMPILATION],[1],[Compiling epiphany])
448
data/epiphany-${EPIPHANY_API_VERSION}.pc:data/epiphany.pc.in
449
data/epiphany.desktop.in
456
doc/reference/Makefile
462
src/bookmarks/Makefile
469
[EPIPHANY_API_VERSION=$EPIPHANY_API_VERSION])
473
# *************************************
474
# *************************************
477
Epiphany was configured with the following options:
479
Source code location : $srcdir
482
Extra debugging support : $enable_debug
484
Zeroconf bookmarks support : $enable_zeroconf
485
NetworkManager support : $enable_network_manager
486
GObject introspection : $found_introspection
487
Seed support : $enable_seed
488
NSS support : $enable_nss
489
Build tests : $enable_tests
490
CA Certificates file : $GTLS_SYSTEM_CA_FILE