This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/47145] [4.6 Regression] cross-compilation fails with "cannot check for file existence when cross compiling"
- From: "ktietz at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 3 Jan 2011 14:46:07 +0000
- Subject: [Bug libstdc++/47145] [4.6 Regression] cross-compilation fails with "cannot check for file existence when cross compiling"
- Auto-submitted: auto-generated
- References: <bug-47145-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47145
--- Comment #4 from Kai Tietz <ktietz at gcc dot gnu.org> 2011-01-03 14:46:05 UTC ---
(In reply to comment #3)
> The issue here is AC_CHECK_FILE, which is documented to not work for
> cross-compiling scenario. By replacing this to test -f, it should working for
> native and cross-compile.
> The following patch should solve this. I can't regenerate at the moment the
> configure for testing. I'll do it later this eveing at home. But maybe someone
> else could check it before.
>
Sorry had a typo with semicolon ...
Index: configure.ac
===================================================================
--- configure.ac (revision 168422)
+++ configure.ac (working copy)
@@ -343,9 +343,12 @@
# Check for docbook
AC_CHECK_PROG([XSLTPROC], xsltproc, yes, no)
AC_CHECK_PROG([XMLLINT], xmllint, yes, no)
-AC_CHECK_FILE([/usr/share/sgml/docbook/xsl-ns-stylesheets/VERSION],
- [glibcxx_stylesheets=yes], [glibcxx_stylesheets=no])
+glibcxx_stylesheets=no;
+if test -f /usr/share/sgml/docbook/xsl-ns-stylesheets/VERSION; then
+ glibcxx_stylesheets=yes;
+fi
+
# Check for xml/html dependencies.
AM_CONDITIONAL(BUILD_XML,
test $ac_cv_prog_DOXYGEN = "yes" &&