]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Remove AC_PROC_CC_C99 obsoleted in autoconf 2.70.
authorDarren Tucker <dtucker@dtucker.net>
Fri, 6 Nov 2020 05:53:24 +0000 (16:53 +1100)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 6 Nov 2020 05:53:24 +0000 (16:53 +1100)
Since we only use it to make sure we can handle variadic macros,
explicitly check only for that.  with & ok djm@

configure.ac

index d1dc651e3fc233b728692d98750f20086cec102f..07b080fdbd4fb563470fec9ed75853de40da7288 100644 (file)
@@ -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