11#[=============================================================================[
2- # CheckCrypt
3-
4- Check whether the `crypt` library works as expected for PHP by running a set of
2+ Check whether the 'crypt' library works as expected for PHP by running a set of
53PHP-specific checks.
64
7- ## Cache variables
8-
9- * `HAVE_CRYPT_H`
10- * `HAVE_CRYPT`
11- * `HAVE_CRYPT_R`
12- * `CRYPT_R_CRYPTD`
13- * `CRYPT_R_STRUCT_CRYPT_DATA`
14- * `CRYPT_R_GNU_SOURCE`
15-
16- ## Usage
5+ Cache variables:
176
18- ```cmake
19- # CMakeLists.txt
20- include(cmake/CheckCrypt.cmake)
21- ```
7+ * HAVE_CRYPT_H
8+ * HAVE_CRYPT
9+ * HAVE_CRYPT_R
10+ * CRYPT_R_CRYPTD
11+ * CRYPT_R_STRUCT_CRYPT_DATA
12+ * CRYPT_R_GNU_SOURCE
2213#]=============================================================================]
2314
2415include_guard (GLOBAL )
@@ -30,7 +21,7 @@ include(CheckSymbolExists)
3021include (CMakePushCheckState)
3122
3223# Check whether crypt() and crypt_r() are available.
33- function (_php_check_crypt )
24+ function (_php_ext_standard_check_crypt )
3425 message (CHECK_START "Checking basic crypt functionality" )
3526
3627 cmake_push_check_state(RESET)
@@ -67,7 +58,7 @@ function(_php_check_crypt)
6758endfunction ()
6859
6960# Detect the style of crypt_r() if any is available.
70- function (_php_check_crypt_r result)
61+ function (_php_ext_standard_check_crypt_r result)
7162 set (${result} TRUE PARENT_SCOPE)
7263
7364 message (CHECK_START "Checking crypt_r() data struct" )
@@ -178,7 +169,7 @@ function(_php_check_crypt_r result)
178169endfunction ()
179170
180171# Check if crypt library is usable.
181- function (_php_check_crypt_is_usable )
172+ function (_php_ext_standard_check_crypt_is_usable )
182173 cmake_push_check_state(RESET)
183174 set (CMAKE_REQUIRED_QUIET TRUE )
184175
@@ -406,9 +397,9 @@ function(_php_check_crypt_is_usable)
406397endfunction ()
407398
408399block()
409- _php_check_crypt ()
400+ _php_ext_standard_check_crypt ()
410401
411- _php_check_crypt_r (result)
402+ _php_ext_standard_check_crypt_r (result)
412403 if (NOT result)
413404 message (
414405 FATAL_ERROR
@@ -417,5 +408,5 @@ block()
417408 )
418409 endif ()
419410
420- _php_check_crypt_is_usable ()
411+ _php_ext_standard_check_crypt_is_usable ()
421412endblock()
0 commit comments