]> begriffs open source - ai-pg/blob - full-docs/txt/app-pgconfig.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / app-pgconfig.txt
1
2 pg_config
3
4    pg_config — retrieve information about the installed version of
5    PostgreSQL
6
7 Synopsis
8
9    pg_config [option...]
10
11 Description
12
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.
17
18 Options
19
20    To use pg_config, supply one or more of the following options:
21
22    --bindir
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.
26
27    --docdir
28           Print the location of documentation files.
29
30    --htmldir
31           Print the location of HTML documentation files.
32
33    --includedir
34           Print the location of C header files of the client interfaces.
35
36    --pkgincludedir
37           Print the location of other C header files.
38
39    --includedir-server
40           Print the location of C header files for server programming.
41
42    --libdir
43           Print the location of object code libraries.
44
45    --pkglibdir
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.)
49
50    --localedir
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.)
54
55    --mandir
56           Print the location of manual pages.
57
58    --sharedir
59           Print the location of architecture-independent support files.
60
61    --sysconfdir
62           Print the location of system-wide configuration files.
63
64    --pgxs
65           Print the location of extension makefiles.
66
67    --configure
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
73           the examples below.
74
75    --cc
76           Print the value of the CC variable that was used for building
77           PostgreSQL. This shows the C compiler used.
78
79    --cppflags
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).
83
84    --cflags
85           Print the value of the CFLAGS variable that was used for
86           building PostgreSQL. This shows C compiler switches.
87
88    --cflags_sl
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.
92
93    --ldflags
94           Print the value of the LDFLAGS variable that was used for
95           building PostgreSQL. This shows linker switches.
96
97    --ldflags_ex
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.
101
102    --ldflags_sl
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.
106
107    --libs
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.
111
112    --version
113           Print the version of PostgreSQL.
114
115    -?
116           --help
117           Show help about pg_config command line arguments, and exit.
118
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.
122
123 Notes
124
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.
130
131 Example
132
133    To reproduce the build configuration of the current PostgreSQL
134    installation, run the following command:
135 eval ./configure `pg_config --configure`
136
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.