diff options
author | 2024-03-17 21:33:39 +0100 | |
---|---|---|
committer | 2024-03-17 21:33:39 +0100 | |
commit | 49f4ceb1ea45a2096e34c9bd42269132c90dbb48 (patch) | |
tree | fc81437694244a384fc282c9a9bd371cd69623ab | |
parent | 7b1faa06a5650dbaeae3c55c4f5d0cc41bce383b (diff) | |
download | libimobiledevice-49f4ceb1ea45a2096e34c9bd42269132c90dbb48.tar.gz libimobiledevice-49f4ceb1ea45a2096e34c9bd42269132c90dbb48.tar.bz2 |
autoconf: Add LibreSSL specific check
-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 AC_SUBST(ssl_lib_LIBS) ssl_provider="OpenSSL"; ssl_requires="$pkg_req_openssl" + # test if we have LibreSSL + CACHED_CFLAGS="$CFLAGS" + CFLAGS="$openssl_CFLAGS" + ac_cv_is_libressl=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( + [[ + #include <openssl/opensslv.h> + ]], [ + #ifndef LIBRESSL_VERSION_NUMBER + #error No LibreSSL + #endif + ])], + [ + ac_cv_is_libressl=yes + ], + ) + CFLAGS="$CACHED_CFLAGS" + if test "x$ac_cv_is_libressl" = "xyes"; then + ssl_provider="LibreSSL" + case ${host_os} in + darwin*) + case ${openssl_LIBS} in + *.tbd*) + # using system LibreSSL on Darwin + ssl_requires="" + ;; + esac + ;; + esac + fi AC_SUBST(ssl_requires) fi else |