From: <jbo...@li...> - 2006-05-17 16:21:59
|
Author: jfr...@jb... Date: 2006-05-17 12:21:54 -0400 (Wed, 17 May 2006) New Revision: 4285 Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh Log: Allow to build openssl on Solaris. Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-05-17 16:14:18 UTC (rev 4284) +++ labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-05-17 16:21:54 UTC (rev 4285) @@ -14,9 +14,13 @@ XML2VER=2.6.24 XML2URL=ftp://xmlsoft.org/libxml2/libxml2-${XML2VER}.tar.gz + PSQLVER=8.1.3 PSQLURL=http://wwwmaster.postgresql.org/redir?ftp%3A%2F%2Fftp2.ch.postgresql.org%2Fpub%2Fpostgresql%2Fsource%2Fv${PSQLVER}%2Fpostgresql-${PSQLVER}.tar.gz +OSSLVER="0.9.8b" +OSSLURL=http://www.openssl.org/source/openssl-${OSSLVER}.tar.gz + # Platfrom directory and cache TOOLS=$HOME/`uname -s`_`uname -p`_tools CACHE=`uname -s`_`uname -p`_cache @@ -24,7 +28,9 @@ # default value for variables. BUILDXML2=false BUILDPSQL=false +BUILDOSSL=false CC=gcc +COMPILER="" # # Fonctions @@ -66,7 +72,7 @@ if [ ${CC} = "cc" ] then # Sun Studio - CC=cc CPPFLAGS="-I/opt/SUNWspro/prod/include/CC/Cstd/rw -I/opt/SUNWspro/prod/include/CC/Cstd" ./configure --prefix=${INSDIR} ${ADDCON} + CC=cc CPPFLAGS="-I/opt/SUNWspro/prod/include/CC/Cstd/rw -I/opt/SUNWspro/prod/include/CC/Cstd -DHUGE_VAL=__builtin_huge_val" ./configure --prefix=${INSDIR} ${ADDCON} else ./configure --prefix=${INSDIR} ${ADDCON} fi @@ -126,6 +132,7 @@ --with-pspell=no \ --with-readline=no \ --with-tidy=no \ + --with-openssl \ " # Make sure the right xml2 is used. # the make install of php (PEAR) uses php and need libxml2. @@ -149,6 +156,8 @@ --with-pdo-pgsql=no \ --with-pspell=no \ --with-tidy=no \ + --with-curl \ + --with-openssl \ " ADDFLAGS="-fPIC" ;; @@ -177,6 +186,8 @@ --with-mysql=no \ --with-mysqli=no \ --with-pdo-mysql=no \ + --with-curl \ + --with-openssl \ " ADDFLAGS="-I $JAVA_HOME/include/linux" ;; @@ -190,16 +201,19 @@ \ --with-xpm-dir=no \ --with-t1lib=no \ + --with-curl \ + --with-openssl \ " ADDFLAGS="-I $JAVA_HOME/include/linux" ;; dev13*) BUILDXML2=true BUILDPSQL=true + BUILDOSSL=true CC=cc export CC + COMPILER=solaris-x86-cc ADDCONF="\ - --enable-all=$EXTTYPE \ --with-libxml-dir=$TOOLS/LIBXML2 \ --with-jpeg-dir \ --with-png-dir \ @@ -210,6 +224,9 @@ --with-t1lib=no \ --with-pgsql=$EXTTYPE,$TOOLS/POSTGRESQL \ --with-pdo-pgsql=$EXTTYPE,$TOOLS/POSTGRESQL \ + --with-openssl=shared,$TOOLS/SSL \ + --with-openssl-dir=$TOOLS/SSL \ + --with-curl=no \ " ;; *) @@ -232,11 +249,37 @@ fi # +# build openssl if required +if ${BUILDOSSL} +then + Extract openssl ${OSSLURL} ${OSSLVER} + # Copied from buildworld.sh + # Do we need --openssldir= + (cd openssl-${OSSLVER} + if [ ${CC} = "cc" ] + then + ./Configure --prefix=${TOOLS}/SSL threads no-zlib no-zlib-dynamic no-gmp no-krb5 no-rc5 no-mdc2 no-idea no-ec shared $COMPILER -I/opt/SUNWspro/prod/include/CC/Cstd/rw -I/opt/SUNWspro/prod/include/CC/Cstd + else + ./Configure --prefix=${TOOLS}/SSL threads no-zlib no-zlib-dynamic no-gmp no-krb5 no-rc5 no-mdc2 no-idea no-ec shared $COMPILER + fi + make clean + make depend + make install + ) +fi + +# # build postgres if required +# postgres needs openssl if ${BUILDPSQL} then Extract postgresql ${PSQLURL} ${PSQLVER} - Build postgresql-${PSQLVER} ${TOOLS}/POSTGRESQL --without-readline + if ${BUILDOSSL} + then + Build postgresql-${PSQLVER} ${TOOLS}/POSTGRESQL "--without-readline LDFLAGS=-L${TOOLS}/SSL/lib" + else + Build postgresql-${PSQLVER} ${TOOLS}/POSTGRESQL --without-readline + fi fi # @@ -270,7 +313,6 @@ --with-bz2 \ --enable-bcmath \ --enable-calendar \ - --with-curl \ --enable-dbase \ --enable-dba \ --enable-exif \ @@ -282,7 +324,6 @@ --with-mysqli \ --with-mysql \ --with-pdo-mysql \ - --with-openssl \ --enable-shmop \ --enable-soap \ --enable-sockets \ |