add libdlna package
[openwrt/svn-archive/archive.git] / libs / libdlna / patches / 100-configure_fix.patch
1 diff -ruN libdlna-0.2.3.orig/configure libdlna-0.2.3/configure
2 --- libdlna-0.2.3.orig/configure 2007-11-26 21:47:43.000000000 +0100
3 +++ libdlna-0.2.3/configure 2008-04-19 21:59:15.000000000 +0200
4 @@ -177,6 +177,19 @@
5 check_cmd $cc $LDFLAGS "$@" -o $TMPE $TMPO $extralibs
6 }
7
8 +check_host_cc(){
9 + log check_host_cc "$@"
10 + cat >$TMPC
11 + log_file $TMPC
12 + check_cmd $host_cc $host_cflags "$@" -c -o $TMPO $TMPC
13 +}
14 +
15 +check_host_ld(){
16 + log check_host_ld "$@"
17 + check_host_cc || return
18 + check_cmd $host_cc $host_cflags $host_ldflags "$@" -o $TMPE $TMPO
19 +}
20 +
21 check_exec(){
22 check_ld "$@" && { enabled cross_compile || $TMPE >>$logfile 2>&1; }
23 }
24 @@ -311,6 +324,7 @@
25 static="yes"
26 shared="yes"
27 cc="gcc"
28 +host_cc="gcc"
29 ar="ar"
30 ranlib="ranlib"
31 make="make"
32 @@ -454,6 +468,11 @@
33 fi
34 [ -n "$MAKE" ] && make="$MAKE"
35
36 +[ -n "$HOST_CC" ] && host_cc="$HOST_CC"
37 +[ -n "$HOST_CFLAGS" ] && host_cflags="$HOST_CFLAGS"
38 +[ -n "$HOST_LDFLAGS" ] && host_ldflags="$HOST_LDFLAGS"
39 +host_cflags="-Isrc $host_cflags"
40 +
41 #################################################
42 # create logging file
43 #################################################
44 @@ -610,15 +629,14 @@
45 fi
46
47 echolog "Checking for libavformat ..."
48 -check_lib ffmpeg/avformat.h av_register_all -lavformat || die "Error, can't find libavformat !"
49 +check_lib libavformat/avformat.h av_register_all -lavformat -lavcodec -lavutil || die "Error, can't find libavformat !"
50 echolog "Checking for libavcodec ..."
51 -check_lib ffmpeg/avcodec.h avcodec_register_all -lavcodec || die "Error, can't find libavcodec !"
52 +check_lib libavcodec/avcodec.h avcodec_register_all -lavcodec || die "Error, can't find libavcodec !"
53
54 #################################################
55 # version
56 #################################################
57 -temp_cflags "-Isrc"
58 -check_ld <<EOF
59 +check_host_ld <<EOF
60 #include <stdio.h>
61 #include <dlna.h>
62 int main(){
63 @@ -628,7 +646,6 @@
64 }
65 EOF
66 VERSION=`$TMPE`
67 -restore_flags
68
69
70 #################################################
71 diff -ruN libdlna-0.2.3.orig/src/av_mpeg4_part10.c libdlna-0.2.3/src/av_mpeg4_part10.c
72 --- libdlna-0.2.3.orig/src/av_mpeg4_part10.c 2007-11-26 21:47:43.000000000 +0100
73 +++ libdlna-0.2.3/src/av_mpeg4_part10.c 2008-04-19 21:48:45.000000000 +0200
74 @@ -26,7 +26,7 @@
75 #include <sys/stat.h>
76 #include <fcntl.h>
77
78 -#include <ffmpeg/avcodec.h>
79 +#include <libavcodec/avcodec.h>
80
81 #include "dlna_internals.h"
82 #include "profiles.h"
83 diff -ruN libdlna-0.2.3.orig/src/av_mpeg4_part2.c libdlna-0.2.3/src/av_mpeg4_part2.c
84 --- libdlna-0.2.3.orig/src/av_mpeg4_part2.c 2007-11-26 21:47:43.000000000 +0100
85 +++ libdlna-0.2.3/src/av_mpeg4_part2.c 2008-04-19 21:48:45.000000000 +0200
86 @@ -26,7 +26,7 @@
87 #include <sys/stat.h>
88 #include <fcntl.h>
89
90 -#include <ffmpeg/avcodec.h>
91 +#include <libavcodec/avcodec.h>
92
93 #include "dlna_internals.h"
94 #include "profiles.h"
95 diff -ruN libdlna-0.2.3.orig/src/containers.c libdlna-0.2.3/src/containers.c
96 --- libdlna-0.2.3.orig/src/containers.c 2007-11-26 21:47:43.000000000 +0100
97 +++ libdlna-0.2.3/src/containers.c 2008-04-19 21:48:45.000000000 +0200
98 @@ -4,7 +4,7 @@
99 #include <sys/stat.h>
100 #include <fcntl.h>
101
102 -#include <ffmpeg/avformat.h>
103 +#include <libavformat/avformat.h>
104
105 #include "containers.h"
106 #include "profiles.h"
107 diff -ruN libdlna-0.2.3.orig/src/profiles.h libdlna-0.2.3/src/profiles.h
108 --- libdlna-0.2.3.orig/src/profiles.h 2007-11-26 21:47:43.000000000 +0100
109 +++ libdlna-0.2.3/src/profiles.h 2008-04-19 21:48:45.000000000 +0200
110 @@ -22,8 +22,8 @@
111 #ifndef _PROFILES_H_
112 #define _PROFILES_H_
113
114 -#include <ffmpeg/avcodec.h>
115 -#include <ffmpeg/avformat.h>
116 +#include <libavcodec/avcodec.h>
117 +#include <libavformat/avformat.h>
118
119 #include "dlna_internals.h"
120 #include "containers.h"