diff configure.in @ 1095:1ab93c92d3ea

Add --with-gtk3 switch to enable building with GTK+ 3.x on systems where it is available. By default builds are done with GTK+ 2.x
author mhessling@81767d24-ef19-dc11-ae90-00e081727c95
date Thu, 30 Jun 2011 07:43:35 +0000
parents b2a4cfc3cb87
children 1c24949cf853
line wrap: on
line diff
--- a/configure.in	Thu Jun 30 04:48:10 2011 +0000
+++ b/configure.in	Thu Jun 30 07:43:35 2011 +0000
@@ -44,6 +44,14 @@
    [with_compat=$withval],
    [with_compat=no],
 )
+
+dnl ---------------------- check for '--with-gtk3' switch -----------------
+AC_ARG_WITH(gtk3,
+   [  --with-gtk3             specify this to build with GTK+ 3.x if available],
+   [with_gtk3=$withval],
+   [with_gtk3=no],
+)
+
 dnl ---------------------- default targets to build -----------------
 if test $with_compat = yes; then
    COMPAT_OBJECT="compat.o"
@@ -196,8 +204,11 @@
 if test $build_gtk = "yes"; then
    AC_CHECK_PROG(PKG_CFG, pkg-config, pkg-config)
    if test x"$PKG_CFG" != x; then
-      GTK_PACKAGES="gtk+-3.0"
-      GTK_LIBS=`$PKG_CFG --silence-errors --libs $GTK_PACKAGES`
+      GTK_LIBS=""
+      if test $with_gtk3 = "yes"; then
+         GTK_PACKAGES="gtk+-3.0"
+         GTK_LIBS=`$PKG_CFG --silence-errors --libs $GTK_PACKAGES`
+      fi
       WEBKIT_PKG="webkit-1.1"
       if test x"$GTK_LIBS" = x; then
          GTK_PACKAGES="gtk+-2.0 gthread-2.0"