summaryrefslogtreecommitdiff
path: root/apps/configure
diff options
context:
space:
mode:
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