Blame m4/estream.m4

Packit fc043f
dnl Autoconf macros for libestream
Packit fc043f
dnl       Copyright (C) 2007 g10 Code GmbH
Packit fc043f
dnl
Packit fc043f
dnl This file is free software; as a special exception the author gives
Packit fc043f
dnl unlimited permission to copy and/or distribute it, with or without
Packit fc043f
dnl modifications, as long as this notice is preserved.
Packit fc043f
dnl
Packit fc043f
dnl This file is distributed in the hope that it will be useful, but
Packit fc043f
dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
Packit fc043f
dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Packit fc043f
Packit fc043f
Packit fc043f
dnl estream_PRINTF_INIT
Packit fc043f
dnl Prepare build of source included estream-printf.c
Packit fc043f
dnl
Packit fc043f
AC_DEFUN([estream_PRINTF_INIT],
Packit fc043f
[
Packit fc043f
  AC_MSG_NOTICE([checking system features for estream-printf])
Packit fc043f
  AC_CHECK_HEADERS(stdint.h)
Packit fc043f
  AC_TYPE_LONG_LONG_INT
Packit fc043f
  AC_TYPE_LONG_DOUBLE
Packit fc043f
  AC_TYPE_INTMAX_T
Packit fc043f
  AC_TYPE_UINTMAX_T
Packit fc043f
  AC_CHECK_TYPES([ptrdiff_t])
Packit fc043f
  AC_CHECK_SIZEOF([unsigned long])
Packit fc043f
  AC_CHECK_SIZEOF([void *])
Packit fc043f
  AC_CACHE_CHECK([for nl_langinfo and THOUSANDS_SEP],
Packit fc043f
                  estream_cv_langinfo_thousands_sep,
Packit fc043f
      [AC_TRY_LINK([#include <langinfo.h>],
Packit fc043f
        [char* cs = nl_langinfo(THOUSANDS_SEP); return !cs;],
Packit fc043f
        estream_cv_langinfo_thousands_sep=yes,
Packit fc043f
        estream_cv_langinfo_thousands_sep=no)
Packit fc043f
      ])
Packit fc043f
  if test $estream_cv_langinfo_thousands_sep = yes; then
Packit fc043f
    AC_DEFINE(HAVE_LANGINFO_THOUSANDS_SEP, 1,
Packit fc043f
      [Define if you have <langinfo.h> and nl_langinfo(THOUSANDS_SEP).])
Packit fc043f
  fi
Packit fc043f
])
Packit fc043f
Packit fc043f
Packit fc043f
dnl estream_INIT
Packit fc043f
dnl Prepare build of source included estream.c
Packit fc043f
dnl
Packit fc043f
AC_DEFUN([estream_INIT],
Packit fc043f
[
Packit fc043f
  AC_REQUIRE([estream_PRINTF_INIT])
Packit fc043f
  AC_MSG_NOTICE([checking system features for estream])
Packit fc043f
  AC_CHECK_FUNCS([memrchr])
Packit fc043f
])