mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 00:37:00 +08:00
corrected compilation with local protobuf
This commit is contained in:
15
configure.ac
15
configure.ac
@@ -73,24 +73,29 @@ AC_ARG_WITH(protobuf,
|
||||
test_for_protobuf=$withval,
|
||||
test_for_protobuf=yes)
|
||||
|
||||
with_local_protobuf_c=no
|
||||
with_local_protobuf_c=yes
|
||||
if test "$test_for_protobuf" = yes;then
|
||||
PKG_CHECK_MODULES([LIBPROTOBUF_C], [libprotobuf-c],,
|
||||
PKG_CHECK_MODULES([LIBPROTOBUF_C], [libprotobuf-c],
|
||||
with_local_protobuf_c=no
|
||||
,
|
||||
[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])
|
||||
with_local_protobuf_c=no
|
||||
else
|
||||
AC_MSG_WARN([[***
|
||||
*** libprotobuf-c was not found.
|
||||
***]])
|
||||
FLAGS='-Iprotobuf'
|
||||
AC_SUBST([LIBPROTOBUF_C_CFLAGS], [$FLAGS])
|
||||
with_local_protobuf_c=yes
|
||||
fi
|
||||
]
|
||||
)
|
||||
fi
|
||||
|
||||
if test "$with_local_protobuf_c" != no;then
|
||||
FLAGS='-Iprotobuf'
|
||||
AC_SUBST([LIBPROTOBUF_C_CFLAGS], [$FLAGS])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(LOCAL_PROTOBUF_C, test "x$with_local_protobuf_c" != xno)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user