mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
Search for protobuf-c with pkg-config
This commit is contained in:
parent
3522451600
commit
59d98b9ef6
1 changed files with 18 additions and 9 deletions
|
|
@ -30,6 +30,14 @@ AC_DEFUN([dt_DNSTAP],
|
|||
fi
|
||||
LDFLAGS="$LDFLAGS -L$withval/lib"
|
||||
], [
|
||||
ifdef([PKG_CHECK_MODULES], [
|
||||
PKG_CHECK_MODULES([PROTOBUFC], [libprotobuf-c], [
|
||||
CFLAGS="$CFLAGS $PROTOBUFC_CFLAGS"
|
||||
LIBS="$LIBS $PROTOBUFC_LIBS"
|
||||
], [
|
||||
AC_MSG_ERROR([The protobuf-c package was not found with pkg-config. Please install protobuf-c!])
|
||||
])
|
||||
], [
|
||||
# workaround for protobuf-c includes at old dir before protobuf-c-1.0.0
|
||||
if test -f /usr/include/google/protobuf-c/protobuf-c.h; then
|
||||
CFLAGS="$CFLAGS -I/usr/include/google"
|
||||
|
|
@ -40,6 +48,7 @@ AC_DEFUN([dt_DNSTAP],
|
|||
fi
|
||||
fi
|
||||
])
|
||||
])
|
||||
AC_SEARCH_LIBS([protobuf_c_message_pack], [protobuf-c], [],
|
||||
AC_MSG_ERROR([The protobuf-c library was not found. Please install the development libraries for protobuf-c!]))
|
||||
$2
|
||||
|
|
|
|||
Loading…
Reference in a new issue