diff options
author | Peter Kokot <peterkokot@gmail.com> | 2019-07-02 01:00:14 +0200 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2019-07-05 23:26:20 +0200 |
commit | 1c9e8e8f6a7d0180d312aa76ae87435619935780 (patch) | |
tree | 40abd90739be7167838a74877b1603d66f0cd6b6 /configure.ac | |
parent | 30441e65dddb13c9c7a63019738f0a767a18a3d4 (diff) | |
download | php-git-1c9e8e8f6a7d0180d312aa76ae87435619935780.tar.gz |
Remove PTHREADS_ASSIGN_VARS
This simplifies TSRM build steps a bit and avoids doing unnecessary
steps:
- The `PTHREADS_CHECK_COMPILE` can called inside the for loops only
since this is only where the `$pthreads_checked` variable is used.
- Assigning variables can be then done only in the configure.ac
once.
- use `m4_include()` instead of the `sinclude()` in the middle of
the build steps.
- The `$threads_result` variable is not used in the code or in
extensions.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 35fadf7ee4..037e87511a 100644 --- a/configure.ac +++ b/configure.ac @@ -10,6 +10,8 @@ m4_include([build/libtool.m4]) m4_include([build/php_cxx_compile_stdcxx.m4]) m4_include([build/php.m4]) m4_include([build/pkg.m4]) +m4_include([TSRM/threads.m4]) +m4_include([TSRM/tsrm.m4]) dnl Basic autoconf initialization, generation of config.nice. dnl ---------------------------------------------------------------------------- @@ -309,12 +311,10 @@ case $host_alias in ;; esac -dnl Include Zend and TSRM configurations. +dnl Include Zend configurations. dnl ---------------------------------------------------------------------------- sinclude(Zend/Zend.m4) -sinclude(TSRM/threads.m4) -sinclude(TSRM/tsrm.m4) dnl ---------------------------------------------------------------------------- @@ -355,7 +355,14 @@ fi dnl Force ZTS. if test "$enable_maintainer_zts" = "yes"; then - PTHREADS_ASSIGN_VARS + dnl Add pthreads linker and compiler flags. + if test -n "$ac_cv_pthreads_lib"; then + LIBS="$LIBS -l$ac_cv_pthreads_lib" + fi + if test -n "$ac_cv_pthreads_cflags"; then + CFLAGS="$CFLAGS $ac_cv_pthreads_cflags" + fi + PTHREADS_FLAGS fi |