mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 12:27:21 +00:00
31 lines
860 B
Plaintext
31 lines
860 B
Plaintext
dnl
|
|
dnl Check for libmagic
|
|
dnl
|
|
|
|
AC_ARG_ENABLE([magic],
|
|
AC_HELP_STRING([--enable-magic],[file type detection via libmagic (yes)]),
|
|
[],[enable_magic=yes])
|
|
|
|
if test x"$enable_magic" = xyes; then
|
|
magic_mingw_libs=""
|
|
if test "x$ac_cv_mingw32" = "xyes"; then
|
|
magic_mingw_libs="-lshlwapi"
|
|
fi
|
|
|
|
AC_CHECK_LIB(magic, magic_open, [ magic_found=yes ], [ magic_found=no ], [-lz $GNURX_LIBS $magic_mingw_libs])
|
|
fi
|
|
|
|
if test "x$magic_found" = "xyes" ; then
|
|
AC_CHECK_HEADERS([magic.h])
|
|
if test "x$ac_cv_header_magic_h" = "xyes" ; then
|
|
MAGIC_LIBS="-lmagic -lz $GNURX_LIBS $magic_mingw_libs"
|
|
opt_features_yes="$opt_features_yes\n * libMagic file type detection"
|
|
else
|
|
opt_features_no="$opt_features_no\n * libMagic file type detection"
|
|
fi
|
|
else
|
|
opt_features_no="$opt_features_no\n * libMagic file type detection"
|
|
fi
|
|
|
|
AC_SUBST(MAGIC_LIBS)
|