5 # uAnytun is a tiny implementation of SATP. Unlike Anytun which is a full
6 # featured implementation uAnytun has no support for multiple connections
7 # or synchronisation. It is a small single threaded implementation intended
8 # to act as a client on small platforms.
9 # The secure anycast tunneling protocol (satp) defines a protocol used
10 # for communication between any combination of unicast and anycast
11 # tunnel endpoints. It has less protocol overhead than IPSec in Tunnel
12 # mode and allows tunneling of every ETHER TYPE protocol (e.g.
13 # ethernet, ip, arp ...). satp directly includes cryptography and
14 # message authentication based on the methodes used by SRTP. It is
15 # intended to deliver a generic, scaleable and secure solution for
16 # tunneling and relaying of packets of any protocol.
19 # Copyright (C) 2007-2008 Christian Pointner <equinox@anytun.org>
21 # This file is part of uAnytun.
23 # uAnytun is free software: you can redistribute it and/or modify
24 # it under the terms of the GNU General Public License version 3 as
25 # published by the Free Software Foundation.
27 # uAnytun is distributed in the hope that it will be useful,
28 # but WITHOUT ANY WARRANTY; without even the implied warranty of
29 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 # GNU General Public License for more details.
32 # You should have received a copy of the GNU General Public License
33 # along with uAnytun. If not, see <http://www.gnu.org/licenses/>.
39 LDFLAGS='-g -Wall -O2'
47 USERHOME='/var/run/uanytun'
50 echo "configure --help print this"
51 echo " --target=<TARGET> build target i.e. Linux (default: autodetect)"
52 echo " --prefix=<PREFIX> the installation prefix (default: /usr/local)"
53 echo " --username=<USERNAME> create this user when installing (default: uanytun)"
54 echo " --userhome=<PATH> the home directory of the user to be created (default: /var/run/uanytun)"
55 echo " --use-ssl-crypto use ssl crypto library instead of libgcrypt"
56 echo " --no-crypto disable crypto at all (only NULL cipher)"
57 echo " --disable-passphrase disable master key and salt passphrase"
58 echo " --enable-passphrase enable master key and salt passphrase"
59 echo " --disable-v4-mapped disable V4-Mapped addresses (this means to disable"
60 echo " simultanious use of IPv4 and IPv6)"
61 echo " --enable-v4-mapped enable V4-Mapped addresses"
68 TARGET=${arg#--target=}
71 PREFIX=${arg#--prefix=}
74 USERNAME=${arg#--username=}
77 USERHOME=${arg#--userhome=}
102 echo "Unknown argument: $arg"
114 echo "loading Linux specific TUN Device"
116 OpenBSD|FreeBSD|NetBSD)
119 echo "loading BSD specific TUN Device"
120 CFLAGS=$CFLAGS' -I/usr/local/include'
121 LDFLAGS=$LDFLAGS' -L/usr/local/lib'
122 if [ $V4_MAPPED -ne 2 ]; then
127 echo "Plattform not supported"
135 LDFLAGS=$LDFLAGS' -lgcrypt'
136 echo "using libgcrypt library"
139 CFLAGS=$CFLAGS' -DUSE_SSL_CRYPTO'
140 LDFLAGS=$LDFLAGS' -lcrypto'
141 echo "using ssl crypto library"
144 CFLAGS=$CFLAGS' -DNO_CRYPT'
145 echo "NO_CRYPT_OBJ = 1" >> include.mk
146 echo "disabling crypto"
150 if [ $PASSPHRASE -eq 0 ]; then
151 CFLAGS=$CFLAGS' -DNO_PASSPHRASE'
152 echo "disabling master key and salt passphrase"
155 if [ $V4_MAPPED -eq 0 ]; then
156 CFLAGS=$CFLAGS' -DNO_V4MAPPED'
157 echo "WARNING: disabling V4 mapped addresses, this prevents uanytun from using IPv6 and IPv4 Sockets at the same time"
160 if [ "x$PREFIX" = "x/usr" ]; then
166 cat >> include.mk <<EOF
167 # this file was created automatically
168 # do not edit this file directly
169 # use ./configure instead
176 SBINDIR := $PREFIX/sbin
177 MANDIR := $PREFIX/share/man
179 USERNAME := $USERNAME
180 USERHOME := $USERHOME