Commit Graph

182 Commits

Author SHA1 Message Date
Peter Eisentraut c7a794998a Separate CFLAGS_SL and CXXFLAGS_SL, to allow building with C and C++
compilers from different providers.  (Especially important since the
C++ compiler that goes with your favourite C compiler might not work.)
2000-11-04 16:35:55 +00:00
Peter Eisentraut b99ee7f37d This is the minimal version of the Darwin support patch from
Bruce Hartzler <bruceh@mail.utexas.edu>.  It contains shared library
support, regression test map, and the usual template files.  The dynamic
loader is missing, the spin lock code apparently doesn't assemble due to
syntax problems, and semaphores are to be hoped for from Apple.
2000-10-31 19:55:20 +00:00
Peter Eisentraut 6707ede813 Make use of system-specific linker option to embed shared library search
path into executables and shared libraries (-rpath or -R for most).  Can be
disabled with --disable-rpath, since some binary packaging standards do not
like this option.
2000-10-27 23:59:39 +00:00
Peter Eisentraut 26d008c62f Use compiler driver, not linker, to link shared libraries on Unixware. 2000-10-27 20:09:48 +00:00
Peter Eisentraut 53f300d49e Rearrange handling of -L linker options so that they are always before all
the -l options.  (This was not the case when using the  OpenSSL or Kerberos
options.)  Also make sure that shared library links get to see all the -L
options.  Get Kerberos 5 support to compile on Redhat 7.0.  Add OpenSSL and
-lsocket (if used/found) to libpq link.
2000-10-25 16:13:52 +00:00
Peter Eisentraut 7b021ce17c Polish shared library build to reduce number of special hacks. In
particular, allow linking with arbitrary commands rather than only $(AR) or
$(LD), and treat C++ without hacks.

Add option to disable shared libraries.  This takes the place of the
BSD_SHLIB variable.  The regression test driver ignores the plpgsql test
if there are no shared libraries available.
2000-10-23 21:44:12 +00:00
Peter Eisentraut 805e431a38 Add support for VPATH builds, that is, building somewhere else than in the
source directory.  This involves mostly makefiles using $(srcdir) when they
might have used ".".  (Regression tests don't work with this, yet.)

Sort out usage of CPPFLAGS, CFLAGS (and CXXFLAGS).  Add "override" keyword
in most places, to preserve necessary flags even when the user overrode the
flags.
2000-10-20 21:04:27 +00:00
Peter Eisentraut 4d76a801c6 Unify solaris_i386 and solaris_sparc templates. They were almost identical
anyway, the rest being due to them not being kept in sync.  Add configure
test for lorder and use it (on Solaris) when found.
2000-10-10 21:22:29 +00:00
Bruce Momjian 7ea8403c8a The beos port in the source tree doesn't even compile. and even
after that dynamic loading isn't working and shared memory handling is
broken.

        Attached with this message, there is a Zip file which contain :

        * beos.diff = patch file generated with difforig
        * beos = folder with beos support files which need to be moved in /
src/backend/port
        * expected = foler with three file for message and precision
difference in regression test
        * regression.diff = rule problem (need to kill the backend manualy)
        * dynloader = dynloader files (they are also in the pacth files,
but there is so much modification that I have join full files)

        Everything works except a problem in 'rules' Is there some problems
with rules in the current tree ? It used to works with last week tree.

Cyril VELTER
2000-10-07 14:39:21 +00:00
Peter Eisentraut 335248c9b7 Support for DESTDIR make variable. This is used as in `make install
DESTDIR=/else/where' and prepends the value of DESTDIR to the full
installation paths (e.g., /else/where/usr/local/pgsql/bin). This allows
users to install the package into a location different from the one that
was configured and hard-coded into various scripts, e.g., for creating
binary packages.

DESTDIR is in many cases preferrable over `make install
prefix=/else/where' because

a) `prefix' affects the path that is hard-coded into the files, which can
lead to a `make install prefix=xxx' (as done by the regression test
driver) corrupting the files in the source tree with wrong paths.

b) it doesn't work at all if a directory was overridden to not depend on
`prefix', e.g., --sysconfdir=/etc.

(Updating the regression test driver to use DESTDIR is a separate
undertaking.)

See also autoconf@gnu.org, From: Akim Demaille <akim@epita.fr>, Date: 08
Sep 2000 12:48:59 +0200, Message-ID:
<mv4em2vb1lw.fsf@nostromo.lrde.epita.fr>, Subject: Re: HTML format
documentation.
2000-09-17 13:02:52 +00:00
Bruce Momjian 16e948781c |> The Makefile.shlib changes will have to be discussed with other Linux
|> developers so we are sure it will work on all platforms.

The problem with the current settings is that the linker is called
directly.  This is wrong, it should always be called through the
compiler
driver (the only exception is `ld -r').  This will make sure that the
necessary libraries like libgcc are linked in.

But there is still a different problem with the setting of LDFLAGS_ODBC.
The psqlodbc module defines the functions _init and _fini which are
reserved for the shared library initialisation.  These should be changed
to constructor functions.  Then LDFLAGS_ODBC can be changed to be just
`-lm'.  Btw, why does it use -Bsymbolic?

Andreas Schwab
2000-07-07 01:23:44 +00:00
Peter Eisentraut 44f64dd3ea Makefile cleanup for interface tree. Now essentially with all the
standard targets and behaviour. Replaced Makefile.in's with
Makefile's and declared the respective variables in Makefile.global.

maintainer-clean target now available at top level, although it does
not work in the backend tree yet.

Cleanup pass over Makefile.shlib, renamed some targets and variables.
The shared library symlink tests are now done by make, not the shell.

ecpg: Remove one warning in sloppy flex output.

PL/Perl and Perl interface: the MakeMaker documentation is confusing,
the realclean target *does* "delete derived files", but it also
uninstalls them. Don't use that.

The submake targets in the various bin directories that update libpq
should `make all', not `make libpq.a'. That is a) unportable, and
b) doesn't build the shared library.
2000-06-28 18:30:16 +00:00
Bruce Momjian a47e20b049 Several compilation and run-time problems occur when building on SGI
IRIX systems using the native compilers.  A summary is:
- Various files use "//" as a comment delimiter in c files.
- Problems caused by assuming "char" is signed.
  cash.in: building -signed the rules regression test fails as described
    in FAQ_QNX4.  If CHAR_MAX is "255U" then ((signed char)CHAR_MAX) is -1.
  postmaster.c: random number regression test failed without this change.
- Some generic build issues and warning message cleanup.

David Kaelbling
2000-05-16 20:48:52 +00:00
Bruce Momjian de62329acd Fix for bsdi 4.1 shared libraries. 2000-03-09 17:07:32 +00:00
Bruce Momjian f43ec05d05 I've made a diff against the 7.0beta1 tree that accomplishes several things:
1) adds NetBSD shared lib support on both ELF and a.out platforms

        2) replaces "-L$(LIBPQDIR) -lpq" with "$(LIBPQ)" defined in
           Makefile.global.  This makes it much easier to build stuff in
           the source tree after you've already installed the libraries.

        3) adds TEMPLATEDIR in Makefile.global that indicates where the
           database templates are stored.  This separates the template files
           from real libraries that are installed in $(LIBDIR).
        4) changes include order of <readline/readline.h> and <readline.h>.
           The latest GNU readline installs its headers under a readline
           subdirectory.

In addition to applying the patch below the following files need to be copied:

        backend/port/dynloader:
                bsd.h -> netbsd.h
                bsd.c -> netbsd.c
        include/port:
                bsd.h -> netbsd.h
        makefiles:
                Makefile.bsd -> Makefile.netbsd

It would be great to see this incorporated into the source tree before
the 7.0 release is cut.

        Thanks!

     -- Johnny C. Lam <lamj@stat.cmu.edu>
2000-03-08 01:58:46 +00:00
Bruce Momjian 3ffd3d82db Make LD -r as macros that can be changed for QNX. 1999-12-09 19:15:45 +00:00
Bruce Momjian c3ac9f07b7 Hi,
I have changed a bit the makefiles for the win32 port - the *.def files
(created when building shared libraries) are now clean from
Makefile.shlib.

I have also removed "-g" from CFLAGS in the "cygwin32" template - it can
be
enabled when running configure.

                        Dan
1999-10-13 11:38:42 +00:00
Bruce Momjian 283da86feb Irix fix from Mark Dalphin 1999-09-27 20:54:56 +00:00
Tom Lane 8753b23c8c Fix 'SO__MINOR_VERSION' typo for irix5; add AIX shlib support
from Andreas Z.; minor cosmetic cleanups.
1999-07-16 22:56:01 +00:00
Tom Lane 390e8354ce Add SHLIB_LINK setting for solaris_i386 and solaris_sparc ports,
per bug report from Daren Sefcik <daren@partnersdata.com>.
1999-07-15 02:03:00 +00:00
Bruce Momjian a6c688d9cd Irix update from Mark Dalphin 1999-07-08 00:15:03 +00:00
Tom Lane 7bf29f6b78 Generate a full set of version-numbered symlinks when building
a shared library, not just when installing it.
1999-06-30 23:54:18 +00:00
Bruce Momjian 8223f70e52 Dec alpha patches. 1999-05-19 18:04:51 +00:00
Marc G. Fournier a0b7daa129 Apply freebsd specific patches dealign with ELF system from FreeBSD's
ports collection ...
1999-05-17 04:13:29 +00:00
Bruce Momjian 52f1b2f3b6 Prevent priority inversion in locking by checking for existing locks
before going into queue behind person with higher piority.
1999-04-30 02:04:51 +00:00
Bruce Momjian aba8c12f67 We have tested the patches on three platforms:
NetBSD/macppc
LinuxPPC
FreeBSD 2.2.6-RELEASE

All of them seem happy with the regression test. Note that, however,
compiling with optimization enabled on NetBSD/macppc causes an initdb
failure (other two platforms are ok). After checking the asm code, we
are suspecting that might be a compiler(egcs) bug.

Tatsuo Ishii
1999-03-14 16:03:33 +00:00
Bruce Momjian 7a6b562fdf Apply Win32 patch from Horak Daniel. 1999-01-17 06:20:06 +00:00
Tom Lane 19740e2fff Portability fixes found needed for SunOS 4.1.x:
SunOS has tas(), but not memmove or strerror, and its sprintf() doesn't
return int.  Also, older versions of GNU Make don't like rules with
empty left-hand sides...
1998-11-30 00:30:05 +00:00
Tom Lane c7d9aca135 Fix at least a few shared-library problems on Linux.
We have not seen the end of this issue :-(.
1998-11-12 05:27:01 +00:00
Marc G. Fournier 15d61bb439 Minor FreeBSD fixes put in place
From: SHIOZAKI Takehiko <takehi-s@ascii.co.jp>

I tried snapshot(Oct30) and made some patches.
# I think that it is confused to manage both Makefile.shlib and
# makefiles/Makefile.*, don't you?

* configure
        Now FreeBSD 2.X is not supported..., so I added its entry.
        If ELF_SYSTEM is set, gmake treat it defined even though
        it is "false".  So nothing should be set to use "ifdef".
        BSD_SHLIB etc. may have same problems.

* Makefile.shlib
        As you said, FreeBSD entry is much like BSD's.
        I only added ELF_SYSTEM code.

* makefiles/Makefile.freebsd
        Ifdef/else/endif can not be indented with TABs.
1998-10-31 03:58:55 +00:00
Thomas G. Lockhart 20a034d5bd Include appropriate flags for resolved shared library LDFLAGS_ODBC
to allow ODBC library to be linked.
1998-10-28 06:49:10 +00:00
Tom Lane 6d98d3737a Centralized shared-library build knowledge in a new file,
src/Makefile.shlib.  Updated all the makefiles that try to build shlibs
to include that file instead of having duplicate (and mostly incomplete)
copies of shared-library options.  It works on HPUX, a lot better than it
did before in fact, but there's a chance I broke some other platforms.
At least now you only have to fix one place not six...
1998-10-19 00:00:51 +00:00