From 059c572ca5c0f3ac9d90c53f0c0bdc8e4fb0336f Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 30 Mar 2012 14:30:08 -0400 Subject: buildsys: use pkg-config for libarchive detection This also introduces a versioned dependency of >=2.8.0. Signed-off-by: Dave Reisner --- configure.ac | 6 +++--- lib/libalpm/Makefile.am | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 2fa7634c..1f265cb5 100644 --- a/configure.ac +++ b/configure.ac @@ -153,8 +153,8 @@ AC_CHECK_LIB([m], [fabs], , AC_MSG_ERROR([libm is needed to compile pacman!])) # Check for libarchive -AC_CHECK_LIB([archive], [archive_read_data], , - AC_MSG_ERROR([libarchive is needed to compile pacman!])) +PKG_CHECK_MODULES(LIBARCHIVE, [libarchive >= 2.8.0], , + AC_MSG_ERROR([*** libarchive >= 2.8.0 is needed to compile pacman!])) # Check for OpenSSL have_openssl=no @@ -412,7 +412,7 @@ ${PACKAGE_NAME}: preprocessor flags : ${CPPFLAGS} compiler flags : ${CFLAGS} defines : ${DEFS} - library flags : ${LIBS} ${LIBSSL_LIBS} + library flags : ${LIBS} ${LIBSSL_LIBS} ${LIBARCHIVE_LIBS} linker flags : ${LDFLAGS} Architecture : ${CARCH} diff --git a/lib/libalpm/Makefile.am b/lib/libalpm/Makefile.am index 8d1be908..3773f2df 100644 --- a/lib/libalpm/Makefile.am +++ b/lib/libalpm/Makefile.am @@ -67,10 +67,12 @@ libalpm_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION_INFO) @LIBCURL@ libalpm_la_CFLAGS = \ $(AM_CFLAGS) \ + $(LIBARCHIVE_CFLAGS) \ $(LIBSSL_CFLAGS) libalpm_la_LIBADD = \ $(LTLIBINTL) \ + $(LIBARCHIVE_LIBS) \ $(LIBSSL_LIBS) # vim:set ts=2 sw=2 noet: -- cgit v1.2.3-24-g4f1b