2 dnl Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
4 dnl This program is free software; you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation; either version 3 of the License, or
7 dnl (at your option) any later version.
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 dnl GNU General Public License for more details.
13 dnl You should have received a copy of the GNU General Public License
14 dnl along with this program; if not, write to the Free Software
15 dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 dnl Configure paths for Firefox. We used to run firefox-config, but that
18 dnl got too messy. Then with a little experimentation we determined
19 dnl most of the options weren't actually needed... so now the handful
20 dnl of critical headers are part of the plugin/mozilla-sdk sources
21 dnl copied out of a current Firefox release. This greatly simplified
22 dnl both the configuration and compilation processes.
23 AC_DEFUN([GNASH_PATH_FIREFOX],
27 if test x"${npapi}" = x"yes"; then
29 AC_ARG_WITH(npapi-install,
30 AC_HELP_STRING([--with-npapi-install=system|user|prefix], [Policy for NPAPI plugin install. Default: user.]),
32 user) NPAPI_INSTALL_POLICY=user ;;
33 system) NPAPI_INSTALL_POLICY=system ;;
34 prefix) NPAPI_INSTALL_POLICY=prefix ;;
35 *) AC_MSG_ERROR([bad value ${withval} for --with-npapi-install]) ;;
37 ], NPAPI_INSTALL_POLICY=${PLUGINS_INSTALL_POLICY}) dnl Inherit a generic PLUGINS_INSTALL_POLICY when available
40 dnl For backward compatibility, won't be advertised
41 AC_ARG_WITH(plugindir, [],
42 [ AC_MSG_WARN([--with-plugindir is obsoleted, use --with-npapi-plugindir instead]); FIREFOX_PLUGINS=$withval])
44 AC_ARG_WITH(npapi-plugindir,
45 AC_HELP_STRING([--with-npapi-plugindir=DIR], [Directory to install NPAPI plugin in]),
46 [FIREFOX_PLUGINS=$withval]
50 dnl If not explicitly specified, figure install dir
53 if test x"${FIREFOX_PLUGINS}" = "x" ; then
55 if test "x${NPAPI_INSTALL_POLICY}" = "xuser"; then
57 dnl We always use .mozilla instead of .firefox, as this directoryis
58 dnl used by all mozilla derived browsers.
59 FIREFOX_PLUGINS=$HOME/.mozilla/plugins
61 elif test "x${NPAPI_INSTALL_POLICY}" = "xsystem"; then
63 for dir in /usr/lib64/mozilla/plugins /usr/lib/mozilla/plugins /usr/lib64/firefox/plugins /usr/lib/firefox/plugins /usr/lib/mozilla-firefox/plugins /usr/lib64/iceweasel/plugins /usr/lib/iceweasel/plugins ; do
69 if test "x${FIREFOX_PLUGINS}" = x; then
70 FIREFOX_PLUGINS=/usr/lib/mozilla/plugins
71 AC_MSG_WARN([Could not find system mozilla plugin dir, use --with-npapi-plugindir. Defaulting to ${FIREFOX_PLUGINS}]);
74 elif test "x${NPAPI_INSTALL_POLICY}" = "xprefix"; then
75 FIREFOX_PLUGINS="\${prefix}/npapi"
80 AC_SUBST(FIREFOX_PLUGINS)
82 ])dnl end of GNASH_PATH_FIREFOX
86 # indent-tabs-mode: nil