estream.m4 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. dnl Autoconf macros for libestream
  2. dnl Copyright (C) 2007 g10 Code GmbH
  3. dnl
  4. dnl This file is free software; as a special exception the author gives
  5. dnl unlimited permission to copy and/or distribute it, with or without
  6. dnl modifications, as long as this notice is preserved.
  7. dnl
  8. dnl This file is distributed in the hope that it will be useful, but
  9. dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
  10. dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. dnl estream_PRINTF_INIT
  12. dnl Prepare build of source included estream-printf.c
  13. dnl
  14. AC_DEFUN([estream_PRINTF_INIT],
  15. [
  16. AC_MSG_NOTICE([checking system features for estream-printf])
  17. AC_TYPE_LONG_LONG_INT
  18. AC_TYPE_LONG_DOUBLE
  19. AC_TYPE_INTMAX_T
  20. AC_TYPE_UINTMAX_T
  21. AC_CHECK_TYPES([ptrdiff_t])
  22. AC_CHECK_SIZEOF([unsigned long])
  23. AC_CHECK_SIZEOF([void *])
  24. AC_CACHE_CHECK([for nl_langinfo and THOUSANDS_SEP],
  25. estream_cv_langinfo_thousands_sep,
  26. [AC_TRY_LINK([#include <langinfo.h>],
  27. [char* cs = nl_langinfo(THOUSANDS_SEP); return !cs;],
  28. estream_cv_langinfo_thousands_sep=yes,
  29. estream_cv_langinfo_thousands_sep=no)
  30. ])
  31. if test $estream_cv_langinfo_thousands_sep = yes; then
  32. AC_DEFINE(HAVE_LANGINFO_THOUSANDS_SEP, 1,
  33. [Define if you have <langinfo.h> and nl_langinfo(THOUSANDS_SEP).])
  34. fi
  35. ])
  36. dnl estream_INIT
  37. dnl Prepare build of source included estream.c
  38. dnl
  39. AC_DEFUN([estream_INIT],
  40. [
  41. AC_REQUIRE([estream_PRINTF_INIT])
  42. AC_MSG_NOTICE([checking system features for estream])
  43. ])