Ticket #17744: 0001-Quotes-added-on-configure-script-s-string-comparison.patch

File 0001-Quotes-added-on-configure-script-s-string-comparison.patch, 23.3 KB (added by zerosion, 5 years ago)
  • configure.ac

    From 057ac6f5e4eaabe2e823b687ce5a7df1a7db9eee Mon Sep 17 00:00:00 2001
    From: zerosion <zerosion@protonmail.ch>
    Date: Thu, 4 Feb 2016 02:28:38 +0100
    Subject: [PATCH] Quotes added on configure script's string comparison.
    
    Solves #17744
    
    The syntax has been generalized too, so there are only double quotes.
    ---
     configure.ac | 180 ++++++++++++++++++++++++++++++-----------------------------
     1 file changed, 93 insertions(+), 87 deletions(-)
    
    diff --git a/configure.ac b/configure.ac
    index 6d2312d..216f9f7 100644
    a b AC_ARG_ENABLE(coverage, 
    4444AC_ARG_ENABLE(system-torrc,
    4545   AS_HELP_STRING(--disable-system-torrc, [don't look for a system-wide torrc file]))
    4646
    47 AM_CONDITIONAL(UNITTESTS_ENABLED, test x$enable_unittests != xno)
    48 AM_CONDITIONAL(COVERAGE_ENABLED, test x$enable_coverage = xyes)
     47AM_CONDITIONAL(UNITTESTS_ENABLED, test "x$enable_unittests" != "xno")
     48AM_CONDITIONAL(COVERAGE_ENABLED, test "x$enable_coverage" = "xyes")
    4949
    5050if test "$enable_static_tor" = "yes"; then
    5151  enable_static_libevent="yes";
    if test "$enable_system_torrc" = "no"; then 
    5959            [Defined if we're not going to look for a torrc in SYSCONF])
    6060fi
    6161
    62 AM_CONDITIONAL(USE_OPENBSD_MALLOC, test x$enable_openbsd_malloc = xyes)
    63 if test x$enable_instrument_downloads = xyes; then
     62AM_CONDITIONAL(USE_OPENBSD_MALLOC, test "x$enable_openbsd_malloc" = "xyes")
     63if test "x$enable_instrument_downloads" = "xyes"; then
    6464  AC_DEFINE(INSTRUMENT_DOWNLOADS, 1,
    6565            [Defined if we want to keep track of how much of each kind of resource we download.])
    6666fi
    fi 
    6868AC_ARG_ENABLE(transparent,
    6969     AS_HELP_STRING(--disable-transparent, [disable transparent proxy support]),
    7070     [case "${enableval}" in
    71         yes) transparent=true ;;
    72         no)  transparent=false ;;
     71        "yes") transparent=true ;;
     72        "no")  transparent=false ;;
    7373        *) AC_MSG_ERROR(bad value for --enable-transparent) ;;
    7474      esac], [transparent=true])
    7575
    7676AC_ARG_ENABLE(asciidoc,
    7777     AS_HELP_STRING(--disable-asciidoc, [don't use asciidoc (disables building of manpages)]),
    7878     [case "${enableval}" in
    79         yes) asciidoc=true ;;
    80         no)  asciidoc=false ;;
     79        "yes") asciidoc=true ;;
     80        "no")  asciidoc=false ;;
    8181        *) AC_MSG_ERROR(bad value for --disable-asciidoc) ;;
    8282      esac], [asciidoc=true])
    8383
    AC_ARG_ENABLE(asciidoc, 
    8585AC_ARG_ENABLE(systemd,
    8686      AS_HELP_STRING(--enable-systemd, [enable systemd notification support]),
    8787      [case "${enableval}" in
    88         yes) systemd=true ;;
    89         no)  systemd=false ;;
     88        "yes") systemd=true ;;
     89        "no")  systemd=false ;;
    9090        * ) AC_MSG_ERROR(bad value for --enable-systemd) ;;
    9191      esac], [systemd=auto])
    9292
    9393
    9494
    9595# systemd support
    96 if test x$enable_systemd = xno ; then
     96if test "x$enable_systemd" = "xno"; then
    9797    have_systemd=no;
    9898else
    9999    PKG_CHECK_MODULES(SYSTEMD,
    100100        [libsystemd-daemon],
    101101        have_systemd=yes,
    102102        have_systemd=no)
    103     if test x$have_systemd=xno; then
     103    if test "x$have_systemd" = "xno"; then
    104104        AC_MSG_NOTICE([Okay, checking for systemd a different way...])
    105105        PKG_CHECK_MODULES(SYSTEMD,
    106106            [libsystemd],
    else 
    109109    fi
    110110fi
    111111
    112 if test x$have_systemd = xyes; then
     112if test "x$have_systemd" = "xyes"; then
    113113    AC_DEFINE(HAVE_SYSTEMD,1,[Have systemd])
    114114    TOR_SYSTEMD_CFLAGS="${SYSTEMD_CFLAGS}"
    115115    TOR_SYSTEMD_LIBS="${SYSTEMD_LIBS}"
    fi 
    119119AC_SUBST(TOR_SYSTEMD_CFLAGS)
    120120AC_SUBST(TOR_SYSTEMD_LIBS)
    121121
    122 if test x$enable_systemd = xyes -a x$have_systemd != xyes ; then
     122if test "x$enable_systemd" = "xyes" -a "x$have_systemd" != "xyes" ; then
    123123    AC_MSG_ERROR([Explicitly requested systemd support, but systemd not found])
    124124fi
    125125
    fi 
    156156# Tor2web mode flag
    157157AC_ARG_ENABLE(tor2web-mode,
    158158     AS_HELP_STRING(--enable-tor2web-mode, [support tor2web non-anonymous mode]),
    159 [if test x$enableval = xyes; then
     159[if test "x$enableval" = "xyes"; then
    160160    CFLAGS="$CFLAGS -D ENABLE_TOR2WEB_MODE=1"
    161161fi])
    162162
    dnl because that will find any cc on the system, not only the cross-compiler, 
    184184dnl and then verify that a binary built with this compiler runs on the
    185185dnl build system. It will then come to the false conclusion that we're not
    186186dnl cross-compiling.
    187 if test x$enable_tool_name_check != xno; then
    188     if test x$ac_tool_warned = xyes; then
     187if test "x$enable_tool_name_check" != "xno"; then
     188    if test "x$ac_tool_warned" = "xyes"; then
    189189        AC_MSG_ERROR([We are cross compiling but could not find a properly named toolchain. Do you have your cross-compiling toolchain in PATH? (You can --disable-tool-name-check to ignore this.)])
    190         elif test "x$ac_ct_AR" != x -a x$cross_compiling = xmaybe; then
     190        elif test "x$ac_ct_AR" != "x" -a "x$cross_compiling" = "xmaybe"; then
    191191                AC_MSG_ERROR([We think we are cross compiling but could not find a properly named toolchain. Do you have your cross-compiling toolchain in PATH? (You can --disable-tool-name-check to ignore this.)])
    192192        fi
    193193fi
    dnl check for asciidoc and a2x 
    206206AC_PATH_PROG([ASCIIDOC], [asciidoc], none)
    207207AC_PATH_PROGS([A2X], [a2x a2x.py], none)
    208208
    209 AM_CONDITIONAL(USE_ASCIIDOC, test x$asciidoc = xtrue)
     209AM_CONDITIONAL(USE_ASCIIDOC, test "x$asciidoc" = "xtrue")
    210210
    211 AM_CONDITIONAL(USE_FW_HELPER, test x$natpmp = xtrue || test x$upnp = xtrue)
    212 AM_CONDITIONAL(NAT_PMP, test x$natpmp = xtrue)
    213 AM_CONDITIONAL(MINIUPNPC, test x$upnp = xtrue)
     211AM_CONDITIONAL(USE_FW_HELPER, test "x$natpmp" = "xtrue" || test "x$upnp" = "xtrue")
     212AM_CONDITIONAL(NAT_PMP, test "x$natpmp" = "xtrue")
     213AM_CONDITIONAL(MINIUPNPC, test "x$upnp" = "xtrue")
    214214AM_PROG_CC_C_O
    215215AC_PROG_CC_C99
    216216
    AC_C_FLEXIBLE_ARRAY_MEMBER 
    236236]),
    237237  [tor_cv_c_flexarray=yes],
    238238  [tor_cv_c_flexarray=no])])
    239  if test $tor_cv_flexarray = yes ; then
     239 if test "$tor_cv_flexarray" = "yes"; then
    240240   AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [], [Define to nothing if C supports flexible array members, and to 1 if it does not.])
    241241 else
    242242   AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [1], [Define to nothing if C supports flexible array members, and to 1 if it does not.])
    bwin32=false; AC_MSG_RESULT([no]), 
    303303bwin32=cross; AC_MSG_RESULT([cross])
    304304)
    305305
    306 if test "$bwin32" = cross; then
     306if test "$bwin32" = "cross"; then
    307307AC_MSG_CHECKING([for win32 (cross)])
    308308AC_COMPILE_IFELSE([AC_LANG_SOURCE([
    309309#ifdef _WIN32
    AH_BOTTOM([ 
    337337])
    338338
    339339
    340 AM_CONDITIONAL(BUILD_NT_SERVICES, test x$bwin32 = xtrue)
     340AM_CONDITIONAL(BUILD_NT_SERVICES, test "x$bwin32" = "xtrue")
    341341
    342342dnl Enable C99 when compiling with MIPSpro
    343343AC_MSG_CHECKING([for MIPSpro compiler])
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(, [ 
    350350bmipspro=false; AC_MSG_RESULT(no),
    351351bmipspro=true; AC_MSG_RESULT(yes))
    352352
    353 if test "$bmipspro" = true; then
     353if test "$bmipspro" = "true"; then
    354354  CFLAGS="$CFLAGS -c99"
    355355fi
    356356
    AC_CHECK_FUNCS( 
    425425        _vscprintf
    426426)
    427427
    428 if test "$bwin32" != true; then
     428if test "$bwin32" != "true"; then
    429429  AC_CHECK_HEADERS(pthread.h)
    430430  AC_CHECK_FUNCS(pthread_create)
    431431  AC_CHECK_FUNCS(pthread_condattr_setclock)
    432432fi
    433433
    434 if test "$bwin32" = true; then
     434if test "$bwin32" = "true"; then
    435435  AC_CHECK_DECLS([SecureZeroMemory, _getwch], , , [
    436436#include <windows.h>
    437437#include <conio.h>
    if test "$bwin32" = true; then 
    439439                 ])
    440440fi
    441441
    442 AM_CONDITIONAL(BUILD_READPASSPHRASE_C, test x$ac_cv_func_readpassphrase = xno && test $bwin32 = false)
     442AM_CONDITIONAL(BUILD_READPASSPHRASE_C,
     443test "x$ac_cv_func_readpassphrase" = "xno" && test "$bwin32" = "false")
    443444
    444445dnl ------------------------------------------------------
    445446dnl Where do you live, libevent?  And how do we call you?
    446447
    447 if test "$bwin32" = true; then
     448if test "$bwin32" = "true"; then
    448449  TOR_LIB_WS32=-lws2_32
    449450  TOR_LIB_IPHLPAPI=-liphlpapi
    450451  # Some of the cargo-cults recommend -lwsock32 as well, but I don't
    dnl On Gnu/Linux or any place we require it, we'll add librt to the Libevent 
    467468dnl linking for static builds.
    468469STATIC_LIBEVENT_FLAGS=""
    469470if test "$enable_static_libevent" = "yes"; then
    470     if test "$have_rt" = yes; then
     471    if test "$have_rt" = "yes"; then
    471472      STATIC_LIBEVENT_FLAGS=" -lrt "
    472473    fi
    473474fi
    AC_CHECK_HEADERS(event2/event.h event2/dns.h event2/bufferevent_ssl.h) 
    510511
    511512LIBS="$STATIC_LIBEVENT_FLAGS $TOR_LIB_WS32 $save_LIBS"
    512513
    513 AM_CONDITIONAL(USE_EXTERNAL_EVDNS, test x$ac_cv_header_event2_dns_h = xyes)
     514AM_CONDITIONAL(USE_EXTERNAL_EVDNS,
     515test "x$ac_cv_header_event2_dns_h" = "xyes")
    514516
    515517if test "$enable_static_libevent" = "yes"; then
    516518   if test "$tor_cv_library_libevent_dir" = "(system)"; then
    CPPFLAGS="$save_CPPFLAGS" 
    540542
    541543dnl This isn't the best test for Libevent 2.0.3-alpha.  Once it's released,
    542544dnl we can do much better.
    543 if test "$enable_bufferevents" = "yes" ; then
    544   if test "$ac_cv_header_event2_bufferevent_ssl_h" != "yes" ; then
     545if test "$enable_bufferevents" = "yes"; then
     546  if test "$ac_cv_header_event2_bufferevent_ssl_h" != "yes"; then
    545547    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.])
    546548  else
    547549
    int x = 1; 
    559561#endif
    560562  ])], [event_version_number_works=yes; AC_MSG_RESULT([yes]) ],
    561563     [event_version_number_works=no;  AC_MSG_RESULT([no])])
    562     if test "$event_version_number_works" != 'yes'; then
     564    if test "$event_version_number_works" != "yes"; then
    563565      AC_MSG_WARN([Version detection on Libevent seems broken.  Your Libevent installation is probably screwed up or very old.])
    564566    else
    565567      AC_MSG_CHECKING([whether Libevent is new enough for bufferevents])
    ALT_openssl_WITHVAL="" 
    619621AC_ARG_WITH(ssl-dir,
    620622  AS_HELP_STRING(--with-ssl-dir=PATH, [obsolete alias for --with-openssl-dir]),
    621623  [
    622       if test "x$withval" != xno && test "x$withval" != "x" ; then
     624      if test "x$withval" != "xno" && test "x$withval" != "x"; then
    623625         ALT_openssl_WITHVAL="$withval"
    624626      fi
    625627  ])
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [ 
    746748#error
    747749#endif])], have_clang=yes, have_clang=no)
    748750
    749 if test x$enable_gcc_hardening != xno; then
     751if test "x$enable_gcc_hardening" != "xno"; then
    750752    CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
    751     if test x$have_clang = xyes; then
     753    if test "x$have_clang" = "xyes"; then
    752754        TOR_CHECK_CFLAGS(-Qunused-arguments)
    753755    fi
    754756    TOR_CHECK_CFLAGS(-fstack-protector-all, also_link)
    m4_ifdef([AS_VAR_IF],[ 
    771773    fi
    772774fi
    773775
    774 if test x$enable_expensive_hardening = xyes ; then
     776if test "x$enable_expensive_hardening" = "xyes"; then
    775777   TOR_CHECK_CFLAGS([-fsanitize=address])
    776778   TOR_CHECK_CFLAGS([-fsanitize=undefined])
    777779   TOR_CHECK_CFLAGS([-fno-omit-frame-pointer])
    778780fi
    779781
    780 if test x$enable_linker_hardening != xno; then
     782if test "x$enable_linker_hardening" != "xno"; then
    781783    TOR_CHECK_LDFLAGS(-z relro -z now, "$all_ldflags_for_check", "$all_libs_for_check")
    782784fi
    783785
    saved_CFLAGS="$CFLAGS" 
    791793TOR_CHECK_CFLAGS(-fomit-frame-pointer)
    792794F_OMIT_FRAME_POINTER=''
    793795if test "$saved_CFLAGS" != "$CFLAGS"; then
    794   if test x$enable_expensive_hardening != xyes ; then
     796  if test "x$enable_expensive_hardening" != "xyes"; then
    795797    F_OMIT_FRAME_POINTER='-fomit-frame-pointer'
    796798  fi
    797799fi
    AC_CACHE_CHECK([for nacl compiled with a fast curve25519 implementation], 
    900902 dnl Okay, now we need to figure out which one to actually use. Fall back
    901903 dnl to curve25519-donna.c
    902904
    903  if test x$tor_cv_can_use_curve25519_donna_c64 != xno; then
     905 if test "x$tor_cv_can_use_curve25519_donna_c64" != "xno"; then
    904906   build_curve25519_donna_c64=yes
    905907   use_curve25519_donna=yes
    906  elif test x$tor_cv_can_use_curve25519_nacl = xyes; then
     908 elif test "x$tor_cv_can_use_curve25519_nacl" = "xyes"; then
    907909   use_curve25519_nacl=yes
    908910   CURVE25519_LIBS=-lnacl
    909911 else
    AC_CACHE_CHECK([for nacl compiled with a fast curve25519 implementation], 
    911913   use_curve25519_donna=yes
    912914 fi
    913915
    914 if test x$use_curve25519_donna = xyes; then
     916if test "x$use_curve25519_donna" = "xyes"; then
    915917  AC_DEFINE(USE_CURVE25519_DONNA, 1,
    916918            [Defined if we should use an internal curve25519_donna{,_c64} implementation])
    917919fi
    918 if test x$use_curve25519_nacl = xyes; then
     920if test "x$use_curve25519_nacl" = "xyes"; then
    919921  AC_DEFINE(USE_CURVE25519_NACL, 1,
    920922            [Defined if we should use a curve25519 from nacl])
    921923fi
    922 AM_CONDITIONAL(BUILD_CURVE25519_DONNA, test x$build_curve25519_donna = xyes)
    923 AM_CONDITIONAL(BUILD_CURVE25519_DONNA_C64, test x$build_curve25519_donna_c64 = xyes)
     924AM_CONDITIONAL(BUILD_CURVE25519_DONNA,
     925test "x$build_curve25519_donna" = "xyes")
     926AM_CONDITIONAL(BUILD_CURVE25519_DONNA_C64,
     927test "x$build_curve25519_donna_c64" = "xyes")
    924928AC_SUBST(CURVE25519_LIBS)
    925929
    926930dnl Make sure to enable support for large off_t if available.
    AC_CHECK_HEADERS(linux/netfilter_ipv6/ip6_tables.h, 
    10601064#include <linux/if.h>
    10611065#endif])
    10621066
    1063 if test x$transparent = xtrue ; then
     1067if test "x$transparent" = "xtrue"; then
    10641068   transparent_ok=0
    1065    if test x$net_if_found = x1 && test x$net_pfvar_found = x1 ; then
     1069   if test "x$net_if_found" = "x1" && test "x$net_pfvar_found" = "x1"; then
    10661070     transparent_ok=1
    10671071   fi
    1068    if test x$linux_netfilter_ipv4 = x1 ; then
     1072   if test "x$linux_netfilter_ipv4" = "x1"; then
    10691073     transparent_ok=1
    10701074   fi
    1071    if test x$linux_netfilter_ipv6_ip6_tables = x1 ; then
     1075   if test "x$linux_netfilter_ipv6_ip6_tables" = "x1"; then
    10721076     transparent_ok=1
    10731077   fi
    1074    if test x$transparent_ok = x1 ; then
     1078   if test "x$transparent_ok" = "x1"; then
    10751079     AC_DEFINE(USE_TRANSPARENT, 1, "Define to enable transparent proxy support")
    10761080     case $host in
    10771081       *-*-openbsd* | *-*-bitrig*)
    AX_CHECK_SIGN([time_t], 
    11891193#endif
    11901194])
    11911195
    1192 if test "$ax_cv_decl_time_t_signed" = no; then
     1196if test "$ax_cv_decl_time_t_signed" = "no"; then
    11931197  AC_MSG_WARN([You have an unsigned time_t; some things will probably break. Please tell the Tor developers about your interesting platform.])
    11941198fi
    11951199
    AX_CHECK_SIGN([size_t], 
    12011205#endif
    12021206])
    12031207
    1204 if test "$ax_cv_decl_size_t_signed" = yes; then
     1208if test "$ax_cv_decl_size_t_signed" = "yes"; then
    12051209  AC_MSG_ERROR([You have a signed size_t; that's grossly nonconformant.])
    12061210fi
    12071211
    return memcmp(&p1,&p2,sizeof(char*))?1:0; }]])], 
    12361240       [tor_cv_null_is_zero=no],
    12371241       [tor_cv_null_is_zero=cross])])
    12381242
    1239 if test "$tor_cv_null_is_zero" = cross ; then
     1243if test "$tor_cv_null_is_zero" = "cross"; then
    12401244  # Cross-compiling; let's hope that the target isn't raving mad.
    12411245  AC_MSG_NOTICE([Cross-compiling: we'll assume that NULL is represented as a sequence of 0-valued bytes.])
    12421246fi
    12431247
    1244 if test "$tor_cv_null_is_zero" != no; then
     1248if test "$tor_cv_null_is_zero" != "no"; then
    12451249  AC_DEFINE([NULL_REP_IS_ZERO_BYTES], 1,
    12461250            [Define to 1 iff memset(0) sets pointers to NULL])
    12471251fi
    return memcmp(&d1,&d2,sizeof(d1))?1:0; }]])], 
    12601264       [tor_cv_dbl0_is_zero=no],
    12611265       [tor_cv_dbl0_is_zero=cross])])
    12621266
    1263 if test "$tor_cv_dbl0_is_zero" = cross ; then
     1267if test "$tor_cv_dbl0_is_zero" = "cross"; then
    12641268  # Cross-compiling; let's hope that the target isn't raving mad.
    12651269  AC_MSG_NOTICE([Cross-compiling: we'll assume that 0.0 can be represented as a sequence of 0-valued bytes.])
    12661270fi
    12671271
    1268 if test "$tor_cv_dbl0_is_zero" != no; then
     1272if test "$tor_cv_dbl0_is_zero" != "no"; then
    12691273  AC_DEFINE([DOUBLE_0_REP_IS_ZERO_BYTES], 1,
    12701274            [Define to 1 iff memset(0) sets doubles to 0.0])
    12711275fi
    int main () { return malloc(0)?0:1; }]])], 
    12841288       [tor_cv_malloc_zero_works=no],
    12851289       [tor_cv_malloc_zero_works=cross])])
    12861290
    1287 if test "$tor_cv_malloc_zero_works" = cross; then
     1291if test "$tor_cv_malloc_zero_works" = "cross"; then
    12881292  # Cross-compiling; let's hope that the target isn't raving mad.
    12891293  AC_MSG_NOTICE([Cross-compiling: we'll assume that we need to check malloc() arguments for 0.])
    12901294fi
    12911295
    1292 if test "$tor_cv_malloc_zero_works" = yes; then
     1296if test "$tor_cv_malloc_zero_works" = "yes"; then
    12931297  AC_DEFINE([MALLOC_ZERO_WORKS], 1,
    12941298            [Define to 1 iff malloc(0) returns a pointer])
    12951299fi
    return problem ? 1 : 0; }]])], 
    13031307       [tor_cv_twos_complement=no],
    13041308       [tor_cv_twos_complement=cross])])
    13051309
    1306 if test "$tor_cv_twos_complement" = cross ; then
     1310if test "$tor_cv_twos_complement" = "cross"; then
    13071311  # Cross-compiling; let's hope that the target isn't raving mad.
    13081312  AC_MSG_NOTICE([Cross-compiling: we'll assume that negative integers are represented with two's complement.])
    13091313fi
    13101314
    1311 if test "$tor_cv_twos_complement" != no ; then
     1315if test "$tor_cv_twos_complement" != "no"; then
    13121316  AC_DEFINE([USING_TWOS_COMPLEMENT], 1,
    1313             [Define to 1 iff we represent negative integers with two's complement])
     1317            [Define to 1 iff we represent negative integers with
     1318             two's complement])
    13141319fi
    13151320
    13161321# What does shifting a negative value do?
    AC_CACHE_CHECK([whether right-shift on negative values does sign-extension], tor 
    13211326       [tor_cv_sign_extend=no],
    13221327       [tor_cv_sign_extend=cross])])
    13231328
    1324 if test "$tor_cv_sign_extend" = cross ; then
     1329if test "$tor_cv_sign_extend" = "cross"; then
    13251330  # Cross-compiling; let's hope that the target isn't raving mad.
    13261331  AC_MSG_NOTICE([Cross-compiling: we'll assume that right-shifting negative integers causes sign-extension])
    13271332fi
    13281333
    1329 if test "$tor_cv_sign_extend" != no ; then
     1334if test "$tor_cv_sign_extend" != "no"; then
    13301335  AC_DEFINE([RSHIFT_DOES_SIGN_EXTEND], 1,
    13311336            [Define to 1 iff right-shifting a negative value performs sign-extension])
    13321337fi
    AC_ARG_WITH(tcmalloc, 
    13551360AS_HELP_STRING(--with-tcmalloc, [use tcmalloc memory allocation library]),
    13561361[ tcmalloc=yes ], [ tcmalloc=no ])
    13571362
    1358 if test x$tcmalloc = xyes ; then
     1363if test "x$tcmalloc" = "xyes"; then
    13591364   LDFLAGS="-ltcmalloc $LDFLAGS"
    13601365fi
    13611366
    13621367using_custom_malloc=no
    1363 if test x$enable_openbsd_malloc = xyes ; then
     1368if test "x$enable_openbsd_malloc" = "xyes"; then
    13641369   using_custom_malloc=yes
    13651370fi
    1366 if test x$tcmalloc = xyes ; then
     1371if test "x$tcmalloc" = "xyes"; then
    13671372   using_custom_malloc=yes
    13681373fi
    1369 if test $using_custom_malloc = no ; then
     1374if test "$using_custom_malloc" = "no"; then
    13701375   AC_CHECK_FUNCS(mallinfo)
    13711376fi
    13721377
    int main(int c, char **v) { char **t = environ; }])], 
    14831488  tor_cv_have_environ_declared=yes,
    14841489  tor_cv_have_environ_declared=no))
    14851490
    1486 if test "$tor_cv_have_func_macro" = 'yes'; then
     1491if test "$tor_cv_have_func_macro" = "yes"; then
    14871492  AC_DEFINE(HAVE_MACRO__func__, 1, [Defined if the compiler supports __func__])
    14881493fi
    14891494
    1490 if test "$tor_cv_have_FUNC_macro" = 'yes'; then
     1495if test "$tor_cv_have_FUNC_macro" = "yes"; then
    14911496  AC_DEFINE(HAVE_MACRO__FUNC__, 1, [Defined if the compiler supports __FUNC__])
    14921497fi
    14931498
    1494 if test "$tor_cv_have_FUNCTION_macro" = 'yes'; then
     1499if test "$tor_cv_have_FUNCTION_macro" = "yes"; then
    14951500  AC_DEFINE(HAVE_MACRO__FUNCTION__, 1,
    14961501           [Defined if the compiler supports __FUNCTION__])
    14971502fi
    14981503
    1499 if test "$tor_cv_have_environ_declared" = 'yes'; then
     1504if test "$tor_cv_have_environ_declared" = "yes"; then
    15001505  AC_DEFINE(HAVE_EXTERN_ENVIRON_DECLARED, 1,
    15011506           [Defined if we have extern char **environ already declared])
    15021507fi
    AC_SUBST(BINDIR) 
    15321537LOCALSTATEDIR=`eval echo $localstatedir`
    15331538AC_SUBST(LOCALSTATEDIR)
    15341539
    1535 if test "$bwin32" = true; then
     1540if test "$bwin32" = "true"; then
    15361541  # Test if the linker supports the --nxcompat and --dynamicbase options
    15371542  # for Windows
    15381543  save_LDFLAGS="$LDFLAGS"
    fi 
    15481553
    15491554# Set CFLAGS _after_ all the above checks, since our warnings are stricter
    15501555# than autoconf's macros like.
    1551 if test "$GCC" = yes; then
     1556if test "$GCC" = "yes"; then
    15521557  # Disable GCC's strict aliasing checks.  They are an hours-to-debug
    15531558  # accident waiting to happen.
    15541559  CFLAGS="$CFLAGS -Wall -fno-strict-aliasing"
    fi 
    15621567# OS X Lion started deprecating the system openssl. Let's just disable
    15631568# all deprecation warnings on OS X. Also, to potentially make the binary
    15641569# a little smaller, let's enable dead_strip.
    1565 case "$host_os" in
     1570case $host_os in
    15661571
    15671572 darwin*)
    15681573    CFLAGS="$CFLAGS -Wno-deprecated-declarations"
    esac 
    15711576
    15721577# Add some more warnings which we use in development but not in the
    15731578# released versions.  (Some relevant gcc versions can't handle these.)
    1574 if test x$enable_gcc_warnings = xyes || test x$enable_gcc_warnings_advisory = xyes; then
     1579if test "x$enable_gcc_warnings" = "xyes" ||
     1580test "x$enable_gcc_warnings_advisory" = "xyes"; then
    15751581
    15761582  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
    15771583#if !defined(__GNUC__) || (__GNUC__ < 4)
    if test x$enable_gcc_warnings = xyes || test x$enable_gcc_warnings_advisory = xy 
    16151621  CFLAGS="$CFLAGS -Wwrite-strings -Wmissing-declarations -Wredundant-decls"
    16161622  CFLAGS="$CFLAGS -Wnested-externs -Wbad-function-cast -Wswitch-enum"
    16171623
    1618   if test x$enable_gcc_warnings = xyes; then
     1624  if test "x$enable_gcc_warnings" = "xyes"; then
    16191625    CFLAGS="$CFLAGS -Werror"
    16201626  fi
    16211627
    16221628  # Disabled, so we can use mallinfo(): -Waggregate-return
    16231629
    1624   if test x$have_gcc4 = xyes ; then
     1630  if test "x$have_gcc4" = "xyes"; then
    16251631    # These warnings break gcc 3.3.5 and work on gcc 4.0.2
    16261632    CFLAGS="$CFLAGS -Winit-self -Wmissing-field-initializers -Wold-style-definition"
    16271633  fi
    16281634
    1629   if test x$have_gcc42 = xyes ; then
     1635  if test "x$have_gcc42" = "xyes"; then
    16301636    # These warnings break gcc 4.0.2 and work on gcc 4.2
    16311637    # XXXX020 See if any of these work with earlier versions.
    16321638    CFLAGS="$CFLAGS -Waddress -Wmissing-noreturn -Wstrict-overflow=1"
    if test x$enable_gcc_warnings = xyes || test x$enable_gcc_warnings_advisory = xy 
    16341640    # We used to use -Wstrict-overflow=5, but that breaks us heavily under 4.3.
    16351641  fi
    16361642
    1637   if test x$have_gcc42 = xyes && test x$have_clang = xno; then
     1643  if test "x$have_gcc42" = "xyes" && test "x$have_clang" = "xno"; then
    16381644    # These warnings break gcc 4.0.2 and clang, but work on gcc 4.2
    16391645    CFLAGS="$CFLAGS -Wnormalized=id -Woverride-init"
    16401646  fi
    16411647
    1642   if test x$have_gcc43 = xyes ; then
     1648  if test "x$have_gcc43" = "xyes"; then
    16431649    # These warnings break gcc 4.2 and work on gcc 4.3
    16441650    # XXXX020 See if any of these work with earlier versions.
    16451651    CFLAGS="$CFLAGS -Wextra -Warray-bounds"
    16461652  fi
    16471653
    1648   if test x$have_gcc46 = xyes ; then
     1654  if test "x$have_gcc46" = "xyes"; then
    16491655    # This warning was added in gcc 4.3, but it appears to generate
    16501656    # spurious warnings in gcc 4.4.  I don't know if it works in 4.5.
    16511657    CFLAGS="$CFLAGS -Wlogical-op"
    16521658  fi
    16531659
    1654   if test x$have_shorten64_flag = xyes ; then
     1660  if test "x$have_shorten64_flag" = "xyes"; then
    16551661    CFLAGS="$CFLAGS -Wshorten-64-to-32"
    16561662  fi
    16571663
    if test x$enable_gcc_warnings = xyes || test x$enable_gcc_warnings_advisory = xy 
    16611667# CFLAGS="$CFLAGS -Winline"
    16621668fi
    16631669
    1664 if test "$enable_coverage" = yes && test "$have_clang" = "no"; then
    1665    case "$host_os" in
     1670if test "$enable_coverage" = "yes" && test "$have_clang" = "no"; then
     1671   case $host_os in
    16661672    darwin*)
    16671673      AC_MSG_WARN([Tried to enable coverage on OSX without using the clang compiler. This might not work! If coverage fails, use CC=clang when configuring with --enable-profiling.])
    16681674   esac
    AC_CONFIG_FILES([ 
    16841690        scripts/maint/updateVersions.pl
    16851691])
    16861692
    1687 if test x$asciidoc = xtrue && test "$ASCIIDOC" = "none" ; then
     1693if test "x$asciidoc" = "xtrue" && test "$ASCIIDOC" = "none"; then
    16881694  regular_mans="doc/tor doc/tor-gencert doc/tor-resolve doc/torify"
    16891695  for file in $regular_mans ; do
    16901696    if ! [[ -f "$srcdir/$file.1.in" ]] || ! [[ -f "$srcdir/$file.html.in" ]] ; then