diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2008-10-03 01:20:48 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2008-10-03 01:20:48 +0200 |
commit | 1a41a8261f79630e4e4df10e3d4d51b82bdf0341 (patch) | |
tree | 19f4b49e015517d0160f38c1f698d03523c739b9 | |
parent | 97b1eb69121958bc77e0c683fc18b2425809d5df (diff) | |
download | eurephia-1a41a8261f79630e4e4df10e3d4d51b82bdf0341.tar.gz eurephia-1a41a8261f79630e4e4df10e3d4d51b82bdf0341.tar.xz eurephia-1a41a8261f79630e4e4df10e3d4d51b82bdf0341.zip |
Added ./configure script to simplify cmake for "normal" users
-rwxr-xr-x | configure | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/configure b/configure new file mode 100755 index 0000000..84cccfc --- /dev/null +++ b/configure @@ -0,0 +1,53 @@ +#!/bin/sh + +usage() { + cat <<EOF +configure help for eurephia + + --help | -h -- This help screen + --openvpn-src <path> | -s <path> -- OpenVPN source directory (needed for building) + --debug | -D -- Enable verbose debug logging + --show-secrets | -S -- Log passwords as clear text in log files + +EOF +} + +PARAMS="" +export OPENVPN_SRC_DIR="" +while [ ! -z "$1" ]; do + case $1 in + -h|--help) + usage + exit 0 + ;; + -s|--openvpn-src) + export OPENVPN_SRC_DIR="$2" + shift + ;; + -D|--debug) + PARAMS="${PARAMS} -DDEBUG=ON" + ;; + -S|--show-secrets) + PARAMS="${PARAMS} -DSHOW_SECRETS=ON" + ;; + *) + echo "Unkown option: $1" + exit 2 + ;; + esac + shift +done + +if [ -z $(which cmake) ]; then + echo "To build eurephia, you need to install cmake (at least version 2.6)" + exit 1; +fi + +if [ -z ${OPENVPN_SRC_DIR} ]; then + echo "You need to give the --openvpn-src <path> option" + exit 1; +fi + +rm -f CMakeCache.txt +cmake . ${PARAMS} +exit $? |