6 # Copyright (C) 2009 Christian Pointner <equinox@spreadspace.org>
8 # This file is part of powersensordaemon.
10 # powersensordaemon is free software: you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation, either version 3 of the License, or
15 # powersensordaemon is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with powersensordaemon. If not, see <http://www.gnu.org/licenses/>.
27 LDFLAGS='-g -Wall -O2'
31 USERHOME='/var/run/uanytun'
34 echo "configure --help print this"
35 echo " --target=<TARGET> build target i.e. Linux (default: autodetect)"
36 echo " --prefix=<PREFIX> the installation prefix (default: /usr/local)"
37 echo " --username=<USERNAME> create this user when installing (default: uanytun)"
38 echo " --userhome=<PATH> the home directory of the user to be created (default: /var/run/uanytun)"
45 TARGET=${arg#--target=}
48 PREFIX=${arg#--prefix=}
51 USERNAME=${arg#--username=}
54 USERHOME=${arg#--userhome=}
61 echo "Unknown argument: $arg"
71 echo "Linux specific build options"
73 OpenBSD|FreeBSD|NetBSD)
74 echo "BSD specific build options"
75 CFLAGS=$CFLAGS' -I/usr/local/include'
76 LDFLAGS=$LDFLAGS' -L/usr/local/lib'
79 echo "Plattform not supported"
84 if [ "x$PREFIX" = "x/usr" ]; then
90 cat >> include.mk <<EOF
91 # this file was created automatically
92 # do not edit this file directly
93 # use ./configure instead
100 SBINDIR := $PREFIX/sbin
101 MANDIR := $PREFIX/share/man
103 USERNAME := $USERNAME
104 USERHOME := $USERHOME