[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The havelib module
From: |
Simon Josefsson |
Subject: |
Re: The havelib module |
Date: |
Mon, 02 Feb 2009 21:18:14 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) |
Sylvain Beucler <address@hidden> writes:
> Hi,
>
> I'm trying to implement simply a '--with-mylib=/path/to/mylib' option
> in 'configure', and I'm wondering if the 'havelib' would help.
Hi. I believe it does.
> However I don't really understand how it's meant to be
> used. Apparently its m4 macros need to be used within a macro
> definition?
>
> Can you explain me basically what it does and how to use it?
> (is it even meant for external use?)
I'm using it in some projects which aren't using gnulib otherwise, such
as for example libssh2:
http://www.libssh2.org/wiki/index.php/Main_Page
http://libssh2.cvs.sourceforge.net/viewvc/libssh2/libssh2/
Typically you add the lib-ld.m4, lib-link.m4, and lib-prefix.m4 macros
to your project's m4/ directory, and add something like this to
configure.ac:
AC_LIB_HAVE_LINKFLAGS([ssl], [crypto], [#include <openssl/ssl.h>])
...
AC_LIB_HAVE_LINKFLAGS([gcrypt], [], [#include <gcrypt.h>])
...
AC_LIB_HAVE_LINKFLAGS([z], [], [#include <zlib.h>])
Then add to *_LDFLAGS the automake variables, e.g.:
libssh2_la_LDFLAGS = $(VERSION) -no-undefined \
$(LTLIBGCRYPT) $(LTLIBSSL) $(LTLIBZ)
See complete usage in:
http://libssh2.cvs.sourceforge.net/viewvc/libssh2/libssh2/configure.in?revision=1.63&view=markup
http://libssh2.cvs.sourceforge.net/viewvc/libssh2/libssh2/src/Makefile.am?revision=1.13&view=markup
Of course, you may use gnulib-tool to import the files too, to avoid
manual work. But the files are relatively stable and have been tested
on many platforms already.
Read the *.m4 files, they contain documentation for the various macros
you may use.
/Simon
- The havelib module, Sylvain Beucler, 2009/02/02
- Re: The havelib module,
Simon Josefsson <=
- Re: The havelib module, Sylvain Beucler, 2009/02/06
- Re: The havelib module, Simon Josefsson, 2009/02/06
- Re: The havelib module, Sylvain Beucler, 2009/02/07
- Re: The havelib module, Simon Josefsson, 2009/02/07
- Re: The havelib module, Sylvain Beucler, 2009/02/07
- Re: The havelib module, Simon Josefsson, 2009/02/07
- Re: The havelib module, Sylvain Beucler, 2009/02/07
- Re: The havelib module, Simon Josefsson, 2009/02/07
- Re: The havelib module, Eric Blake, 2009/02/07
- Re: The havelib module, Sylvain Beucler, 2009/02/07