From: Alex Nelson Date: Tue, 6 Sep 2011 01:52:50 +0000 (-0700) Subject: Mac OS X: Detect bindtextdomain X-Git-Tag: 1.3.2~16 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;ds=sidebyside;h=002be41389452c705d14ba9c263c0e271f31f17b;p=hivex.git Mac OS X: Detect bindtextdomain In the style of libguestfs commit: 7581672c7893fd392ca10b47f044af327011f502 Signed-off-by: Alex Nelson --- 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;