annotate m4/obstack-printf-posix.m4 @ 10206:927afe014a7d

Fix various problems in 'obstack-printf' module.
author Bruno Haible <bruno@clisp.org>
date Sat, 14 Jun 2008 15:06:19 +0200
parents 3384541effec
children 3da3203f4774
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10206
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
1 # obstack-printf-posix.m4 serial 2
10205
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
2 dnl Copyright (C) 2008 Free Software Foundation, Inc.
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
3 dnl This file is free software; the Free Software Foundation
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
6
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
7 AC_DEFUN([gl_FUNC_OBSTACK_PRINTF_POSIX],
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
8 [
10206
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
9 dnl Persuade glibc <stdio.h> to declare obstack_printf(), obstack_vprintf().
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
10 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
11
10205
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
12 AC_REQUIRE([gl_PRINTF_SIZES_C99])
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
13 AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
14 AC_REQUIRE([gl_PRINTF_INFINITE])
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
15 AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
16 AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
17 AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
18 AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
19 AC_REQUIRE([gl_PRINTF_POSITIONS])
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
20 AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
21 AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
22 AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
23 AC_REQUIRE([gl_PRINTF_PRECISION])
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
24 AC_REQUIRE([gl_PRINTF_ENOMEM])
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
25 gl_cv_func_obstack_printf_posix=no
10206
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
26 AC_CHECK_FUNCS_ONCE([obstack_printf])
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
27 if test $ac_cv_func_obstack_printf = yes ; then
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
28 case "$gl_cv_func_printf_sizes_c99" in
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
29 *yes)
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
30 case "$gl_cv_func_printf_long_double" in
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
31 *yes)
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
32 case "$gl_cv_func_printf_infinite" in
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
33 *yes)
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
34 case "$gl_cv_func_printf_infinite_long_double" in
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
35 *yes)
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
36 case "$gl_cv_func_printf_directive_a" in
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
37 *yes)
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
38 case "$gl_cv_func_printf_directive_f" in
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
39 *yes)
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
40 case "$gl_cv_func_printf_directive_n" in
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
41 *yes)
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
42 case "$gl_cv_func_printf_positions" in
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
43 *yes)
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
44 case "$gl_cv_func_printf_flag_grouping" in
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
45 *yes)
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
46 case "$gl_cv_func_printf_flag_leftadjust" in
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
47 *yes)
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
48 case "$gl_cv_func_printf_flag_zero" in
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
49 *yes)
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
50 case "$gl_cv_func_printf_precision" in
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
51 *yes)
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
52 case "$gl_cv_func_printf_enomem" in
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
53 *yes)
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
54 # obstack_printf exists and is
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
55 # already POSIX compliant.
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
56 gl_cv_func_obstack_printf_posix= yes
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
57 ;;
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
58 esac
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
59 ;;
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
60 esac
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
61 ;;
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
62 esac
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
63 ;;
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
64 esac
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
65 ;;
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
66 esac
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
67 ;;
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
68 esac
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
69 ;;
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
70 esac
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
71 ;;
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
72 esac
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
73 ;;
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
74 esac
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
75 ;;
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
76 esac
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
77 ;;
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
78 esac
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
79 ;;
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
80 esac
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
81 ;;
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
82 esac
927afe014a7d Fix various problems in 'obstack-printf' module.
Bruno Haible <bruno@clisp.org>
parents: 10205
diff changeset
83 fi
10205
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
84 if test $gl_cv_func_obstack_printf_posix = no; then
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
85 gl_PREREQ_VASNPRINTF_LONG_DOUBLE
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
86 gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
87 gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
88 gl_PREREQ_VASNPRINTF_DIRECTIVE_A
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
89 gl_PREREQ_VASNPRINTF_DIRECTIVE_F
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
90 gl_PREREQ_VASNPRINTF_FLAG_GROUPING
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
91 gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
92 gl_PREREQ_VASNPRINTF_FLAG_ZERO
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
93 gl_PREREQ_VASNPRINTF_PRECISION
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
94 gl_PREREQ_VASNPRINTF_ENOMEM
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
95 gl_REPLACE_VASNPRINTF
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
96 gl_REPLACE_OBSTACK_PRINTF
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
97 fi
3384541effec Add obstack-printf and obstack-printf-posix modules.
Eric Blake <ebb9@byu.net>
parents:
diff changeset
98 ])