summaryrefslogtreecommitdiff
path: root/apps/configure
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-10-10 21:14:28 +0200
committerChristian Pointner <equinox@spreadspace.org>2015-10-10 21:14:28 +0200
commitdf4b1804ce4824c6522690809807e7a7016611a7 (patch)
tree777c117b754dd383e6690e7216480dd41022b6f6 /apps/configure
parentadd output flushing (diff)
reading config dir works now
Diffstat (limited to 'apps/configure')
-rwxr-xr-xapps/configure11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/configure b/apps/configure
index 9c5109f..9809caa 100755
--- a/apps/configure
+++ b/apps/configure
@@ -28,12 +28,14 @@ USE_CLANG=0
PREFIX='/usr/local'
BINDIR=''
+ETCDIR=''
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 " --sysconfdir=<DIR> the path to the system configuration directory (default: $PREFIX/etc"
echo " --use-clang use clang/llvm as compiler/linker"
}
@@ -52,6 +54,9 @@ do
--bindir=*)
BINDIR=${arg#--bindir=}
;;
+ --sysconfdir=*)
+ ETCDIR=${arg#--sysconfdir=}
+ ;;
--ebuild-compat)
EBUILD_COMPAT=1
;;
@@ -100,6 +105,10 @@ if [ -z "$BINDIR" ]; then
BINDIR=$PREFIX/bin
fi
+if [ -z "$ETCDIR" ]; then
+ ETCDIR=$PREFIX/etc
+fi
+
cat > include.mk <<EOF
# this file was created automatically
# do not edit this file directly
@@ -114,6 +123,7 @@ INSTALL := install
prefix := '$PREFIX'
BINDIR := '$BINDIR'
+ETCDIR := '$ETCDIR'
EOF
VERSION=`cat ../version`
@@ -145,6 +155,7 @@ cat > config.h <<EOF
#define TARGET "$TARGET"
#define PREFIX "$PREFIX"
#define BINDIR "$BINDIR"
+#define ETCDIR "$ETCDIR"
#endif
EOF