5 # The secure anycast tunneling protocol (satp) defines a protocol used
6 # for communication between any combination of unicast and anycast
7 # tunnel endpoints. It has less protocol overhead than IPSec in Tunnel
8 # mode and allows tunneling of every ETHER TYPE protocol (e.g.
9 # ethernet, ip, arp ...). satp directly includes cryptography and
10 # message authentication based on the methodes used by SRTP. It is
11 # intended to deliver a generic, scaleable and secure solution for
12 # tunneling and relaying of packets of any protocol.
15 # Copyright (C) 2007-2009 Othmar Gsenger, Erwin Nindl,
16 # Christian Pointner <satp@wirdorange.org>
18 # This file is part of Anytun.
20 # Anytun is free software: you can redistribute it and/or modify
21 # it under the terms of the GNU General Public License as published by
22 # the Free Software Foundation, either version 3 of the License, or
25 # Anytun is distributed in the hope that it will be useful,
26 # but WITHOUT ANY WARRANTY; without even the implied warranty of
27 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 # GNU General Public License for more details.
30 # You should have received a copy of the GNU General Public License
31 # along with anytun. If not, see <http://www.gnu.org/licenses/>.
38 CXXFLAGS='-g -Wall -O2 -DLOG_SYSLOG -DLOG_FILE -DLOG_STDOUT'
39 LDFLAGS='-g -Wall -O2 -lboost_thread -lboost_serialization -lboost_system -lboost_date_time'
55 echo "configure --help print this"
56 echo " --target=<TARGET> build target i.e. Linux (default: autodetect)"
57 echo " --prefix=<PREFIX> the installation prefix (default: /usr/local)"
58 echo " --bindir=<DIR> the path to the bin directory (default: $PREFIX/bin)"
59 echo " --sbindir=<DIR> the path to the sbin directory (default: $PREFIX/sbin)"
60 echo " --sysconfdir=<DIR> the path to the system configuration directory (default: $PREFIX/etc"
61 echo " --mandir=<DIR> the path to the system man pages (default: $PREFIX/share/man)"
62 echo " --no-manpage dont't install manpages"
63 echo " --examplesdir=<DIR> the path to the examples files (default: $PREFIX/share/examples)"
64 echo " --no-examples dont't install example files"
65 echo " --use-ssl-crypto use ssl crypto library instead of libgcrypt"
66 echo " --no-crypto disable crypto at all (only NULL cipher)"
67 echo " --disable-passphrase disable master key and salt passphrase"
68 echo " --enable-passphrase enable master key and salt passphrase"
69 echo " --disable-routing disable built-in routing capability"
70 echo " --enable-routing enable built-in routing capability"
77 TARGET=${arg#--target=}
80 PREFIX=${arg#--prefix=}
83 SBINDIR=${arg#--bindir=}
86 SBINDIR=${arg#--sbindir=}
89 ETCDIR=${arg#--sysconfdir=}
92 MANDIR=${arg#--mandir=}
98 EXAMPLESDIR=${arg#--examplesdir=}
112 --disable-passphrase)
129 ERRORS="$ERRORS $arg"
134 if [ -n "$ERRORS" ] && [ $EBUILD_COMPAT -ne 1 ]; then
135 for error in $ERRORS; do
136 echo "Unknown argument: $error"
148 ln -sf linux/tunDevice.cpp
149 echo "loading Linux specific TUN Device"
151 OpenBSD|FreeBSD|NetBSD)
153 ln -sf bsd/tunDevice.cpp
154 echo "loading BSD specific TUN Device"
155 CXXFLAGS=$CXXFLAGS' -I/usr/local/include'
156 LDFLAGS=$LDFLAGS' -L/usr/local/lib'
159 echo "Plattform not supported"
166 LDFLAGS=$LDFLAGS' -lgcrypt -lgpg-error'
167 echo "using libgcrypt library"
170 CXXFLAGS=$CXXFLAGS' -DUSE_SSL_CRYPTO'
171 LDFLAGS=$LDFLAGS' -lcrypto'
172 echo "using ssl crypto library"
175 CXXFLAGS=$CXXFLAGS' -DNO_CRYPT'
176 echo "NO_CRYPT_OBJ = 1" >> include.mk
177 echo "disabling crypto"
181 if [ $PASSPHRASE -eq 0 ]; then
182 CXXFLAGS=$CXXFLAGS' -DNO_PASSPHRASE'
183 echo "disabling master key and salt passphrase"
186 if [ $ROUTING -eq 0 ]; then
187 CXXFLAGS=$CXXFLAGS' -DNO_ROUTING'
188 echo "disabling built-in routing capability"
191 if [ -z "$BINDIR" ]; then
195 if [ -z "$SBINDIR" ]; then
199 if [ -z "$ETCDIR" ]; then
203 if [ -z "$MANDIR" ]; then
204 MANDIR=$PREFIX/share/man
207 if [ -z "$EXAMPLESDIR" ]; then
208 EXAMPLESDIR=$PREFIX/share/examples
211 cat >> include.mk <<EOF
212 # this file was created automatically
213 # do not edit this file directly
214 # use ./configure instead
230 if [ $INSTALLMANPAGE -eq 1 ]; then
231 echo "MANDIR := $MANDIR" >> include.mk
232 echo "installing manpage"
234 echo "not installing manpage"
237 if [ $INSTALLEXAMPLES -eq 1 ]; then
238 echo "EXAMPLESDIR := $EXAMPLESDIR" >> include.mk
239 echo "installing example files"
241 echo "not installing example files"