diff options
author | Steven Hazel <sah@freehaven.net> | 2003-10-15 07:19:38 +0000 |
---|---|---|
committer | Steven Hazel <sah@freehaven.net> | 2003-10-15 07:19:38 +0000 |
commit | a54a65dfb68b41bf86c5d3e72f33beb6773c6983 (patch) | |
tree | 722f7717e186ce2d17b5d05b817e62239b3916b5 /configure.in | |
parent | 0149c4ed555db821e9331f1925fae46638a30f46 (diff) | |
download | tor-a54a65dfb68b41bf86c5d3e72f33beb6773c6983.tar.gz tor-a54a65dfb68b41bf86c5d3e72f33beb6773c6983.zip |
- 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
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 27 |
1 files changed, 26 insertions, 1 deletions
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) |