1*4882a593SmuzhiyunFrom 8996503f6c55e55f326ab11c18278954ad7abaf3 Mon Sep 17 00:00:00 2001 2*4882a593SmuzhiyunFrom: "Yann E. MORIN" <yann.morin.1998@free.fr> 3*4882a593SmuzhiyunDate: Tue, 27 Dec 2016 11:21:57 +0100 4*4882a593SmuzhiyunSubject: [PATCH] configure: fix detection of libcrypt 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunThe crypt() function is searched in two locations: -lcrypt and the 7*4882a593Smuzhiyunstandard C library. 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunThe result of the former is stored in the LIBCRYPT 'scheme' while that 10*4882a593Smuzhiyunof the latter is stored in the 'SYSCRYPT' scheme. 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunHowever, the check for mandatory modules looks at the CRYPT 'scheme', 13*4882a593Smuzhiyunand thus concludes that crypt is missing when it was successfully found. 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunFix that by also storing the result of either check in the 'CRYPT' 16*4882a593Smuzhiyunscheme. 17*4882a593Smuzhiyun 18*4882a593SmuzhiyunSigned-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> 19*4882a593Smuzhiyun--- 20*4882a593Smuzhiyun configure | 2 ++ 21*4882a593Smuzhiyun configure.ac | 2 ++ 22*4882a593Smuzhiyun 2 files changed, 4 insertions(+) 23*4882a593Smuzhiyun 24*4882a593Smuzhiyundiff --git a/configure.ac b/configure.ac 25*4882a593Smuzhiyunindex 121dd93..d459ff5 100644 26*4882a593Smuzhiyun--- a/configure.ac 27*4882a593Smuzhiyun+++ b/configure.ac 28*4882a593Smuzhiyun@@ -2406,10 +2406,12 @@ AC_CHECK_FUNC([crypt], [SYSCRYPT=true], [SYSCRYPT=""]) 29*4882a593Smuzhiyun if test "x$LIBCRYPT_LIB" != "x" ; then 30*4882a593Smuzhiyun CRYPT_LIB="$LIBCRYPT_LIB" 31*4882a593Smuzhiyun CRYPT_INCLUDE="$LIBCRYPT_INCLUDE" 32*4882a593Smuzhiyun+ PBX_CRYPT=1 33*4882a593Smuzhiyun AC_DEFINE([HAVE_CRYPT], [1], [Define to 1 if you have the 'crypt' function.]) 34*4882a593Smuzhiyun elif test "x$SYSCRYPT" != "x" ; then 35*4882a593Smuzhiyun CRYPT_LIB="" 36*4882a593Smuzhiyun CRYPT_INCLUDE="" 37*4882a593Smuzhiyun+ PBX_CRYPT=1 38*4882a593Smuzhiyun AC_DEFINE([HAVE_CRYPT], [1], [Define to 1 if you have the 'crypt' function.]) 39*4882a593Smuzhiyun fi 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun-- 42*4882a593Smuzhiyun2.7.4 43*4882a593Smuzhiyun 44