Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: James Courtier-Dutton <James@superbug.demon.co.uk>
Cc: alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: Re: Trying to get alsa-driver to build on a 2.6.x kernel.
Date: Fri, 30 Jan 2004 12:05:30 +0100	[thread overview]
Message-ID: <s5hekthsnlx.wl@alsa2.suse.de> (raw)
In-Reply-To: <401963AC.8080603@superbug.demon.co.uk>

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

At Thu, 29 Jan 2004 19:49:00 +0000,
James Courtier-Dutton wrote:
> 
> [1  <text/plain; us-ascii (7bit)>]
> I have been told that one should be able to build alsa-driver on a 2.6.x 
> kernel, but it fails here.
> 
> I attach config.log for your information.
> I also attach the console output from running
> ./configure --with-cards=emu10k1,intel8x0,usb-audio
> 
> Can anyone help?

how about the patch below?


Takashi

[-- Attachment #2: build-2.6-fix.dif --]
[-- Type: application/octet-stream, Size: 6462 bytes --]

Index: alsa-driver/Makefile.conf.in
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-driver/Makefile.conf.in,v
retrieving revision 1.39
diff -u -r1.39 Makefile.conf.in
--- alsa-driver/Makefile.conf.in	29 Jan 2004 10:49:23 -0000	1.39
+++ alsa-driver/Makefile.conf.in	30 Jan 2004 11:00:26 -0000
@@ -79,7 +79,7 @@
 CONFIG_VIDEO_DEV	= @CONFIG_VIDEO_DEV@
 
 ifndef NEW_KBUILD
-INCLUDE		= -I$(TOPDIR)/include @EXTRA_INCLUDES@ -I$(CONFIG_SND_KERNELDIR)/include
+INCLUDE		= -I$(TOPDIR)/include @EXTRA_INCLUDES@ @KERNEL_INC@
 CFLAGS		= $(MODFLAGS) $(INCLUDE) $(c_opts) -Wall -Wstrict-prototypes \
 	-fomit-frame-pointer -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common \
 	-pipe -DALSA_BUILD -nostdinc -iwithprefix include
Index: alsa-driver/configure.in
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-driver/configure.in,v
retrieving revision 1.156
diff -u -r1.156 configure.in
--- alsa-driver/configure.in	29 Jan 2004 10:49:23 -0000	1.156
+++ alsa-driver/configure.in	30 Jan 2004 11:02:11 -0000
@@ -86,8 +86,9 @@
 EOF
   exit 1
 fi
+KERNEL_INC="-I$CONFIG_SND_KERNELDIR/include"
 ac_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -I$CONFIG_SND_KERNELDIR/include"
+CFLAGS="$CFLAGS $KERNEL_INC"
 AC_CACHE_VAL(kaversion,
 [AC_TRY_RUN([
 #include <stdio.h>
@@ -153,7 +154,7 @@
 dnl Check for GCC version...
 AC_MSG_CHECKING(for GCC version)
 ac_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -I$CONFIG_SND_KERNELDIR/include"
+CFLAGS="$CFLAGS $KERNEL_INC"
 AC_CACHE_VAL(kernel_gcc,
 [AC_TRY_RUN([
 #include <stdio.h>
@@ -341,7 +342,7 @@
   boolvar="$1"
   AC_MSG_CHECKING(for $2)
   ac_save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -I$CONFIG_SND_KERNELDIR/include"
+  CFLAGS="$CFLAGS $KERNEL_INC"
   boolchk=""
   AC_TRY_RUN([
 #include "$CONFIG_SND_KERNELDIR/include/linux/autoconf.h"
@@ -367,7 +368,7 @@
   boolvar1="$1_MODULE"
   AC_MSG_CHECKING(for $2)
   ac_save_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -I$CONFIG_SND_KERNELDIR/include"
+  CFLAGS="$CFLAGS $KERNEL_INC"
   boolchk=""
   AC_TRY_RUN([
 #include "$CONFIG_SND_KERNELDIR/include/linux/autoconf.h"
@@ -571,7 +572,7 @@
 processor=""
 rm -f processor.id
 ac_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -I$CONFIG_SND_KERNELDIR/include"
+CFLAGS="$CFLAGS $KERNEL_INC"
 AC_TRY_RUN([
 #include <stdio.h>
 #include "$CONFIG_SND_KERNELDIR/include/linux/autoconf.h"
@@ -886,7 +887,7 @@
 	machine=`cat machine.id`;AC_MSG_RESULT($machine))
 	CFLAGS="$ac_save_CFLAGS"
 	rm -f machine.id
-	c_opts="$c_opts -I\$(CONFIG_SND_KERNELDIR)/include/asm-i386/mach-$machine"
+	KERNEL_INC="$KERNEL_INC -I\$(CONFIG_SND_KERNELDIR)/include/asm-i386/mach-$machine"
     fi
     ;;
 esac
@@ -997,7 +998,7 @@
 AC_MSG_CHECKING(for strlcpy)
 strlcpy="0"
 ac_save_CFLAGS="$CFLAGS"
-CFLAGS="-Wall -Werror $CFLAGS -I$CONFIG_SND_KERNELDIR/include"
+CFLAGS="-Wall -Werror $CFLAGS $KERNEL_INC"
 AC_TRY_COMPILE([
 #define __KERNEL__
 #include "$CONFIG_SND_KERNELDIR/include/linux/config.h"
@@ -1022,7 +1023,7 @@
 AC_MSG_CHECKING(for snprintf)
 snprintf="0"
 ac_save_CFLAGS="$CFLAGS"
-CFLAGS="-Wall -Werror $CFLAGS -I$CONFIG_SND_KERNELDIR/include"
+CFLAGS="-Wall -Werror $CFLAGS $KERNEL_INC"
 AC_TRY_COMPILE([
 #define __KERNEL__
 #include "$CONFIG_SND_KERNELDIR/include/linux/config.h"
@@ -1046,7 +1047,7 @@
 AC_MSG_CHECKING(for vmalloc_to_page)
 vmalloc_to_page="0"
 ac_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -I$CONFIG_SND_KERNELDIR/include"
+CFLAGS="$CFLAGS $KERNEL_INC"
 AC_TRY_COMPILE([
 #define __KERNEL__
 #include "$CONFIG_SND_KERNELDIR/include/linux/config.h"
@@ -1071,7 +1072,7 @@
 AC_MSG_CHECKING(for old kmod)
 old_kmod="0"
 ac_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Wall -I$CONFIG_SND_KERNELDIR/include"
+CFLAGS="$CFLAGS -Wall $KERNEL_INC"
 AC_TRY_COMPILE([
 #define __KERNEL__
 #include "$CONFIG_SND_KERNELDIR/include/linux/config.h"
@@ -1094,7 +1095,7 @@
 AC_MSG_CHECKING(for PDE)
 pde_defined="0"
 ac_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Wall -I$CONFIG_SND_KERNELDIR/include"
+CFLAGS="$CFLAGS -Wall $KERNEL_INC"
 AC_TRY_COMPILE([
 #define __KERNEL__
 #include "$CONFIG_SND_KERNELDIR/include/linux/config.h"
@@ -1119,7 +1120,7 @@
 AC_MSG_CHECKING(for pci_set_consistent_dma_mask)
 pci_consistent_defined="0"
 ac_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Wall -I$CONFIG_SND_KERNELDIR/include"
+CFLAGS="$CFLAGS -Wall $KERNEL_INC"
 AC_TRY_COMPILE([
 #define __KERNEL__
 #include "$CONFIG_SND_KERNELDIR/include/linux/config.h"
@@ -1142,7 +1143,7 @@
 AC_MSG_CHECKING(for tty->count is the atomic type)
 tty_count_atomic="0"
 ac_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -Wall -I$CONFIG_SND_KERNELDIR/include"
+CFLAGS="$CFLAGS -Wall $KERNEL_INC"
 AC_TRY_COMPILE([
 #define __KERNEL__
 #include "$CONFIG_SND_KERNELDIR/include/linux/config.h"
@@ -1168,7 +1169,7 @@
 AC_MSG_CHECKING(for old kill_fasync)
 oldkfasync="0"
 ac_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -I$CONFIG_SND_KERNELDIR/include"
+CFLAGS="$CFLAGS $KERNEL_INC"
 AC_TRY_COMPILE([
 #define __KERNEL__
 #include "$CONFIG_SND_KERNELDIR/include/linux/config.h"
@@ -1196,7 +1197,7 @@
 AC_MSG_CHECKING(for dma_addr_t)
 dma_addr_t="0"
 ac_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -I$CONFIG_SND_KERNELDIR/include"
+CFLAGS="$CFLAGS $KERNEL_INC"
 AC_TRY_COMPILE([
 #define __KERNEL__
 #include "$CONFIG_SND_KERNELDIR/include/linux/config.h"
@@ -1219,7 +1220,7 @@
 AC_MSG_CHECKING(for MUTEX macros)
 have_mutex_macros="0"
 ac_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -I$CONFIG_SND_KERNELDIR/include"
+CFLAGS="$CFLAGS $KERNEL_INC"
 AC_TRY_COMPILE([
 #define __KERNEL__
 #include "$CONFIG_SND_KERNELDIR/include/linux/config.h"
@@ -1323,7 +1324,7 @@
 AC_MSG_CHECKING(for RTC callback support in kernel)
 rtcsup="0"
 ac_save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -I$CONFIG_SND_KERNELDIR/include"
+CFLAGS="$CFLAGS $KERNEL_INC"
 AC_TRY_RUN([
 #include "$CONFIG_SND_KERNELDIR/include/linux/autoconf.h"
 #if defined(__alpha__) || (!defined(CONFIG_RTC) && !defined(CONFIG_RTC_MODULE))
@@ -1411,6 +1412,7 @@
 AC_SUBST(m_opts)
 AC_SUBST(GENKSYMS)
 AC_SUBST(EXTRA_INCLUDES)
+AC_SUBST(KERNEL_INC)
 
 dnl Output files...
 AC_OUTPUT(version Makefile.conf snddevices \
@@ -1424,6 +1426,7 @@
 if test "$CONFIG_SND_MODULE" = y; then
   echo "Hacking autoconf.h..."
   rm -f include/linux/autoconf.h
+  mkdir -p include/linux
   grep -v CONFIG_SND_ $CONFIG_SND_KERNELDIR/include/linux/autoconf.h > include/linux/autoconf.h
   cat include/autoconf-extra.h >> include/linux/autoconf.h
   cat include/config1.h >> include/linux/autoconf.h

  reply	other threads:[~2004-01-30 11:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-29 19:49 Trying to get alsa-driver to build on a 2.6.x kernel James Courtier-Dutton
2004-01-30 11:05 ` Takashi Iwai [this message]
2004-01-30 14:04   ` James Courtier-Dutton
2004-01-30 14:13     ` Takashi Iwai
2004-01-30 14:46       ` James Courtier-Dutton
2004-01-30 15:02         ` Takashi Iwai
2004-01-30 15:50           ` James Courtier-Dutton
2004-01-30 14:48       ` James Courtier-Dutton

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=s5hekthsnlx.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=James@superbug.demon.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    /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