* configure.ac - Newer ncurses installs include pkg-config files
which tell us the right -I/-L paths we need, so default to that
before trying the legacy ways. Patch by Mike Frysinger.
+ * configure.ac - Add a configure flag to disable the use of the
+ fattening libmagic. Patch by Mike Frysinger.
2014-03-23 Benno Schulenberg <bensberg@justemail.net>
* src/rcfile.c (parse_keybinding, parse_unbinding) - Improve a
dnl Checks for header files.
-AC_CHECK_HEADERS(getopt.h libintl.h limits.h regex.h sys/param.h wchar.h wctype.h stdarg.h magic.h)
+AC_CHECK_HEADERS(getopt.h libintl.h limits.h regex.h sys/param.h wchar.h wctype.h stdarg.h)
dnl Checks for options.
AC_DEFINE(DISABLE_WRAPPING, 1, [Define this to disable all text wrapping.])
fi])
+AC_ARG_ENABLE(libmagic,
+AS_HELP_STRING([--disable-libmagic], [Disable detection of file types via libmagic]))
AC_ARG_ENABLE(extra,
[ --disable-extra Disable extra features, currently only easter eggs],
AC_MSG_RESULT(no),
AC_MSG_WARN([*** Can't check for macro redefinability when cross-compiling]))
-AC_CHECK_LIB(magic, magic_open)
+AS_IF([test "x$enable_libmagic" != "xno"], [
+ AC_CHECK_HEADERS_ONCE([magic.h])
+ AC_CHECK_LIB(magic, magic_open)
+])
# Check for groff html support
AC_MSG_CHECKING([for HTML support in groff])