vlc-0002-configure.ac-add-check-for-libgcrypt-config-program.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From 88bf3313850bc7f0e6db21daee2b8d8e607b7bb4 Mon Sep 17 00:00:00 2001
  2. From: Samuel Martin <s.martin49@gmail.com>
  3. Date: Sat, 8 Feb 2014 14:33:27 +0100
  4. Subject: [PATCH] configure.ac: add check for libgcrypt-config program
  5. This allows to override the default libgcrypt-config location (which is
  6. useful when cross-compiling), instead of using the one from the host
  7. system.
  8. Signed-off-by: Samuel Martin <s.martin49@gmail.com>
  9. ---
  10. configure.ac | 9 +++++----
  11. 1 file changed, 5 insertions(+), 4 deletions(-)
  12. diff --git a/configure.ac b/configure.ac
  13. index 02fb8aa..5a2267b 100644
  14. --- a/configure.ac
  15. +++ b/configure.ac
  16. @@ -3943,16 +3943,17 @@ dnl
  17. AC_ARG_ENABLE(libgcrypt,
  18. [ --disable-libgcrypt gcrypt support (default enabled)])
  19. AS_IF([test "${enable_libgcrypt}" != "no"], [
  20. + AC_PATH_PROG(GCRYPT_CONFIG,libgcrypt-config,libgcrypt-config)
  21. AC_CHECK_DECL([GCRYCTL_SET_THREAD_CBS], [
  22. - libgcrypt-config --version >/dev/null || \
  23. + ${GCRYPT_CONFIG} --version >/dev/null || \
  24. AC_MSG_ERROR([gcrypt.h present but libgcrypt-config could not be found])
  25. AC_CHECK_LIB(gcrypt, gcry_control, [
  26. have_libgcrypt="yes"
  27. - GCRYPT_CFLAGS="`libgcrypt-config --cflags`"
  28. - GCRYPT_LIBS="`libgcrypt-config --libs`"
  29. + GCRYPT_CFLAGS="`${GCRYPT_CONFIG} --cflags`"
  30. + GCRYPT_LIBS="`${GCRYPT_CONFIG} --libs`"
  31. ], [
  32. AC_MSG_ERROR([libgcrypt not found. Install libgcrypt or use --disable-libgcrypt. Have a nice day.])
  33. - ], [`libgcrypt-config --libs`])
  34. + ], [`${GCRYPT_CONFIG} --libs`])
  35. ], [
  36. AC_MSG_ERROR([libgcrypt version 1.1.94 or higher not found. Install libgcrypt or use --disable-libgcrypt. Have a nice day.])
  37. ], [#include <gcrypt.h>]
  38. --
  39. 1.8.5.4