From c4768a15b33ff40187c084e3388c06d6fe1bfed8 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 6 Feb 2009 20:56:52 +0000 Subject: added install target to make file --- src/configure | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/configure') 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= build target i.e. Linux" + echo " --target= build target i.e. Linux (default: autodetect)" + echo " --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 <