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