summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2014-10-08 23:53:30 +0200
committerChristian Pointner <equinox@spreadspace.org>2014-10-08 23:53:30 +0200
commit3c5d9f1866d127dc7ab43347f3a5e524d49c08c1 (patch)
tree8c1890da835e916e13f7177ec7ac59fdb53cf7de
parentfixed client sydra-receiver.sh (diff)
added mandir handling to configure
-rwxr-xr-xsrc/configure38
1 files changed, 35 insertions, 3 deletions
diff --git a/src/configure b/src/configure
index 73a1de7..0e1f887 100755
--- a/src/configure
+++ b/src/configure
@@ -41,12 +41,16 @@ USE_CLANG=0
PREFIX='/usr/local'
BINDIR=''
+MANDIR=''
+INSTALLMANPAGE=1
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 " --mandir=<DIR> the path to the system man pages (default: $PREFIX/share/man)"
+ echo " --no-manpage dont't install manpages"
echo " --use-clang use clang/llvm as compiler/linker"
}
@@ -62,6 +66,12 @@ do
--bindir=*)
BINDIR=${arg#--bindir=}
;;
+ --mandir=*)
+ MANDIR=${arg#--mandir=}
+ ;;
+ --no-manpage)
+ INSTALLMANPAGE=0
+ ;;
--use-clang)
USE_CLANG=1
;;
@@ -101,7 +111,7 @@ CFLAGS="$CFLAGS $(pkg-config --cflags gstreamer-1.0 gthread-2.0 gio-2.0)"
LDFLAGS="$LDFLAGS $(pkg-config --libs gstreamer-1.0 gthread-2.0 gio-2.0)"
rm -f include.mk
-rm -f config.h
+rm -f config-*.h
case $TARGET in
Linux)
;;
@@ -119,6 +129,10 @@ if [ -z "$BINDIR" ]; then
BINDIR=$PREFIX/bin
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
@@ -136,6 +150,13 @@ PREFIX := '$PREFIX'
BINDIR := '$BINDIR'
EOF
+if [ $INSTALLMANPAGE -eq 1 ]; then
+ echo "MANDIR := '$MANDIR'" >> include.mk
+ echo "installing manpages"
+else
+ echo "not installing manpages"
+fi
+
VERSION=`cat ../version`
if which git >/dev/null; then
GIT_HASH=`git rev-parse HEAD 2> /dev/null`
@@ -165,8 +186,6 @@ cat > config-rtp.h <<EOF
#define TARGET "$TARGET"
#define PREFIX "$PREFIX"
#define BINDIR "$BINDIR"
-
-#endif
EOF
cat > config-launch.h <<EOF
@@ -187,6 +206,19 @@ cat > config-launch.h <<EOF
#define TARGET "$TARGET"
#define PREFIX "$PREFIX"
#define BINDIR "$BINDIR"
+EOF
+
+if [ $INSTALLMANPAGE -eq 1 ]; then
+ echo "#define MANDIR \"$MANDIR\"" >> config-launch.h
+ echo "#define MANDIR \"$MANDIR\"" >> config-rtp.h
+fi
+
+cat >> config-rtp.h <<EOF
+
+#endif
+EOF
+
+cat >> config-launch.h <<EOF
#endif
EOF