43 {
"--bindir",
"BINDIR"},
44 {
"--docdir",
"DOCDIR"},
45 {
"--htmldir",
"HTMLDIR"},
46 {
"--includedir",
"INCLUDEDIR"},
47 {
"--pkgincludedir",
"PKGINCLUDEDIR"},
48 {
"--includedir-server",
"INCLUDEDIR-SERVER"},
49 {
"--libdir",
"LIBDIR"},
50 {
"--pkglibdir",
"PKGLIBDIR"},
51 {
"--localedir",
"LOCALEDIR"},
52 {
"--mandir",
"MANDIR"},
53 {
"--sharedir",
"SHAREDIR"},
54 {
"--sysconfdir",
"SYSCONFDIR"},
56 {
"--configure",
"CONFIGURE"},
58 {
"--cppflags",
"CPPFLAGS"},
59 {
"--cflags",
"CFLAGS"},
60 {
"--cflags_sl",
"CFLAGS_SL"},
61 {
"--ldflags",
"LDFLAGS"},
62 {
"--ldflags_ex",
"LDFLAGS_EX"},
63 {
"--ldflags_sl",
"LDFLAGS_SL"},
65 {
"--version",
"VERSION"},
73 printf(
_(
"\n%s provides information about the installed version of PostgreSQL.\n\n"),
progname);
77 printf(
_(
" --bindir show location of user executables\n"));
78 printf(
_(
" --docdir show location of documentation files\n"));
79 printf(
_(
" --htmldir show location of HTML documentation files\n"));
80 printf(
_(
" --includedir show location of C header files of the client\n"
82 printf(
_(
" --pkgincludedir show location of other C header files\n"));
83 printf(
_(
" --includedir-server show location of C header files for the server\n"));
84 printf(
_(
" --libdir show location of object code libraries\n"));
85 printf(
_(
" --pkglibdir show location of dynamically loadable modules\n"));
86 printf(
_(
" --localedir show location of locale support files\n"));
87 printf(
_(
" --mandir show location of manual pages\n"));
88 printf(
_(
" --sharedir show location of architecture-independent support files\n"));
89 printf(
_(
" --sysconfdir show location of system-wide configuration files\n"));
90 printf(
_(
" --pgxs show location of extension makefile\n"));
91 printf(
_(
" --configure show options given to \"configure\" script when\n"
92 " PostgreSQL was built\n"));
93 printf(
_(
" --cc show CC value used when PostgreSQL was built\n"));
94 printf(
_(
" --cppflags show CPPFLAGS value used when PostgreSQL was built\n"));
95 printf(
_(
" --cflags show CFLAGS value used when PostgreSQL was built\n"));
96 printf(
_(
" --cflags_sl show CFLAGS_SL value used when PostgreSQL was built\n"));
97 printf(
_(
" --ldflags show LDFLAGS value used when PostgreSQL was built\n"));
98 printf(
_(
" --ldflags_ex show LDFLAGS_EX value used when PostgreSQL was built\n"));
99 printf(
_(
" --ldflags_sl show LDFLAGS_SL value used when PostgreSQL was built\n"));
100 printf(
_(
" --libs show LIBS value used when PostgreSQL was built\n"));
101 printf(
_(
" --version show the PostgreSQL version\n"));
102 printf(
_(
" -?, --help show this help, then exit\n"));
103 printf(
_(
"\nWith no arguments, all known items are shown.\n\n"));
104 printf(
_(
"Report bugs to <%s>.\n"), PACKAGE_BUGREPORT);
105 printf(
_(
"%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
117 size_t configdata_len)
121 for (
i = 0;
i < configdata_len;
i++)
123 if (strcmp(configname, configdata[
i].
name) == 0)
124 printf(
"%s\n", configdata[
i].setting);
132 size_t configdata_len;
142 for (
i = 1;
i < argc;
i++)
144 if (strcmp(argv[
i],
"--help") == 0 || strcmp(argv[
i],
"-?") == 0)
153 fprintf(stderr,
_(
"%s: could not find own program executable\n"),
progname);
161 for (
i = 0;
i < configdata_len;
i++)
162 printf(
"%s = %s\n", configdata[
i].
name, configdata[
i].setting);
167 for (
i = 1;
i < argc;
i++)
174 configdata, configdata_len);
180 fprintf(stderr,
_(
"%s: invalid argument: %s\n"),
int main(int argc, char **argv)
static const InfoItem info_items[]
static const char * progname
static void show_item(const char *configname, ConfigData *configdata, size_t configdata_len)
#define PG_TEXTDOMAIN(domain)
int find_my_exec(const char *argv0, char *retpath)
void set_pglocale_pgservice(const char *argv0, const char *app)
ConfigData * get_configdata(const char *my_exec_path, size_t *configdata_len)
char my_exec_path[MAXPGPATH]
const char * get_progname(const char *argv0)