From: Joe Konno <joe.konno at linux.intel.com>
To: powertop@lists.01.org
Subject: Re: [Powertop] [PATCH v3 02/15] configure: prefer AS_IF macro rather than shell if statement
Date: Tue, 14 Oct 2014 16:29:17 -0700 [thread overview]
Message-ID: <543DB1CD.1080701@linux.intel.com> (raw)
In-Reply-To: 1410125238-29600-3-git-send-email-kerolasa@iki.fi
[-- Attachment #1: Type: text/plain, Size: 2065 bytes --]
LGTM.
Reviewed-By: Joe Konno <joe.konno(a)intel.com>
On 09/07/2014 02:27 PM, Sami Kerola wrote:
> Jumping in between shell and m4 syntaxes makes reading the code more
> difficult, so stick to m4 when ever possible.
>
> Signed-off-by: Sami Kerola <kerolasa(a)iki.fi>
> ---
> configure.ac | 20 +++++++++++---------
> 1 file changed, 11 insertions(+), 9 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index b41cfb3..4991d97 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -108,23 +108,25 @@ dnl libnl-2 provides only libnl-2.0.pc file, so we check for separate
> dnl libnl-genl-3.0.pc pkg-config file just for libnl-3.0 case.
> PKG_CHECK_MODULES([LIBNL], [libnl-3.0 >= 3.0 libnl-genl-3.0 >= 3.0], [has_libnl_ver=3], [
> PKG_CHECK_MODULES([LIBNL], [libnl-2.0 >= 2.0], [has_libnl_ver=2], [
> - PKG_CHECK_MODULES([LIBNL], [libnl-1], [has_libnl_ver=1], [has_libnl_ver=0])])])
> -if (test "$has_libnl_ver" -eq 0); then
> - AC_MSG_ERROR(libnl and libnl-genl are required but were not found)
> -fi
> -if (test "$has_libnl_ver" -gt 1); then
> + PKG_CHECK_MODULES([LIBNL], [libnl-1], [has_libnl_ver=1], [has_libnl_ver=0])
> + ])
> +])
> +AS_IF([test "$has_libnl_ver" -eq 0], [
> + AC_MSG_ERROR([libnl and libnl-genl are required but were not found])
> +])
> +AS_IF([test "$has_libnl_ver" -gt 1], [
> AC_DEFINE([HAVE_LIBNL20], [1], [Define if you have libnl-2.0 or higher])
> -fi
> +])
>
> -if (test "$has_libpci" -eq 0); then
> - AC_DEFINE([HAVE_NO_PCI],[1],[Define if pci is not supported])
> +AS_IF([test "$has_libpci" -eq 0], [
> + AC_DEFINE([HAVE_NO_PCI], [1], [Define if pci is not supported])
> AC_MSG_WARN([
> ************* LIBPCI SUPPORT NOT CONFIGURED**************
> If you need or want pci support, please install libpci
> and re-configure PowerTOP.
> *********************************************************
> ])
> -fi
> +])
>
> AC_SEARCH_LIBS([pthread_create], [pthread], [], [
> AC_MSG_ERROR([libpthread is required but was not found])
>
next reply other threads:[~2014-10-14 23:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-14 23:29 Joe Konno [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-09-07 21:27 [Powertop] [PATCH v3 02/15] configure: prefer AS_IF macro rather than shell if statement Sami Kerola
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=543DB1CD.1080701@linux.intel.com \
--to=powertop@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.