pg_config 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #!/bin/sh
  2. #
  3. # Minimal pg_config implementation as replacement for the native pg_config application
  4. #
  5. prefix=/usr
  6. case "$1" in
  7. --includedir)
  8. echo "$prefix/include"
  9. ;;
  10. --pkgincludedir)
  11. echo "$prefix/include/postgresql"
  12. ;;
  13. --includedir-server)
  14. echo "$prefix/include/postgresql/server"
  15. ;;
  16. --libdir)
  17. echo "$prefix/lib"
  18. ;;
  19. --version)
  20. echo "PostgreSQL @POSTGRESQL_VERSION@"
  21. ;;
  22. --configure)
  23. echo "@POSTGRESQL_CONF_OPTIONS@"
  24. ;;
  25. --pgxs)
  26. echo "$prefix/lib/postgresql/pgxs/src/makefiles/pgxs.mk"
  27. ;;
  28. --cflags)
  29. echo "@TARGET_CFLAGS@"
  30. ;;
  31. --cflags_sl)
  32. # defined at src/template/linux
  33. echo "-fPIC"
  34. ;;
  35. --cc)
  36. echo "@TARGET_CC@"
  37. ;;
  38. --pkglibdir)
  39. echo "/usr/lib/postgresql"
  40. ;;
  41. --bindir)
  42. echo "/usr/bin"
  43. ;;
  44. --sharedir)
  45. echo "/usr/share/postgresql"
  46. ;;
  47. --localedir)
  48. echo "/usr/share/locale"
  49. ;;
  50. --docdir)
  51. echo "/usr/share/doc/postgresql"
  52. ;;
  53. --mandir)
  54. echo "/usr/share/man"
  55. ;;
  56. *)
  57. echo "Usage: $0 {OPTION}"
  58. echo
  59. echo "Options:"
  60. echo
  61. echo " --includedir show location of C header files of the client interfaces"
  62. echo " --pkgincludedir show location of other C header files"
  63. echo " --includedir-server show location of C header files for the server"
  64. echo " --libdir show location of object code libraries"
  65. echo " --version show the PostgreSQL version"
  66. echo " --configure show options given to configure script"
  67. echo " --pgxs show location of extension makefile"
  68. echo " --cflags show CFLAGS value used when PostgreSQL was built"
  69. echo " --cc show CC value used when PostgreSQL was built"
  70. echo " --pkglibdir show location of dynamically loadable modules"
  71. echo " --bindir show location of user executables"
  72. echo " --sharedir show location of architecture-independent support files"
  73. echo " --localedir show location of locale support files"
  74. echo " --docdir show location of documentation files"
  75. echo " --mandir show location of manual pages"
  76. esac