1 AC_DEFUN([MOONLIGHT_CHECK_MOZILLA],
4 with_ff3=$browser_support
5 with_ff2=$browser_support
11 AC_ARG_WITH(ff3, AC_HELP_STRING([--with-ff3=no|yes],
12 [If you want to enable the xulrunner 1.9 (Firefox 3) bridge]),
15 if test x$with_ff3 = xyes -a x$browser_support = xyes; then
16 FF3_MODULES="libxul-unstable mozilla-plugin mozilla-js"
18 PKG_CHECK_EXISTS($FF3_MODULES,
20 [with_ff3=no ff3_reason="(reason: missing FF3 development packages)"])
22 if test x$with_ff3 = xyes; then
23 AC_DEFINE([HAVE_GECKO_1_9], [1], [Gecko 1.9 support])
24 PKG_CHECK_MODULES(FF3, [$FF3_MODULES glib-2.0])
25 dnl Strip out problem libraries (should already be in process space)
26 FF3_LIBS="$(echo $FF3_LIBS | sed -e 's/-lmozjs\|-lplds4\|-lplc4\|-lnspr4//g')"
30 AM_CONDITIONAL(HAVE_GECKO_1_9,test x$with_ff3 = xyes)
36 AC_ARG_WITH(ff2, AC_HELP_STRING([--with-ff2=no|yes],
37 [If you want to enable the xulrunner 1.8.1 (Firefox 2)]),
40 if test x$with_ff2 = xyes -a x$browser_support = xyes; then
41 mozilla_xpcom="libxul-missing"
42 mozilla_xpcom_pcs="xpcom mozilla-xpcom firefox-xpcom xulrunner-xpcom"
43 for pc in $mozilla_xpcom_pcs; do
44 PKG_CHECK_EXISTS($pc, [mozilla_xpcom=$pc])
47 mozilla_plugin="plugin-missing"
48 mozilla_plugin_pcs="plugin firefox-plugin xulrunner-plugin"
49 for pc in $mozilla_plugin_pcs; do
50 PKG_CHECK_EXISTS($pc, [mozilla_plugin=$pc])
53 if test $mozilla_xpcom = "libxul-missing" -o $mozilla_plugin = "plugin-missing"; then
55 ff2_reason="(reason: missing FF2 development packages)"
57 PKG_CHECK_MODULES(FF2, [$mozilla_xpcom $mozilla_plugin glib-2.0])
58 dnl Strip out problem libraries (should already be in process space)
59 FF2_LIBS="$(echo $FF2_LIBS | sed -e 's/-lmozjs\|-lplds4\|-lplc4\|-lnspr4//g')"
63 AM_CONDITIONAL(HAVE_GECKO_1_8,test x$with_ff2 = xyes)
66 dnl Put it all together
69 if test x$with_ff2 = xyes; then
71 MIN_FIREFOX_VERSION="1.5"
72 if test x$with_ff3 = xyes; then
73 MAX_FIREFOX_VERSION="3.6.*"
75 MAX_FIREFOX_VERSION="2.0.0.*"
77 elif test x$with_ff3 = xyes; then
79 MIN_FIREFOX_VERSION="2.9.*"
80 MAX_FIREFOX_VERSION="3.5.*"
83 AC_SUBST([MIN_FIREFOX_VERSION])
84 AC_SUBST([MAX_FIREFOX_VERSION])
85 AM_CONDITIONAL(HAVE_MOZILLA, test x$with_mozilla = xyes)