From c043de3261b6e14f2446b2cd9d62dde5860d4720 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Mon, 3 May 2010 12:37:25 +0200 Subject: [PATCH] configure: sha1: check libsha1 using pkg-config instead Previously the code was using AC_CHECK_LIB, guaranteeing whether the library is correct by tracking sha1_begin function. This paranoic checking is not necessary given there's only one libsha1 in the market, which surely contains such function. Moreover, this patch now improves a bit the sha1 implementation checking behavior using pkg-config to find the right flags that needs to link against. Signed-off-by: Tiago Vignatti Reviewed-by: Mikhail Gusarov --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b5b638af6..8976319ec 100644 --- a/configure.ac +++ b/configure.ac @@ -1380,7 +1380,7 @@ if test "x$with_sha1" = xlibmd; then [Use libmd SHA1 functions]) SHA1_LIBS=-lmd fi -AC_CHECK_LIB([sha1], [sha1_begin], [HAVE_LIBSHA1=yes]) +PKG_CHECK_MODULES([LIBSHA1], [sha1], [HAVE_LIBSHA1=yes], [HAVE_LIBSHA1=no]) if test "x$with_sha1" = x && test "x$HAVE_LIBSHA1" = xyes; then with_sha1=libsha1 fi