1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
|
$NetBSD: patch-aa,v 1.14 2013/08/07 12:17:54 ryoon Exp $
--- configure.in.orig 2013-07-30 00:57:59.000000000 +0000
+++ configure.in
@@ -1411,6 +1411,17 @@ if test "$GNU_CC"; then
CFLAGS=$_SAVE_CFLAGS
AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSE4_1)
+ # Check for -msse4.1 on $CC
+ AC_MSG_CHECKING([if toolchain supports -msse4.1 option])
+ HAVE_TOOLCHAIN_SUPPORT_MSSE4_1=
+ _SAVE_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -msse4.1"
+ AC_TRY_COMPILE([asm ("pmulld %xmm6,%xmm0");],,AC_MSG_RESULT([yes])
+ [HAVE_TOOLCHAIN_SUPPORT_MSSE4_1=1],
+ AC_MSG_RESULT([no]))
+ CFLAGS=$_SAVE_CFLAGS
+ AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSE4_1)
+
# Turn on GNU-specific warnings:
# -Wall - turn on a lot of warnings
# -Wpointer-arith - good to have
@@ -2088,6 +2099,9 @@ ia64*-hpux*)
if test -z "$MC"; then
MC=mc.exe
fi
+ if test "$LIBRUNPATH"; then
+ DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
+ fi
;;
*-mingw*)
DSO_CFLAGS=
@@ -2887,6 +2901,7 @@ EOF
#pragma GCC visibility push(hidden)
#pragma GCC visibility push(default)
#include <string.h>
+#include <iterator>
#pragma GCC visibility pop
__attribute__ ((visibility ("default"))) void Func() {
@@ -2895,7 +2910,7 @@ __attribute__ ((visibility ("default")))
}
EOF
ac_cv_have_visibility_builtin_bug=no
- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
+ if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
ac_cv_have_visibility_builtin_bug=yes
else
if test `grep -c "@PLT" conftest.S` = 0; then
@@ -3057,6 +3072,9 @@ dnl ====================================
case $target in
*-hpux11.*)
;;
+*-dragonfly*)
+ AC_CHECK_LIB(c, gethostbyname_r)
+ ;;
*)
AC_CHECK_LIB(c_r, gethostbyname_r)
;;
@@ -3358,6 +3376,9 @@ AC_CACHE_CHECK(
#ifdef linux
#define _BSD_SOURCE 1
#endif
+ #ifdef __NetBSD__
+ #error use of global _res variable in threaded programs is not portable
+ #endif
#include <resolv.h>
],
[int foo = res_ninit(&_res);],
@@ -4012,6 +4033,14 @@ if test -n "$YASM"; then
_YASM_BUILD=` echo ${YASM_VERSION} | $AWK -F\. '{ print $4 }'`
fi
+if test -n "${LIBXUL_SDK_DIR}"; then
+ AC_MSG_WARN([pkgsrc: LIBXUL_SDK_DIR is set; assuming we want nss and nspr from xulrunner.])
+ NSPR_CFLAGS="-I${prefix}/include/xulrunner/unstable `pkg-config --cflags mozilla-nspr`"
+ NSPR_LIBS="`pkg-config --libs mozilla-nspr`"
+ NSS_CFLAGS="`pkg-config --cflags mozilla-nss`"
+ NSS_LIBS="`pkg-config --libs mozilla-nss`"
+fi
+
if test -z "$SKIP_LIBRARY_CHECKS"; then
dnl system JPEG support
dnl ========================================================
@@ -4039,11 +4068,7 @@ if test "$MOZ_NATIVE_JPEG" = 1; then
#include <jpeglib.h> ],
[ #if JPEG_LIB_VERSION < $MOZJPEG
#error "Insufficient JPEG library version ($MOZJPEG required)."
- #endif
- #ifndef JCS_EXTENSIONS
- #error "libjpeg-turbo JCS_EXTENSIONS required"
- #endif
- ],
+ #endif ],
MOZ_NATIVE_JPEG=1,
AC_MSG_ERROR([Insufficient JPEG library version for --with-system-jpeg]))
fi
@@ -5270,7 +5295,7 @@ dnl --enable-webrtc to override. Can di
dnl the master list above.
if test -n "$MOZ_WEBRTC"; then
case "$target" in
- *-linux*|*-mingw*|*-darwin*|*-android*|*-linuxandroid*)
+ *-linux*|*-mingw*|*-darwin*|*-android*|*-linuxandroid*|*-dragonfly*|*-freebsd*|*-netbsd*|*-openbsd*)
dnl Leave enabled
;;
*)
@@ -5323,6 +5348,9 @@ if test -n "$MOZ_WEBRTC"; then
MOZ_VP8_ENCODER=1
MOZ_VP8_ERROR_CONCEALMENT=1
+ dnl with libv4l2 we can support more cameras
+ PKG_CHECK_MODULES(MOZ_LIBV4L2, libv4l2)
+
dnl enable once Signaling lands
MOZ_WEBRTC_SIGNALING=1
AC_DEFINE(MOZ_WEBRTC_SIGNALING)
@@ -5349,15 +5377,18 @@ AC_SUBST(MOZ_SRTP)
dnl Use integers over floats for audio on B2G and Android, because audio
dnl backends for those platforms don't support floats.
-if test "$OS_TARGET" = "Android"; then
+case "$target" in
+*-android*|*-linuxandroid*|*-dragonfly*|*-freebsd*|*-netbsd*|*-openbsd*)
MOZ_SAMPLE_TYPE_S16=1
AC_DEFINE(MOZ_SAMPLE_TYPE_S16)
AC_SUBST(MOZ_SAMPLE_TYPE_S16)
-else
+;;
+*)
MOZ_SAMPLE_TYPE_FLOAT32=1
AC_DEFINE(MOZ_SAMPLE_TYPE_FLOAT32)
AC_SUBST(MOZ_SAMPLE_TYPE_FLOAT32)
-fi
+;;
+esac
dnl ========================================================
dnl = Disable Speech API code
@@ -5707,7 +5738,7 @@ MOZ_ALSA=)
if test -n "$MOZ_ALSA"; then
AC_DEFINE(MOZ_CUBEB)
- PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
+ PKG_CHECK_MODULES(MOZ_ALSA, alsa, MOZ_ALSA=1,
[echo "$MOZ_ALSA_PKG_ERRORS"
AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])])
fi
@@ -6410,7 +6441,7 @@ MOZ_ARG_ENABLE_BOOL(gtest,
MOZ_ENABLE_GTEST= )
if test -n "$MOZ_ENABLE_GTEST"; then
- if test "${OS_TARGET}" = "WINNT" -o "${OS_TARGET}" = "Darwin" -o "${OS_TARGET}" = "Linux" -o "${OS_TARGET}" = "Android"; then
+ if test "${OS_TARGET}" = "WINNT" -o "${OS_TARGET}" = "Darwin" -o "${OS_TARGET}" = "Linux" -o "${OS_TARGET}" = "Android" -o "${OS_TARGET}" = "NetBSD"; then
MOZ_ENABLE_GTEST=1
GTEST_HAS_RTTI=0
AC_DEFINE(MOZ_ENABLE_GTEST)
@@ -8330,7 +8361,7 @@ if test "$MOZ_ENABLE_SKIA"; then
AC_DEFINE(GR_DLL)
fi
- if test "${CPU_ARCH}" != "ppc" -a "${CPU_ARCH}" != "ppc64"; then
+ if test "${CPU_ARCH}" != "ppc" -a "${CPU_ARCH}" != "ppc64" -a "${CPU_ARCH}" != "sparc"; then
MOZ_ENABLE_SKIA_GPU=1
AC_DEFINE(USE_SKIA_GPU)
AC_SUBST(MOZ_ENABLE_SKIA_GPU)
@@ -8411,16 +8442,26 @@ MOZ_ARG_DISABLE_BOOL(necko-wifi,
NECKO_WIFI=,
NECKO_WIFI=1)
-if test "$OS_ARCH" = "OS2"; then
- dnl OS/2 implementation of Necko-WiFi support will be added in bug 506566
- NECKO_WIFI=
-fi
-if test "$NECKO_WIFI" -a \
- "$OS_ARCH" != "Linux" -a \
- "$OS_ARCH" != "Darwin" -a \
- "$OS_ARCH" != "SunOS" -a \
- "$OS_ARCH" != "WINNT"; then
- AC_MSG_ERROR([Necko WiFi scanning not supported on your platform, use --disable-necko-wifi])
+if test "$NECKO_WIFI"; then
+ case "$OS_TARGET" in
+ Android)
+ ;;
+ Darwin)
+ ;;
+ SunOS)
+ ;;
+ WINNT)
+ ;;
+ OS2)
+ dnl OS/2 implementation of Necko-WiFi support will be added in bug 506566
+ NECKO_WIFI=
+ ;;
+ *)
+ if test -z "$MOZ_ENABLE_DBUS"; then
+ AC_MSG_ERROR([Necko WiFi scanning needs DBus on your platform, remove --disable-dbus or use --disable-necko-wifi])
+ fi
+ ;;
+ esac
fi
if test "$NECKO_WIFI"; then
@@ -9114,6 +9155,27 @@ if test -z "$HAVE_TOOLCHAIN_SUPPORT_MSSE
EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D yuv_disable_asm=1"
fi
+# Keep libcubeb and audio_device backends in sync
+if test -n "$MOZ_ALSA"; then
+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_alsa_audio=1"
+else
+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_alsa_audio=0"
+fi
+if test -n "$MOZ_PULSEAUDIO"; then
+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_pulse_audio=1"
+else
+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D include_pulse_audio=0"
+fi
+
+# Don't try to compile sse4.1 code if toolchain doesn't support
+if test -z "$HAVE_TOOLCHAIN_SUPPORT_MSSE4_1"; then
+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D yuv_disable_asm=1"
+fi
+
+if test -n "$MOZ_LIBV4L2_LIBS"; then
+ EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D use_libv4l2=1"
+fi
+
if test -n "$MOZ_WEBRTC"; then
AC_MSG_RESULT("generating WebRTC Makefiles...")
|