Skip to content

Commit

Permalink
libcrypto breaks Mac (missing openssl/md5.h), so add option --enable-…
Browse files Browse the repository at this point in the history
…libcrypto
  • Loading branch information
dbry committed Dec 17, 2019
1 parent ed6ce7a commit e158df5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/md5.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* See md5.c for more information.
*/

#if defined HAVE_LIBCRYPTO && !defined __APPLE__
#ifdef HAVE_LIBCRYPTO
#include <openssl/md5.h>
#elif !defined(_MD5_H)
#define _MD5_H
Expand Down
6 changes: 5 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ AC_FUNC_FSEEKO
# Check if cross-compiling on mingw
AC_MINGW32

AC_ARG_ENABLE([libcrypto],
AS_HELP_STRING([--enable-libcrypto], [use libcrypto MD5 if available (breaks Mac build)]))

AC_ARG_ENABLE([apps],
AS_HELP_STRING([--disable-apps], [build only libwavpack (removes ICONV dependency)]))

Expand Down Expand Up @@ -112,7 +115,8 @@ fi
AC_SUBST(ICONV_LIBS)
AC_SUBST(ICONV)
fi
AC_CHECK_LIB([crypto],[MD5_Init])
AS_IF([test "x$enable_libcrypto" = "xyes"],
[AC_CHECK_LIB([crypto],[MD5_Init])])
fi

AC_MSG_CHECKING([if we are building for a Windows host])
Expand Down

0 comments on commit e158df5

Please sign in to comment.