0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-25 15:04:10 +01:00

configure/Makefile: Add formal support for libsnappy.

This commit is contained in:
Jason Volk 2018-06-04 14:48:04 -07:00
parent 6d0161d791
commit 7c841e6bdb
2 changed files with 35 additions and 0 deletions

View file

@ -943,6 +943,37 @@ AC_CHECK_HEADER(lz4.h,
])
dnl
dnl snappy support
dnl
AC_SUBST(SNAPPY_CPPFLAGS)
AC_SUBST(SNAPPY_LDFLAGS)
AC_SUBST(SNAPPY_LIBS)
AC_ARG_WITH(snappy,
AC_HELP_STRING([--with-snappy=[[[DIR]]]], [Path to libsnappy.so for snappy compression support.]),
[
AC_SUBST(SNAPPY_LDFLAGS, ["-L$withval"])
], [
])
AC_CHECK_HEADER(snappy.h,
[
AC_CHECK_LIB(snappy, snappy_compress,
[
snappy=yes
AC_SUBST(SNAPPY_LIBS, -lsnappy)
AC_DEFINE(HAVE_LIBSNAPPY, 1, [Define to 1 if libsnappy (-lsnappy) is available.])
], [
snappy=no
])
], [
snappy=no
])
dnl
dnl boost support
dnl
@ -1607,6 +1638,7 @@ echo "Building RocksDB................... $with_included_rocksdb"
echo "Building JS (SpiderMonkey) ........ $with_included_js"
echo "Ziplinks (libz) support ........... $zlib"
echo "LZ4 support ....................... $lz4"
echo "Snappy support .................... $snappy"
echo "GNU MP support .................... $have_gmp"
echo "Sodium support .................... $have_sodium"
echo "SSL support........................ $SSL_TYPE"

View file

@ -13,6 +13,7 @@ AM_CPPFLAGS = \
@BOOST_CPPFLAGS@ \
@SODIUM_CPPFLAGS@ \
@MAGIC_CPPFLAGS@ \
@SNAPPY_CPPFLAGS@ \
@LZ4_CPPFLAGS@ \
@Z_CPPFLAGS@ \
-include ircd/ircd.h \
@ -54,6 +55,7 @@ libircd_la_LDFLAGS = \
@BOOST_LDFLAGS@ \
@SODIUM_LDFLAGS@ \
@MAGIC_LDFLAGS@ \
@SNAPPY_LDFLAGS@ \
@LZ4_LDFLAGS@ \
@Z_LDFLAGS@ \
###
@ -66,6 +68,7 @@ libircd_la_LIBADD = \
@MAGIC_LIBS@ \
-lcrypto \
-lssl \
@SNAPPY_LIBS@ \
@LZ4_LIBS@ \
@Z_LIBS@ \
###