X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/154c73d56d8847aaf20c048ccc35c19c584890ce..5de9b45ddffe2bf370e89519e2f7a0ca80329f26:/unix/configure.ac diff --git a/unix/configure.ac b/unix/configure.ac index 40e6d569..846a35cd 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -18,12 +18,28 @@ AC_CHECK_HEADERS([utmpx.h sys/select.h],,,[ #include #include ]) -AM_PATH_GTK([1.2.0], [all_targets="all-cli all-gtk"], [all_targets="all-cli"]) +# Look for both GTK 1 and GTK 2. +AM_PATH_GTK([1.2.0], [gtk=1], [gtk=none]) +AM_PATH_GTK_2_0([2.0.0], [gtk=2], []) +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" + CFLAGS="$CFLAGS $GTK_CFLAGS" + LIBS="$GTK_LIBS $LIBS" + AC_CHECK_FUNCS([pango_font_family_is_monospace pango_font_map_list_families]) + CFLAGS="$ac_save_CFLAGS" + LIBS="$ac_save_LIBS" +fi AC_SUBST([all_targets]) AC_SEARCH_LIBS([socket], [xnet]) -AC_CHECK_FUNCS([getaddrinfo ptsname setresuid strsignal]) +AC_CHECK_FUNCS([getaddrinfo ptsname setresuid strsignal updwtmpx]) AC_OUTPUT @@ -39,7 +55,7 @@ AH_BOTTOM([ #ifndef HAVE_STRSIGNAL # define HAVE_NO_STRSIGNAL #endif -#ifndef HAVE_UTMPX_H +#if !defined(HAVE_UTMPX_H) || !defined(HAVE_UPDWTMPX) # define OMIT_UTMP #endif #ifndef HAVE_PTSNAME @@ -48,4 +64,10 @@ AH_BOTTOM([ #ifndef HAVE_SYS_SELECT_H # define HAVE_NO_SYS_SELECT_H #endif +#ifndef HAVE_PANGO_FONT_FAMILY_IS_MONOSPACE +# define PANGO_PRE_1POINT4 +#endif +#ifndef HAVE_PANGO_FONT_MAP_LIST_FAMILIES +# define PANGO_PRE_1POINT6 +#endif ])