1 dnl Autoconf macros for libestream
2 dnl Copyright (C) 2007 g10 Code GmbH
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.
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.
13 dnl estream_PRINTF_INIT
14 dnl Prepare build of source included estream-printf.c
16 AC_DEFUN([estream_PRINTF_INIT],
18 AC_MSG_NOTICE([checking system features for estream-printf])
19 AC_CHECK_HEADERS(stdint.h)
24 AC_CHECK_TYPES([ptrdiff_t])
25 AC_CHECK_SIZEOF([unsigned long])
26 AC_CHECK_SIZEOF([void *])
27 AC_CACHE_CHECK([for nl_langinfo and THOUSANDS_SEP],
28 estream_cv_langinfo_thousands_sep,
29 [AC_TRY_LINK([#include <langinfo.h>],
30 [char* cs = nl_langinfo(THOUSANDS_SEP); return !cs;],
31 estream_cv_langinfo_thousands_sep=yes,
32 estream_cv_langinfo_thousands_sep=no)
34 if test $estream_cv_langinfo_thousands_sep = yes; then
35 AC_DEFINE(HAVE_LANGINFO_THOUSANDS_SEP, 1,
36 [Define if you have <langinfo.h> and nl_langinfo(THOUSANDS_SEP).])
42 dnl Prepare build of source included estream.c
44 AC_DEFUN([estream_INIT],
46 AC_REQUIRE([estream_PRINTF_INIT])
47 AC_MSG_NOTICE([checking system features for estream])