summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2012-08-18 08:11:03 -0700
committerDan Nicholson <dbn.lists@gmail.com>2012-08-18 08:11:03 -0700
commit5876e7656cecc8378d275f90514e33c104dcece7 (patch)
tree8bc503d21841820be8c2f8fd995c423bfbd5d81a
parentbae5cd656500ce57d591d2957c8f2dffa387f978 (diff)
Allow plugin installation directories to be specified
Instead of always putting the plugins into ${libdir}/mozilla/plugins, allow the directories to be specified by --with-gtk2-plugindir and --with-gtk3-plugindir. This also changes the default for the gtk3 plugin to ${libdir}/epiphany/plugins until the mozilla based browsers can support gtk3 plugins.
-rw-r--r--configure.ac35
-rw-r--r--src/Makefile.am6
2 files changed, 37 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index b5ce4a6..2d159a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,6 +70,41 @@ if test $enable_gtk3 = yes; then
fi
AM_CONDITIONAL([ENABLE_GTK3], [test $enable_gtk3 = yes])
+dnl See where to install the plugins. By default the gtk2 plugin goes in
+dnl the mozilla plugins directory and the gtk3 plugin goes in the
+dnl epiphany plugins directory. When firefox gains gtk3 support the
+dnl mozilla directory would be the default for both.
+AC_ARG_WITH([gtk2_plugindir],
+ [AC_HELP_STRING([--with-gtk2-plugindir],
+ [directory for gtk2 plugin ]dnl
+ [(default: LIBDIR/mozilla/plugins)])],
+ [case "$with_gtk2_plugindir" in
+ yes|no|"")
+ AC_MSG_ERROR([invalid directory option "$with_gtk2_plugindir"])
+ ;;
+ esac],
+ [with_gtk2_plugindir='${libdir}/mozilla/plugins'])
+AC_SUBST([gtk2_plugindir], [$with_gtk2_plugindir])
+if test $enable_gtk2 = yes; then
+ AC_MSG_CHECKING([where to install gtk+-2.0 plugin])
+ AC_MSG_RESULT([$gtk2_plugindir])
+fi
+AC_ARG_WITH([gtk3_plugindir],
+ [AC_HELP_STRING([--with-gtk3-plugindir],
+ [directory for gtk3 plugin ]dnl
+ [(default: LIBDIR/epiphany/plugins)])],
+ [case "$with_gtk3_plugindir" in
+ yes|no|"")
+ AC_MSG_ERROR([invalid directory option "$with_gtk3_plugindir"])
+ ;;
+ esac],
+ [with_gtk3_plugindir='${libdir}/epiphany/plugins'])
+AC_SUBST([gtk3_plugindir], [$with_gtk3_plugindir])
+if test $enable_gtk3 = yes; then
+ AC_MSG_CHECKING([where to install gtk+-3.0 plugin])
+ AC_MSG_RESULT([$gtk3_plugindir])
+fi
+
GETTEXT_PACKAGE="$PACKAGE"
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
diff --git a/src/Makefile.am b/src/Makefile.am
index d6b2266..dcf011b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -19,13 +19,11 @@ libevince3_plugin_la_LIBADD = libevbp3-viewer.la
libevince3_plugin_la_SOURCES = $(libevince2_plugin_la_SOURCES)
noinst_LTLIBRARIES =
-plugindir = $(libdir)/mozilla/plugins
-plugin_LTLIBRARIES =
if ENABLE_GTK2
noinst_LTLIBRARIES += libevbp2-viewer.la
-plugin_LTLIBRARIES += libevince2-plugin.la
+gtk2_plugin_LTLIBRARIES = libevince2-plugin.la
endif
if ENABLE_GTK3
noinst_LTLIBRARIES += libevbp3-viewer.la
-plugin_LTLIBRARIES += libevince3-plugin.la
+gtk3_plugin_LTLIBRARIES = libevince3-plugin.la
endif