If the user enables gtk3, (silently) disable gtk2 rather than forcing the user
authorJeff Morriss <jeff.morriss.ws@gmail.com>
Wed, 26 Jun 2013 13:26:25 +0000 (13:26 -0000)
committerJeff Morriss <jeff.morriss.ws@gmail.com>
Wed, 26 Jun 2013 13:26:25 +0000 (13:26 -0000)
to also specify --without-gtk2 or complaining that they have specified both.

svn path=/trunk/; revision=50167

configure.ac

index 21c6f9eb573e9b335bae0f21c2782870b1e307be..e11fa7de022fd2b1e5f7b3e1f2e2f0ecbef486d4 100644 (file)
@@ -228,6 +228,24 @@ PKG_PROG_PKG_CONFIG
 #
 AC_SYS_LARGEFILE
 
+#
+# GUI toolkit options
+#
+AC_ARG_WITH([qt],
+  AC_HELP_STRING( [--with-qt=@<:@yes/no@:>@],
+                  [use Qt @<:@default=no@:>@]),
+  with_qt="$withval", with_qt="no")
+
+AC_ARG_WITH([gtk2],
+  AC_HELP_STRING( [--with-gtk2=@<:@yes/no@:>@],
+                  [use GTK+ 2.0 @<:@default=yes@:>@]),
+  with_gtk2="$withval", with_gtk2="yes")
+
+AC_ARG_WITH([gtk3],
+  AC_HELP_STRING( [--with-gtk3=@<:@yes/no@:>@],
+                  [use GTK+ 3.0 instead of 2.0 @<:@default=no@:>@]),
+  with_gtk3="$withval", with_gtk3="no")
+
 # GnuTLS
 # Version 3.0 switched from LGPLv2.1+ to LGPLv3+, then switched back to
 # LGPLv2.1+ in version 3.1.10
@@ -401,21 +419,6 @@ linux*)
        fi
 esac
 
-AC_ARG_WITH([qt],
-  AC_HELP_STRING( [--with-qt=@<:@yes/no@:>@],
-                  [use Qt @<:@default=no@:>@]),
-  with_qt="$withval", with_qt="no")
-
-AC_ARG_WITH([gtk2],
-  AC_HELP_STRING( [--with-gtk2=@<:@yes/no@:>@],
-                  [use GTK+ 2.0 @<:@default=yes@:>@]),
-  with_gtk2="$withval", with_gtk2="yes")
-
-AC_ARG_WITH([gtk3],
-  AC_HELP_STRING( [--with-gtk3=@<:@yes/no@:>@],
-                  [use GTK+ 3.0 instead of 2.0 @<:@default=no@:>@]),
-  with_gtk3="$withval", with_gtk3="no")
-
 # libsmi
 # FIXME: currently the path argument to with-libsmi is being ignored
 AX_LIBSMI
@@ -1075,7 +1078,8 @@ if test "x$enable_wireshark" = "xyes"; then
        fi
 
        if test "x$with_gtk3" = "xyes" -a "x$with_gtk2" = "xyes" ; then
-               AC_MSG_ERROR(--with-gtk2 and --with-gtk3 are mutually exclusive)
+               # If the user gave us --with-gtk3, use gtk3 rather than gtk2
+               with_gtk2="no"
        fi
 
        if test "x$with_gtk3" = "xyes"; then