#!/bin/sh
#
# Custom configuration for php-cgi with everything needed for an embeded server.

PREFIX=$1
echo $PREFIX

#'--with-mcrypt' \
LDFLAGS='-static ' \
CXXFLAGS='-Wl -O2 -g  -march=i386 -mtune=generic  -fstack-protector-all -fPIC' \
CFLAGS='-O2 -g  -march=i386 -mtune=generic  -fstack-protector-all -fPIC -L/usr/lib -lxml2' \
'./configure' \
'--enable-cgi' \
'--disable-cli' \
'--enable-pdo' \
'--with-pdo-sqlite' \
'--cache-file=config.cache' \
'--prefix='$PREFIX'/usr' \
'--prefix='$PREFIX'/usr' \
'--exec-prefix='$PREFIX'/usr' \
'--bindir='$PREFIX'/usr/bin' \
'--sbindir='$PREFIX'/usr/sbin' \
'--sysconfdir='$PREFIX'/etc' \
'--datadir=/usr/share' \
'--includedir=/usr/include' \
'--libdir='$PREFIX'/usr/lib' \
'--libexecdir='$PREFIX'/usr/lib' \
'--localstatedir=/var/lib' \
'--mandir=/usr/share/man' \
'--enable-shared=no' \
'--enable-static=yes' \
'--with-libdir=lib' \
'--with-config-file-path='$PREFIX'/etc' \
'--enable-inline-optimization' \
'--with-exec-dir='$PREFIX'/usr/bin' \
'--with-pcre-regex=/usr' \
'--with-zlib=/usr' \
'--enable-libxml=/usr' \
'--enable-spl=/usr' \
'--enable-mod_charset' \
'--without-pear' \
'--enable-bcmath' \
'--enable-pcntl' \
'--enable-sockets' \

