Changed EphyHistoryWindow to use the new backend, some things still remain (selected_...
[ephy-soc.git] / configure.ac
blob33a1571506460c24a805ee205ef98dc7bf4e762e
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 AC_INIT([GNOME Web Browser],[2.19.6],[http://bugzilla.gnome.org/enter_bug.cgi?product=epiphany],[epiphany])
20 GNOME_COMMON_INIT
22 AC_PREREQ([2.59])
24 AC_CONFIG_MACRO_DIR([m4])
25 AC_CONFIG_HEADERS([config.h])
26 AC_CONFIG_SRCDIR([configure.ac])
28 EPIPHANY_MAJOR=2.19
29 EPIPHANY_API_VERSION=2.19
31 # This should stay at the major version of the latest stable releases
32 EPIPHANY_UA_VERSION=2.18
34 AC_SUBST([EPIPHANY_MAJOR])
35 AC_SUBST([EPIPHANY_API_VERSION])
36 AC_SUBST([EPIPHANY_UA_VERSION])
38 AM_INIT_AUTOMAKE([1.9 foreign dist-bzip2 no-dist-gzip])
40 AM_MAINTAINER_MODE
42 AC_ENABLE_SHARED([yes])
43 AC_ENABLE_STATIC([no])
45 AC_LIBTOOL_DLOPEN
46 AC_PROG_LIBTOOL
48 AC_ISC_POSIX
49 AC_PROG_CC
50 AC_PROG_CXX
51 AM_PROG_CC_STDC
52 AC_HEADER_STDC
53 AC_PATH_PROG([GLIB_GENMARSHAL], [glib-genmarshal])
54 AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
56 IT_PROG_INTLTOOL([0.35.0])
58 PKG_PROG_PKG_CONFIG
60 GNOME_DEBUG_CHECK
61 GNOME_COMPILE_WARNINGS([maximum])
62 GNOME_CXX_WARNINGS
63 GNOME_MAINTAINER_MODE_DEFINES
65 MORE_WARN_FLAGS=
66 DEPRECATION_FLAGS=
67 MOZILLA_WARN_CXXFLAGS="-Wno-ctor-dtor-privacy -Wno-non-virtual-dtor"
69 if test "x$enable_maintainer_mode" = "xyes"; then
70         AC_DEFINE([MAINTAINER_MODE],[1],[Define to enable 'maintainer-only' behaviour])
71         enable_debug=yes
72 # -DGTK_DISABLE_DEPRECATED 
73         DEPRECATION_FLAGS="-DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGCONF_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DLIBGLADE_DISABLE_DEPRECATED -DPANGO_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED"
74         MOZILLA_WARN_CXXFLAGS="-Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth $MOZILLA_WARN_CXXFLAGS"
77 GLIB_REQUIRED=2.12.0
78 GTK_REQUIRED=2.10.0
79 LIBXML_REQUIRED=2.6.12
80 LIBXSLT_REQUIRED=1.1.7
81 LIBGLADE_REQUIRED=2.3.1
82 LIBGNOMEVFS_REQUIRED=2.9.2
83 LIBGNOME_REQUIRED=2.14.0
84 LIBGNOMEUI_REQUIRED=2.14.0
85 GNOME_DESKTOP_REQUIRED=2.9.91
86 LIBSTARTUP_NOTIFICATION_REQUIRED=0.5
87 DBUS_GLIB_REQUIRED=0.35
89 PKG_CHECK_MODULES([DEPENDENCIES], [
90                   glib-2.0 >= $GLIB_REQUIRED
91                   gmodule-2.0
92                   gtk+-2.0 >= $GTK_REQUIRED
93                   gtk+-unix-print-2.0 >= $GTK_REQUIRED
94                   libxml-2.0 >= $LIBXML_REQUIRED
95                   libxslt >= $LIBXSLT_REQUIRED
96                   libgnome-2.0 >= $LIBGNOME_REQUIRED
97                   libgnomeui-2.0 >= $LIBGNOMEUI_REQUIRED
98                   libglade-2.0 >= $LIBGLADE_REQUIRED \
99                   gnome-vfs-2.0 >= $LIBGNOMEVFS_REQUIRED
100                   gnome-vfs-module-2.0
101                   gconf-2.0
102                   gnome-desktop-2.0 >= $GNOME_DESKTOP_REQUIRED
103                   libstartup-notification-1.0 >= $LIBSTARTUP_NOTIFICATION_REQUIRED
104                   ])
105 AC_SUBST([DEPENDENCIES_CFLAGS])
106 AC_SUBST([DEPENDENCIES_LIBS])
108 # *******
109 # SQLite3
110 # *******
112 PKG_CHECK_MODULES([SQLITE3],[sqlite3 >= 3.3])
113 AC_SUBST([SQLITE3_CFLAGS])
114 AC_SUBST([SQLITE3_LIBS])
116 # ****
117 # DBUS
118 # ****
120 PKG_CHECK_MODULES([DBUS],[dbus-glib-1 >= $DBUS_GLIB_REQUIRED])
121 AC_SUBST([DBUS_CFLAGS])
122 AC_SUBST([DBUS_LIBS])
124 AC_PATH_PROG([DBUS_BINDING_TOOL],[dbus-binding-tool],[no])
126 if test "$DBUS_BINDING_TOOL" = "no"; then
127         AC_MSG_ERROR([dbus-binding-tool not found])
130 # *****
131 # GConf
132 # *****
134 AM_GCONF_SOURCE_2
136 AC_PATH_PROG([GCONFTOOL], [gconftool-2], [no])
138 if test "$GCONFTOOL" = "no"; then
139         AC_MSG_ERROR([gconftool-2 not found])
142 # ******************
143 # Portability checks
144 # ******************
146 AC_CHECK_FUNCS([mkdtemp])
148 # for backtrace()
149 AC_CHECK_HEADERS([execinfo.h])
151 # Check for -Wdeclaration-after-statement (since gcc 3.4)
153 if test "x$enable_maintainer_mode" = "xyes"; then
155         AC_LANG_PUSH([C])
156         _FLAGS="-Wdeclaration-after-statement"
157         _SAVE_CFLAGS=$CFLAGS
158         CFLAGS="$CFLAGS $_FLAGS"
160         AC_CACHE_CHECK([for compiler $FLAGS option],
161                 ac_cv_have_declaration_after_statement,
162                 [AC_COMPILE_IFELSE(
163                         [AC_LANG_SOURCE([[int main () { return 0; }]])],
164                         [ac_cv_have_declaration_after_statement="yes"],
165                         [ac_cv_have_declaration_after_statement="no"],
166                         [ac_cv_have_declaration_after_statement="maybe"])])
167         
168         if test "x$ac_cv_have_declaration_after_statement" = "xyes"; then
169                 MORE_WARN_FLAGS="$MORE_WARN_FLAGS $_FLAGS"
170         fi
171         CFLAGS="$_SAVE_CFLAGS"
172         AC_LANG_POP([C])
175 # *******
176 # Mozilla
177 # *******
179 GECKO_INIT([MOZILLA])
181 AC_SUBST([MOZILLA])
182 AC_SUBST([MOZILLA_FLAVOUR])
183 AC_SUBST([MOZILLA_INCLUDE_ROOT])
184 AC_SUBST([MOZILLA_HOME])
185 AC_SUBST([MOZILLA_PREFIX])
186 AC_SUBST([MOZILLA_EXTRA_LIBS])
187 AC_SUBST([MOZILLA_GLUE_LIBS])
189 if test "$gecko_cv_gecko_version_int" -lt "1008000"; then
190         AC_MSG_ERROR([Gecko version $gecko_cv_gecko_version is not supported!])
193 if test "$gecko_cv_gecko_flavour" != "toolkit"; then
194         AC_MSG_ERROR(["$gecko_cv_gecko_flavour" flavoured geckos aren't tasty enough!])
197 case "$gecko_cv_gecko" in
198 xulrunner) min_version=1.8 ;;
199 *firefox) min_version=1.5 ;;
200 *) AC_MSG_ERROR([Unsupported gecko "$gecko_cv_gecko"]) ;;
201 esac
203 AM_CONDITIONAL([HAVE_XULRUNNER],[test "$gecko_cv_gecko" = "xulrunner"])
205 # Added $gecko_cv_gecko-js for debian xulrunner brokenness
206 PKG_CHECK_MODULES([GECKO],[${gecko_cv_gecko}-xpcom >= $min_version ${gecko_cv_gecko}-js $gecko_cv_extra_pkg_dependencies])
207 AC_SUBST([GECKO_CFLAGS])
208 AC_SUBST([GECKO_LIBS])
210 # *****************
211 # Weasel UA version
212 # *****************
214 # FIXMEchpe: find a way to always automatically use the latest weasel minor version!
216 if test "$gecko_cv_gecko_version_int" -ge "1009000"; then
217   WEASEL_UA_VERSION="3.0"
218 elif test "$gecko_cv_gecko_version_int" -ge "1008001"; then
219   WEASEL_UA_VERSION="2.0.0.4"
220 else
221   WEASEL_UA_VERSION="1.5.0.12"
224 AC_SUBST([WEASEL_UA_VERSION])
226 # **********************************
227 # now tests for mozilla API variance
228 # **********************************
230 # First build a test program to see whether compiling and running XPCOM
231 # programs works at all, so we don't get false test failures below
233 GECKO_XPCOM_PROGRAM_CHECK
235 # Make sure we DON'T have the typeaheadfind extension
237 AC_MSG_CHECKING([whether typeaheadfind is broken])
239 GECKO_RUN_IFELSE([],
240 [GECKO_XPCOM_PROGRAM(
241 [[#include <nsIComponentRegistrar.h>]],
243 status = 99;
244 nsCOMPtr<nsIComponentRegistrar> registrar;
245 rv = NS_GetComponentRegistrar (getter_AddRefs (registrar));
246 if (NS_FAILED (rv)) break;
248 status = 98;
249 nsCID *classID = nsnull;
250 rv = registrar->ContractIDToCID ("@mozilla.org/typeaheadfind;1", &classID);
251 if (NS_FAILED (rv) || !classID) break;
253 nsCID badClassID = { 0x46590685, 0xbc00, 0x4aac,
254                      { 0xab, 0xed, 0x2c, 0x10, 0xa5, 0xb9, 0x45, 0xa4 } };
256 status = classID->Equals (badClassID) ? 97 : EXIT_SUCCESS;
259 [have_broken_typeaheadfind=no],
260 [have_broken_typeaheadfind=yes],
261 [have_broken_typeaheadfind=maybe])
263 AC_MSG_RESULT([$have_broken_typeaheadfind])
265 if test "$have_broken_typeaheadfind" = "yes"; then
266         AC_MSG_ERROR([You must not compile $gecko_cv_gecko with the "typeaheadfind" extension enabled!])
269 # Check for PSM header(s) to infer PSM presence
271 GECKO_CHECK_HEADERS([pipnss],[nsIX509Cert.h],[have_psm=yes],[have_psm=no])
273 # Make sure we don't accidentally build without PSM support
275 AC_MSG_CHECKING([whether to include PSM support])
276 AC_ARG_ENABLE([psm],
277         AS_HELP_STRING([--disable-psm],[Disable PSM support (default: enabled)]),
278         [],[enable_psm=yes])
279 AC_MSG_RESULT([$enable_psm])
281 if test "$enable_psm" = "yes" -a "$have_psm" = "no"; then
282         AC_MSG_ERROR([PSM headers not found; use --disable-psm to disable building with PSM support])
283 elif test "$have_psm" = "no"; then
284         AC_MSG_WARN([PSM headers not found; PSM support disabled])
287 if test "$enable_psm" = "yes" -a "$have_psm" = "yes"; then
288         AC_DEFINE([HAVE_MOZILLA_PSM],[1],[Define if you have the mozilla NSS headers installed]) 
291 AM_CONDITIONAL([HAVE_MOZILLA_PSM],[test "$enable_psm" = "yes" -a "$have_psm" = "yes"])
293 # Check whether to enable our filepicker component
295 AC_MSG_CHECKING([whether to enable native gtk+ filepicker])
296 AC_ARG_ENABLE([filepicker],
297         AS_HELP_STRING([--enable-filepicker],[Whether to enable the gtk+ native filepicker; not needed when the mozilla build itself has native gtk+ filepicker enabled (default:enabled)]),
298         [],[enable_filepicker=no])
299 AC_MSG_RESULT([$enable_filepicker])
301 AM_CONDITIONAL([ENABLE_FILEPICKER],[test "$enable_filepicker" = "yes"])
302 if test "$enable_filepicker" = "yes"; then
303         AC_DEFINE([ENABLE_FILEPICKER],[1],[Define to enable the native filepicker])
306 # Check for nsINonBlockingAlertService
307 # Added in 1.8.1 and 1.9
309 GECKO_CHECK_HEADERS([windowwatcher],[nsINonBlockingAlertService.h])
311 # Check for nsIGlobalHistory3
312 # Added in 1.8.1 and 1.9
314 GECKO_CHECK_HEADERS([docshell],[nsIGlobalHistory3.h])
316 # Check for nsIIOService2.h
317 # Added in 1.9
319 GECKO_CHECK_HEADERS([necko],[nsIIOService2.h])
321 # Check for nsIMutableArray.h
322 # Split out into its own header in 1.9
324 GECKO_CHECK_HEADERS([xpcom],[nsIMutableArray.h])
326 # Check for spell check extension
328 GECKO_CHECK_HEADERS([spellchecker],[mozISpellCheckingEngine.h],
329         [have_gecko_spell_checker=yes],[have_gecko_spell_checker=no])
331 # Check for some contractIDs that we need but are provided by extensions
332 # which may or may not have been built.
334 REQUIRED_CONTRACTS="@mozilla.org/permissionmanager;1 @mozilla.org/PopupWindowManager;1 @mozilla.org/cookie/permission;1 @mozilla.org/permissions/contentblocker;1"
335 REQUIRED_EXTENSIONS="cookie,permissions"
337 GECKO_CHECK_CONTRACTIDS([$REQUIRED_CONTRACTS],
338         [],[AC_MSG_ERROR([$gecko_cv_gecko needs to be compiled with at least --enable-extensions=default,$REQUIRED_EXTENSIONS])])
340 # ***************
341 # Multimedia keys
342 # ***************
344 AC_CHECK_HEADERS([X11/XF86keysym.h])
346 # ******
347 # Python
348 # ******
350 EPIPHANY_FEATURES=
352 AC_MSG_CHECKING([whether Python support is requested])
354 AC_ARG_ENABLE([python],
355         AS_HELP_STRING([--enable-python],[Enable python support]),
356         [enable_python=$enableval have_python=$enableval],
357         [enable_python=autodetect have_python=yes])
359 AC_MSG_RESULT([$enable_python])
361 if test "x$have_python" != "xno"; then
362         AM_PATH_PYTHON([2.3],[],[no])
364         if test "x$PYTHON" = "x:"; then
365                 have_python=no
366         fi
369 if test "x$have_python" != "xno"; then
370         AM_CHECK_PYTHON_HEADERS([],[have_python=no])
373 if test "x$have_python" != "xno"; then
374         PY_PREFIX=`$PYTHON -c 'import sys ; print sys.prefix'`
375         PY_EXEC_PREFIX=`$PYTHON -c 'import sys ; print sys.exec_prefix'`
376         PYTHON_LIBS="-lpython$PYTHON_VERSION"
377         PYTHON_LIB_LOC="-L$PY_EXEC_PREFIX/lib/python$PYTHON_VERSION/config"
378         PYTHON_CFLAGS="-I$PY_PREFIX/include/python$PYTHON_VERSION"
379         PYTHON_MAKEFILE="$PY_EXEC_PREFIX/lib/python$PYTHON_VERSION/config/Makefile"
380         PYTHON_LOCALMODLIBS=`sed -n -e 's/^LOCALMODLIBS=\(.*\)/\1/p' $PYTHON_MAKEFILE`
381         PYTHON_BASEMODLIBS=`sed -n -e 's/^BASEMODLIBS=\(.*\)/\1/p' $PYTHON_MAKEFILE`
382         PYTHON_OTHER_LIBS=`sed -n -e 's/^LIBS=\(.*\)/\1/p' $PYTHON_MAKEFILE`
383         PYTHON_EXTRA_LIBS="$PYTHON_LOCALMODLIBS $PYTHON_BASEMODLIBS $PYTHON_OTHER_LIBS"
384         AC_SUBST([PYTHON_LIBS])
385         AC_SUBST([PYTHON_LIB_LOC])
386         AC_SUBST([PYTHON_CFLAGS])
387         AC_SUBST([PYTHON_EXTRA_LIBS])
389         dnl FIXME: do we really need this test?
390         AC_MSG_CHECKING([whether we can build a shared library depending on libpython])
391         rm -rf testpython
392         mkdir testpython
393         cd testpython
394         cat > testpython.c <<EOF
395 #include <Python.h>
396 int testpython (void)
398 Py_Exit (0);
402         if /bin/sh ../libtool --mode=compile ${CC} $PYTHON_CFLAGS -c testpython.c >/dev/null 2>&1 && \
403                 /bin/sh ../libtool --mode=link ${CC} -o testpython.la -rpath `pwd` -module -avoid-version $PYTHON_LIB_LOC testpython.lo $PYTHON_LIBS $PYTHON_EXTRA_LIBS >/dev/null 2>&1 && \
404                 grep 'dlname.*testpython' testpython.la >/dev/null 2>&1; then
405                 result=yes
406         else
407                 result=no
408                 have_python=no
409         fi
410         cd ..
411         rm -rf testpython
412         AC_MSG_RESULT([$result])
415 if test "x$have_python" != "xno"; then
416         PYGTK_REQUIRED=2.7.1
417         GNOME_PYTHON_REQUIRED=2.6.0
419         PKG_CHECK_MODULES([PYGTK], [pygtk-2.0 >= $PYGTK_REQUIRED gnome-python-2.0 >= $GNOME_PYTHON_REQUIRED],
420                 [],[have_python=no])
422         AC_SUBST([PYGTK_CFLAGS])
423         AC_SUBST([PYGTK_LIBS])
426 if test "x$have_python" != "xno"; then
427         AC_MSG_CHECKING([for pygtk defs])
428         PYGTK_DEFSDIR=`$PKG_CONFIG --variable=defsdir pygtk-2.0`
429         AC_MSG_RESULT([$PYGTK_DEFSDIR])
431         AC_MSG_CHECKING([for pygtk codegen])
432         PYGTK_CODEGEN="$PYTHON `$PKG_CONFIG --variable=codegendir pygtk-2.0`/codegen.py"
433         AC_MSG_RESULT([$PYGTK_CODEGEN])
435         AC_MSG_CHECKING([for pygtk h2def])
436         PYGTK_H2DEF="$PYTHON `$PKG_CONFIG --variable=codegendir pygtk-2.0`/h2def.py"
437         AC_MSG_RESULT([$PYGTK_H2DEF])
438         
439         AC_SUBST([PYGTK_DEFSDIR])
440         AC_SUBST([PYGTK_CODEGEN])
441         AC_SUBST([PYGTK_H2DEF])
443         dnl Check for -fno-strict-aliasing
444         FLAGS="-fno-strict-aliasing"
445         save_CFLAGS="$CFLAGS"
446         CFLAGS="$CFLAGS $FLAGS"
447         AC_MSG_CHECKING([whether [$]CC understands $FLAGS])
448         AC_TRY_COMPILE([], [], [compiler_has_option=yes], [compiler_has_option=no])
449         CFLAGS="$save_CFLAGS"
450         AC_MSG_RESULT($compiler_has_option)
451         if test $compiler_has_option = yes; then
452                 NO_STRICT_ALIASING_CFLAGS="$FLAGS"
453         fi
454         AC_SUBST([NO_STRICT_ALIASING_CFLAGS])
457 if test "x$have_python" != "xyes"; then
458         if test "x$enable_python" = "xyes"; then
459                 AC_MSG_ERROR([Python not found])
460         elif test "x$enable_python" = "xautodetect"; then
461                 enable_python=no
462                 AC_MSG_WARN([Python not found, disabling python support])
463         fi
464 elif test "x$enable_python" != "xno"; then
465         enable_python=yes
466         AC_DEFINE([ENABLE_PYTHON],[1],[Define to compile with python support])
467         EPIPHANY_FEATURES="$EPIPHANY_FEATURES python"
470 AM_CONDITIONAL([ENABLE_PYTHON],[test "x$enable_python" = "xyes"])
472 AC_SUBST([EPIPHANY_FEATURES])
474 # *******
475 # Plugins
476 # *******
478 # Gecko 1.9 can handle .desktop files from file: URLs itself, but we
479 # also support windows .lnk files, so always enable this plugin
481 AC_MSG_CHECKING([whether to build the deskop file plugin])
482 AC_ARG_ENABLE([desktop-file-plugin],
483         AS_HELP_STRING([--disable-desktop-file-plugin],[Disable the desktop file plugin (default: enabled)]),
484         [],[enable_desktop_file_plugin=yes])
485 AC_MSG_RESULT([$enable_desktop_file_plugin])
487 AM_CONDITIONAL([ENABLE_DESKTOP_FILE_PLUGIN],[test "x$enable_desktop_file_plugin" = "xyes"])
489 if test "x$enable_desktop_file_plugin" = "xyes"; then
490         PKG_CHECK_MODULES([DESKTOP_FILE_PLUGIN_DEP],[$MOZILLA-xpcom $MOZILLA-plugin gtk+-2.0 >= 2.6.0])
491         AC_SUBST([DESKTOP_FILE_PLUGIN_DEP_CFLAGS])
492         AC_SUBST([DESKTOP_FILE_PLUGIN_DEP_LIBS])
495 if test "x$enable_desktop_file_plugin" = "xyes"; then
496         AC_DEFINE([HAVE_PRIVATE_PLUGINS],[1],[Define if any private plugins are enabled])
499 # *******************
500 # Additional features
501 # *******************
503 # Zeroconf bookmarks sites
505 AC_MSG_CHECKING([whether to enable zeroconf bookmarks support])
506 AC_ARG_ENABLE([zeroconf],
507         AS_HELP_STRING([--disable-zeroconf],[Whether to enable zeroconf bookmarks support (default: enabled)]),
508         [], [enable_zeroconf=yes])
509 AC_MSG_RESULT([$enable_zeroconf])
511 if test "x$enable_zeroconf" = "xyes"; then
512         AC_DEFINE([ENABLE_ZEROCONF],[1],[Define to enable zeroconf bookmarks support])
515 AM_CONDITIONAL([ENABLE_ZEROCONF],[test "x$enable_zeroconf" = "xyes"])
517 # Certificates manager
519 if test "$enable_psm" = "yes"; then
521 AC_MSG_CHECKING([whether to build the certificates manager])
522 AC_ARG_ENABLE([certificate-manager],
523         AS_HELP_STRING([--enable-certificate-manager],[Whether to enable the certificate manager (experimental; default:disabled)]),
524         [],[enable_certificate_manager=no])
525 AC_MSG_RESULT([$enable_certificate_manager])
529 if test "$enable_certificate_manager" = "yes"; then
530         AC_DEFINE([ENABLE_CERTIFICATE_MANAGER],[1],[Define to enable the certificate manager build])
533 AM_CONDITIONAL([ENABLE_CERTIFICATE_MANAGER],[test "$enable_certificate_manager" = "yes"])
535 # NetworkManager
537 AC_MSG_CHECKING([whether to enable NetworkManager support])
538 AC_ARG_ENABLE([network-manager],
539         AS_HELP_STRING([--enable-network-manager],[Whether to enable automatic network status with NetworkManager (default: disabled)]),
540         [],[enable_network_manager=no])
541 AC_MSG_RESULT([$enable_network_manager])
543 if test "$enable_network_manager" != "no"; then
544         AC_CHECK_HEADERS([NetworkManager/NetworkManager.h],
545                 [have_network_manager=yes],[have_network_manager=no])
547         if test "$enable_network_manager" = "yes" -a "$have_network_manager" = "no"; then
548                 AC_MSG_ERROR([NetworkManager support requested but NetworkManager headers not found])
549         elif test "$have_network_manager" = "no"; then
550                 AC_MSG_WARN([NetworkManager headers not found; disabling NetworkManager support])
551         fi
554 if test "$enable_network_manager" = "yes"; then
555         AC_DEFINE([ENABLE_NETWORK_MANAGER],[1],[Define for NetworkManager support])
558 AM_CONDITIONAL([ENABLE_NETWORK_MANAGER],[test "$enable_network_manager" = "yes"])
560 # Enchant spell checking
561 # Does not appear to work on gecko 1.8.0, so only offer for >= 1.8.1
563 if test "$gecko_cv_gecko_version_int" -ge "1008001"; then
565 # Default to 'disabled' until it's fully functional
566 AC_MSG_CHECKING([whether spell checking support is requested])
567 AC_ARG_ENABLE([spell-checker],
568         AS_HELP_STRING([--enable-spell-checker],[Whether to enable spell checking using enchant]),
569         [],[enable_spell_checker=no])
570 AC_MSG_RESULT([$enable_spell_checker])
572 else
573         enable_spell_checker=no
574 fi # gecko >= 1.8.1
576 if test "$enable_spell_checker" = "yes" -a "$have_gecko_spell_checker" != "yes"; then
577         AC_MSG_ERROR([Spell check support requested but $gecko_cv_gecko was not compiled with 'spellchecker' extension enabled.])
580 if test "$enable_spell_checker" = "yes" -a "$have_gecko_spell_checker" = "yes"; then
581         # FIXME check which version we really need
582         ENCHANT_REQUIRED=1.0
584         PKG_CHECK_MODULES([SPELLCHECKER],[enchant >= $ENCHANT_REQUIRED])
585         AC_SUBST([SPELLCHECKER_CFLAGS])
586         AC_SUBST([SPELLCHECKER_LIBS])
588         AC_DEFINE([ENABLE_SPELLCHECKER],[1],[Define to enable the spell checker])
591 AM_CONDITIONAL([ENABLE_SPELLCHECKER],[test "$enable_spell_checker" = "yes" -a "$have_gecko_spell_checker" = "yes"])
593 # ************
594 # Misc defines
595 # ************
597 # uninstalled share dir to search data
598 AC_DEFINE_UNQUOTED([SHARE_UNINSTALLED_DIR], ["`pwd`/data"], [path to source data dir])
600 # *******************************
601 # Add warning flags
602 # *******************************
604 AM_CPPFLAGS="$AM_CPPFLAGS $DEPRECATION_FLAGS"
605 AM_CFLAGS="$AM_CFLAGS $WARN_CFLAGS $MORE_WARN_FLAGS"
606 AM_CXXFLAGS="$AM_CXXFLAGS $WARN_CXXFLAGS $MOZILLA_WARN_CXXFLAGS"
607 AC_SUBST([AM_CPPFLAGS])
608 AC_SUBST([AM_CFLAGS])
609 AC_SUBST([AM_CXXFLAGS])
610 AC_SUBST([AM_LDFLAGS])
612 # *******************************
613 # Internationalization
614 # ******************************* 
616 ISO_CODES_REQUIRED=0.35
618 PKG_CHECK_EXISTS([iso-codes >= $ISO_CODES_REQUIRED],
619         [have_iso_codes=yes],[have_iso_codes=no])
621 if test "$have_iso_codes" = "yes"; then
622         AC_MSG_CHECKING([whether iso-codes has iso-639 and iso-3166 domains])
623         if $PKG_CONFIG --variable=domains iso-codes | grep -q 639 && \
624            $PKG_CONFIG --variable=domains iso-codes | grep -q 3166 ; then
625                 result=yes
626         else
627                 result=no
628                 have_iso_codes=no
629         fi
630         AC_MSG_RESULT([$result])
633 if test "$have_iso_codes" = "yes"; then
634         AC_DEFINE_UNQUOTED([ISO_CODES_PREFIX],["`$PKG_CONFIG --variable=prefix iso-codes`"],[ISO codes prefix])
635         AC_DEFINE([HAVE_ISO_CODES],[1],[Define if you have the iso-codes package])
636 else
637         AC_MSG_ERROR([iso-codes is required])
640 GETTEXT_PACKAGE=epiphany
641 AC_SUBST([GETTEXT_PACKAGE])
642 AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
643 AM_GLIB_GNU_GETTEXT
645 # uninstalled share dir to search data
646 AC_DEFINE_UNQUOTED([SHARE_UNINSTALLED_DIR], ["`pwd`/data"], [path to source data dir])
648 # *****************
649 # API Documentation
650 # *****************
652 GNOME_DOC_INIT
653 GTK_DOC_CHECK([1.0])
655 # ************
656 # Output files
657 # ************
659 AC_CONFIG_FILES([
660 Makefile
661 data/Makefile
662 data/epiphany-${EPIPHANY_API_VERSION}.pc:data/epiphany.pc.in
663 data/epiphany.desktop.in
664 data/bme.desktop.in
665 data/chrome/Makefile
666 data/chrome/brand.dtd
667 data/chrome/brand.properties
668 data/glade/Makefile
669 data/icons/Makefile
670 data/icons/16x16/Makefile
671 data/icons/16x16/actions/Makefile
672 data/icons/16x16/places/Makefile
673 data/icons/16x16/status/Makefile
674 data/icons/22x22/Makefile
675 data/icons/22x22/actions/Makefile
676 data/icons/22x22/places/Makefile
677 data/icons/22x22/status/Makefile
678 data/icons/24x24/Makefile
679 data/icons/24x24/actions/Makefile
680 data/icons/24x24/places/Makefile
681 data/icons/24x24/status/Makefile
682 data/icons/32x32/Makefile
683 data/icons/32x32/actions/Makefile
684 data/icons/32x32/status/Makefile
685 data/icons/48x48/Makefile
686 data/icons/48x48/status/Makefile
687 data/icons/scalable/Makefile
688 data/icons/scalable/actions/Makefile
689 data/icons/scalable/status/Makefile
690 data/art/Makefile
691 data/ui/Makefile
692 data/weasel-ua-pref.js
693 doc/Makefile
694 doc/reference/Makefile
695 lib/Makefile
696 lib/egg/Makefile
697 lib/widgets/Makefile
698 embed/Makefile
699 embed/mozilla/Makefile
700 src/Makefile
701 src/bookmarks/Makefile
702 help/Makefile
703 plugins/Makefile
704 plugins/desktop-file/Makefile
705 po/Makefile.in
708 [EPIPHANY_API_VERSION=$EPIPHANY_API_VERSION])
710 AC_OUTPUT
712 # *************************************
713 # *************************************
715 echo "
716 Epiphany was configured with the following options:
717         
718         Source code location       : $srcdir
719         Compiler                   : $CC
720         Prefix                     : $prefix
721         Extra debugging support    : $enable_debug
723         Gecko backend              : $gecko_cv_gecko version $gecko_cv_gecko_version
724         PSM support                : $enable_psm
725         Zeroconf bookmarks support : $enable_zeroconf
726         NetworkManager support     : $enable_network_manager
727         Certificate manager        : $enable_certificate_manager (experimental)
728         Python support             : $enable_python
729         Desktop file plugin        : $enable_desktop_file_plugin
730         Spellchecker               : $enable_spell_checker (experimental)