1 # obstack-printf-posix.m4 serial 4
2 dnl Copyright (C) 2008-2017 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
7 AC_DEFUN([gl_FUNC_OBSTACK_PRINTF_POSIX],
9 dnl Persuade glibc <stdio.h> to declare obstack_printf(), obstack_vprintf().
10 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
12 AC_REQUIRE([gl_PRINTF_SIZES_C99])
13 AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
14 AC_REQUIRE([gl_PRINTF_INFINITE])
15 AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
16 AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
17 AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
18 AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
19 AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
20 AC_REQUIRE([gl_PRINTF_POSITIONS])
21 AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
22 AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
23 AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
24 AC_REQUIRE([gl_PRINTF_PRECISION])
25 AC_REQUIRE([gl_PRINTF_ENOMEM])
26 gl_cv_func_obstack_printf_posix=no
27 AC_CHECK_FUNCS_ONCE([obstack_printf])
28 if test $ac_cv_func_obstack_printf = yes ; then
29 case "$gl_cv_func_printf_sizes_c99" in
31 case "$gl_cv_func_printf_long_double" in
33 case "$gl_cv_func_printf_infinite" in
35 case "$gl_cv_func_printf_infinite_long_double" in
37 case "$gl_cv_func_printf_directive_a" in
39 case "$gl_cv_func_printf_directive_f" in
41 case "$gl_cv_func_printf_directive_n" in
43 case "$gl_cv_func_printf_directive_ls" in
45 case "$gl_cv_func_printf_positions" in
47 case "$gl_cv_func_printf_flag_grouping" in
49 case "$gl_cv_func_printf_flag_leftadjust" in
51 case "$gl_cv_func_printf_flag_zero" in
53 case "$gl_cv_func_printf_precision" in
55 case "$gl_cv_func_printf_enomem" in
57 # obstack_printf exists and is
58 # already POSIX compliant.
59 gl_cv_func_obstack_printf_posix=yes
89 if test $gl_cv_func_obstack_printf_posix = no; then
90 gl_PREREQ_VASNPRINTF_LONG_DOUBLE
91 gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
92 gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
93 gl_PREREQ_VASNPRINTF_DIRECTIVE_A
94 gl_PREREQ_VASNPRINTF_DIRECTIVE_F
95 gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
96 gl_PREREQ_VASNPRINTF_FLAG_GROUPING
97 gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
98 gl_PREREQ_VASNPRINTF_FLAG_ZERO
99 gl_PREREQ_VASNPRINTF_PRECISION
100 gl_PREREQ_VASNPRINTF_ENOMEM
101 gl_REPLACE_VASNPRINTF
102 gl_REPLACE_OBSTACK_PRINTF
104 gl_DECL_OBSTACK_PRINTF