From: Sarah Hoffmann Date: Thu, 23 Aug 2018 18:41:44 +0000 (+0200) Subject: Merge branch 'customPHP1' of https://github.com/ThomasBarris/Nominatim into ThomasBar... X-Git-Tag: v3.2.0~9 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/57bf76a0e1d766bc90afcb8a748c5e25e7aa6f08?hp=c80c80200c0c2e78811d0b96e225406471e0ad48 Merge branch 'customPHP1' of https://github.com/ThomasBarris/Nominatim into ThomasBarris-customPHP1 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 2096c43d..afd81594 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,6 +77,16 @@ find_package(BZip2 REQUIRED) find_package(LibXml2 REQUIRED) include_directories(${LIBXML2_INCLUDE_DIR}) +# Setting PHP binary variable as to command line (prevailing) or auto detect +if (NOT PHP_BIN) + find_program (PHP_BIN php) +endif() +# sanity check if PHP binary exists +if (NOT EXISTS ${PHP_BIN}) + message(FATAL_ERROR "PHP binary not found install php or provide location by -DPHP_BIN=/path/php ") +endif() +message (STATUS "Setting PHP_BIN= " ${PHP_BIN}) + #----------------------------------------------------------------------------- # # Setup settings and paths diff --git a/utils/blocks.php b/utils/blocks.php index 602df0bc..761ab9e4 100755 --- a/utils/blocks.php +++ b/utils/blocks.php @@ -1,4 +1,4 @@ -#!/usr/bin/php -Cq +#!@PHP_BIN@ -Cq getCol($sSQL); /* $aArticleNames = $oDB->getCol($sSQL = 'select page_title from content where page_namespace = 0 and (page_content ilike \'%{{Coord%\' or (page_content ilike \'%lat%\' diff --git a/utils/imports.php b/utils/imports.php index 07bc9c45..9d1085f0 100755 --- a/utils/imports.php +++ b/utils/imports.php @@ -1,4 +1,4 @@ -#!/usr/bin/php -Cq +#!@PHP_BIN@ -Cq