Sat 18 Dec 2010 07:15:50 PM UTC, comment #3:
Hi Peter,
Thanks for your answer. I've made the mistake of sending the reverse patch. Here is the right patch.
The bug is that if you use the macro twice o more times LIBS variable is equivalent to the last library found.
For example:
AX_EXT_HAVE_LIB([/lib64 /lib /usr/lib64 /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib],resolv,inet_net_pton)
AX_EXT_HAVE_LIB([/lib64 /lib /usr/lib64 /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib],pthread,pthread_create)
AX_EXT_HAVE_LIB([/lib64 /lib /usr/lib64 /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib],crypto,X509_free)
AX_EXT_HAVE_LIB(/lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /usr/local/lib64/ssl /usr/lib/ssl , ssl, SSL_library_init)
AX_EXT_HAVE_LIB(/lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /usr/local/lib64/mysql /usr/lib64/mysql /usr/lib/mysql, mysqlclient, mysql_close, [])
AX_EXT_HAVE_LIB(/lib64 /lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /usr/local/lib64/postgresql /usr/lib/postgresql , pq, PQfinish)
It ends with:
LIBS=-lpq
The change:
-new_libs="-l$2 ${new_libs}"
+new_libs="-l$2 $4"
It's a workaround when otherwise you get repeated entries of libraries on variable LIBS. That workaround doesn't work if you haven't neither mysql devel nor postgresql devel files in the example above .
Greetings
Sergio Belkin
(file #22227)
|