summaryrefslogtreecommitdiff
path: root/m4/vasnprintf.m4
blob: d309f888cacc1deab49467b93bba1b9c5b065331 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# vasnprintf.m4 serial 3
dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License.  As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
dnl that contains a configuration script generated by Autoconf, under
dnl the same distribution terms as the rest of that program.

AC_DEFUN([gl_FUNC_VASNPRINTF],
[
  AC_REPLACE_FUNCS(vasnprintf)
  if test $ac_cv_func_vasnprintf = no; then
    AC_LIBOBJ(printf-args)
    AC_LIBOBJ(printf-parse)
    AC_LIBOBJ(asnprintf)
    gl_PREREQ_PRINTF_ARGS
    gl_PREREQ_PRINTF_PARSE
    gl_PREREQ_VASNPRINTF
    gl_PREREQ_ASNPRINTF
  fi
])

# Prequisites of lib/printf-args.h, lib/printf-args.c.
AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
[
  AC_REQUIRE([bh_C_SIGNED])
  AC_REQUIRE([jm_AC_TYPE_LONG_LONG])
  AC_REQUIRE([gt_TYPE_LONGDOUBLE])
  AC_REQUIRE([gt_TYPE_WCHAR_T])
  AC_REQUIRE([gt_TYPE_WINT_T])
])

# Prequisites of lib/printf-parse.h, lib/printf-parse.c.
AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
[
  AC_REQUIRE([jm_AC_TYPE_LONG_LONG])
  AC_REQUIRE([gt_TYPE_LONGDOUBLE])
  AC_REQUIRE([gt_TYPE_WCHAR_T])
  AC_REQUIRE([gt_TYPE_WINT_T])
  AC_REQUIRE([AC_TYPE_SIZE_T])
  AC_CHECK_TYPES(ptrdiff_t)
  AC_REQUIRE([gt_AC_TYPE_INTMAX_T])
])

# Prerequisites of lib/vasnprintf.c.
AC_DEFUN([gl_PREREQ_VASNPRINTF],
[
  AC_REQUIRE([AC_FUNC_ALLOCA])
  AC_REQUIRE([jm_AC_TYPE_LONG_LONG])
  AC_REQUIRE([gt_TYPE_LONGDOUBLE])
  AC_REQUIRE([gt_TYPE_WCHAR_T])
  AC_REQUIRE([gt_TYPE_WINT_T])
  AC_CHECK_FUNCS(snprintf wcslen)
])

# Prerequisites of lib/asnprintf.c.
AC_DEFUN([gl_PREREQ_ASNPRINTF],
[
])