diff options
author | Jaroslav Kysela <perex@perex.cz> | 2010-03-22 09:19:19 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2010-03-22 09:19:19 +0100 |
commit | b83a367d4bfc193930dcabb972ab5d0511626539 (patch) | |
tree | a4d54814f6ac5a6399227545735710b0bc62cad4 | |
parent | 994c64229f856fb011e38a7728b2a076aeaf943f (diff) | |
download | alsa-driver-build-unstable-b83a367d4bfc193930dcabb972ab5d0511626539.tar.gz |
configure.in: More informative kernel/ALSA kernel tree directory checks
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | configure.in | 25 |
2 files changed, 24 insertions, 3 deletions
@@ -128,8 +128,8 @@ $(ALSAKERNELFILE): else \ # alsa-kmirror tree \ ln -sf $(ALSAKERNELDIR) alsa-kernel ; \ - ln -sf alsa-kernel sound ; \ fi; \ + ln -sf alsa-kernel sound ; \ fi \ } diff --git a/configure.in b/configure.in index 38057a56d..f43f0efbc 100644 --- a/configure.in +++ b/configure.in @@ -69,7 +69,19 @@ AC_ARG_WITH(alsakernel, [alsakerneldir="$withval"], [alsakerneldir="../alsa-kmirror"] ) -ALSAKERNELDIR=$(cd "$alsakerneldir" && pwd) +ALSAKERNELDIR="" +if test -d "$alsakerneldir"; then + ALSAKERNELDIR=$(cd "$alsakerneldir" && pwd) +elif test -d "alsa-kernel"; then + ALSAKERNELDIR=$(cd "alsa-kernel" && pwd) +fi +if test -z "$ALSAKERNELDIR"; then + cat << EOF +The directory $alsakerneldir does not exist. +Please obtain the ALSA linux kernel tree (alsa-kmirror or alsa-kernel). +EOF + exit 1 +fi AC_MSG_RESULT($alsakerneldir) AC_SUBST(ALSAKERNELDIR) @@ -90,7 +102,16 @@ AC_ARG_WITH(kernel, DEFAULT_KERNEL_BUILD=""], [kerneldir="$DEFAULT_KERNEL_DIR"] ) -CONFIG_SND_KERNELDIR=$(cd "$kerneldir" && pwd) +if test -d "$kerneldir"; then + CONFIG_SND_KERNELDIR=$(cd "$kerneldir" && pwd) +else + cat << EOF +Please install the package with full kernel sources for your distribution +or use --with-kernel=dir option to specify another directory with kernel +sources (default is $DEFAULT_KERNEL_DIR). +EOF + exit 1 +fi AC_MSG_RESULT($kerneldir) dnl Check for directory with kernel build tree... |