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

[tor-commits] [tor/master] Merge remote branch 'origin/maint-0.2.2'



commit c2f111a631292b38b25635334afd628cb1024265
Merge: bbf782d 596f7a3
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Tue Feb 22 17:55:17 2011 -0500

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

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

diff --combined configure.in
index 2669511,f30402d..d7cb91f
--- a/configure.in
+++ b/configure.in
@@@ -4,7 -4,7 +4,7 @@@ dnl Copyright (c) 2007-2008, The Tor Pr
  dnl See LICENSE for licensing information
  
  AC_INIT
 -AM_INIT_AUTOMAKE(tor, 0.2.2.19-alpha)
 +AM_INIT_AUTOMAKE(tor, 0.2.3.0-alpha-dev)
  AM_CONFIG_HEADER(orconfig.h)
  
  AC_CANONICAL_HOST
@@@ -59,24 -59,6 +59,24 @@@ AC_ARG_ENABLE(asciidoc
          *) AC_MSG_ERROR(bad value for --disable-asciidoc) ;;
        esac], [asciidoc=true])
  
 +# By default, we're not ready to ship a NAT-PMP aware Tor
 +AC_ARG_ENABLE(nat-pmp,
 +     AS_HELP_STRING(--enable-nat-pmp, enable NAT-PMP support),
 +     [case "${enableval}" in
 +        yes) natpmp=true ;;
 +        no)  natpmp=false ;;
 +        * ) AC_MSG_ERROR(bad value for --enable-nat-pmp) ;;
 +      esac], [natpmp=false])
 +
 +# By default, we're not ready to ship a UPnP aware Tor
 +AC_ARG_ENABLE(upnp,
 +     AS_HELP_STRING(--enable-upnp, enable UPnP support),
 +     [case "${enableval}" in
 +        yes) upnp=true ;;
 +        no)  upnp=false ;;
 +        * ) AC_MSG_ERROR(bad value for --enable-upnp) ;;
 +      esac], [upnp=false])
 +
  
  AC_ARG_ENABLE(threads,
       AS_HELP_STRING(--disable-threads, disable multi-threading support))
@@@ -136,9 -118,6 +136,9 @@@ if test "$enable_local_appdata" = "yes"
              [Defined if we default to host local appdata paths on Windows])
  fi
  
 +AC_ARG_ENABLE(bufferevents,
 +     AS_HELP_STRING(--enable-bufferevents, use Libevent's buffered IO.))
 +
  AC_PROG_CC
  AC_PROG_CPP
  AC_PROG_MAKE_SET
@@@ -153,33 -132,6 +153,33 @@@ AC_PATH_PROG([A2X], [a2x], none
  
  AM_CONDITIONAL(USE_ASCIIDOC, test x$asciidoc = xtrue)
  
 +AM_CONDITIONAL(USE_FW_HELPER, test x$natpmp = xtrue || test x$upnp = xtrue)
 +AM_CONDITIONAL(NAT_PMP, test x$natpmp = xtrue)
 +AM_CONDITIONAL(MINIUPNPC, test x$upnp = xtrue)
 +AM_PROG_CC_C_O
 +
 +ifdef([AC_C_FLEXIBLE_ARRAY_MEMBER], [
 +AC_C_FLEXIBLE_ARRAY_MEMBER
 +], [
 + dnl Maybe we've got an old autoconf...
 + AC_CACHE_CHECK([for flexible array members],
 +     tor_cv_c_flexarray,
 +     [AC_COMPILE_IFELSE(
 +       AC_LANG_PROGRAM([
 + struct abc { int a; char b[]; };
 +], [
 + struct abc *def = malloc(sizeof(struct abc)+sizeof(char));
 + def->b[0] = 33;
 +]),
 +  [tor_cv_c_flexarray=yes],
 +  [tor_cv_c_flexarray=no])])
 + if test $tor_cv_flexarray = yes ; then
 +   AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [])
 + else
 +   AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [1])
 + fi
 +])
 +
  AC_PATH_PROG([SHA1SUM], [sha1sum], none)
  AC_PATH_PROG([OPENSSL], [openssl], none)
  
@@@ -271,28 -223,7 +271,28 @@@ 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 vasprintf)
 +AC_CHECK_FUNCS(
 +	accept4 \
 +        flock \
 +        ftime \
 +        getaddrinfo \
 +        getrlimit \
 +        gettimeofday \
 +        gmtime_r \
 +        inet_aton \
 +        localtime_r \
 +        memmem \
 +        prctl \
 +        socketpair \
 +        strlcat \
 +        strlcpy \
 +        strptime \
 +        strtok_r \
 +        strtoull \
 +        sysconf \
 +        uname \
 +        vasprintf \
 +)
  
  using_custom_malloc=no
  if test x$enable_openbsd_malloc = xyes ; then
@@@ -371,7 -302,7 +371,7 @@@ AC_CHECK_MEMBERS([struct event.min_heap
  [#include <event.h>
  ])
  
 -AC_CHECK_HEADERS(event2/event.h event2/dns.h)
 +AC_CHECK_HEADERS(event2/event.h event2/dns.h event2/bufferevent_ssl.h)
  
  LIBS="$save_LIBS"
  LDFLAGS="$save_LDFLAGS"
@@@ -391,54 -322,6 +391,54 @@@ els
  fi
  AC_SUBST(TOR_LIBEVENT_LIBS)
  
 +dnl This isn't the best test for Libevent 2.0.3-alpha.  Once it's released,
 +dnl we can do much better.
 +if test "$enable_bufferevents" = "yes" ; then
 +  if test "$ac_cv_header_event2_bufferevent_ssl_h" != "yes" ; then
 +    AC_MSG_ERROR([You've asked for bufferevent support, but you're using a version of Libevent without SSL support.  This won't work.  We need Libevent 2.0.8-rc or later, and you don't seem to even have Libevent 2.0.3-alpha.])
 +  else
 +
 +    CPPFLAGS="$CPPFLAGS $TOR_CPPFLAGS_libevent"
 +
 +    # Check for the right version.  First see if version detection works.
 +    AC_MSG_CHECKING([whether we can detect the Libevent version])
 +    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
 +#include <event2/event.h>
 +#if !defined(LIBEVENT_VERSION_NUMBER) || LIBEVENT_VERSION_NUMBER < 10
 +#error
 +int x = y(zz);
 +#else
 +int x = 1;
 +#endif
 +  ])], [event_version_number_works=yes; AC_MSG_RESULT([yes]) ],
 +     [event_version_number_works=no;  AC_MSG_RESULT([no])])
 +    if test "$event_version_number_works" != 'yes'; then
 +      AC_MSG_WARN([Version detection on Libevent seems broken.  Your Libevent installation is probably screwed up or very old.])
 +    else
 +      AC_MSG_CHECKING([whether Libevent is new enough for bufferevents])
 +      AC_COMPILE_IFELSE([AC_LANG_SOURCE([
 +#include <event2/event.h>
 +#if !defined(LIBEVENT_VERSION_NUMBER) || LIBEVENT_VERSION_NUMBER < 0x02000800
 +#error
 +int x = y(zz);
 +#else
 +int x = 1;
 +#endif
 +   ])], [ AC_MSG_RESULT([yes]) ],
 +      [ AC_MSG_RESULT([no])
 +        AC_MSG_ERROR([Libevent does not seem new enough to support bufferevents.  We require 2.0.8-rc or later]) ] )
 +    fi
 +  fi
 +fi
 +
 +LIBS="$save_LIBS"
 +LDFLAGS="$save_LDFLAGS"
 +CPPFLAGS="$save_CPPFLAGS"
 +
 +AM_CONDITIONAL(USE_BUFFEREVENTS, test "$enable_bufferevents" = "yes")
 +if test "$enable_bufferevents" = "yes"; then
 +   AC_DEFINE(USE_BUFFEREVENTS, 1, [Defined if we're going to use Libevent's buffered IO API])
 +fi
  
  dnl ------------------------------------------------------
  dnl Where do you live, openssl?  And how do we call you?
@@@ -506,94 -389,15 +506,94 @@@ AC_SUBST(TOR_ZLIB_LIBS
  
  dnl Make sure to enable support for large off_t if available.
  
 -AC_SYS_LARGEFILE
  
 -AC_CHECK_HEADERS(unistd.h string.h signal.h sys/stat.h sys/types.h fcntl.h sys/fcntl.h sys/time.h errno.h assert.h time.h, , AC_MSG_WARN(Some headers were not found, compilation may fail.  If compilation succeeds, please send your orconfig.h to the developers so we can fix this warning.))
 +dnl ------------------------------------------------------
 +dnl Where do you live, libnatpmp?  And how do we call you?
 +dnl There are no packages for Debian or Redhat as of this patch
 +
 +if test "$natpmp" = "true"; then
 +    AC_DEFINE(NAT_PMP, 1, [Define to 1 if we are building with nat-pmp.])
 +    TOR_SEARCH_LIBRARY(libnatpmp, $trylibnatpmpdir, [-lnatpmp],
 +        [#include <natpmp.h>],
 +        [#include <natpmp.h>],
 +        [   int r;
 +            natpmp_t natpmp;
 +            natpmpresp_t response;
 +            r = initnatpmp(&natpmp);],
 +            [printf("initnatpmp() returned %d (%s)\n", r, r?"FAILED":"SUCCESS");
 +            exit(0);],
 +        [--with-libnatpmp-dir],
 +        [/usr/lib/])
 +fi
 +
  
 -AC_CHECK_HEADERS(netdb.h sys/ioctl.h sys/socket.h arpa/inet.h netinet/in.h pwd.h grp.h sys/un.h sys/uio.h)
 +dnl ------------------------------------------------------
 +dnl Where do you live, libminiupnpc?  And how do we call you?
 +dnl There are no packages for Debian or Redhat as of this patch
 +
 +if test "$upnp" = "true"; then
 +    AC_DEFINE(MINIUPNPC, 1, [Define to 1 if we are building with UPnP.])
 +    TOR_SEARCH_LIBRARY(libminiupnpc, $trylibminiupnpcdir, [-lminiupnpc],
 +        [#include <miniupnpc/miniwget.h>
 +         #include <miniupnpc/miniupnpc.h>
 +         #include <miniupnpc/upnpcommands.h>],
 +        [void upnpDiscover(int delay, const char * multicastif,
 +         const char * minissdpdsock, int sameport);],
 +        [upnpDiscover(1, 0, 0, 0); exit(0);],
 +        [--with-libminiupnpc-dir],
 +        [/usr/lib/])
 +fi
 +
 +AC_SYS_LARGEFILE
 +
 +AC_CHECK_HEADERS(
 +        assert.h \
 +        errno.h \
 +        fcntl.h \
 +        signal.h \
 +        string.h \
 +        sys/fcntl.h \
 +        sys/stat.h \
 +        sys/time.h \
 +        sys/types.h \
 +        time.h \
 +        unistd.h
 + , , AC_MSG_WARN(Some headers were not found, compilation may fail.  If compilation succeeds, please send your orconfig.h to the developers so we can fix this warning.))
  
  dnl These headers are not essential
  
 -AC_CHECK_HEADERS(stdint.h sys/types.h inttypes.h sys/param.h sys/wait.h limits.h sys/limits.h netinet/in.h arpa/inet.h machine/limits.h syslog.h sys/time.h sys/resource.h inttypes.h utime.h sys/utime.h sys/mman.h netinet/in6.h malloc.h sys/syslimits.h malloc/malloc.h linux/types.h sys/file.h malloc_np.h sys/prctl.h)
 +AC_CHECK_HEADERS(
 +        arpa/inet.h \
 +        grp.h \
 +        inttypes.h \
 +        limits.h \
 +        linux/types.h \
 +        machine/limits.h \
 +        malloc.h \
 +        malloc/malloc.h \
 +        malloc_np.h \
 +        netdb.h \
 +        netinet/in.h \
 +        netinet/in6.h \
 +        pwd.h \
 +        stdint.h \
 +        sys/file.h \
 +        sys/ioctl.h \
 +        sys/limits.h \
 +        sys/mman.h \
 +        sys/param.h \
 +        sys/prctl.h \
 +        sys/resource.h \
 +        sys/socket.h \
 +        sys/syslimits.h \
 +        sys/time.h \
 +        sys/types.h \
 +        sys/un.h \
 +        sys/utime.h \
 +        sys/wait.h \
 +        syslog.h \
 +        utime.h
 +)
  
  TOR_CHECK_PROTOTYPE(malloc_good_size, HAVE_MALLOC_GOOD_SIZE_PROTOTYPE,
  [#ifdef HAVE_MALLOC_H
@@@ -1032,13 -836,6 +1032,13 @@@ if test "x$exec_prefix" = "xNONE"; the
    exec_prefix=$prefix
  fi
  
 +if test "x$BUILDDIR" = "x"; then
 +  BUILDDIR=`pwd`
 +fi
 +AC_SUBST(BUILDDIR)
 +AH_TEMPLATE([BUILDDIR],[tor's build directory])
 +AC_DEFINE_UNQUOTED(BUILDDIR,"$BUILDDIR")
 +
  if test "x$CONFDIR" = "x"; then
    CONFDIR=`eval echo $sysconfdir/tor`
  fi
@@@ -1112,12 -909,7 +1112,12 @@@ if test x$enable_gcc_warnings = xyes |
        CFLAGS="$CFLAGS -Wno-system-headers" ;;
    esac
  
 -  CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2 -Wwrite-strings -Wmissing-declarations -Wredundant-decls -Wnested-externs -Wbad-function-cast -Wswitch-enum"
 +  CFLAGS="$CFLAGS -W -Wfloat-equal -Wundef -Wpointer-arith"
 +  CFLAGS="$CFLAGS -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings"
 +  CFLAGS="$CFLAGS -Wredundant-decls -Wchar-subscripts -Wcomment -Wformat=2"
 +  CFLAGS="$CFLAGS -Wwrite-strings -Wmissing-declarations -Wredundant-decls"
 +  CFLAGS="$CFLAGS -Wnested-externs -Wbad-function-cast -Wswitch-enum"
 +
    if test x$enable_gcc_warnings = xyes; then
      CFLAGS="$CFLAGS -Werror"
    fi
@@@ -1129,14 -921,14 +1129,14 @@@
      CFLAGS="$CFLAGS -Winit-self -Wmissing-field-initializers -Wdeclaration-after-statement -Wold-style-definition"
    fi
  
 -  if test x$have_gcc42 = xyes ; then 
 +  if test x$have_gcc42 = xyes ; then
      # These warnings break gcc 4.0.2 and work on gcc 4.2
      # 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.
    fi
  
 -  if test x$have_gcc43 = xyes ; then 
 +  if test x$have_gcc43 = xyes ; then
      # These warnings break gcc 4.2 and work on gcc 4.3
      # XXXX020 See if any of these work with earlier versions.
      CFLAGS="$CFLAGS -Wextra -Warray-bounds"
@@@ -1154,30 -946,7 +1154,29 @@@ 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 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([
 +        Doxyfile
 +        Makefile
 +        contrib/Makefile
 +        contrib/suse/Makefile
 +        contrib/suse/tor.sh
 +        contrib/tor.logrotate
 +        contrib/tor.sh
 +        contrib/torctl
 +        contrib/torify
 +        doc/Makefile
-         doc/spec/Makefile
 +        src/Makefile
 +        src/common/Makefile
 +        src/config/Makefile
 +        src/config/torrc.sample
 +        src/or/Makefile
 +        src/test/Makefile
 +        src/tools/Makefile
 +        src/tools/tor-fw-helper/Makefile
 +        src/win32/Makefile
 +        tor.spec
 +])
 +
  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