1 ?RCS: Copyright (c) 2006-2007, H.Merijn Brand
3 ?RCS: You may redistribute only under the terms of the Artistic License,
4 ?RCS: as specified in the README file that comes with the distribution.
5 ?RCS: You may reuse parts of this distribution only within the terms of
6 ?RCS: that same Artistic License; a copy of which may be found at the root
7 ?RCS: of the source tree for dist 3.0.
9 ?MAKE:d_c99_variadic_macros: Compile Setvar cat rm_try run i_stdarg i_stdlib
10 ?MAKE: -pick add $@ %<
11 ?S:d_c99_variadic_macros:
12 ?S: This variable conditionally defines the HAS_C99_VARIADIC_MACROS
13 ?S: symbol, which indicates to the C program that C99 variadic macros
16 ?C:HAS_C99_VARIADIC_MACROS:
17 ?C: If defined, the compiler supports C99 variadic macros.
19 ?H:#$d_c99_variadic_macros HAS_C99_VARIADIC_MACROS /**/
22 : see if the Compiler supports C99 variadic macros
23 case "$i_stdarg$i_stdlib" in
25 echo "You have <stdarg.h> and <stdlib.h>, so checking for C99 variadic macros." >&4
30 #define foo(buffer, format, ...) sprintf(buffer, format, __VA_ARGS__)
34 foo(buf, "%d %g %.*s", 123, 456.0, (int)3, "789fail");
40 if eval $compile && $run ./try 2>&1 >/dev/null; then
41 case "`$run ./try`" in
43 echo "You have C99 variadic macros." >&4
44 d_c99_variadic_macros="$define"
47 echo "You don't have functional C99 variadic macros." >&4
48 d_c99_variadic_macros="$undef"
52 echo "I couldn't compile and run the test program, so I assume that you don't have functional C99 variadic macros." >&4
53 d_c99_variadic_macros="$undef"
58 echo "You don't have <stdarg.h> and <stdlib.h>, so not checking for C99 variadic macros." >&4
59 d_c99_variadic_macros="$undef"