[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Setting autotools for static compilation
From: |
Paulo J. Matos |
Subject: |
Setting autotools for static compilation |
Date: |
Sat, 29 Apr 2006 12:15:47 +0100 |
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
- Setting autotools for static compilation,
Paulo J. Matos <=