build/autoconf/mozheader.m4

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 dnl This Source Code Form is subject to the terms of the Mozilla Public
     2 dnl License, v. 2.0. If a copy of the MPL was not distributed with this
     3 dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
     5 dnl MOZ_CHECK_HEADER(HEADER-FILE, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, INCLUDES]]])
     6 AC_DEFUN([MOZ_CHECK_HEADER],
     7 [ dnl Do the transliteration at runtime so arg 1 can be a shell variable.
     8   ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
     9   AC_MSG_CHECKING([for $1])
    10   AC_CACHE_VAL(ac_cv_header_$ac_safe,
    11  [ AC_TRY_COMPILE([$4
    12 #include <$1>], ,
    13                   eval "ac_cv_header_$ac_safe=yes",
    14                   eval "ac_cv_header_$ac_safe=no") ])
    15   if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
    16     AC_MSG_RESULT(yes)
    17     ifelse([$2], , :, [$2])
    18   else
    19     AC_MSG_RESULT(no)
    20     ifelse([$3], , , [$3])
    21   fi
    22 ])
    24 dnl MOZ_CHECK_HEADERS(HEADER-FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, INCLUDES]]])
    25 AC_DEFUN([MOZ_CHECK_HEADERS],
    26 [ for ac_hdr in $1
    27   do
    28     MOZ_CHECK_HEADER($ac_hdr,
    29                      [ ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
    30                        AC_DEFINE_UNQUOTED($ac_tr_hdr) $2], $3, [$4])
    31   done
    32 ])

mercurial