summaryrefslogtreecommitdiff
path: root/src/configure
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-11-11 01:14:36 +0000
committerChristian Pointner <equinox@anytun.org>2009-11-11 01:14:36 +0000
commit8109724c0a4f37801e9cdf1f3437acdbc3cc849e (patch)
tree10dceb0214a6e063d6c2e931033d17b7996bfbce /src/configure
parentupdated README (diff)
no username/groupname in example config
added install target to Makefile updated svn:ignore for man directory
Diffstat (limited to 'src/configure')
-rwxr-xr-xsrc/configure62
1 files changed, 60 insertions, 2 deletions
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=<TARGET> build target i.e. Linux (default: autodetect)"
+ echo " --prefix=<PREFIX> the installation prefix (default: /usr/local)"
+ echo " --bindir=<DIR> the path to the bin directory (default: $PREFIX/bin)"
+ echo " --sbindir=<DIR> the path to the sbin directory (default: $PREFIX/sbin)"
+ echo " --sysconfdir=<DIR> the path to the system configuration directory (default: $PREFIX/etc"
+ echo " --mandir=<DIR> 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 <<EOF
# this file was created automatically
# do not edit this file directly
@@ -132,6 +183,13 @@ CXX = gcc
CXXFLAGS = $CXXFLAGS
LD = gcc
LDFLAGS = $LDFLAGS
+STRIP = strip
+
+PREFIX := $PREFIX
+BINDIR := $BINDIR
+SBINDIR := $SBINDIR
+ETCDIR := $ETCDIR
+MANDIR := $MANDIR
EOF
exit 0