Commit Graph

465 Commits

Author SHA1 Message Date
Peter Eisentraut 5c788e7cf5 When in automatic dependency mode, never delete any intermediate
files automatically.  Otherwise, the following could happen: When
starting from a clean source tree, the first build would delete the
intermediate file, but also create the dependency file, which
mentions the intermediate file, thus making it non-intermediate.
The second build will then need to rebuild the now non-intermediate
missing file.  So the second build will do work even though nothing
had changed.  One place where this happens is the .c -> .o -> .so
chain for some contrib modules.
2010-08-24 18:06:12 +00:00
Tom Lane 458474d9d7 Accept slightly grotty coding in Makefile.global in order to keep the -L
flag for src/port/ in front of any -L flags placed in LDFLAGS by configure.
This undoes an L-flag-ordering change that I had thought would be safe,
but seems to be making at least one buildfarm member fail --- the only
theory for orca's failure that I can think of is that it's got an old
copy of libpgport.a in /usr/lib.  Also allow for LDFLAGS_SL to be set by
contrib makefiles before they invoke Makefile.global.
2010-07-06 22:03:05 +00:00
Tom Lane 291a957745 Split the LDFLAGS make variable into two parts: LDFLAGS is now used for
linking both executables and shared libraries, and we add on LDFLAGS_EX when
linking executables or LDFLAGS_SL when linking shared libraries.  This
provides a significantly cleaner way of dealing with link-time switches than
the former behavior.  Also, make sure that the various platform-specific
%.so: %.o rules incorporate LDFLAGS and LDFLAGS_SL; most of them missed that
before.  (I did not add these variables for the platforms that invoke $(LD)
directly, however.  It's not clear if we can do that safely, since for the
most part we assume these variables use CC command-line syntax.)

Per gripe from Aaron Swenson and subsequent investigation.
2010-07-05 18:54:38 +00:00
Peter Eisentraut 3393551d54 Fix vpath installation from distribution tarball (bug #5447) 2010-05-13 11:49:48 +00:00
Andrew Dunstan 23244d6f24 Mark "installcheck-parallel", "world", "install-world" and "installcheck-world" make targets as PHONY. Fujii Masao. 2010-03-24 13:14:02 +00:00
Peter Eisentraut dd4cd55c15 Python 3 support in PL/Python
Behaves more or less unchanged compared to Python 2, but the new language
variant is called plpython3u.  Documentation describing the naming scheme
is included.
2009-12-15 22:59:55 +00:00
Peter Eisentraut a4d03bbcda Build bzip2 tarball in dist target as well 2009-11-03 21:28:10 +00:00
Peter Eisentraut 9d182ef002 Update of install-sh, mkinstalldirs, and associated configury
Update install-sh to that from Autoconf 2.63, plus our Darwin-specific
changes (which I simplified a bit).  install-sh is now able to install
multiple files in one run, so we could simplify our makefiles sometime.

install-sh also now has a -d option to create directories, so we don't need
mkinstalldirs anymore.

Use AC_PROG_MKDIR_P in configure.in, so we can use mkdir -p when available
instead of install-sh -d.  For consistency with the rest of the world,
the corresponding make variable has been renamed from $(mkinstalldirs) to
$(MKDIR_P).
2009-08-26 22:24:44 +00:00
Peter Eisentraut ed9208829a Ship documentation without intermediate tarballs
Documentation files in HTML and man formats are now prepared for
distribution using the distprep make target, like everything else.  They
are placed in doc/src/sgml/html and manX and installed from there by
make install, if present.  The business with the tarballs in the tarball
is gone.
2009-08-09 22:47:59 +00:00
Peter Eisentraut 7798147a76 Expand test coverage support to entire tree
Test coverage support now covers the entire source tree, including
contrib, instead of just src/backend.  In a related but independent
development, the commands make coverage and make coverage-html can be run
in any directory.

This turned out to be much easier than feared.  Besides a few ad hoc fixes
to pass the make target down the tree, change all affected makefiles to
list their directories in the SUBDIRS variable, changed from variants like
DIRS and WANTED_DIRS.  MSVC build fix was attempted as well.
2009-08-07 20:50:22 +00:00
Peter Eisentraut c29d7f02c2 Use DocBook XSL stylesheets for man page building
This switches the man page building process to use the DocBook XSL stylesheet
toolchain.  The previous targets for Docbook2X are removed. configure has been
updated to look for the new tools.  The Documentation appendix contains the
new build instructions.  There are also a few isolated tweaks in the
documentation to improve places that came out strangely in the man pages.
2009-08-04 22:04:37 +00:00
Tom Lane 8d355d7bbf Fix the makefiles to fail cleanly if Perl is needed but not present. This
used to work as intended, but got broken some time ago (a quoted empty string
is not an empty string), and got broken some more by the changes to generate
ecpg's preproc.y automatically.  Given all the unprotected uses of $(PERL)
elsewhere, it seems best to make use of the $(missing) script rather than
trying to ensure each such use is protected individually.  Also fix various
bits of documentation that omitted to mention Perl as a requirement for
building from a CVS pull.  Per a complaint from Robert Haas.
2009-06-23 03:46:00 +00:00
Peter Eisentraut 6becfa280c Add an implicit rule %.c -> %.i for running the C preprocessor.
I occasionally use this for debugging, and it seems wasteful to have to
reinvent this all the time.
2009-02-19 10:32:30 +00:00
Peter Eisentraut 9c4b69ed5c Recreate ecpg_config.h with a stamp file created by config.status, same
way pg_config.h is handled.  This avoids reruns of config.status on every
build, if configure has been rerun.
2009-01-22 22:27:13 +00:00
Peter Eisentraut c63b9b1ddc When cross-compiling, allow and require an external zic program to be used
when --with-system-tzdata is not used.

initial patch by Richard Evans
2009-01-05 10:25:59 +00:00
Peter Eisentraut 46866e92bd Fix for cross-compilation between mingw32 and something else. The choice
of pwd vs. pwd -W is correctly a function of the build system, not the
host system.
2009-01-05 09:54:13 +00:00
Peter Eisentraut 218b4e8dd8 Append major version number and for libraries soname major version number
to the gettext domain name, to simplify parallel installations.

Also, rename set_text_domain() to pg_bindtextdomain(), because that is what
it does.
2008-12-11 07:34:09 +00:00
Peter Eisentraut b2971e2048 Set up ar, dlltool, dllwrap, and windres for cross-compiling if necessary.
Plus some makefile cleanup.

part of a patch from Richard Evans
2008-12-07 08:36:22 +00:00
Peter Eisentraut f900afff3e configure check for docbook2man program, used in the new XML-based man
page build target.  This covers from-source, Debian, and Fedora
installation variants.
2008-11-26 11:26:54 +00:00
Peter Eisentraut d129255077 Set SQL man pages to be section 7 by default, and only transform them to
another section if required by the platform (instead of the old way of
building them in section "l" and always transforming them to the
platform-specific section).

This speeds up the installation on common platforms, and it avoids some
funny business with the man page tools and build process.
2008-11-14 10:22:48 +00:00
Peter Eisentraut 79d306c84a Support for Sun Studio compiler on Linux
This basically takes some build system code that was previously labeled
"Solaris" and ties it to the compiler rather than the operating system.

Author: Julius Stroffek <Julius.Stroffek@Sun.COM>
2008-10-29 16:06:47 +00:00
Peter Eisentraut 0e4896d53e Fix coverage targets so that HTML view is reliably updated when test data
changes.  Add some documenting comments.
2008-10-03 15:35:17 +00:00
Peter Eisentraut 11f53b1063 Code coverage testing with gcov. Documentation is in the regression test
chapter.

Author: Michelle Caisse <Michelle.Caisse@Sun.COM>
2008-09-05 12:11:18 +00:00
Peter Eisentraut 7c31742a07 Remove all traces that suggest that a non-Bison yacc might be supported, and
change build system to use only Bison.  Simplify build rules, make file names
uniform.  Don't build the token table header file where it is not needed.
2008-08-29 13:02:33 +00:00
Peter Eisentraut b120382353 Upgrade to Autoconf 2.61:
- Change configure.in to use Autoconf 2.61 and update generated files.
- Update build system and documentation to support now directory variables
  offered by Autoconf 2.61.
- Replace usages of PGAC_CHECK_ALIGNOF by AC_CHECK_ALIGNOF, now available
  in Autoconf 2.61.
- Drop our patched version of AC_C_INLINE, as Autoconf now has the change.
2008-02-17 16:36:43 +00:00
Tom Lane 1ef648cfbc I find that an out-of-the-box installation of OSSP uuid 1.6.0 installs
itself as libuuid, not libossp-uuid which was the only case expected by
our build support.  Install a configure test to determine which name
to use (and to check that the library is present at all).
2007-11-13 00:13:19 +00:00
Tom Lane 70b9b9b788 Change initdb and CREATE DATABASE to actively reject attempts to create
databases with encodings that are incompatible with the server's LC_CTYPE
locale, when we can determine that (which we can on most modern platforms,
I believe).  C/POSIX locale is compatible with all encodings, of course,
so there is still some usefulness to CREATE DATABASE's ENCODING option,
but this will insulate us against all sorts of recurring complaints
caused by mismatched settings.

I moved initdb's existing LC_CTYPE-to-encoding mapping knowledge into
a new src/port/ file so it could be shared by CREATE DATABASE.
2007-09-28 22:25:49 +00:00
Peter Eisentraut 4e94d1f952 Add configure option --with-system-tzdata to use operating system time zone
database.
2007-08-20 08:53:12 +00:00
Tom Lane b09c248bdd Fix PGXS conventions so that extensions can be built against Postgres
installations whose pg_config program does not appear first in the PATH.
Per gripe from Eddie Stanley and subsequent discussions with Fabien Coelho
and others.
2007-06-26 22:05:04 +00:00
Peter Eisentraut 74496bc298 Contrib module uuid-ossp for generating UUID values using the OSSP UUID
library.  New configure option --with-ossp-uuid to activate.
2007-04-21 17:26:18 +00:00
Andrew Dunstan f97d4a267a Add --with-libxslt configure option 2007-04-15 12:48:24 +00:00
Andrew Dunstan 6506a584cc Enable building contrib/xml2 if configured using --with-libxml.
If this breaks things due to missing libxslt, then I'll have to
revert it, but let's see if it breaks the buildfarm.

Workarounds in case libxslt is missing include:
. don't configure with libxml, or
. don't build contrib modules from the contrib Makefile (use the individual module Makefiles instead), or
. change the xml2 Makefile
2007-04-13 18:50:01 +00:00
Peter Eisentraut c138b966d4 Replace useless uses of := by = in makefiles. 2007-02-09 15:56:00 +00:00
Tom Lane c7611f99d6 On Windows, we know the backend stack size limit because we have to
specify it explicitly in backend/Makefile.  Arrange for this value to
be known by get_stack_depth_rlimit() too.  Per suggestion from Magnus.
2006-10-08 17:15:34 +00:00
Tom Lane 6edd2b4a91 Switch over to using our own qsort() all the time, as has been proposed
repeatedly.  Now that we don't have to worry about memory leaks from
glibc's qsort, we can safely put CHECK_FOR_INTERRUPTS into the tuplesort
comparators, as was requested a couple months ago.  Also, get rid of
non-reentrancy and an extra level of function call in tuplesort.c by
providing a variant qsort_arg() API that passes an extra void * argument
through to the comparison routine.  (We might want to use that in other
places too, I didn't look yet.)
2006-10-03 22:18:23 +00:00
Tom Lane 9b5e108ee9 Fix shared library creation to work properly on AIX. Albe Laurenz 2006-09-19 15:36:08 +00:00
Tom Lane 0bdc18d5d1 Add LDAP_LIBS_FE to $(libpq) for static or AIX linking, per Albe Laurenz. 2006-09-11 13:35:08 +00:00
Tom Lane 4ee24cbb55 Install a cleaner solution to the AIX libpq linking problem, as per
an earlier discussion.  Centralize assumptions about what libpq depends
on in one place in Makefile.global.  I am unconvinced that this list
is complete, but since ecpg seems to have gotten along with just these
entries, we'll try it this way and see what happens.
2006-09-10 22:07:02 +00:00
Tom Lane 42c17a6bb0 Revise OpenLDAP configuration and linking to work on more platforms
than before.  Albe Laurenz (but editorialized heavily by me, so if it
doesn't work it's my fault).
2006-09-09 03:15:40 +00:00
Michael Meskes 9bade3ff84 Replaced double-quote-fix with a hopefully better version.
Use initializer string length as size for character strings.
Added ecpg_config.h file that is created via configure.
2006-08-23 12:01:53 +00:00
Peter Eisentraut e9b4969062 DTrace support, with a small initial set of probes
by Robert Lor
2006-07-24 16:32:45 +00:00
Peter Eisentraut 3b2da547e9 For automatic dependency tracking, replace our sed hackery with the GCC-
-built-in mechanism through the -MP flag.  Adjust the file extensions to
look more like Automake practice.  This frees up the .d suffix for use by
DTrace.
2006-07-21 22:37:37 +00:00
Peter Eisentraut 679de5e573 Make pg_config location overridable for pgxs builds. 2006-07-20 09:30:18 +00:00
Tom Lane 04ca4caa81 Remove use of lorder and tsort while building static libraries. There's
no evidence that any currently-supported platform needs this, and good
reason to think that any platform that did need it couldn't use the static
libraries anyway --- libpq, at least, has circular references.  Removing
the code shuts up tsort warnings about the circular references on some
platforms.
2006-04-19 16:32:08 +00:00
Bruce Momjian a7dc90d9f6 When performing a parallel build (make -j N) with ./configure
--enable-depend it often tries to create the .deps directory twice and
bails out when it already exists due to a race condition of if doesn't
exist, then create.  This patch prevents mkdir from returning an error.

Kris Jurka
2006-02-12 07:29:36 +00:00
Tom Lane 4fc935a5d4 Fix problems with PGXS builds against an installation tree that was
relocated after installation.  We can't trust the installation paths
inserted into Makefile.global by configure, so instead we must get the
paths from pg_config.  This requires extending pg_config to support all
the separately-configurable path names, but that was on TODO anyway.
2005-09-27 17:39:35 +00:00
Tom Lane 558730ac6b Clean up CREATE DATABASE processing to make it more robust and get rid
of special case for Windows port.  Put a PG_TRY around most of createdb()
to ensure that we remove copied subdirectories on failure, even if the
failure happens while creating the pg_database row.  (I think this explains
Oliver Siegmar's recent report.)  Having done that, there's no need for
the fragile assumption that copydir() mustn't ereport(ERROR), so simplify
its API.  Eliminate the old code that used system("cp ...") to copy
subdirectories, in favor of using copydir() on all platforms.  This not
only should allow much better error reporting, but allows us to fsync
the created files before trusting that the copy has succeeded.
2005-08-02 19:02:32 +00:00
Tom Lane 420cfd0366 Remove some long-dead support for libpgtcl with Tk. 2005-07-28 03:15:52 +00:00
Bruce Momjian 261ffd03f7 Reverse out because the lack of using pgport in timezone/ is causing
problems:

---------------------------------------------------------------------------

Support cross compilation by compiling "zic" with a native compiler.
This relies on the output of zic being platform independent, but that is
currently the case.
2005-07-06 21:04:14 +00:00
Tom Lane c19aa704c8 Fix contrib/pgcrypto to autoconfigure for OpenSSL when --with-openssl
is used in the toplevel configure.  Per Marko Kreen.
2005-07-05 23:13:57 +00:00
Peter Eisentraut 85884cb1de Support cross compilation by compiling "zic" with a native compiler. This
relies on the output of zic being platform independent, but that is
currently the case.
2005-07-03 18:54:28 +00:00
Tom Lane 4e7d6f5349 Add a --dbname option to the pg_regress script, and use pl_regression
for testing PLs and contrib_regression for testing contrib, instead of
overwriting the core system's regression database as formerly done.
Andrew Dunstan
2005-05-17 18:26:23 +00:00
Bruce Momjian a7032690f9 Use 'cp' and 'chmod' in place of 'install' to install header files.
This reduces header file install from 8 seconds to 0.40 seconds.
2005-03-25 23:22:54 +00:00
Bruce Momjian 6b7ef076b5 Have libpgport link before libpq so that PG client applications are more
immunte to changes in libpq's usage of pgport between major versions.
2005-03-25 18:17:14 +00:00
Tom Lane 46be09e91a Revert ill-conceived change of libpq linkage --- breaks ecpg. 2005-03-24 23:53:48 +00:00
Bruce Momjian 8269ad4ffe Force PG client applications to link to non-shared libpgport before
linking to libpq.  This insulates applications from changes in libpq's
usage of libpgport functions.

Backpatched to 8.0.X.
2005-03-24 19:33:32 +00:00
Tom Lane 889f038129 Use SHGetFolderPath instead of SHGetSpecialFolderPath to find the
APPDATA directory on Windows.  Magnus Hagander
2005-01-26 19:24:03 +00:00
Bruce Momjian 9af9320750 Add Win32 version stamps that increment each day for proper SYSTEM32
DLL pginstaller installs.
2004-12-19 02:16:31 +00:00
Bruce Momjian d0c01f29df Allow --enable-thread-safety with --disable-shared libraries by passing
PTHREAD_LIBS to all libpq-usage builds.
2004-12-16 18:13:07 +00:00
Bruce Momjian b5498167d7 Allow AIX to use --enable-thread-safety by passing PTHREAD_LIBS to
binary compiles, and adjust configure tests for AIX.
2004-12-16 17:48:29 +00:00
Tom Lane a9ddd649df Modify the platform-specific makefiles so that macro 'rpath' is defined
in terms of macro 'rpathdir', as I proposed a few weeks ago.  In itself
this commit shouldn't change the behavior at all, but it opens the door
to using special rpaths for the PL shared libraries, as seems to be
needed for plperl in particular.
2004-11-19 00:41:39 +00:00
Neil Conway 857e210ea9 When using GCC, change the default CFLAGS to:
-O2 -Wall -Wmissing-prototypes -Wpointer-arith

Check whether the version of GCC we are using supports any of:

  -Wdeclaration-after-statement
  -Wendif-labels
  -Wold-style-definition

And add the supported flags to CFLAGS.
2004-10-20 02:12:07 +00:00
Bruce Momjian db9e2fd0a9 The previous build rules caused each binary to be re-linked on every
"make", even if nothing had changed. With this patch, it's only relinked
if it's actually updated.

//Magnus

PS. Yes, the old buildrule for the .rc file is still needed, as it's
used by pgevent.rc (or any other binary in the future that would need
it's own .rc file)

Magnus Hagander
2004-10-15 17:10:58 +00:00
Bruce Momjian 4d94e99b90 > This lets you do something like:
>
>    ./configure LDFLAGS=-static-libgcc LDFLAGS_SL=-static-libgcc
>
> to produce binaries that do not depend on libgcc_s.so at all.

Oliver Jowett
2004-10-15 05:11:00 +00:00
Tom Lane 669ca7af83 Another try at making plpython autoconfiguration work correctly. Use a
-L spec rather than assuming libpython is in the standard search path
(this returns to the way 7.4 did it).  But check the distutils output
to see if it looks like Python has built a shared library, and if so
link with that instead of the probably-not-shared library found in
configdir.
2004-10-11 19:32:19 +00:00
Bruce Momjian 7d3d5affda Improve consistency of win32 version sed script. 2004-10-06 15:14:13 +00:00
Bruce Momjian e6470a22b7 Fix for Win32 file version sed macro, per report from Dave Page. 2004-10-06 15:12:32 +00:00
Bruce Momjian 5431393274 Allow plpython to build on Win32.
Magnus Hagander
2004-10-06 09:20:41 +00:00
Bruce Momjian da67c919d9 Add Win32 version info to client binaries.
Magnus Hagander
2004-10-05 19:30:25 +00:00
Neil Conway b3f2f6ebec Use 'override' when appending text to LDFLAGS, so the build doesn't break
if the user has defined LDFLAGS themselves.
2004-10-01 02:06:52 +00:00
Peter Eisentraut 122016379d Move comment at end of line to a separate line so trailing tabs don't
become part of the make variable value.
2004-09-18 13:28:54 +00:00
Bruce Momjian f7587aeba8 > Am Dienstag, 17. August 2004 14:26 schrieb Fabien COELHO:
> > The patch adds missing the "libpgport.a" file to the installation under
> > "install-all-headers". It is needed by some contribs. I install the
> > library in "pkglibdir", but I was wondering whether it should be "libdir"?

Please find attached a small patch against current CVS head that fixes
pgport library installation so that it goes to libdir instead of
pkglibdir. It works for me.

Fabien Coelho
2004-08-28 22:55:06 +00:00
Bruce Momjian ee85595d46 > Please find enclose a submission to fix these problems.
>
> The patch adds missing the "libpgport.a" file to the installation under
> "install-all-headers". It is needed by some contribs. I install the
> library in "pkglibdir", but I was wondering whether it should be "libdir"?
> I was wondering also whether it would make sense to have a "libpgport.so"?
>
> It fixes various macros which are used by contrib makefiles, especially
> libpq_*dir and LDFLAGS when used under PGXS. It seems to me that they are
> needed to
>
> It adds the ability to test and use PGXS with contribs, with "make
> USE_PGXS=1". Without the macro, this is exactly as before, there should be
> no difference, esp. wrt the vpath feature that seemed broken by previous
> submission. So it should not harm anybody, and it is useful at least to me.
>
> It fixes some inconsistencies in various contrib makefiles
> (useless override, ":=" instead of "=").

Fabien COELHO
2004-08-20 20:13:10 +00:00
Bruce Momjian 2284cfa255 Quote PERL expansion for Win32 path that might have spaces. 2004-08-15 00:41:51 +00:00
Bruce Momjian ca9540d34f Add docs for initdb --auth. 2004-08-01 06:19:26 +00:00
Peter Eisentraut adf57cd7e2 PostgreSQL extension makefile framework ("pgxs"), by Fabien Coelho, with
some massaging by Peter Eisentraut.  This is basically a simple
generalization of the existing contrib makefiles.
2004-07-30 12:26:40 +00:00
Bruce Momjian de2c66539e Move -lpgport to the beginning of the library list for win32 linking. 2004-06-02 21:05:52 +00:00
Tom Lane a712570880 Make --without-docdir configure option actually work, per Manfred. 2004-05-23 15:24:32 +00:00
Tom Lane 3983869439 Use wide-character library routines, if available, for upper/lower/initcap
functions.  This allows these functions to work correctly with Unicode and
other multibyte encodings.  Per prior discussion.

Also, revert my earlier change to move installation path mashing from
Makefile.global to configure.  Turns out not to work well because configure
script is working with unexpanded variables, and so fails to match in
cases where it should match.
2004-05-22 00:34:51 +00:00
Tom Lane 13f96c4b6b Put path configuration information into a .h file instead of cluttering
several different module Makefiles with it.  Also, do any adjustment
of installation paths during configure, rather than every time Makefile.global
is read.
2004-05-21 20:56:50 +00:00
Tom Lane 63bd0db121 Integrate src/timezone library for all platforms. There is more we can
and should do now that we control our own destiny for timezone handling,
but this commit gets the bulk of the picayune diffs in place.
Magnus Hagander and Tom Lane.
2004-05-21 05:08:06 +00:00
Bruce Momjian 3f41675f6a Move unixware thread stuff into Makefile.unixware. 2004-05-14 00:03:07 +00:00
Bruce Momjian 5e938d831a Force thread flags for all Unixware builds if threading is requested.
This is required because once you link with a library that uses threads,
all references to that library have to use thread flags.
2004-05-13 23:05:54 +00:00
Bruce Momjian fda15b351a As part of the work for making relocatable installs, I have re-factored
all the code that looks for other binaries.  I move FindExec into
port/exec.c (and renamed it to find_my_binary()).  I also added
find_other_binary that looks for another binary in the same directory as
the calling program, and checks the version string.

The only behavior change was that initdb and pg_dump would look in the
hard-coded bindir directory if it can't find the requested binary in the
same directory as the caller.  The new code throws an error.  The old
behavior seemed too error prone for version mismatches.
2004-05-11 21:57:15 +00:00
Tom Lane 0bd61548ab Solve the 'Turkish problem' with undesirable locale behavior for case
conversion of basic ASCII letters.  Remove all uses of strcasecmp and
strncasecmp in favor of new functions pg_strcasecmp and pg_strncasecmp;
remove most but not all direct uses of toupper and tolower in favor of
pg_toupper and pg_tolower.  These functions use the same notions of
case folding already developed for identifier case conversion.  I left
the straight locale-based folding in place for situations where we are
just manipulating user data and not trying to match it to built-in
strings --- for example, the SQL upper() function is still locale
dependent.  Perhaps this will prove not to be what's wanted, but at
the moment we can initdb and pass regression tests in Turkish locale.
2004-05-07 00:24:59 +00:00
Bruce Momjian b99a3a7541 Rename to USE_PGTZ to match code. 2004-04-30 15:01:25 +00:00
Bruce Momjian 7146eb0bc3 Integrate timezone library to be called only from Win32.
Timezone code backend integration done by Magnus Hagander.
2004-04-30 04:31:52 +00:00
Bruce Momjian 7a66015e98 Add new auto-detection of thread flags.
Allow additional thread flags to be added via port templates.

Change thread flag names to PTHREAD_CFLAGS and PTHREAD_LIBS to match new
configure script.
2004-04-23 18:15:55 +00:00
PostgreSQL Daemon 41fa9e9bae Remove all of the libpgtcl and pgtclsh files, including all references to
them within the various makefiles

with_tcl is still required for the src/pl/tcl language
2004-04-20 00:33:53 +00:00
Bruce Momjian 60a068b389 Move non-blocking code into its own /port file, for code clarity. 2004-03-10 21:12:49 +00:00
Tom Lane 58f337a343 Centralize implementation of delay code by creating a pg_usleep()
subroutine in src/port/pgsleep.c.  Remove platform dependencies from
miscadmin.h and put them in port.h where they belong.  Extend recent
vacuum cost-based-delay patch to apply to VACUUM FULL, ANALYZE, and
non-btree index vacuuming.

By the way, where is the documentation for the cost-based-delay patch?
2004-02-10 03:42:45 +00:00
Bruce Momjian e5e5a323ca Briefly,
* configure + Makefile changes
 * shared memory attaching in EXEC_BACKEND case (+ minor fix for apparent
cygwin bug under cygwin/EXEC_BACKEND case only)
 * PATH env var separator differences
 * missing win32 rand functions added
 * placeholder replacements for sync etc under port.h


To those who are really interested, and there are a few of you: the attached
patch + file will allow the source base to be compiled (and, for some
definition, "run") under MingW, with the following caveats (I wanted to
first properly fix all but the last of these, but y'all won't quit asking
for a patch :-):

        * child death: SIGCHLD not yet sent, so as a minimum, you'll need to
put in some sort of delay after StartupDatabase, and handle setting
StartupPID to 0 etc (ie. the stuff the reaper() signal function is supposed
to do)

        * dirmod.c: comment out the elog calls

        * dfmgr.c: some hackage required to substitute_libpath_macro

        * slru/xact.c: comment out the errno checking after the readdir
(fixed by next version of MingW)

Again, this is only if you *really* want to see postgres compile and start,
and is a nice leg-up for working on the other Win32 TODO list items. Just
don't expect too much else from it at this point...


Claudio Natoli
2004-02-02 00:11:31 +00:00
Tom Lane bd046b99f0 Remove JDBC from the build system and documentation, too. 2004-01-19 21:20:06 +00:00
Bruce Momjian 85f51dea1c Supress ecpg thread test if configure didn't enable threads. Fix
tools/thread to run even if configure didn't enable threads because this
test is used before enabling threads for the OS.
2003-12-19 23:29:15 +00:00
PostgreSQL Daemon 969685ad44 $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
Bruce Momjian 391dceb462 Finalize configuration of thread_test program. 2003-09-27 16:24:45 +00:00
Bruce Momjian 227dd9b427 Rename thread compile flag. Move thread test program to tools/thread,
and improve tests.
2003-09-27 15:32:48 +00:00
Tom Lane 7703e55c32 Make the default pg_hba.conf include an entry for ::1 only if configure
set HAVE_IPV6.  Per recent discussions.
2003-09-07 03:36:03 +00:00
Peter Eisentraut f10a9033bf Clean up after pygresql removal: adjust/remove documentation and remove
unneeded configure work.
2003-09-01 23:01:49 +00:00
Bruce Momjian 63c4d156e0 Move simple_prompt()/sprompt.c into /port. 2003-08-08 04:52:22 +00:00
Bruce Momjian e8dd31701b more thread.c consistency. 2003-08-08 02:48:24 +00:00
Bruce Momjian 62b532b736 Add thread.c for libpq threading, and hook it into libpq/configure. 2003-06-14 14:35:42 +00:00
Bruce Momjian 24daeb8e73 Add configure thread tests. 2003-05-27 16:36:50 +00:00
Tom Lane a7c50cd92b Finish removing HPUXMATHLIB. 2003-05-11 20:50:53 +00:00
Bruce Momjian d46e643822 Add Win32 path handling for / vs. \ and drive letters. 2003-04-04 20:42:13 +00:00
Peter Eisentraut 82a91eb54e Simplify the socket handling code by supplying a replacement getaddrinfo()
function if the OS doesn't provide one.
2003-03-29 11:31:52 +00:00
Bruce Momjian c3e9699f21 Enable IPv6 connections to the server, and add pg_hba.conf IPv6 entries
if the OS supports it.  Code will still compile on non-IPv6-aware
machines (feature added by Bruce).

Nigel Kukard
2003-01-06 03:18:27 +00:00
Peter Eisentraut 1bf1597e3a Revert rpath-mangling patch. See discussion on -patches around Nov 29 for
the rationale.
2003-01-05 13:45:47 +00:00
Tom Lane 2e1f2c3109 Make use of TCL_INCLUDE_SPEC if available (it's new in Tcl 8.4, too bad
it took 'em this long to realize it's needed...)
2002-12-30 17:19:54 +00:00
Bruce Momjian c600a6ac47 I am attaching a patch file that will replace the previous one. It only
contains the patches to Makefile.global.in and Makefile.unixware.  The
Makefile.unixware patch has been updated to include the contents of
LD_LIBRARY_PATH, if present, to the -rpath (-R) option.  This change
will  simplify configuring and building PostgreSQL on systems that
support  LD_LIBRARY_PATH.  You can set LD_LIBRARY_PATH to include all
the directorys  you want to have searched for additional libraries, run
configure, then run  make.  The paths in LD_LIBRARY_PATH will then be
embedded in the executables  via the -rpath (-R) option to the linker,
and so will not require  LD_LIBRARY_PATH in order to run.

Billy G. Allie
2002-11-10 00:37:28 +00:00
Peter Eisentraut e43ecb3d1a Remove leftovers from subproject removals. Fixes for Python and Kerberos
configuration.
2002-09-04 22:54:18 +00:00
Peter Eisentraut 77f7763b55 Remove all traces of multibyte and locale options. Clean up comments
referring to "multibyte" where it really means character encoding.
2002-09-03 21:45:44 +00:00
Marc G. Fournier 5a303f878e Remove all traces of the ODBC driver, which is now on GBorg as the psqlodbc
project ...
2002-08-22 22:43:14 +00:00
Peter Eisentraut b0c3c48eb3 Assemble portability modules into libpgport library.
Some makefile simplifications.
2002-07-27 20:10:05 +00:00
Bruce Momjian 33b3c95200 Complete TODO item:
* -Add BSD-licensed qsort() for Solaris
2002-07-19 17:35:11 +00:00
Bruce Momjian 7c5c1a2adb Add comment to file about port files. 2002-07-18 04:30:36 +00:00
Bruce Momjian 3cbb9eb265 Move few remaining src/utils files to backend/port so everything is in
one place.  Everything may be moved to src/utils eventually.

Add DLLINIT variable to simplify makfiles.
2002-07-16 05:46:36 +00:00
Peter Eisentraut 7662419f1b Change PL/Perl and Pg interface build to use configured compiler and
Makefile.shlib system, not MakeMaker.
2002-05-28 16:57:53 +00:00
Peter Eisentraut 2f2d05763d Change PL/Tcl build to use configured compiler and Makefile.shlib
system, not Tcl-provided one.

Make sure export file, if any, is cleaned.

Tcl configuration is now read directly in configure and recorded in
Makefile.global.  This eliminates some duplicate efforts and allows
for easier hand-editing of the results, if necessary.
2002-05-24 18:10:17 +00:00
Peter Eisentraut 2e32eca8d0 Allow detection of collateindex.pl in stylesheet directory or in path,
which covers some recent installation schemes.

Add Mandrake installation layout to directories to check for stylesheets.

Allow documentation build to proceed if stylesheets were not found, in case
the stylesheets might be found through the SGML catalog mechanism.
2002-04-14 17:23:20 +00:00
Peter Eisentraut 563673e15d Add make install-strip target. 2002-04-10 16:45:25 +00:00
Peter Eisentraut 7c1ff35410 Upgrade to Autoconf version 2.53. Replaced many custom macro
calls with new or now-built-in versions.  Make sure that all
calls to AC_DEFINE have a third argument, for possible use of
autoheader in the future.
2002-03-29 17:32:55 +00:00
Peter Eisentraut f362dcec61 Move
src/GNUmakefile.in to src/Makefile
and
  src/backend/port/Makefile.in to src/backend/port/Makefile

All configure substitutions are now done in Makefile.global.
2002-03-13 00:05:06 +00:00
Bruce Momjian 0416641baa At this moment, --enable-debug adds debugging information to most of the
parts o f postgresql. The jdbc drivers are never compiled with debugging
support. This p atch make sure that debugging information is added to
the jdbc jar when the --en able-debug is added. This was usefull for me
for debugging some java jdbc poolin g objects but this might perhaps be
usefull for other people too?

Dries Verachtert
2002-03-05 17:55:23 +00:00
Bruce Momjian 8799d84603 Add memcmp() test and new memcmp.c file, for SunOS. Tested by Tatsuo. 2001-12-20 21:23:05 +00:00
Tom Lane f42b88d1b4 Residual cleanup from making pltcl unknown support always enabled. 2001-10-13 15:24:23 +00:00
Peter Eisentraut 364a7ebe26 Provide some initial support for building the ODBC driver for
an already installed iODBC or unixODBC driver manager.  In particular,
use the include files provided by the driver manager over our own,
and use the odbcinst library of the driver manager rather than gpps.c.

Migrate portability sections common to several files into psqlodbc.h.
2001-09-22 22:54:33 +00:00
Peter Eisentraut 27d2890b87 Unify the zip rules and variables. 2001-09-17 23:00:27 +00:00
Peter Eisentraut 264f8f2b6c Install dynamically loadable modules into a private subdirectory
under libdir, for a cleaner separation in the installation layout
and compatibility with binary packaging standards.  Point backend's
default search location there.  The contrib modules are also
installed in the said location, giving them the benefit of the
default search path as well.  No changes in user interface
nevertheless.
2001-09-16 16:11:11 +00:00
Peter Eisentraut b1a38a4380 Install the SQL command man pages into a section appropriate for each
system.  Some systems did not understand the 'l' section, and in general
it wasn't entirely appropriate.

On SCO OpenServer, the man pages won't be installed at all until someone
figures out their man system.
2001-08-29 19:14:40 +00:00
Peter Eisentraut f5944af8ba Include directory rearrangement
Client headers are no longer in a subdirectory, since they have been made
namespace-clean.

Internal libpq headers are in a private subdirectory.

Server headers are in a private subdirectory.  pg_config has a new option
to point there.
2001-08-28 14:20:28 +00:00
Peter Eisentraut 42ae4f2940 Turn on plpython build by default if we have something that looks like a
shared library, or we can do without one.
2001-08-27 00:29:49 +00:00
Peter Eisentraut ef7152f99b Put the right runpath to libpq into the Perl module shared object on more
platforms and without relinking.

Also support VPATH builds and DESTDIR installs.  One hopes.
2001-08-26 22:28:04 +00:00
Peter Eisentraut 968d7733a1 Rename config.h to pg_config.h and os.h to pg_config_os.h, fix a number of
places that were including the wrong files.
2001-08-24 14:07:50 +00:00
Peter Eisentraut 6102553e2d Make sure the build tree is before the source tree in the include path. 2001-07-15 11:20:01 +00:00
Peter Eisentraut 8237d89c0f Support fake root install, separate build dir, dependency tracking, our
choice of compiler and flags, uninstall, and peculiar Python installation
layouts for PyGreSql.  Also install into site-packages now, as officially
recommended.  And pgdb.py is also installed now, used to be forgotten.
2001-07-10 16:33:02 +00:00
Peter Eisentraut e542036461 Native Language Support (NLS)
Use --enable-nls to turn it on; see installation instructions for details.
See developer's guide how to make use of it in programs and how to add
translations.

psql sources have been almost fully prepared and an incomplete German
translation has been provided.  In the backend, only elog() calls are
currently translatable, and the provided German translation file is more
of a placeholder.
2001-06-02 18:25:18 +00:00
Bruce Momjian 74068dfed6 The following patch corrects a make install problem when building
under Cygwin.  The root cause of this problem is that (Sun) java is a
native Win32 app and hence does not understand Cygwin Posix style paths.
The solution is to use Cygwin's cygpath utility to convert the Posix style
JDBC installation directory path into a Win32 one before invoking ant.

I'm not sure if my patch is the best way to correct this issue but
my goal was to confine the Cygwin specific constructs to

Jason Tishler
2001-05-25 14:28:58 +00:00
Peter Eisentraut bbc3920fe9 PL/Python should build portably now, if you can get over the fact that
there's no shared libpython.  Test suite works as well. Also, add some
documentation.
2001-05-12 17:49:32 +00:00
Bruce Momjian 36f41c7126 Make tcl unknown configure from Makefile, not configure. 2001-05-09 20:19:30 +00:00
Bruce Momjian 27f17e1485 Change to enable_pltcl_unknown mention. 2001-05-09 19:57:33 +00:00
Bruce Momjian f7659a9c18 This patch adds a new configure option --with-pltcl-unknown which
enables pltcl unknown support.


Also it adds substituting of tclsh with tclsh that was by configure in
pltcl_*mod scripts. For example, On freebsd, tclsh can be called
tclsh8.2 or
tclsh8.3 depending on installed version of Tcl.

After patching files
  src/pl/tcl/modules/pltcl_listmod
  src/pl/tcl/modules/pltcl_loadmod
  src/pl/tcl/modules/pltcl_delmod
must be renamed(copied,repocopied) to
  src/pl/tcl/modules/pltcl_listmod.in
  src/pl/tcl/modules/pltcl_loadmod.in
  src/pl/tcl/modules/pltcl_delmod.in

seva@sevasoft.kiev.ua
2001-05-09 19:19:00 +00:00
Peter Eisentraut a3176dac22 Use install-sh unconditionally. 2001-03-10 10:38:59 +00:00
Peter Mount c18bb990d3 Ok, I've split todays commit into three, the first two already done had some
bits in JDBC & the first set of tools into contrib.

This is the third, and deals with enabling JDBC to be compiled with the main
source.

What it does is add a new option to configure: --with-java

This option tells configure to look for ant (our build tool of choice) and
if found, it then compiles both the JDBC driver and the new tools as part
of the normal make.

Also, when the postgresql install is done, all the .jar files are also
installed into the ${PGLIB}/java directory (thought best to keep then separate)

Now I had some conflicts when this applied so could someone please double check
that everything is ok?

Peter
2001-03-05 09:40:02 +00:00
Peter Eisentraut 23e41fb7fb Add configure check for -lunix, for QNX.
Recode test for equality of source and build directory using 'test -ef',
because even using pwd you might not get equal strings.  Thanks, QNX.
2001-03-03 15:53:41 +00:00
Tatsuo Ishii df247b821d Massive commits for SunOS4 port. 2001-02-27 08:13:31 +00:00
Peter Eisentraut cb6edf9d56 Make sure -L and -I's for our source tree are always before system include
or library directories on the command line.
2001-02-20 19:20:30 +00:00
Tom Lane a8b9cbfa0e Make DEF_PGPORT available to Makefiles, so it can be substituted into
scripts like pgaccess.
2001-02-07 20:13:27 +00:00
Tom Lane 531cd44fd1 Remove no-longer-used STRERROR2 config symbol. 2001-01-20 22:56:33 +00:00
Tom Lane b05b981924 stamp-h needs to be made by config.status, not elsewhere, per recipe in
Autoconf manual.  In particular, touching it before creating config.status
is guaranteed to lose.
2000-12-29 20:39:09 +00:00
Peter Eisentraut 2a81896a2a Fix rules to re-generate config.h. The examples in the Autoconf manual are
flawed because the timestamp file is already updated when Makefile.global
is remade, and the rule for config.h never gets run.
2000-12-16 13:03:25 +00:00
Peter Eisentraut e5ba2fc5b5 Make all commands that link a program look like
$(CC) $(CFLAGS) $(LDFLAGS) <object files> <extra-libraries> $(LIBS) -o $@

This form seemed to be the most portable, readable, and logical, but in any
case it's better than having a dozen different ones in the tree.
2000-11-30 20:36:13 +00:00
Peter Eisentraut 99198ac6b8 Enable WAL in config.h, not Makefile.global. 2000-11-20 16:52:54 +00:00
Vadim B. Mikheev a221d95f28 Compile WAL by default. 2000-11-20 05:18:40 +00:00
Peter Eisentraut 6b70f3862c Also test for 'void *' as third arg of accept() (as on Solaris 7 and 8),
but take it as 'int *' instead.

Add real test for whether ld -R works on Unixware.

Rename --enable-uniconv to --enable-unicode-conversion.

Install shlibs mode 755 by default, since 644 causes gratuitous complaints
from ldd et al. on some systems.
2000-11-09 18:18:42 +00:00
Peter Eisentraut 7267fdd7a3 Add some configure checks for DocBook and related tools. With a somewhat
standard installation layout it should be possible to build the HTML
and print documentation without additional manual setup.
2000-11-05 21:04:07 +00:00
Peter Eisentraut b61f681f23 Remove .SECONDARY: target again, because GNU make 3.78.1 will get mighty
confused in src/interfaces/libpq for some reason.  Seemingly, different
GNU make versions have several mutually conflicting problems with implicit
rule chains.  Words are not sufficient...
2000-11-04 16:39:02 +00:00
Peter Eisentraut a18490b73d Add global .SECONDARY: target to not allow make to delete intermediate
target files in implicit rule chains.  That might have been a cool idea
but it seems to be too buggy to work, as it caused spurious recompiles in
several places.
2000-11-03 20:27:40 +00:00
Peter Eisentraut 30402ce74a Automatic dependency tracking for C++ (GCC only) 2000-10-29 16:13:28 +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 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 f8ff1ee5aa Move DLSUFFIX, AROPT, and CFLAGS_SL settings from template to
Makefile.port, since they are of no use to configure and much of the
library magic happens in Makefile.port anyway.

Use __alpha, not __alpha__, since the former is universally available.
Remove -DNOFIXADE from the compile command line and put it in the port
include file.
2000-10-21 22:36:14 +00:00
Peter Eisentraut 12e7558c76 Add check for GNU or not GNU ld, needed to pick the right export_dynamic
flags for Solaris.  The test itself is straight from libtool.
2000-10-20 23:57:34 +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 87db3b88e0 Remove override of CFLAGS. 2000-10-10 13:04:46 +00:00
Peter Eisentraut 984b0b4df8 Append "/postgresql" to (certain) installation subdirectories when
installing into a shared location.  Also Makefile.global organizational
cleanup.
2000-10-08 21:13:27 +00:00
Peter Eisentraut 6f64c2e54a New unified regression test driver, test/regress makefile cleanup,
add "check" and "installcheck" targets, straighten out make variable naming
of host_os, host_cpu, etc.
2000-09-29 17:17:41 +00:00
Peter Eisentraut 664ce79dd8 Fixes for Cygwin, with help from Pete Forman <gsez020@kryten.bedford.waii.com>.
Update the installation instructions (formerly misnamed "FAQ"), add configure
checks for some headers rather than having users copy stubs manually (ugh!).
Use Autoconf check for exe extension.  This also avoids inheriting the value
of $(X) from the environment.
2000-09-27 15:17:57 +00:00
Peter Eisentraut f428d053ce Revise Tcl/Tk configuration. Make missing Tcl after --with-tcl an error,
add --without-tk option to disable Tk.  We don't need the AC_PATH_XTRA
test because tkConfig.sh already contains all the information about how to
compile and link with X.  Also make sure that libpq is up to date for
libpgtcl.  Remove executable bits from pgaccess.sh, but add it to pgaccess.
2000-09-25 22:23:01 +00:00
Peter Eisentraut 353371874f Replace brain-dead Autoconf macros AC_ARG_{ENABLE,WITH} with something
that's actually useful, robust, consistent.

Better plan to generate aclocal.m4 as well: use m4 include directives,
rather than cat.
2000-09-21 20:17:43 +00:00
Peter Eisentraut da06bc1d40 Make building scripts kind of consistent in look and feel, kind of immune
to parallel make, kind of resistent to corruption due to incomplete builds.
2000-09-08 18:29:28 +00:00
Peter Eisentraut 424f0edcb8 Fix relative path references so that make knowns which dependencies refer
to one another. Sort out builddir vs srcdir variable namings. Remove some
now obsoleted make variables.
2000-08-31 16:12:35 +00:00
Peter Eisentraut f03fc94e7d New configure test for flex, which recognizes only flex but does so in all
incarnations (I hope). When an acceptable flex version is not found, print
instructive error messages from both configure and the makefiles, so that
users can continue building anyway.
2000-08-28 11:53:23 +00:00
Peter Eisentraut bb13830d6f maintainer-clean and distclean ought to remove dependency information as well. 2000-07-22 01:48:53 +00:00
Peter Eisentraut 32163099d7 Add distprep target to take some of the job of the release_prep script.
The latter updated accordingly. Also add `dist' and `distcheck' targets
to play with, but caveat packager.

Updated backend/bootstrap and backend/parser makefile to make them
marginally builddir aware and fix the usual set of things.

Add rule to automatically remake config.h dependent on config.h.in and
config.status. (Adopted from Autoconf manual and about every other
package.) On a good day we should now have a complete and accurate set
of dependencies throughout everything.
2000-07-19 16:30:27 +00:00
Peter Eisentraut 44eaafe3f8 End users shouldn't have to invoke a separate command to install the
documentation. Therefore it's now installed by default. If there is no
documentation to be found (i.e., you are not using the distribution)
then this step is skipped.

Add --docdir option to configure to control installation directory.
2000-07-17 22:31:59 +00:00
Peter Eisentraut 0d59dad770 Automatic dependency tracking
The .DEFAULT rule in backend/Makefile is harmful -- removed.
Replace `::' rules by `:'.
2000-07-16 14:50:44 +00:00
Peter Eisentraut 74618e2b82 Another round of those unportable config/build changes :-/
* Add option to build with OpenSSL out of the box. Fix thusly exposed
  bit rot. Although it compiles now, getting this to do something
  useful is left as an exercise.

* Fix Kerberos options to defer checking for required libraries until
  all the other libraries are checked for.

* Change default odbcinst.ini and krb5.srvtab path to PREFIX/etc.

* Install work around for Autoconf's install-sh relative path anomaly.
  Get rid of old INSTL_*_OPTS variables, now that we don't need them
  anymore.

* Use `gunzip -c' instead of g?zcat. Reportedly broke on AIX.

* Look for only one of readline.h or readline/readline.h, not both.

* Make check for PS_STRINGS cacheable. Don't test for the header files
  separately.

* Disable fcntl(F_SETLK) test on Linux.

* Substitute the standard GCC warnings set into CFLAGS in configure,
  don't add it on in Makefile.global.

* Sweep through contrib tree to teach makefiles standard semantics.

... and in completely unrelated news:

* Make postmaster.opts arbitrary options-aware. I still think we need to
  save the environment as well.
2000-07-09 13:14:19 +00:00
Peter Eisentraut 6fb9d2e347 Version number now set in configure, available through Makefile.global
and config.h. Adjusted all referring code.

Scrapped pg_version and changed initdb accordingly. Integrated
src/utils/version.c into src/backend/utils/init/miscinit.c. Changed all
callers.

Set version number to `7.1devel'. (Non-numeric version suffixes now allowed.)
2000-07-02 15:21:27 +00:00
Peter Eisentraut b150906b89 We don't need config.status substituting anything into Gen_fmgrtab.sh, we
just pass in CPP and AWK via the environment from the Makefile.
2000-07-01 21:16:44 +00:00
Peter Eisentraut 191870388d A little bit of clean-up/bug fix in Tcl build. Handle gracefully cases
where someone wants to build these but hasn't configured for Tcl.
2000-07-01 15:02:31 +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
Peter Eisentraut 5bb8b62983 Makefile cleanup for bin and pl subtrees. They should now support
all the standard semantics. Also get rid of Makefile.in's on the
way and instead declare all variables in Makefile.global.
2000-06-27 00:32:06 +00:00
Peter Eisentraut 81b30f2cb4 Integrated ODBC driver into regular build. No more standalone business,
which didn't work anyway. Had to back out unixodbc related patch which
broke the regular ODBC build.
2000-06-19 16:58:48 +00:00
Peter Eisentraut 1652d43358 Remove fmgrstamp-h business -- not needed and confusing
Add options to configure to automatically build for Kerberos
support; no more editing of make files.
2000-06-17 00:10:40 +00:00
Bruce Momjian f7f177d372 /contrib patch from Karel. 2000-06-15 18:55:34 +00:00
Peter Eisentraut 06cd0f1a32 Substituted new configure test for types of accept()
Interfaced a lot of the custom tests to the config.cache, in the process
made them separate macros and grouped them out into files. Made naming
adjustments.

Removed a couple of useless/unused configure tests.

Disabled C++ by default. C++ is no more special than Perl, Python, and Tcl.
And it breaks equally often. :(
2000-06-11 11:40:09 +00:00
Peter Eisentraut 6de89c9ab7 Moved the intricacies of the perl interface build into its own makefile
that now functions as a wrapper around the MakeMaker stuff. It might
even behave sensically when we have separate build dirs. Same for plperl,
which of course still doesn't work very well. Made sure that plperl
respects the choice of --libdir.

Added --with-python to automatically build and install the Python interface.
Works similarly to the Perl5 stuff.

Moved the burden of the distclean targets lower down into the source tree.
Eventually, each make file should have its own.

Added automatic remaking of makefiles and configure. Currently only for the
top-level because of a bug(?) in Autoconf. Use GNU `missing' to work around
missing autoconf and aclocal. Start factoring out macros into their own
config/*.m4 files to increase readability and organization.
2000-06-10 18:02:12 +00:00
Tom Lane 091126fa28 Generated header files parse.h and fmgroids.h are now copied into
the src/include tree, so that -I backend is no longer necessary anywhere.
Also, clean up some bit rot in contrib tree.
2000-05-29 05:45:56 +00:00
Bruce Momjian d45f7dfdca Update kerberos patch 2000-05-27 04:13:05 +00:00
Bruce Momjian 632a7ed759 Back out kerberos changes. Causes compile problems. 2000-05-27 03:58:20 +00:00
Bruce Momjian 9500b35f17 Patch for Kerberos V.
Most (nearly all) of the work was done by David Wragg <dpw@doc.ic.ac.uk>

He patched 6.5.3. I've updated it for 7.0RC5.

It works for MIT kerberos 1.1.1 (and previously for 1.0.6 as well).

I've got the patch against 6.5.3, plus kerberized RPMS.

Mike Wyer <mw@doc.ic.ac.uk>     ||         "Woof?"
2000-05-27 03:39:33 +00:00
Tom Lane ac6637485b Transmit -I switches selected by configure (particularly those from
--with-includes) to makefiles for pltcl and plperl, so that these
switches will be used even though we do not want other top-level
CFLAGS.  Ain't it fun trying to support multiple-compiler platforms?
2000-05-23 02:12:46 +00:00
Peter Eisentraut ffc9812451 fixed another psql \e bug (handle newlines as whitespace)
repaired psql option scanning bug (special treatment to \g |pipe)
fixed ipcclean makefile
made configure look for Perl to handle psql help build gracefully
2000-04-14 23:43:44 +00:00
Bruce Momjian ac70c3547b I have tested the beta3 on WinNT and here are the results:
- I was unable to compile ecpg due to the ":=" instead of "=" in defining
LIBPQDIR and some other variables in Makefile.global.in
- pg_id (and also pg_encoding) executable was not removed during "make
clean" - there was no $(X) appended to the executable name for rm
- I have added result for int2, int4, float8 and geometry regression tests
        - int2, int2 - yet another message for too large numbers ;-)
        - float8 - it is problably a bug in the newlib C library - it has no
error message for numbers with exponent -400
        - geometry - differences in precision of float numbers
- I have added appropriate lines into resultmap file
- I have modified the script regress.sh to use "case" statement when testing
the hostname. For cygwin the script is called with "i686-pc-cygwin" (on my
machine) as a parameter and this was not catched with the "if" statement.
The check was done for PORTNAME (win) and not HOSTNAME (i.86-pc-cygwin*).

The patch for described modifications is included.

All this modifications can be applied to "current" tree too.
The compilation was done on CygwinB20.1 with gcc 2.95, cygipc library 1.05.
The binaries were able to run also on the newest development snapshot
(2000-03-25).

                        Dan
2000-03-31 14:14:36 +00:00
Tom Lane 0a1ed443f8 Add configure checks to see if 'using namespace std' and
'#include <string>' work in the local C++ compiler.
2000-03-30 05:29:21 +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 ede72c2826 Improve default compile ops. 2000-02-10 19:11:17 +00:00
Tatsuo Ishii d4aab2c000 Revert back Makefile.global
Add check for --with-mb. It is now obsoleted.
2000-01-19 01:42:12 +00:00
Tatsuo Ishii 8da316291f Fix multibyte support 2000-01-18 03:01:40 +00:00
Peter Eisentraut 2a1bfbce24 - Allow array on int8
- Prevent permissions on indexes
- Instituted --enable-multibyte option and tweaked the MB build process where necessary
- initdb prompts for superuser password
2000-01-15 18:30:35 +00:00
Bruce Momjian a82f9ffde6 New LDOUT makefile variable for QNX os. 1999-12-13 22:35:27 +00:00
Bruce Momjian cae01cd836 Fix LDREL. 1999-12-10 05:00:36 +00:00
Bruce Momjian d9e4966be1 update for pgaccess 1999-11-02 00:05:29 +00:00
Bruce Momjian 9dab728700 Update to pgaccess 0.98. 1999-10-31 19:50:48 +00:00
Bruce Momjian c1d5e88b41 Make pgindent gnu test better. 1999-09-09 19:39:06 +00:00
Bruce Momjian e740c9b1d1 Move -ieee to adt Makefile, and add CPU Makefile variable. 1999-07-20 02:42:20 +00:00
Tom Lane b692c956ba Makefile.global failed to define $(LIBS), which is
unfortunate considering that several subdirectory makefiles were counting
on it to do so...
1999-06-25 00:13:45 +00:00
Bruce Momjian 4390b0bfbe Add TEMP tables/indexes. Add COPY pfree(). Other cleanups. 1999-02-02 03:45:56 +00:00
Tom Lane b10a719777 Use autoconf to determine whether system has POSIX signals,
instead of relying on port's os.h to tell us.  (Needed for HPUX
where system major version is not enough info.)
configure unsets USE_TK if X libraries not found.
doc/Makefile uses gzcat or zcat as found by autoconf.
1998-11-29 05:30:25 +00:00
Marc G. Fournier 4283089d07 Okay, this shoudl provide a fix for the freebsd problem...
Added a ELF_SYS variable and check to configure.in...
1998-10-30 04:54:06 +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
Bruce Momjian 01cdd04731 TCL/TK fixes from Billy G. Allie. 1998-10-15 15:58:16 +00:00
Thomas G. Lockhart fe6d19f15f Add Taral's test for flags required by the detected cpp program to read
from stdin. Necessary at least for systems missing cpp but having gcc -E.
Include new configured file backend/catalog/genbki.sh.
1998-10-14 16:02:11 +00:00
Bruce Momjian ecf145f492 Remove TCL_LIB,TCL_INCDIR,TK_LIB,TK_INCDIR. 1998-10-13 16:30:49 +00:00
Bruce Momjian 5d79f26e5b No more TCL_LIB> 1998-10-12 15:01:40 +00:00
Thomas G. Lockhart 608dbb1b3e Separate out the lextest so that it is run by "make" and "make install".
Before, "make install" did not run the lextest.
Fix up the ODBC make from this main configure.
Include configure test for "ln -s" in Makefile.global.in.
 Was always in configure, just not carried through to here for use.
1998-10-07 06:38:29 +00:00
Thomas G. Lockhart 72129e98ce Try to configure interfaces/odbc using the --with-odbc switch.
Suppress installing man pages from here; do it from the doc/Makefile now.
1998-10-06 05:42:58 +00:00
Marc G. Fournier 5979d73841 From: t-ishii@sra.co.jp
As Bruce mentioned, this is due to the conflict among changes we made.
Included patches should fix the problem(I changed all MB to
MULTIBYTE). Please let me know if you have further problem.

P.S. I did not include pathces to configure and gram.c to save the
file size(configure.in and gram.y modified).
1998-07-26 04:31:41 +00:00
Marc G. Fournier bf00bbb0c4 I really hope that I haven't missed anything in this one...
From: t-ishii@sra.co.jp

Attached are patches to enhance the multi-byte support.  (patches are
against 7/18 snapshot)

* determine encoding at initdb/createdb rather than compile time

Now initdb/createdb has an option to specify the encoding. Also, I
modified the syntax of CREATE DATABASE to accept encoding option. See
README.mb for more details.

For this purpose I have added new column "encoding" to pg_database.
Also pg_attribute and pg_class are changed to catch up the
modification to pg_database.  Actually I haved added pg_database_mb.h,
pg_attribute_mb.h and pg_class_mb.h. These are used only when MB is
enabled. The reason having separate files is I couldn't find a way to
use ifdef or whatever in those files. I have to admit it looks
ugly. No way.

* support for PGCLIENTENCODING when issuing COPY command

commands/copy.c modified.

* support for SQL92 syntax "SET NAMES"

See gram.y.

* support for LATIN2-5
* add UNICODE regression test case
* new test suite for MB

New directory test/mb added.

* clean up source files

Basic idea is to have MB's own subdirectory for easier maintenance.
These are include/mb and backend/utils/mb.
1998-07-24 03:32:46 +00:00
Bruce Momjian cb7cbc16fa Hi, here are the patches to enhance existing MB handling. This time
I have implemented a framework of encoding translation between the
backend and the frontend. Also I have added a new variable setting
command:

SET CLIENT_ENCODING TO 'encoding';

Other features include:
	Latin1 support more 8 bit cleaness

See doc/README.mb for more details. Note that the pacthes are
against May 30 snapshot.

Tatsuo Ishii
1998-06-16 07:29:54 +00:00
Bruce Momjian c312583767 Add sys/time.h to fe-misc.c, prevent pgtclsh from using old libaries,
and allow CUSTOM_COPT to appear in compile AND LINK commands.
1998-05-12 15:42:09 +00:00
Marc G. Fournier f554af0a9f From: t-ishii@sra.co.jp
Hi, here are patches I promised (against 6.3.2):

* character_length(), position(), substring() are now aware of
          multi-byte characters
* add octet_length()
* add --with-mb option to configure
* new regression tests for EUC_KR
  (contributed by "Soonmyung. Hong" <hong@lunaris.hanmesoft.co.kr>)
* add some test cases to the EUC_JP regression test
* fix problem in regress/regress.sh in case of System V
* fix toupper(), tolower() to handle 8bit chars

note that:

o  patches for both configure.in and configure are
included. maybe the one for configure is not necessary.

o pg_proc.h was modified to add octet_length(). I used OIDs
(1374-1379) for that. Please let me know if these numbers are not
appropriate.
1998-04-27 17:10:50 +00:00
Marc G. Fournier 6d817475b2 From: Tom Lane <tgl@sss.pgh.pa.us>
HP-UX (all versions) requires shared libraries to have execute
permission, and really needs them to be exactly mode 555 for
performance reasons.  The standard configure/install procedure
installs libpq.sl as mode 644, which DOES NOT WORK.

The attached patch modifies the makefiles to distinguish
INSTL_LIB_OPTS (install mode for ordinary libraries) from
INSTL_SHLIB_OPTS (mode for shared libs), and adds a test
to configure to set INSTL_SHLIB_OPTS="-m 555" when on HP-UX.
1998-04-27 14:55:46 +00:00
Bruce Momjian 5da68b98cb Fix for PROFILE env. 1998-04-12 01:18:35 +00:00
Bruce Momjian 1e801a8f16 Hi,
Attached you'll find a (big) patch that fixes make dep and make
depend in all Makefiles where I found it to be appropriate.

It also removes the dependency in Makefile.global for NAMEDATALEN
and OIDNAMELEN by making backend/catalog/genbki.sh and bin/initdb/initdb.sh
a little smarter.

This no longer requires initdb.sh that is turned into initdb with
a sed script when installing Postgres, hence initdb.sh should be
renamed to initdb (after the patch has been applied :-) )

This patch is against the 6.3 sources, as it took a while to
complete.

Please review and apply,

Cheers,

Jeroen van Vianen
1998-04-06 00:32:26 +00:00
Bruce Momjian 953ca76b8d more tcl/tk fixes 1998-03-23 06:03:04 +00:00
Bruce Momjian 97e461b101 Another tcl/tk fix. 1998-03-23 04:08:05 +00:00
Bruce Momjian 55f86ec8f7 Configure patches from Brook Milligan. 1998-02-22 20:02:34 +00:00
Marc G. Fournier 64e7adb07b From: Tom I Helbekkmo <tih@Hamartun.Priv.NO>
Apart from this Makefile hack, all I've done is to make dynamically
loaded code modules fail properly (as was already done for __mips__,
although I think this is too loose: I believe NetBSD for the pmax can
do dynamic linking), and to add test-and-set lock handling.  As Bruce
suggested, this is done in a maximally efficient inlined way: I was
not aware that this code was so important, speed-wise.
1998-02-13 05:10:06 +00:00
Marc G. Fournier c4213aede1 From: Phil Thompson <phil@river-bank.demon.co.uk>
Cleanup patches for previous protocol changes patch
1998-01-27 03:25:14 +00:00
PostgreSQL Daemon baef78d96b Thank god for searchable mail archives.
Patch by: wieck@sapserv.debis.de (Jan Wieck)

   One  of  the design rules of PostgreSQL is extensibility. And
   to follow this rule means (at least for me) that there should
   not  only  be a builtin PL.  Instead I would prefer a defined
   interface for PL implemetations.
1998-01-15 19:46:37 +00:00
Marc G. Fournier 0808e658a7 Potential fix for Bruce's "test" problem 1997-12-20 18:36:26 +00:00
Marc G. Fournier 6e337eef45 Major cleanout of PORTNAME variables from Makefiles...bound to screw up
some of the ports...
1997-12-20 00:29:35 +00:00
Marc G. Fournier 4ee5f2b965 Get rid of PORTNAME from Makefile.global.in... 1997-12-19 21:29:28 +00:00
Marc G. Fournier ceabf8cab9 Make it entirely possible for PORTNAME to be undefined 1997-12-17 04:03:30 +00:00
Bruce Momjian 1dfde614a4 Make configure more automated, from Brook Milligan. 1997-10-30 04:46:45 +00:00
Marc G. Fournier 5410203949 Make sure that LIBPQDIR points to the right directory 1997-08-17 00:39:02 +00:00
Bruce Momjian e3be2f9dd7 Update supported ports for 6.1.1 release. 1997-07-14 16:37:36 +00:00
Bruce Momjian ffb38bd3ae Update for bsdi 1997-05-08 02:30:23 +00:00
Marc G. Fournier c2ae467300 clean up the bin/*/Makefiles...up version.h to v6.1 instead of v6.0
Remove bin/Makefile.global since it wasn't actually *doing* anything
that Makefile.global hadn't already done
1997-04-26 05:07:12 +00:00
Marc G. Fournier 94893bb962 Oops, don't forget to remove the CASSERT=true line 1997-04-15 18:36:45 +00:00
Marc G. Fournier f9d2ec0eba Have CASSERT enabled/disabled via configure, and passed through config.h
instead of as a -D
1997-04-15 18:35:50 +00:00
Marc G. Fournier 09a5dabc30 Remove port specific Makefile 'targets' (ie. shared libraries) from
Makefile.global and move them to seperate 'include' makefiles

Over time, should become even more port specific:

	ie. Makefile.BSD44_derived should be broken down into netbsd/freebsd
specific ports
1997-04-12 10:33:10 +00:00
Marc G. Fournier eda9d69d6c Move YACC and YFLAGS into the template files
Clean up the .sample files...comment out all sample entries except for
the localhost one
1997-04-04 11:23:15 +00:00
Marc G. Fournier c7b40e6058 This commit represents a clean compile with the new templates under
FreeBSD

The Makefile(s) have all been cleaned up such that there is a single
LDFLAGS vs LD_ADD or LDADD or LDFLAGS or LDFLAGS_BE.  The Makefile(s)
should be alot more straightforward then they were before...and
consistent
1997-04-04 10:43:16 +00:00
Marc G. Fournier f2eb14ad0d One helluva mess.
Further extended Makefile.global/build/configure so that we can
have a 'template' file for each OS (and each version of OS, as in BSDi)
which is used as much as possible to generate Makefile.global

	Any future ports should look at using the template file as a basis,
before moving over to Makefile.global.

	This will most probably break alot of the ports, atho I've tried to
be very neat about it...
1997-04-04 07:59:48 +00:00
Marc G. Fournier e3649e9e52 Various improvements to reduce questions :)
Remove USE_LOCALE from Makefile.global.in
Add USE_LOCALE to build/configure/config.h

Add check for BUILDRUN in configure to make sure that build is run before
configure
1997-04-03 21:26:36 +00:00