Sat, 03 Jan 2015 20:18:00 +0100
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.
michael@0 | 1 | AC_PREREQ([2.64]) |
michael@0 | 2 | AC_INIT([harfbuzz], |
michael@0 | 3 | [0.7.0], |
michael@0 | 4 | [http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz], |
michael@0 | 5 | [harfbuzz], |
michael@0 | 6 | [http://harfbuzz.org/]) |
michael@0 | 7 | |
michael@0 | 8 | AC_CONFIG_SRCDIR([harfbuzz.pc.in]) |
michael@0 | 9 | AC_CONFIG_HEADERS([config.h]) |
michael@0 | 10 | |
michael@0 | 11 | AM_INIT_AUTOMAKE([1.11.1 gnu dist-bzip2 no-dist-gzip -Wall no-define]) |
michael@0 | 12 | AM_SILENT_RULES([yes]) |
michael@0 | 13 | |
michael@0 | 14 | # Check for programs |
michael@0 | 15 | AC_PROG_CC |
michael@0 | 16 | AM_PROG_CC_C_O |
michael@0 | 17 | AC_PROG_CXX |
michael@0 | 18 | |
michael@0 | 19 | # Initialize libtool |
michael@0 | 20 | LT_PREREQ([2.2]) |
michael@0 | 21 | LT_INIT([disable-static]) |
michael@0 | 22 | |
michael@0 | 23 | # Version |
michael@0 | 24 | m4_define(hb_version_triplet,m4_split(AC_PACKAGE_VERSION,[[.]])) |
michael@0 | 25 | m4_define(hb_version_major,m4_argn(1,hb_version_triplet)) |
michael@0 | 26 | m4_define(hb_version_minor,m4_argn(2,hb_version_triplet)) |
michael@0 | 27 | m4_define(hb_version_micro,m4_argn(3,hb_version_triplet)) |
michael@0 | 28 | HB_VERSION_MAJOR=hb_version_major |
michael@0 | 29 | HB_VERSION_MINOR=hb_version_minor |
michael@0 | 30 | HB_VERSION_MICRO=hb_version_micro |
michael@0 | 31 | HB_VERSION=AC_PACKAGE_VERSION |
michael@0 | 32 | AC_SUBST(HB_VERSION_MAJOR) |
michael@0 | 33 | AC_SUBST(HB_VERSION_MINOR) |
michael@0 | 34 | AC_SUBST(HB_VERSION_MICRO) |
michael@0 | 35 | AC_SUBST(HB_VERSION) |
michael@0 | 36 | |
michael@0 | 37 | # Libtool version |
michael@0 | 38 | m4_define([hb_version_int], |
michael@0 | 39 | m4_eval(hb_version_major*10000 + hb_version_minor*100 + hb_version_micro)) |
michael@0 | 40 | m4_if(m4_eval(hb_version_minor % 2), [1], |
michael@0 | 41 | dnl for unstable releases |
michael@0 | 42 | [m4_define([hb_libtool_revision], 0)], |
michael@0 | 43 | dnl for stable releases |
michael@0 | 44 | [m4_define([hb_libtool_revision], hb_version_micro)]) |
michael@0 | 45 | m4_define([hb_libtool_age], |
michael@0 | 46 | m4_eval(hb_version_int - hb_libtool_revision)) |
michael@0 | 47 | m4_define([hb_libtool_current], |
michael@0 | 48 | m4_eval(hb_version_major + hb_libtool_age)) |
michael@0 | 49 | HB_LIBTOOL_VERSION_INFO=hb_libtool_current:hb_libtool_revision:hb_libtool_age |
michael@0 | 50 | AC_SUBST(HB_LIBTOOL_VERSION_INFO) |
michael@0 | 51 | |
michael@0 | 52 | dnl GTK_DOC_CHECK([1.15],[--flavour no-tmpl]) |
michael@0 | 53 | |
michael@0 | 54 | # Functions and headers |
michael@0 | 55 | AC_CHECK_FUNCS(mprotect sysconf getpagesize mmap _setmode) |
michael@0 | 56 | AC_CHECK_HEADERS(unistd.h sys/mman.h io.h) |
michael@0 | 57 | |
michael@0 | 58 | # Compiler flags |
michael@0 | 59 | AC_CANONICAL_HOST |
michael@0 | 60 | if test "x$GCC" = "xyes"; then |
michael@0 | 61 | |
michael@0 | 62 | # Make symbols link locally |
michael@0 | 63 | LDFLAGS="$LDFLAGS -Bsymbolic-functions" |
michael@0 | 64 | |
michael@0 | 65 | # Make sure we don't link to libstdc++ |
michael@0 | 66 | CXXFLAGS="$CXXFLAGS -fno-rtti -fno-exceptions" |
michael@0 | 67 | |
michael@0 | 68 | case "$host" in |
michael@0 | 69 | arm-*-*) |
michael@0 | 70 | # Request byte alignment on arm |
michael@0 | 71 | CXXFLAGS="$CXXFLAGS -mstructure-size-boundary=8" |
michael@0 | 72 | ;; |
michael@0 | 73 | esac |
michael@0 | 74 | fi |
michael@0 | 75 | |
michael@0 | 76 | dnl ========================================================================== |
michael@0 | 77 | |
michael@0 | 78 | PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, have_glib=true, have_glib=false) |
michael@0 | 79 | if $have_glib; then |
michael@0 | 80 | AC_DEFINE(HAVE_GLIB, 1, [Have glib2 library]) |
michael@0 | 81 | fi |
michael@0 | 82 | AM_CONDITIONAL(HAVE_GLIB, $have_glib) |
michael@0 | 83 | |
michael@0 | 84 | PKG_CHECK_MODULES(GTHREAD, gthread-2.0, have_gthread=true, have_gthread=false) |
michael@0 | 85 | if $have_gthread; then |
michael@0 | 86 | AC_DEFINE(HAVE_GTHREAD, 1, [Have gthread2 library]) |
michael@0 | 87 | fi |
michael@0 | 88 | AM_CONDITIONAL(HAVE_GTHREAD, $have_gthread) |
michael@0 | 89 | |
michael@0 | 90 | PKG_CHECK_MODULES(GOBJECT, gobject-2.0 glib-2.0 >= 2.16, have_gobject=true, have_gobject=false) |
michael@0 | 91 | if $have_gobject; then |
michael@0 | 92 | AC_DEFINE(HAVE_GOBJECT, 1, [Have gobject2 library]) |
michael@0 | 93 | GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` |
michael@0 | 94 | AC_SUBST(GLIB_MKENUMS) |
michael@0 | 95 | fi |
michael@0 | 96 | AM_CONDITIONAL(HAVE_GOBJECT, $have_gobject) |
michael@0 | 97 | |
michael@0 | 98 | dnl ========================================================================== |
michael@0 | 99 | |
michael@0 | 100 | PKG_CHECK_MODULES(CAIRO, cairo >= 1.8.0, have_cairo=true, have_cairo=false) |
michael@0 | 101 | if $have_cairo; then |
michael@0 | 102 | AC_DEFINE(HAVE_CAIRO, 1, [Have cairo graphics library]) |
michael@0 | 103 | fi |
michael@0 | 104 | AM_CONDITIONAL(HAVE_CAIRO, $have_cairo) |
michael@0 | 105 | |
michael@0 | 106 | PKG_CHECK_MODULES(CAIRO_FT, cairo-ft, have_cairo_ft=true, have_cairo_ft=false) |
michael@0 | 107 | if $have_cairo_ft; then |
michael@0 | 108 | AC_DEFINE(HAVE_CAIRO_FT, 1, [Have cairo-ft support in cairo graphics library]) |
michael@0 | 109 | fi |
michael@0 | 110 | AM_CONDITIONAL(HAVE_CAIRO_FT, $have_cairo_ft) |
michael@0 | 111 | |
michael@0 | 112 | dnl ========================================================================== |
michael@0 | 113 | |
michael@0 | 114 | PKG_CHECK_MODULES(ICU, icu, have_icu=true, [ |
michael@0 | 115 | have_icu=true |
michael@0 | 116 | AC_CHECK_HEADERS(unicode/uchar.h,, have_icu=false) |
michael@0 | 117 | AC_MSG_CHECKING([for libicuuc]) |
michael@0 | 118 | LIBS_old=$LIBS |
michael@0 | 119 | LIBS="$LIBS -licuuc" |
michael@0 | 120 | AC_TRY_LINK([#include <unicode/uchar.h>], |
michael@0 | 121 | [u_getIntPropertyValue (0, (UProperty)0);], |
michael@0 | 122 | AC_MSG_RESULT(yes), |
michael@0 | 123 | AC_MSG_RESULT(no);have_icu=false) |
michael@0 | 124 | LIBS=$LIBS_old |
michael@0 | 125 | if $have_icu; then |
michael@0 | 126 | ICU_CFLAGS=-D_REENTRANT |
michael@0 | 127 | ICU_LIBS="-licuuc" |
michael@0 | 128 | AC_SUBST(ICU_CFLAGS) |
michael@0 | 129 | AC_SUBST(ICU_LIBS) |
michael@0 | 130 | fi |
michael@0 | 131 | ]) |
michael@0 | 132 | if $have_icu; then |
michael@0 | 133 | AC_DEFINE(HAVE_ICU, 1, [Have ICU library]) |
michael@0 | 134 | fi |
michael@0 | 135 | AM_CONDITIONAL(HAVE_ICU, $have_icu) |
michael@0 | 136 | |
michael@0 | 137 | dnl ========================================================================== |
michael@0 | 138 | |
michael@0 | 139 | PKG_CHECK_MODULES(GRAPHITE, graphite2, have_graphite=true, have_graphite=false) |
michael@0 | 140 | if $have_graphite; then |
michael@0 | 141 | AC_DEFINE(HAVE_GRAPHITE, 1, [Have Graphite library]) |
michael@0 | 142 | fi |
michael@0 | 143 | AM_CONDITIONAL(HAVE_GRAPHITE, $have_graphite) |
michael@0 | 144 | |
michael@0 | 145 | dnl ========================================================================== |
michael@0 | 146 | |
michael@0 | 147 | PKG_CHECK_MODULES(FREETYPE, freetype2 >= 2.3.8, have_freetype=true, have_freetype=false) |
michael@0 | 148 | if $have_freetype; then |
michael@0 | 149 | AC_DEFINE(HAVE_FREETYPE, 1, [Have FreeType 2 library]) |
michael@0 | 150 | _save_libs="$LIBS" |
michael@0 | 151 | _save_cflags="$CFLAGS" |
michael@0 | 152 | LIBS="$LIBS $FREETYPE_LIBS" |
michael@0 | 153 | CFLAGS="$CFLAGS $FREETYPE_CFLAGS" |
michael@0 | 154 | AC_CHECK_FUNCS(FT_Face_GetCharVariantIndex) |
michael@0 | 155 | LIBS="$_save_libs" |
michael@0 | 156 | CFLAGS="$_save_cflags" |
michael@0 | 157 | fi |
michael@0 | 158 | AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype) |
michael@0 | 159 | |
michael@0 | 160 | dnl =========================================================================== |
michael@0 | 161 | |
michael@0 | 162 | have_ot=true; |
michael@0 | 163 | if $have_ot; then |
michael@0 | 164 | AC_DEFINE(HAVE_OT, 1, [Have native OpenType Layout backend]) |
michael@0 | 165 | fi |
michael@0 | 166 | AM_CONDITIONAL(HAVE_OT, $have_ot) |
michael@0 | 167 | |
michael@0 | 168 | dnl =========================================================================== |
michael@0 | 169 | |
michael@0 | 170 | AC_CHECK_HEADERS(usp10.h windows.h, have_uniscribe=true, have_uniscribe=false) |
michael@0 | 171 | if $have_uniscribe; then |
michael@0 | 172 | UNISCRIBE_CFLAGS= |
michael@0 | 173 | UNISCRIBE_LIBS="-lusp10 -lgdi32" |
michael@0 | 174 | AC_SUBST(UNISCRIBE_CFLAGS) |
michael@0 | 175 | AC_SUBST(UNISCRIBE_LIBS) |
michael@0 | 176 | AC_DEFINE(HAVE_UNISCRIBE, 1, [Have Uniscribe backend]) |
michael@0 | 177 | fi |
michael@0 | 178 | AM_CONDITIONAL(HAVE_UNISCRIBE, $have_uniscribe) |
michael@0 | 179 | |
michael@0 | 180 | AC_CONFIG_FILES([ |
michael@0 | 181 | Makefile |
michael@0 | 182 | harfbuzz.pc |
michael@0 | 183 | src/Makefile |
michael@0 | 184 | src/hb-version.h |
michael@0 | 185 | util/Makefile |
michael@0 | 186 | test/Makefile |
michael@0 | 187 | ]) |
michael@0 | 188 | |
michael@0 | 189 | AC_OUTPUT |