2005-04-25 19:55:06 +04:00
|
|
|
# To compile this into a configure script, you need:
|
|
|
|
# * Autoconf 2.50 or newer
|
|
|
|
# * Gtk (for $prefix/share/aclocal/gtk.m4)
|
|
|
|
# * Automake (for aclocal)
|
|
|
|
# If you've got them, running "autoreconf" should work.
|
|
|
|
|
|
|
|
AC_INIT
|
|
|
|
AC_CONFIG_FILES([Makefile])
|
|
|
|
AC_CONFIG_HEADERS([uxconfig.h:uxconfig.in])
|
|
|
|
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_CC
|
|
|
|
if test "X$GCC" = Xyes; then
|
2009-08-30 17:16:50 +04:00
|
|
|
PUTTYCFLAGS="-Wall -Werror"
|
|
|
|
else
|
|
|
|
PUTTYCFLAGS=""
|
2005-04-25 19:55:06 +04:00
|
|
|
fi
|
2009-08-30 17:16:50 +04:00
|
|
|
AC_SUBST(PUTTYCFLAGS)
|
2005-04-25 19:55:06 +04:00
|
|
|
|
2008-11-23 01:49:27 +03:00
|
|
|
AC_ARG_WITH(gssapi,
|
|
|
|
[ --without-gssapi disable GSS-API support])
|
|
|
|
|
2005-09-14 14:53:39 +04:00
|
|
|
AC_CHECK_HEADERS([utmpx.h sys/select.h],,,[
|
2005-04-26 03:28:25 +04:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <utmp.h>])
|
2008-11-23 01:49:27 +03:00
|
|
|
if test "$with_gssapi" != "no"; then
|
|
|
|
AC_CHECK_HEADERS([gssapi/gssapi.h])
|
|
|
|
fi
|
2005-04-25 22:51:15 +04:00
|
|
|
|
2008-04-02 21:32:17 +04:00
|
|
|
# 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
|
2005-04-25 19:55:06 +04:00
|
|
|
AC_SUBST([all_targets])
|
|
|
|
|
|
|
|
AC_SEARCH_LIBS([socket], [xnet])
|
2008-11-23 01:49:27 +03:00
|
|
|
if test "$with_gssapi" != "no"; then
|
2009-07-29 03:45:48 +04:00
|
|
|
AC_SEARCH_LIBS([gss_init_sec_context], [gssapi gssapi_krb5 gss])
|
2008-11-23 01:49:27 +03:00
|
|
|
fi
|
2005-04-25 19:55:06 +04:00
|
|
|
|
2005-09-14 15:00:34 +04:00
|
|
|
AC_CHECK_FUNCS([getaddrinfo ptsname setresuid strsignal updwtmpx])
|
2005-04-25 19:55:06 +04:00
|
|
|
|
|
|
|
AC_OUTPUT
|
|
|
|
|
|
|
|
AH_BOTTOM([
|
|
|
|
/* Convert autoconf definitions to ones that PuTTY wants. */
|
|
|
|
|
|
|
|
#ifndef HAVE_GETADDRINFO
|
|
|
|
# define NO_IPV6
|
|
|
|
#endif
|
|
|
|
#ifndef HAVE_SETRESUID
|
|
|
|
# define HAVE_NO_SETRESUID
|
|
|
|
#endif
|
|
|
|
#ifndef HAVE_STRSIGNAL
|
|
|
|
# define HAVE_NO_STRSIGNAL
|
|
|
|
#endif
|
2005-09-14 15:00:34 +04:00
|
|
|
#if !defined(HAVE_UTMPX_H) || !defined(HAVE_UPDWTMPX)
|
2005-04-25 19:55:06 +04:00
|
|
|
# define OMIT_UTMP
|
|
|
|
#endif
|
|
|
|
#ifndef HAVE_PTSNAME
|
|
|
|
# define BSD_PTYS
|
|
|
|
#endif
|
2005-09-14 14:53:39 +04:00
|
|
|
#ifndef HAVE_SYS_SELECT_H
|
|
|
|
# define HAVE_NO_SYS_SELECT_H
|
|
|
|
#endif
|
2008-04-02 21:32:17 +04:00
|
|
|
#ifndef HAVE_PANGO_FONT_FAMILY_IS_MONOSPACE
|
|
|
|
# define PANGO_PRE_1POINT4
|
|
|
|
#endif
|
|
|
|
#ifndef HAVE_PANGO_FONT_MAP_LIST_FAMILIES
|
|
|
|
# define PANGO_PRE_1POINT6
|
|
|
|
#endif
|
2008-11-23 01:49:27 +03:00
|
|
|
#ifndef HAVE_GSSAPI_GSSAPI_H
|
|
|
|
# define NO_GSSAPI
|
|
|
|
#endif
|
2005-04-25 19:55:06 +04:00
|
|
|
])
|