0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-04 21:08:57 +01:00

configure.ac: Support libmagic.

This commit is contained in:
Jason Volk 2018-02-17 19:48:36 -08:00
parent 283a561c01
commit b5cb40e63d
3 changed files with 27 additions and 0 deletions

View file

@ -56,6 +56,9 @@ Provides HTTPS TLS / X.509 / etc.
- **zlib** or **lz4** or **snappy** (Compression library): - **zlib** or **lz4** or **snappy** (Compression library):
Provides compression for the database, etc. Provides compression for the database, etc.
- **libmagic** (Optional)
Content MIME type recognition.
- **GNU C++ compiler**, **automake**, **autoconf**, **autoconf2.13**, - **GNU C++ compiler**, **automake**, **autoconf**, **autoconf2.13**,
**autoconf-archive**, **libtool**, **shtool** **autoconf-archive**, **libtool**, **shtool**

View file

@ -1200,6 +1200,26 @@ AM_CONDITIONAL([PCRE], [test "x$have_pcre" = "xyes"])
dnl
dnl libmagic support
dnl
RB_CHK_SYSHEADER(magic.h, [MAGIC_H])
AC_CHECK_LIB(magic, magic_version,
[
have_magic="yes"
AC_SUBST(MAGIC_CPPFLAGS, [])
AC_SUBST(MAGIC_LDFLAGS, [])
AC_SUBST(MAGIC_LIBS, ["-lmagic"])
AC_DEFINE(HAVE_MAGIC, 1, [Define to 1 if libmagic (-lmagic) is available.])
], [
have_magic="no"
])
AM_CONDITIONAL([MAGIC], [test "x$have_magic" = "xyes"])
dnl dnl
dnl Additional linkages dnl Additional linkages
dnl dnl
@ -1389,6 +1409,7 @@ echo "Building JS (SpiderMonkey) ........ $with_included_js"
echo "GNU MP support .................... $have_gmp" echo "GNU MP support .................... $have_gmp"
echo "Sodium support .................... $have_sodium" echo "Sodium support .................... $have_sodium"
echo "SSL support........................ $SSL_TYPE" echo "SSL support........................ $SSL_TYPE"
echo "Magic support...................... $have_magic"
echo "Precompiled headers ............... $build_pch" echo "Precompiled headers ............... $build_pch"
echo "Developer debug ................... $debug" echo "Developer debug ................... $debug"
echo "IPv6 support ...................... $ipv6" echo "IPv6 support ...................... $ipv6"

View file

@ -14,6 +14,7 @@ AM_CPPFLAGS = \
-DBOOST_COROUTINE_NO_DEPRECATION_WARNING=1 \ -DBOOST_COROUTINE_NO_DEPRECATION_WARNING=1 \
@BOOST_CPPFLAGS@ \ @BOOST_CPPFLAGS@ \
@SODIUM_CPPFLAGS@ \ @SODIUM_CPPFLAGS@ \
@MAGIC_CPPFLAGS@ \
-include ircd/ircd.h \ -include ircd/ircd.h \
### ###
@ -46,6 +47,7 @@ libircd_la_LDFLAGS = \
@JS_LDFLAGS@ \ @JS_LDFLAGS@ \
@BOOST_LDFLAGS@ \ @BOOST_LDFLAGS@ \
@SODIUM_LDFLAGS@ \ @SODIUM_LDFLAGS@ \
@MAGIC_LDFLAGS@ \
### ###
libircd_la_LIBADD = \ libircd_la_LIBADD = \
@ -53,6 +55,7 @@ libircd_la_LIBADD = \
@JS_LIBS@ \ @JS_LIBS@ \
@BOOST_LIBS@ \ @BOOST_LIBS@ \
@SODIUM_LIBS@ \ @SODIUM_LIBS@ \
@MAGIC_LIBS@ \
-lcrypto \ -lcrypto \
-lssl \ -lssl \
-lz \ -lz \