tmate-io / tmate

Instant Terminal Sharing
https://tmate.io/
Other
5.55k stars 298 forks source link

Fix finding msgpack 6+ #281

Open carlocab opened 1 year ago

carlocab commented 1 year ago

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

thesamesam commented 1 year ago

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 commented 1 year ago

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

thesamesam commented 1 year ago

Thanks!

jamessan commented 5 months ago

This would fix #291