diff configure @ 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	Thu Jun 30 04:48:10 2011 +0000
+++ b/configure	Thu Jun 30 07:43:35 2011 +0000
@@ -703,6 +703,7 @@
 ac_user_opts='
 enable_option_checking
 with_compat
+with_gtk3
 with_gtk
 with_gtkframework
 with_gtkhtml
@@ -1351,6 +1352,7 @@
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-compat           specify this to build the optional dwcompat library
+  --with-gtk3             specify this to build with GTK+ 3.x if available
   --with-gtk              specify this to build dwindows with GTK+ (only relevant for OSX)
   --with-gtkframework     specify this to build dwindows with GTK+ Framework (only relevant for OSX)
   --with-gtkhtml          specify this to build dwindows with libgtkhtml-2
@@ -3581,6 +3583,16 @@
   with_compat=no
 fi
 
+
+
+# Check whether --with-gtk3 was given.
+if test "${with_gtk3+set}" = set; then :
+  withval=$with_gtk3; with_gtk3=$withval
+else
+  with_gtk3=no
+fi
+
+
 if test $with_compat = yes; then
    COMPAT_OBJECT="compat.o"
    INSTALL_COMPAT="installcompat"
@@ -4612,8 +4624,11 @@
 
 
    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"