Re: adding db2 support



"Peter C. Norton" wrote:
> 
> I'm starting to add support for IBM's db2 to gnome-db, but I'm having
> trouble at the outset getting automake to generate the makefile I'll need.
> Can anyone help me get a leg up on automake here?
> 
There are 2 steps on this:

1) you should add a check in configure.in as it is done for the other
providers (--with-mysql, --with-postgres, etc). Then, in the AC_OUTPUT
macro (at the end of the configure.in file, you must a line such as
	gda-db2-server/Makefile
Then, when running ./configure, pass it the --with-db flag, so that the
includes and libs are detected.

2) Then, you must add a Makefile.am file to the gda-db2-server
directory. Have a look at the other providers to see how this is done.
It is important that you define in configure.in the DB2_INCLUDES and
DB2_LIBS variables (just look, for example, for POSTGRES_INCLUDES, and
add a similar line for DB2_INCLUDES, and the same for POSTGRES_LIBS and
DB2_LIBS). Then, just add the DB2_INCLUDES variable to the INCLUDES var
in Makefile.am, and DB2_LIBS to the gda_db2_srv_LDADD variable.

Another important thing, please use the gda-ldap or gda-interbase
providers (although they're empty) as a reference. Don't try to do it as
the other providers, as we're now moving to use the libgda-server
library in the providers. And note that this lib is in development, so
please report any bug you find.

And, thanks very much for doing this! As soon as you send me some code,
I'll ask for a CVS account for you.

Cheers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]