From f8f35f7656d618b3263a51250b6a32a0ea10de96 Mon Sep 17 00:00:00 2001
From: Eivind Uggedal <eivind@uggedal.com>
Date: Tue, 16 Sep 2014 21:08:32 +0000
Subject: [PATCH] Fix man page detection when cross compiling.

AC_CHECK_FILE(S) is meant for checks of files on the native system and does
not work when cross compiling.
---
 configure.ac | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5e1392e..90e836f 100644
--- configure.ac
+++ configure.ac
@@ -127,10 +127,9 @@ AC_ARG_ENABLE(man-pages,
 if test "x$enable_man_pages" = "xyes"; then
 	AC_CHECKING([if all man pages already exist])
 	have_to_generate_man_pages="no"
-	AC_CHECK_FILES(["stdlog/stdlog.3" "stdlog/stdlogctl.1"],
-	    [],
-	    [have_to_generate_man_pages="yes"]
-	)
+	if test ! -r "stdlog/stdlog.3" || test ! -r "stdlog/stdlogctl.1"; then
+		have_to_generate_man_pages="yes"
+	fi
 	if test "x$have_to_generate_man_pages" = "xyes"; then
 	    AC_MSG_RESULT([Some man pages are missing. We need rst2man to generate the missing man pages from source... Alternatively, use --disable-man-pages to build without them.])
 	else
