]> granicus.if.org Git - zfs/commitdiff
Use $target_cpu instead of `arch`
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 14 Jul 2010 19:40:36 +0000 (12:40 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 14 Jul 2010 19:44:42 +0000 (12:44 -0700)
We should not be using arch for a few reasons.  First off it might
not be installed on their system, and secondly they may be trying
to cross-compile.

config/kernel.m4

index 9bf63d4272d4ea307f24626a6dc11b4df47a4a2a..ca61dfd17420d6d04b498844a6c77930ba57e663 100644 (file)
@@ -102,12 +102,12 @@ AC_DEFUN([ZFS_AC_KERNEL], [
        AC_MSG_RESULT([$kernelsrc])
        AC_MSG_CHECKING([kernel build directory])
        if test -z "$kernelbuild"; then
-               if test -d ${kernelsrc}-obj/`arch`/`arch`; then
-                       kernelbuild=${kernelsrc}-obj/`arch`/`arch`
-               elif test -d ${kernelsrc}-obj/`arch`/default; then
-                       kernelbuild=${kernelsrc}-obj/`arch`/default
-               elif test -d `dirname ${kernelsrc}`/build-`arch`; then
-                       kernelbuild=`dirname ${kernelsrc}`/build-`arch`
+               if test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then
+                       kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu}
+               elif test -d ${kernelsrc}-obj/${target_cpu}/default; then
+                       kernelbuild=${kernelsrc}-obj/${target_cpu}/default
+               elif test -d `dirname ${kernelsrc}`/build-${target_cpu}; then
+                       kernelbuild=`dirname ${kernelsrc}`/build-${target_cpu}
                else
                        kernelbuild=${kernelsrc}
                fi