Code

protoc: log when compiler is missing
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 9 Aug 2015 15:02:33 +0000 (17:02 +0200)
committerMarc Fournier <marc.fournier@camptocamp.com>
Mon, 30 Nov 2015 21:52:03 +0000 (22:52 +0100)
In the case where we do have the required headers
but don't have the compiler, this makes it more clear
that we're missing the latter.

configure.ac

index f6b9f5e21835f153985449d25eacf14937f8f89f..d5b8c798af9acdba9a3acde184988fbcfdc2838e 100644 (file)
@@ -57,12 +57,17 @@ AC_PROG_YACC
 PKG_PROG_PKG_CONFIG
 
 AC_CHECK_PROG([have_protoc_c], [protoc-c], [yes], [no])
-AC_CHECK_HEADERS([google/protobuf-c/protobuf-c.h],
-                 [have_protobuf_c_h="yes"],
-                 [have_protobuf_c_h="no"])
-if test "x$have_protoc_c" = "xyes" && test "x$have_protobuf_c_h" != "xyes"
+if test "x$have_protoc_c" = "xno"
 then
-       have_protoc_c="no (unable to find <google/protobuf-c/protobuf-c.h>)"
+       have_protoc_c="no (protoc-c compiler not found)"
+else
+       AC_CHECK_HEADERS([google/protobuf-c/protobuf-c.h],
+                        [have_protobuf_c_h="yes"],
+                        [have_protobuf_c_h="no"])
+       if test "x$have_protobuf_c_h" = "xno"
+       then
+               have_protoc_c="no (<google/protobuf-c/protobuf-c.h> not found)"
+       fi
 fi
 AM_CONDITIONAL(HAVE_PROTOC_C, test "x$have_protoc_c" = "xyes")