summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@sudo.ws>2022-11-11 09:09:31 -0700
committerTodd C. Miller <Todd.Miller@sudo.ws>2022-11-11 09:09:31 -0700
commit7c1e608dd5cefc2dbb5a22d7bf5cc11f8f143fb5 (patch)
tree72bd125911cc57b30ce0ef330091b5cbf268ebef /configure.ac
parent54b7fc1cc901e10a8119bdca6e317fcd05cc0314 (diff)
downloadsudo-7c1e608dd5cefc2dbb5a22d7bf5cc11f8f143fb5.tar.gz
Skip check for cpp variadic macro support if the compiler supports C99.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 10 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 70b6761e0..978d4839d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2404,20 +2404,20 @@ dnl
AC_C_CONST
AC_C_INLINE
AC_C_VOLATILE
-AC_MSG_CHECKING([for variadic macro support in cpp])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
-AC_INCLUDES_DEFAULT
+if test X"$ac_cv_prog_cc_c99" = X"no"; then
+ AC_MSG_CHECKING([for variadic macro support in cpp])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
#if defined(__GNUC__) && __GNUC__ == 2
# define sudo_fprintf(fp, fmt...) fprintf((fp), (fmt))
#else
# define sudo_fprintf(fp, ...) fprintf((fp), __VA_ARGS__)
-#endif
-], [sudo_fprintf(stderr, "a %s", "test");])], [AC_MSG_RESULT([yes])],
-[AC_MSG_RESULT([no])
- AC_DEFINE([NO_VARIADIC_MACROS], [1], [Define if your C preprocessor does not support variadic macros.])
- AC_MSG_WARN([your C preprocessor doesn't support variadic macros, debugging support will be limited])
- SUDO_APPEND_COMPAT_EXP(sudo_debug_printf_nvm_v1)
-])
+#endif], [sudo_fprintf(stderr, "a %s", "test");])], [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ AC_DEFINE([NO_VARIADIC_MACROS], [1], [Define if your C preprocessor does not support variadic macros.])
+ AC_MSG_WARN([your C preprocessor doesn't support variadic macros, debugging support will be limited])
+ SUDO_APPEND_COMPAT_EXP(sudo_debug_printf_nvm_v1)
+ ])
+fi
dnl
dnl Program checks