[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] cause configure to create a tor.sh which will have director...



Update of /home/or/cvsroot
In directory moria.mit.edu:/home/sah

Modified Files:
	configure.in 
Added Files:
	tor.sh.in 
Log Message:
- 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


Index: configure.in
===================================================================
RCS file: /home/or/cvsroot/configure.in,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- configure.in	12 Oct 2003 07:19:05 -0000	1.30
+++ configure.in	15 Oct 2003 07:19:38 -0000	1.31
@@ -159,5 +159,30 @@
 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)