All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bernhard Fischer <rep.nop@aon.at>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [patch] add configure check for working alsa
Date: Thu, 4 Jan 2007 20:47:46 +0100	[thread overview]
Message-ID: <20070104194746.GK28746@aon.at> (raw)
In-Reply-To: <200701041921.41677.paul@codesourcery.com>

[-- Attachment #1: Type: text/plain, Size: 852 bytes --]

On Thu, Jan 04, 2007 at 07:21:40PM +0000, Paul Brook wrote:
>On Thursday 04 January 2007 15:02, Bernhard Fischer wrote:
>> Hi,
>>
>> This patchlet adds a check to configure that makes sure that we have a
>> working alsa setup.
>>
>> Previously, if --enable-alsa was given but the user forgot to install
>> the alsa libs proper, the build failed later on due to eventually
>> missing libs. The patch makes sure that the user can spot that alsa
>> support was turned off after configuration completed.
>
>This is wrong. If the user requests alsa we should honour that request, or 
>fail trying. We should never quietly ignore an explicit user decision.
>
>Making configure fail early with an error is acceptable (as it the current 
>link failure). Ignoring --enable-alsa is not.

Fair enough. Updated variant prints an error if the compile-check
failed.

[-- Attachment #2: qemu.cvs-20070104.add-alsa-config-check.02.diff --]
[-- Type: text/x-diff, Size: 807 bytes --]

--- ../qemu_trunk.orig/configure	2007-01-04 14:38:58.000000000 +0100
+++ configure	2007-01-04 20:46:22.000000000 +0100
@@ -509,6 +536,25 @@ fi # sdl compile test
 fi # cross compilation
 fi # -z $sdl
 
+##########################################
+# sound support libraries
+# alsa
+if test "$alsa" = "yes" ; then
+  cat > $TMPC << EOF
+#include <alsa/asoundlib.h>
+int main(void) { snd_pcm_t **handle; return snd_pcm_close(*handle); }
+EOF
+  if $cc -o $TMPE $TMPC -lasound 2> /dev/null ; then
+    :
+  else
+    echo
+    echo "Error: Could not find alsa"
+    echo "Make sure to have the alsa libs and headers installed."
+    echo
+    exit 1
+  fi
+fi # alsa
+
 # Check if tools are available to build documentation.
 if [ -x "`which texi2html`" ] && [ -x "`which pod2man`" ]; then
   build_docs="yes"

      reply	other threads:[~2007-01-04 19:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-04 15:02 [Qemu-devel] [patch] add configure check for working alsa Bernhard Fischer
2007-01-04 19:21 ` Paul Brook
2007-01-04 19:47   ` Bernhard Fischer [this message]

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=20070104194746.GK28746@aon.at \
    --to=rep.nop@aon.at \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.