STRIP_STATIC_LIB
STRIP
RANLIB
-ld_R_works
with_gnu_ld
LD
LDFLAGS_SL
mingw*) template=win32 ;;
netbsd*) template=netbsd ;;
openbsd*) template=openbsd ;;
- sco*) template=sco ;;
solaris*) template=solaris ;;
- sysv5*) template=unixware ;;
esac
if test x"$template" = x"" ; then
-case $host_os in sysv5*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ld -R works" >&5
-$as_echo_n "checking whether ld -R works... " >&6; }
-if ${pgac_cv_prog_ld_R+:} false; then :
- $as_echo_n "(cached) " >&6
-else
-
- pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- pgac_cv_prog_ld_R=yes
-else
- pgac_cv_prog_ld_R=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$pgac_save_LDFLAGS
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pgac_cv_prog_ld_R" >&5
-$as_echo "$pgac_cv_prog_ld_R" >&6; }
- ld_R_works=$pgac_cv_prog_ld_R
-
-esac
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
mingw*) template=win32 ;;
netbsd*) template=netbsd ;;
openbsd*) template=openbsd ;;
- sco*) template=sco ;;
solaris*) template=solaris ;;
- sysv5*) template=unixware ;;
esac
if test x"$template" = x"" ; then
PGAC_PROG_LD
AC_SUBST(LD)
AC_SUBST(with_gnu_ld)
-case $host_os in sysv5*)
- AC_CACHE_CHECK([whether ld -R works], [pgac_cv_prog_ld_R],
- [
- pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
- [pgac_cv_prog_ld_R=yes],
- [pgac_cv_prog_ld_R=no])
- LDFLAGS=$pgac_save_LDFLAGS
- ])
- ld_R_works=$pgac_cv_prog_ld_R
- AC_SUBST(ld_R_works)
-esac
AC_PROG_RANLIB
PGAC_CHECK_STRIP
AC_CHECK_TOOL(AR, ar, ar)
## Install
##
-install: install-html
-
-ifneq ($(PORTNAME), sco)
-install: install-man
-endif
+install: install-html install-man
installdirs:
$(MKDIR_P) '$(DESTDIR)$(htmldir)'/html $(addprefix '$(DESTDIR)$(mandir)'/man, 1 3 $(sqlmansectnum))
<programlisting>
gcc -fpic -c foo.c
gcc -G -o foo.so foo.o
-</programlisting>
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>
- <systemitem class="osname">UnixWare</>
- <indexterm><primary>UnixWare</><secondary>shared library</></>
- </term>
- <listitem>
- <para>
- The compiler flag to create <acronym>PIC</acronym> is <option>-K
- PIC</option> with the SCO compiler and <option>-fpic</option>
- with <productname>GCC</productname>. To link shared libraries,
- the compiler option is <option>-G</option> with the SCO compiler
- and <option>-shared</option> with
- <productname>GCC</productname>.
-<programlisting>
-cc -K PIC -c foo.c
-cc -G -o foo.so foo.o
-</programlisting>
- or
-<programlisting>
-gcc -fpic -c foo.c
-gcc -shared -o foo.so foo.o
</programlisting>
</para>
</listitem>
<para>
In general, <productname>PostgreSQL</> can be expected to work on
these CPU architectures: x86, x86_64, IA64, PowerPC,
- PowerPC 64, S/390, S/390x, Sparc, Sparc 64, ARM, MIPS, MIPSEL, M68K,
- and PA-RISC. Code support exists for M32R and VAX, but these
+ PowerPC 64, S/390, S/390x, Sparc, Sparc 64, ARM, MIPS, MIPSEL,
+ and PA-RISC. Code support exists for M68K, M32R, and VAX, but these
architectures are not known to have been tested recently. It is often
possible to build on an unsupported CPU type by configuring with
<option>--disable-spinlocks</option>, but performance will be poor.
<para>
<productname>PostgreSQL</> can be expected to work on these operating
systems: Linux (all recent distributions), Windows (Win2000 SP4 and later),
- FreeBSD, OpenBSD, NetBSD, macOS, AIX, HP/UX, Solaris,
- and UnixWare. Other Unix-like systems may also work but are not currently
+ FreeBSD, OpenBSD, NetBSD, macOS, AIX, HP/UX, and Solaris.
+ Other Unix-like systems may also work but are not currently
being tested. In most cases, all CPU architectures supported by
a given operating system will work. Look in
- the <xref linkend="installation-platform-notes"> below to see if
+ <xref linkend="installation-platform-notes"> below to see if
there is information
specific to your operating system, particularly if using an older system.
</para>
</sect3>
</sect2>
- <sect2 id="installation-notes-sco">
- <title>SCO OpenServer and SCO UnixWare</title>
-
- <indexterm zone="installation-notes-sco">
- <primary>SCO</primary>
- <secondary>installation on</secondary>
- </indexterm>
-
- <indexterm zone="installation-notes-sco">
- <primary>UnixWare</primary>
- <secondary>installation on</secondary>
- </indexterm>
-
- <para>
- PostgreSQL can be built on SCO UnixWare 7 and SCO OpenServer 5.
- On OpenServer, you can use either the OpenServer Development Kit
- or the Universal Development Kit. However, some tweaking may be
- needed, as described below.
- </para>
-
- <sect3>
- <title>Skunkware</title>
-
- <para>
- You should locate your copy of the SCO Skunkware CD. The
- Skunkware CD is included with UnixWare 7 and current versions of
- OpenServer 5. Skunkware includes ready-to-install versions of
- many popular programs that are available on the Internet. For
- example, gzip, gunzip, GNU Make, Flex, and Bison are all
- included. For UnixWare 7.1, this CD is now labeled "Open License
- Software Supplement". If you do not have this CD, the software
- on it is available
- from <ulink url="http://www.sco.com/skunkware/"></ulink>.
- </para>
-
- <para>
- Skunkware has different versions for UnixWare and OpenServer.
- Make sure you install the correct version for your operating
- system, except as noted below.
- </para>
-
- <para>
- On UnixWare 7.1.3 and beyond, the GCC compiler is included on the
- UDK CD as is GNU Make.
- </para>
- </sect3>
-
- <sect3>
- <title>GNU Make</title>
-
- <para>
- You need to use the GNU Make program, which is on the Skunkware
- CD. By default, it installs
- as <filename>/usr/local/bin/make</filename>.
- </para>
-
- <para>
- As of UnixWare 7.1.3 and above, the GNU Make program is the
- OSTK portion of the UDK CD, and is
- in <filename>/usr/gnu/bin/gmake</filename>.
- </para>
- </sect3>
-
- <sect3>
- <title>Readline</title>
-
- <para>
- The Readline library is on the Skunkware CD. But it is not
- included on the UnixWare 7.1 Skunkware CD. If you have the
- UnixWare 7.0.0 or 7.0.1 Skunkware CDs, you can install it from
- there. Otherwise,
- try <ulink url="http://www.sco.com/skunkware/"></ulink>.
- </para>
-
- <para>
- By default, Readline installs into <filename>/usr/local/lib</> and
- <filename>/usr/local/include</>. However, the
- PostgreSQL <command>configure</command> program will not find it
- there without help. If you installed Readline, then use the
- following options to <command>configure</command>:
-<programlisting>
-./configure --with-libraries=/usr/local/lib --with-includes=/usr/local/include
-</programlisting>
- </para>
- </sect3>
-
- <sect3>
- <title>Using the UDK on OpenServer</title>
-
- <para>
- If you are using the new Universal Development Kit (UDK) compiler
- on OpenServer, you need to specify the locations of the UDK
- libraries:
-<programlisting>
-./configure --with-libraries=/udk/usr/lib --with-includes=/udk/usr/include
-</programlisting>
- Putting these together with the Readline options from above:
-<programlisting>
-./configure --with-libraries="/udk/usr/lib /usr/local/lib" --with-includes="/udk/usr/include /usr/local/include"
-</programlisting>
- </para>
- </sect3>
-
- <sect3>
- <title>Reading the PostgreSQL Man Pages</title>
-
- <para>
- By default, the PostgreSQL man pages are installed into
- <filename>/usr/local/pgsql/share/man</filename>. By default, UnixWare
- does not look there for man pages. To be able to read them you
- need to modify the
- <varname>MANPATH</varname> variable
- in <filename>/etc/default/man</filename>, for example:
-<programlisting>
-MANPATH=/usr/lib/scohelp/%L/man:/usr/dt/man:/usr/man:/usr/share/man:scohelp:/usr/local/man:/usr/local/pgsql/share/man
-</programlisting>
- </para>
-
- <para>
- On OpenServer, some extra research needs to be invested to make
- the man pages usable, because the man system is a bit different
- from other platforms. Currently, PostgreSQL will not install
- them at all.
- </para>
- </sect3>
-
- <sect3>
- <title>C99 Issues with the 7.1.1b Feature Supplement</title>
-
- <para>
- For compilers earlier than the one released with OpenUNIX 8.0.0
- (UnixWare 7.1.2), including the 7.1.1b Feature Supplement, you
- may need to specify <option>-Xb</option>
- in <varname>CFLAGS</varname> or the <varname>CC</varname>
- environment variable. The indication of this is an error in
- compiling <filename>tuplesort.c</filename> referencing inline
- functions. Apparently there was a change in the 7.1.2(8.0.0)
- compiler and beyond.
- </para>
- </sect3>
-
- <sect3>
- <title>Threading on UnixWare</title>
-
- <para>
- For threading, you<emphasis>must</emphasis> use <option>-Kpthread</option>
- on <emphasis>all</emphasis> libpq-using programs. libpq
- uses <function>pthread_*</function> calls, which are only
- available with the
- <option>-Kpthread</>/<option>-Kthread</> flag.
- </para>
- </sect3>
- </sect2>
-
<sect2 id="installation-notes-solaris">
<title>Solaris</title>
</varlistentry>
- <varlistentry>
- <term><systemitem class="osname">SCO OpenServer</>
- <indexterm><primary>SCO OpenServer</><secondary>IPC configuration</></>
- </term>
- <listitem>
- <para>
- In the default configuration, only 512 kB of shared memory per
- segment is allowed. To increase the setting, first change to the
- directory <filename>/etc/conf/cf.d</>. To display the current value of
- <varname>SHMMAX</>, run:
-<programlisting>
-./configure -y SHMMAX
-</programlisting>
- To set a new value for <varname>SHMMAX</>, run:
-<programlisting>
-./configure SHMMAX=<replaceable>value</>
-</programlisting>
- where <replaceable>value</> is the new value you want to use
- (in bytes). After setting <varname>SHMMAX</>, rebuild the kernel:
-<programlisting>
-./link_unix
-</programlisting>
- and reboot.
- </para>
- </listitem>
- </varlistentry>
-
-
<varlistentry>
<term><systemitem class="osname">Solaris</> 2.6 to 2.9 (Solaris
6 to Solaris 9)
</listitem>
</varlistentry>
-
- <varlistentry>
- <term><systemitem class="osname">UnixWare</>
- <indexterm><primary>UnixWare</><secondary>IPC configuration</></>
- </term>
- <listitem>
- <para>
- On <productname>UnixWare</> 7, the maximum size for shared
- memory segments is 512 kB in the default configuration.
- To display the current value of <varname>SHMMAX</>, run:
-<programlisting>
-/etc/conf/bin/idtune -g SHMMAX
-</programlisting>
- which displays the current, default, minimum, and maximum
- values. To set a new value for <varname>SHMMAX</>,
- run:
-<programlisting>
-/etc/conf/bin/idtune SHMMAX <replaceable>value</>
-</programlisting>
- where <replaceable>value</> is the new value you want to use
- (in bytes). After setting <varname>SHMMAX</>, rebuild the
- kernel:
-<programlisting>
-/etc/conf/bin/idbuild -B
-</programlisting>
- and reboot.
- </para>
- </listitem>
- </varlistentry>
-
</variablelist>
</sect2>
UUID_EXTRA_OBJS = @UUID_EXTRA_OBJS@
LD = @LD@
with_gnu_ld = @with_gnu_ld@
-ld_R_works = @ld_R_works@
# We want -L for libpgport.a and libpgcommon.a to be first in LDFLAGS. We
# also need LDFLAGS to be a "recursively expanded" variable, else adjustments
endif
endif
-ifeq ($(PORTNAME), sco)
- ifeq ($(GCC), yes)
- LINK.shared = $(CC) -shared
- else
- LINK.shared = $(CC) -G
- endif
- LINK.shared += -Wl,-z,text
- ifdef soname
- LINK.shared += -Wl,-h,$(soname)
- endif
-endif
-
-ifeq ($(PORTNAME), unixware)
- ifeq ($(GCC), yes)
- LINK.shared = $(CC) -shared
- else
- LINK.shared = $(CC) -G
- endif
- LINK.shared += -Wl,-z,text
- ifdef soname
- LINK.shared += -Wl,-h,$(soname)
- endif
-endif
-
ifeq ($(PORTNAME), cygwin)
LINK.shared = $(CC) -shared
ifdef SO_MAJOR_VERSION
return STATUS_ERROR;
}
-#ifdef SCO_ACCEPT_BUG
-
- /*
- * UnixWare 7+ and OpenServer 5.0.4 are known to have this bug, but it
- * shouldn't hurt to catch it for all versions of those platforms.
- */
- if (port->raddr.addr.ss_family == 0)
- port->raddr.addr.ss_family = AF_UNIX;
-#endif
-
/* fill in the server (local) address */
port->laddr.salen = sizeof(port->laddr.addr);
if (getsockname(port->sock,
+++ /dev/null
-/*
- * src/backend/port/dynloader/sco.c
- *
- * Dummy file used for nothing at this point
- *
- * see sco.h
- */
+++ /dev/null
-/*-------------------------------------------------------------------------
- *
- * sco.h
- * port-specific prototypes for SCO 3.2v5.2
- *
- *
- * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/backend/port/dynloader/sco.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PORT_PROTOS_H
-#define PORT_PROTOS_H
-
-#include <dlfcn.h>
-#include "utils/dynamic_loader.h" /* pgrminclude ignore */
-
-/*
- * Dynamic Loader on SCO 3.2v5.0.2
- *
- * this dynamic loader uses the system dynamic loading interface for shared
- * libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared
- * library as the file to be dynamically loaded.
- */
-
-/*
- * In some older systems, the RTLD_NOW flag isn't defined and the mode
- * argument to dlopen must always be 1. The RTLD_GLOBAL flag is wanted
- * if available, but it doesn't exist everywhere.
- * If it doesn't exist, set it to 0 so it has no effect.
- */
-#ifndef RTLD_NOW
-#define RTLD_NOW 1
-#endif
-#ifndef RTLD_GLOBAL
-#define RTLD_GLOBAL 0
-#endif
-
-#define pg_dlopen(f) dlopen((f), RTLD_NOW | RTLD_GLOBAL)
-#define pg_dlsym dlsym
-#define pg_dlclose dlclose
-#define pg_dlerror dlerror
-
-#endif /* PORT_PROTOS_H */
+++ /dev/null
-/*
- * src/backend/port/dynloader/unixware.c
- *
- * Dummy file used for nothing at this point
- *
- * see unixware.h
- */
+++ /dev/null
-/*
- * src/backend/port/dynloader/unixware.h
- *
- *-------------------------------------------------------------------------
- *
- * unixware.h
- * port-specific prototypes for Intel x86/UNIXWARE 7
- *
- *
- * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * unixware.h,v 1.2 1995/03/17 06:40:18 andrew Exp
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PORT_PROTOS_H
-#define PORT_PROTOS_H
-
-#include <dlfcn.h>
-#include "utils/dynamic_loader.h" /* pgrminclude ignore */
-
-/*
- * Dynamic Loader on UnixWare.
- *
- * this dynamic loader uses the system dynamic loading interface for shared
- * libraries (ie. dlopen/dlsym/dlclose). The user must specify a shared
- * library as the file to be dynamically loaded.
- */
-
-/*
- * In some older systems, the RTLD_NOW flag isn't defined and the mode
- * argument to dlopen must always be 1. The RTLD_GLOBAL flag is wanted
- * if available, but it doesn't exist everywhere.
- * If it doesn't exist, set it to 0 so it has no effect.
- */
-#ifndef RTLD_NOW
-#define RTLD_NOW 1
-#endif
-#ifndef RTLD_GLOBAL
-#define RTLD_GLOBAL 0
-#endif
-
-#define pg_dlopen(f) dlopen((f), RTLD_NOW | RTLD_GLOBAL)
-#define pg_dlsym dlsym
-#define pg_dlclose dlclose
-#define pg_dlerror dlerror
-
-#endif /* PORT_PROTOS_H */
+++ /dev/null
-/*
- * src/include/port/sco.h
- *
- * see src/backend/libpq/pqcomm.c */
-#define SCO_ACCEPT_BUG
-
-#define USE_UNIVEL_CC
+++ /dev/null
-/*
- * src/include/port/unixware.h
- *
- * see src/backend/libpq/pqcomm.c */
-#define SCO_ACCEPT_BUG
-
-/***************************************
- * Define this if you are compiling with
- * the native UNIXWARE C compiler.
- ***************************************/
-#define USE_UNIVEL_CC
#if !defined(HAS_TEST_AND_SET) /* We didn't trigger above, let's try here */
-#if defined(USE_UNIVEL_CC) /* Unixware compiler */
-#define HAS_TEST_AND_SET
-
-typedef unsigned char slock_t;
-
-#define TAS(lock) tas(lock)
-
-asm int
-tas(volatile slock_t *s_lock)
-{
-/* UNIVEL wants %mem in column 1, so we don't pgindent this file */
-%mem s_lock
- pushl %ebx
- movl s_lock, %ebx
- movl $255, %eax
- lock
- xchgb %al, (%ebx)
- popl %ebx
-}
-
-#endif /* defined(USE_UNIVEL_CC) */
-
-
#if defined(__hppa) || defined(__hppa__) /* HP PA-RISC, GCC and HP compilers */
/*
* HP's PA-RISC
+++ /dev/null
-AROPT = cr
-export_dynamic = -Wl,-Bexport
-
-DLSUFFIX = .so
-ifeq ($(GCC), yes)
-CFLAGS_SL = -fpic
-else
-CFLAGS_SL = -K PIC
-endif
-
-# Rule for building a shared library from a single .o file
-%.so: %.o
- $(LD) -G -Bdynamic -o $@ $<
+++ /dev/null
-AROPT = crs
-ifeq ($(with_gnu_ld), yes)
- export_dynamic = -Wl,-E
-else
- export_dynamic = -Wl,-Bexport
-endif
-
-ifeq ($(ld_R_works), yes)
-ifeq ($(with_gnu_ld), yes)
- rpath = -Wl,-rpath,'$(rpathdir)'
-else
- rpath = -Wl,-R'$(rpathdir)'
-endif
-endif
-
-# Unixware needs threads for everything that uses libpq
-CFLAGS += $(PTHREAD_CFLAGS)
-
-DLSUFFIX = .so
-ifeq ($(GCC), yes)
-CFLAGS_SL = -fpic
-else
-CFLAGS_SL = -K PIC
-endif
-ifeq ($(GCC), yes)
-SO_FLAGS = -shared
-else
-SO_FLAGS = -G
-endif
-
-# Rule for building a shared library from a single .o file
-%.so: %.o
- $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SL) $(SO_FLAGS) -o $@ $<
-
-sqlmansect = 5sql
#include "rusagestub.h"
/* This code works on:
- * sco
* solaris_i386
* solaris_sparc
* hpux 9.*
+++ /dev/null
-CC="$CC -b elf"
+++ /dev/null
-if test "$GCC" != yes; then
- # The -Kno_host is for a bug in the compiler. See -hackers
- # discussion on 7-8/Aug/2003.
- cat >conftest.c <<__EOF__
-extern char *strcpy(char *, const char *);
-
-static void f(char *p, int n){
- strcpy(p+n,"");
-}
-void g(void){
- f(0, 0);
-}
-__EOF__
-
- # Debugging and optimization are mutually exclusive
- if test "$enable_debug" != yes; then
- CFLAGS="-O"
- fi
- if $CC -c -O -Kinline conftest.c >conftest.err 2>&1; then
- CFLAGS="$CFLAGS -Kinline"
- else
- CFLAGS="$CFLAGS -Kinline,no_host"
- fi
- rm -f conftest.*
-
- PTHREAD_CFLAGS="-Kpthread"
-
-# The effect of doing threading for the backend does not work
-# because of a threading bug that appears in the regression tests:
-#
-# in make check, the plpgsql test (plpgsql.sql)
-# set statement_timeout to 1000;
-# select blockme();
-# reset statement_timeout;
-#
-# per report from Olivier PRENANT <ohp@pyrenet.fr>
-
-fi
-
-# Unixware's ldap library reportedly needs these too
-EXTRA_LDAP_LIBS="-llber -lresolv"