11<chapter id="config">
22<title>Configuration Options</title>
33
4+ <sect1>
5+ <title>Parameters for Configuration (<application>configure</application>)</title>
6+
7+ <para>
8+ The full set of parameters available in <application>configure</application>
9+ can be obtained by typing
10+
11+ <programlisting>
12+ $ ./configure --help
13+ </programlisting>
14+
15+ <para>
16+ The following parameters may be of interest to most installers:
17+
18+ <programlisting>
19+ Directory and file names:
20+ --prefix=PREFIX install architecture-independent files in PREFIX
21+ [/usr/local/pgsql]
22+ --bindir=DIR user executables in DIR [EPREFIX/bin]
23+ --datadir=DIR read-only architecture-independent data in DIR
24+ [PREFIX/share]
25+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
26+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
27+ [PREFIX/com]
28+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
29+ --includedir=DIR C header files in DIR [PREFIX/include]
30+ --mandir=DIR man documentation in DIR [PREFIX/man]
31+ --srcdir=DIR find the sources in DIR [configure dir or ..]
32+ Features and packages:
33+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
34+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
35+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
36+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
37+ --enable and --with options recognized:
38+ --with-template=<replaceable>template</replaceable>
39+ use operating system template file
40+ see template directory
41+ --with-includes=<replaceable>incdir</replaceable> site header files for tk/tcl, etc in DIR
42+ --with-libs=<replaceable>incdir</replaceable> also search for libraries in DIR
43+ --with-libraries=<replaceable>libdir</replaceable> also search for libraries in DIR
44+ --enable-locale enable locale support
45+ --enable-recode enable cyrillic recode support
46+ --with-mb=<replaceable>encoding</replaceable> enable multi-byte support
47+ --with-pgport=<replaceable>portnum</replaceable> change default startup port
48+ --with-tcl use tcl
49+ --with-tclconfig=<replaceable>tcldir</replaceable> tclConfig.sh and tkConfig.sh are in DIR
50+ --with-perl use perl
51+ --with-odbc build ODBC driver package
52+ --with-odbcinst=<replaceable>odbcdir</replaceable> change default directory for odbcinst.ini
53+ --enable-cassert enable assertion checks (debugging)
54+ --with-CC=<replaceable>compiler</replaceable> use specific C compiler
55+ --with-CXX=<replaceable>compiler</replaceable> use specific C++ compiler
56+ --with-x use the X Window System
57+ </programlisting>
58+
59+ <sect1>
60+ <title>Parameters for Building (<application>make</application>)</title>
61+
62+ <para>
63+ Many installation-related parameters can be set in the building
64+ stage of <productname>Postgres</productname> installation.
65+
66+ <para>
67+ In most cases, these parameters should be place in a file,
68+ <filename>Makefile.custom</filename>, intended just for that purpose.
69+ The default distribution does not contain this optional file, so you
70+ will create it using a text editor of your choice. When upgrading installations,
71+ you can simply copy your old Makefile.custom to the new installation before
72+ doing the build.
73+
74+ <synopsis>
75+ make [ <replaceable>variable</replaceable>=<replaceable class="parameter">value</replaceable> [,...] ]
76+ </synopsis>
77+
78+ <para>
79+ A few of the many variables which can be specified are:
80+
81+ <variablelist>
82+ <varlistentry>
83+ <term>
84+ <envar>POSTGRESDIR</envar>
85+
86+ <listitem>
87+ <para>
88+ Top of the installation tree.
89+
90+ <varlistentry>
91+ <term>
92+ <envar>BINDIR</envar>
93+
94+ <listitem>
95+ <para>
96+ Location of applications and utilities.
97+
98+ <varlistentry>
99+ <term>
100+ <envar>LIBDIR</envar>
101+
102+ <listitem>
103+ <para>
104+ Location of object libraries, including shared libraries.
105+
106+ <varlistentry>
107+ <term>
108+ <envar>HEADERDIR</envar>
109+
110+ <listitem>
111+ <para>
112+ Location of include files.
113+
114+ <varlistentry>
115+ <term>
116+ <envar>ODBCINST</envar>
117+
118+ <listitem>
119+ <para>
120+ Location of installation-wide <application>psqlODBC</application>
121+ (<acronym>ODBC</acronym>) configuration file.
122+
123+ </variablelist>
124+
125+ <para>
126+ There are other optional parameters which are not as commonly used.
127+ Many of those listed below are appropriate when doing
128+ <application>Postgres</application> server code development.
129+
130+ <variablelist>
131+ <varlistentry>
132+ <term>
133+ <envar>CFLAGS</envar>
134+
135+ <listitem>
136+ <para>
137+ Set flags for the C compiler.
138+ Should be assigned with "+=" to retain relevant default parameters.
139+
140+ <varlistentry>
141+ <term>
142+ YFLAGS
143+
144+ <listitem>
145+ <para>
146+ Set flags for the yacc/bison parser. <option>-v</option> might be
147+ used to help diagnose problems building a new parser.
148+ Should be assigned with "+=" to retain relevant default parameters.
149+
150+ <varlistentry>
151+ <term>
152+ <envar>USE_TCL</envar>
153+
154+ <listitem>
155+ <para>
156+ Enable Tcl interface building.
157+
158+ <varlistentry>
159+ <term>
160+ <envar>HSTYLE</envar>
161+
162+ <listitem>
163+ <para>
164+ DocBook <acronym>HTML</acronym> style sheets for building the
165+ documentation from scratch.
166+ Not used unless you are developing new documentation from the
167+ DocBook-compatible <acronym>SGML</acronym> source documents in
168+ <filename>doc/src/sgml/</filename>.
169+
170+ <varlistentry>
171+ <term>
172+ <envar>PSTYLE</envar>
173+
174+ <listitem>
175+ <para>
176+ DocBook style sheets for building printed documentation from scratch.
177+ Not used unless you are developing new documentation from the
178+ DocBook-compatible <acronym>SGML</acronym> source documents in
179+ <filename>doc/src/sgml/</filename>.
180+
181+ </variablelist>
182+
183+ <para>
184+ Here is an example <filename>Makefile.custom</filename> for a
185+ PentiumPro Linux system:
186+
187+ <programlisting>
188+ # Makefile.custom
189+ # Thomas Lockhart 1998-03-01
190+
191+ POSTGRESDIR= /opt/postgres/current
192+ CFLAGS+= -m486 # -g -O0
193+ USE_TCL= true
194+ TCL_LIB= -ltcl
195+ X_LIBS= -L/usr/X11/lib
196+ TK_LIB= -ltk
197+
198+ # documentation
199+
200+ HSTYLE= /home/tgl/SGML/db118.d/docbook/html
201+ PSTYLE= /home/tgl/SGML/db118.d/docbook/print
202+ </programlisting>
203+
4204<Sect1>
5205<Title>Locale Support</Title>
6206
@@ -23,10 +223,11 @@ when I work with perl
23223 the <ProductName>Postgres</ProductName> source tree I made very minor corections to
24224src/backend/utils/adt/varlena.c and src/backend/main/main.c and got what I needed!
25225I did support only for
26- LC_CTYPE and LC_COLLATE, but later LC_MONETARY was added by others. I got many
226+ <envar>LC_CTYPE</envar> and <envar>LC_COLLATE</envar>,
227+ but later <envar>LC_MONETARY</envar> was added by others. I got many
27228messages from people about this patch so I decided to send it to developers
28229and (to my surprise) it was
29- incorporated intopostgresql distribution.
230+ incorporated intothe <productname>Postgres</productname> distribution.
30231
31232<Para>
32233 People often complain that locale doesn't work for them.
@@ -38,7 +239,8 @@ There are several common mistakes:
38239 Didn't properly configure postgresql before compilation.
39240 You must run configure with --enable-locale option to enable locale support.
40241 Didn't setup environment correctly when starting postmaster.
41- You must define environment variables $LC_CTYPE and $LC_COLLATE
242+ You must define environment variables
243+ <envar>LC_CTYPE</envar> and <envar>LC_COLLATE</envar>
42244before running postmaster
43245 because backend gets information about locale from environment.
44246I use following shell script
@@ -115,6 +317,7 @@ the USE_LOCALE variable.
115317There is one evident drawback of using locale - it's speed!
116318So, use locale only if you really need it.
117319
320+
118321<Sect1>
119322<Title>Kerberos Authentication</Title>
120323