Re: [PATCH] configure.ac: check for libnl-3 presence



On Tue, 2011-08-16 at 14:02 +0200, Daniel Mack wrote:
> The versioning of libnl is an utter mess, and in some environment,
> pkgconfig will fail to find headers and libraries due to newer .pc file
> name confusion. Ship around this by checking for both libnl-1.pc and
> libnl-3.0.pc.

Is this against git master or the libnl3 branch?

Dan

> Signed-off-by: Daniel Mack <zonque gmail com>
> ---
>  configure.ac |    9 ++++++++-
>  1 files changed, 8 insertions(+), 1 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 4e97904..106d221 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -312,7 +312,14 @@ else
>  fi
>  AC_DEFINE_UNQUOTED(NO_CONSOLEKIT, $no_ck, [Define to disable use of ConsoleKit])
>  
> -PKG_CHECK_MODULES(LIBNL, libnl-1 >= 1.0-pre8)
> +has_libnl=no
> +PKG_CHECK_MODULES(LIBNL, libnl-1 >= 1.0-pre8, has_libnl=yes, dummy=no)
> +PKG_CHECK_MODULES(LIBNL, libnl-3.0, has_libnl=yes, dummy=no)
> +
> +if (test "${has_libnl}" = "no"); then
> +	AC_MSG_ERROR(Netlink library is required)
> +fi
> +
>  AC_SUBST(LIBNL_CFLAGS)
>  AC_SUBST(LIBNL_LIBS)
>  NM_LIBNL_CHECK




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