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