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 | |
7 | AC_INIT |
8 | AC_CONFIG_FILES([Makefile]) |
9 | AC_CONFIG_HEADERS([uxconfig.h:uxconfig.in]) |
10 | |
11 | AC_PROG_INSTALL |
12 | AC_PROG_CC |
13 | if test "X$GCC" = Xyes; then |
14 | CFLAGS="$CFLAGS -Wall -Werror" |
15 | fi |
16 | |
95aec249 |
17 | AC_ARG_WITH(gssapi, |
18 | [ --without-gssapi disable GSS-API support]) |
19 | |
154c73d5 |
20 | AC_CHECK_HEADERS([utmpx.h sys/select.h],,,[ |
bea25c48 |
21 | #include <sys/types.h> |
22 | #include <utmp.h>]) |
95aec249 |
23 | if test "$with_gssapi" != "no"; then |
24 | AC_CHECK_HEADERS([gssapi/gssapi.h]) |
25 | fi |
dbf58cfa |
26 | |
f160b7b8 |
27 | # Look for both GTK 1 and GTK 2. |
28 | AM_PATH_GTK([1.2.0], [gtk=1], [gtk=none]) |
29 | AM_PATH_GTK_2_0([2.0.0], [gtk=2], []) |
30 | if test "$gtk" = "none"; then |
31 | all_targets="all-cli" |
32 | else |
33 | all_targets="all-cli all-gtk" |
34 | fi |
35 | if test "$gtk" = "2"; then |
36 | ac_save_CFLAGS="$CFLAGS" |
37 | ac_save_LIBS="$LIBS" |
38 | CFLAGS="$CFLAGS $GTK_CFLAGS" |
39 | LIBS="$GTK_LIBS $LIBS" |
40 | AC_CHECK_FUNCS([pango_font_family_is_monospace pango_font_map_list_families]) |
41 | CFLAGS="$ac_save_CFLAGS" |
42 | LIBS="$ac_save_LIBS" |
43 | fi |
76d3a838 |
44 | AC_SUBST([all_targets]) |
45 | |
46 | AC_SEARCH_LIBS([socket], [xnet]) |
95aec249 |
47 | if test "$with_gssapi" != "no"; then |
48 | AC_SEARCH_LIBS([gss_init_sec_context], [gss gssapi gssapi_krb5]) |
49 | fi |
76d3a838 |
50 | |
b0f0a9f5 |
51 | AC_CHECK_FUNCS([getaddrinfo ptsname setresuid strsignal updwtmpx]) |
76d3a838 |
52 | |
53 | AC_OUTPUT |
54 | |
55 | AH_BOTTOM([ |
56 | /* Convert autoconf definitions to ones that PuTTY wants. */ |
57 | |
58 | #ifndef HAVE_GETADDRINFO |
59 | # define NO_IPV6 |
60 | #endif |
61 | #ifndef HAVE_SETRESUID |
62 | # define HAVE_NO_SETRESUID |
63 | #endif |
64 | #ifndef HAVE_STRSIGNAL |
65 | # define HAVE_NO_STRSIGNAL |
66 | #endif |
b0f0a9f5 |
67 | #if !defined(HAVE_UTMPX_H) || !defined(HAVE_UPDWTMPX) |
76d3a838 |
68 | # define OMIT_UTMP |
69 | #endif |
70 | #ifndef HAVE_PTSNAME |
71 | # define BSD_PTYS |
72 | #endif |
154c73d5 |
73 | #ifndef HAVE_SYS_SELECT_H |
74 | # define HAVE_NO_SYS_SELECT_H |
75 | #endif |
f160b7b8 |
76 | #ifndef HAVE_PANGO_FONT_FAMILY_IS_MONOSPACE |
77 | # define PANGO_PRE_1POINT4 |
78 | #endif |
79 | #ifndef HAVE_PANGO_FONT_MAP_LIST_FAMILIES |
80 | # define PANGO_PRE_1POINT6 |
81 | #endif |
95aec249 |
82 | #ifndef HAVE_GSSAPI_GSSAPI_H |
83 | # define NO_GSSAPI |
84 | #endif |
76d3a838 |
85 | ]) |