php-config.in 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #! /bin/sh
  2. SED="@SED@"
  3. prefix="@prefix@"
  4. datarootdir="@datarootdir@"
  5. exec_prefix="@exec_prefix@"
  6. version="@PHP_VERSION@"
  7. vernum="@PHP_VERSION_ID@"
  8. include_dir="@includedir@/php"
  9. 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"
  10. ldflags="@PHP_LDFLAGS@"
  11. libs="@EXTRA_LIBS@"
  12. extension_dir='@EXTENSION_DIR@'
  13. man_dir=`eval echo @mandir@`
  14. program_prefix="@program_prefix@"
  15. program_suffix="@program_suffix@"
  16. exe_extension="@EXEEXT@"
  17. php_cli_binary=NONE
  18. php_cgi_binary=NONE
  19. configure_options="@CONFIGURE_OPTIONS@"
  20. php_sapis="@PHP_INSTALLED_SAPIS@"
  21. # Set php_cli_binary and php_cgi_binary if available
  22. for sapi in $php_sapis; do
  23. case $sapi in
  24. cli)
  25. php_cli_binary="@bindir@/${program_prefix}php${program_suffix}${exe_extension}"
  26. ;;
  27. cgi)
  28. php_cgi_binary="@bindir@/${program_prefix}php-cgi${program_suffix}${exe_extension}"
  29. ;;
  30. esac
  31. done
  32. # Determine which (if any) php binary is available
  33. if test "$php_cli_binary" != "NONE"; then
  34. php_binary="$php_cli_binary"
  35. else
  36. php_binary="$php_cgi_binary"
  37. fi
  38. # Remove quotes
  39. configure_options=`echo $configure_options | $SED -e "s#'##g"`
  40. case "$1" in
  41. --prefix)
  42. echo $prefix;;
  43. --includes)
  44. echo $includes;;
  45. --ldflags)
  46. echo $ldflags;;
  47. --libs)
  48. echo $libs;;
  49. --extension-dir)
  50. echo $extension_dir;;
  51. --include-dir)
  52. echo $include_dir;;
  53. --php-binary)
  54. echo $php_binary;;
  55. --php-sapis)
  56. echo $php_sapis;;
  57. --configure-options)
  58. echo $configure_options;;
  59. --man-dir)
  60. echo $man_dir;;
  61. --version)
  62. echo $version;;
  63. --vernum)
  64. echo $vernum;;
  65. *)
  66. cat << EOF
  67. Usage: $0 [OPTION]
  68. Options:
  69. --prefix [$prefix]
  70. --includes [$includes]
  71. --ldflags [$ldflags]
  72. --libs [$libs]
  73. --extension-dir [$extension_dir]
  74. --include-dir [$include_dir]
  75. --man-dir [$man_dir]
  76. --php-binary [$php_binary]
  77. --php-sapis [$php_sapis]
  78. --configure-options [$configure_options]
  79. --version [$version]
  80. --vernum [$vernum]
  81. EOF
  82. exit 1;;
  83. esac
  84. exit 0