summaryrefslogtreecommitdiff
path: root/configure
blob: 4054edae413e48a88008f9dd5afd26725f391ab3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

help () {
    echo "Supported options are:"
    echo "    --help                          print this help and exit"
    echo "    --prefix=<path>                 specify installation prefix"
    echo "        default <path> is /usr/local"
}

PREFIX="/usr/local"
while [ $# -gt 0 ]; do
    case $1 in
        --help)
            help
            exit 0
            ;;
        --prefix=*)
            PREFIX=`echo $1 | sed 's/--prefix=//'`
            ;;
        *)
            echo "Unknown option $1"
            ;;
    esac
    shift
done

echo "Creating Makefile..."
sed -e s,@prefix@,$PREFIX, Makefile.in > Makefile
echo "Installation prefix is $PREFIX"