summaryrefslogtreecommitdiff
path: root/src/configure
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-05-13 05:40:55 +0200
committerChristian Pointner <equinox@spreadspace.org>2015-05-13 07:00:24 +0200
commitaf2f2f91ab6750e8f7d36764b83d2eaec7cdfb26 (patch)
treed416e348d3629b2be439c39a85a52f9685bb506f /src/configure
parentcleanup after signale fixed (diff)
added systemd service file
Diffstat (limited to 'src/configure')
-rwxr-xr-xsrc/configure11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/configure b/src/configure
index 3d8982b..d651903 100755
--- a/src/configure
+++ b/src/configure
@@ -33,6 +33,7 @@ USE_CLANG=0
PREFIX='/usr/local'
BINDIR=''
+SYSTEMDDIR=''
ETCDIR=''
MANDIR=''
INSTALLMANPAGE=1
@@ -44,6 +45,7 @@ print_usage() {
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 " --systemddir=<DIR> the path to the systemd service unit directory (default: /usr/lib/systemd/system)"
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 " --no-manpage dont't install manpage"
@@ -67,6 +69,9 @@ do
--bindir=*)
BINDIR=${arg#--bindir=}
;;
+ --systemddir=*)
+ SYSTEMDDIR=${arg#--systemddir=}
+ ;;
--sysconfdir=*)
ETCDIR=${arg#--sysconfdir=}
;;
@@ -133,6 +138,10 @@ if [ -z "$BINDIR" ]; then
BINDIR=$PREFIX/bin
fi
+if [ -z "$SYSTEMDDIR" ]; then
+ SYSTEMDDIR=/usr/lib/systemd/system
+fi
+
if [ -z "$ETCDIR" ]; then
ETCDIR=$PREFIX/etc
fi
@@ -160,6 +169,7 @@ RAGEL := ragel
prefix := '$PREFIX'
BINDIR := '$BINDIR'
+SYSTEMDDIR := '$SYSTEMDDIR'
ETCDIR := '$ETCDIR'
EOF
@@ -206,6 +216,7 @@ cat > config.h <<EOF
#define TARGET "$TARGET"
#define PREFIX "$PREFIX"
#define BINDIR "$BINDIR"
+#define SYSTEMDDIR "$SYSTEMDDIR"
#define ETCDIR "$ETCDIR"
#define CONFFILE "$ETCDIR/tcpproxy.conf"