From c5876a8ba2655c08125add29b907adb127c44a04 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 15 Jun 2013 19:58:10 +0000 Subject: [PATCH] Fallback for manual setup of GTK 1, if autoconf is run on a system where the GTK1 detection function AM_PATH_GTK hasn't been provided by /usr/share/aclocal/gtk.m4 or equivalent. (Systems without gtk.m4 are becoming more common, but on the other hand I know at least one person is still using GTK 1 PuTTY since the 0.62 release.) [originally from svn r9868] --- unix/configure.ac | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/unix/configure.ac b/unix/configure.ac index 17db126c..c0756fdd 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -85,7 +85,15 @@ case "$gtk_version_desired:$gtk" in 1:none | any:none) ifdef([AM_PATH_GTK],[ AM_PATH_GTK([1.2.0], [gtk=1], []) - ],[AC_WARNING([generating configure script without GTK 1 autodetection])]) + ],[ + # manual check for gtk1 + AC_PATH_PROG(GTK1_CONFIG, gtk-config, absent) + if test "$GTK1_CONFIG" != "absent"; then + GTK_CFLAGS=`"$GTK1_CONFIG" --cflags` + GTK_LIBS=`"$GTK1_CONFIG" --libs` + gtk=1 + fi + ]) ;; esac -- 2.45.2