~serge-hallyn/ubuntu/natty/lxc/lxc-clone

« back to all changes in this revision

Viewing changes to .pc/0008-add-arm-to-supported-archs.patch/config/linux.m4

  • Committer: Bazaar Package Importer
  • Author(s): Marcin Juszkiewicz
  • Date: 2011-04-06 16:49:15 UTC
  • Revision ID: james.westby@ubuntu.com-20110406164915-1v2dq2d22kstvnvw
Tags: 0.7.4-0ubuntu5
Add ARM to list of supported archs - LP: #745884

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
AC_DEFUN([AC_LINUX],
 
2
[
 
3
        AC_LINUX_DIR()
 
4
        AC_LINUX_SRCARCH()
 
5
])
 
6
 
 
7
AC_DEFUN([AS_TRY_LINUX_DIR],
 
8
        [AC_MSG_CHECKING(for Linux in $1)
 
9
 
 
10
        if test -f "$1/Makefile" ; then
 
11
                result=yes
 
12
                $2
 
13
        else
 
14
                result="not found"
 
15
                $3
 
16
        fi
 
17
 
 
18
        AC_MSG_RESULT($result)
 
19
])
 
20
 
 
21
AC_DEFUN([AC_LINUX_DIR],
 
22
[
 
23
        AC_ARG_WITH([linuxdir],
 
24
                [AC_HELP_STRING([--with-linuxdir=DIR],
 
25
                        [specify path to Linux source directory])],
 
26
                [LINUX_DIR="${withval}"],
 
27
                [LINUX_DIR=default])
 
28
 
 
29
        dnl if specified, use the specified one
 
30
        if test "${LINUX_DIR}" != "default" ; then
 
31
                AS_TRY_LINUX_DIR([${LINUX_DIR}], , AC_MSG_ERROR([Linux dir not found]) )
 
32
        fi
 
33
 
 
34
        dnl if not specified, first try with previously set LINUX_KERNEL_RELEASE
 
35
        if test "${LINUX_DIR}" = "default" ; then
 
36
                dir="/lib/modules/$LINUX_KERNEL_RELEASE/build";
 
37
                AS_TRY_LINUX_DIR([${dir}], [LINUX_DIR=${dir}], )
 
38
        fi
 
39
 
 
40
        dnl next try using the kernel source dir
 
41
        if test "${LINUX_DIR}" = "default" ; then
 
42
                dir="/usr/src/linux-$LINUX_KERNEL_RELEASE";
 
43
                AS_TRY_LINUX_DIR([${dir}], [LINUX_DIR=${dir}], )
 
44
        fi
 
45
 
 
46
        dnl then try a common default of /usr/src/linux
 
47
        if test "${LINUX_DIR}" = "default" ; then
 
48
                dir="/usr/src/linux";
 
49
                AS_TRY_LINUX_DIR([${dir}], [LINUX_DIR=${dir}], )
 
50
        fi
 
51
 
 
52
        dnl if still nothing found, fail
 
53
        if test "${LINUX_DIR}" = "default" ; then
 
54
                AC_MSG_WARN([Linux source directory not found])
 
55
        fi
 
56
 
 
57
        AC_SUBST(LINUX_DIR)
 
58
])
 
59
 
 
60
AC_DEFUN([AC_LINUX_SRCARCH],[
 
61
        AC_MSG_CHECKING(for linux SRCARCH)
 
62
 
 
63
        case "${host}" in
 
64
        i[[3456]]86-*) LINUX_SRCARCH=x86;;
 
65
        x86_64-*) LINUX_SRCARCH=x86;;
 
66
        powerpc*-*) LINUX_SRCARCH=powerpc;;
 
67
        s390*-*) LINUX_SRCARCH=s390;;
 
68
        *) AC_MSG_ERROR([architecture ${host} not supported]);;
 
69
        esac
 
70
 
 
71
        AC_MSG_RESULT(${LINUX_SRCARCH})
 
72
        AC_SUBST(LINUX_SRCARCH)
 
73
])