Re: using autotools for a library project

aaragon <[email protected]>
Newsgroups gmane.comp.gnu.utils
Organization http://groups.google.com
Message-ID <[email protected]>
On Oct 19, 1:24 pm, Ralf Wildenhues <[email protected]> wrote:
> Hello Alejandro,
>
> * aaragon wrote on Fri, Oct 19, 2007 at 06:09:29AM CEST:
>
> > Hi everyone, I'm new in this group so I hope this is the right place
> > to ask this question.
> > I'm using autotools to write a library and now it seems that I need to
> > use another library (the gmp for arbitrary precision arithmetic). Now,
> > the problem is that when I create my library, all the functions that I
> > use from the gmp are not "saved" in my library.
>
> That's normal, and to be expected.  Are you talking about static or
> shared libraries, by the way?  Do you use Libtool?
>
> > Therefore, when I
> > install the library on a different machine, it complains that it
> > cannot find the gmp library or that the library has not the same
> > version.
>
> The usual way to solve this is to require the user to install gmp first.
> It's common to add a test to configure that checks for installed library
> and header files.  If I recall correctly, then the gmp distribution
> provides a macro that you can use for this.
>
> > So, I was wondering if there is a way to put the gmp functions that I
> > use in my own library, like a bundle so I don't need to have the gmp
> > library on other machines.
>
> That would be rather uncommon.
>
> > Thanks for any suggestions. I apologize if this is not the right place
> > to ask this, but I didn't find a more autotools related group and I
> > found some questions posted.
>
> It's sure ok here.  {autoconf,automake,[email protected] exist, but from
> the generality of your question it's not clear which of those lists
> would be most appropriate.  As long as you don't cross-post, you could
> have picked either one of those.
>
> Hope that helps.
>
> Cheers,
> Ralf

Thanks Ralf for replying. I guess you're right and I will have to use
some checks to configure the library. I'm using libtool for this and
I'm creating a static librar .a. Could you expand on the differences
between static and dynamic libraries? Or forward me a link where I can
see the differences?
Once again, I appreciate your comments.

a²
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.