Skip to content

Fix finding msgpack 6+#281

Open
carlocab wants to merge 2 commits intotmate-io:masterfrom
carlocab:msgpack-6
Open

Fix finding msgpack 6+#281
carlocab wants to merge 2 commits intotmate-io:masterfrom
carlocab:msgpack-6

Conversation

@carlocab
Copy link
Copy Markdown

@carlocab carlocab commented Mar 5, 2023

msgpack.pc was renamed to msgpack-c.pc upstream in msgpack/msgpack-c#1053.

`msgpack.pc` was renamed to `msgpack-c.pc` upstream in msgpack/msgpack-c#1053.
@thesamesam
Copy link
Copy Markdown

I think this needs to be:

--- a/configure.ac
+++ b/configure.ac
@@ -207,7 +207,20 @@ PKG_CHECK_MODULES(
     LIBS="$MSGPACK_LIBS $LIBS"
     found_msgpack=yes
   ],
-  found_msgpack=no
+  [
+    found_msgpack=no
+    # msgpack.pc was renamed to msgpack-c.pc in 6.0.0.
+    PKG_CHECK_MODULES(
+      MSGPACKC,
+      msgpack-c >= 1.1.0,
+      [
+        CPPFLAGS="$MSGPACKC_CFLAGS $CPPFLAGS"
+        LIBS="$MSGPACKC_LIBS $LIBS"
+        found_msgpack=yes
+      ],
+      found_msgpack=no
+    )
+  ]
 )
 if test "x$found_msgpack" = xno; then
   AC_MSG_ERROR("msgpack >= 1.1.0 not found")

otherwise found_msgpack is clobbered by the second test, even if it was found successfully by the first one:

checking for MSGPACK... yes
checking for MSGPACKC... no
configure: error: "msgpack >= 1.1.0 not found"

@carlocab
Copy link
Copy Markdown
Author

carlocab commented Apr 3, 2023

Aha, good point. I initially did that; I forget why I decided to change it. Will update this.

Co-authored-by: Sam James <sam@gentoo.org>
@thesamesam
Copy link
Copy Markdown

Thanks!

@jamessan
Copy link
Copy Markdown

This would fix #291

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants