kvm: qemu: fix pci_enable_capabilities to set the CAP feature in pci::status
[kvm-userspace.git] / user / configure
blobefb8705fc1ded1933b187de62c9102bd29df1350
1 #!/bin/bash
3 prefix=/usr/local
4 kerneldir=/lib/modules/$(uname -r)/build
5 cc=gcc
6 ld=ld
7 objcopy=objcopy
8 ar=ar
9 arch=`uname -m | sed -e s/i.86/i386/`
10 processor="$arch"
11 cross_prefix=
13 usage() {
14 cat <<-EOF
15 Usage: $0 [options]
17 Options include:
18 --arch=ARCH architecture to compile for ($arch)
19 --cross-prefix=PREFIX cross compiler prefix
20 --cc=CC c compiler to use ($cc)
21 --ld=LD ld linker to use ($ld)
22 --prefix=PREFIX where to install things ($prefix)
23 --kerneldir=DIR kernel build directory for kvm.h ($kerneldir)
24 EOF
25 exit 1
28 while [[ "$1" = -* ]]; do
29 opt="$1"; shift
30 arg=
31 if [[ "$opt" = *=* ]]; then
32 arg="${opt#*=}"
33 opt="${opt%%=*}"
35 case "$opt" in
36 --prefix)
37 prefix="$arg"
39 --kerneldir)
40 kerneldir="$arg"
42 --arch)
43 arch="$arg"
45 --processor)
46 processor="$arg"
48 --cross-prefix)
49 cross_prefix="$arg"
51 --cc)
52 cc="$arg"
54 --ld)
55 ld="$arg"
57 --help)
58 usage
61 usage
63 esac
64 done
66 cat <<EOF > config.mak
67 PREFIX=$prefix
68 KERNELDIR=$(readlink -f $kerneldir)
69 ARCH=$arch
70 PROCESSOR=$processor
71 CC=$cross_prefix$cc
72 LD=$cross_prefix$ld
73 OBJCOPY=$cross_prefix$objcopy
74 AR=$cross_prefix$ar
75 EOF