ocserv: occtl no longer builds with local protobuf-c

Kevin Cernekee cernekee at gmail.com
Mon Nov 9 20:46:41 PST 2015


When occtl's rules were split into a new Makefile.am, PROTOBUF_SOURCES
became undefined.  I used this as a workaround:

diff --git a/src/occtl/Makefile.am b/src/occtl/Makefile.am
index b1075d4..4f03d80 100644
--- a/src/occtl/Makefile.am
+++ b/src/occtl/Makefile.am
@@ -8,6 +8,12 @@ bin_PROGRAMS = occtl

 COMMON_SOURCES=../common.c ../common.h

+PROTOBUF_SOURCES =
+if LOCAL_PROTOBUF_C
+PROTOBUF_SOURCES += $(top_srcdir)/src/protobuf/protobuf-c/protobuf-c.h \
+    $(top_srcdir)/src/protobuf/protobuf-c/protobuf-c.c
+endif
+
 occtl_SOURCES = occtl.c pager.c occtl.h time.c cache.c ip-cache.c \
     nl.c ctl.h ../ctl.pb-c.c ../ctl.pb-c.h $(CCAN_SOURCES) $(COMMON_SOURCES) \
     print.c json.c json.h $(PROTOBUF_SOURCES)


but I don't know if it's the right solution, because it generates
build rules for the same file in two different Makefiles.

(Regrettably, though I have libprotobuf-c0-dev from Ubuntu Trusty
installed on this system, it isn't detected because it does not have a
pkg-config file.)



More information about the openconnect-devel mailing list