On Thu, May 18, 2006 at 03:25:24PM +0300, Tomi Vainio wrote:
Hi,
I'm trying to compile dovecot under Solaris 10 with native Mysql support. Couple changes are needed before configure can detect and compile mysql support. Native Solaris Mysql is installed under /usr/sfw directory. Configure can't find libraries and when these are found -R runtime path is needed for linking. Also if library name is given before library path it can't find it.
These changes are needed for configure script line 29533 for i in /usr /usr/local /usr/local/mysql /usr/sfw; do
line 29548 LIBS="$LIBS -L$MYSQL_LIBDIR -R$MYSQL_LIBDIR"
I disagree with adding /usr/sfw to the default paths that are searched. what if you have another installation of it somewhere else and want to use that one? this approach closes doors for other sysadmins who may not wish to use /usr/sfw mysql.
the right way to do this is to set CPPFLAGS/CFLAGS/LDFLAGS in your environment when you call configure. configure will then find the libraries and headers in exactly where you've told it to.
leaving things to chance by trying to be smart about auto detecting stuff in configure is almost always fraught with danger, and at the very least it can make life difficult for others.
I am guessing that -R is not used because it is not portable across all platforms that Dovecot should be able to be built on. again, this is why you should use LDFLAGS.
"the administrator knows better than the configure script." :)
and I speak as someone who runs dovecot in a production Solaris environment (though without mysql). mmm, pkgsrc :)
grant.