Source: scim
Version: 1.4.18-1
Tags: patch upstream
User: helm...@debian.org
Usertags: rebootstrap

scim fails to cross build from source, because it wrongly uses
AC_CHECK_FILE in configure.ac. That macro is intended to figure out
whether a file exists on the host machine. However it is used in some
(not all) cases to discover files on the build machine. For the latter a
simple test -f works. After doing so, scim cross builds successfully.
Please consider applying the attached patch.

Helmut
From: Helmut Grohne <hel...@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)

Reply via email to