1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

--with-gtk-version option to configure, so you can explicitly tell it

which GTK version you want to build with if both are installed. Based
on a patch by Malcolm Smith, though somewhat modified.

[originally from svn r9228]
This commit is contained in:
Simon Tatham 2011-07-17 22:17:40 +00:00
parent 8aea84e894
commit 5cb0fb2927

View File

@ -27,22 +27,47 @@ WITH_GSSAPI=
AS_IF([test "x$with_gssapi" != xno],
[AC_DEFINE([WITH_GSSAPI], [1], [Define if building with GSSAPI support.])])
AC_ARG_WITH([gtk-version],
[AS_HELP_STRING([--with-gtk-version],
[specify GTK version to use (1 or 2) (optional)])],
[gtk_version_desired="$withval"],
[gtk_version_desired="any"])
case "$gtk_version_desired" in
1 | 2 | any) ;;
*) AC_ERROR([Invalid GTK version specified])
esac
AC_CHECK_HEADERS([utmpx.h sys/select.h],,,[
#include <sys/types.h>
#include <utmp.h>])
# Look for both GTK 1 and GTK 2.
ifdef([AM_PATH_GTK],[
AM_PATH_GTK([1.2.0], [gtk=1], [gtk=none])
],[AC_WARNING([generating configure script without GTK 1 autodetection])])
ifdef([AM_PATH_GTK_2_0],[
AM_PATH_GTK_2_0([2.0.0], [gtk=2], [])
],[AC_WARNING([generating configure script without GTK 2 autodetection])])
gtk=none
case "$gtk_version_desired" in
1 | any)
ifdef([AM_PATH_GTK],[
AM_PATH_GTK([1.2.0], [gtk=1], [])
],[AC_WARNING([generating configure script without GTK 1 autodetection])])
;;
esac
case "$gtk_version_desired" in
2 | any)
ifdef([AM_PATH_GTK_2_0],[
AM_PATH_GTK_2_0([2.0.0], [gtk=2], [])
],[AC_WARNING([generating configure script without GTK 2 autodetection])])
;;
esac
if test "$gtk" = "none"; then
all_targets="all-cli"
else
all_targets="all-cli all-gtk"
fi
if test "$gtk" = "2"; then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"