Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/2] package/sngrep: fix static build with gnutls
Date: Tue, 23 May 2017 16:27:42 +0200	[thread overview]
Message-ID: <20170523162742.23372fb2@free-electrons.com> (raw)
In-Reply-To: <20170520162751.30809-2-romain.naour@gmail.com>

Hello,

On Sat, 20 May 2017 18:27:51 +0200, Romain Naour wrote:

> diff --git a/package/sngrep/0003-configure.ac-switch-to-pkg-config-to-find-gnutls.patch b/package/sngrep/0003-configure.ac-switch-to-pkg-config-to-find-gnutls.patch
> new file mode 100644
> index 0000000..67b21a2
> --- /dev/null
> +++ b/package/sngrep/0003-configure.ac-switch-to-pkg-config-to-find-gnutls.patch
> @@ -0,0 +1,60 @@
> +From b0428b0279b03d88520b79b651f692d9aea65f8c Mon Sep 17 00:00:00 2001
> +From: Romain Naour <romain.naour@gmail.com>
> +Date: Sat, 20 May 2017 15:00:16 +0200
> +Subject: [PATCH] configure.ac: switch to pkg-config to find gnutls.

This patch looks good, but the description could use some improvement.

> +Like for openssl in patch [1] and for the same reason,
> +use pkg-config to find gnutls.
> +
> +gnutls can be linked with :
> +    -lintl -lgmp -lunistring -lhogweed -lnettle -ltasn1 -lz

And ?

> ++	AC_PATH_PROG([LIBGCRYPT_CONFIG],[libgcrypt-config],[no])
> ++	if test "x${LIBGCRYPT_CONFIG}" = "xno"; then
> ++	    AC_MSG_FAILURE([libgcrypt-config not found in PATH])

Use AC_MSG_ERROR() here.

> ++	fi
> ++	AC_CHECK_LIB(
> ++		[gcrypt],
> ++		[gcry_md_map_name],
> ++		[LIBGCRYPT_CFLAGS="`${LIBGCRYPT_CONFIG} --cflags`"
> ++		LIBGCRYPT_LIBS="`${LIBGCRYPT_CONFIG} --libs`"
> ++		],
> ++		[AC_MSG_ERROR([ You need to have libgcrypt installed to compile sngrep])],
> ++		[`${LIBGCRYPT_CONFIG} --libs --cflags`]
> ++		)

I don't understand what you're doing here. What about instead:

 - If LIBGCRYPT_CONFIG != no, use it to assign LIBGCRYPT_{CFLAGS,LIBS}

 - If LIBGCRYPT_CONFIG == no, fall back to AC_CHECK_LIB

What do you think ?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2017-05-23 14:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-20 16:27 [Buildroot] [PATCH 1/2] package/sngrep: add libgcrypt missing dependencies Romain Naour
2017-05-20 16:27 ` [Buildroot] [PATCH 2/2] package/sngrep: fix static build with gnutls Romain Naour
2017-05-23 14:27   ` Thomas Petazzoni [this message]
2017-05-23 21:20     ` Romain Naour
2017-05-24  6:47       ` Thomas Petazzoni
2017-05-24 21:54         ` Romain Naour
2017-05-25  9:02           ` Bernd Kuhls
2017-05-25 16:32             ` Romain Naour
2017-05-23 14:19 ` [Buildroot] [PATCH 1/2] package/sngrep: add libgcrypt missing dependencies Thomas Petazzoni
2017-05-23 21:09   ` Romain Naour
2017-05-24  6:44     ` Thomas Petazzoni
2017-05-24 19:41       ` Romain Naour

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=20170523162742.23372fb2@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox