Thread: Using pg_config
I was unable to build the libpq-based driver because it apparently makes some hard-coded assumptions about the installation paths which did not work on my system. It'd be better if pg_config were used to detect the installation paths. I've attached a patch for that here. I'm not sure how that works on Windows, though. Comments? -- Peter Eisentraut http://developer.postgresql.org/~petere/
Attachment
-----Original Message----- From: pgsql-odbc-owner@postgresql.org on behalf of Peter Eisentraut Sent: Tue 10/11/2005 10:16 AM To: pgsql-odbc@postgresql.org Subject: [ODBC] Using pg_config > I was unable to build the libpq-based driver because it apparently makes some > hard-coded assumptions about the installation paths which did not work on my > system. It'd be better if pg_config were used to detect the installation > paths. I've attached a patch for that here. I'm not sure how that works on > Windows, though. Comments? It's not a problem on Windows as we build using VC++ with win32.mak. We don't support Mingw builds as we don't currentlyhave any configure code to allow the use of the Microsoft DM instead of iODBC or unixODBC. Can you apply the patch, or shall I? Regards, Dave.
Hi Dave, could you please change the path's in win32.mak and psqlodbc.wxs (and other places) from: C:\Program Files\PostgreSQL\8.1\include to: %programfiles%\PostgreSQL\8.1\include since not everybody is installing Windows on C:\ and the path \Program Files\ is not always the same in different international installations. regards Johann
Dave Page wrote: > It's not a problem on Windows as we build using VC++ with win32.mak. > We don't support Mingw builds as we don't currently have any > configure code to allow the use of the Microsoft DM instead of iODBC > or unixODBC. I think this could be made to work if there is interest. It seems that the current driver manager detection code might be pretty useless anyway. Note that we don't even link with libodbcinst. All we need are the header files <sql.h> etc., which are the same everywhere. > Can you apply the patch, or shall I? I just did. -- Peter Eisentraut http://developer.postgresql.org/~petere/
> -----Original Message----- > From: Peter Eisentraut [mailto:peter_e@gmx.net] > Sent: 12 October 2005 09:16 > To: Dave Page > Cc: pgsql-odbc@postgresql.org > Subject: Re: [ODBC] Using pg_config > > Dave Page wrote: > > It's not a problem on Windows as we build using VC++ with win32.mak. > > We don't support Mingw builds as we don't currently have any > > configure code to allow the use of the Microsoft DM instead of iODBC > > or unixODBC. > > I think this could be made to work if there is interest. It > seems that > the current driver manager detection code might be pretty useless > anyway. Note that we don't even link with libodbcinst. All we need > are the header files <sql.h> etc., which are the same everywhere. I think it is worth doing given that we build PostgreSQL and Slony in mingw now. As you say, it shouldn't be too difficult. > > Can you apply the patch, or shall I? > > I just did. Thanks. Just in time for 08.01.0005 which was just tagged! Regards, Dave
Hi Dave, Even though I don't build the installer there are still seven occurences of: "C:\Program Files\PostgreSQL\8.1\... " /> in psqlodbcm.wxs. But I'm not sure whether a universal path will work here. And maybe SET VERSION="08.01.0006" in Make.bat is too optimistic. regards Johann