diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac index 0b9733cdb9..878f5a88bb 100644 --- a/configure.ac +++ b/configure.ac @@ -281,7 +281,7 @@ fi AM_CONDITIONAL(USEPYTHON, [test "x$PYTHON" != "x"]) dnl List all external rust crates we depend on here. Include the version -rust_crates="libc-0.2.22" +rust_crates="libc-0.2.39" AC_SUBST(rust_crates) ifdef([AC_C_FLEXIBLE_ARRAY_MEMBER], [ @@ -446,23 +446,23 @@ if test "x$enable_rust" = "xyes"; then AC_MSG_CHECKING([rust crate dependencies]) AC_ARG_VAR([TOR_RUST_DEPENDENCIES], [path to directory with local crate mirror]) if test "x$TOR_RUST_DEPENDENCIES" = "x"; then - TOR_RUST_DEPENDENCIES="$srcdir/src/ext/rust/" - NEED_MOD=1 + TOR_RUST_DEPENDENCIES="${srcdir}/src/ext/rust/crates" fi + dnl Check whether the path exists before we try to cd into it. if test ! -d "$TOR_RUST_DEPENDENCIES"; then AC_MSG_ERROR([Rust dependency directory $TOR_RUST_DEPENDENCIES does not exist. Specify a dependency directory using the TOR_RUST_DEPENDENCIES variable or allow cargo to fetch crates using --enable-cargo-online-mode.]) ERRORED=1 fi + dnl Make the path absolute, since we'll be using it from within a + dnl subdirectory. + TOR_RUST_DEPENDENCIES=$(cd "$TOR_RUST_DEPENDENCIES" ; pwd) + for dep in $rust_crates; do if test ! -d "$TOR_RUST_DEPENDENCIES"/"$dep"; then AC_MSG_ERROR([Failure to find rust dependency $TOR_RUST_DEPENDENCIES/$dep. Specify a dependency directory using the TOR_RUST_DEPENDENCIES variable or allow cargo to fetch crates using --enable-cargo-online-mode.]) ERRORED=1 fi done - if test "x$NEED_MOD" = "x1"; then - dnl When looking for dependencies from cargo, pick right directory - TOR_RUST_DEPENDENCIES="../../src/ext/rust" - fi if test "x$ERRORED" = "x"; then AC_MSG_RESULT([yes]) fi @@ -553,6 +553,7 @@ AC_CHECK_FUNCS( mach_approximate_time \ memmem \ memset_s \ + mmap \ pipe \ pipe2 \ prctl \ @@ -1740,14 +1741,6 @@ AC_CHECK_DECLS([mlockall], , , [ #include <sys/mman.h> #endif]) -# Some MinGW environments don't have getpagesize in unistd.h. We don't use -# AC_CHECK_FUNCS(getpagesize), because other environments rename getpagesize -# using macros -AC_CHECK_DECLS([getpagesize], , , [ -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif]) - # Allow user to specify an alternate syslog facility AC_ARG_WITH(syslog-facility, AS_HELP_STRING(--with-syslog-facility=LOG, [syslog facility to use (default=LOG_DAEMON)]), @@ -1885,6 +1878,12 @@ AC_SUBST(BUILDDIR) AH_TEMPLATE([BUILDDIR],[tor's build directory]) AC_DEFINE_UNQUOTED(BUILDDIR,"$BUILDDIR") +if test "x$SRCDIR" = "x"; then + SRCDIR=$(cd "$srcdir"; pwd) +fi +AH_TEMPLATE([SRCDIR],[tor's sourcedir directory]) +AC_DEFINE_UNQUOTED(SRCDIR,"$SRCDIR") + if test "x$CONFDIR" = "x"; then CONFDIR=`eval echo $sysconfdir/tor` fi |