Commits

Jeff Sparkes committed bb1f033

Add support to configure --with-gtk=2

* configure.ac: Add support for --with-gtk=2 and --with-gtk=3 to
build with a specific major version.
* configure: Regenerate.

  • Participants
  • Parent commits 2cb1ba3

Comments (0)

Files changed (3)

+2013-11-19  Jeff Sparkes  <jsparkes@gmail.com>
+
+	* configure.ac: Add support for --with-gtk=2 and --with-gtk=3 to
+	build with a specific major version.
+	* configure: Regenerate.
+
 2013-11-15  Jeff Sparkes  <jsparkes@gmail.com>
 
 	* configure.ac: Output exact GTK version.
                           and fontconfig support. Default is `noemacs,
                           nomenubars, notabs, nogauges'. The default when
                           selected is `emacs, nomenubars, notabs, nogauges'.
-  --with-gtk              Support GTK on the X Window System. (EXPERIMENTAL)
+  --with-gtk              Support GTK on the X Window System. Can specify 2 or
+                          3. (EXPERIMENTAL)
   --with-gnome            Support GNOME on the X Window System. (EXPERIMENTAL)
   --with-msw              Support MS Windows as a window system (only under
                           Cygwin and MinGW). `--with-msw=no' may be needed on
 GNOME_CONFIG=no
 GTK_CONFIG=no
 GTK_VERSION=""
+GTK_POSSIBLE="gtk+-3.0 gtk+-2.0"
+
+if test "$with_gtk" = "3"; then
+   GTK_POSSIBLE="gtk+-3.0"
+fi
+if test "$with_gtk" = "2"; then
+   GTK_POSSIBLE="gtk+-2.0"
+fi
 
 if test "$with_gnome" != "no"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNOME configuration script" >&5
 if test "$with_gtk" != "no";then
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK configuration script" >&5
 $as_echo_n "checking for GTK configuration script... " >&6; }
-   for possible in gtk+-3.0 gtk+-2.0
+   for possible in $GTK_POSSIBLE
    do
       possible_version=`pkg-config --modversion ${possible} 2> /dev/null`
       if test "x${possible_version}" != "x"; then
 	XE_COMPLEX_OPTION([tabs],[no]),
 	XE_COMPLEX_OPTION([gauges],[no])])
 XE_MERGED_ARG([gtk],
-	AS_HELP_STRING([--with-gtk],[Support GTK on the X Window System. (EXPERIMENTAL)]),
+	AS_HELP_STRING([--with-gtk],[Support GTK on the X Window System. Can specify 2 or 3. (EXPERIMENTAL)]),
 	[true], [with_gtk=no])
 XE_MERGED_ARG([gnome],
 	AS_HELP_STRING([--with-gnome],[Support GNOME on the X Window System. (EXPERIMENTAL)]),
 GNOME_CONFIG=no
 GTK_CONFIG=no
 GTK_VERSION=""
+GTK_POSSIBLE="gtk+-3.0 gtk+-2.0"
+
+if test "$with_gtk" = "3"; then
+   GTK_POSSIBLE="gtk+-3.0"
+fi
+if test "$with_gtk" = "2"; then
+   GTK_POSSIBLE="gtk+-2.0"
+fi
 
 if test "$with_gnome" != "no"; then
    AC_MSG_CHECKING(for GNOME configuration script)
 
 if test "$with_gtk" != "no";then
    AC_MSG_CHECKING(for GTK configuration script)
-   for possible in gtk+-3.0 gtk+-2.0
+   for possible in $GTK_POSSIBLE
    do
       possible_version=`pkg-config --modversion ${possible} 2> /dev/null`
       if test "x${possible_version}" != "x"; then