Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.4KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_wint_t.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_WINT_T
  8. #
  9. # DESCRIPTION
  10. #
  11. # It turns out that MacOS X doesn't guarantee to provide the "wint_t" type
  12. # unless you include the strange header <runetype.h> in addition to
  13. # <wchar.h>. Consequently, the "do I have a system wint_t?" probe fails
  14. # and an alternate gets used. Unfortunately, by the time the program gets
  15. # built, one way or another that funny header winds up getting included
  16. # and the "#define wint_t unsigned int" patch-up-hack mutilates the
  17. # typedef. This macro will get it right.
  18. #
  19. # LICENSE
  20. #
  21. # Copyright (c) 2008 Bruce Korb <bkorb@gnu.org>
  22. #
  23. # Copying and distribution of this file, with or without modification, are
  24. # permitted in any medium without royalty provided the copyright notice
  25. # and this notice are preserved. This file is offered as-is, without any
  26. # warranty.
  27. #serial 8
  28. AC_DEFUN([AX_WINT_T],[
  29. AC_CHECK_HEADERS([runetype.h wchar.h])
  30. AC_CHECK_TYPE(wint_t, [], [
  31. AC_DEFINE_UNQUOTED([wint_t], [unsigned int],
  32. [Define to `unsigned int' if not found])], [
  33. AC_INCLUDES_DEFAULT
  34. #if HAVE_RUNETYPE_H
  35. # include <runetype.h>
  36. #endif
  37. #if HAVE_WCHAR_H
  38. # include <wchar.h>
  39. #endif
  40. ])])