| @@ -1,57 +1,58 @@ | | | @@ -1,57 +1,58 @@ |
1 | $NetBSD: patch-configure,v 1.14 2011/11/07 10:43:35 drochner Exp $ | | 1 | $NetBSD: patch-configure,v 1.15 2011/11/29 17:58:17 jmmv Exp $ |
2 | | | 2 | |
3 | --- configure.orig 2011-11-04 21:30:00.000000000 +0000 | | 3 | --- configure.orig 2011-11-21 19:49:30.000000000 +0000 |
4 | +++ configure | | 4 | +++ configure |
5 | @@ -2412,6 +2412,10 @@ case $target_os in | | 5 | @@ -2412,6 +2412,11 @@ case $target_os in |
6 | ;; | | 6 | ;; |
7 | netbsd) | | 7 | netbsd) |
8 | disable symver | | 8 | disable symver |
9 | + if test "${subarch}" != "x86_32"; then | | 9 | + # NetBSD/macppc *really* needs PIC enabled. ffmpeg has repeatedly |
10 | + LIBOBJFLAGS='$(PIC)' | | 10 | + # broken time and time again because PIC support has been removed |
11 | + SHFLAGS='-shared' | | 11 | + # from architectures that need it. So, if you touch this, please |
12 | + fi | | 12 | + # be careful and make sure that your changes work. |
| | | 13 | + test "${subarch}" != "x86_32" && enable pic |
13 | oss_indev_extralibs="-lossaudio" | | 14 | oss_indev_extralibs="-lossaudio" |
14 | oss_outdev_extralibs="-lossaudio" | | 15 | oss_outdev_extralibs="-lossaudio" |
15 | ;; | | 16 | ;; |
16 | @@ -2637,10 +2641,13 @@ check_cc <<EOF && enable attribute_may_a | | 17 | @@ -2637,10 +2642,13 @@ check_cc <<EOF && enable attribute_may_a |
17 | union { int x; } __attribute__((may_alias)) x; | | 18 | union { int x; } __attribute__((may_alias)) x; |
18 | EOF | | 19 | EOF |
19 | | | 20 | |
20 | -check_cc <<EOF || die "endian test failed" | | 21 | -check_cc <<EOF || die "endian test failed" |
21 | -unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E'; | | 22 | -unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E'; |
22 | +check_exec <<EOF || enable bigendian | | 23 | +check_exec <<EOF || enable bigendian |
23 | +int main() | | 24 | +int main() |
24 | +{ | | 25 | +{ |
25 | + long one = 1; | | 26 | + long one = 1; |
26 | + return !(*((char *)(&one))); | | 27 | + return !(*((char *)(&one))); |
27 | +} | | 28 | +} |
28 | EOF | | 29 | EOF |
29 | -od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian | | 30 | -od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian |
30 | | | 31 | |
31 | if enabled alpha; then | | 32 | if enabled alpha; then |
32 | | | 33 | |
33 | @@ -2974,7 +2981,7 @@ else | | 34 | @@ -2974,7 +2982,7 @@ else |
34 | fi | | 35 | fi |
35 | enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs | | 36 | enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs |
36 | | | 37 | |
37 | -texi2html -version > /dev/null 2>&1 && enable texi2html || disable texi2html | | 38 | -texi2html -version > /dev/null 2>&1 && enable texi2html || disable texi2html |
38 | +which texi2html > /dev/null 2>&1 && enable texi2html || disable texi2html | | 39 | +which texi2html > /dev/null 2>&1 && enable texi2html || disable texi2html |
39 | | | 40 | |
40 | check_header linux/fb.h | | 41 | check_header linux/fb.h |
41 | check_header linux/videodev.h | | 42 | check_header linux/videodev.h |
42 | @@ -3060,6 +3067,7 @@ check_ldflags -Wl,--warn-common | | 43 | @@ -3060,6 +3068,7 @@ check_ldflags -Wl,--warn-common |
43 | check_ldflags -Wl,-rpath-link,libpostproc -Wl,-rpath-link,libswscale -Wl,-rpath-link,libavfilter -Wl,-rpath-link,libavdevice -Wl,-rpath-link,libavformat -Wl,-rpath-link,libavcodec -Wl,-rpath-link,libavutil | | 44 | check_ldflags -Wl,-rpath-link,libpostproc -Wl,-rpath-link,libswscale -Wl,-rpath-link,libavfilter -Wl,-rpath-link,libavdevice -Wl,-rpath-link,libavformat -Wl,-rpath-link,libavcodec -Wl,-rpath-link,libavutil |
44 | test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic | | 45 | test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic |
45 | | | 46 | |
46 | +if false; then | | 47 | +if false; then |
47 | echo "X{};" > $TMPV | | 48 | echo "X{};" > $TMPV |
48 | if test_ldflags -Wl,--version-script,$TMPV; then | | 49 | if test_ldflags -Wl,--version-script,$TMPV; then |
49 | append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver' | | 50 | append SHFLAGS '-Wl,--version-script,\$(SUBDIR)lib\$(NAME).ver' |
50 | @@ -3072,6 +3080,7 @@ __asm__(".symver ff_foo,av_foo@VERSION") | | 51 | @@ -3072,6 +3081,7 @@ __asm__(".symver ff_foo,av_foo@VERSION") |
51 | void ff_foo(void) {} | | 52 | void ff_foo(void) {} |
52 | EOF | | 53 | EOF |
53 | fi | | 54 | fi |
54 | +fi | | 55 | +fi |
55 | | | 56 | |
56 | if enabled small; then | | 57 | if enabled small; then |
57 | add_cflags $size_cflags | | 58 | add_cflags $size_cflags |