From 002be41389452c705d14ba9c263c0e271f31f17b Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 5 Sep 2011 18:52:50 -0700 Subject: [PATCH] Mac OS X: Detect bindtextdomain In the style of libguestfs commit: 7581672c7893fd392ca10b47f044af327011f502 Signed-off-by: Alex Nelson --- configure.ac | 3 +++ sh/hivexsh.c | 2 ++ xml/hivexml.c | 2 ++ 3 files changed, 7 insertions(+) diff --git a/configure.ac b/configure.ac index 58bb80b..a4e55b4 100644 --- a/configure.ac +++ b/configure.ac @@ -133,6 +133,9 @@ AC_CHECK_SIZEOF([long]) dnl Headers. AC_CHECK_HEADERS([endian.h byteswap.h]) +dnl Functions. +AC_CHECK_FUNCS([bindtextdomain]) + dnl Check for pod2man and pod2text. AC_CHECK_PROG([POD2MAN],[pod2man],[pod2man],[no]) test "x$POD2MAN" = "xno" && diff --git a/sh/hivexsh.c b/sh/hivexsh.c index a9b738e..410851b 100644 --- a/sh/hivexsh.c +++ b/sh/hivexsh.c @@ -100,8 +100,10 @@ int main (int argc, char *argv[]) { setlocale (LC_ALL, ""); +#ifdef HAVE_BINDTEXTDOMAIN bindtextdomain (PACKAGE, LOCALEBASEDIR); textdomain (PACKAGE); +#endif int c; const char *filename = NULL; diff --git a/xml/hivexml.c b/xml/hivexml.c index f29c80c..804e503 100644 --- a/xml/hivexml.c +++ b/xml/hivexml.c @@ -79,8 +79,10 @@ int main (int argc, char *argv[]) { setlocale (LC_ALL, ""); +#ifdef HAVE_BINDTEXTDOMAIN bindtextdomain (PACKAGE, LOCALEBASEDIR); textdomain (PACKAGE); +#endif int c; int open_flags = 0; -- 1.8.3.1