alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Antonio Ospite <ao2@ao2.it>
To: alsa-devel@alsa-project.org
Cc: Takashi Iwai <tiwai@suse.de>,
	Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	Antonio Ospite <ao2@ao2.it>
Subject: [alsa-utils][PATCH 2/5] configure.ac: fix the check for xmlto availability
Date: Fri,  9 Dec 2016 14:02:29 +0100	[thread overview]
Message-ID: <20161209130232.19457-3-ao2@ao2.it> (raw)
In-Reply-To: <20161209130232.19457-1-ao2@ao2.it>

The same $xmlto variable is used both in AC_ARG_ENABLE and
AC_CHECK_PROG, but the latter is not setting a value to it when the
program is not found.

These two facts result in the "yes" value from the AC_ARG_ENABLE macro
to be still kept in the variable when the program is not found by
AC_CHECK_PROG, causing USE_XMLTO to be always set, finally resulting in
a build failure in case the xmlto program is not actually in the PATH.

As possible fix could have been to set "no" as a value in AC_CHECK_PROG
when program is not found.

However using two separate variables is more explicit, so fix the issue
this way.

Signed-off-by: Antonio Ospite <ao2@ao2.it>
---
 configure.ac | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2221617..c9629bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -166,14 +166,14 @@ AC_ARG_ENABLE(alsaloop,
      esac],[alsaloop=true])
 AM_CONDITIONAL(ALSALOOP, test x$alsaloop = xtrue)
 
-xmlto=""
+xmlto_available=""
 AC_ARG_ENABLE(xmlto,
  AS_HELP_STRING([--disable-xmlto], [Disable man page creation via xmlto]),
  xmlto="$enableval", xmlto="yes")
 if test "$xmlto" = "yes"; then
-  AC_CHECK_PROG([xmlto], [xmlto], [yes])
+  AC_CHECK_PROG([xmlto_available], [xmlto], [yes])
 fi
-AM_CONDITIONAL(USE_XMLTO, test x"$xmlto" = xyes)
+AM_CONDITIONAL(USE_XMLTO, test x"$xmlto_available" = xyes)
 
 AC_ARG_WITH(
         [udev-rules-dir],
-- 
2.11.0

  parent reply	other threads:[~2016-12-09 13:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-09 13:02 [alsa-utils][PATCH 0/5] Add man page for alsaucm + other fixes Antonio Ospite
2016-12-09 13:02 ` [alsa-utils][PATCH 1/5] alsaucm: mention the "list1" command in the usage output Antonio Ospite
2016-12-09 13:02 ` Antonio Ospite [this message]
2016-12-09 13:02 ` [alsa-utils][PATCH 3/5] configure.ac: add a check for rst2man, a reStructuredText man page generator Antonio Ospite
2016-12-09 13:02 ` [alsa-utils][PATCH 4/5] alsaucm: add a man page, generated from reStructuredText Antonio Ospite
2016-12-09 13:02 ` [alsa-utils][PATCH 5/5] INSTALL: document how to configure a build for installation in a local dir Antonio Ospite
2016-12-09 16:33 ` [alsa-utils][PATCH 0/5] Add man page for alsaucm + other fixes Takashi Iwai
2016-12-09 17:26   ` Antonio Ospite

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161209130232.19457-3-ao2@ao2.it \
    --to=ao2@ao2.it \
    --cc=alsa-devel@alsa-project.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).