summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-01-20 00:14:48 (EST)
committer P. J. McDermott <pjm@nac.net>2012-01-20 00:20:02 (EST)
commitcf47c930398b3095b7487855b14a1ab7f924b82f (patch)
tree9d0c29cc4f6c7315d581bdfcf79bc6b2570ccdf0 /configure
parent9f273e592a8b8eb77ee03160bca204be9c0ef406 (diff)
Add MANDIR option and macro to build system.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure14
1 files changed, 13 insertions, 1 deletions
diff --git a/configure b/configure
index 49ae28c..b726c23 100755
--- a/configure
+++ b/configure
@@ -46,6 +46,8 @@ Installation directories:
default: /usr/local
--bindir=BINDIR install scripts in BINDIR
default: PREFIX/bin
+ --mandir=MANDIR install manual pages in MANDIR
+ default: PREFIX/share/man
EOF
}
@@ -96,6 +98,11 @@ while true; do
BINDIR="\${PREFIX}/${2}"
shift 2
;;
+ --mandir)
+ # Leave PREFIX unexpanded for now, in case it isn't set yet.
+ MANDIR="\${PREFIX}/${2}"
+ shift 2
+ ;;
--)
shift
break
@@ -120,8 +127,12 @@ fi
if [ -z "${BINDIR}" ]; then
BINDIR=${PREFIX}/bin
fi
+if [ -z "${MANDIR}" ]; then
+ MANDIR=${PREFIX}/man
+fi
# Expand PREFIX if it's there.
eval "BINDIR=${BINDIR}"
+eval "MANDIR=${MANDIR}"
find_dependency()
{
@@ -161,7 +172,8 @@ s&@shell@&${SHELL}&
s&@install@&${INSTALL} -c&
s&@srcdir@&${SRCDIR}&
s&@prefix@&${PREFIX}&
-s&@bindir@&${BINDIR}&"
+s&@bindir@&${BINDIR}&
+s&@mandir@&${MANDIR}&"
# Replace configuration variables in Makefile.in
sed "$sed_script" ${SRCDIR}/Makefile.in > Makefile