[openssh-commits] [openssh] 01/01: Remove AC_PROC_CC_C99 obsoleted in autoconf 2.70.
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Nov 6 16:55:09 AEDT 2020
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 586f9bd2f5980e12f8cf0d3c2a761fa63175da52
Author: Darren Tucker <dtucker at dtucker.net>
Date: Fri Nov 6 16:53:24 2020 +1100
Remove AC_PROC_CC_C99 obsoleted in autoconf 2.70.
Since we only use it to make sure we can handle variadic macros,
explicitly check only for that. with & ok djm@
---
configure.ac | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index d1dc651e..07b080fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,11 +20,16 @@ AC_LANG([C])
AC_CONFIG_HEADERS([config.h])
AC_PROG_CC([cc gcc])
-AC_PROG_CC_C99
+
# XXX relax this after reimplementing logit() etc.
-if test "x$ac_cv_prog_cc_c99" = "xno" ; then
- AC_MSG_ERROR([*** OpenSSH requires a C99 capable compiler ***])
-fi
+AC_MSG_CHECKING([if $CC supports C99-style variadic macros])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+int f(int a, int b, int c) { return a + b + c; }
+#define F(a, ...) f(a, __VA_ARGS__)
+]], [[int main(void) { return F(1, 2, -3); }]])],
+ [ AC_MSG_RESULT([yes]) ],
+ [ AC_MSG_ERROR([*** OpenSSH requires support for C99-style variadic macros]) ]
+)
AC_CANONICAL_HOST
AC_C_BIGENDIAN
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list