On Wed, 2007-11-28 at 07:04 -0800, snowcrash wrote:
Doesn't it have -lmysqlclient at all?
on this box, yes, it does: ..
Should I just add another -lmysqlclient_r check and use it if -lmysqlclient isn't found?
you can add a conditional ... but, imho, you need the option to _specify_ using the threaded libs,not just fallback to them.
Since Dovecot doesn't use threads, why do you want to link with mysqlclient_r then?
setenv LDFLAGS "-L/usr/local/db46/lib -L/usr/local/sqlite/lib -lsqlite3 -L/usr/local/mysql/lib/mysql -L/usr/local/lib -liconv" .. iirc, the "--with-sqlite" config option does not take a DIR arg. so to tell it where, LDFLAGS are req'd.
The -L parameters are good enough in there, but isn't -lsqlite3 added automatically? If not, put it to SQL_LIBS instead if LDFLAGS.
aha -- SQL_LIBS.
you might wish to add mention of that to: ... personally, i find it a lot LESS confusing than having to dig for / guess if an env var SQLITE3_LIBS exists ...
You don't have to use SQL_LIBS for anything else except -lsqlite3, if you really want to add that. --with-sqlite=/path wouldn't go adding -lsqlite3 anywhere either, so it wouldn't help.
I think as a user it's a lot easier to use and understand if you're just instructed to say:
CPPFLAGS=-I/usr/local/include LDFLAGS=-I/usr/local/lib ./configure
instead of:
./configure --with-mysql=/usr/local --with-sqlite=/usr/local --with-pgsql=/usr/local --with-ten-other-packages=/usr/local
And then you'll have 13 -I/usr/local/include and -L/usr/local/lib parameters, unless of course I add more code to remove those.
--with-mysql=DIR DIR is the install prefix
Binary packages sometimes install things to different locations than a standard installation. Like the header might not be in /usr/include/, but in /usr/include/package/. For that case this doesn't really work.
or 'all three'
--with-mysql=DIR DIR is the install prefix --with-mysql-libs=DIR overrides the DIR where libmysqlclient(_r).* is --with-mysql-includes=DIR overrides the DIR where mysql.h is
And lots of bloat to both configure code and ./configure --help..
or some such.
They just modify the generic CPPFLAGS/LDFLAGS
only if you defined it that way. one can readily defined --with-mysql=$var, then assign DOVECOT_MYSQL_LIBS=$/var/mysql/libs (e.g), and use it specifically, rather than the generic/global LDFLAGS
-I and -L don't really matter if they're in global CPPFLAGS/LDFLAGS.