Some systems (HP-UX) don't yet have <sys/select.h>, putting select() in
[sgt/putty] / unix / configure.ac
CommitLineData
76d3a838 1# To compile this into a configure script, you need:
2# * Autoconf 2.50 or newer
3# * Gtk (for $prefix/share/aclocal/gtk.m4)
4# * Automake (for aclocal)
5# If you've got them, running "autoreconf" should work.
6
7AC_INIT
8AC_CONFIG_FILES([Makefile])
9AC_CONFIG_HEADERS([uxconfig.h:uxconfig.in])
10
11AC_PROG_INSTALL
12AC_PROG_CC
13if test "X$GCC" = Xyes; then
14 CFLAGS="$CFLAGS -Wall -Werror"
15fi
16
154c73d5 17AC_CHECK_HEADERS([utmpx.h sys/select.h],,,[
bea25c48 18#include <sys/types.h>
19#include <utmp.h>])
dbf58cfa 20
76d3a838 21AM_PATH_GTK([1.2.0], [all_targets="all-cli all-gtk"], [all_targets="all-cli"])
22AC_SUBST([all_targets])
23
24AC_SEARCH_LIBS([socket], [xnet])
25
bea25c48 26AC_CHECK_FUNCS([getaddrinfo ptsname setresuid strsignal])
76d3a838 27
28AC_OUTPUT
29
30AH_BOTTOM([
31/* Convert autoconf definitions to ones that PuTTY wants. */
32
33#ifndef HAVE_GETADDRINFO
34# define NO_IPV6
35#endif
36#ifndef HAVE_SETRESUID
37# define HAVE_NO_SETRESUID
38#endif
39#ifndef HAVE_STRSIGNAL
40# define HAVE_NO_STRSIGNAL
41#endif
bea25c48 42#ifndef HAVE_UTMPX_H
76d3a838 43# define OMIT_UTMP
44#endif
45#ifndef HAVE_PTSNAME
46# define BSD_PTYS
47#endif
154c73d5 48#ifndef HAVE_SYS_SELECT_H
49# define HAVE_NO_SYS_SELECT_H
50#endif
76d3a838 51])