Setting autotools for static compilation

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

 



ATT: Cross-sent to automake and autoconf MLs since problem spans both
worlds, I think!

Hi all,

I'm currently using autoconf for the for my libraries with
AC_CHECK_LIB, and to generate static binaries I do everytime I
configure:
./configure LDFLAGS="-static"

However, in google groups:
http://groups.google.com/group/gnu.g++.help/browse_frm/thread/2144e5bd146e9cfe
Paul Pluzhnikov told that it was not the best way to do this. Instead
of using -static I should do:
-Wl,-Bstatic -llog4cpp -lglpk -Wl,-Bdynamic
(because I was using log4cpp and glpk at the time)

So in general I should do:
-Wl,-Bstatic <LIBS> -Wl,-Bdynamic

My question is, Is there a way to configure this efficiently in
autotools, so that whenever I add a check for a LIB it is also added
to that line for static linking?

Thanks in advance,
--
Paulo Jorge Matos - pocm at sat inesc-id pt
Web: http://sat.inesc-id.pt/~pocm
Computer and Software Engineering
INESC-ID - SAT Group


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux