[alsa-devel] alsa-drivers-HEAD does not compile against recent RHE5.1 kernels
Takashi Iwai
tiwai at suse.de
Wed Jun 4 18:54:36 CEST 2008
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 <linux/autoconf.h>
+#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)
More information about the Alsa-devel
mailing list