1 # HG changeset patch |
|
2 # Parent e85dde0eabf214916c69924aa49192ab412e00a1 |
|
3 |
|
4 diff --git a/build/autoconf/config.status.m4 b/build/autoconf/config.status.m4 |
|
5 --- a/build/autoconf/config.status.m4 |
|
6 +++ b/build/autoconf/config.status.m4 |
|
7 @@ -40,16 +40,31 @@ define([AC_SUBST_LIST], |
|
8 [ifdef([AC_SUBST_SET_$1], [m4_fatal([Cannot use AC_SUBST_SET and AC_SUBST_LIST on the same variable ($1)])], |
|
9 [ifdef([AC_SUBST_LIST_$1], , |
|
10 [define([AC_SUBST_LIST_$1], )dnl |
|
11 AC_DIVERT_PUSH(MOZ_DIVERSION_SUBST)dnl |
|
12 (''' $1 ''', list(r''' [$]$1 '''.split())) |
|
13 AC_DIVERT_POP()dnl |
|
14 ])])])]) |
|
15 |
|
16 +dnl Like AC_SUBST, but makes the value available as a string of quoted strings |
|
17 +dnl in python, with values got from the value of the environment variable, |
|
18 +dnl split on whitespaces. The value is suitable for embedding into a .toml |
|
19 +dnl list. |
|
20 +define([AC_SUBST_TOML_LIST], |
|
21 +[ifdef([AC_SUBST_$1], [m4_fatal([Cannot use AC_SUBST and AC_SUBST_LIST on the same variable ($1)])], |
|
22 +[ifdef([AC_SUBST_SET_$1], [m4_fatal([Cannot use AC_SUBST_SET and AC_SUBST_LIST on the same variable ($1)])], |
|
23 +[ifdef([AC_SUBST_LIST_$1], , |
|
24 +[define([AC_SUBST_LIST_$1], )dnl |
|
25 +AC_DIVERT_PUSH(MOZ_DIVERSION_SUBST)dnl |
|
26 + (''' $1 ''', r''' %s ''' % str(', '.join("'%s'" % s for s in r''' [$]$1 '''.split()))) |
|
27 +AC_DIVERT_POP()dnl |
|
28 +])])])]) |
|
29 + |
|
30 + |
|
31 dnl Ignore AC_SUBSTs for variables we don't have use for but that autoconf |
|
32 dnl itself exports. |
|
33 define([AC_SUBST_CFLAGS], ) |
|
34 define([AC_SUBST_CPPFLAGS], ) |
|
35 define([AC_SUBST_CXXFLAGS], ) |
|
36 define([AC_SUBST_FFLAGS], ) |
|
37 define([AC_SUBST_DEFS], ) |
|
38 define([AC_SUBST_LDFLAGS], ) |
|
39 diff --git a/build/moz.configure/toolchain.configure b/build/moz.configure/toolchain.configure |
|
40 --- a/build/moz.configure/toolchain.configure |
|
41 +++ b/build/moz.configure/toolchain.configure |
|
42 @@ -897,25 +897,24 @@ def check_have_64_bit(have_64_bit, compi |
|
43 configure_error('The target compiler does not agree with configure ' |
|
44 'about the target bitness.') |
|
45 |
|
46 option(env='BINDGEN_CFLAGS', |
|
47 nargs=1, |
|
48 help='Options bindgen should pass to the C/C++ parser') |
|
49 |
|
50 @depends('BINDGEN_CFLAGS') |
|
51 -@checking('bindgen cflags', lambda s: s if s and s.strip() else 'no') |
|
52 +@checking('bindgen cflags', lambda s: s if s and s[0].strip() else 'no') |
|
53 def bindgen_cflags(value): |
|
54 if value and len(value): |
|
55 # Reformat the env value for substitution into a toml list. |
|
56 flags = value[0].split() |
|
57 - return ', '.join('"' + flag + '"' for flag in flags) |
|
58 - return '' |
|
59 + return flags |
|
60 |
|
61 -set_config('BINDGEN_CFLAGS', bindgen_cflags) |
|
62 +add_old_configure_assignment('_BINDGEN_CFLAGS', bindgen_cflags) |
|
63 |
|
64 @depends(c_compiler) |
|
65 def default_debug_flags(compiler_info): |
|
66 # Debug info is ON by default. |
|
67 if compiler_info.type in ('msvc', 'clang-cl'): |
|
68 return '-Zi' |
|
69 return '-g' |
|
70 |
|
71 diff --git a/layout/style/bindgen.toml.in b/layout/style/bindgen.toml.in |
|
72 --- a/layout/style/bindgen.toml.in |
|
73 +++ b/layout/style/bindgen.toml.in |
|
74 @@ -1,4 +1,4 @@ |
|
75 [build] |
|
76 args = [ |
|
77 - @BINDGEN_CFLAGS@ |
|
78 + @BINDGEN_SYSTEM_FLAGS@ |
|
79 ] |
|
80 diff --git a/old-configure.in b/old-configure.in |
|
81 --- a/old-configure.in |
|
82 +++ b/old-configure.in |
|
83 @@ -4453,16 +4453,19 @@ android) |
|
84 esac |
|
85 |
|
86 AC_SUBST(MOZ_TREE_CAIRO) |
|
87 AC_SUBST_LIST(MOZ_CAIRO_CFLAGS) |
|
88 AC_SUBST_LIST(MOZ_CAIRO_LIBS) |
|
89 AC_SUBST_LIST(MOZ_CAIRO_OSLIBS) |
|
90 AC_SUBST(MOZ_TREE_PIXMAN) |
|
91 |
|
92 +BINDGEN_SYSTEM_FLAGS="$_BINDGEN_CFLAGS $NSPR_CFLAGS $NSS_CFLAGS $MOZ_PIXMAN_CFLAGS $MOZ_CAIRO_CFLAGS" |
|
93 +AC_SUBST_TOML_LIST(BINDGEN_SYSTEM_FLAGS) |
|
94 + |
|
95 dnl ======================================================== |
|
96 dnl disable xul |
|
97 dnl ======================================================== |
|
98 MOZ_ARG_DISABLE_BOOL(xul, |
|
99 [ --disable-xul Disable XUL], |
|
100 MOZ_XUL= ) |
|
101 if test "$MOZ_XUL"; then |
|
102 AC_DEFINE(MOZ_XUL) |
|