-
-
Notifications
You must be signed in to change notification settings - Fork 574
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update 'build-php.sh' script to build without extensions (#221).
Add new 'build-php-with-ext.sh' script that builds PHP with mysqli and pgsql extensions support. Note that pgsql extension has a dependency 'libpq5' that has to be installed on end user machine. Shipping both 'php-cgi' and 'php-cgi-mysqli-pgsql' PHP binaries with PHP Desktop releases.
- Loading branch information
Showing
2 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
# This script builds with PHP extensions enabled: mysqli and pgsql. | ||
# To build with postgresql support you need to install dependency: | ||
# >> sudo apt-get install libpq-dev | ||
# And later when distributing app you have to make sure that 'libpq5' | ||
# package is installed on end user machine. | ||
|
||
# READ ME: | ||
# - Tested on Ubuntu 14.04 64-bit. | ||
# - Before running script download sources from http://php.net/downloads.php | ||
# and extract them to "build/php*/" directory (create build/ directory). | ||
|
||
# Exit immediately if a command exits with a non-zero status. | ||
set -e | ||
|
||
# Print all executed commands to terminal. | ||
# set -x | ||
|
||
root_dir=$(dirname $0) | ||
cd ${root_dir}/build/php*/ | ||
php_dir=$(pwd) | ||
echo "Found PHP: ${php_dir}" | ||
echo "Configure PHP..." | ||
./configure \ | ||
--prefix=${php_dir}/dist-install \ | ||
--exec-prefix=${php_dir}/dist-install-exec-prefix \ | ||
--with-mysqli \ | ||
--with-pgsql=/usr/include/postgresql | ||
echo "Build PHP..." | ||
make | ||
echo "Copy php-cgi to build/bin/" | ||
cp sapi/cgi/php-cgi ../bin/ | ||
echo "OK completed." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters