You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2012/08/09 18:12:11 UTC

svn commit: r1371279 - in /qpid/proton/trunk/proton-c/bindings/php: CMakeLists.txt cproton.ini

Author: rhs
Date: Thu Aug  9 16:12:10 2012
New Revision: 1371279

URL: http://svn.apache.org/viewvc?rev=1371279&view=rev
Log:
install cproton.ini with php bindings

Added:
    qpid/proton/trunk/proton-c/bindings/php/cproton.ini
Modified:
    qpid/proton/trunk/proton-c/bindings/php/CMakeLists.txt

Modified: qpid/proton/trunk/proton-c/bindings/php/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/php/CMakeLists.txt?rev=1371279&r1=1371278&r2=1371279&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/php/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/bindings/php/CMakeLists.txt Thu Aug  9 16:12:10 2012
@@ -42,7 +42,9 @@ execute_process(COMMAND ${PHP_CONFIG_EXE
 execute_process(COMMAND ${PHP_CONFIG_EXE} --prefix
                 OUTPUT_VARIABLE PHP_PFX
                 OUTPUT_STRIP_TRAILING_WHITESPACE)
-
+execute_process(COMMAND ${PHP_CONFIG_EXE} --config-options
+                OUTPUT_VARIABLE PHP_OPTS
+                OUTPUT_STRIP_TRAILING_WHITESPACE)
 
 string(REPLACE ${PHP_PFX} ${CMAKE_INSTALL_PREFIX} PHP_REL_EXT_DIR ${PHP_EXT_DIR})
 
@@ -52,9 +54,21 @@ execute_process(COMMAND ${PHP_EXE} ${GET
                 OUTPUT_STRIP_TRAILING_WHITESPACE)
 string(REPLACE ${PHP_PFX} ${CMAKE_INSTALL_PREFIX} PHP_REL_INCLUDE_DIR ${PHP_INCLUDE_DIR})
 
+string(REGEX MATCH "--with-config-file-scan-dir=([^ ]*)" PHP_OPT_MATCH ${PHP_OPTS})
+set (PHP_INI_SCAN_DIR ${CMAKE_MATCH_1})
+if (NOT ${PHP_REL_EXT_DIR} STREQUAL ${PHP_EXT_DIR})
+  set (PHP_INI_SCAN_DIR "${CMAKE_INSTALL_PREFIX}${PHP_INI_SCAN_DIR}")
+endif ()
+
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton.so
         DESTINATION ${PHP_REL_EXT_DIR}
         COMPONENT PHP)
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cproton.php
         DESTINATION ${PHP_REL_INCLUDE_DIR}
         COMPONENT PHP)
+
+if (NOT ${PHP_INI_SCAN_DIR} STREQUAL "")
+  install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/cproton.ini
+          DESTINATION ${PHP_INI_SCAN_DIR}
+          COMPONENT PHP)
+endif ()

Added: qpid/proton/trunk/proton-c/bindings/php/cproton.ini
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/php/cproton.ini?rev=1371279&view=auto
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/php/cproton.ini (added)
+++ qpid/proton/trunk/proton-c/bindings/php/cproton.ini Thu Aug  9 16:12:10 2012
@@ -0,0 +1,2 @@
+; Enable cproton extension module
+extension=cproton.so



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org