File: configure

package info (click to toggle)
fbpanel 4.1-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 544 kB
  • ctags: 983
  • sloc: ansic: 7,823; makefile: 202; sh: 47
file content (49 lines) | stat: -rwxr-xr-x 1,227 bytes parent folder | download
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh

#echo "fbpanel configuration script"

help () {
    echo "supported options are:"
    echo "--help - print this help and exit"
    echo "--prefix=<path> specify install path. "
    echo "       <path>/bin - will hold all binaries"
    echo "       <path>/share/fbpanel - config files, pixmaps etc"
    echo "       default <path> is /usr"
    echo "--devel - enable devel mode: no optimization + debug symbols"
    echo "--cpu=[on|off] - enable linux cpu monitor plugin"
}

PREFIX="/usr"
while [ $# -gt 0 ]; do
    case $1 in
        --help)
            help
            exit 0
            ;;
        --prefix=*)
            PREFIX=`echo $1 | sed 's/--prefix=//'`
            ;;
	--devel)
	    DEVEL=true
	    ;;
	--cpu=*)
	    PLUGIN_CPU=`echo $1 | sed 's/--cpu=//'`
	    ;;
        *)
            echo "unknwon option $1"
            help
            exit 1
            ;;
    esac
    shift
done
echo "Installation prefix is $PREFIX"
echo "updating config.h"
echo "//created by ./configure script" > config.h
echo "#define PREFIX \"$PREFIX\"" >> config.h


echo "updating Makefile"
echo "PREFIX:=$PREFIX" > Makefile.config
echo "DEVEL:=$DEVEL" >> Makefile.config
echo "PLUGIN_CPU:=$PLUGIN_CPU" >> Makefile.config