Source

woocode / sa-auto / src / php5.sh

#!/bin/sh

. ./set_app_env.sh;

LD_LIBRARY_PATH=$APP_LIB/openssl/lib/
export LD_LIBRARY_PATH

L_CFLAGS="-I $APP_LIB/zlib/include -I $APP_LIB/libxml/include  -I$APP_LIB/libiconv/include";
L_LDFLAGS="-L$APP_LIB/zlib/lib -lz  -L$APP_LIB/libxml/lib -lxml2  -L$APP_LIB/libiconv/lib -liconv -L$APP_LIB/openssl/lib";

#-Wl,-R $APP_LIB/openssl/lib 

CFLAGS=" $G_CFLAGS $L_CFLAGS";export CFLAGS;
LDFLAGS=" $G_LDFLAGS $L_LDFLAGS";export LDFLAGS;
CPPFLAGS=" $G_CPPFLAGS $L_CPPFLAGS";export CPPFLAGS;




rm -rf $PHP5
rm -rf $APP_LIB/php5

tar zxvf $PHP5.tar.gz

cd $PHP5

./configure --prefix=$APP_LIB/$PHP5                \
             --enable-mbstring                     \
             --with-pdo-mysql=$APP_SVR/mysql5      \
             --with-mysqli=$APP_SVR/mysql5/bin/mysql_config \
             --with-zlib-dir=$APP_LIB/zlib         \
             --disable-debug                       \
             --without-pear                        \
             --enable-sockets                      \
             --enable-inline-optimization          \
             --disable-rpath                       \
             --with-mysql=$APP_SVR/mysql5          \
             --with-libxml-dir=$APP_LIB/libxml     \
             --with-jpeg-dir=$APP_LIB/jpeg         \
             --with-iconv-dir=$APP_LIB/libiconv    \
             --with-freetype-dir=$APP_LIB/freetype \
             --with-gd=$APP_LIB/gd                 \
             --with-apxs2=$APP_SVR/apache22/bin/apxs \
             --with-openssl-dir=$APP_LIB/openssl     \
             --with-curl=$APP_LIB/curl             \
             --with-png-dir=$APP_LIB/libpng       


make $MAKEOPT &&

make install

ln -s $APP_LIB/$PHP5 $APP_LIB/php5



#             --with-openssl-dir=$APP_LIB/openssl   \
#             --with-openssl=$APP_LIB/openssl       \


#cp php.ini-dist  $APP_LIB/$PHP5/lib/php.ini
#cp ./php.ini-production $APP_LIB/$PHP5/lib/php.ini

#--with-pgsql[=DIR] 




# cp ./php.ini-production /usr/local/apps/php5/lib/php.ini
# -fPIC
# /usr/local/apps/mysql5/scripts/
#php.ini
#cp /usr/local/src/php-5.1.4/php.ini-dist /usr/local/php5/lib/php.ini
#short_open_tag  off
#magic_quotes_gpc off
#extension_dir = /usr/local/apache22/libexec/
#extension=libphpbbslib.so
#setenv LD_LIBRARY_PATH /usr/local/mysql5/lib/mysql
#             --with-zlib                        \
#             --with-zlib-dir[=DIR]            \
#             --with-gd                          \
#             --with-freetype-dir=/usr/lib       \
#--with-pdo-mysql[=DIR]







#L_CFLAGS=`pkg-config openssl --cflags`
#L_LDFLAGS=`pkg-config openssl --libs`
#L_CPPFLAGS=`pkg-config openssl --cflags`
#L_CFLAGS="$L_CFLAGS -I $APP_LIB/zlib/include -I $APP_LIB/libxml/include  -I$APP_LIB/libiconv/include";
#L_LDFLAGS="$L_CPPFLAGS $L_LDFLAGS -L$APP_LIB/zlib/lib -lz  -L$APP_LIB/libxml/lib -lxml2  -L$APP_LIB/libiconv/lib -liconv ";

#L_CFLAGS="-I $APP_LIB/zlib/include -I $APP_LIB/libxml/include  -I$APP_LIB/libiconv/include -I$APP_LIB/openssl/include";
#L_LDFLAGS="$L_LDFLAGS -L$APP_LIB/zlib/lib -lz  -L$APP_LIB/libxml/lib -lxml2  -L$APP_LIB/libiconv/lib -liconv -L$APP_LIB/openssl/lib -lssl -lcrypto -ldl ";