X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/c1b71b1c52473fefe61d9263689ce423ec6d4818..fe16501101f9e0e410426c952bcbdfcdd579416f:/unix/configure.ac diff --git a/unix/configure.ac b/unix/configure.ac index e7558120..a5185408 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -68,27 +68,27 @@ AC_CHECK_HEADERS([utmpx.h sys/select.h],,,[ #include #include ]) -# Look for both GTK 1 and GTK 2. If we can't find either, have the -# makefile only build the CLI programs. +# Look for both GTK 2 and GTK 1, in descending order of preference. If +# we can't find either, have the makefile only build the CLI programs. 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) +case "$gtk_version_desired:$gtk" in + 2:none | any:none) 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 +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])]) + ;; +esac + AM_CONDITIONAL(HAVE_GTK, [test "$gtk" != "none"]) if test "$gtk" = "2"; then