Configuration Options
+
+
Parameters for Configuration (configure)
+
+The full set of parameters available in
configure
+can be obtained by typing
+
+$ ./configure --help
+
+
+The following parameters may be of interest to most installers:
+
+Directory and file names:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [/usr/local/pgsql]
+ --bindir=DIR user executables in DIR [EPREFIX/bin]
+ --datadir=DIR read-only architecture-independent data in DIR
+ [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data in DIR
+ [PREFIX/com]
+ --libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --includedir=DIR C header files in DIR [PREFIX/include]
+ --mandir=DIR man documentation in DIR [PREFIX/man]
+ --srcdir=DIR find the sources in DIR [configure dir or ..]
+Features and packages:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+--enable and --with options recognized:
+ --with-template=template
+ use operating system template file
+ see template directory
+ --with-includes=incdir site header files for tk/tcl, etc in DIR
+ --with-libs=incdir also search for libraries in DIR
+ --with-libraries=libdir also search for libraries in DIR
+ --enable-locale enable locale support
+ --enable-recode enable cyrillic recode support
+ --with-mb=encoding enable multi-byte support
+ --with-pgport=portnum change default startup port
+ --with-tcl use tcl
+ --with-tclconfig=tcldir tclConfig.sh and tkConfig.sh are in DIR
+ --with-perl use perl
+ --with-odbc build ODBC driver package
+ --with-odbcinst=odbcdir change default directory for odbcinst.ini
+ --enable-cassert enable assertion checks (debugging)
+ --with-CC=compiler use specific C compiler
+ --with-CXX=compiler use specific C++ compiler
+ --with-x use the X Window System
+
+
+
+
Parameters for Building (make)
+
+Many installation-related parameters can be set in the building
+stage of
Postgres installation.
+
+In most cases, these parameters should be place in a file,
+Makefile.custom, intended just for that purpose.
+The default distribution does not contain this optional file, so you
+will create it using a text editor of your choice. When upgrading installations,
+you can simply copy your old Makefile.custom to the new installation before
+doing the build.
+
+
+make [ variable=value [,...] ]
+
+
+A few of the many variables which can be specified are:
+
+
+
+
+POSTGRESDIR
+
+
+Top of the installation tree.
+
+
+
+BINDIR
+
+
+Location of applications and utilities.
+
+
+
+LIBDIR
+
+
+Location of object libraries, including shared libraries.
+
+
+
+HEADERDIR
+
+
+Location of include files.
+
+
+
+ODBCINST
+
+
+Location of installation-wide
psqlODBC
+(
ODBC) configuration file.
+
+
+
+There are other optional parameters which are not as commonly used.
+Many of those listed below are appropriate when doing
+
Postgres server code development.
+
+
+
+
+CFLAGS
+
+
+Set flags for the C compiler.
+Should be assigned with "+=" to retain relevant default parameters.
+
+
+
+YFLAGS
+
+
+Set flags for the yacc/bison parser. might be
+used to help diagnose problems building a new parser.
+Should be assigned with "+=" to retain relevant default parameters.
+
+
+
+USE_TCL
+
+
+Enable Tcl interface building.
+
+
+
+HSTYLE
+
+
+DocBook
HTML style sheets for building the
+documentation from scratch.
+Not used unless you are developing new documentation from the
+DocBook-compatible
SGML source documents in
+doc/src/sgml/.
+
+
+
+PSTYLE
+
+
+DocBook style sheets for building printed documentation from scratch.
+Not used unless you are developing new documentation from the
+DocBook-compatible
SGML source documents in
+doc/src/sgml/.
+
+
+
+Here is an example Makefile.custom for a
+PentiumPro Linux system:
+
+# Makefile.custom
+# Thomas Lockhart 1998-03-01
+
+POSTGRESDIR= /opt/postgres/current
+CFLAGS+= -m486 # -g -O0
+USE_TCL= true
+TCL_LIB= -ltcl
+X_LIBS= -L/usr/X11/lib
+TK_LIB= -ltk
+
+# documentation
+
+HSTYLE= /home/tgl/SGML/db118.d/docbook/html
+PSTYLE= /home/tgl/SGML/db118.d/docbook/print
+
+
Locale Support
the
Postgres source tree I made very minor corections to
src/backend/utils/adt/varlena.c and src/backend/main/main.c and got what I needed!
I did support only for
-LC_CTYPE and LC_COLLATE, but later LC_MONETARY was added by others. I got many
+LC_CTYPE and LC_COLLATE,
+but later LC_MONETARY was added by others. I got many
messages from people about this patch so I decided to send it to developers
and (to my surprise) it was
-incorporated into postgresql distribution.
+incorporated into
the Postgres distribution.
People often complain that locale doesn't work for them.
Didn't properly configure postgresql before compilation.
You must run configure with --enable-locale option to enable locale support.
Didn't setup environment correctly when starting postmaster.
- You must define environment variables $LC_CTYPE and $LC_COLLATE
+ You must define environment variables
+LC_CTYPE and LC_COLLATE
before running postmaster
because backend gets information about locale from environment.
I use following shell script
There is one evident drawback of using locale - it's speed!
So, use locale only if you really need it.
+
Kerberos Authentication