Skip to content
Snippets Groups Projects
configure.in 75.1 KiB
Newer Older
dnl Process this file with autoconf to produce a configure script.
dnl configure.in
dnl Developers, please strive to achieve this order:
dnl
dnl 0. Initialization and options processing
dnl 1. Programs
dnl 2. Libraries
dnl 4. Types
dnl 5. Structures
dnl 6. Compiler characteristics
dnl 7. Functions, global variables
dnl 8. System services
dnl
dnl Read the Autoconf manual for details.
dnl
m4_pattern_forbid(^PGAC_)dnl to catch undefined macros
Tom Lane's avatar
Tom Lane committed
AC_INIT([PostgreSQL], [10beta1], [pgsql-bugs@postgresql.org])
m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.69], [], [m4_fatal([Autoconf version 2.69 is required.
Untested combinations of 'autoconf' and PostgreSQL versions are not
recommended.  You can remove the check from 'configure.in' but it is then
your responsibility whether the result works or not.])])
AC_COPYRIGHT([Copyright (c) 1996-2017, PostgreSQL Global Development Group])
AC_CONFIG_SRCDIR([src/backend/access/common/heaptuple.c])
AC_PREFIX_DEFAULT(/usr/local/pgsql)
AC_SUBST(configure_args, [$ac_configure_args])
Tom Lane's avatar
Tom Lane committed
[PG_MAJORVERSION=`expr "$PACKAGE_VERSION" : '\([0-9][0-9]*\)'`]
AC_SUBST(PG_MAJORVERSION)
AC_DEFINE_UNQUOTED(PG_MAJORVERSION, "$PG_MAJORVERSION", [PostgreSQL major version as a string])
PGAC_ARG_REQ(with, extra-version, [STRING], [append STRING to version],
             [PG_VERSION="$PACKAGE_VERSION$withval"],
             [PG_VERSION="$PACKAGE_VERSION"])
AC_DEFINE_UNQUOTED(PG_VERSION, "$PG_VERSION", [PostgreSQL version as a string])

AC_CANONICAL_HOST
template=
AC_MSG_CHECKING([which template to use])

PGAC_ARG_REQ(with, template, [NAME], [override operating system template],
    list)   echo; ls "$srcdir/src/template"; exit;;
    *)      if test -f "$srcdir/src/template/$with_template" ; then
              AC_MSG_ERROR(['$withval' is not a valid template name. Use 'list' for a list.])
# --with-template not given
dragonfly*) template=netbsd ;;
 freebsd*) template=freebsd ;;
    hpux*) template=hpux ;;
 linux*|gnu*|k*bsd*-gnu)
           template=linux ;;
   mingw*) template=win32 ;;
  netbsd*) template=netbsd ;;
 openbsd*) template=openbsd ;;
*******************************************************************
PostgreSQL has apparently not been ported to your platform yet.
To try a manual configuration, look into the src/template directory
for a similar platform and use the '--with-template=' option.
Please also contact <pgsql-bugs@postgresql.org> to see about
rectifying this.  Include the above 'checking host system type...'
line.
*******************************************************************
Marc G. Fournier's avatar
 
Marc G. Fournier committed

# Initialize default assumption that we do not need separate assembly code
# for TAS (test-and-set).  This can be overridden by the template file
# when it's executed.
need_tas=no
tas_file=dummy.s
#
# Add non-standard directories to the include path
#
PGAC_ARG_REQ(with, includes, [DIRS], [look for additional header files in DIRS])
#
# Add non-standard directories to the library search path
#
PGAC_ARG_REQ(with, libraries, [DIRS], [look for additional libraries in DIRS],
PGAC_ARG_REQ(with, libs,      [DIRS], [alternative spelling of --with-libraries],
# 64-bit integer date/time storage is now the only option, but to avoid
# unnecessary breakage of build scripts, continue to accept an explicit
# "--enable-integer-datetimes" switch.
PGAC_ARG_BOOL(enable, integer-datetimes, yes, [obsolete option, no longer supported],
              [],
              [AC_MSG_ERROR([--disable-integer-datetimes is no longer supported])])
#
# NLS
#
AC_MSG_CHECKING([whether NLS is wanted])
PGAC_ARG_OPTARG(enable, nls,
                [LANGUAGES], [enable Native Language Support],
                [],
                [WANTED_LANGUAGES=$enableval],
                           [Define to 1 if you want National Language Support. (--enable-nls)])])
AC_MSG_RESULT([$enable_nls])
AC_SUBST(enable_nls)
AC_SUBST(WANTED_LANGUAGES)

#
# Default port number (--with-pgport), default 5432
#
AC_MSG_CHECKING([for default port number])
PGAC_ARG_REQ(with, pgport, [PORTNUM], [set default port number [5432]],
             [default_port=$withval],
             [default_port=5432])
AC_MSG_RESULT([$default_port])
# Need both of these because some places want an integer and some a string
AC_DEFINE_UNQUOTED(DEF_PGPORT, ${default_port},
[Define to the default TCP port number on which the server listens and
to which clients will try to connect.  This can be overridden at run-time,
but it's convenient if your clients have the right default compiled in.
(--with-pgport=PORTNUM)])
AC_DEFINE_UNQUOTED(DEF_PGPORT_STR, "${default_port}",
                   [Define to the default TCP port number as a string constant.])
# It's worth validating port; you can get very confusing errors otherwise
if test x"$default_port" = x""; then
  AC_MSG_ERROR([invalid --with-pgport specification: empty string])
elif test ! x`echo "$default_port" | sed -e 's/[[0-9]]*//'` = x""; then
  AC_MSG_ERROR([invalid --with-pgport specification: must be a number])
elif test ! x`echo "$default_port" | sed -e 's/^0.//'` = x"$default_port"; then
  AC_MSG_ERROR([invalid --with-pgport specification: must not have leading 0])
elif test "$default_port" -lt "1" -o "$default_port" -gt "65535"; then
  AC_MSG_ERROR([invalid --with-pgport specification: must be between 1 and 65535])
fi

#
# '-rpath'-like feature can be disabled
#
PGAC_ARG_BOOL(enable, rpath, yes,
              [do not embed shared library search path in executables])
#
# Spinlocks
#
PGAC_ARG_BOOL(enable, spinlocks, yes,
#
# Atomic operations
#
PGAC_ARG_BOOL(enable, atomics, yes,
              [do not use atomic operations])

#
# Random number generation
#
PGAC_ARG_BOOL(enable, strong-random, yes,
              [do not use a strong random number source])
Loading
Loading full blame...