You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Omayre Zahid <oz...@gmail.com> on 2008/06/06 22:43:13 UTC

How to build library without explicitly linking to APR and APR-UTIL?

Is there a way to build log4cxx under linux, without explicitly linking to
APR and APR-UTIL? In other words, when I type "ldd log4cxx.so", both of
those libraries will not be shown. I have tried a few of the flags, but no
luck.

Thanks

Re: How to build library without explicitly linking to APR and APR-UTIL?

Posted by Curt Arnold <ca...@apache.org>.
On Jun 6, 2008, at 3:43 PM, Omayre Zahid wrote:

> Is there a way to build log4cxx under linux, without explicitly  
> linking to APR and APR-UTIL? In other words, when I type "ldd  
> log4cxx.so", both of those libraries will not be shown. I have tried  
> a few of the flags, but no luck.
>
> Thanks

If you disable building shared libraries when you build APR and APR- 
Util, I believe log4cxx would link with the static libraries which  
will eliminate the dependency on the shared libraries:

cd apr
./configure --enable-shared=no
make clean
make
cd ../apr-util
./configure --enable-shared=no
make clean
make
cd ../log4cxx
./configure --with-apr=../apr --with-apr-util=../apr-util
make

There may be other ways, but I think that would work.