diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-03-26 21:17:19 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-03-26 21:17:19 (GMT) |
commit | 405c805f249cacb07f8861d5550abda8f6694d0c (patch) | |
tree | 669743f4b895c063296f0c6799fe698202d34893 /contrib | |
parent | 79b8a7941354416f83aae9cb53fbdf7e680beae2 (diff) | |
download | uscxml-405c805f249cacb07f8861d5550abda8f6694d0c.zip uscxml-405c805f249cacb07f8861d5550abda8f6694d0c.tar.gz uscxml-405c805f249cacb07f8861d5550abda8f6694d0c.tar.bz2 |
Various smaller bug-fixes (see details)
- Pass -DPHP_CONFIG=/usr/bin/zts-php-config for custom php-config
- More php bug fixes
- Fixed nasty "parse from string" bug
- Reindented source code
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/cmake/FindPHP5.cmake | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/contrib/cmake/FindPHP5.cmake b/contrib/cmake/FindPHP5.cmake index 620c1c7..6ad81a5 100644 --- a/contrib/cmake/FindPHP5.cmake +++ b/contrib/cmake/FindPHP5.cmake @@ -1,11 +1,13 @@ if (UNIX) - find_program(PHP_CONFIG - NAMES php-config - PATHS - /usr/bin - /usr/local/bin - /opt/local/bin - ) + if (NOT PHP_CONFIG) + find_program(PHP_CONFIG + NAMES php-config + PATHS + /usr/bin + /usr/local/bin + /opt/local/bin + ) + endif() if (PHP_CONFIG) execute_process(COMMAND ${PHP_CONFIG} --includes OUTPUT_VARIABLE PHP_INCLUDE_DIRS @@ -26,7 +28,15 @@ if (UNIX) OUTPUT_VARIABLE PHP_LDFLAGS ERROR_VARIABLE PHP_LDFLAGS_errors RESULT_VARIABLE PHP_LDFLAGS_result) - + + set(PHP_ZTS_ENABLED OFF) + execute_process(COMMAND ${PHP_CONFIG} --configure-options + OUTPUT_VARIABLE PHP_CONFIGURE_OPTIONS + ERROR_VARIABLE PHP_CONFIGURE_OPTIONS_errors + RESULT_VARIABLE PHP_CONFIGURE_OPTIONS_result) + if (PHP_CONFIGURE_OPTIONS MATCHES ".*enable-maintainer-zts.*") + set(PHP_ZTS_ENABLED ON) + endif() endif() else() message(STATUS "Finding PHP5 on Windows is not supported") @@ -34,4 +44,4 @@ endif() INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(PHP5 DEFAULT_MSG PHP_CONFIG PHP_INCLUDE_DIRS PHP_LIBRARIES PHP_LDFLAGS) -MARK_AS_ADVANCED(PHP_LIBRARIES PHP_INCLUDE_DIRS PHP_LDFLAGS) +MARK_AS_ADVANCED(PHP_LIBRARIES PHP_INCLUDE_DIRS PHP_LDFLAGS PHP_ZTS_ENABLED) |