From 709a841f594331b17c4e034e67dbed3533e9a706 Mon Sep 17 00:00:00 2001 From: Gaetan Nadon Date: Sun, 31 Oct 2010 20:35:24 -0400 Subject: [PATCH app-xkbcomp 1/1] config: replace AC_CHECK_FILE with test -f as it fails to cross-compile Testing for the presence of xkbparse.c is legitimate as this is a build file, but the Autoconf macro assumes it is testing on the host system and fails. Signed-off-by: Gaetan Nadon --- configure.ac | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index c69230b..8e6bd6e 100644 --- a/configure.ac +++ b/configure.ac @@ -34,11 +34,14 @@ XORG_DEFAULT_OPTIONS AM_CONFIG_HEADER(config.h) +# If both the C file and YACC are missing, the package cannot be build. AC_PROG_YACC AC_PATH_PROG([YACC_INST], $YACC) -AC_CHECK_FILE([$srcdir/xkbparse.c], [], - [test -z "$YACC_INST" && AC_MSG_ERROR([yacc not found - unable to compile xkbparse.y])]) - +if test ! -f "$srcdir/xkbparse.c"; then + if test -z "$YACC_INST"; then + AC_MSG_ERROR([yacc not found - unable to compile xkbparse.y]) + fi +fi AC_CHECK_FUNCS([strdup strcasecmp]) -- 1.6.0.4