aboutsummaryrefslogtreecommitdiffstats
path: root/main/zeromq/fix-openpgm-detection.patch
blob: c310c956c4b50a16fc592bb97daf12ba459cdd93 (plain)
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
b0e82176f98aa80bed1e874dd36b72bc314b4 Mon Sep 17 00:00:00 2001
From: Jose Pedro Oliveira <jpo@di.uminho.pt>
Date: Sat, 1 Jun 2013 03:39:40 +0100
Subject: [PATCH] Make     ./configure --with-system-pgm detect the OpenPGM 5.2
 system library.

Note that OpenPGM installs a versioned pkgconfig file
(openpgm-5.2.pc, openpgm-5.1.pc).
---
[timo.teras@iki.fi: backported to older zeromq]

 configure.ac | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7264445..001db2d 100644
--- a/configure.in
+++ b/configure.in
@@ -349,10 +349,18 @@ fi
 # Build with system openpgm
 if test "x$with_system_pgm_ext" != "xno"; then
     m4_ifdef([PKG_CHECK_MODULES], [
-        PKG_CHECK_MODULES([OpenPGM], [openpgm-5.1 >= 5.1])
-        AC_DEFINE(ZMQ_HAVE_OPENPGM, 1, [Have OpenPGM extension])
-        LIBZMQ_EXTRA_CXXFLAGS="$OpenPGM_CFLAGS $LIBZMQ_EXTRA_CXXFLAGS"
-        LIBS="$OpenPGM_LIBS $LIBS"
+        have_pgm_system_library="no"
+        PKG_CHECK_MODULES([OpenPGM], [openpgm-5.2 >= 5.2],
+            [ have_pgm_system_library="yes" ],
+            [PKG_CHECK_MODULES([OpenPGM], [openpgm-5.1 >= 5.1],
+                [ have_pgm_system_library="yes" ])
+            ]
+        )
+        if test "x$have_pgm_system_library" = "xyes"; then
+            AC_DEFINE(ZMQ_HAVE_OPENPGM, 1, [Have OpenPGM extension])
+            LIBZMQ_EXTRA_CXXFLAGS="$OpenPGM_CFLAGS $LIBZMQ_EXTRA_CXXFLAGS"
+            LIBS="$OpenPGM_LIBS $LIBS"
+        fi
     ],
     [AC_MSG_ERROR([--with-system-pgm requires a working pkg-config installation])])
 fi
-- 
1.8.1.6