diff options
| -rw-r--r-- | configure.ac | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 0cebe0c..3c12010 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -234,6 +234,36 @@ else | |||
| 234 | AC_SUBST(ssl_lib_LIBS) | 234 | AC_SUBST(ssl_lib_LIBS) |
| 235 | ssl_provider="OpenSSL"; | 235 | ssl_provider="OpenSSL"; |
| 236 | ssl_requires="$pkg_req_openssl" | 236 | ssl_requires="$pkg_req_openssl" |
| 237 | # test if we have LibreSSL | ||
| 238 | CACHED_CFLAGS="$CFLAGS" | ||
| 239 | CFLAGS="$openssl_CFLAGS" | ||
| 240 | ac_cv_is_libressl=no | ||
| 241 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM( | ||
| 242 | [[ | ||
| 243 | #include <openssl/opensslv.h> | ||
| 244 | ]], [ | ||
| 245 | #ifndef LIBRESSL_VERSION_NUMBER | ||
| 246 | #error No LibreSSL | ||
| 247 | #endif | ||
| 248 | ])], | ||
| 249 | [ | ||
| 250 | ac_cv_is_libressl=yes | ||
| 251 | ], | ||
| 252 | ) | ||
| 253 | CFLAGS="$CACHED_CFLAGS" | ||
| 254 | if test "x$ac_cv_is_libressl" = "xyes"; then | ||
| 255 | ssl_provider="LibreSSL" | ||
| 256 | case ${host_os} in | ||
| 257 | darwin*) | ||
| 258 | case ${openssl_LIBS} in | ||
| 259 | *.tbd*) | ||
| 260 | # using system LibreSSL on Darwin | ||
| 261 | ssl_requires="" | ||
| 262 | ;; | ||
| 263 | esac | ||
| 264 | ;; | ||
| 265 | esac | ||
| 266 | fi | ||
| 237 | AC_SUBST(ssl_requires) | 267 | AC_SUBST(ssl_requires) |
| 238 | fi | 268 | fi |
| 239 | else | 269 | else |
