diff -ru xdg-user-dirs-0.14.orig/Makefile.am xdg-user-dirs-0.14/Makefile.am --- xdg-user-dirs-0.14.orig/Makefile.am 2011-06-14 09:37:35 +0200 +++ xdg-user-dirs-0.14/Makefile.am 2011-06-14 09:36:42 +0200 @@ -16,7 +16,7 @@ xdgdir=$(sysconfdir)/xdg xdg_DATA=user-dirs.conf user-dirs.defaults -libraries = $(LIBINTL) +libraries = $(LIBINTL) $(LIBICONV) bin_PROGRAMS = \ xdg-user-dirs-update \ diff -ru xdg-user-dirs-0.14.orig/configure.ac xdg-user-dirs-0.14/configure.ac --- xdg-user-dirs-0.14.orig/configure.ac 2011-06-14 09:37:35 +0200 +++ xdg-user-dirs-0.14/configure.ac 2011-06-14 09:36:42 +0200 @@ -64,6 +64,8 @@ else AC_MSG_RESULT(no) fi + +AC_CHECK_FUNCS([strndup]) AC_OUTPUT([ po/Makefile.in Makefile diff -ru xdg-user-dirs-0.14.orig/xdg-user-dirs-update.c xdg-user-dirs-0.14/xdg-user-dirs-update.c --- xdg-user-dirs-0.14.orig/xdg-user-dirs-update.c 2011-06-14 09:37:35 +0200 +++ xdg-user-dirs-0.14/xdg-user-dirs-update.c 2011-06-14 09:41:35 +0200 @@ -4,7 +4,9 @@ #include #include +#ifdef HAVE_GETTEXT #include +#endif #include #include #include @@ -360,7 +362,11 @@ } paths = realloc (paths, sizeof (char *) * (numfiles + 2)); +#ifdef HAVE_STRNDUP paths[numfiles++] = strndup (path, len); +#else + paths[numfiles++] = strdup (path); +#endif paths[numfiles] = NULL; } @@ -848,7 +854,11 @@ element_end = path; element_copy = strdup_end (element, element_end); +#ifdef HAVE_GETTEXT translated = gettext (element_copy); +#else + translated = element_copy; +#endif res = realloc (res, strlen (res) + 1 + strlen (translated) + 1); if (has_slash) @@ -1000,6 +1010,7 @@ char *set_value = NULL; char *locale_dir = NULL; +#ifdef HAVE_GETTEXT setlocale (LC_ALL, ""); if (is_directory (LOCALEDIR)) @@ -1038,6 +1049,7 @@ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); +#endif force = 0; for (i = 1; i < argc; i++)