Adding a configure flag to disable the use of the fattening libmagic.

Patch by Mike Frysinger.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4674 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Benno Schulenberg 2014-03-24 13:47:37 +00:00
parent 4172714415
commit eaff14f320
2 changed files with 9 additions and 2 deletions

View File

@ -11,6 +11,8 @@
* 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

View File

@ -50,7 +50,7 @@ AC_DEFINE_DIR([PKGDATADIR], [pkgdatadir], [Where data are placed to.])
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.
@ -78,6 +78,8 @@ AC_ARG_ENABLE(tiny,
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],
@ -630,7 +632,10 @@ AC_MSG_RESULT(yes),
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])