pg_config 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. --cc)
  32. echo "@TARGET_CC@"
  33. ;;
  34. --pkglibdir)
  35. echo "/usr/lib/postgresql"
  36. ;;
  37. --bindir)
  38. echo "/usr/bin"
  39. ;;
  40. --sharedir)
  41. echo "/usr/share/postgresql"
  42. ;;
  43. --localedir)
  44. echo "/usr/share/locale"
  45. ;;
  46. --docdir)
  47. echo "/usr/share/doc/postgresql"
  48. ;;
  49. --mandir)
  50. echo "/usr/share/man"
  51. ;;
  52. *)
  53. echo "Usage: $0 {OPTION}"
  54. echo
  55. echo "Options:"
  56. echo
  57. echo " --includedir show location of C header files of the client interfaces"
  58. echo " --pkgincludedir show location of other C header files"
  59. echo " --includedir-server show location of C header files for the server"
  60. echo " --libdir show location of object code libraries"
  61. echo " --version show the PostgreSQL version"
  62. echo " --configure show options given to configure script"
  63. echo " --pgxs show location of extension makefile"
  64. echo " --cflags show CFLAGS value used when PostgreSQL was built"
  65. echo " --cc show CC value used when PostgreSQL was built"
  66. echo " --pkglibdir show location of dynamically loadable modules"
  67. echo " --bindir show location of user executables"
  68. echo " --sharedir show location of architecture-independent support files"
  69. echo " --localedir show location of locale support files"
  70. echo " --docdir show location of documentation files"
  71. echo " --mandir show location of manual pages"
  72. esac