[tpop3d-discuss]Re: Compiling with mysql support

James Gurney james at globalmegacorp.org
Thu, 13 May 2004 18:49:11 -0700


On 5/11/2004 7:07 AM, Dom Gallagher wrote:
> an editor, find the LIBS line (will look something like : LIBS = 
> -lmysqlclient -lcrypt -lnsl -lsocket -lm') and add '-lz' to the end and 
> run make again.  You may find you need to manually add -lm too, 
> depending on how configure goes. :)

See, here's the thing.. there are two locations where -lmysqlclient 
exists in the configure script. By default, they look like this:

root@devious:/home/compile/tpop3d-1.5.3# grep -n LIBS.*lmysqlclient 
configure
3829:LIBS="-lmysqlclient $LIBS"
3869: LIBS="-lmysqlclient -lz  $LIBS"

So the -lz is already there once. Tried adding it to the other one, but 
it still isn't using it when the configure runs. The log shows:

configure:7077: gcc -o conftest -g -O2 
-I/usr/local/mysql-3.23.49a-pc-linux-gnu-i686/include -I/usr/include 
-L/lib -L/usr/lib conftest.c -lssl -lmysqlclient -lcrypt  >&5

If I manually grab the chunk of test code from the configure script, 
dump it in a .c file and compile it with -lz, it works fine (and returns 
the expected error if I compile without -lz).

So there's something screwy going on with the configure script, but I'm 
damned if I can work out what it is.. Anyone?

James