automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ax_lib_mysql.m4 and -as-needed flag


From: Ralf Wildenhues
Subject: Re: ax_lib_mysql.m4 and -as-needed flag
Date: Sat, 30 Oct 2010 09:51:12 +0200
User-agent: Mutt/1.5.20 (2010-08-04)

Hello Sergio,

* Sergio Belkin wrote on Mon, Oct 25, 2010 at 07:44:20PM CEST:
>  I am using ax_lib_mysql.m4 in order to detect location of mysql libs,
>    but the problem is that LD_FLAGS is a mixed if LD_FLAGS and LIBS:
>    -rdynamic -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lssl
> -lcrypto
>    The problem is that I want only link against mysqlclient, so I want to
>    add "--as-needed" be honored, how can I do that?

Put -Wl,--as-needed before the whole list, and -Wl,--no-as-needed
afterwards?

I should note that this will not work if you're linking with libtool
and creating a shared library (which is a bug/limitation in libtool).

Hope that helps.

Cheers,
Ralf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]