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