mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-13 18:12:03 +08:00
Changes to avoid the embedded protobuf files being included when not needed.
This commit is contained in:
+7
-3
@@ -64,12 +64,16 @@ fi
|
||||
|
||||
with_local_protobuf_c=no
|
||||
PKG_CHECK_MODULES([LIBPROTOBUF_C], [libprotobuf-c],,
|
||||
AC_CHECK_LIB(protobuf-c, [protobuf_c_message_pack],
|
||||
AC_SUBST(LIBPROTOBUF_C_LIBS, [-lprotobuf-c]),
|
||||
[AC_LIB_HAVE_LINKFLAGS(protobuf-c,, [#include <google/protobuf-c/protobuf-c.h>], [protobuf_c_message_pack(0,0);])
|
||||
if test x$ac_cv_libprotobuf_c = xyes; then
|
||||
AC_SUBST([LIBPROTOBUF_C_LIBS], [$LIBPROTOBUF_C])
|
||||
else
|
||||
AC_MSG_WARN([***
|
||||
libprotobuf-c was not found.])
|
||||
AC_SUBST([LIBPROTOBUF_C_CFLAGS], [-Iprotobuf/])
|
||||
with_local_protobuf_c=yes
|
||||
)
|
||||
fi
|
||||
]
|
||||
)
|
||||
AM_CONDITIONAL(LOCAL_PROTOBUF_C, test "x$with_local_protobuf_c" != xno)
|
||||
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ ocserv_SOURCES = main.c main-auth.c worker-vpn.c worker-auth.c tlslib.c \
|
||||
ocserv_SOURCES += ipc.pb-c.h ipc.pb-c.c
|
||||
|
||||
if LOCAL_PROTOBUF_C
|
||||
ocserv_SOURCES += google/protobuf-c/protobuf-c.h google/protobuf-c/protobuf-c.c
|
||||
ocserv_SOURCES += protobuf/google/protobuf-c/protobuf-c.h protobuf/google/protobuf-c/protobuf-c.c
|
||||
endif
|
||||
|
||||
ocserv_LDADD = ../gl/libgnu.a $(NEEDED_LIBOPTS) libcmd-ocserv.a
|
||||
|
||||
Reference in New Issue
Block a user