File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / scripts / php-config
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue May 29 12:34:34 2012 UTC (12 years, 7 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_17p0, HEAD
php 5.4.3+patches

    1: #! /bin/sh
    2: 
    3: SED="sed"
    4: prefix="/usr/local"
    5: datarootdir="/usr/local/share"
    6: exec_prefix="${prefix}"
    7: version="5.4.3"
    8: vernum="50403"
    9: include_dir="${prefix}/include/php"
   10: 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"
   11: ldflags=" -L/usr/local/lib"
   12: libs="-lcrypt   -lcrypt -lpcre -lm  -lxml2 -lz -liconv -lm -lcrypt -lcrypt "
   13: extension_dir='/usr/local/lib/php/20100525'
   14: man_dir=`eval echo /usr/local/man`
   15: program_prefix=""
   16: program_suffix=""
   17: exe_extension=""
   18: php_cli_binary=NONE
   19: php_cgi_binary=NONE
   20: configure_options=" '--with-layout=GNU' '--localstatedir=/var' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--enable-libxml' '--enable-mysqlnd' '--with-libxml-dir=/usr/local' '--with-pcre-regex=/usr/local' '--with-zlib-dir=/usr' '--program-prefix=' '--enable-embed' '--with-regex=php' '--with-zend-vm=CALL' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=i386-portbld-freebsd10.0'"
   21: php_sapis=" cli embed cgi"
   22: 
   23: # Set php_cli_binary and php_cgi_binary if available
   24: for sapi in $php_sapis; do
   25:   case $sapi in
   26:   cli)
   27:     php_cli_binary="${exec_prefix}/bin/${program_prefix}php${program_suffix}${exe_extension}"
   28:     ;;
   29:   cgi)
   30:     php_cgi_binary="${exec_prefix}/bin/${program_prefix}php-cgi${program_suffix}${exe_extension}"
   31:     ;;
   32:   esac
   33: done
   34: 
   35: # Determine which (if any) php binary is available
   36: if test "$php_cli_binary" != "NONE"; then
   37:   php_binary="$php_cli_binary"
   38: else
   39:   php_binary="$php_cgi_binary"
   40: fi
   41: 
   42: # Remove quotes
   43: configure_options=`echo $configure_options | $SED -e "s#'##g"`
   44: 
   45: case "$1" in
   46: --prefix)
   47:   echo $prefix;;
   48: --includes)
   49:   echo $includes;;
   50: --ldflags)
   51:   echo $ldflags;;
   52: --libs)
   53:   echo $libs;;
   54: --extension-dir)
   55:   echo $extension_dir;;
   56: --include-dir)
   57:   echo $include_dir;;
   58: --php-binary)
   59:   echo $php_binary;;
   60: --php-sapis)
   61:   echo $php_sapis;;
   62: --configure-options)
   63:   echo $configure_options;;
   64: --man-dir)
   65:   echo $man_dir;;
   66: --version)
   67:   echo $version;;
   68: --vernum)
   69:   echo $vernum;;
   70: *)
   71:   cat << EOF
   72: Usage: $0 [OPTION]
   73: Options:
   74:   --prefix            [$prefix]
   75:   --includes          [$includes]
   76:   --ldflags           [$ldflags]
   77:   --libs              [$libs]
   78:   --extension-dir     [$extension_dir]
   79:   --include-dir       [$include_dir]
   80:   --man-dir           [$man_dir]
   81:   --php-binary        [$php_binary]
   82:   --php-sapis         [$php_sapis]
   83:   --configure-options [$configure_options]
   84:   --version           [$version]
   85:   --vernum            [$vernum]
   86: EOF
   87:   exit 1;;
   88: esac
   89: 
   90: exit 0

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>