1717 *
1818 * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
1919 *
20- * $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.12 2005/08/09 22:47:03 tgl Exp $
20+ * $PostgreSQL: pgsql/src/bin/pg_config/pg_config.c,v 1.13 2005/09/27 17:39:33 tgl Exp $
2121 *
2222 *-------------------------------------------------------------------------
2323 */
@@ -52,6 +52,17 @@ show_bindir(bool all)
5252printf ("%s\n" ,path );
5353}
5454
55+ static void
56+ show_docdir (bool all )
57+ {
58+ char path [MAXPGPATH ];
59+
60+ if (all )
61+ printf ("DOCDIR = " );
62+ get_doc_path (mypath ,path );
63+ printf ("%s\n" ,path );
64+ }
65+
5566static void
5667show_includedir (bool all )
5768{
@@ -63,6 +74,17 @@ show_includedir(bool all)
6374printf ("%s\n" ,path );
6475}
6576
77+ static void
78+ show_pkgincludedir (bool all )
79+ {
80+ char path [MAXPGPATH ];
81+
82+ if (all )
83+ printf ("PKGINCLUDEDIR = " );
84+ get_pkginclude_path (mypath ,path );
85+ printf ("%s\n" ,path );
86+ }
87+
6688static void
6789show_includedir_server (bool all )
6890{
@@ -96,6 +118,50 @@ show_pkglibdir(bool all)
96118printf ("%s\n" ,path );
97119}
98120
121+ static void
122+ show_localedir (bool all )
123+ {
124+ char path [MAXPGPATH ];
125+
126+ if (all )
127+ printf ("LOCALEDIR = " );
128+ get_locale_path (mypath ,path );
129+ printf ("%s\n" ,path );
130+ }
131+
132+ static void
133+ show_mandir (bool all )
134+ {
135+ char path [MAXPGPATH ];
136+
137+ if (all )
138+ printf ("MANDIR = " );
139+ get_man_path (mypath ,path );
140+ printf ("%s\n" ,path );
141+ }
142+
143+ static void
144+ show_sharedir (bool all )
145+ {
146+ char path [MAXPGPATH ];
147+
148+ if (all )
149+ printf ("SHAREDIR = " );
150+ get_share_path (mypath ,path );
151+ printf ("%s\n" ,path );
152+ }
153+
154+ static void
155+ show_sysconfdir (bool all )
156+ {
157+ char path [MAXPGPATH ];
158+
159+ if (all )
160+ printf ("SYSCONFDIR = " );
161+ get_etc_path (mypath ,path );
162+ printf ("%s\n" ,path );
163+ }
164+
99165static void
100166show_pgxs (bool all )
101167{
@@ -234,10 +300,16 @@ typedef struct
234300
235301static const InfoItem info_items []= {
236302{"--bindir" ,show_bindir },
303+ {"--docdir" ,show_docdir },
237304{"--includedir" ,show_includedir },
305+ {"--pkgincludedir" ,show_pkgincludedir },
238306{"--includedir-server" ,show_includedir_server },
239307{"--libdir" ,show_libdir },
240308{"--pkglibdir" ,show_pkglibdir },
309+ {"--localedir" ,show_localedir },
310+ {"--mandir" ,show_mandir },
311+ {"--sharedir" ,show_sharedir },
312+ {"--sysconfdir" ,show_sysconfdir },
241313{"--pgxs" ,show_pgxs },
242314{"--configure" ,show_configure },
243315{"--cc" ,show_cc },
@@ -260,11 +332,17 @@ help(void)
260332printf (_ (" %s [ OPTION ... ]\n\n" ),progname );
261333printf (_ ("Options:\n" ));
262334printf (_ (" --bindir show location of user executables\n" ));
335+ printf (_ (" --docdir show location of documentation files\n" ));
263336printf (_ (" --includedir show location of C header files of the client\n"
264337" interfaces\n" ));
338+ printf (_ (" --pkgincludedir show location of other C header files\n" ));
265339printf (_ (" --includedir-server show location of C header files for the server\n" ));
266340printf (_ (" --libdir show location of object code libraries\n" ));
267341printf (_ (" --pkglibdir show location of dynamically loadable modules\n" ));
342+ printf (_ (" --localedir show location of locale support files\n" ));
343+ printf (_ (" --mandir show location of manual pages\n" ));
344+ printf (_ (" --sharedir show location of architecture-independent support files\n" ));
345+ printf (_ (" --sysconfdir show location of system-wide configuration files\n" ));
268346printf (_ (" --pgxs show location of extension makefile\n" ));
269347printf (_ (" --configure show options given to \"configure\" script when\n"
270348" PostgreSQL was built\n" ));