[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nano-devel] patch: fix --disable-libmagic

From: Christian Weisgerber
Subject: [Nano-devel] patch: fix --disable-libmagic
Date: Mon, 21 Dec 2015 22:07:58 +0100
User-agent: Mutt/1.5.24 (2015-08-30)

Noticed in 2.4.3, but still applicable to SVN trunk:

Despite the --disable-libmagic configure option, the header checks
for magic.h and zlib.h are still run.  This is a problem in  AC_CHECK_HEADERS_ONCE() is very special and cannot
be conditionalized.  Due to the powers of m4, the corresponding
shell code doesn't appear where the macro does.

The obvious fix is to use plain AC_CHECK_HEADERS() instead:

---   Wed Nov 18 06:31:35 2015
+++        Mon Dec 21 21:46:52 2015
@@ -656,9 +656,9 @@ AC_MSG_RESULT(no),
 AC_MSG_WARN([*** Can't check for macro redefinability when cross-compiling]))
 AS_IF([test "x$enable_libmagic" != "xno"], [
+  AC_CHECK_HEADERS([magic.h])
   AC_CHECK_LIB(magic, magic_open)
+  AC_CHECK_HEADERS([zlib.h])
   AC_CHECK_LIB(z, inflate)
Christian "naddy" Weisgerber                          address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]