detect libssh/msgpack during ./configure

This commit is contained in:
Nicolas Viennot 2015-12-08 17:09:19 -05:00
parent 915b3a0255
commit 1670d15e8a
2 changed files with 29 additions and 5 deletions

View File

@ -240,8 +240,3 @@ endif
if NO_B64_NTOP
nodist_tmate_SOURCES += compat/b64_ntop.c
endif
tmate_LDADD = \
-lssh \
-lmsgpackc

View File

@ -147,6 +147,35 @@ if test "x$found_curses" = xno; then
AC_MSG_ERROR("curses not found")
fi
PKG_CHECK_MODULES(
MSGPACK,
msgpack,
[
CPPFLAGS="$MSGPACK_CFLAGS $CPPFLAGS"
LIBS="$MSGPACK_LIBS $LIBS"
found_msgpack=yes
],
found_msgpack=no
)
if test "x$found_msgpack" = xno; then
AC_MSG_ERROR("msgpack not found")
fi
PKG_CHECK_MODULES(
LIBSSH,
libssh,
[
CPPFLAGS="$LIBSSH_CFLAGS $CPPFLAGS"
LIBS="$LIBSSH_LIBS $LIBS"
found_libssh=yes
],
found_libssh=no
)
if test "x$found_libssh" = xno; then
AC_MSG_ERROR("libssh not found")
fi
# Check for b64_ntop.
AC_MSG_CHECKING(for b64_ntop)
AC_TRY_LINK(