Hi all,

we've received bad marks from some Debian developers, see

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493349

The problems are twofold:

1) the Freetds configure checks look for the wrong library. This is
trivial to fix.

2) the library checks themselves are called "utterly wrong" and
"absurd". The AC_FIND_FILE macro used in all of these tests is called
"reinventing the wheel - poorly"

We should try not to be offended by the language (which tends to be
hard among developers to be heard at all) as Steve has a good point
here. The code used in acinclude.m4 has been copied around many times
(also by myself, among others) and was apparently developed eons ago
to work around some issues with antique autotools versions. I think
its about time to rewrite the stuff using today's capabilities of the
autotools and of compilers and linkers.

I've tried to address this issue with these changes:

1) I've rewritten the MySQL and PostgreSQL checks using the
mysql_config and pg_config utilities, respectively. These tools allow
to retrieve the appropriate compiler and linker switches without
having to do any guesswork.

2) I've rewritten other tests (SQLite, SQLite3, mSQL, Firebird,
Freetds) using standard macros (AC_CHECK_HEADER) or more sane custom
macros (AC_SEARCH_LIBS_VAR). These tests check only the default
locations unless the --with-xy-incdir or --with-xy-libdir switches are
used. This is reasonable with these drivers as the headers and
libraries are usually installed in default directories (not in some
subdirectory as e.g. MySQL does). However, this means that we have to
take care of OS oddities somewhere else. E.g. FreeBSD does not include
the /usr/local/ hierarchy into the compiler and linker search paths by
default - but that's where all database engine headers and libraries
end up. To fix this, we have to extend the host check section in
configure.in to set CFLAGS, CPPFLAGS, and LDFLAGS appropriately. While
being at it, I've also made sure these variables pick up whatever you
may have set in your environment.

Now there's some more work to do. I do not have access to Oracle and
Ingres databases. Both seem to install their headers and libraries in
odd places. Anyone with access to these engines, please let me know
whether these engines ship a xy_config tool, or suggest other
mechanisms to get rid of AC_FIND_FILE.

Also, we'll have to test the build system on as many operating systems
as possible. We may have to do some porting again, but this should now
be restricted to the host checks in configure.in. I can cover FreeBSD,
Debian GNU/Linux, and Windows/Cygwin. I need help for all other
platforms.

To simplify your (greatly appreciated) input, I've prepared a
prerelease from the current cvs version:

http://libdbi.sourceforge.net/downloads/libdbi-drivers-1.0-pre2.tar.gz

There is no need to install or test drive the code at this time
(although you may of course do so). All you need to do is to configure
and to build this prerelease and report any weird output of configure
or of make. And of course any suggestions to further improve the
checks are very welcome.

regards,
Markus


-- 
Markus Hoenicka
[EMAIL PROTECTED]
(Spam-protected email: replace the quadrupeds with "mhoenicka")
http://www.mhoenicka.de

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libdbi-drivers-devel mailing list
Libdbi-drivers-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel

Reply via email to