Signed-off-by: Masami HIRATA <msmhrt(a)gmail.com>
---
configure.ac | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
index 1d07b0e..af01e53 100644
--- a/configure.ac
+++ b/configure.ac
@@ -253,21 +253,23 @@ AC_CHECK_LIB([ncurses], [UP], [], [
])
LIBS="$old_LIBS"
-dnl For modified printf in the daemon, we need glibc either (old-style)
-dnl register_printf_function or (new-style) register_printf_specifier.
-AC_CHECK_FUNC([register_printf_specifier],[
- AC_DEFINE([HAVE_REGISTER_PRINTF_SPECIFIER],[1],
- [Define to 1 if you have new-style register_printf_specifier])
- ],[
- AC_CHECK_FUNC([register_printf_function],[
- AC_DEFINE([HAVE_REGISTER_PRINTF_FUNCTION],[1],
- [Define to 1 if you have old-style register_printf_function])
+if test "x$enable_daemon" = "xyes"; then
+ dnl For modified printf in the daemon, we need glibc either (old-style)
+ dnl register_printf_function or (new-style) register_printf_specifier.
+ AC_CHECK_FUNC([register_printf_specifier],[
+ AC_DEFINE([HAVE_REGISTER_PRINTF_SPECIFIER],[1],
+ [Define to 1 if you have new-style register_printf_specifier])
],[
- AC_MSG_FAILURE(
+ AC_CHECK_FUNC([register_printf_function],[
+ AC_DEFINE([HAVE_REGISTER_PRINTF_FUNCTION],[1],
+ [Define to 1 if you have old-style
register_printf_function])
+ ],[
+ AC_MSG_FAILURE(
[No support for glibc-style extended printf formatters.
This means you either have a very old glibc (pre-2.0) or you
are using some other libc where this is not supported.])])])
+fi
dnl GNU gettext tools (optional).
AC_CHECK_PROG([XGETTEXT],[xgettext],[xgettext],[no])
--
1.7.11.1