aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-24 20:06:50 (GMT)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-28 11:23:20 (GMT)
commit3beb9cab51cd8dccf6ef1262dcb6a26a7239fbbc (patch)
tree8a04ea8ebff5a118ed73d4113c7076c6d09e9f68
parent583f64f0a6e1cbcb8551f01cd6305f5b138d9c4d (diff)
Add an option to build with Gtk 3 instead of Gtk 2
By default, Camorama will be built against Gtk 2. However, as it now builds also against Gtk 3, add an option to use Gtk 3 instead. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rwxr-xr-xconfigure19
-rw-r--r--configure.ac11
2 files changed, 28 insertions, 2 deletions
diff --git a/configure b/configure
index e198ec9..dbe7135 100755
--- a/configure
+++ b/configure
@@ -762,6 +762,7 @@ with_libiconv_prefix
with_libintl_prefix
enable_compile_warnings
enable_iso_c
+enable_gtk3
with_gconf_source
with_gconf_schema_file_dir
enable_schemas_install
@@ -1409,6 +1410,7 @@ Optional Features:
--enable-compile-warnings=[no/minimum/yes/maximum/error]
Turn on compiler warnings
--enable-iso-c Try to warn if code is not ISO C
+ --enable-gtk3 Compile against GTK 3.x instead of GTK 2.x
--disable-schemas-install
Disable the schemas installation
@@ -8119,7 +8121,22 @@ $as_echo "$complCFLAGS" >&6; }
-pkg_modules="gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gtk+-2.0 >= 2.24 gconf-2.0"
+# Check whether --enable-gtk3 was given.
+if test "${enable_gtk3+set}" = set; then :
+ enableval=$enable_gtk3; enable_gtk3=$enableval
+else
+ enable_gtk3="no"
+fi
+
+
+pkg_modules="gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gconf-2.0"
+
+if test "x$enable_gtk3" = xyes; then
+ pkg_modules="$pkg_modules gtk+-3.0 >= 3.10 cairo"
+else
+ pkg_modules="$pkg_modules gtk+-2.0 >= 2.24"
+fi
+
diff --git a/configure.ac b/configure.ac
index 4b31e49..0437c45 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,7 +34,16 @@ AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/ioctl.h unistd.h linux/videodev.
GNOME_COMPILE_WARNINGS
-pkg_modules="gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gtk+-2.0 >= 2.24 gconf-2.0"
+AC_ARG_ENABLE(gtk3, [AC_HELP_STRING([--enable-gtk3], [Compile against GTK 3.x instead of GTK 2.x])], [enable_gtk3=$enableval], [enable_gtk3="no"])
+
+pkg_modules="gdk-pixbuf-2.0 gdk-pixbuf-xlib-2.0 gconf-2.0"
+
+if test "x$enable_gtk3" = xyes; then
+ pkg_modules="$pkg_modules gtk+-3.0 >= 3.10 cairo"
+else
+ pkg_modules="$pkg_modules gtk+-2.0 >= 2.24"
+fi
+
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)

Privacy Policy