From 71fb8e0e115daa047a514df546d13d294f376840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 18 Oct 2014 14:01:26 +0200 Subject: Fix crypt library detection in CMake MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- ConfigureChecks.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ConfigureChecks.cmake') diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 21ec42001..6a3c001da 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -54,6 +54,18 @@ if( WITH_PAM AND (BUILD_KCHECKPASS OR BUILD_TDM) ) endif( ) +# crypt +set( CRYPT_LIBRARY crypt ) +check_library_exists( ${CRYPT_LIBRARY} crypt "" HAVE_CRYPT ) +if( NOT HAVE_CRYPT ) + unset( CRYPT_LIBRARY ) + check_function_exists( crypt LIBC_HAVE_CRYPT ) + if( LIBC_HAVE_CRYPT ) + set( HAVE_CRYPT 1 CACHE INTERNAL "" FORCE ) + endif( LIBC_HAVE_CRYPT ) +endif( NOT HAVE_CRYPT ) + + # hal (ksmserver, tdeioslaves) if( WITH_HAL ) pkg_search_module( HAL hal ) -- cgit v1.2.1