nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit eaff14f3205d5fff20294cda0072b3bc48755088
parent 4172714415d3833c428358006c8a27e16cd65dc7
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Mon, 24 Mar 2014 13:47:37 +0000

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

Diffstat:
MChangeLog | 2++
Mconfigure.ac | 9+++++++--
2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -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 diff --git a/configure.ac b/configure.ac @@ -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])