summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2014-10-18 14:01:26 +0200
committerSlávek Banko <slavek.banko@axis.cz>2014-10-18 14:29:18 +0200
commit71fb8e0e115daa047a514df546d13d294f376840 (patch)
tree5e869f077f943737a080468d9d0b1f4744a110a7
parenta679541fd738df5118cdddca997bf9b9531fdfcf (diff)
downloadtdebase-71fb8e0e115daa047a514df546d13d294f376840.tar.gz
tdebase-71fb8e0e115daa047a514df546d13d294f376840.zip
Fix crypt library detection in CMake
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--ConfigureChecks.cmake12
-rw-r--r--kcheckpass/ConfigureChecks.cmake2
-rw-r--r--tdm/ConfigureChecks.cmake10
3 files changed, 12 insertions, 12 deletions
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 )
diff --git a/kcheckpass/ConfigureChecks.cmake b/kcheckpass/ConfigureChecks.cmake
index 120869dac..d6d62f55b 100644
--- a/kcheckpass/ConfigureChecks.cmake
+++ b/kcheckpass/ConfigureChecks.cmake
@@ -9,8 +9,6 @@
#
#################################################
-find_library( CRYPT_LIBRARY crypt )
-
if( WITH_PAM AND (NOT DEFINED KCHECKPASS_PAM_SERVICE) )
set( KCHECKPASS_PAM_SERVICE "kde" CACHE INTERNAL "" )
endif( )
diff --git a/tdm/ConfigureChecks.cmake b/tdm/ConfigureChecks.cmake
index ae7ea8b6c..162a8a6ba 100644
--- a/tdm/ConfigureChecks.cmake
+++ b/tdm/ConfigureChecks.cmake
@@ -27,16 +27,6 @@ check_function_exists( login_getclass HAVE_LOGIN_GETCLASS )
check_function_exists( auth_timeok HAVE_AUTH_TIMEOK )
tde_restore( CMAKE_REQUIRED_LIBRARIES )
-check_function_exists( crypt LIBC_HAVE_CRYPT )
-if( LIBC_HAVE_CRYPT )
- set( HAVE_CRYPT 1 CACHE INTERNAL "" FORCE )
-else( )
- check_library_exists( crypt crypt "" HAVE_CRYPT )
- if( HAVE_CRYPT )
- set( CRYPT_LIBRARY crypt )
- endif( )
-endif( )
-
check_include_file( lastlog.h HAVE_LASTLOG_H )
check_include_file( termio.h HAVE_TERMIO_H )