Followup from #2346
Add libbsd to make/cmake configuration for linking readpassphrase on
Haiku.
Maybe there is a better way to do this for cmake, I'm not that familiar
with it.
Co-authored-by: vco <god@universe.sys>
ENDIF(LIBMD_FOUND)
ENDIF(NOT OPENSSL_FOUND)
+# libbsd for readpassphrase on Haiku
+IF("${CMAKE_SYSTEM_NAME}" MATCHES "Haiku")
+ MESSAGE(STATUS "Adding libbsd for Haiku")
+ SET(CMAKE_REQUIRED_LIBRARIES "bsd")
+ FIND_LIBRARY(LIBBSD_LIBRARY NAMES bsd)
+ LIST(APPEND ADDITIONAL_LIBS ${LIBBSD_LIBRARY})
+ENDIF("${CMAKE_SYSTEM_NAME}" MATCHES "Haiku")
+
#
# How to prove that CRYPTO functions, which have several names on various
# platforms, just see if archive_digest.c can compile and link against
esac
AC_SUBST(PLATFORMCPPFLAGS)
+dnl Linking on Haiku needs libbsd because of readpassphrase
+case "$host_os" in
+ haiku*) LIBS="-lbsd $LIBS" ;;
+esac
+
# Checks for programs.
AC_PROG_CC
AM_PROG_CC_C_O