Blame SOURCES/aide-0.16-Use-LDADD-for-adding-curl-library-to-the-linker-comm.patch

21eb16
From c7caa6027c92b28aa11b8da74d56357e12f56d67 Mon Sep 17 00:00:00 2001
21eb16
From: =?UTF-8?q?Daniel=20Kope=C4=8Dek?= <dkopecek@redhat.com>
21eb16
Date: Wed, 20 Feb 2019 12:00:56 +0100
21eb16
Subject: [PATCH] Use LDADD for adding curl library to the linker command
21eb16
21eb16
---
21eb16
 Makefile.am  | 2 +-
21eb16
 configure.ac | 5 +++--
21eb16
 2 files changed, 4 insertions(+), 3 deletions(-)
21eb16
21eb16
diff --git a/Makefile.am b/Makefile.am
21eb16
index 4b05d7a..1541d56 100644
21eb16
--- a/Makefile.am
21eb16
+++ b/Makefile.am
21eb16
@@ -55,7 +55,7 @@ if USE_CURL
21eb16
 aide_SOURCES += include/fopen.h src/fopen.c
21eb16
 endif
21eb16
 
21eb16
-aide_LDADD = -lm @PCRELIB@ @CRYPTLIB@ @ACLLIB@ @SELINUXLIB@ @AUDITLIB@ @ATTRLIB@ @E2FSATTRSLIB@ @ELFLIB@
21eb16
+aide_LDADD = -lm @PCRELIB@ @CRYPTLIB@ @ACLLIB@ @SELINUXLIB@ @AUDITLIB@ @ATTRLIB@ @E2FSATTRSLIB@ @ELFLIB@ @CURLLIB@
21eb16
 AM_CFLAGS = @AIDE_DEFS@ -W -Wall -g
21eb16
 AM_CPPFLAGS = -I$(top_srcdir) \
21eb16
 			  -I$(top_srcdir)/include \
21eb16
diff --git a/configure.ac b/configure.ac
21eb16
index 3598ebe..0418c59 100644
21eb16
--- a/configure.ac
21eb16
+++ b/configure.ac
21eb16
@@ -702,24 +702,25 @@ if test x$with_zlib = xyes; then
21eb16
   compoptionstring="${compoptionstring}WITH_ZLIB\\n"
21eb16
 fi
21eb16
 
21eb16
+CURLLIB=
21eb16
 if test x$with_curl = xyes; then
21eb16
 	AC_PATH_PROG(curlconfig, "curl-config")
21eb16
 	if test "_$curlconfig" != _ ; then
21eb16
 		CURL_CFLAGS=`$curlconfig --cflags`
21eb16
-		CURL_LIBS=`$curlconfig --libs`
21eb16
+		CURLLIB=`$curlconfig --libs`
21eb16
 	else
21eb16
 		AC_MSG_ERROR([You don't have curl properly installed. Install it or try --without-curl.])
21eb16
 	fi
21eb16
   AC_CHECK_HEADERS(curl/curl.h,,
21eb16
  	[AC_MSG_ERROR([You don't have curl properly installed. Install it or try --without-curl.])])
21eb16
   CFLAGS="$CFLAGS $CURL_CFLAGS"
21eb16
-  LDFLAGS="$LDFLAGS $CURL_LIBS"
21eb16
   AC_CHECK_LIB(curl,curl_easy_init,havecurl=yes,
21eb16
  	[AC_MSG_ERROR([You don't have curl properly installed. Install it or try --without-curl.])]
21eb16
 )
21eb16
   AC_DEFINE(WITH_CURL,1,[use curl])
21eb16
 	compoptionstring="${compoptionstring}WITH_CURL\\n"
21eb16
 fi
21eb16
+AC_SUBST(CURLLIB)
21eb16
 AM_CONDITIONAL(USE_CURL, test x$havecurl = xyes)
21eb16
 
21eb16
 AC_ARG_WITH(mhash,
21eb16
-- 
21eb16
2.20.1
21eb16