From 8109724c0a4f37801e9cdf1f3437acdbc3cc849e Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 11 Nov 2009 01:14:36 +0000 Subject: no username/groupname in example config added install target to Makefile updated svn:ignore for man directory --- src/configure | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) (limited to 'src/configure') diff --git a/src/configure b/src/configure index d05edfd..762315e 100755 --- a/src/configure +++ b/src/configure @@ -40,26 +40,61 @@ CRYPTO_LIB='gcrypt' PASSPHRASE=1 ROUTING=1 +PREFIX='/usr/local' +BINDIR='' +SBINDIR='' +ETCDIR='' +MANDIR='' + print_usage() { echo "configure --help print this" + echo " --target= build target i.e. Linux (default: autodetect)" + echo " --prefix= the installation prefix (default: /usr/local)" + echo " --bindir= the path to the bin directory (default: $PREFIX/bin)" + echo " --sbindir= the path to the sbin directory (default: $PREFIX/sbin)" + echo " --sysconfdir= the path to the system configuration directory (default: $PREFIX/etc" + echo " --mandir= the path to the system man pages (default: $PREFIX/share/man)" echo " --use-ssl-crypto use ssl crypto library instead of libgcrypt" - echo " --disable-crypto disable crypto at all (only NULL cipher)" + echo " --no-crypto disable crypto at all (only NULL cipher)" echo " --disable-passphrase disable master key and salt passphrase" + echo " --enable-passphrase enable master key and salt passphrase" echo " --disable-routing disable built-in routing capability" + echo " --enable-routing enable built-in routing capability" } for arg do case $arg in + --target=*) + TARGET=${arg#--target=} + ;; + --prefix=*) + PREFIX=${arg#--prefix=} + ;; + --sbindir=*) + SBINDIR=${arg#--sbindir=} + ;; + --sysconfdir=*) + ETCDIR=${arg#--sysconfdir=} + ;; + --mandir=*) + MANDIR=${arg#--mandir=} + ;; --use-ssl-crypto) CRYPTO_LIB='ssl' ;; - --disable-crypto) + --no-crypto) CRYPTO_LIB='none' ;; + --enable-passphrase) + PASSPHRASE=1 + ;; --disable-passphrase) PASSPHRASE=0 ;; + --enable-routing) + ROUTING=1 + ;; --disable-routing) ROUTING=0 ;; @@ -122,6 +157,22 @@ if [ $ROUTING -eq 0 ]; then echo "disabling built-in routing capability" fi +if [ -z "$BINDIR" ]; then + BINDIR=$PREFIX/bin +fi + +if [ -z "$SBINDIR" ]; then + SBINDIR=$PREFIX/sbin +fi + +if [ -z "$ETCDIR" ]; then + ETCDIR=$PREFIX/etc +fi + +if [ -z "$MANDIR" ]; then + MANDIR=$PREFIX/share/man +fi + cat >> include.mk <