From c72affb3a8387d606eb837bd9b47e238aa6edec3 Mon Sep 17 00:00:00 2001 From: Tim Wilde Date: Sat, 29 Oct 2011 22:08:51 +0000 Subject: Make $prefix available for HTDOCSDIR Code lifted from the Tor Project's configure.in --- configure.ac | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) -- cgit v1.2.3-24-g4f1b