Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 430858
Collapse All | Expand All

(-)file_not_specified_in_diff (-2 / +14 lines)
Line  Link Here
0
-- a/src/php/CMakeLists.txt
0
++ b/src/php/CMakeLists.txt
Lines 21-27 Link Here
21
endif()
21
endif()
22
22
23
# Try to find PHP5
23
# Try to find PHP5
24
find_path(PHP_INCLUDE_DIR NAMES main/php.h PATH_SUFFIXES php php5)
25
find_program(PHP_EXECUTABLE NAMES php)
24
find_program(PHP_EXECUTABLE NAMES php)
26
25
27
# Libkolabxml needs PHP >= 5.3
26
# Libkolabxml needs PHP >= 5.3
Lines 41-46 Link Here
41
  endif()
40
  endif()
42
endif()
41
endif()
43
42
43
if(NOT DEFINED PHP_INCLUDE_DIR)
44
  find_program(PHP_CONFIG_EXECUTABLE NAMES php-config)
45
  if(PHP_CONFIG_EXECUTABLE)
46
    execute_process(COMMAND ${PHP_CONFIG_EXECUTABLE} --include-dir
47
                   OUTPUT_VARIABLE _php_include_dir
48
    )
49
    string(REGEX REPLACE "\n" "" _php_include_dir "${_php_include_dir}")
50
    set(PHP_INCLUDE_DIR ${_php_include_dir} CACHE STRING "PHP header directory.")
51
  else()
52
    find_path(PHP_INCLUDE_DIR NAMES main/php.h PATH_SUFFIXES php php5)
53
  endif()
54
endif()
55
44
if(PHP_INCLUDE_DIR AND PHP_EXECUTABLE)
56
if(PHP_INCLUDE_DIR AND PHP_EXECUTABLE)
45
  file(READ ${PHP_INCLUDE_DIR}/main/php_version.h PHP_VERSION_CONTENT)
57
  file(READ ${PHP_INCLUDE_DIR}/main/php_version.h PHP_VERSION_CONTENT)
46
  string(REGEX MATCH "#define PHP_VERSION_ID[ ]*[0-9]*\n" _PHP_VERSION_ID_MATCH ${PHP_VERSION_CONTENT})
58
  string(REGEX MATCH "#define PHP_VERSION_ID[ ]*[0-9]*\n" _PHP_VERSION_ID_MATCH ${PHP_VERSION_CONTENT})

Return to bug 430858