aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2010-08-25 12:02:12 +0200
committerJaroslav Kysela <perex@perex.cz>2010-08-25 12:02:12 +0200
commit59c69129168de29f67da3fe7eade1b936f049ec6 (patch)
tree4eacdb5ff1f10e26096ffe79151f929e163fe1a8
parent21ed239da36b9b0da6237adf7c8a018651586f43 (diff)
downloadalsa-driver-build-unstable-59c69129168de29f67da3fe7eade1b936f049ec6.tar.gz
configure.in: Fix and improve logic for detection of kernel directory
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r--configure.in9
1 files changed, 5 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index e94cbe71b..245f3c9c0 100644
--- a/configure.in
+++ b/configure.in
@@ -70,9 +70,10 @@ AC_ARG_WITH(alsakernel,
[alsakerneldir="../alsa-kmirror"]
)
ALSAKERNELDIR=""
-if test -d "$alsakerneldir"; then
+if test -d "$alsakerneldir" -o -L "$alsakerneldir"; then
ALSAKERNELDIR=$(cd "$alsakerneldir" && pwd)
-elif test -d "alsa-kernel"; then
+fi
+if test -z "$ALSAKERNELDIR" -a -d "alsa-kernel"; then
ALSAKERNELDIR=$(cd "alsa-kernel" && pwd)
fi
if test -z "$ALSAKERNELDIR"; then
@@ -82,7 +83,7 @@ Please obtain the ALSA linux kernel tree (alsa-kmirror or alsa-kernel).
EOF
exit 1
fi
-AC_MSG_RESULT($alsakerneldir)
+AC_MSG_RESULT($ALSAKERNELDIR)
AC_SUBST(ALSAKERNELDIR)
dnl Check for directory with kernel source...
@@ -102,7 +103,7 @@ AC_ARG_WITH(kernel,
DEFAULT_KERNEL_BUILD=""],
[kerneldir="$DEFAULT_KERNEL_DIR"]
)
-if test -d "$kerneldir"; then
+if test -d "$kerneldir" -o -L "$kerneldir"; then
CONFIG_SND_KERNELDIR=$(cd "$kerneldir" && pwd)
else
cat << EOF