summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Oetiker <tobi@oetiker.ch>2011-10-30 01:11:04 +0200
committerTobias Oetiker <tobi@oetiker.ch>2011-10-30 01:11:04 +0200
commit677f0b4d837b4b040d085aedce6f09120a912cdf (patch)
treebd51b37fe5c80245fdd2f1da9a512884af3b91b9
parent81d0718bbb09fbf098a84f16278d51d9058e63ec (diff)
parentc72affb3a8387d606eb837bd9b47e238aa6edec3 (diff)
downloadsmokeping-677f0b4d837b4b040d085aedce6f09120a912cdf.tar.gz
smokeping-677f0b4d837b4b040d085aedce6f09120a912cdf.tar.xz
Merge pull request #3 from twilde/master
Make $prefix available for HTDOCSDIR
-rw-r--r--configure.ac12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ba210dc..2ff9ff3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,6 +56,18 @@ AC_ARG_ENABLE(pkgonly,
[Skip all checking])])
AC_SUBST(enable_pkgonly)
+# $prefix stores the value of the --prefix command line option, or
+# NONE if the option wasn't set. In the case that it wasn't set, make
+# it be the default, so that we can use it to expand directories now.
+if test "x$prefix" = "xNONE"; then
+ prefix=$ac_default_prefix
+fi
+
+# and similarly for $exec_prefix
+if test "x$exec_prefix" = "xNONE"; then
+ exec_prefix=$prefix
+fi
+
HTDOCSDIR=${prefix}/htdocs
AC_ARG_WITH(htdocs-dir,AC_HELP_STRING([--with-htdocs-dir=DIR],[Where to install htdocs [PREFIX/htdocs]]), [HTDOCSDIR=$withval])
AC_SUBST(HTDOCSDIR)