Package: scim / 1.4.18-2.1

02_replace_AC_CHECK_FILE.patch Patch series | download
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
From: Helmut Grohne <helmut@subdivi.de>
Subject: fix cross compilation

We are not interested in whether these .xsl files exist on the host machine,
but want to know whether they exist on the build machine. Thus AC_CHECK_FILE
must not be used.

Index: scim-1.4.18/configure.ac
===================================================================
--- scim-1.4.18.orig/configure.ac
+++ scim-1.4.18/configure.ac
@@ -131,20 +131,14 @@
 AC_SUBST(XSLTPROC)
 
 # Checks if docbook-style-xsl is available
-AC_CHECK_FILE(
- [/usr/share/sgml/docbook/xsl-stylesheets/html/tldp-html.xsl],
- [DOCBOOK_XSL=/usr/share/sgml/docbook/xsl-stylesheets/html/tldp-html.xsl],
- [AC_CHECK_FILE(
-  [/usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl],
-  [DOCBOOK_XSL=/usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl],
-   [AC_CHECK_FILE(
-    [/usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl],
-    [DOCBOOK_XSL=/usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl],
-    [DOCBOOK_XSL=no]
-    )]
-  )]
-)
-
+AC_MSG_CHECKING(docbook xsl)
+DOCBOOK_XSL=no
+for f in /usr/share/sgml/docbook/xsl-stylesheets/html/tldp-html.xsl /usr/share/sgml/docbook/xsl-stylesheets/html/docbook.xsl /usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl; do
+  test -f "$f" || continue
+  DOCBOOK_XSL=$f
+  break
+done
+AC_MSG_RESULT($DOCBOOK_XSL)
 AC_SUBST(DOCBOOK_XSL)
 
 AM_CONDITIONAL(HAVE_DOCBOOK, test x$DOCBOOK_XSL != xno)