summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2016-10-08 15:01:44 -0400
committerlukefromdc <[email protected]>2016-10-08 15:01:44 -0400
commit9e5ea15d104720cfee752c193b77f8b03558c6b9 (patch)
treec20e965e974ccdecfe95f576681144442cc6225e /configure.ac
parent24bb72b321c044479728fd1d43c941afc0309f18 (diff)
downloadcaja-9e5ea15d104720cfee752c193b77f8b03558c6b9.tar.bz2
caja-9e5ea15d104720cfee752c193b77f8b03558c6b9.tar.xz
GTK3: port libunique ->GtkApplication as build time option
Add --disable-libunique configuration option for GTK3 builds. This builds a port from libunique to GtkApplication. keep GTK2 builds unchanged Caja can now be build with GTK2 and libunique, GTK3 and libunique, or GTK3 without libunique using GtkApplication instead GtkApplication port Based on cherrypicked nautilus commits from https://github.com/GNOME/nautilus/commit/a8481ee4bd8d34e792d63598fa5efb47736f9de4 main: adapt to GtkApplication changes through https://github.com/GNOME/nautilus/commit/c3382e0415d51082545f277c380d37be160e8d2d application: move nautilus_application_new() to its own function GTK3/GtkApplication builds: add --force-desktop option This is useful for other DE's All: StartupNotify=false in .desktop files, as caja never connects to notification daemons and in GtkApplication builds this causes busy spinning curors
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac47
1 files changed, 37 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index d117cae3..bf46174a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,12 +45,12 @@ case "$with_gtk" in
3.0) GTK_API_VERSION=3.0
GTK_REQUIRED=3.0.0
GAIL_API_VERSION=-3.0
- LIBUNIQUE_VERSION=3.0
;;
esac
AC_SUBST([GTK_API_VERSION])
+AM_CONDITIONAL([WITH_GTK3],[test "$with_gtk" = "3.0"])
-dnl ===========================================================================
+dnl ---------------------------------------------------------------------------
AC_CONFIG_SRCDIR(src)
AC_CONFIG_HEADERS(config.h)
@@ -229,18 +229,44 @@ fi
#============================================================================
# libunique
#============================================================================
-PKG_CHECK_MODULES(UNIQUE, unique-$LIBUNIQUE_VERSION)
-AC_SUBST([UNIQUE_CFLAGS])
-AC_SUBST([UNIQUE_LIBS])
+dnl Whether to use libunique
+dnl --
+
+
+AC_ARG_ENABLE(libunique,
+ AC_HELP_STRING([--disable-libunique],
+ [use GtkApplication instead of libunique(GTK 3 only)]))
+msg_libunique=no
+if test "x$enable_libunique" != "xno"; then
+ msg_libunique=yes
+ AM_CONDITIONAL([ENABLE_LIBUNIQUE], = "1")
+else
+ msg_libunique=no
+ AM_CONDITIONAL([ENABLE_LIBUNIQUE], = "0")
+fi
+
+dnl =====
+
+if test $msg_libunique = "yes";then
-# this deprecated stuff should be removed from unique in most distros
-# but it's still not removed upstream in unique 1.x, so leaving it alone
-# just in case.
-UNIQUE_CFLAGS="$UNIQUE_CFLAGS -DG_CONST_RETURN=const"
+ if test "$GTK_API_VERSION" = "3.0"; then
+ LIBUNIQUE_VERSION=3.0
+ else
+ LIBUNIQUE_VERSION=1.0
+ fi
+ PKG_CHECK_MODULES(UNIQUE, unique-$LIBUNIQUE_VERSION)
-EXTRA_CORE_MODULES="$EXTRA_CORE_MODULES unique-$LIBUNIQUE_VERSION"
+ AC_SUBST([UNIQUE_CFLAGS])
+ AC_SUBST([UNIQUE_LIBS])
+ # this deprecated stuff should be removed from unique in most distros
+ # but it's still not removed upstream in unique 1.x, so leaving it alone
+ # just in case.
+ UNIQUE_CFLAGS="$UNIQUE_CFLAGS -DG_CONST_RETURN=const"
+
+ EXTRA_CORE_MODULES="$EXTRA_CORE_MODULES unique-$LIBUNIQUE_VERSION"
+fi
# ==========================================================================
# Turn on the additional warnings last, so -Werror doesn't affect other tests.
@@ -421,6 +447,7 @@ caja-$VERSION:
compiler: ${CC}
xmp support: $msg_xmp
Gtk+ version: ${GTK_API_VERSION}
+ Using libunique: $msg_libunique
PackageKit support: $msg_packagekit
caja-extension documentation: ${enable_gtk_doc}