2 # This module finds if PHP4 is installed and determines where the include files
3 # and libraries are. It also determines what the name of the library is. This
4 # code sets the following variables:
6 # PHP4_INCLUDE_PATH = path to where php.h can be found
7 # PHP4_EXECUTABLE = full path to the php4 binary
10 SET(PHP4_POSSIBLE_INCLUDE_PATHS
12 /usr/local/include/php4
14 /usr/local/include/php
18 SET(PHP4_POSSIBLE_LIB_PATHS
22 FIND_PATH(PHP4_FOUND_INCLUDE_PATH main/php.h
23 ${PHP4_POSSIBLE_INCLUDE_PATHS})
25 IF(PHP4_FOUND_INCLUDE_PATH)
26 SET(php4_paths "${PHP4_POSSIBLE_INCLUDE_PATHS}")
27 FOREACH(php4_path Zend main TSRM)
28 SET(php4_paths ${php4_paths} "${PHP4_FOUND_INCLUDE_PATH}/${php4_path}")
29 ENDFOREACH(php4_path Zend main TSRM)
30 SET(PHP4_INCLUDE_PATH "${php4_paths}" INTERNAL "PHP4 include paths")
31 ENDIF(PHP4_FOUND_INCLUDE_PATH)
33 FIND_PROGRAM(PHP4_EXECUTABLE NAMES php4 php )
37 PHP4_FOUND_INCLUDE_PATH
41 # this is a hack for now
42 SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
43 "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -Wl,-flat_namespace")
49 __zend_get_parameters_array_ex
59 _zend_register_internal_class_ex
60 _zend_register_list_destructors_ex
61 _zend_register_resource
62 _zend_rsrc_list_get_rsrc_type
63 _zend_wrong_param_count
66 SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS
67 "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS},-U,${symbol}")