#! /bin/sh

SED="/bin/sed"
prefix="/usr"
datarootdir="/usr/php"
exec_prefix="/usr"
sysconfdir='/etc/php73'
version="7.3.33"
vernum="70333"
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=""
libs="-lcrypt  -lpcre2-8  -largon2 -lcrypt -lm  -lxml2 -lz -lm -lpcre2-8 -lcrypt -largon2 -lcrypt "
extension_dir='/usr/lib64/php73'
man_dir=`eval echo /usr/share/man`
program_prefix=""
program_suffix=""
exe_extension=""
php_cli_binary=NONE
php_cgi_binary=NONE
configure_options=" '--host=x86_64-pld-linux' '--build=x86_64-pld-linux' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc/php73' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--x-libraries=/usr/lib64' 'EXTRA_LDFLAGS=-Wl,--as-needed -Wl,--no-copy-dt-needed-entries -Wl,-z,relro -Wl,-z,combreloc ' '--disable-cgi' '--disable-cli' '--disable-phpdbg' '--enable-phpdbg' '--cache-file=config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc/php73' '--with-config-file-scan-dir=/etc/php73/conf.d' '--with-system-tzdata' '--with-password-argon2' '--disable-debug' '--enable-inline-optimization' '--enable-bcmath=shared' '--enable-calendar=shared' '--enable-ctype=shared' '--enable-dba=shared' '--enable-dom=shared' '--enable-exif=shared' '--enable-fileinfo=shared' '--enable-ftp=shared' '--enable-intl=shared' '--enable-libxml' '--enable-mbstring=shared,all' '--with-onig=/usr' '--enable-mbregex' '--enable-pcntl=shared' '--enable-pdo=shared' '--enable-json=shared' '--enable-hash=shared' '--enable-xmlwriter=shared' '--with-fpm-user=http' '--with-fpm-group=http' '--with-pdo-dblib=shared' '--with-pdo-firebird=shared,/usr' '--with-mhash=yes' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-pdo-mysql=shared,mysqlnd' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-pgsql=shared' '--with-pdo-sqlite=shared,/usr' '--with-webp-dir=/usr' '--without-libexpat-dir' '--enable-posix=shared' '--enable-shared' '--enable-session=shared' '--enable-shmop=shared' '--enable-simplexml=shared' '--enable-sysvmsg=shared' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--enable-soap=shared' '--enable-sockets=shared' '--with-sodium=shared' '--enable-tokenizer=shared' '--enable-wddx=shared' '--enable-xml=shared' '--enable-xmlreader=shared' '--with-bz2=shared' '--with-curl=shared' '--with-db4' '--with-iconv=shared' '--with-enchant=shared,/usr' '--with-freetype-dir=shared' '--with-gettext=shared' '--with-gd=shared,/usr' '--with-gdbm' '--with-gmp=shared' '--with-imap=shared' '--with-imap-ssl' '--with-interbase=shared,/usr' '--with-jpeg-dir=/usr' '--with-ldap=shared' '--with-ldap-sasl' '--enable-mysqlnd=shared' '--with-mysqli=shared,mysqlnd' '--enable-opcache=shared' '--with-openssl=shared' '--with-kerberos' '--with-tcadb=/usr' '--with-pcre-regex=/usr' '--enable-filter=shared' '--with-pear=/usr/share/pear' '--with-pgsql=shared,/usr' '--enable-phar=shared' '--with-png-dir=/usr' '--with-pspell=shared' '--with-readline=shared' '--with-recode=shared' '--with-snmp=shared' '--with-sqlite3=shared,/usr' '--with-tidy=shared' '--with-unixODBC=shared,/usr' '--with-xmlrpc=shared,/usr' '--with-xsl=shared' '--with-zlib=shared' '--with-zlib-dir=shared,/usr' '--enable-zip=shared,/usr' '--with-libzip' 'build_alias=x86_64-pld-linux' 'host_alias=x86_64-pld-linux' 'CFLAGS=-O2 -fwrapv -pipe -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -Werror=trampolines -fPIC -march=x86-64 -mtune=generic -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 -Wformat -Werror=format-security -std=gnu17 -fPIC -DPIC' 'CPPFLAGS=-DDEBUG_FASTCGI -DHAVE_STRNDUP -DNDEBUG -DQT_NO_DEBUG -I/usr/include/xmlrpc-epi' 'CPP=/usr/bin/cpp' 'CXXFLAGS=-O2 -fwrapv -pipe -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -Werror=trampolines -fPIC -march=x86-64 -mtune=generic -gdwarf-4 -fno-debug-types-section -fvar-tracking-assignments -g2 -Wformat -Werror=format-security -fPIC -DPIC -std=c++17'"
php_sapis="apache2handler cgi cli embed fpm litespeed phpdbg"

# 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;;
--sysconfdir)
  echo $sysconfdir;;
--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]
  --sysconfdir        [$sysconfdir]
  --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
