[Libguestfs] [PATCH 07/12] Mac OS X: don't check glibc-style extended printf formatters unless --enable-daemon

Masami HIRATA msmhrt at gmail.com
Tue Jul 24 14:10:44 UTC 2012


Signed-off-by: Masami HIRATA <msmhrt at 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




More information about the Libguestfs mailing list