> Magnus Hagander <mha@sollentuna.net> writes:
> >> 2) PG_VERSION is no longer defined in version.h[.in], but in 
> >> configure.in. Since we don't do configure on native win32, we 
> >> need to put it in config.h.win32 :-(
> 
> Putting
> 
> > ! #define PG_VERSION 7.1
> > ! #define PG_VERSION_STR "7.1 (win32)"
> 
> into config.h.win32 is most certainly *not* an acceptable solution.
> We are not going to start maintaining this file's idea of the version
> by hand, now that we've centralized the version info otherwise.
> Find another way.

I definitly did not like that either.. Hmm.

Question: Can I assume that configure.in stays the way it is now? In the way
that if I could just extract the line "VERSION='xyz'" from it, that will
continue to work? It might be possible to do something around that. If not,
then does anybody else have an idea of how to do it since autoconf won't
work?

I thought it *was* already centralised in 7.0, but back then it was in a
header file (version.h), which made it cross-platform... I'm sure there is
some advantage of having it in configure.in, but it does make it a *lot*
harder to support it on Win32, with it's very limited scripting environment
(by default).


//Magnus

Mon, 22 Jan 2001 16:48:14 +0100
Magnus Hagander <mha@sollentuna.net>
RE: FW: Postgresql on win32 
Magnus Hagander <mha@sollentuna.net> writes:
> Question: Can I assume that configure.in stays the way it is now? In the way
> that if I could just extract the line "VERSION='xyz'" from it, that will
> continue to work? It might be possible to do something around that.

That'd be OK with me.  I don't suppose Win32 has "sed" though :-(

> I thought it *was* already centralised in 7.0, but back then it was in a
> header file (version.h), which made it cross-platform... I'm sure there is
> some advantage of having it in configure.in, but it does make it a *lot*
> harder to support it on Win32, with it's very limited scripting environment
> (by default).

Actually, it might be easier to go back to keeping it in a file
version.h (NOT .in) which configure could read it out of.  I never
figured out why Peter put it directly in configure.in in the first
place; that means it is actually hard-coded in two files (configure.in
and configure) which is a recipe for trouble.  Peter?

			regards, tom lane

Mon, 22 Jan 2001 11:01:01 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: FW: Postgresql on win32 
Tom Lane writes:
 > That'd be OK with me.  I don't suppose Win32 has "sed" though :-(

Cygwin does.  We can worry about native support for PostgreSQL later ;-) 
-- 
Pete Forman                 -./\.- Disclaimer: This post is originated
WesternGeco                   -./\.-  by myself and does not represent
pete.forman@westerngeco.com     -./\.-  opinion of Schlumberger, Baker
http://www.crosswinds.net/~petef  -./\.-  Hughes or their divisions.

Mon, 22 Jan 2001 16:19:36 +0000
Pete Forman <pete.forman@westerngeco.com>
Re: FW: Postgresql on win32 
Pete Forman <pete.forman@westerngeco.com> writes:
> Tom Lane writes:
>>> That'd be OK with me.  I don't suppose Win32 has "sed" though :-(

> Cygwin does.  We can worry about native support for PostgreSQL later ;-) 

This is the native support we are talking about.  The Cygwin port uses
configure, no?

			regards, tom lane

Mon, 22 Jan 2001 11:30:49 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: FW: Postgresql on win32 
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane writes:
>> Actually, it might be easier to go back to keeping it in a file
>> version.h (NOT .in) which configure could read it out of.  I never
>> figured out why Peter put it directly in configure.in in the first
>> place; that means it is actually hard-coded in two files (configure.in
>> and configure) which is a recipe for trouble.  Peter?

> The original reason was to make it available to non-C programs.

Sure, but we can do that by having configure read the data from
version.h and insert it into wherever else it needs to be.  This
puts the sed hackery into configure, which depends on sed anyway,
and not into the native-Win32 compilation process where there's
no easy way to do it.

> I think you can just define it empty since the only way it will be used
> (in the subset of things Win32 builds) is for psql --version output.

I don't much care for the idea of being unable to determine the version
of a Win32 psql.  Psql's backslash commands are sufficiently
version-specific that you can't really treat it as being the same
across all versions.

			regards, tom lane

Mon, 22 Jan 2001 12:08:57 -0500
Tom Lane <tgl@sss.pgh.pa.us>
Re: FW: Postgresql on win32 
Tom Lane writes:

> Actually, it might be easier to go back to keeping it in a file
> version.h (NOT .in) which configure could read it out of.  I never
> figured out why Peter put it directly in configure.in in the first
> place; that means it is actually hard-coded in two files (configure.in
> and configure) which is a recipe for trouble.  Peter?

The original reason was to make it available to non-C programs.  The
reason it was put in configure.in in particular was that the next Autoconf
upgrade would require that anyway.  (Well, nothing is required, but that's
kind of the way things were supposed to work.)

I think you can just define it empty since the only way it will be used
(in the subset of things Win32 builds) is for psql --version output.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


Mon, 22 Jan 2001 18:10:46 +0100 (CET)
Peter Eisentraut <peter_e@gmx.net>
Re: FW: Postgresql on win32 