summaryrefslogtreecommitdiff
path: root/Build/source/utils/xindy-new/xindy-2.4-rc1-PATCHES/patch-03-iconv-or-recode
blob: e1b286660e28651a285dd3b2c8ccc883958d6d70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
diff -ur -x Makefile.in -x aclocal.m4 -x configure -x autom4te.cache xindy.orig/configure.ac xindy/configure.ac
--- xindy.orig/configure.ac	2009-03-29 14:24:33.000000000 +0200
+++ xindy/configure.ac	2009-11-23 23:13:08.000000000 +0100
@@ -56,6 +56,20 @@
 AM_PROG_LEX
 AC_PROG_CC
 
+# On some systems without working iconv, we must use recode.
+AC_ARG_WITH([xindy-recode],
+            AS_HELP_STRING([--with-xindy-recode],
+                           [Use `recode' instead of `iconv' @<:@default is NO@:>@]))
+if test "x$with_xindy_recode" != xyes; then
+  CONVERT_FROM_UTF8='iconv -f UTF-8 -t #' # May need the trailing blank
+else
+  AC_CHECK_PROG(CONVERT_FROM_UTF8, recode, [recode UTF-8..])
+  if test "x$CONVERT_FROM_UTF8" != 'xrecode UTF-8..'; then
+    AC_MSG_ERROR([--with-xindy-recode specified, but `recode' not found])
+  fi
+fi
+AC_SUBST([CONVERT_FROM_UTF8])
+
 # Check that CLISP was found.
 # FIXME: Should we also check for latex in the buildrules case?
 # What about a C compiler? install?
diff -ur -x Makefile.in -x aclocal.m4 -x configure -x autom4te.cache xindy.orig/make-rules/alphabets/Makefile.am xindy/make-rules/alphabets/Makefile.am
--- xindy.orig/make-rules/alphabets/Makefile.am	2009-11-21 00:21:54.000000000 +0100
+++ xindy/make-rules/alphabets/Makefile.am	2009-11-23 22:36:01.000000000 +0100
@@ -721,75 +721,75 @@
 
 %latin1.pl : %utf8.pl.in
 	sed -e 's/@u{\([^}]*\)}//g;' <$< | \
-	iconv -f UTF-8 -t ISO8859-1 >$@
+	$(CONVERT_FROM_UTF8)ISO8859-1 >$@
 
 %cp850.pl : %utf8.pl.in
 	sed -e 's/@.{\([^}]*\)}//g;' <$< | \
-	iconv -f UTF-8 -t CP850 >$@
+	$(CONVERT_FROM_UTF8)CP850 >$@
 
 romanian/latin2.pl : romanian/utf8.pl
 	sed -e 's/@u{\([^}]*\)}//g;' -f $(srcdir)/rom-comma-kludge.sed <$< | \
-	iconv -f UTF-8 -t ISO8859-2 >$@
+	$(CONVERT_FROM_UTF8)ISO8859-2 >$@
 
 %latin2.pl : %utf8.pl.in
 	sed -e 's/@u{\([^}]*\)}//g;' <$< | \
-	iconv -f UTF-8 -t ISO8859-2 >$@
+	$(CONVERT_FROM_UTF8)ISO8859-2 >$@
 
 %latin3.pl : %utf8.pl.in
 	sed -e 's/@u{\([^}]*\)}//g;' <$< | \
-	iconv -f UTF-8 -t ISO8859-3 >$@
+	$(CONVERT_FROM_UTF8)ISO8859-3 >$@
 
 %latin4.pl : %utf8.pl.in
 	sed -e 's/@u{\([^}]*\)}//g;' <$< | \
-	iconv -f UTF-8 -t ISO8859-4 >$@
+	$(CONVERT_FROM_UTF8)ISO8859-4 >$@
 
 %iso88595.pl : %utf8.pl.in
 	sed -e 's/@u{\([^}]*\)}//g;' <$< | \
-	iconv -f UTF-8 -t ISO-8859-5 >$@
+	$(CONVERT_FROM_UTF8)ISO-8859-5 >$@
 
 %iso88597.pl : %utf8.pl.in
 	sed -e 's/@u{\([^}]*\)}//g;' <$< | \
-	iconv -f UTF-8 -t ISO-8859-7 >$@
+	$(CONVERT_FROM_UTF8)ISO-8859-7 >$@
 
 %iso88598.pl : %utf8.pl.in
 	sed -e 's/@u{\([^}]*\)}//g;' <$< | \
-	iconv -f UTF-8 -t ISO-8859-8 >$@
+	$(CONVERT_FROM_UTF8)ISO-8859-8 >$@
 
 %latin5.pl : %utf8.pl.in
 	sed -e 's/@u{\([^}]*\)}//g;' <$< | \
-	iconv -f UTF-8 -t ISO8859-5 >$@
+	$(CONVERT_FROM_UTF8)ISO8859-5 >$@
 
 %latin9.pl : %utf8.pl.in
 	sed -e 's/@u{\([^}]*\)}//g;s/@9{\([^}]*\)}/\1/g;' <$< | \
-	iconv -f UTF-8 -t ISO-8859-15 >$@
+	$(CONVERT_FROM_UTF8)ISO-8859-15 >$@
 
 romanian/cp1250.pl : romanian/utf8.pl
 	sed -e 's/@u{\([^}]*\)}//g;' -f $(srcdir)/rom-comma-kludge.sed <$< | \
-	iconv -f UTF-8 -t CP1250 >$@
+	$(CONVERT_FROM_UTF8)CP1250 >$@
 
 %cp1250.pl : %utf8.pl.in
 	sed -e 's/@u{\([^}]*\)}//g;' <$< | \
-	iconv -f UTF-8 -t CP1250 >$@
+	$(CONVERT_FROM_UTF8)CP1250 >$@
 
 %cp1251.pl : %utf8.pl.in
 	sed -e 's/@u{\([^}]*\)}//g;' <$< | \
-	iconv -f UTF-8 -t CP1251 >$@
+	$(CONVERT_FROM_UTF8)CP1251 >$@
 
 %cp1252.pl : %utf8.pl.in
 	sed -e 's/@u{\([^}]*\)}//g;s/@9{\([^}]*\)}/\1/g;' <$< | \
-	iconv -f UTF-8 -t CP1252 >$@
+	$(CONVERT_FROM_UTF8)CP1252 >$@
 
 %isoir111.pl : %utf8.pl.in
 	sed -e 's/@u{\([^}]*\)}//g;' <$< | \
-	iconv -f UTF-8 -t ISO-IR-111 >$@
+	$(CONVERT_FROM_UTF8)ISO-IR-111 >$@
 
 %koi8-r.pl : %utf8.pl.in
 	sed -e 's/@u{\([^}]*\)}//g;' <$< | \
-	iconv -f UTF-8 -t KOI8-R >$@
+	$(CONVERT_FROM_UTF8)KOI8-R >$@
 
 %koi8-u.pl : %utf8.pl.in
 	sed -e 's/@u{\([^}]*\)}//g;' <$< | \
-	iconv -f UTF-8 -t KOI8-U >$@
+	$(CONVERT_FROM_UTF8)KOI8-U >$@
 
 # %tex.pl : %utf8.pl utf8-to-tex.sed
 #	sed -f $(srcdir)/utf8-to-tex.sed <$< >$@