[tpop3d-discuss] --enable-mysql-auth configure failure.
Mark Longair
mark at ideaworks3d.com
06 Aug 2001 17:45:28 +0100
Chris Lightfoot <chris@ex-parrot.com> writes:
[..]
> That's no problem -- I'm not worried about figuring out
> which library contains compress/uncompress, simply
> answering the question `does -lmysqlclient require -lz?'
>
> Admittedly we could just change the configure script to
> put -lz in whatever happens. But that's ugly.
>
> Mark-- any thoughts?
One way of looking at this (which gets mentioned on the autoconf list
whenever it comes up) is that AC_CHECK_LIB isn't very useful, since it
always links against the libraries listed in the `other libraries'
argument. Erez Zadok has a version (called AC_CHECK_LIB2) of this macro
that instead only adds the other libraries to LIBS if the initial test
fails but it then succeeds with the other libraries.
I think this is probably what we want, but I may have misunderstood the
problem because of the rather fractured beginning of the thread.
Could someone with one of these `-lmysqlclient requires -lz' systems
test this? You need to apply the diff below and add:
http://iw3d.co.uk/~mark/check_lib2.m4
... in the config directory.
cheers
mark
P.S. Sorry for taking so long to reply, I suddenly noticed I had 50
unread tpop3d messages waiting...
Index: Makefile.am
===================================================================
RCS file: /home/cvs/tpop3d/Makefile.am,v
retrieving revision 1.16
diff -u -r1.16 Makefile.am
--- Makefile.am 2001/07/24 00:08:10 1.16
+++ Makefile.am 2001/08/06 16:37:31
@@ -85,3 +85,5 @@
MAINTERCLEANFILES = Makefile.in aclocal.m4 configure configuration.h.in \
stamp-h.in
+
+ACLOCAL = aclocal -I @ac_aux_dir@
Index: bootstrap
===================================================================
RCS file: /home/cvs/tpop3d/bootstrap,v
retrieving revision 1.1
diff -u -r1.1 bootstrap
--- bootstrap 2001/04/13 18:05:12 1.1
+++ bootstrap 2001/08/06 16:37:31
@@ -1,7 +1,7 @@
#! /bin/sh
set -x
-aclocal
+aclocal -I config
# libtoolize --force --copy
autoheader
automake --foreign --add-missing --copy
Index: configure.in
===================================================================
RCS file: /home/cvs/tpop3d/configure.in,v
retrieving revision 1.17
diff -u -r1.17 configure.in
--- configure.in 2001/07/20 11:47:28 1.17
+++ configure.in 2001/08/06 16:37:31
@@ -320,7 +320,7 @@
if test x"$enable_auth_mysql" = x"yes"
then
- AC_CHECK_LIB(mysqlclient, main, [], AC_MSG_ERROR([[vmail-sql authentication enabled, but can't find libmysqlclient]]) )
+ AC_CHECK_LIB2(mysqlclient, main, [], AC_MSG_ERROR([[vmail-sql authentication enabled, but can't find libmysqlclient]]), -lz )
fi
dnl Checks for header files.