summaryrefslogtreecommitdiff
path: root/pcr/apertium/apertium-cy-en/configure.ac.patch
blob: a3bde0a1860bb17883b5cbad11a21f035e947e77 (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
--- ../apertium-cy-en-0.1.0/configure.ac	2008-08-01 10:21:25.000000000 +0200
+++ apertium-cy-en-0.1.0/configure.ac	2010-09-15 17:34:36.000000000 +0200
@@ -10,8 +10,60 @@
 AC_PROG_AWK
 AC_CONFIG_HEADER([config])
 
-PKG_CHECK_MODULES(LTTOOLBOX, lttoolbox-3.0 >= 3.0.3)
-PKG_CHECK_MODULES(APERTIUM, apertium-3.0 >= 3.0.9)
+m4_define([required_apertium_version], [3.0.3])
+m4_define([required_lttolbox_version], [3.0.9])
+
+AC_DEFUN([PKG_CHECK_APERTIUM], [
+  APERTIUM_VER=0
+  PKG_CHECK_MODULES(APERTIUM, apertium-1.0 >= 1.0.0,
+  [
+      APERTIUM_VER=10
+  ],
+  [
+      PKG_CHECK_MODULES(APERTIUM, apertium-2.0 >= 2.0.0,
+      [
+          APERTIUM_VER=20
+      ],
+      [
+          PKG_CHECK_MODULES(APERTIUM, apertium-3.0 >= 3.0.0,
+          [
+              APERTIUM_VER=30
+          ],
+          [
+              PKG_CHECK_MODULES(APERTIUM, apertium-3.1 >= 3.1.0,
+              [
+                  APERTIUM_VER=31
+              ],
+              [
+                  PKG_CHECK_MODULES(APERTIUM, apertium-3.2 >= 3.2.0)
+                  APERTIUM_VER=32
+              ])
+          ])
+      ])
+  ])
+  AC_SUBST(APERTIUM_VER)
+])
+AC_DEFUN([PKG_CHECK_LTTOOLBOX], [
+  LTTOOLBOX_VER=0
+  PKG_CHECK_MODULES(LTTOOLBOX, lttoolbox-3.0 >= 3.0.0,
+  [
+    LTTOOLBOX_VER=30
+  ],
+  [
+    PKG_CHECK_MODULES(LTTOOLBOX, lttoolbox-3.1 >= 3.1.0,
+    [
+      LTTOOLBOX_VER=31
+    ],
+    [
+      PKG_CHECK_MODULES(LTTOOLBOX, lttoolbox-3.2 >= 3.2.0)
+      LTTOOLBOX_VER=32
+    ])
+  ])
+  AC_SUBST(LTTOOLBOX_VER)
+])
+
+PKG_CHECK_APERTIUM
+PKG_CHECK_LTTOOLBOX
 
 APERTIUM_VER=30