summaryrefslogtreecommitdiff
path: root/src/configure
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-02-06 20:56:52 +0000
committerChristian Pointner <equinox@anytun.org>2009-02-06 20:56:52 +0000
commitc4768a15b33ff40187c084e3388c06d6fe1bfed8 (patch)
treebd349e259fb0c57ba9e2bdc3b7562f111a655727 /src/configure
parentfinished kamikaze initscript (diff)
added install target to make file
Diffstat (limited to 'src/configure')
-rwxr-xr-xsrc/configure22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/configure b/src/configure
index cad9c57..a1608ef 100755
--- a/src/configure
+++ b/src/configure
@@ -43,9 +43,12 @@ ANYTUN_02_COMPAT=0
PASSPHRASE=1
V4_MAPPED=1
+PREFIX='/usr/local'
+
print_usage() {
echo "configure --help print this"
- echo " --target=<TARGET> build target i.e. Linux"
+ echo " --target=<TARGET> build target i.e. Linux (default: autodetect)"
+ echo " --prefix=<PREFIX> the installation prefix (default: /usr/local)"
echo " --use-ssl-crypto use ssl crypto library instead of libgcrypt"
echo " --disable-crypto disable crypto at all (only NULL cipher)"
echo " --enable-anytun02-compat enable compatiblity mode for anytun 0.2.x and prior"
@@ -60,6 +63,9 @@ do
--target=*)
TARGET=${arg#--target=}
;;
+ --prefix=*)
+ PREFIX=${arg#--prefix=}
+ ;;
--use-ssl-crypto)
CRYPTO_LIB='ssl'
;;
@@ -144,11 +150,25 @@ if [ $V4_MAPPED -eq 0 ]; then
echo "WARNING: disabling V4 mapped addresses, this prevents uanytun from using IPv6 as outer Protocol"
fi
+if [ "x$PREFIX" = "x/usr" ]; then
+ ETCDIR=/etc
+else
+ ETCDIR=$PREFIX/etc
+fi
+
cat >> include.mk <<EOF
+# this file was created automatically
+# do not edit this file directly
+# use ./configure instead
+
TARGET := $TARGET
CC := gcc
CFLAGS := $CFLAGS
LDFLAGS := $LDFLAGS
+
+SBINDIR := $PREFIX/sbin
+MANDIR := $PREFIX/share/man
+ETCDIR := $ETCDIR
EOF
exit 0