1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
From 4588c9c6463d8958d8305caafa58ea5c263fd352 Mon Sep 17 00:00:00 2001
From: Gilles Dartiguelongue <eva@gentoo.org>
Date: Tue, 16 Jan 2018 09:07:38 +0100
Subject: [PATCH] Fix libcloudproviders check
Use autotools managed variables and make use of pkgconfig macros.
---
configure.ac | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/configure.ac b/configure.ac
index 24110386b4..cebe66c2e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -349,8 +349,10 @@ AC_ARG_ENABLE(mir-backend,
AC_ARG_ENABLE(cloudproviders,
[AS_HELP_STRING([--enable-cloudproviders],
- [enable libcloudproviders integration])],
- [cloudproviders_set=yes])
+ [enable libcloudproviders integration])
+ ],
+ [],
+ [enable_cloudproviders=yes])
if test -z "$backend_set"; then
if test "$platform_win32" = yes; then
@@ -1350,17 +1352,15 @@ fi
# Check for libcloudproviders
CLOUDPROVIDER_PACKAGES=""
-if test "x$cloudproviders_set" = "xyes"; then
- CLOUDPROVIDER_PACKAGES="cloudproviders >= cloudproviders_required_version"
- if $PKG_CONFIG --exists $CLOUDPROVIDER_PACKAGES ; then
- AC_DEFINE(HAVE_CLOUDPROVIDERS, [1],
- [Define if libcloudproviders is available]
- )
- else
- AC_MSG_ERROR([
-*** libcloudproviders not found.])
- fi
-fi
+AS_IF([test "$enable_cloudproviders" = "yes"],
+ [
+ CLOUDPROVIDER_PACKAGES="cloudproviders >= cloudproviders_required_version"
+ PKG_CHECK_EXISTS(
+ [$CLOUDPROVIDER_PACKAGES],
+ [AC_DEFINE(HAVE_CLOUDPROVIDERS, [1], [Define if libcloudproviders is available])],
+ [AC_MSG_ERROR([*** libcloudproviders not found])]
+ )
+ ])
CFLAGS="$saved_cflags"
LDFLAGS="$saved_ldflags"
--
2.15.1
|