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

[tor-commits] [tor/release-0.2.2] Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2



commit 596f7a39b69c5c3c5f2427e65056af6cc2bb0f64
Merge: 06deec1 10ad344
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Feb 22 17:53:09 2011 -0500

    Merge remote branch 'origin/maint-0.2.1' into maint-0.2.2
    
    Conflicts:
    	configure.in

 configure.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --combined configure.in
index 9cbfbb1,7cdb330..f30402d
--- a/configure.in
+++ b/configure.in
@@@ -1,10 -1,11 +1,10 @@@
 -dnl $Id$
  dnl Copyright (c) 2001-2004, Roger Dingledine
  dnl Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson
  dnl Copyright (c) 2007-2008, The Tor Project, Inc.
  dnl See LICENSE for licensing information
  
  AC_INIT
 -AM_INIT_AUTOMAKE(tor, 0.2.1.25)
 +AM_INIT_AUTOMAKE(tor, 0.2.2.19-alpha)
  AM_CONFIG_HEADER(orconfig.h)
  
  AC_CANONICAL_HOST
@@@ -19,6 -20,21 +19,6 @@@ f
  # the += operator on it in src/or/Makefile.am
  CPPFLAGS="$CPPFLAGS -I\${top_srcdir}/src/common"
  
 -AC_ARG_ENABLE(debug,
 - AS_HELP_STRING(--enable-debug, compile with debugging info),
 -[if test x$enableval = xyes; then
 -    CFLAGS="$CFLAGS -g"
 -fi])
 -
 -#XXXX ideally, we should make this into a no-op, and detect whether we're
 -#compiling for the iphone by using $target.
 -AC_ARG_ENABLE(iphone,
 - AS_HELP_STRING(--enable-iphone, compile with iPhone support),
 - [if test x$enableval = xyes ; then
 -   tor_cv_iphone=true
 -   CFLAGS="$CFLAGS -D__DARWIN_UNIX03 -DIPHONE"
 -  fi])
 -
  #XXXX020 We should make these enabled or not, before 0.2.0.x-final
  AC_ARG_ENABLE(buf-freelists,
     AS_HELP_STRING(--disable-buf-freelists, disable freelists for buffer RAM))
@@@ -30,8 -46,6 +30,8 @@@ AC_ARG_ENABLE(static-openssl
     AS_HELP_STRING(--enable-static-openssl, Link against a static openssl library. Requires --with-openssl-dir))
  AC_ARG_ENABLE(static-libevent,
     AS_HELP_STRING(--enable-static-libevent, Link against a static libevent library. Requires --with-libevent-dir))
 +AC_ARG_ENABLE(static-zlib,
 +   AS_HELP_STRING(--enable-static-zlib, Link against a static zlib library. Requires --with-zlib-dir))
  
  if test x$enable_buf_freelists != xno; then
    AC_DEFINE(ENABLE_BUF_FREELISTS, 1,
@@@ -51,15 -65,6 +51,15 @@@ AC_ARG_ENABLE(transparent
          *) AC_MSG_ERROR(bad value for --enable-transparent) ;;
        esac], [transparent=true])
  
 +AC_ARG_ENABLE(asciidoc,
 +     AS_HELP_STRING(--disable-asciidoc, don't use asciidoc (disables building of manpages)),
 +     [case "${enableval}" in
 +        yes) asciidoc=true ;;
 +        no)  asciidoc=false ;;
 +        *) AC_MSG_ERROR(bad value for --disable-asciidoc) ;;
 +      esac], [asciidoc=true])
 +
 +
  AC_ARG_ENABLE(threads,
       AS_HELP_STRING(--disable-threads, disable multi-threading support))
  
@@@ -85,32 -90,18 +85,32 @@@ case $host i
       ;;
  esac
  
 -AC_ARG_ENABLE(geoip-stats,
 -     AS_HELP_STRING(--enable-geoip-stats, enable code for directories to collect per-country statistics))
 -
 -if test "$enable_geoip_stats" = "yes"; then
 -  AC_DEFINE(ENABLE_GEOIP_STATS, 1, [Defined if we try to collect per-country statistics])
 -fi
 -
  AC_ARG_ENABLE(gcc-warnings,
       AS_HELP_STRING(--enable-gcc-warnings, enable verbose warnings))
  AC_ARG_ENABLE(gcc-warnings-advisory,
       AS_HELP_STRING(--enable-gcc-warnings-advisory, [enable verbose warnings, excluding -Werror]))
  
 +dnl Adam shostack suggests the following for Windows:
 +dnl -D_FORTIFY_SOURCE=2 -fstack-protector-all
 +dnl Others suggest '/gs /safeseh /nxcompat /dynamicbase' for non-gcc on Windows
 +dnl This requires that we use gcc and that we add -O2 to the CFLAGS.
 +AC_ARG_ENABLE(gcc-hardening,
 +     AS_HELP_STRING(--enable-gcc-hardening, enable compiler security checks),
 +[if test x$enableval = xyes; then
 +    CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-all"
 +    CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
 +    CFLAGS="$CFLAGS --param ssp-buffer-size=1"
 +    LDFLAGS="$LDFLAGS -pie"
 +fi])
 +
 +dnl Linker hardening options
 +dnl Currently these options are ELF specific - you can't use this with MacOSX
 +AC_ARG_ENABLE(linker-hardening,
 +        AS_HELP_STRING(--enable-linker-hardening, enable linker security fixups),
 +[if test x$enableval = xyes; then
 +    LDFLAGS="$LDFLAGS -z relro -z now"
 +fi])
 +
  AC_ARG_ENABLE(local-appdata,
     AS_HELP_STRING(--enable-local-appdata, default to host local application data paths on Windows))
  if test "$enable_local_appdata" = "yes"; then
@@@ -123,18 -114,6 +123,18 @@@ AC_PROG_CP
  AC_PROG_MAKE_SET
  AC_PROG_RANLIB
  
 +dnl autoconf 2.59 appears not to support AC_PROG_SED
 +AC_CHECK_PROG([SED],[sed],[sed],[/bin/false])
 +
 +dnl check for asciidoc and a2x
 +AC_PATH_PROG([ASCIIDOC], [asciidoc], none)
 +AC_PATH_PROG([A2X], [a2x], none)
 +
 +AM_CONDITIONAL(USE_ASCIIDOC, test x$asciidoc = xtrue)
 +
 +AC_PATH_PROG([SHA1SUM], [sha1sum], none)
 +AC_PATH_PROG([OPENSSL], [openssl], none)
 +
  TORUSER=_tor
  AC_ARG_WITH(tor-user,
          [  --with-tor-user=NAME    Specify username for tor daemon ],
@@@ -156,7 -135,7 +156,7 @@@ AC_SUBST(TORGROUP
  
  dnl If WIN32 is defined and non-zero, we are building for win32
  AC_MSG_CHECKING([for win32])
 -AC_RUN_IFELSE([
 +AC_RUN_IFELSE([AC_LANG_SOURCE([
  int main(int c, char **v) {
  #ifdef WIN32
  #if WIN32
@@@ -167,7 -146,7 +167,7 @@@
  #else
    return 2;
  #endif
 -}],
 +}])],
  bwin32=true; AC_MSG_RESULT([yes]),
  bwin32=false; AC_MSG_RESULT([no]),
  bwin32=cross; AC_MSG_RESULT([cross])
@@@ -175,14 -154,14 +175,14 @@@
  
  if test "$bwin32" = cross; then
  AC_MSG_CHECKING([for win32 (cross)])
 -AC_COMPILE_IFELSE([
 +AC_COMPILE_IFELSE([AC_LANG_SOURCE([
  #ifdef WIN32
  int main(int c, char **v) {return 0;}
  #else
  #error
  int main(int c, char **v) {return x(y);}
  #endif
 -],
 +])],
  bwin32=true; AC_MSG_RESULT([yes]),
  bwin32=false; AC_MSG_RESULT([no]))
  fi
@@@ -194,12 -173,12 +194,12 @@@ AM_CONDITIONAL(BUILD_NT_SERVICES, test 
  
  dnl Enable C99 when compiling with MIPSpro
  AC_MSG_CHECKING([for MIPSpro compiler])
 -AC_COMPILE_IFELSE(AC_LANG_PROGRAM(, [
 +AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [
  #if (defined(__sgi) && defined(_COMPILER_VERSION))
  #error
    return x(y);
  #endif
 -]),
 +])],
  bmipspro=false; AC_MSG_RESULT(no),
  bmipspro=true; AC_MSG_RESULT(yes))
  
@@@ -223,7 -202,7 +223,7 @@@ dnl -----------------------------------
  dnl Check for functions before libevent, since libevent-1.2 apparently
  dnl exports strlcpy without defining it in a header.
  
 -AC_CHECK_FUNCS(gettimeofday ftime socketpair uname inet_aton strptime getrlimit strlcat strlcpy strtoull getaddrinfo localtime_r gmtime_r memmem strtok_r writev readv flock prctl)
 +AC_CHECK_FUNCS(gettimeofday ftime socketpair uname inet_aton strptime getrlimit strlcat strlcpy strtoull getaddrinfo localtime_r gmtime_r memmem strtok_r writev readv flock prctl vasprintf)
  
  using_custom_malloc=no
  if test x$enable_openbsd_malloc = xyes ; then
@@@ -297,20 -276,15 +297,20 @@@ save_CPPFLAGS="$CPPFLAGS
  LIBS="-levent $TOR_LIB_WS32 $LIBS"
  LDFLAGS="$TOR_LDFLAGS_libevent $LDFLAGS"
  CPPFLAGS="$TOR_CPPFLAGS_libevent $CPPFLAGS"
 -AC_CHECK_FUNCS(event_get_version event_get_method event_set_log_callback)
 +AC_CHECK_FUNCS(event_get_version event_get_version_number event_get_method event_set_log_callback evdns_set_outgoing_bind_address event_base_loopexit)
  AC_CHECK_MEMBERS([struct event.min_heap_idx], , ,
  [#include <event.h>
  ])
  
 +AC_CHECK_HEADERS(event2/event.h event2/dns.h)
 +
  LIBS="$save_LIBS"
  LDFLAGS="$save_LDFLAGS"
  CPPFLAGS="$save_CPPFLAGS"
  
 +
 +AM_CONDITIONAL(USE_EXTERNAL_EVDNS, test x$ac_cv_header_event2_dns_h = xyes)
 +
  if test "$enable_static_libevent" = "yes"; then
     if test "$tor_cv_library_libevent_dir" = "(system)"; then
       AC_MSG_ERROR("You must specify an explicit --with-libevent-dir=x option when using --enable-static-libevent")
@@@ -322,7 -296,6 +322,7 @@@ els
  fi
  AC_SUBST(TOR_LIBEVENT_LIBS)
  
 +
  dnl ------------------------------------------------------
  dnl Where do you live, openssl?  And how do we call you?
  
@@@ -374,19 -347,6 +374,19 @@@ TOR_SEARCH_LIBRARY(zlib, $tryzlibdir, [
      [zlibVersion(); exit(0);], [--with-zlib-dir],
      [/opt/zlib])
  
 +if test "$enable_static_zlib" = "yes"; then
 +   if test "$tor_cv_library_zlib_dir" = "(system)"; then
 +     AC_MSG_ERROR("You must specify an explicit --with-zlib-dir=x option when
 + using --enable-static-zlib")
 +   else
 +     TOR_ZLIB_LIBS="$TOR_LIBDIR_zlib/libz.a"
 +     echo "$TOR_LIBDIR_zlib/libz.a"
 +   fi
 +else
 +     TOR_ZLIB_LIBS="-lz"
 +fi
 +AC_SUBST(TOR_ZLIB_LIBS)
 +
  dnl Make sure to enable support for large off_t if available.
  
  AC_SYS_LARGEFILE
@@@ -565,7 -525,7 +565,7 @@@ AC_CHECK_TYPES([rlim_t], , 
  ])
  
  AC_CACHE_CHECK([whether time_t is signed], tor_cv_time_t_signed, [
 -AC_RUN_IFELSE(AC_LANG_SOURCE([
 +AC_RUN_IFELSE([AC_LANG_SOURCE([
  #ifdef HAVE_SYS_TYPES_H
  #include <sys/types.h>
  #endif
@@@ -575,7 -535,7 +575,7 @@@
  #ifdef HAVE_TIME_H
  #include <time.h>
  #endif
 -int main(int c, char**v) { if (((time_t)-1)<0) return 1; else return 0; }]),
 +int main(int c, char**v) { if (((time_t)-1)<0) return 1; else return 0; }])],
    tor_cv_time_t_signed=no, tor_cv_time_t_signed=yes, tor_cv_time_t_signed=cross)
  ])
  
@@@ -588,23 -548,6 +588,23 @@@ if test "$tor_cv_time_t_signed" != no; 
              [Define to 1 iff time_t is signed])
  fi
  
 +AC_CACHE_CHECK([whether size_t is signed], tor_cv_size_t_signed, [
 +AC_RUN_IFELSE([AC_LANG_SOURCE([
 +#ifdef HAVE_SYS_TYPES_H
 +#include <sys/types.h>
 +#endif
 +int main(int c, char**v) { if (((size_t)-1)<0) return 1; else return 0; }])],
 +  tor_cv_size_t_signed=no, tor_cv_size_t_signed=yes, tor_cv_size_t_signed=cross)
 +])
 +
 +if test "$tor_cv_size_t_signed" = cross; then
 +  AC_MSG_NOTICE([Cross compiling: assuming that size_t is not signed.])
 +fi
 +
 +if test "$tor_cv_size_t_signed" = yes; then
 +  AC_MSG_ERROR([You have a signed size_t; that's grossly nonconformant.])
 +fi
 +
  AC_CHECK_SIZEOF(socklen_t, , [AC_INCLUDES_DEFAULT()
  #ifdef HAVE_SYS_SOCKET_H
  #include <sys/socket.h>
@@@ -712,16 -655,6 +712,16 @@@ if test x$tcmalloc = xyes ; the
     LDFLAGS="-ltcmalloc $LDFLAGS"
  fi
  
 +# By default, we're going to assume we don't have mlockall()
 +# bionic and other platforms have various broken mlockall subsystems.
 +# Some systems don't have a working mlockall, some aren't linkable,
 +# and some have it but don't declare it.
 +AC_CHECK_FUNCS(mlockall)
 +AC_CHECK_DECLS([mlockall], , , [
 +#ifdef HAVE_SYS_MMAN_H
 +#include <sys/mman.h>
 +#endif])
 +
  # Allow user to specify an alternate syslog facility
  AC_ARG_WITH(syslog-facility,
  [  --with-syslog-facility=LOG syslog facility to use (default=LOG_DAEMON)],
@@@ -741,14 -674,14 +741,14 @@@ AC_CHECK_FUNC(gethostbyname_r, 
    AC_MSG_CHECKING([how many arguments gethostbyname_r() wants])
    OLD_CFLAGS=$CFLAGS
    CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
 -  AC_COMPILE_IFELSE(AC_LANG_PROGRAM([
 +  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
  #include <netdb.h>
    ], [[
      char *cp1, *cp2;
      struct hostent *h1, *h2;
      int i1, i2;
      (void)gethostbyname_r(cp1,h1,cp2,i1,&h2,&i2);
 -  ]]),[
 +  ]])],[
      AC_DEFINE(HAVE_GETHOSTBYNAME_R)
      AC_DEFINE(HAVE_GETHOSTBYNAME_R_6_ARG, 1,
       [Define this if gethostbyname_r takes 6 arguments])
@@@ -789,25 -722,25 +789,25 @@@
  
  AC_CACHE_CHECK([whether the C compiler supports __func__],
    tor_cv_have_func_macro,
 -  AC_COMPILE_IFELSE([
 +  AC_COMPILE_IFELSE([AC_LANG_SOURCE([
  #include <stdio.h>
 -int main(int c, char **v) { puts(__func__); }],
 +int main(int c, char **v) { puts(__func__); }])],
    tor_cv_have_func_macro=yes,
    tor_cv_have_func_macro=no))
  
  AC_CACHE_CHECK([whether the C compiler supports __FUNC__],
    tor_cv_have_FUNC_macro,
 -  AC_COMPILE_IFELSE([
 +  AC_COMPILE_IFELSE([AC_LANG_SOURCE([
  #include <stdio.h>
 -int main(int c, char **v) { puts(__FUNC__); }],
 +int main(int c, char **v) { puts(__FUNC__); }])],
    tor_cv_have_FUNC_macro=yes,
    tor_cv_have_FUNC_macro=no))
  
  AC_CACHE_CHECK([whether the C compiler supports __FUNCTION__],
    tor_cv_have_FUNCTION_macro,
 -  AC_COMPILE_IFELSE([
 +  AC_COMPILE_IFELSE([AC_LANG_SOURCE([
  #include <stdio.h>
 -int main(int c, char **v) { puts(__FUNCTION__); }],
 +int main(int c, char **v) { puts(__FUNCTION__); }])],
    tor_cv_have_FUNCTION_macro=yes,
    tor_cv_have_FUNCTION_macro=no))
  
@@@ -848,20 -781,6 +848,20 @@@ AC_SUBST(BINDIR
  LOCALSTATEDIR=`eval echo $localstatedir`
  AC_SUBST(LOCALSTATEDIR)
  
 +if test "$bwin32" = true; then
 +  # Test if the linker supports the --nxcompat and --dynamicbase options
 +  # for Windows
 +  save_LDFLAGS="$LDFLAGS"
 +  LDFLAGS="-Wl,--nxcompat -Wl,--dynamicbase"
 +  AC_MSG_CHECKING([whether the linker supports DllCharacteristics])
 +  AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
 +    [AC_MSG_RESULT([yes])]
 +    [save_LDFLAGS="$save_LDFLAGS $LDFLAGS"],
 +    [AC_MSG_RESULT([no])]
 +  )
 +  LDFLAGS="$save_LDFLAGS"
 +fi
 +
  # Set CFLAGS _after_ all the above checks, since our warnings are stricter
  # than autoconf's macros like.
  if test "$GCC" = yes; then
@@@ -879,24 -798,24 +879,24 @@@ f
  # released versions.  (Some relevant gcc versions can't handle these.)
  if test x$enable_gcc_warnings = xyes || test x$enable_gcc_warnings_advisory = xyes; then
  
 -  AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], [
 +  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
  #if !defined(__GNUC__) || (__GNUC__ < 4)
  #error
 -#endif]), have_gcc4=yes, have_gcc4=no)
 +#endif])], have_gcc4=yes, have_gcc4=no)
  
 -  AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], [
 +  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
  #if !defined(__GNUC__) || (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 2)
  #error
 -#endif]), have_gcc42=yes, have_gcc42=no)
 +#endif])], have_gcc42=yes, have_gcc42=no)
  
 -  AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], [
 +  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
  #if !defined(__GNUC__) || (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
  #error
 -#endif]), have_gcc43=yes, have_gcc43=no)
 +#endif])], have_gcc43=yes, have_gcc43=no)
  
    save_CFLAGS="$CFLAGS"
    CFLAGS="$CFLAGS -Wshorten-64-to-32"
 -  AC_COMPILE_IFELSE(AC_LANG_PROGRAM([], []), have_shorten64_flag=yes,
 +  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], have_shorten64_flag=yes,
                      have_shorten64_flag=no)
    CFLAGS="$save_CFLAGS"
  
@@@ -923,6 -842,7 +923,6 @@@
  
    if test x$have_gcc42 = xyes ; then 
      # These warnings break gcc 4.0.2 and work on gcc 4.2
 -    # XXXX020 Use -fstack-protector.
      # XXXX020 See if any of these work with earlier versions.
      CFLAGS="$CFLAGS -Waddress -Wmissing-noreturn -Wnormalized=id -Woverride-init -Wstrict-overflow=1"
      # We used to use -Wstrict-overflow=5, but that breaks us heavily under 4.3.
@@@ -946,7 -866,7 +946,7 @@@ f
  
  CPPFLAGS="$CPPFLAGS $TOR_CPPFLAGS_libevent $TOR_CPPFLAGS_openssl $TOR_CPPFLAGS_zlib"
  
- AC_CONFIG_FILES([Makefile tor.spec Doxyfile contrib/tor.sh contrib/torctl contrib/torify contrib/tor.logrotate contrib/Makefile src/config/torrc.sample src/Makefile doc/Makefile doc/spec/Makefile src/config/Makefile src/common/Makefile src/or/Makefile src/test/Makefile src/win32/Makefile src/tools/Makefile contrib/suse/Makefile contrib/suse/tor.sh])
 -AC_CONFIG_FILES([Makefile tor.spec Doxyfile contrib/tor.sh contrib/torctl contrib/torify contrib/tor.logrotate contrib/Makefile contrib/osx/Makefile contrib/osx/TorBundleDesc.plist contrib/osx/TorBundleInfo.plist contrib/osx/TorDesc.plist contrib/osx/TorInfo.plist contrib/osx/TorStartupDesc.plist src/config/torrc.sample doc/tor.1 src/Makefile doc/Makefile doc/design-paper/Makefile src/config/Makefile src/common/Makefile src/or/Makefile src/win32/Makefile src/tools/Makefile contrib/suse/Makefile contrib/suse/tor.sh])
++AC_CONFIG_FILES([Makefile tor.spec Doxyfile contrib/tor.sh contrib/torctl contrib/torify contrib/tor.logrotate contrib/Makefile src/config/torrc.sample src/Makefile doc/Makefile src/config/Makefile src/common/Makefile src/or/Makefile src/test/Makefile src/win32/Makefile src/tools/Makefile contrib/suse/Makefile contrib/suse/tor.sh])
  AC_OUTPUT
  
  if test -x /usr/bin/perl && test -x ./contrib/updateVersions.pl ; then



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits