aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2010-03-09 19:46:25 +0100
committerJaroslav Kysela <perex@perex.cz>2010-03-09 19:46:25 +0100
commit63f682cd3ca18967acdb426de8548c050a16c6f3 (patch)
tree0536297c719cd3223a3ba368ec822a1a66b3084a
parent0c207933bcfe630386e417a9219448cfa83c4ede (diff)
downloadalsa-driver-build-unstable-63f682cd3ca18967acdb426de8548c050a16c6f3.tar.gz
handle more nicely new location for autoconf.h (generated/autoconf.h)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r--acore/info.inc18
-rw-r--r--acore/memalloc.inc12
-rw-r--r--acore/memory.c13
-rw-r--r--acore/memory_wrapper.c12
-rw-r--r--acore/sgbuf.c12
-rw-r--r--acore/wrappers.c13
-rw-r--r--configure.in4
-rw-r--r--drivers/vx/vx_core.c10
-rw-r--r--drivers/vx/vx_hwdep.c14
-rw-r--r--drivers/vx/vx_pcm.c15
-rw-r--r--i2c/other/tea575x-tuner.c8
-rw-r--r--include/alsa-autoconf.h17
-rw-r--r--include/config.h.in1
-rw-r--r--pcmcia/pdaudiocf/pdaudiocf.c12
-rw-r--r--pcmcia/vx/vxpocket.c12
-rw-r--r--usb/usbaudio.inc12
-rw-r--r--usb/usbmidi.inc12
-rw-r--r--usb/usbmixer.inc12
-rw-r--r--usb/usx2y/usX2Yhwdep.inc12
-rw-r--r--usb/usx2y/usbusx2y.inc12
-rw-r--r--usb/usx2y/usx2yhwdeppcm.inc12
21 files changed, 44 insertions, 201 deletions
diff --git a/acore/info.inc b/acore/info.inc
index 00e0fe002..f35de9857 100644
--- a/acore/info.inc
+++ b/acore/info.inc
@@ -1,20 +1,6 @@
+#include "alsa-autoconf.h"
#define __NO_VERSION__
-#include "adriver.h"
-#include <linux/version.h>
-#ifdef CONFIG_HAVE_DEPRECATED_CONFIG_H
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)
-#include <generated/autoconf.h>
-#else
-#include <linux/autoconf.h>
-#endif
-#else
-#include <linux/config.h>
-#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)
-#include <generated/utsrelease.h>
-#else
-#include <linux/utsrelease.h>
-#endif
+
#include <linux/proc_fs.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 0)
diff --git a/acore/memalloc.inc b/acore/memalloc.inc
index 8efdafe09..dcd70bfd3 100644
--- a/acore/memalloc.inc
+++ b/acore/memalloc.inc
@@ -1,14 +1,4 @@
-#include "config.h"
-#include <linux/version.h>
-#ifdef CONFIG_HAVE_DEPRECATED_CONFIG_H
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-#include <generated/autoconf.h>
-#else
-#include <linux/autoconf.h>
-#endif
-#else
-#include <linux/config.h>
-#endif
+#include "alsa-autoconf.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
#if defined(CONFIG_MODVERSIONS) && !defined(__GENKSYMS__) && !defined(__DEPEND__)
diff --git a/acore/memory.c b/acore/memory.c
index fd6cc1237..6ae680bd2 100644
--- a/acore/memory.c
+++ b/acore/memory.c
@@ -1,15 +1,6 @@
-#include "config.h"
+#include "alsa-autoconf.h"
#define __NO_VERSION__
-#include <linux/version.h>
-#ifdef CONFIG_HAVE_DEPRECATED_CONFIG_H
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-#include <generated/autoconf.h>
-#else
-#include <linux/autoconf.h>
-#endif
-#else
-#include <linux/config.h>
-#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12)
#include <linux/compiler.h>
#ifndef __iomem
diff --git a/acore/memory_wrapper.c b/acore/memory_wrapper.c
index 0dff56480..2ac7420e2 100644
--- a/acore/memory_wrapper.c
+++ b/acore/memory_wrapper.c
@@ -1,15 +1,5 @@
-#include "config.h"
+#include "alsa-autoconf.h"
#define __NO_VERSION__
-#include <linux/version.h>
-#ifdef CONFIG_HAVE_DEPRECATED_CONFIG_H
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)
-#include <generated/autoconf.h>
-#else
-#include <linux/autoconf.h>
-#endif
-#else
-#include <linux/config.h>
-#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
#if defined(CONFIG_MODVERSIONS) && !defined(__GENKSYMS__) && !defined(__DEPEND__)
diff --git a/acore/sgbuf.c b/acore/sgbuf.c
index af54a6041..b94829749 100644
--- a/acore/sgbuf.c
+++ b/acore/sgbuf.c
@@ -1,15 +1,5 @@
-#include "config.h"
+#include "alsa-autoconf.h"
#define __NO_VERSION__
-#include <linux/version.h>
-#ifdef CONFIG_HAVE_DEPRECATED_CONFIG_H
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-#include <generated/autoconf.h>
-#else
-#include <linux/autoconf.h>
-#endif
-#else
-#include <linux/config.h>
-#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
#if defined(CONFIG_MODVERSIONS) && !defined(__GENKSYMS__) && !defined(__DEPEND__)
diff --git a/acore/wrappers.c b/acore/wrappers.c
index 3a2a5f2f0..9a76579d1 100644
--- a/acore/wrappers.c
+++ b/acore/wrappers.c
@@ -1,16 +1,5 @@
+#include "alsa-autoconf.h"
#define __NO_VERSION__
-#include "config.h"
-
-#include <linux/version.h>
-#ifdef CONFIG_HAVE_DEPRECATED_CONFIG_H
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-#include <generated/autoconf.h>
-#else
-#include <linux/autoconf.h>
-#endif
-#else
-#include <linux/config.h>
-#endif
#include <linux/string.h>
#include <linux/sched.h>
diff --git a/configure.in b/configure.in
index edb3fe904..38057a56d 100644
--- a/configure.in
+++ b/configure.in
@@ -1460,6 +1460,10 @@ if test -r $KERNDIR/include/linux/config.h ; then
else
deprecated_config_h="1"
fi
+if test -r $KERNDIR/include/generated/autoconf.h ; then
+ deprecated_config_h="0"
+ AC_DEFINE(CONFIG_HAVE_GENERATED_AUTOCONF_H)
+fi
CONFIG_HAVE_DEPRECATED_CONFIG_H=$deprecated_config_h
if test "$CONFIG_HAVE_DEPRECATED_CONFIG_H" = "1"; then
AC_DEFINE(CONFIG_HAVE_DEPRECATED_CONFIG_H)
diff --git a/drivers/vx/vx_core.c b/drivers/vx/vx_core.c
index 2d8e7220c..ccd237826 100644
--- a/drivers/vx/vx_core.c
+++ b/drivers/vx/vx_core.c
@@ -1,15 +1,7 @@
#include "config.h"
/* to be in alsa-driver-specfici code */
#include <linux/version.h>
-#ifdef CONFIG_HAVE_DEPRECATED_CONFIG_H
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-#include <generated/autoconf.h>
-#else
-#include <linux/autoconf.h>
-#endif
-#else
-#include <linux/config.h>
-#endif
+#include "alsa-autoconf.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
#define spin_lock_bh spin_lock
#define spin_unlock_bh spin_unlock
diff --git a/drivers/vx/vx_hwdep.c b/drivers/vx/vx_hwdep.c
index c8a2544df..3d7fc9238 100644
--- a/drivers/vx/vx_hwdep.c
+++ b/drivers/vx/vx_hwdep.c
@@ -1,16 +1,6 @@
-#include "config.h"
+#include "alsa-autoconf.h"
#define __NO_VERSION__
-/* to be in alsa-driver-specfici code */
-#include <linux/version.h>
-#ifdef CONFIG_HAVE_DEPRECATED_CONFIG_H
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-#include <generated/autoconf.h>
-#else
-#include <linux/autoconf.h>
-#endif
-#else
-#include <linux/config.h>
-#endif
+/* to be in alsa-driver-specific code */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
#define CONFIG_USE_VXLOADER
#endif
diff --git a/drivers/vx/vx_pcm.c b/drivers/vx/vx_pcm.c
index 85c9ef1b1..f672ad998 100644
--- a/drivers/vx/vx_pcm.c
+++ b/drivers/vx/vx_pcm.c
@@ -1,20 +1,9 @@
-#include "config.h"
+#include "alsa-autoconf.h"
#define __NO_VERSION__
-/* to be in alsa-driver-specfici code */
-#include <linux/version.h>
-#ifdef CONFIG_HAVE_DEPRECATED_CONFIG_H
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)
-#include <generated/autoconf.h>
-#else
-#include <linux/autoconf.h>
-#endif
-#else
-#include <linux/config.h>
-#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 2, 18)
#define vmalloc_32(x) vmalloc_nocheck(x)
#endif
#include "adriver.h"
#include "../../alsa-kernel/drivers/vx/vx_pcm.c"
-
diff --git a/i2c/other/tea575x-tuner.c b/i2c/other/tea575x-tuner.c
index a658bfcdf..109789ffc 100644
--- a/i2c/other/tea575x-tuner.c
+++ b/i2c/other/tea575x-tuner.c
@@ -1,10 +1,4 @@
-#include "config.h"
-#ifdef CONFIG_HAVE_DEPRECATED_CONFIG_H
-#include <linux/autoconf.h>
-#else
-#include <linux/config.h>
-#endif
-#include <linux/version.h>
+#include "alsa-autoconf.h"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30)
#include "adriver.h"
diff --git a/include/alsa-autoconf.h b/include/alsa-autoconf.h
new file mode 100644
index 000000000..b85cfde85
--- /dev/null
+++ b/include/alsa-autoconf.h
@@ -0,0 +1,17 @@
+/*
+ * include autoconf.h/config.h from proper location
+ */
+#include "config.h"
+#if defined(CONFIG_HAVE_GENERATED_AUTOCONF_H)
+#include <generated/autoconf.h>
+#elif defined(CONFIG_HAVE_DEPRECATED_CONFIG_H)
+#include <linux/autoconf.h>
+#else
+#include <linux/config.h>
+#endif
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)
+#include <generated/utsrelease.h>
+#else
+#include <linux/utsrelease.h>
+#endif
diff --git a/include/config.h.in b/include/config.h.in
index 5c7a96c0e..49ce1883c 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -88,3 +88,4 @@
#undef CONFIG_HAVE_GFP_DMA32
#undef CONFIG_HAVE_PAGE_TO_PFN
#undef CONFIG_HAVE_VIDEO_DRVDATA
+#undef CONFIG_HAVE_GENERATED_AUTOCONF_H
diff --git a/pcmcia/pdaudiocf/pdaudiocf.c b/pcmcia/pdaudiocf/pdaudiocf.c
index bbdea512d..1d6e11514 100644
--- a/pcmcia/pdaudiocf/pdaudiocf.c
+++ b/pcmcia/pdaudiocf/pdaudiocf.c
@@ -1,14 +1,4 @@
-#include "config.h"
-#include <linux/version.h>
-#ifdef CONFIG_HAVE_DEPRECATED_CONFIG_H
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-#include <generated/autoconf.h>
-#else
-#include <linux/autoconf.h>
-#endif
-#else
-#include <linux/config.h>
-#endif
+#include "alsa-autoconf.h"
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
#include "pdaudiocf_old.c"
diff --git a/pcmcia/vx/vxpocket.c b/pcmcia/vx/vxpocket.c
index cba947417..b325c9c0c 100644
--- a/pcmcia/vx/vxpocket.c
+++ b/pcmcia/vx/vxpocket.c
@@ -1,14 +1,4 @@
-#include "config.h"
-#include <linux/version.h>
-#ifdef CONFIG_HAVE_DEPRECATED_CONFIG_H
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-#include <generated/autoconf.h>
-#else
-#include <linux/autoconf.h>
-#endif
-#else
-#include <linux/config.h>
-#endif
+#include "alsa-autoconf.h"
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
#include "vxpocket_old.c"
diff --git a/usb/usbaudio.inc b/usb/usbaudio.inc
index 68d5c2258..30d231c04 100644
--- a/usb/usbaudio.inc
+++ b/usb/usbaudio.inc
@@ -1,14 +1,4 @@
-#include "config.h"
-#include <linux/version.h>
-#ifdef CONFIG_HAVE_DEPRECATED_CONFIG_H
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-#include <generated/autoconf.h>
-#else
-#include <linux/autoconf.h>
-#endif
-#else
-#include <linux/config.h>
-#endif
+#include "alsa-autoconf.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5)
#define SND_NEED_USB_SET_INTERFACE
diff --git a/usb/usbmidi.inc b/usb/usbmidi.inc
index 97cfcf36e..be3a8b2be 100644
--- a/usb/usbmidi.inc
+++ b/usb/usbmidi.inc
@@ -1,14 +1,4 @@
-#include "config.h"
-#include <linux/version.h>
-#ifdef CONFIG_HAVE_DEPRECATED_CONFIG_H
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-#include <generated/autoconf.h>
-#else
-#include <linux/autoconf.h>
-#endif
-#else
-#include <linux/config.h>
-#endif
+#include "alsa-autoconf.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5)
#define SND_NEED_USB_SET_INTERFACE
diff --git a/usb/usbmixer.inc b/usb/usbmixer.inc
index e11808b03..52670dfa3 100644
--- a/usb/usbmixer.inc
+++ b/usb/usbmixer.inc
@@ -1,14 +1,4 @@
-#include "config.h"
-#include <linux/version.h>
-#ifdef CONFIG_HAVE_DEPRECATED_CONFIG_H
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-#include <generated/autoconf.h>
-#else
-#include <linux/autoconf.h>
-#endif
-#else
-#include <linux/config.h>
-#endif
+#include "alsa-autoconf.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
#define SND_NEED_USB_WRAPPER
diff --git a/usb/usx2y/usX2Yhwdep.inc b/usb/usx2y/usX2Yhwdep.inc
index c071d2a73..69fed31c8 100644
--- a/usb/usx2y/usX2Yhwdep.inc
+++ b/usb/usx2y/usX2Yhwdep.inc
@@ -1,14 +1,4 @@
-#include "config.h"
-#include <linux/version.h>
-#ifdef CONFIG_HAVE_DEPRECATED_CONFIG_H
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-#include <generated/autoconf.h>
-#else
-#include <linux/autoconf.h>
-#endif
-#else
-#include <linux/config.h>
-#endif
+#include "alsa-autoconf.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5)
#define SND_NEED_USB_SET_INTERFACE
diff --git a/usb/usx2y/usbusx2y.inc b/usb/usx2y/usbusx2y.inc
index c3b81d66d..5f866313d 100644
--- a/usb/usx2y/usbusx2y.inc
+++ b/usb/usx2y/usbusx2y.inc
@@ -1,14 +1,4 @@
-#include "config.h"
-#include <linux/version.h>
-#ifdef CONFIG_HAVE_DEPRECATED_CONFIG_H
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-#include <generated/autoconf.h>
-#else
-#include <linux/autoconf.h>
-#endif
-#else
-#include <linux/config.h>
-#endif
+#include "alsa-autoconf.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5)
#define SND_NEED_USB_SET_INTERFACE
diff --git a/usb/usx2y/usx2yhwdeppcm.inc b/usb/usx2y/usx2yhwdeppcm.inc
index a20e3e7c5..8c336c32e 100644
--- a/usb/usx2y/usx2yhwdeppcm.inc
+++ b/usb/usx2y/usx2yhwdeppcm.inc
@@ -1,14 +1,4 @@
-#include "config.h"
-#include <linux/version.h>
-#ifdef CONFIG_HAVE_DEPRECATED_CONFIG_H
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)
-#include <generated/autoconf.h>
-#else
-#include <linux/autoconf.h>
-#endif
-#else
-#include <linux/config.h>
-#endif
+#include "alsa-autoconf.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5)
#define SND_NEED_USB_SET_INTERFACE