~ubuntu-branches/ubuntu/trusty/postgresql-9.3/trusty-updates

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Installation Procedure</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REV="MADE"
HREF="mailto:pgsql-docs@postgresql.org"><LINK
REL="HOME"
TITLE="PostgreSQL 9.3.13 Documentation"
HREF="index.html"><LINK
REL="UP"
TITLE="  Installation from Source Code"
HREF="installation.html"><LINK
REL="PREVIOUS"
TITLE="Getting The Source"
HREF="install-getsource.html"><LINK
REL="NEXT"
TITLE="Post-Installation Setup"
HREF="install-post.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="stylesheet.css"><META
HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=ISO-8859-1"><META
NAME="creation"
CONTENT="2016-05-09T21:13:26"></HEAD
><BODY
CLASS="SECT1"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="5"
ALIGN="center"
VALIGN="bottom"
><A
HREF="index.html"
>PostgreSQL 9.3.13 Documentation</A
></TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
TITLE="Getting The Source"
HREF="install-getsource.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="installation.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="60%"
ALIGN="center"
VALIGN="bottom"
>Chapter 15. Installation from Source Code</TD
><TD
WIDTH="20%"
ALIGN="right"
VALIGN="top"
><A
TITLE="Post-Installation Setup"
HREF="install-post.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="INSTALL-PROCEDURE"
>15.4. Installation Procedure</A
></H1
><DIV
CLASS="PROCEDURE"
><OL
TYPE="1"
><LI
CLASS="STEP"
><A
NAME="CONFIGURE"
></A
><P
><B
>Configuration</B
></P
><P
>    The first step of the installation procedure is to configure the
    source tree for your system and choose the options you would like.
    This is done by running the <TT
CLASS="FILENAME"
>configure</TT
> script. For a
    default installation simply enter:
</P><PRE
CLASS="SCREEN"
><KBD
CLASS="USERINPUT"
>./configure</KBD
></PRE
><P>
    This script will run a number of tests to determine values for various
    system dependent variables and detect any quirks of your
    operating system, and finally will create several files in the
    build tree to record what it found.  You can also run
    <TT
CLASS="FILENAME"
>configure</TT
> in a directory outside the source
    tree, if you want to keep the build directory separate.  This
    procedure is also called a
    <I
CLASS="FIRSTTERM"
>VPATH</I
>
    build.  Here's how:
</P><PRE
CLASS="SCREEN"
><KBD
CLASS="USERINPUT"
>mkdir build_dir</KBD
>
<KBD
CLASS="USERINPUT"
>cd build_dir</KBD
>
<KBD
CLASS="USERINPUT"
>/path/to/source/tree/configure [options go here]</KBD
>
<KBD
CLASS="USERINPUT"
>gmake</KBD
></PRE
><P>
   </P
><P
>    The default configuration will build the server and utilities, as
    well as all client applications and interfaces that require only a
    C compiler. All files will be installed under
    <TT
CLASS="FILENAME"
>/usr/local/pgsql</TT
> by default.
   </P
><P
>    You can customize the build and installation process by supplying one
    or more of the following command line options to
    <TT
CLASS="FILENAME"
>configure</TT
>:

     <P
></P
></P><DIV
CLASS="VARIABLELIST"
><DL
><DT
><TT
CLASS="OPTION"
>--prefix=<TT
CLASS="REPLACEABLE"
><I
>PREFIX</I
></TT
></TT
></DT
><DD
><P
>         Install all files under the directory <TT
CLASS="REPLACEABLE"
><I
>PREFIX</I
></TT
>
         instead of <TT
CLASS="FILENAME"
>/usr/local/pgsql</TT
>. The actual
         files will be installed into various subdirectories; no files
         will ever be installed directly into the
         <TT
CLASS="REPLACEABLE"
><I
>PREFIX</I
></TT
> directory.
        </P
><P
>         If you have special needs, you can also customize the
         individual subdirectories with the following options. However,
         if you leave these with their defaults, the installation will be
         relocatable, meaning you can move the directory after
         installation. (The <TT
CLASS="LITERAL"
>man</TT
> and <TT
CLASS="LITERAL"
>doc</TT
>
         locations are not affected by this.)
        </P
><P
>         For relocatable installs, you might want to use
         <TT
CLASS="FILENAME"
>configure</TT
>'s <TT
CLASS="LITERAL"
>--disable-rpath</TT
>
         option.  Also, you will need to tell the operating system how
         to find the shared libraries.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--exec-prefix=<TT
CLASS="REPLACEABLE"
><I
>EXEC-PREFIX</I
></TT
></TT
></DT
><DD
><P
>         You can install architecture-dependent files under a
         different prefix, <TT
CLASS="REPLACEABLE"
><I
>EXEC-PREFIX</I
></TT
>, than what
         <TT
CLASS="REPLACEABLE"
><I
>PREFIX</I
></TT
> was set to. This can be useful to
         share architecture-independent files between hosts. If you
         omit this, then <TT
CLASS="REPLACEABLE"
><I
>EXEC-PREFIX</I
></TT
> is set equal to
         <TT
CLASS="REPLACEABLE"
><I
>PREFIX</I
></TT
> and both architecture-dependent and
         independent files will be installed under the same tree,
         which is probably what you want.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--bindir=<TT
CLASS="REPLACEABLE"
><I
>DIRECTORY</I
></TT
></TT
></DT
><DD
><P
>         Specifies the directory for executable programs. The default
         is <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
><I
>EXEC-PREFIX</I
></TT
>/bin</TT
>, which
         normally means <TT
CLASS="FILENAME"
>/usr/local/pgsql/bin</TT
>.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--sysconfdir=<TT
CLASS="REPLACEABLE"
><I
>DIRECTORY</I
></TT
></TT
></DT
><DD
><P
>         Sets the directory for various configuration files,
         <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
><I
>PREFIX</I
></TT
>/etc</TT
> by default.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--libdir=<TT
CLASS="REPLACEABLE"
><I
>DIRECTORY</I
></TT
></TT
></DT
><DD
><P
>         Sets the location to install libraries and dynamically loadable
         modules. The default is
         <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
><I
>EXEC-PREFIX</I
></TT
>/lib</TT
>.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--includedir=<TT
CLASS="REPLACEABLE"
><I
>DIRECTORY</I
></TT
></TT
></DT
><DD
><P
>         Sets the directory for installing C and C++ header files. The
         default is <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
><I
>PREFIX</I
></TT
>/include</TT
>.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--datarootdir=<TT
CLASS="REPLACEABLE"
><I
>DIRECTORY</I
></TT
></TT
></DT
><DD
><P
>         Sets the root directory for various types of read-only data
         files.  This only sets the default for some of the following
         options.  The default is
         <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
><I
>PREFIX</I
></TT
>/share</TT
>.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--datadir=<TT
CLASS="REPLACEABLE"
><I
>DIRECTORY</I
></TT
></TT
></DT
><DD
><P
>         Sets the directory for read-only data files used by the
         installed programs. The default is
         <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
><I
>DATAROOTDIR</I
></TT
></TT
>. Note that this has
         nothing to do with where your database files will be placed.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--localedir=<TT
CLASS="REPLACEABLE"
><I
>DIRECTORY</I
></TT
></TT
></DT
><DD
><P
>         Sets the directory for installing locale data, in particular
         message translation catalog files.  The default is
         <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
><I
>DATAROOTDIR</I
></TT
>/locale</TT
>.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--mandir=<TT
CLASS="REPLACEABLE"
><I
>DIRECTORY</I
></TT
></TT
></DT
><DD
><P
>         The man pages that come with <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> will be installed under
         this directory, in their respective
         <TT
CLASS="FILENAME"
>man<TT
CLASS="REPLACEABLE"
><I
>x</I
></TT
></TT
> subdirectories.
         The default is <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
><I
>DATAROOTDIR</I
></TT
>/man</TT
>.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--docdir=<TT
CLASS="REPLACEABLE"
><I
>DIRECTORY</I
></TT
></TT
></DT
><DD
><P
>         Sets the root directory for installing documentation files,
         except <SPAN
CLASS="QUOTE"
>"man"</SPAN
> pages.  This only sets the default for
         the following options.  The default value for this option is
         <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
><I
>DATAROOTDIR</I
></TT
>/doc/postgresql</TT
>.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--htmldir=<TT
CLASS="REPLACEABLE"
><I
>DIRECTORY</I
></TT
></TT
></DT
><DD
><P
>         The HTML-formatted documentation for
         <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> will be installed under
         this directory.  The default is
         <TT
CLASS="FILENAME"
><TT
CLASS="REPLACEABLE"
><I
>DATAROOTDIR</I
></TT
></TT
>.
        </P
></DD
></DL
></DIV
><P>

     </P><DIV
CLASS="NOTE"
><BLOCKQUOTE
CLASS="NOTE"
><P
><B
>Note: </B
>       Care has been taken to make it possible to install
       <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> into shared installation locations
       (such as <TT
CLASS="FILENAME"
>/usr/local/include</TT
>) without
       interfering with the namespace of the rest of the system. First,
       the string <SPAN
CLASS="QUOTE"
>"<TT
CLASS="LITERAL"
>/postgresql</TT
>"</SPAN
> is
       automatically appended to <TT
CLASS="VARNAME"
>datadir</TT
>,
       <TT
CLASS="VARNAME"
>sysconfdir</TT
>, and <TT
CLASS="VARNAME"
>docdir</TT
>,
       unless the fully expanded directory name already contains the
       string <SPAN
CLASS="QUOTE"
>"<TT
CLASS="LITERAL"
>postgres</TT
>"</SPAN
> or
       <SPAN
CLASS="QUOTE"
>"<TT
CLASS="LITERAL"
>pgsql</TT
>"</SPAN
>. For example, if you choose
       <TT
CLASS="FILENAME"
>/usr/local</TT
> as prefix, the documentation will
       be installed in <TT
CLASS="FILENAME"
>/usr/local/doc/postgresql</TT
>,
       but if the prefix is <TT
CLASS="FILENAME"
>/opt/postgres</TT
>, then it
       will be in <TT
CLASS="FILENAME"
>/opt/postgres/doc</TT
>. The public C
       header files of the client interfaces are installed into
       <TT
CLASS="VARNAME"
>includedir</TT
> and are namespace-clean. The
       internal header files and the server header files are installed
       into private directories under <TT
CLASS="VARNAME"
>includedir</TT
>. See
       the documentation of each interface for information about how to
       access its header files. Finally, a private subdirectory will
       also be created, if appropriate, under <TT
CLASS="VARNAME"
>libdir</TT
>
       for dynamically loadable modules.
      </P
></BLOCKQUOTE
></DIV
><P>
    </P
><P
>     <P
></P
></P><DIV
CLASS="VARIABLELIST"
><DL
><DT
><TT
CLASS="OPTION"
>--with-includes=<TT
CLASS="REPLACEABLE"
><I
>DIRECTORIES</I
></TT
></TT
></DT
><DD
><P
>         <TT
CLASS="REPLACEABLE"
><I
>DIRECTORIES</I
></TT
> is a colon-separated list of
         directories that will be added to the list the compiler
         searches for header files. If you have optional packages
         (such as GNU <SPAN
CLASS="APPLICATION"
>Readline</SPAN
>) installed in a non-standard
         location,
         you have to use this option and probably also the corresponding
         <TT
CLASS="OPTION"
>--with-libraries</TT
> option.
        </P
><P
>         Example: <TT
CLASS="LITERAL"
>--with-includes=/opt/gnu/include:/usr/sup/include</TT
>.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-libraries=<TT
CLASS="REPLACEABLE"
><I
>DIRECTORIES</I
></TT
></TT
></DT
><DD
><P
>         <TT
CLASS="REPLACEABLE"
><I
>DIRECTORIES</I
></TT
> is a colon-separated list of
         directories to search for libraries. You will probably have
         to use this option (and the corresponding
         <TT
CLASS="OPTION"
>--with-includes</TT
> option) if you have packages
         installed in non-standard locations.
        </P
><P
>         Example: <TT
CLASS="LITERAL"
>--with-libraries=/opt/gnu/lib:/usr/sup/lib</TT
>.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--enable-nls[<SPAN
CLASS="OPTIONAL"
>=<TT
CLASS="REPLACEABLE"
><I
>LANGUAGES</I
></TT
></SPAN
>]</TT
></DT
><DD
><P
>         Enables Native Language Support (<ACRONYM
CLASS="ACRONYM"
>NLS</ACRONYM
>),
         that is, the ability to display a program's messages in a
         language other than English.
         <TT
CLASS="REPLACEABLE"
><I
>LANGUAGES</I
></TT
> is an optional space-separated
         list of codes of the languages that you want supported, for
         example <TT
CLASS="LITERAL"
>--enable-nls='de fr'</TT
>.  (The intersection
         between your list and the set of actually provided
         translations will be computed automatically.)  If you do not
         specify a list, then all available translations are
         installed.
        </P
><P
>         To use this option, you will need an implementation of the
         <SPAN
CLASS="APPLICATION"
>Gettext</SPAN
> API; see above.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-pgport=<TT
CLASS="REPLACEABLE"
><I
>NUMBER</I
></TT
></TT
></DT
><DD
><P
>         Set <TT
CLASS="REPLACEABLE"
><I
>NUMBER</I
></TT
> as the default port number for
         server and clients. The default is 5432. The port can always
         be changed later on, but if you specify it here then both
         server and clients will have the same default compiled in,
         which can be very convenient.  Usually the only good reason
         to select a non-default value is if you intend to run multiple
         <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> servers on the same machine.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-perl</TT
></DT
><DD
><P
>         Build the <SPAN
CLASS="APPLICATION"
>PL/Perl</SPAN
> server-side language.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-python</TT
></DT
><DD
><P
>         Build the <SPAN
CLASS="APPLICATION"
>PL/Python</SPAN
> server-side language.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-tcl</TT
></DT
><DD
><P
>         Build the <SPAN
CLASS="APPLICATION"
>PL/Tcl</SPAN
> server-side language.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-tclconfig=<TT
CLASS="REPLACEABLE"
><I
>DIRECTORY</I
></TT
></TT
></DT
><DD
><P
>         Tcl installs the file <TT
CLASS="FILENAME"
>tclConfig.sh</TT
>, which
         contains configuration information needed to build modules
         interfacing to Tcl. This file is normally found automatically
         at a well-known location, but if you want to use a different
         version of Tcl you can specify the directory in which to look
         for it.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-gssapi</TT
></DT
><DD
><P
>         Build with support for GSSAPI authentication. On many
         systems, the GSSAPI (usually a part of the Kerberos installation)
         system is not installed in a location
         that is searched by default (e.g., <TT
CLASS="FILENAME"
>/usr/include</TT
>,
         <TT
CLASS="FILENAME"
>/usr/lib</TT
>), so you must use the options
         <TT
CLASS="OPTION"
>--with-includes</TT
> and <TT
CLASS="OPTION"
>--with-libraries</TT
> in
         addition to this option.  <TT
CLASS="FILENAME"
>configure</TT
> will check
         for the required header files and libraries to make sure that
         your GSSAPI installation is sufficient before proceeding.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-krb5</TT
></DT
><DD
><P
>         Build with support for Kerberos 5 authentication. On many
         systems, the Kerberos system is not installed in a location
         that is searched by default (e.g., <TT
CLASS="FILENAME"
>/usr/include</TT
>,
         <TT
CLASS="FILENAME"
>/usr/lib</TT
>), so you must use the options
         <TT
CLASS="OPTION"
>--with-includes</TT
> and <TT
CLASS="OPTION"
>--with-libraries</TT
> in
         addition to this option.  <TT
CLASS="FILENAME"
>configure</TT
> will check
         for the required header files and libraries to make sure that
         your Kerberos installation is sufficient before proceeding.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-krb-srvnam=<TT
CLASS="REPLACEABLE"
><I
>NAME</I
></TT
></TT
></DT
><DD
><P
>         The default name of the Kerberos service principal (also used
         by GSSAPI).
         <TT
CLASS="LITERAL"
>postgres</TT
> is the default. There's usually no
         reason to change this unless you have a Windows environment,
         in which case it must be set to upper case
         <TT
CLASS="LITERAL"
>POSTGRES</TT
>.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-openssl</TT
></DT
><DD
><P
>         Build with support for <ACRONYM
CLASS="ACRONYM"
>SSL</ACRONYM
> (encrypted)
         connections. This requires the <SPAN
CLASS="PRODUCTNAME"
>OpenSSL</SPAN
>
         package to be installed.  <TT
CLASS="FILENAME"
>configure</TT
> will check
         for the required header files and libraries to make sure that
         your <SPAN
CLASS="PRODUCTNAME"
>OpenSSL</SPAN
> installation is sufficient
         before proceeding.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-pam</TT
></DT
><DD
><P
>         Build with <ACRONYM
CLASS="ACRONYM"
>PAM</ACRONYM
>
         (Pluggable Authentication Modules) support.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-ldap</TT
></DT
><DD
><P
>         Build with <ACRONYM
CLASS="ACRONYM"
>LDAP</ACRONYM
>
         support for authentication and connection parameter lookup (see
         <A
HREF="libpq-ldap.html"
>Section 31.17</A
> and
         <A
HREF="auth-methods.html#AUTH-LDAP"
>Section 19.3.8</A
> for more information). On Unix,
         this requires the <SPAN
CLASS="PRODUCTNAME"
>OpenLDAP</SPAN
> package to be
         installed. On Windows, the default <SPAN
CLASS="PRODUCTNAME"
>WinLDAP</SPAN
>
         library is used.  <TT
CLASS="FILENAME"
>configure</TT
> will check for the required
         header files and libraries to make sure that your
         <SPAN
CLASS="PRODUCTNAME"
>OpenLDAP</SPAN
> installation is sufficient before
         proceeding.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--without-readline</TT
></DT
><DD
><P
>         Prevents use of the <SPAN
CLASS="APPLICATION"
>Readline</SPAN
> library
         (and <SPAN
CLASS="APPLICATION"
>libedit</SPAN
> as well).  This option disables
         command-line editing and history in
         <SPAN
CLASS="APPLICATION"
>psql</SPAN
>, so it is not recommended.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-libedit-preferred</TT
></DT
><DD
><P
>         Favors the use of the BSD-licensed <SPAN
CLASS="APPLICATION"
>libedit</SPAN
> library
         rather than GPL-licensed <SPAN
CLASS="APPLICATION"
>Readline</SPAN
>.  This option
         is significant only if you have both libraries installed; the
         default in that case is to use <SPAN
CLASS="APPLICATION"
>Readline</SPAN
>.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-bonjour</TT
></DT
><DD
><P
>         Build with Bonjour support.  This requires Bonjour support
         in your operating system.  Recommended on Mac OS X.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-ossp-uuid</TT
></DT
><DD
><P
>         Build components using the <A
HREF="http://www.ossp.org/pkg/lib/uuid/"
TARGET="_top"
>OSSP UUID
         library</A
>.  Specifically, build the
         
         <A
HREF="uuid-ossp.html"
>uuid-ossp</A
> module,
         which provides functions to generate
         UUIDs.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-libxml</TT
></DT
><DD
><P
>         Build with libxml (enables SQL/XML support).  Libxml version 2.6.23 or
         later is required for this feature.
        </P
><P
>         Libxml installs a program <TT
CLASS="COMMAND"
>xml2-config</TT
> that
         can be used to detect the required compiler and linker
         options.  PostgreSQL will use it automatically if found.  To
         specify a libxml installation at an unusual location, you can
         either set the environment variable
         <TT
CLASS="ENVAR"
>XML2_CONFIG</TT
> to point to the
         <TT
CLASS="COMMAND"
>xml2-config</TT
> program belonging to the
         installation, or use the options
         <TT
CLASS="OPTION"
>--with-includes</TT
> and
         <TT
CLASS="OPTION"
>--with-libraries</TT
>.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-libxslt</TT
></DT
><DD
><P
>         Use libxslt when building the
         
         <A
HREF="xml2.html"
>xml2</A
>
         module.  <SPAN
CLASS="APPLICATION"
>xml2</SPAN
> relies on this library
         to perform XSL transformations of XML.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--disable-integer-datetimes</TT
></DT
><DD
><P
>         Disable support for 64-bit integer storage for timestamps and
         intervals, and store datetime values as floating-point
         numbers instead. Floating-point datetime storage was the
         default in <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> releases
         prior to 8.4, but it is now deprecated, because it does not
         support microsecond precision for the full range of
         <TT
CLASS="TYPE"
>timestamp</TT
> values. However, integer-based
         datetime storage requires a 64-bit integer type. Therefore,
         this option can be used when no such type is available, or
         for compatibility with applications written for prior
         versions of <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
>. See
         
         <A
HREF="datatype-datetime.html"
>Section 8.5</A
>
         for more information.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--disable-float4-byval</TT
></DT
><DD
><P
>         Disable passing float4 values <SPAN
CLASS="QUOTE"
>"by value"</SPAN
>, causing them
         to be passed <SPAN
CLASS="QUOTE"
>"by reference"</SPAN
> instead.  This option costs
         performance, but may be needed for compatibility with old
         user-defined functions that are written in C and use the
         <SPAN
CLASS="QUOTE"
>"version 0"</SPAN
> calling convention.  A better long-term
         solution is to update any such functions to use the
         <SPAN
CLASS="QUOTE"
>"version 1"</SPAN
> calling convention.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--disable-float8-byval</TT
></DT
><DD
><P
>         Disable passing float8 values <SPAN
CLASS="QUOTE"
>"by value"</SPAN
>, causing them
         to be passed <SPAN
CLASS="QUOTE"
>"by reference"</SPAN
> instead.  This option costs
         performance, but may be needed for compatibility with old
         user-defined functions that are written in C and use the
         <SPAN
CLASS="QUOTE"
>"version 0"</SPAN
> calling convention.  A better long-term
         solution is to update any such functions to use the
         <SPAN
CLASS="QUOTE"
>"version 1"</SPAN
> calling convention.
         Note that this option affects not only float8, but also int8 and some
         related types such as timestamp.
         On 32-bit platforms, <TT
CLASS="OPTION"
>--disable-float8-byval</TT
> is the default
         and it is not allowed to select <TT
CLASS="OPTION"
>--enable-float8-byval</TT
>.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-segsize=<TT
CLASS="REPLACEABLE"
><I
>SEGSIZE</I
></TT
></TT
></DT
><DD
><P
>         Set the <I
CLASS="FIRSTTERM"
>segment size</I
>, in gigabytes.  Large tables are
         divided into multiple operating-system files, each of size equal
         to the segment size.  This avoids problems with file size limits
         that exist on many platforms.  The default segment size, 1 gigabyte,
         is safe on all supported platforms.  If your operating system has
         <SPAN
CLASS="QUOTE"
>"largefile"</SPAN
> support (which most do, nowadays), you can use
         a larger segment size.  This can be helpful to reduce the number of
         file descriptors consumed when working with very large tables.
         But be careful not to select a value larger than is supported
         by your platform and the file systems you intend to use.  Other
         tools you might wish to use, such as <SPAN
CLASS="APPLICATION"
>tar</SPAN
>, could
         also set limits on the usable file size.
         It is recommended, though not absolutely required, that this value
         be a power of 2.
         Note that changing this value requires an initdb.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-blocksize=<TT
CLASS="REPLACEABLE"
><I
>BLOCKSIZE</I
></TT
></TT
></DT
><DD
><P
>         Set the <I
CLASS="FIRSTTERM"
>block size</I
>, in kilobytes.  This is the unit
         of storage and I/O within tables.  The default, 8 kilobytes,
         is suitable for most situations; but other values may be useful
         in special cases.
         The value must be a power of 2 between 1 and 32 (kilobytes).
         Note that changing this value requires an initdb.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-wal-segsize=<TT
CLASS="REPLACEABLE"
><I
>SEGSIZE</I
></TT
></TT
></DT
><DD
><P
>         Set the <I
CLASS="FIRSTTERM"
>WAL segment size</I
>, in megabytes.  This is
         the size of each individual file in the WAL log.  It may be useful
         to adjust this size to control the granularity of WAL log shipping.
         The default size is 16 megabytes.
         The value must be a power of 2 between 1 and 64 (megabytes).
         Note that changing this value requires an initdb.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-wal-blocksize=<TT
CLASS="REPLACEABLE"
><I
>BLOCKSIZE</I
></TT
></TT
></DT
><DD
><P
>         Set the <I
CLASS="FIRSTTERM"
>WAL block size</I
>, in kilobytes.  This is the unit
         of storage and I/O within the WAL log.  The default, 8 kilobytes,
         is suitable for most situations; but other values may be useful
         in special cases.
         The value must be a power of 2 between 1 and 64 (kilobytes).
         Note that changing this value requires an initdb.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--disable-spinlocks</TT
></DT
><DD
><P
>         Allow the build to succeed even if <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
>
         has no CPU spinlock support for the platform.  The lack of
         spinlock support will result in poor performance; therefore,
         this option should only be used if the build aborts and
         informs you that the platform lacks spinlock support. If this
         option is required to build <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> on
         your platform, please report the problem to the
         <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> developers.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--disable-thread-safety</TT
></DT
><DD
><P
>         Disable the thread-safety of client libraries.  This prevents
         concurrent threads in <SPAN
CLASS="APPLICATION"
>libpq</SPAN
> and
         <SPAN
CLASS="APPLICATION"
>ECPG</SPAN
> programs from safely controlling
         their private connection handles.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--with-system-tzdata=<TT
CLASS="REPLACEABLE"
><I
>DIRECTORY</I
></TT
></TT
></DT
><DD
><P
>         <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> includes its own time zone database,
         which it requires for date and time operations.  This time zone
         database is in fact compatible with the IANA time zone
         database provided by many operating systems such as FreeBSD,
         Linux, and Solaris, so it would be redundant to install it again.
         When this option is used, the system-supplied time zone database
         in <TT
CLASS="REPLACEABLE"
><I
>DIRECTORY</I
></TT
> is used instead of the one
         included in the PostgreSQL source distribution.
         <TT
CLASS="REPLACEABLE"
><I
>DIRECTORY</I
></TT
> must be specified as an
         absolute path.  <TT
CLASS="FILENAME"
>/usr/share/zoneinfo</TT
> is a
         likely directory on some operating systems.  Note that the
         installation routine will not detect mismatching or erroneous time
         zone data.  If you use this option, you are advised to run the
         regression tests to verify that the time zone data you have
         pointed to works correctly with <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
>.
        </P
><P
>         This option is mainly aimed at binary package distributors
         who know their target operating system well.  The main
         advantage of using this option is that the PostgreSQL package
         won't need to be upgraded whenever any of the many local
         daylight-saving time rules change.  Another advantage is that
         PostgreSQL can be cross-compiled more straightforwardly if the
         time zone database files do not need to be built during the
         installation.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--without-zlib</TT
></DT
><DD
><P
>         
         Prevents use of the <SPAN
CLASS="APPLICATION"
>Zlib</SPAN
> library.  This disables
         support for compressed archives in <SPAN
CLASS="APPLICATION"
>pg_dump</SPAN
>
         and <SPAN
CLASS="APPLICATION"
>pg_restore</SPAN
>.
         This option is only intended for those rare systems where this
         library is not available.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--enable-debug</TT
></DT
><DD
><P
>         Compiles all programs and libraries with debugging symbols.
         This means that you can run the programs in a debugger
         to analyze problems. This enlarges the size of the installed
         executables considerably, and on non-GCC compilers it usually
         also disables compiler optimization, causing slowdowns. However,
         having the symbols available is extremely helpful for dealing
         with any problems that might arise.  Currently, this option is
         recommended for production installations only if you use GCC.
         But you should always have it on if you are doing development work
         or running a beta version.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--enable-coverage</TT
></DT
><DD
><P
>         If using GCC, all programs and libraries are compiled with
         code coverage testing instrumentation.  When run, they
         generate files in the build directory with code coverage
         metrics.
         See <A
HREF="regress-coverage.html"
>Section 30.4</A
>
         for more information. This option is for use only with GCC
         and when doing development work.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--enable-profiling</TT
></DT
><DD
><P
>         If using GCC, all programs and libraries are compiled so they
         can be profiled.  On backend exit, a subdirectory will be created
         that contains the <TT
CLASS="FILENAME"
>gmon.out</TT
> file for use in profiling.
         This option is for use only with GCC and when doing development work.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--enable-cassert</TT
></DT
><DD
><P
>         Enables <I
CLASS="FIRSTTERM"
>assertion</I
> checks in the server, which test for
         many <SPAN
CLASS="QUOTE"
>"cannot happen"</SPAN
> conditions.  This is invaluable for
         code development purposes, but the tests can slow down the
         server significantly.
         Also, having the tests turned on won't necessarily enhance the
         stability of your server!  The assertion checks are not categorized
         for severity, and so what might be a relatively harmless bug will
         still lead to server restarts if it triggers an assertion
         failure.  This option is not recommended for production use, but
         you should have it on for development work or when running a beta
         version.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--enable-depend</TT
></DT
><DD
><P
>         Enables automatic dependency tracking.  With this option, the
         makefiles are set up so that all affected object files will
         be rebuilt when any header file is changed.  This is useful
         if you are doing development work, but is just wasted overhead
         if you intend only to compile once and install.  At present,
         this option only works with GCC.
        </P
></DD
><DT
><TT
CLASS="OPTION"
>--enable-dtrace</TT
></DT
><DD
><P
>         
         Compiles <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> with support for the
         dynamic tracing tool DTrace.
         See <A
HREF="dynamic-trace.html"
>Section 27.4</A
>
         for more information.
        </P
><P
>         To point to the <TT
CLASS="COMMAND"
>dtrace</TT
> program, the
         environment variable <TT
CLASS="ENVAR"
>DTRACE</TT
> can be set.  This
         will often be necessary because <TT
CLASS="COMMAND"
>dtrace</TT
> is
         typically installed under <TT
CLASS="FILENAME"
>/usr/sbin</TT
>,
         which might not be in the path.
        </P
><P
>         Extra command-line options for the <TT
CLASS="COMMAND"
>dtrace</TT
> program
         can be specified in the environment variable
         <TT
CLASS="ENVAR"
>DTRACEFLAGS</TT
>.  On Solaris,
         to include DTrace support in a 64-bit binary, you must specify
         <TT
CLASS="LITERAL"
>DTRACEFLAGS="-64"</TT
> to configure.  For example,
         using the GCC compiler:
</P><PRE
CLASS="SCREEN"
>./configure CC='gcc -m64' --enable-dtrace DTRACEFLAGS='-64' ...</PRE
><P>
         Using Sun's compiler:
</P><PRE
CLASS="SCREEN"
>./configure CC='/opt/SUNWspro/bin/cc -xtarget=native64' --enable-dtrace DTRACEFLAGS='-64' ...</PRE
><P>
        </P
></DD
></DL
></DIV
><P>
    </P
><P
>     If you prefer a C compiler different from the one
     <TT
CLASS="FILENAME"
>configure</TT
> picks, you can set the
     environment variable <TT
CLASS="ENVAR"
>CC</TT
> to the program of your choice.
     By default, <TT
CLASS="FILENAME"
>configure</TT
> will pick
     <TT
CLASS="FILENAME"
>gcc</TT
> if available, else the platform's
     default (usually <TT
CLASS="FILENAME"
>cc</TT
>).  Similarly, you can override the
     default compiler flags if needed with the <TT
CLASS="ENVAR"
>CFLAGS</TT
> variable.
    </P
><P
>     You can specify environment variables on the
     <TT
CLASS="FILENAME"
>configure</TT
> command line, for example:
</P><PRE
CLASS="SCREEN"
><KBD
CLASS="USERINPUT"
>./configure CC=/opt/bin/gcc CFLAGS='-O2 -pipe'</KBD
></PRE
><P>
    </P
><P
>     Here is a list of the significant variables that can be set in
     this manner:

     <P
></P
></P><DIV
CLASS="VARIABLELIST"
><DL
><DT
><TT
CLASS="ENVAR"
>BISON</TT
></DT
><DD
><P
>         Bison program
        </P
></DD
><DT
><TT
CLASS="ENVAR"
>CC</TT
></DT
><DD
><P
>         C compiler
        </P
></DD
><DT
><TT
CLASS="ENVAR"
>CFLAGS</TT
></DT
><DD
><P
>         options to pass to the C compiler
        </P
></DD
><DT
><TT
CLASS="ENVAR"
>CPP</TT
></DT
><DD
><P
>         C preprocessor
        </P
></DD
><DT
><TT
CLASS="ENVAR"
>CPPFLAGS</TT
></DT
><DD
><P
>         options to pass to the C preprocessor
        </P
></DD
><DT
><TT
CLASS="ENVAR"
>DTRACE</TT
></DT
><DD
><P
>         location of the <TT
CLASS="COMMAND"
>dtrace</TT
> program
        </P
></DD
><DT
><TT
CLASS="ENVAR"
>DTRACEFLAGS</TT
></DT
><DD
><P
>         options to pass to the <TT
CLASS="COMMAND"
>dtrace</TT
> program
        </P
></DD
><DT
><TT
CLASS="ENVAR"
>FLEX</TT
></DT
><DD
><P
>         Flex program
        </P
></DD
><DT
><TT
CLASS="ENVAR"
>LDFLAGS</TT
></DT
><DD
><P
>         options to use when linking either executables or shared libraries
        </P
></DD
><DT
><TT
CLASS="ENVAR"
>LDFLAGS_EX</TT
></DT
><DD
><P
>         additional options for linking executables only
        </P
></DD
><DT
><TT
CLASS="ENVAR"
>LDFLAGS_SL</TT
></DT
><DD
><P
>         additional options for linking shared libraries only
        </P
></DD
><DT
><TT
CLASS="ENVAR"
>MSGFMT</TT
></DT
><DD
><P
>         <TT
CLASS="COMMAND"
>msgfmt</TT
> program for native language support
        </P
></DD
><DT
><TT
CLASS="ENVAR"
>PERL</TT
></DT
><DD
><P
>         Full path to the Perl interpreter.  This will be used to
         determine the dependencies for building PL/Perl.
        </P
></DD
><DT
><TT
CLASS="ENVAR"
>PYTHON</TT
></DT
><DD
><P
>         Full path to the Python interpreter.  This will be used to
         determine the dependencies for building PL/Python.  Also,
         whether Python 2 or 3 is specified here (or otherwise
         implicitly chosen) determines which variant of the PL/Python
         language becomes available.  See
         
         <A
HREF="plpython-python23.html"
>Section 43.1</A
>
         for more information.
        </P
></DD
><DT
><TT
CLASS="ENVAR"
>TCLSH</TT
></DT
><DD
><P
>         Full path to the Tcl interpreter.  This will be used to
         determine the dependencies for building PL/Tcl, and it will
         be substituted into Tcl scripts.
        </P
></DD
><DT
><TT
CLASS="ENVAR"
>XML2_CONFIG</TT
></DT
><DD
><P
>         <TT
CLASS="COMMAND"
>xml2-config</TT
> program used to locate the
         libxml installation.
        </P
></DD
></DL
></DIV
><P>
    </P
><DIV
CLASS="NOTE"
><BLOCKQUOTE
CLASS="NOTE"
><P
><B
>Note: </B
>      When developing code inside the server, it is recommended to
      use the configure options <TT
CLASS="OPTION"
>--enable-cassert</TT
> (which
      turns on many run-time error checks) and <TT
CLASS="OPTION"
>--enable-debug</TT
>
      (which improves the usefulness of debugging tools).
     </P
><P
>      If using GCC, it is best to build with an optimization level of
      at least <TT
CLASS="OPTION"
>-O1</TT
>, because using no optimization
      (<TT
CLASS="OPTION"
>-O0</TT
>) disables some important compiler warnings (such
      as the use of uninitialized variables).  However, non-zero
      optimization levels can complicate debugging because stepping
      through compiled code will usually not match up one-to-one with
      source code lines.  If you get confused while trying to debug
      optimized code, recompile the specific files of interest with
      <TT
CLASS="OPTION"
>-O0</TT
>.  An easy way to do this is by passing an option
      to <SPAN
CLASS="APPLICATION"
>make</SPAN
>: <TT
CLASS="COMMAND"
>gmake PROFILE=-O0 file.o</TT
>.
     </P
></BLOCKQUOTE
></DIV
></LI
><LI
CLASS="STEP"
><A
NAME="BUILD"
></A
><P
><B
>Build</B
></P
><P
>    To start the build, type:
</P><PRE
CLASS="SCREEN"
><KBD
CLASS="USERINPUT"
>gmake</KBD
></PRE
><P>
    (Remember to use <ACRONYM
CLASS="ACRONYM"
>GNU</ACRONYM
> <SPAN
CLASS="APPLICATION"
>make</SPAN
>.) The build
    will take a few minutes depending on your
    hardware. The last line displayed should be:
</P><PRE
CLASS="SCREEN"
>All of PostgreSQL is successfully made. Ready to install.</PRE
><P>
   </P
><P
>   If you want to build everything that can be built, including the
   documentation (HTML and man pages), and the additional modules
   (<TT
CLASS="FILENAME"
>contrib</TT
>), type instead:
</P><PRE
CLASS="SCREEN"
><KBD
CLASS="USERINPUT"
>gmake world</KBD
></PRE
><P>
   The last line displayed should be:
</P><PRE
CLASS="SCREEN"
>PostgreSQL, contrib and HTML documentation successfully made. Ready to install.</PRE
><P>
   </P
></LI
><LI
CLASS="STEP"
><P
><B
>Regression Tests</B
></P
><P
>    If you want to test the newly built server before you install it,
    you can run the regression tests at this point. The regression
    tests are a test suite to verify that <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
>
    runs on your machine in the way the developers expected it
    to. Type:
</P><PRE
CLASS="SCREEN"
><KBD
CLASS="USERINPUT"
>gmake check</KBD
></PRE
><P>
    (This won't work as root; do it as an unprivileged user.)
    
    <A
HREF="regress.html"
>Chapter 30</A
> contains
    detailed information about interpreting the test results. You can
    repeat this test at any later time by issuing the same command.
   </P
></LI
><LI
CLASS="STEP"
><A
NAME="INSTALL"
></A
><P
><B
>Installing the Files</B
></P
><DIV
CLASS="NOTE"
><BLOCKQUOTE
CLASS="NOTE"
><P
><B
>Note: </B
>     If you are upgrading an existing system be sure to read
     
     <A
HREF="upgrading.html"
>Section 17.6</A
>
     which has instructions about upgrading a
     cluster.
    </P
></BLOCKQUOTE
></DIV
><P
>    To install <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> enter:
</P><PRE
CLASS="SCREEN"
><KBD
CLASS="USERINPUT"
>gmake install</KBD
></PRE
><P>
    This will install files into the directories that were specified
    in <A
HREF="install-procedure.html#CONFIGURE"
>step 1</A
>. Make sure that you have appropriate
    permissions to write into that area. Normally you need to do this
    step as root. Alternatively, you can create the target
    directories in advance and arrange for appropriate permissions to
    be granted.
   </P
><P
>    To install the documentation (HTML and man pages), enter:
</P><PRE
CLASS="SCREEN"
><KBD
CLASS="USERINPUT"
>gmake install-docs</KBD
></PRE
><P>
   </P
><P
>    If you built the world above, type instead:
</P><PRE
CLASS="SCREEN"
><KBD
CLASS="USERINPUT"
>gmake install-world</KBD
></PRE
><P>
    This also installs the documentation.
   </P
><P
>    You can use <TT
CLASS="LITERAL"
>gmake install-strip</TT
> instead of
    <TT
CLASS="LITERAL"
>gmake install</TT
> to strip the executable files and
    libraries as they are installed.  This will save some space.  If
    you built with debugging support, stripping will effectively
    remove the debugging support, so it should only be done if
    debugging is no longer needed.  <TT
CLASS="LITERAL"
>install-strip</TT
>
    tries to do a reasonable job saving space, but it does not have
    perfect knowledge of how to strip every unneeded byte from an
    executable file, so if you want to save all the disk space you
    possibly can, you will have to do manual work.
   </P
><P
>    The standard installation provides all the header files needed for client
    application development as well as for server-side program
    development, such as custom functions or data types written in C.
    (Prior to <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> 8.0, a separate <TT
CLASS="LITERAL"
>gmake
    install-all-headers</TT
> command was needed for the latter, but this
    step has been folded into the standard install.)
   </P
><DIV
CLASS="FORMALPARA"
><P
><B
>Client-only installation: </B
>     If you want to install only the client applications and
     interface libraries, then you can use these commands:
</P><PRE
CLASS="SCREEN"
><KBD
CLASS="USERINPUT"
>gmake -C src/bin install</KBD
>
<KBD
CLASS="USERINPUT"
>gmake -C src/include install</KBD
>
<KBD
CLASS="USERINPUT"
>gmake -C src/interfaces install</KBD
>
<KBD
CLASS="USERINPUT"
>gmake -C doc install</KBD
></PRE
><P>
    <TT
CLASS="FILENAME"
>src/bin</TT
> has a few binaries for server-only use,
    but they are small.
    </P
></DIV
></LI
></OL
></DIV
><DIV
CLASS="FORMALPARA"
><P
><B
>Uninstallation: </B
>    To undo the installation use the command <TT
CLASS="COMMAND"
>gmake
    uninstall</TT
>. However, this will not remove any created directories.
   </P
></DIV
><DIV
CLASS="FORMALPARA"
><P
><B
>Cleaning: </B
>    After the installation you can free disk space by removing the built
    files from the source tree with the command <TT
CLASS="COMMAND"
>gmake
    clean</TT
>. This will preserve the files made by the <TT
CLASS="COMMAND"
>configure</TT
>
    program, so that you can rebuild everything with <TT
CLASS="COMMAND"
>gmake</TT
>
    later on. To reset the source tree to the state in which it was
    distributed, use <TT
CLASS="COMMAND"
>gmake distclean</TT
>. If you are going to
    build for several platforms within the same source tree you must do
    this and re-configure for each platform.  (Alternatively, use
    a separate build tree for each platform, so that the source tree
    remains unmodified.)
   </P
></DIV
><P
>   If you perform a build and then discover that your <TT
CLASS="COMMAND"
>configure</TT
>
   options were wrong, or if you change anything that <TT
CLASS="COMMAND"
>configure</TT
>
   investigates (for example, software upgrades), then it's a good
   idea to do <TT
CLASS="COMMAND"
>gmake distclean</TT
> before reconfiguring and
   rebuilding.  Without this, your changes in configuration choices
   might not propagate everywhere they need to.
  </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="install-getsource.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="install-post.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Getting The Source</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="installation.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Post-Installation Setup</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>