From a54a65dfb68b41bf86c5d3e72f33beb6773c6983 Mon Sep 17 00:00:00 2001 From: Steven Hazel Date: Wed, 15 Oct 2003 07:19:38 +0000 Subject: - cause configure to create a tor.sh which will have directories set correctly based on how configure was run - cause tor to guess the location of torrc more intelligently - cause cause src/config/torrc and src/conf/sample-server-torrc to be generated with contents that are correct for the way configure was run - cause "make install" to put torrc, sample-server-torrc, and dirservers somewhere intelligent svn:r587 --- configure.in | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 78e0180733..186f80a5ec 100644 --- a/configure.in +++ b/configure.in @@ -159,5 +159,30 @@ AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(long long) AC_CHECK_SIZEOF(__int64) -AC_OUTPUT(Makefile src/Makefile doc/Makefile src/config/Makefile src/common/Makefile src/or/Makefile) +# $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 + +CONFDIR=`eval echo $sysconfdir/tor` +AC_SUBST(CONFDIR) +AC_DEFINE_UNQUOTED(CONFDIR,"$CONFDIR") +AC_DEFINE([CONFDIR], [], [tor's configuration directory]) + +BINDIR=`eval echo $bindir` +AC_SUBST(BINDIR) + +LOCALSTATEDIR=`eval echo $localstatedir` +AC_SUBST(LOCALSTATEDIR) + +echo "confdir: $CONFDIR" + +AC_OUTPUT(Makefile tor.sh src/config/torrc src/config/sample-server-torrc src/Makefile doc/Makefile src/config/Makefile src/common/Makefile src/or/Makefile) -- cgit v1.2.3-54-g00ecf