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