[PATCH] configure: Work around GNU sed brokenness on Mac OS.

Charles Davis cdavis at mymail.mines.edu
Wed Nov 10 09:34:43 CST 2010


---
 configure.ac             |   18 ++++++++++++++++++
 dlls/shell32/Makefile.in |    2 +-
 2 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/configure.ac b/configure.ac
index d390a38..c01c9fc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -127,6 +127,24 @@ dnl We can't use AC_PROG_CPP for winegcc, it uses by default $(CC) -E
 AC_CHECK_TOOL(CPPBIN,cpp,cpp)
 AC_DEFINE_UNQUOTED(EXEEXT,["$ac_exeext"],[Define to the file extension for executables.])
 
+AC_MSG_CHECKING([for a UTF-8 locale])
+locale=`locale -a | while read l
+do
+  case $l in
+    *.UTF-8|*.utf8)
+      AC_MSG_RESULT([yes])
+      echo $l
+      break 2
+      ;;
+  esac
+done`
+if test "x$locale" = "x"
+then
+  AC_MSG_RESULT([no])
+  locale=C
+fi
+AC_SUBST(SED_LOCALE,$locale)
+
 case $host in
   *-darwin*)
     if test "x$enable_win64" = "xyes"
diff --git a/dlls/shell32/Makefile.in b/dlls/shell32/Makefile.in
index a101c75..e76662e 100644
--- a/dlls/shell32/Makefile.in
+++ b/dlls/shell32/Makefile.in
@@ -111,7 +111,7 @@ EXTRA_OBJS = authors.o
 @MAKE_DLL_RULES@
 
 authors.c: $(top_srcdir)/AUTHORS
-	(LC_ALL=C; export LC_ALL; echo 'const char * const SHELL_Authors[] = {' && \
+	(LC_ALL=@SED_LOCALE@; export LC_ALL; echo 'const char * const SHELL_Authors[] = {' && \
 	 sed -e '1,2d' -e 's/\(.*\)/  \"\1\",/' $(top_srcdir)/AUTHORS && \
 	 echo '  0 };') >$@ || ($(RM) $@ && false)
 
-- 
1.7.3.2




More information about the wine-patches mailing list