#!/usr/bin/perl use strict; our $src_ball = 'xcache-1.3.0.tar.gz'; our $src_url = 'http://xcache.lighttpd.net/pub/Releases/1.3.0'; our $SRCDIR = 'xcache-1.3.0'; our $FIN_MSG = "Please restart Apache for full Xcache support."; our $php_configure = './configure --enable-xcache --enable-xcache-optimizer'; un_pack(); my $loadedChk = php_config_check("xcache"); if ( $loadedChk eq 'true' ) { print color 'blue'; print "[ ",POSIX::strftime("%m/%d/%Y %H:%M:%S ", localtime) ,"] "; print color 'reset'; print "Xcache is already loaded into the PHP configuration.\n"; exit; } else { my $EAccelleratorCheck = php_config_check("eAccelerator"); if ( $EAccelleratorCheck eq 'true' ) { print color 'blue'; print "[ ",POSIX::strftime("%m/%d/%Y %H:%M:%S ", localtime) ,"] "; print color 'reset'; print "EAccelerator found; Xcache and EAccelerator do not work well together. Remove EAccelerator if you want to proceeed.\n"; exit; } else { php_ext_build(); do_install(); php_ext("xcache.so"); $loadedChk = php_config_check("xcache"); if ( $loadedChk eq 'false' ) { print color 'red'; print "[ ",POSIX::strftime("%m/%d/%Y %H:%M:%S ", localtime) ,"] "; print color 'reset'; print "FATAL: Xcache-php is not loaded into PHP configuration.\n"; exit(1); } } }