summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac37
1 files changed, 31 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index 7e310d8..8333a23 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,15 +12,40 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl We want C99 features
AC_PROG_CC_C99
-dnl Check for dependencies. Mozilla packages are split out because we
-dnl only want their headers.
-GTK_REQUIRED=2.14.0
+dnl Required versions of dependencies.
+GTK2_REQUIRED=2.14.0
+GTK3_REQUIRED=3.0
GLIB_REQUIRED=2.18.0
-EVINCE_API=2.32
+EVINCE2_API=2.32
+EVINCE3_API=3.0
+
+dnl Check for NPAPI. Mozilla packages are split out because we only
+dnl want their headers from MOZILLA_CFLAGS.
mozilla_pkgs="mozilla-plugin nspr"
-evince_pkgs="gtk+-2.0 >= $GTK_REQUIRED gio-2.0 >= $GLIB_REQUIRED \
- evince-view-$EVINCE_API evince-document-$EVINCE_API"
PKG_CHECK_MODULES([MOZILLA], [$mozilla_pkgs])
+
+dnl See if we want gtk2/evince2 or gtk3/evince3. This is important
+dnl because mozilla currently only support gtk2 plugins and epiphany
+dnl only supports gtk3 plugins. Default to gtk2 for now since firefox is
+dnl the more likely browser.
+AC_MSG_CHECKING([which GTK+ version to use])
+AC_ARG_ENABLE([gtk3],
+ [AC_HELP_STRING([--enable-gtk3],
+ [use GTK+ version 3 (default: no, gtk2)])],
+ [],
+ [enable_gtk3=no])
+if test "x$enable_gtk3" = xno; then
+ gtk=gtk+-2.0
+ gtk_required=$GTK2_REQUIRED
+ evince_api=$EVINCE2_API
+else
+ gtk=gtk+-3.0
+ gtk_required=$GTK3_REQUIRED
+ evince_api=$EVINCE3_API
+fi
+AC_MSG_RESULT([$gtk])
+evince_pkgs="$gtk >= $gtk_required gio-2.0 >= $GLIB_REQUIRED \
+ evince-view-$evince_api evince-document-$evince_api"
PKG_CHECK_MODULES([EVINCE], [$evince_pkgs])
GETTEXT_PACKAGE="$PACKAGE"