summaryrefslogtreecommitdiff
path: root/multimedia/ffmpeg3/patches/patch-configure
blob: d9ee72f0ee3edb6541ba2671a597a53f4df40fa8 (plain)
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
$NetBSD: patch-configure,v 1.8 2022/08/23 10:17:49 wiz Exp $

Enable PIC and section_data_rel_ro on NetBSD, even on i386,
to avoid text relocations.

Allow newer SDL2 versions.

--- configure.orig	2022-05-14 00:19:12.000000000 +0000
+++ configure
@@ -4941,6 +4941,8 @@ case $target_os in
         ;;
     netbsd)
         disable symver
+        enable pic
+        enable section_data_rel_ro
         oss_indev_extralibs="-lossaudio"
         oss_outdev_extralibs="-lossaudio"
         enabled gcc || check_ldflags -Wl,-zmuldefs
@@ -5361,10 +5363,13 @@ check_cc <<EOF && enable attribute_may_a
 union { int x; } __attribute__((may_alias)) x;
 EOF
 
-check_cc <<EOF || die "endian test failed"
-unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
+check_exec <<EOF || enable bigendian
+int main()
+{
+ long one = 1;
+ return !(*((char *)(&one)));
+}
 EOF
-od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
 
 check_cc <<EOF && enable const_nan
 #include <math.h>
@@ -6100,7 +6105,7 @@ fi
 
 if enabled sdl2; then
     SDL2_CONFIG="${cross_prefix}sdl2-config"
-    if check_pkg_config sdl2 "sdl2 >= 2.0.1 sdl2 < 2.1.0" SDL_events.h SDL_PollEvent; then
+    if check_pkg_config sdl2 "sdl2 >= 2.0.1 " SDL_events.h SDL_PollEvent; then
         check_func SDL_Init $sdl2_extralibs $sdl2_cflags ||
             disable sdl2
     elif "${SDL2_CONFIG}" --version > /dev/null 2>&1; then