Re: [INTERFACES] Re: Just some unfinished stuff.

From: Gerald Gryschuk <ggryschuk(at)scf(dot)sk(dot)ca>
To: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Gerald Gryschuk <gerald(dot)gryschuk(at)home(dot)com>, Byron Nikolaidis <byronn(at)insightdist(dot)com>, pgsql-interfaces <pgsql-interfaces(at)postgreSQL(dot)org>
Subject: Re: [INTERFACES] Re: Just some unfinished stuff.
Date: 1998-10-05 20:36:34
Message-ID: 36192DD2.A44EBB86@scf.sk.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Thomas G. Lockhart wrote:
> Ah! That's the source of our confusion! I install into
> /opt/postgres/current
> rather than into /usr/local, but do so by setting the PGROOT environment
> variable. I never have to specify any configure command-line options
> when I build. Which is a good thing since I sometimes build several
> times in a session as I'm developing backend code...

No this shouldn't have mattered, I was trying to write the configure
script around the fact people might not install to /usr/local/pgsql.
However, I don't see how PGROOT and PGLIB get in here. I looked at
the 6.4 files you sent and back at the 6.3 files and none of them
(that I could see) make reference to PGROOT etc. So... is this something
new or what? How do these environment variables override anything, maybe
in the Postgres distribution Makefile.global.in that you didn't send me?

>
> Now that I think about it, I also set PGLIB, so should make sure that
> the odbc installation uses that rather than POSTGRESDIR/lib.

Well I think I have a more "comprehensive" solution. Not that yours is
bad. But it misses one semi-important file, the odbcinst.ini. Your
changes
will leave its installation directory unchanged. So the configure.in
file
you sent me would still cause it to be installed in /usr/local/share
even
with your changes.

More below.

>
> It does look like this, but the top of configure.in has the line
>
> AC_PREFIX_DEFAULT(/usr/local)
>
> which pretty much sets everything which follows, and which is an
> unconditional assignment. So without command-line switches, that's where
> things went before my changes.

O.k. I see the problem now. The configure.in file that you sent was
based
on the first version I sent you. The second configure.in has changes
specifically
meant to overcome the problem your seeing, why this didn't occur to me
before I don't know. However, the changes I made to configure.in still
don't take into
account using the PGROOT etc. environment variables, so I had to make
changes to
the Makefile.global.in. I would be much happier if you could explain
exactly how these override anything.

Anyway, again see below for more on this.

> The only thing which still annoys me is having to carry the template
> directory inside interfaces/odbc. But I agree that it would be best to
> have the Postgres tree carrying the full psqlodbc sources so that
> someone can pick up just that part and carry it do a different client.
> I've thought about having a "make standalone" which creates a tarball
> with the template files included, but let's keep it simple (as-is) for
> this release.

Ask and you shall receive. I've made some more changes, had to anyway to
fix
your other problems. Note that I removed your changes to the GNUmakefile
for
the reason I mentioned above. I moved the possible use of PGROOT and
PGLIB to
the odbc Makefile.global using the only manner that I could think the
Postgres distribution files do it. As I said I'm still in a fog as to
how they exactly get used in the Postgres distribution but I think I
made
a good surmise.

Regardless, I had to make changes to the configure.in to fix the root
problem.
I also made changes so that we don't have to carry the templates
directory
around. Basically I added a variable to the odbc configure.in called
TEMPLATEDIR.
Depending on where the source is being built this will get set to
either,
TEMPLATEDIR=../../template (integrated build)
or
TEMPLATEDIR=./template (standalone, requires that the template
directory
be in the same directory as the odbc source)

I than simply added a variable SOURCES to the GNUmakefile.in which is a
list of
all the source files that are in the odbc directory, including the
Windows build
files etc.

Lastly I simply added the targets 'standalone' and 'integrated'.
'standalone' will
create a tar file with all the files in SOURCES than it backs up to the
Postgres
src directory and appends the Postgres 'template' directory.
'integrated' simply does
the first step.

Note that I also added a target 'distclean' which does 'clean' plus gets
rid of the
config.h GNUmakefile and Makefile.global.

Lastly could you please remove the READMEBYRONANDTHOMAS.txt file from
the distribution,
that was meant to be for your eyes only and than deleted or moved
anyway.

The changes I made can be found in the attached files,
configure.in,GNUmakefile.in
and Makefile.global.in.

After copying these files to the 'interfaces/odbc' directory don't
forget to do
an autoconf.

By the way you might like to do a 'make integrated', copy the resultant
tarball to any directory outside the Postgres distribution and see what
happens
when you go to configure it. Either that or just read the configure.in.

Oh yeah, do you think were ready to get rid of the old
Makefile/Makefile.unx stuff. If
you think we are maybe you shouldn't leave them in the release.
--
Gerald Gryschuk(ggryschuk(at)scf(dot)sk(dot)ca)
Programmer Analyst
Saskatoon Cancer Centre
((306)655-2746)

Attachment Content-Type Size
GNUmakefile.in text/plain 3.9 KB
Makefile.global.in text/plain 4.5 KB
configure.in text/plain 7.9 KB

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Gerald Gryschuk 1998-10-05 20:39:02 So sorry I didn't realize what I was doing.
Previous Message Massimo Dal Zotto 1998-10-05 19:59:33 Re: [HACKERS] TCL_ARRAYS code in libpgtcl is pretty seriously broken