Code

configure.in: Check for protobuf-c.h.
authorFlorian Forster <octo@collectd.org>
Fri, 5 Apr 2013 05:31:35 +0000 (07:31 +0200)
committerFlorian Forster <octo@collectd.org>
Fri, 5 Apr 2013 05:31:39 +0000 (07:31 +0200)
Thanks to Yves Mettier pointing this out in #269 and for providing an
initial patch.

configure.in

index b4b21a45d057cbab7968bbe6613163e119840d0a..e2110b58be928694b610bcb49454921c0d3d4c3d 100644 (file)
@@ -49,6 +49,16 @@ AC_PROG_YACC
 PKG_PROG_PKG_CONFIG
 
 AC_CHECK_PROG([have_protoc_c], [protoc-c], [yes], [no])
+if test "x$have_protoc_c" = "xyes"
+then
+       AC_CHECK_HEADERS([google/protobuf-c/protobuf-c.h],
+                        [have_protobuf_c_h="yes"],
+                        [have_protobuf_c_h="no"])
+fi
+if test "x$have_protoc_c" = "xyes" && test "x$have_protobuf_c_h" != "xyes"
+then
+       have_protoc_c="no (unable to find protobuf-c.h)"
+fi
 AM_CONDITIONAL(HAVE_PROTOC_C, test "x$have_protoc_c" = "xyes")
 
 AC_MSG_CHECKING([for kernel type ($host_os)])