#! /bin/sh

SED="sed"
prefix="/usr"
datarootdir="/usr/php"
exec_prefix="/usr"
version="5.6.23"
vernum="50623"
include_dir="/usr/include/php"
includes="-I$include_dir -I$include_dir/main -I$include_dir/TSRM -I$include_dir/Zend -I$include_dir/ext -I$include_dir/ext/date/lib"
ldflags=" -L/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo/usr/lib/../lib -L/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo/usr/lib"
libs="-lcrypt  -lc-client  -lz -lcrypt -lrt -lsqlite3 -lmysqlclient -lmcrypt -lltdl -lcrypto -lssl -lcrypto -lcrypt -lpam -lbz2 -lz -lsqlite3 -lm  -lxml2 -lxml2 -lmysqlclient -lz -lm -ldl -lmysqlclient -lz -lm -ldl -lxml2 -lcrypt -lxml2 -lxml2 -lxml2 -lxml2 -lcrypt "
extension_dir='/usr/lib/php5/extensions/no-debug-non-zts-20131226'
man_dir=`eval echo /usr/share/man`
program_prefix=""
program_suffix=""
exe_extension=""
php_cli_binary=NONE
php_cgi_binary=NONE
configure_options=" '--build=x86_64-linux' '--host=arm-poky-linux-gnueabi' '--target=arm-poky-linux-gnueabi' '--prefix=/usr' '--exec_prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--libexecdir=/usr/libexec' '--datadir=/usr/share' '--sysconfdir=/etc' '--sharedstatedir=/com' '--localstatedir=/var' '--libdir=/usr/lib' '--includedir=/usr/include' '--oldincludedir=/usr/include' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--disable-silent-rules' '--disable-dependency-tracking' '--with-libtool-sysroot=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo' '--enable-mbstring' '--enable-wddx' '--enable-fpm' '--enable-zip' '--with-libdir=lib' '--with-gettext=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo/usr/lib/..' '--with-zlib=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo/usr/lib/..' '--with-iconv=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo/usr/lib/..' '--with-mcrypt=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo/usr' '--with-bz2=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo/usr' '--with-config-file-path=/etc/php/apache2-php5' 'ac_cv_c_bigendian_php=no' '--enable-sockets' '--enable-pcntl' '--enable-shared' '--disable-opcache' '--disable-rpath' '--with-pic' '--libdir=/usr/lib/php5' '--disable-static' '--enable-nls' '--with-imap=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo' '--with-imap-ssl=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo' '--with-mysql=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo/usr' '--with-mysqli=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo/usr/bin/crossscripts/mysql_config' '--with-pdo-mysql=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo/usr/bin/crossscripts/mysql_config' '--without-pgsql' '--disable-soap' '--with-sqlite3=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo/usr/lib/..' '--with-pdo-sqlite=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo/usr/lib/..' 'build_alias=x86_64-linux' 'host_alias=arm-poky-linux-gnueabi' 'target_alias=arm-poky-linux-gnueabi' 'CC=arm-poky-linux-gnueabi-gcc '-march=armv7-a' '-mfpu=neon' '-mfloat-abi=hard' '-mcpu=cortex-a8' '--sysroot=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo'' 'CFLAGS= '-O2' '-pipe' '-g' '-feliminate-unused-debug-types' '-fdebug-prefix-map=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/php/5.6.23-r0=/usr/src/debug/php/5.6.23-r0' '-fdebug-prefix-map=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/x86_64-linux=' '-fdebug-prefix-map=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo=' '-D_GNU_SOURCE' '-g' '-DPTYS_ARE_GETPT' '-DPTYS_ARE_SEARCHED' '-I/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo/usr/include/apache2'' 'LDFLAGS=-Wl,-O1 '-Wl,--hash-style=gnu' '-Wl,--as-needed'' 'CPPFLAGS=' 'CPP=arm-poky-linux-gnueabi-gcc '-E' '--sysroot=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo' '-march=armv7-a' '-mfpu=neon' '-mfloat-abi=hard' '-mcpu=cortex-a8'' 'PKG_CONFIG_PATH=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo/usr/lib/pkgconfig:/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo/usr/share/pkgconfig' 'PKG_CONFIG_LIBDIR=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo/usr/lib/pkgconfig' 'CXX=arm-poky-linux-gnueabi-g++ '-march=armv7-a' '-mfpu=neon' '-mfloat-abi=hard' '-mcpu=cortex-a8' '--sysroot=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo'' 'CXXFLAGS= '-O2' '-pipe' '-g' '-feliminate-unused-debug-types' '-fdebug-prefix-map=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/work/cortexa8hf-neon-poky-linux-gnueabi/php/5.6.23-r0=/usr/src/debug/php/5.6.23-r0' '-fdebug-prefix-map=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/x86_64-linux=' '-fdebug-prefix-map=/home/gumstix/Buildbot/yocto-overo-krogoth/build/build/tmp/sysroots/overo=' '-fvisibility-inlines-hidden''"
php_sapis=" cli fpm cgi"

# Set php_cli_binary and php_cgi_binary if available
for sapi in $php_sapis; do
  case $sapi in
  cli)
    php_cli_binary="/usr/bin/${program_prefix}php${program_suffix}${exe_extension}"
    ;;
  cgi)
    php_cgi_binary="/usr/bin/${program_prefix}php-cgi${program_suffix}${exe_extension}"
    ;;
  esac
done

# Determine which (if any) php binary is available
if test "$php_cli_binary" != "NONE"; then
  php_binary="$php_cli_binary"
else
  php_binary="$php_cgi_binary"
fi

# Remove quotes
configure_options=`echo $configure_options | $SED -e "s#'##g"`

case "$1" in
--prefix)
  echo $prefix;;
--includes)
  echo $includes;;
--ldflags)
  echo $ldflags;;
--libs)
  echo $libs;;
--extension-dir)
  echo $extension_dir;;
--include-dir)
  echo $include_dir;;
--php-binary)
  echo $php_binary;;
--php-sapis)
  echo $php_sapis;;
--configure-options)
  echo $configure_options;;
--man-dir)
  echo $man_dir;;
--version)
  echo $version;;
--vernum)
  echo $vernum;;
*)
  cat << EOF
Usage: $0 [OPTION]
Options:
  --prefix            [$prefix]
  --includes          [$includes]
  --ldflags           [$ldflags]
  --libs              [$libs]
  --extension-dir     [$extension_dir]
  --include-dir       [$include_dir]
  --man-dir           [$man_dir]
  --php-binary        [$php_binary]
  --php-sapis         [$php_sapis]
  --configure-options [$configure_options]
  --version           [$version]
  --vernum            [$vernum]
EOF
  exit 1;;
esac

exit 0
