From 489ca457ea0b357530842b14145d438724a6d1f3 Mon Sep 17 00:00:00 2001 From: "Anthony G. Basile" Date: Sun, 10 Mar 2013 14:50:10 -0400 Subject: Only check for gperf if --enable-keymap gperf is only used to generate some header file for src/keymap, and so we should only test for its existence if --enable-keymap is given. See: https://github.com/gentoo/eudev/issues/50 https://bugs.gentoo.org/show_bug.cgi?id=452760 Signed-off-by: Anthony G. Basile --- configure.ac | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index fc958c7368..8b46ae6083 100644 --- a/configure.ac +++ b/configure.ac @@ -36,10 +36,6 @@ AC_PROG_MAKE_SET AC_PATH_PROG([M4], [m4]) AC_PATH_PROG([XSLTPROC], [xsltproc]) -AC_PATH_TOOL(GPERF, gperf) -if test -z "$GPERF" ; then - AC_MSG_ERROR([*** gperf not found]) -fi # Checks for header files. AC_CHECK_HEADERS( @@ -224,8 +220,16 @@ AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"]) # ------------------------------------------------------------------------------ AC_ARG_ENABLE([keymap], - AS_HELP_STRING([--disable-keymap], [disable keymap fixup support @<:@default=enabled@:>@]), - [], [enable_keymap=yes]) + AS_HELP_STRING([--disable-keymap], [disable keymap fixup support @<:@default=enabled@:>@]), + [], [enable_keymap=yes]) + +if test "x$enable_keymap" = "xyes"; then + AC_PATH_TOOL(GPERF, gperf) + if test -z "$GPERF" ; then + AC_MSG_ERROR([*** gperf not found]) + fi +fi + AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = "xyes"]) # ------------------------------------------------------------------------------ -- cgit v1.2.3-54-g00ecf