[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 94/163: configure: use pkg-config for c-ares detect
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 94/163: configure: use pkg-config for c-ares detection |
Date: |
Sun, 05 Aug 2018 12:37:00 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit ed224f23d5bebf3f2b64d28ca4452b401a8ddf0a
Author: Daniel Stenberg <address@hidden>
AuthorDate: Thu Jun 14 13:19:09 2018 +0200
configure: use pkg-config for c-ares detection
First check if there's c-ares information given as pkg-config info and use
that as first preference.
Reported-by: pszemus on github
Fixes #2203
Closes #2658
---
m4/curl-confopts.m4 | 39 ++++++++++++++++++++++++++++++++-------
1 file changed, 32 insertions(+), 7 deletions(-)
diff --git a/m4/curl-confopts.m4 b/m4/curl-confopts.m4
index ad6acd8f0..d83ce857b 100644
--- a/m4/curl-confopts.m4
+++ b/m4/curl-confopts.m4
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
+# Copyright (C) 1998 - 2018, Daniel Stenberg, <address@hidden>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -497,9 +497,24 @@ AC_DEFUN([CURL_CHECK_LIB_ARES], [
embedded_ares_builddir="$configure_runpath/ares"
if test -n "$want_ares_path"; then
dnl c-ares library path has been specified
- ares_CPPFLAGS="-I$want_ares_path/include"
- ares_LDFLAGS="-L$want_ares_path/lib"
- ares_LIBS="-lcares"
+ ARES_PCDIR="$want_ares_path/lib/pkgconfig"
+ CURL_CHECK_PKGCONFIG(libcares, [$ARES_PCIDR])
+ if test "$PKGCONFIG" != "no" ; then
+ ares_LIBS=`CURL_EXPORT_PCDIR([$ARES_PCDIR])
+ $PKGCONFIG --libs-only-l libcares`
+ ares_LDFLAGS=`CURL_EXPORT_PCDIR([$ARES_PCDIR])
+ $PKGCONFIG --libs-only-L libcares`
+ ares_CPPFLAGS=`CURL_EXPORT_PCDIR([$ARES_PCDIR])
+ $PKGCONFIG --cflags-only-I libcares`
+ AC_MSG_NOTICE([pkg-config: ares LIBS: "$ares_LIBS"])
+ AC_MSG_NOTICE([pkg-config: ares LDFLAGS: "$ares_LDFLAGS"])
+ AC_MSG_NOTICE([pkg-config: ares CPPFLAGS: "$ares_CPPFLAGS"])
+ else
+ dnl ... path without pkg-config
+ ares_CPPFLAGS="-I$want_ares_path/include"
+ ares_LDFLAGS="-L$want_ares_path/lib"
+ ares_LIBS="-lcares"
+ fi
else
dnl c-ares library path has not been given
if test -d "$srcdir/ares"; then
@@ -513,9 +528,19 @@ AC_DEFUN([CURL_CHECK_LIB_ARES], [
ares_LIBS="-lcares"
else
dnl c-ares path not specified, use defaults
- ares_CPPFLAGS=""
- ares_LDFLAGS=""
- ares_LIBS="-lcares"
+ CURL_CHECK_PKGCONFIG(libcares)
+ if test "$PKGCONFIG" != "no" ; then
+ ares_LIBS=`$PKGCONFIG --libs-only-l libcares`
+ ares_LDFLAGS=`$PKGCONFIG --libs-only-L libcares`
+ ares_CPPFLAGS=`$PKGCONFIG --cflags-only-I libcares`
+ AC_MSG_NOTICE([pkg-config: ares_LIBS: "$ares_LIBS"])
+ AC_MSG_NOTICE([pkg-config: ares_LDFLAGS: "$ares_LDFLAGS"])
+ AC_MSG_NOTICE([pkg-config: ares_CPPFLAGS: "$ares_CPPFLAGS"])
+ else
+ ares_CPPFLAGS=""
+ ares_LDFLAGS=""
+ ares_LIBS="-lcares"
+ fi
fi
fi
#
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 57/163: option: disallow username in URL, (continued)
- [GNUnet-SVN] [gnurl] 57/163: option: disallow username in URL, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 102/163: runtests.pl: remove debug leftover from bb9a340c73f3, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 87/163: Curl_init_do: handle NULL connection pointer passed in, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 146/163: scripts: include _curl as part of CLEANFILES, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 105/163: travis: run more tests for coverage check, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 99/163: RELEASE-PROCEDURE: gpg sign the tags, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 128/163: openssl: make the requested TLS version the *minimum* wanted, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 65/163: CURLOPT_RESOLVE: always purge old entry first, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 76/163: mk-ca-bundle.pl: leave certificate name untouched in decode(), gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 92/163: KNOWN_BUGS: NTLM doen't support password with § character, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 94/163: configure: use pkg-config for c-ares detection,
gnunet <=
- [GNUnet-SVN] [gnurl] 98/163: RELEASE-NOTES: synced, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 93/163: GOVERNANCE.md: explains how this project is run, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 101/163: curl-confopts.m4: fix typo from ed224f23d5beb, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 153/163: lib/curl_setup.h: remove unicode bom from 8272ec50f02, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 134/163: DEPRECATE: mention the PR that disabled axTLS, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 133/163: docs/DEPRECATE.md: spelling and minor formatting, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 143/163: CMake: Remove unused functions, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 154/163: lib/curl_setup.h: remove unicode character, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 157/163: TODO: Configurable loading of OpenSSL configuration file, gnunet, 2018/08/05
- [GNUnet-SVN] [gnurl] 114/163: CURLOPT_SSL_VERIFYPEER.3: fix syntax mistake, gnunet, 2018/08/05