PageRenderTime 62ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/unix/configure.ac

http://futty.googlecode.com/
m4 | 107 lines | 54 code | 13 blank | 40 comment | 0 complexity | bc6fbf37637231f412015cad010e388a MD5 | raw file
  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. AC_INIT
  7. AC_CONFIG_FILES([Makefile])
  8. AC_CONFIG_HEADERS([uxconfig.h:uxconfig.in])
  9. AC_PROG_INSTALL
  10. AC_PROG_CC
  11. if test "X$GCC" = Xyes; then
  12. PUTTYCFLAGS="-Wall -Werror"
  13. else
  14. PUTTYCFLAGS=""
  15. fi
  16. AC_SUBST(PUTTYCFLAGS)
  17. AC_ARG_WITH([gssapi],
  18. [AS_HELP_STRING([--without-gssapi],
  19. [disable GSSAPI support])],
  20. [],
  21. [with_gssapi=yes])
  22. WITH_GSSAPI=
  23. AS_IF([test "x$with_gssapi" != xno],
  24. [AC_DEFINE([WITH_GSSAPI], [1], [Define if building with GSSAPI support.])])
  25. AC_CHECK_HEADERS([utmpx.h sys/select.h],,,[
  26. #include <sys/types.h>
  27. #include <utmp.h>])
  28. # Look for both GTK 1 and GTK 2.
  29. AM_PATH_GTK([1.2.0], [gtk=1], [gtk=none])
  30. AM_PATH_GTK_2_0([2.0.0], [gtk=2], [])
  31. if test "$gtk" = "none"; then
  32. all_targets="all-cli"
  33. else
  34. all_targets="all-cli all-gtk"
  35. fi
  36. if test "$gtk" = "2"; then
  37. ac_save_CFLAGS="$CFLAGS"
  38. ac_save_LIBS="$LIBS"
  39. CFLAGS="$CFLAGS $GTK_CFLAGS"
  40. LIBS="$GTK_LIBS $LIBS"
  41. AC_CHECK_FUNCS([pango_font_family_is_monospace pango_font_map_list_families])
  42. CFLAGS="$ac_save_CFLAGS"
  43. LIBS="$ac_save_LIBS"
  44. fi
  45. AC_SUBST([all_targets])
  46. AC_SEARCH_LIBS([socket], [xnet])
  47. AS_IF([test "x$with_gssapi" != xno],
  48. [AC_SEARCH_LIBS(
  49. [dlopen],[dl],
  50. [],
  51. [AC_DEFINE([NO_LIBDL], [1], [Define if we could not find libdl.])
  52. AC_CHECK_HEADERS([gssapi/gssapi.h])
  53. AC_SEARCH_LIBS(
  54. [gss_init_sec_context],[gssapi gssapi_krb5 gss],
  55. [],
  56. [AC_DEFINE([NO_GSSAPI_LIB], [1], [Define if we could not find a gssapi library])])])])
  57. AC_CHECK_LIB(X11, XOpenDisplay)
  58. AC_CHECK_FUNCS([getaddrinfo ptsname setresuid strsignal updwtmpx])
  59. AC_OUTPUT
  60. AH_BOTTOM([
  61. /* Convert autoconf definitions to ones that PuTTY wants. */
  62. #ifndef HAVE_GETADDRINFO
  63. # define NO_IPV6
  64. #endif
  65. #ifndef HAVE_SETRESUID
  66. # define HAVE_NO_SETRESUID
  67. #endif
  68. #ifndef HAVE_STRSIGNAL
  69. # define HAVE_NO_STRSIGNAL
  70. #endif
  71. #if !defined(HAVE_UTMPX_H) || !defined(HAVE_UPDWTMPX)
  72. # define OMIT_UTMP
  73. #endif
  74. #ifndef HAVE_PTSNAME
  75. # define BSD_PTYS
  76. #endif
  77. #ifndef HAVE_SYS_SELECT_H
  78. # define HAVE_NO_SYS_SELECT_H
  79. #endif
  80. #ifndef HAVE_PANGO_FONT_FAMILY_IS_MONOSPACE
  81. # define PANGO_PRE_1POINT4
  82. #endif
  83. #ifndef HAVE_PANGO_FONT_MAP_LIST_FAMILIES
  84. # define PANGO_PRE_1POINT6
  85. #endif
  86. #if !defined(WITH_GSSAPI)
  87. # define NO_GSSAPI
  88. #endif
  89. #if !defined(NO_GSSAPI) && defined(NO_LIBDL)
  90. # if !defined(HAVE_GSSAPI_GSSAPI_H) || defined(NO_GSSAPI_LIB)
  91. # define NO_GSSAPI
  92. # endif
  93. #endif
  94. ])