@@ -398,69 +398,93 @@ install(
398
398
# Configuration checks.
399
399
################################################################################
400
400
401
- check_include_files(cpuid.h HAVE_CPUID_H )
402
- check_include_files(libproc.h HAVE_LIBPROC_H )
401
+ check_include_files(cpuid.h PHP_ZEND_HAVE_CPUID_H )
402
+ set (HAVE_CPUID_H ${PHP_ZEND_HAVE_CPUID_H} )
403
403
404
- check_symbol_exists(getpid unistd.h HAVE_GETPID)
404
+ check_include_files(libproc.h PHP_ZEND_HAVE_LIBPROC_H)
405
+ set (HAVE_LIBPROC_H ${PHP_ZEND_HAVE_LIBPROC_H} )
406
+
407
+ check_symbol_exists(getpid unistd.h PHP_ZEND_HAVE_GETPID)
408
+ set (HAVE_GETPID ${PHP_ZEND_HAVE_GETPID} )
405
409
406
410
cmake_push_check_state(RESET)
407
411
set (CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
408
- check_symbol_exists(gettid unistd.h HAVE_GETTID)
412
+ check_symbol_exists(gettid unistd.h PHP_ZEND_HAVE_GETTID)
413
+ set (HAVE_GETTID ${PHP_ZEND_HAVE_GETTID} )
409
414
cmake_pop_check_state()
410
415
411
- check_symbol_exists(kill signal.h HAVE_KILL)
416
+ check_symbol_exists(kill signal.h PHP_ZEND_HAVE_KILL)
417
+ set (HAVE_KILL ${PHP_ZEND_HAVE_KILL} )
418
+
412
419
check_symbol_exists(mempcpy string .h HAVE_MEMPCPY)
420
+ set (HAVE_MEMPCPY ${PHP_ZEND_HAVE_MEMPCPY} )
413
421
414
422
cmake_push_check_state(RESET)
415
423
set (CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
416
- check_symbol_exists(mremap sys/mman.h HAVE_MREMAP)
424
+ check_symbol_exists(mremap sys/mman.h PHP_ZEND_HAVE_MREMAP)
425
+ set (HAVE_MREMAP ${PHP_ZEND_HAVE_MREMAP} )
417
426
cmake_pop_check_state()
418
427
419
428
block()
420
429
set (headers pthread.h)
421
430
422
431
# BSD-based systems have pthread_attr_get_np in pthread_np.h.
423
- check_include_files(pthread_np.h PHP_HAS_PTHREAD_NP_H )
424
- if (PHP_HAS_PTHREAD_NP_H )
432
+ check_include_files(pthread_np.h PHP_ZEND_HAVE_PTHREAD_NP_H )
433
+ if (PHP_ZEND_HAVE_PTHREAD_NP_H )
425
434
list (APPEND headers "pthread_np.h" )
426
435
endif ()
427
436
428
437
check_symbol_exists(
429
438
pthread_attr_get_np
430
439
"${headers} "
431
- HAVE_PTHREAD_ATTR_GET_NP
440
+ PHP_ZEND_HAVE_PTHREAD_ATTR_GET_NP
432
441
)
442
+ set (HAVE_PTHREAD_ATTR_GET_NP ${PHP_ZEND_HAVE_PTHREAD_ATTR_GET_NP} )
433
443
endblock()
434
444
435
445
check_symbol_exists(
436
446
pthread_attr_getstack
437
447
pthread.h
438
- HAVE_PTHREAD_ATTR_GETSTACK
448
+ PHP_ZEND_HAVE_PTHREAD_ATTR_GETSTACK
439
449
)
450
+ set (HAVE_PTHREAD_ATTR_GETSTACK ${PHP_ZEND_HAVE_PTHREAD_ATTR_GETSTACK} )
440
451
441
452
check_symbol_exists(
442
453
pthread_get_stackaddr_np
443
454
pthread.h
444
- HAVE_PTHREAD_GET_STACKADDR_NP
455
+ PHP_ZEND_HAVE_PTHREAD_GET_STACKADDR_NP
445
456
)
457
+ set (HAVE_PTHREAD_GET_STACKADDR_NP ${PHP_ZEND_HAVE_PTHREAD_GET_STACKADDR_NP} )
446
458
447
459
cmake_push_check_state(RESET)
448
460
set (CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
449
- check_symbol_exists(pthread_getattr_np pthread.h HAVE_PTHREAD_GETATTR_NP)
461
+ check_symbol_exists(
462
+ pthread_getattr_np
463
+ pthread.h
464
+ PHP_ZEND_HAVE_PTHREAD_GETATTR_NP
465
+ )
466
+ set (HAVE_PTHREAD_GETATTR_NP ${PHP_ZEND_HAVE_PTHREAD_GETATTR_NP} )
450
467
cmake_pop_check_state()
451
468
452
- check_symbol_exists(pthread_stackseg_np pthread.h HAVE_PTHREAD_STACKSEG_NP)
453
- check_symbol_exists(strnlen string .h HAVE_STRNLEN)
469
+ check_symbol_exists(
470
+ pthread_stackseg_np
471
+ pthread.h
472
+ PHP_ZEND_HAVE_PTHREAD_STACKSEG_NP
473
+ )
474
+ set (HAVE_PTHREAD_STACKSEG_NP ${PHP_ZEND_HAVE_PTHREAD_STACKSEG_NP} )
475
+
476
+ check_symbol_exists(strnlen string .h PHP_ZEND_HAVE_STRNLEN)
477
+ set (HAVE_STRNLEN ${PHP_ZEND_HAVE_STRNLEN} )
454
478
455
479
# Check for sigsetjmp(). It can be a function or defined as a macro. Note, that
456
480
# POSIX.1-2001-compliant systems should have it. On Windows the setjmp() is
457
481
# used instead.
458
482
if (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows" )
459
- check_symbol_exists(sigsetjmp setjmp.h PHP_HAS_SIGSETJMP )
460
- if (NOT PHP_HAS_SIGSETJMP )
461
- check_symbol_exists(setjmp setjmp.h PHP_HAS_SETJMP )
483
+ check_symbol_exists(sigsetjmp setjmp.h PHP_ZEND_HAVE_SIGSETJMP )
484
+ if (NOT PHP_ZEND_HAVE_SIGSETJMP )
485
+ check_symbol_exists(setjmp setjmp.h PHP_ZEND_HAVE_SETJMP )
462
486
endif ()
463
- if (NOT PHP_HAS_SIGSETJMP AND NOT PHP_HAS_SETJMP )
487
+ if (NOT PHP_ZEND_HAVE_SIGSETJMP AND NOT PHP_ZEND_HAVE_SETJMP )
464
488
message (
465
489
FATAL_ERROR
466
490
"Required function sigsetjmp()/setjmp() not found in <setjmp.h>. Please "
@@ -475,7 +499,7 @@ php_search_libraries(
475
499
Pgrab
476
500
HEADERS libproc.h
477
501
LIBRARIES proc
478
- VARIABLE PHP_ZEND_HAS_PGRAB
502
+ VARIABLE PHP_ZEND_HAVE_PGRAB
479
503
TARGET zend PRIVATE
480
504
)
481
505
0 commit comments