From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: alsa-drivers-HEAD does not compile against recent RHE5.1 kernels Date: Wed, 04 Jun 2008 18:54:36 +0200 Message-ID: References: <1211506900.3811.105.camel@localhost> <1211542742.3811.139.camel@localhost> <1211545221.3811.142.camel@localhost> <1212104263.17410.114.camel@localhost> <1212592348.28032.111.camel@localhost> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 76FB3244CB for ; Wed, 4 Jun 2008 18:54:40 +0200 (CEST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Ben Stanley Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Wed, 04 Jun 2008 17:16:12 +0200, I wrote: > > At Thu, 05 Jun 2008 01:12:28 +1000, > Ben Stanley wrote: > > > > So, if config.h is not needed in 'newer' kernels (and causes an error?), > > and is needed in 'older' kernels, it is then an error to universally > > include it in a configure test program where it causes an error if used > > inappropriately... > > Well, apparently it's only RH kernels that cause the problem. > So I haven't cared about it at all. On the second thought, we may force to define the own linux/config.h to avoid this for the case > 2.6.14. A totally untested patch below. Takashi --- diff --git a/configure.in b/configure.in index 4c44567..e3dada2 100644 --- a/configure.in +++ b/configure.in @@ -615,6 +615,19 @@ CHECK_KERNEL_HEADER(linux/config.h, [#ifndef _LINUX_CONFIG_H #endif ]) +if test ! -f include/linux/config.h; then + if test "$kversion.$kpatchlevel" = "2.6" -a "$ksublevel" -gt 14; then + echo "Force to create linux/config.h" + mkdir -p include/linux + echo "#ifndef _LINUX_CONFIG_H +#define _LINUX_CONFIG_H +#ifndef AUTOCONF_INCLUDED +#include +#endif +#endif" > include/linux/config.h + fi +fi + dnl Check kernel headers for 2.2 MODIFY_KERNEL_HEADER(linux/kmod.h, __LINUX_KMOD_H__) CHECK_KERNEL_HEADER(linux/utsrelease.h)