Re: [Powertop] [PATCH] configure: First try to use libnl-3, then libnl-2, then libnl-1

Chris Ferron <chris.e.ferron at linux.intel.com> Mon, 30 Jul 2012 09:08:54 -0700
Newsgroups dev.linux.lists.powertop
Message-ID <[email protected]>
On 07/30/2012 06:55 AM, Igor Zhbanov wrote:
> Change search order for libnl in configure.ac:
> first try to use libnl-3, then libnl-2, then libnl-1.
> ---
>   configure.ac |   13 +++++++------
>   1 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 3f5775f..552626c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -53,12 +53,13 @@ PKG_CHECK_MODULES([PCIUTILS], [libpci],[has_libpci=1],[
>    
>   
>   has_libnl_ver=0
> -PKG_CHECK_MODULES([LIBNL], [libnl-1], [has_libnl_ver=1], [
> -	AC_SEARCH_LIBS([nl_socket_alloc], [nl], [has_libnl_ver=2], [
> -		     PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0], [has_libnl_ver=3],
> -				       [AC_SEARCH_LIBS([nl_socket_alloc], [nl-3 nl-genl-3], [has_libnl_ver=3], [], [])])
> -	], [])
> -])
> +PKG_CHECK_MODULES([LIBNL], [libnl-3.0 libnl-genl-3.0], [
> +	has_libnl_ver=3], [
> +	AC_SEARCH_LIBS([nl_socket_alloc], [nl-3 nl-genl-3], [
> +		has_libnl_ver=3], [
> +		AC_SEARCH_LIBS([nl_socket_alloc], [nl], [
> +			has_libnl_ver=2], [
> +			PKG_CHECK_MODULES([LIBNL], [libnl-1], [has_libnl_ver=1], [])])])])
>   if (test "$has_libnl_ver" -eq 0); then
>   	AC_MSG_ERROR(libnl is required but not found)
>   fi
Patch merged
Thank You