Fix AC_CHECK_DECLS usage in openssl.m4.
authorEtienne Dechamps <etienne@edechamps.fr>
Sun, 7 Jan 2018 14:26:00 +0000 (14:26 +0000)
committerEtienne Dechamps <etienne@edechamps.fr>
Sun, 7 Jan 2018 14:26:00 +0000 (14:26 +0000)
See:

  https://www.gnu.org/software/autoconf/manual/autoconf-2.62/html_node/Generic-Declarations.html

"For each of the symbols (comma-separated list)"

When building with aggressive warning settings the current code results
in the following configure test code being generated:

  #ifndef OpenSSL_add_all_algorithms EVP_aes_256_cfb
  #ifdef __cplusplus
    (void) OpenSSL_add_all_algorithms EVP_aes_256_cfb;
  #else
    (void) OpenSSL_add_all_algorithms EVP_aes_256_cfb;
  #endif
  #endif

Which is obviously wrong and makes the configure check fail.

m4/openssl.m4

index 4afcff2..ca9bbb5 100644 (file)
@@ -49,7 +49,7 @@ AC_DEFUN([tinc_OPENSSL],
     [AC_MSG_ERROR([Missing LibreSSL/OpenSSL functionality, make sure you have installed the latest version.]); break],
   )
 
-  AC_CHECK_DECLS([OpenSSL_add_all_algorithms EVP_aes_256_cfb], ,
+  AC_CHECK_DECLS([OpenSSL_add_all_algorithms, EVP_aes_256_cfb], ,
     [AC_MSG_ERROR([Missing LibreSSL/OpenSSL functionality, make sure you have installed the latest version.]); break],
     [#include <openssl/evp.h>]
   )