~ubuntu-branches/ubuntu/oneiric/postgresql-9.1/oneiric-security

« back to all changes in this revision

Viewing changes to doc/src/sgml/man1/pg_config.1

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2011-05-11 10:41:53 UTC
  • Revision ID: james.westby@ubuntu.com-20110511104153-psbh2o58553fv1m0
Tags: upstream-9.1~beta1
ImportĀ upstreamĀ versionĀ 9.1~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'\" t
 
2
.\"     Title: pg_config
 
3
.\"    Author: The PostgreSQL Global Development Group
 
4
.\" Generator: DocBook XSL Stylesheets v1.75.1 <http://docbook.sf.net/>
 
5
.\"      Date: 2011-04-27
 
6
.\"    Manual: PostgreSQL 9.1beta1 Documentation
 
7
.\"    Source: PostgreSQL 9.1beta1
 
8
.\"  Language: English
 
9
.\"
 
10
.TH "PG_CONFIG" "1" "2011-04-27" "PostgreSQL 9.1beta1" "PostgreSQL 9.1beta1 Documentation"
 
11
.\" -----------------------------------------------------------------
 
12
.\" * set default formatting
 
13
.\" -----------------------------------------------------------------
 
14
.\" disable hyphenation
 
15
.nh
 
16
.\" disable justification (adjust text to left margin only)
 
17
.ad l
 
18
.\" -----------------------------------------------------------------
 
19
.\" * MAIN CONTENT STARTS HERE *
 
20
.\" -----------------------------------------------------------------
 
21
.SH "NAME"
 
22
pg_config \- retrieve information about the installed version of PostgreSQL
 
23
.\" pg_config
 
24
.SH "SYNOPSIS"
 
25
.HP \w'pg_config\ 'u
 
26
pg_config [\fIoption\fR...]
 
27
.SH "DESCRIPTION"
 
28
.PP
 
29
The
 
30
pg_config
 
31
utility prints configuration parameters of the currently installed version of
 
32
PostgreSQL\&. It is intended, for example, to be used by software packages that want to interface to
 
33
PostgreSQL
 
34
to facilitate finding the required header files and libraries\&.
 
35
.SH "OPTIONS"
 
36
.PP
 
37
To use
 
38
pg_config, supply one or more of the following options:
 
39
.PP
 
40
\fB\-\-bindir\fR
 
41
.RS 4
 
42
Print the location of user executables\&. Use this, for example, to find the
 
43
psql
 
44
program\&. This is normally also the location where the
 
45
pg_config
 
46
program resides\&.
 
47
.RE
 
48
.PP
 
49
\fB\-\-docdir\fR
 
50
.RS 4
 
51
Print the location of documentation files\&.
 
52
.RE
 
53
.PP
 
54
\fB\-\-htmldir\fR
 
55
.RS 4
 
56
Print the location of HTML documentation files\&.
 
57
.RE
 
58
.PP
 
59
\fB\-\-includedir\fR
 
60
.RS 4
 
61
Print the location of C header files of the client interfaces\&.
 
62
.RE
 
63
.PP
 
64
\fB\-\-pkgincludedir\fR
 
65
.RS 4
 
66
Print the location of other C header files\&.
 
67
.RE
 
68
.PP
 
69
\fB\-\-includedir\-server\fR
 
70
.RS 4
 
71
Print the location of C header files for server programming\&.
 
72
.RE
 
73
.PP
 
74
\fB\-\-libdir\fR
 
75
.RS 4
 
76
Print the location of object code libraries\&.
 
77
.RE
 
78
.PP
 
79
\fB\-\-pkglibdir\fR
 
80
.RS 4
 
81
Print the location of dynamically loadable modules, or where the server would search for them\&. (Other architecture\-dependent data files might also be installed in this directory\&.)
 
82
.RE
 
83
.PP
 
84
\fB\-\-localedir\fR
 
85
.RS 4
 
86
Print the location of locale support files\&. (This will be an empty string if locale support was not configured when
 
87
PostgreSQL
 
88
was built\&.)
 
89
.RE
 
90
.PP
 
91
\fB\-\-mandir\fR
 
92
.RS 4
 
93
Print the location of manual pages\&.
 
94
.RE
 
95
.PP
 
96
\fB\-\-sharedir\fR
 
97
.RS 4
 
98
Print the location of architecture\-independent support files\&.
 
99
.RE
 
100
.PP
 
101
\fB\-\-sysconfdir\fR
 
102
.RS 4
 
103
Print the location of system\-wide configuration files\&.
 
104
.RE
 
105
.PP
 
106
\fB\-\-pgxs\fR
 
107
.RS 4
 
108
Print the location of extension makefiles\&.
 
109
.RE
 
110
.PP
 
111
\fB\-\-configure\fR
 
112
.RS 4
 
113
Print the options that were given to the
 
114
configure
 
115
script when
 
116
PostgreSQL
 
117
was configured for building\&. This can be used to reproduce the identical configuration, or to find out with what options a binary package was built\&. (Note however that binary packages often contain vendor\-specific custom patches\&.) See also the examples below\&.
 
118
.RE
 
119
.PP
 
120
\fB\-\-cc\fR
 
121
.RS 4
 
122
Print the value of the
 
123
\fICC\fR
 
124
variable that was used for building
 
125
PostgreSQL\&. This shows the C compiler used\&.
 
126
.RE
 
127
.PP
 
128
\fB\-\-cppflags\fR
 
129
.RS 4
 
130
Print the value of the
 
131
\fICPPFLAGS\fR
 
132
variable that was used for building
 
133
PostgreSQL\&. This shows C compiler switches needed at preprocessing time (typically,
 
134
\-I
 
135
switches)\&.
 
136
.RE
 
137
.PP
 
138
\fB\-\-cflags\fR
 
139
.RS 4
 
140
Print the value of the
 
141
\fICFLAGS\fR
 
142
variable that was used for building
 
143
PostgreSQL\&. This shows C compiler switches\&.
 
144
.RE
 
145
.PP
 
146
\fB\-\-cflags_sl\fR
 
147
.RS 4
 
148
Print the value of the
 
149
\fICFLAGS_SL\fR
 
150
variable that was used for building
 
151
PostgreSQL\&. This shows extra C compiler switches used for building shared libraries\&.
 
152
.RE
 
153
.PP
 
154
\fB\-\-ldflags\fR
 
155
.RS 4
 
156
Print the value of the
 
157
\fILDFLAGS\fR
 
158
variable that was used for building
 
159
PostgreSQL\&. This shows linker switches\&.
 
160
.RE
 
161
.PP
 
162
\fB\-\-ldflags_ex\fR
 
163
.RS 4
 
164
Print the value of the
 
165
\fILDFLAGS_EX\fR
 
166
variable that was used for building
 
167
PostgreSQL\&. This shows linker switches used for building executables only\&.
 
168
.RE
 
169
.PP
 
170
\fB\-\-ldflags_sl\fR
 
171
.RS 4
 
172
Print the value of the
 
173
\fILDFLAGS_SL\fR
 
174
variable that was used for building
 
175
PostgreSQL\&. This shows linker switches used for building shared libraries only\&.
 
176
.RE
 
177
.PP
 
178
\fB\-\-libs\fR
 
179
.RS 4
 
180
Print the value of the
 
181
\fILIBS\fR
 
182
variable that was used for building
 
183
PostgreSQL\&. This normally contains
 
184
\-l
 
185
switches for external libraries linked into
 
186
PostgreSQL\&.
 
187
.RE
 
188
.PP
 
189
\fB\-\-version\fR
 
190
.RS 4
 
191
Print the version of
 
192
PostgreSQL\&.
 
193
.RE
 
194
If more than one option is given, the information is printed in that order, one item per line\&. If no options are given, all available information is printed, with labels\&.
 
195
.SH "NOTES"
 
196
.PP
 
197
The option
 
198
\fB\-\-includedir\-server\fR
 
199
was added in
 
200
PostgreSQL
 
201
7\&.2\&. In prior releases, the server include files were installed in the same location as the client headers, which could be queried with the option
 
202
\fB\-\-includedir\fR\&. To make your package handle both cases, try the newer option first and test the exit status to see whether it succeeded\&.
 
203
.PP
 
204
The options
 
205
\fB\-\-docdir\fR,
 
206
\fB\-\-pkgincludedir\fR,
 
207
\fB\-\-localedir\fR,
 
208
\fB\-\-mandir\fR,
 
209
\fB\-\-sharedir\fR,
 
210
\fB\-\-sysconfdir\fR,
 
211
\fB\-\-cc\fR,
 
212
\fB\-\-cppflags\fR,
 
213
\fB\-\-cflags\fR,
 
214
\fB\-\-cflags_sl\fR,
 
215
\fB\-\-ldflags\fR,
 
216
\fB\-\-ldflags_sl\fR, and
 
217
\fB\-\-libs\fR
 
218
were added in
 
219
PostgreSQL
 
220
8\&.1\&. The option
 
221
\fB\-\-htmldir\fR
 
222
was added in
 
223
PostgreSQL
 
224
8\&.4\&. The option
 
225
\fB\-\-ldflags_ex\fR
 
226
was added in
 
227
PostgreSQL
 
228
9\&.0\&.
 
229
.PP
 
230
In releases prior to
 
231
PostgreSQL
 
232
7\&.1, before
 
233
pg_config
 
234
came to be, a method for finding the equivalent configuration information did not exist\&.
 
235
.SH "EXAMPLE"
 
236
.PP
 
237
To reproduce the build configuration of the current PostgreSQL installation, run the following command:
 
238
.sp
 
239
.if n \{\
 
240
.RS 4
 
241
.\}
 
242
.nf
 
243
eval \&./configure `pg_config \-\-configure`
 
244
.fi
 
245
.if n \{\
 
246
.RE
 
247
.\}
 
248
.sp
 
249
The output of
 
250
pg_config \-\-configure
 
251
contains shell quotation marks so arguments with spaces are represented correctly\&. Therefore, using
 
252
eval
 
253
is required for proper results\&.