summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2015-06-24 21:03:11 +0200
committerJan Lehnardt <jan@apache.org>2015-06-24 23:07:47 +0200
commitc1e69c5757aaa47ddb857e19a1bd68d974d77414 (patch)
treec625ebb5b67a9049d7f924363433ed5448e1b581 /configure
parentb335877b7289d7e0c50066c35ea9be42a4c37270 (diff)
downloadcouchdb-c1e69c5757aaa47ddb857e19a1bd68d974d77414.tar.gz
Add --infodir --mandir --docdir --htmldir --pdfdir.
Also copy docs into these dirs on make install.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure116
1 files changed, 106 insertions, 10 deletions
diff --git a/configure b/configure
index da198dfba..da71444ea 100755
--- a/configure
+++ b/configure
@@ -28,9 +28,15 @@ DATAROOTDIR=
DATADIR=
LOCALSTATEDIR=
RUNSTATEDIR=
-DOCDIR=
LIBDIR=
+INFODIR=
+MANDIR=
+DOCDIR=
+
+HTMLDIR=
+PDFDIR=
+
DATABASEDIR=
VIEWDIR=
LOGDIR=
@@ -67,13 +73,13 @@ Options:
--libdir=DIR object code libraries [EPREFIX/lib]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
- # --infodir=DIR info documentation [DATAROOTDIR/info]
- # --mandir=DIR man documentation [DATAROOTDIR/man]
- # --docdir=DIR documentation root [DATAROOTDIR/doc/apache-couchdb]
- # --htmldir=DIR html documentation [DOCDIR]
- # --dvidir=DIR dvi documentation [DOCDIR]
- # --pdfdir=DIR pdf documentation [DOCDIR]
- # --psdir=DIR ps documentation [DOCDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/apache-couchdb]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
EOF
}
@@ -295,6 +301,42 @@ parse_opts() {
exit 1
;;
+ --mandir)
+ if [ -n "$2" ]; then
+ eval MANDIR=$2
+ shift 2
+ continue
+ else
+ printf 'ERROR: "--mandir" requires a non-empty argument.\n' >&2
+ exit 1
+ fi
+ ;;
+ --mandir=?*)
+ eval MANDIR=${1#*=}
+ ;;
+ --mandir=)
+ printf 'ERROR: "--mandir" requires a non-empty argument.\n' >&2
+ exit 1
+ ;;
+
+ --infodir)
+ if [ -n "$2" ]; then
+ eval INFODIR=$2
+ shift 2
+ continue
+ else
+ printf 'ERROR: "--infodir" requires a non-empty argument.\n' >&2
+ exit 1
+ fi
+ ;;
+ --infodir=?*)
+ eval INFODIR=${1#*=}
+ ;;
+ --infodir=)
+ printf 'ERROR: "--infodir" requires a non-empty argument.\n' >&2
+ exit 1
+ ;;
+
--libdir)
if [ -n "$2" ]; then
eval LIBDIR=$2
@@ -367,6 +409,42 @@ parse_opts() {
exit 1
;;
+ --htmldir)
+ if [ -n "$2" ]; then
+ eval HTMLDIR=$2
+ shift 2
+ continue
+ else
+ printf 'ERROR: "--htmldir" requires a non-empty argument.\n' >&2
+ exit 1
+ fi
+ ;;
+ --htmldir=?*)
+ eval HTMLDIR=${1#*=}
+ ;;
+ --htmldir=)
+ printf 'ERROR: "--htmldir" requires a non-empty argument.\n' >&2
+ exit 1
+ ;;
+
+ --pdfdir)
+ if [ -n "$2" ]; then
+ eval PDFDIR=$2
+ shift 2
+ continue
+ else
+ printf 'ERROR: "--pdfdir" requires a non-empty argument.\n' >&2
+ exit 1
+ fi
+ ;;
+ --pdfdir=?*)
+ eval PDFDIR=${1#*=}
+ ;;
+ --pdfdir=)
+ printf 'ERROR: "--pdfdir" requires a non-empty argument.\n' >&2
+ exit 1
+ ;;
+
--) # End of options
shift
break
@@ -410,7 +488,13 @@ parse_opts() {
RUNSTATEDIR="$LOCALSTATEDIR/run";
fi
if test -z "$DOCDIR"; then
- DOCDIR="$DATAROOTDIR/doc";
+ DOCDIR="$DATAROOTDIR/doc/apache-couchdb";
+ fi
+ if test -z "$INFODIR"; then
+ INFODIR="$DATAROOTDIR/info";
+ fi
+ if test -z "$MANDIR"; then
+ MANDIR="$DATAROOTDIR/man";
fi
if test -z "$LIBDIR"; then
LIBDIR="$EXEC_PREFIX/lib";
@@ -424,6 +508,12 @@ parse_opts() {
if test -z "$LOGDIR"; then
LOGDIR="$LOCALSTATEDIR/log";
fi
+ if test -z "$HTMLDIR"; then
+ HTMLDIR="$DOCDIR/html";
+ fi
+ if test -z "$PDFDIR"; then
+ PDFDIR="$DOCDIR/pdf";
+ fi
}
parse_opts $@
@@ -433,7 +523,7 @@ parse_opts $@
if [ "$TEST" = "1" ]; then
echo $PREFIX $EXEC_PREFIX $BINDIR $LIBEXECDIR $SYSCONFDIR $DATAROOTDIR \
$DATADIR $LOCALSTATEDIR $RUNSTATEDIR $DOCDIR $LIBDIR $DATABASEDIR \
- $VIEWDIR $LOGDIR
+ $VIEWDIR $LOGDIR $MANDIR $INFODIR $HTMLDIR $PDFDIR
exit 0
fi
@@ -497,6 +587,12 @@ data_dir = $DATADIR/couchdb
database_dir = $DATABASEDIR
view_index_dir = $VIEWDIR
log_file = $LOG_FILE
+
+html_dir = $HTMLDIR
+pdf_dir = $PDFDIR
+man_dir = $MANDIR
+info_dir = $INFODIR
+
user = $COUCHDB_USER
EOF