4 pg_config — retrieve information about the installed version of
13 The pg_config utility prints configuration parameters of the currently
14 installed version of PostgreSQL. It is intended, for example, to be
15 used by software packages that want to interface to PostgreSQL to
16 facilitate finding the required header files and libraries.
20 To use pg_config, supply one or more of the following options:
23 Print the location of user executables. Use this, for example,
24 to find the psql program. This is normally also the location
25 where the pg_config program resides.
28 Print the location of documentation files.
31 Print the location of HTML documentation files.
34 Print the location of C header files of the client interfaces.
37 Print the location of other C header files.
40 Print the location of C header files for server programming.
43 Print the location of object code libraries.
46 Print the location of dynamically loadable modules, or where the
47 server would search for them. (Other architecture-dependent data
48 files might also be installed in this directory.)
51 Print the location of locale support files. (This will be an
52 empty string if locale support was not configured when
53 PostgreSQL was built.)
56 Print the location of manual pages.
59 Print the location of architecture-independent support files.
62 Print the location of system-wide configuration files.
65 Print the location of extension makefiles.
68 Print the options that were given to the configure script when
69 PostgreSQL was configured for building. This can be used to
70 reproduce the identical configuration, or to find out with what
71 options a binary package was built. (Note however that binary
72 packages often contain vendor-specific custom patches.) See also
76 Print the value of the CC variable that was used for building
77 PostgreSQL. This shows the C compiler used.
80 Print the value of the CPPFLAGS variable that was used for
81 building PostgreSQL. This shows C compiler switches needed at
82 preprocessing time (typically, -I switches).
85 Print the value of the CFLAGS variable that was used for
86 building PostgreSQL. This shows C compiler switches.
89 Print the value of the CFLAGS_SL variable that was used for
90 building PostgreSQL. This shows extra C compiler switches used
91 for building shared libraries.
94 Print the value of the LDFLAGS variable that was used for
95 building PostgreSQL. This shows linker switches.
98 Print the value of the LDFLAGS_EX variable that was used for
99 building PostgreSQL. This shows linker switches used for
100 building executables only.
103 Print the value of the LDFLAGS_SL variable that was used for
104 building PostgreSQL. This shows linker switches used for
105 building shared libraries only.
108 Print the value of the LIBS variable that was used for building
109 PostgreSQL. This normally contains -l switches for external
110 libraries linked into PostgreSQL.
113 Print the version of PostgreSQL.
117 Show help about pg_config command line arguments, and exit.
119 If more than one option is given, the information is printed in that
120 order, one item per line. If no options are given, all available
121 information is printed, with labels.
125 The options --docdir, --pkgincludedir, --localedir, --mandir,
126 --sharedir, --sysconfdir, --cc, --cppflags, --cflags, --cflags_sl,
127 --ldflags, --ldflags_sl, and --libs were added in PostgreSQL 8.1. The
128 option --htmldir was added in PostgreSQL 8.4. The option --ldflags_ex
129 was added in PostgreSQL 9.0.
133 To reproduce the build configuration of the current PostgreSQL
134 installation, run the following command:
135 eval ./configure `pg_config --configure`
137 The output of pg_config --configure contains shell quotation marks so
138 arguments with spaces are represented correctly. Therefore, using eval
139 is required for proper results.