Wireshark-dev: Re: [Wireshark-dev] ligcrypt version (Ubuntu)
From: Pascal Quantin <pascal.quantin@xxxxxxxxx>
Date: Thu, 10 Mar 2016 07:42:43 +0100
Hi,

2016-03-09 23:47 GMT+01:00 Guy Harris <guy@xxxxxxxxxxxx>:
On Mar 9, 2016, at 2:26 PM, Mike Morrin <morrinmike@xxxxxxxxx> wrote:

> I was intending to do the version check inside the dissector source file, that seems easier than putting an exceptional case into the make system.

If, for example libcrypto supplies a #define you can check, so you can just do it with an #ifdef in the dissector, without any checking needed by the configure script or CMake, that's fine.

packet-pdcp-lte.c is using the following define for this purpose:
#if (defined GCRYPT_VERSION_NUMBER) && (GCRYPT_VERSION_NUMBER >= 0x010600)

You sould also use HAVE_LIBGCRYPT define to exclude useless code for those who would not have libgcrypt installed at all.

Regards,
Pascal.