surpport seeking the recorded video
[vuplus_openembedded] / recipes / mythtv / mythtv-0.21 / configure.patch
1 --- /tmp/configure      2008-06-30 08:40:35.000000000 +0200
2 +++ mythtv/configure    2008-07-23 09:51:41.000000000 +0200
3 @@ -475,12 +475,13 @@
4  }
5  
6  check_cmd(){
7 -    log "$@"
8 +       echo "Checking $@" 
9 +       log "$@"
10      "$@" >>$logfile 2>&1
11  }
12  
13  check_cc(){
14 -    log check_cc "$@"
15 +       log check_cc "$@"
16      cat >$TMPC
17      log_file $TMPC
18      check_cmd $cc $CFLAGS $ECFLAGS $OPTFLAGS "$@" -c -o $TMPO $TMPC
19 @@ -1115,11 +1116,11 @@
20  fi
21  
22  # machine
23 -arch=`uname -m`
24 +disabled cross_compile && arch=`uname -m`
25  arch_raw="$arch"
26  cpu="generic"
27  cpu_override="no"
28 -processor=`uname -p 2>/dev/null`
29 +disabled cross_compile && processor=`uname -p 2>/dev/null`
30  processor_flags=""
31  tune="generic"
32  
33 @@ -1183,7 +1184,7 @@
34  lamemp3="yes"
35  lirc="yes"
36  mac_bundle="no"
37 -opengl="yes"
38 +opengl="no"
39  v4l="yes"
40  x11="yes"
41  x11_include_path="/usr/X11R6/include"
42 @@ -1212,7 +1213,7 @@
43  # build settings
44  SHFLAGS='-shared -Wl,-soname,$@'
45  VHOOKSHFLAGS='$(SHFLAGS)'
46 -LDLATEFLAGS='-Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil'
47 +#LDLATEFLAGS='-Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil'
48  FFSERVERLDFLAGS=-Wl,-E
49  LDCONFIG="ldconfig"
50  LIBPREF="lib"
51 @@ -1707,7 +1708,7 @@
52  
53  has_library()
54  {
55 -    if test -f /etc/ld.so.conf ; then
56 +       if test -f /etc/ld.so.conf && disabled cross_compile ; then
57          LIBPATHS=`cat /etc/ld.so.conf | grep -v "#" | grep -v "include"`
58      else
59          LIBPATHS=''
60 @@ -1718,7 +1719,7 @@
61      LIBPATHS="$LIBPATHS `echo $DYLD_LIBRARY_PATH | sed s/':'/' '/g` "
62  
63      # recurse down just one level, should be enough in most cases
64 -    if test -f /etc/ld.so.conf ; then
65 +    if test -f /etc/ld.so.conf && disabled cross_compile ; then
66          INCL=`cat /etc/ld.so.conf | grep -v "#" | grep  "^include"`
67          SRCH=`echo "$INCL" | sed '{ s/^include \//\//; s/^include /\/etc\//}'`
68          for x in $SRCH ; do
69 @@ -1727,9 +1728,9 @@
70          done
71      fi
72  
73 -    LIBPATHS="`echo $LIBPATHS /$libdir_name /usr/$libdir_name /usr/local/$libdir_name /usr/X11R6/$libdir_name | sed s/'\/ '/' '/g` "
74 +    enabled cross_compile || LIBPATHS="`echo $LIBPATHS /$libdir_name /usr/$libdir_name /usr/local/$libdir_name /usr/X11R6/$libdir_name | sed s/'\/ '/' '/g` "
75  
76 -    HAS_IT="no"
77 +    HAS_IT="yes"
78      for LIBPATH in $LIBPATHS ; do
79          if test x`ls $LIBPATH/$1* 2> /dev/null | head -n 1` != x"" ; then
80              echo "$1  IS at $LIBPATH"
81 @@ -1745,17 +1746,18 @@
82  
83  has_header()
84  {
85 -    HPATHS="/usr/local/include /usr/include /usr/include/g++-v3 /usr/X11R6/include"
86 +    enabled cross_compile || HPATHS="/usr/local/include /usr/include /usr/include/g++-v3 /usr/X11R6/include"
87      INCL=`echo $DYLD_LIBRARY_PATH $LD_LIBRARY_PATH | sed s/':'/' '/g`
88      HPATHS="$HPATHS "$(echo $INCL | sed "s/$libdir_name/include/g")
89  
90 -    HAS_IT="no"
91 +    HAS_IT="yes"
92      for HPATH in $HPATHS ; do
93          if test x`ls $HPATH/$1* 2> /dev/null | head -n 1` != x"" ; then
94              HAS_IT="yes"
95          fi
96      done
97 -    expr $HAS_IT : "yes" > /dev/null
98 +    echo "$1: $HAS_IT"
99 +       expr $HAS_IT : "yes" > /dev/null
100  }
101  
102  append CCONFIG "$compile_type"
103 @@ -1861,13 +1863,15 @@
104  if test x"$cmov" = x"default"; then
105      disable cmov
106      if enabled cpu_override; then
107 -        is_x86_cmov_cpu "$cpu" && enable cmov
108 +        disabled cross_compile && is_x86_cmov_cpu "$cpu" && enable cmov
109          disabled cmov || is_x86_slow_cmov_cpu "$cpu" || enable fast_cmov
110      elif expr "$processor_flags" : ".*cmov" > /dev/null ; then
111 -        enable cmov
112 +        disabled cross_compile && enable cmov
113      fi
114  fi
115  
116 +enabled cross_compile && disable cmov
117 +
118  # use different default ARCHFLAGS for CPU missing cmov (Via C3 ...)
119  if test x"$arch" = x"x86_32" && disabled cmov && disabled cpu_override; then
120      ARCHFLAGS="-march=i586"
121 @@ -2239,7 +2243,7 @@
122  EOF
123  
124  if $cc $CFLAGS $ECFLAGS -o $TMPE $TMPC 2>/dev/null ; then
125 -$TMPE && cpuclipspositive="yes"
126 +enabled cross_compile || $TMPE && cpuclipspositive="yes"
127  fi
128  
129  # test negative wrap
130 @@ -2254,7 +2258,7 @@
131  EOF
132  
133  if $cc $CFLAGS $ECFLAGS -o $TMPE $TMPC 2>/dev/null ; then
134 -$TMPE && cpuclipsnegative="yes"
135 +enabled cross_compile || $TMPE && cpuclipsnegative="yes"
136  fi
137  
138  # test for distcc
139 @@ -2607,33 +2611,9 @@
140  check_ldflags -Wl,--warn-common
141  check_ldflags $LDLATEFLAGS
142  
143 -# GCC version
144 -cat > $TMPC << EOF
145 -int main(int argc, char **argv)
146 -{
147 -    int ret = 0;
148 -    if (argc == 1)
149 -    {
150 -        #if defined(__GNUC__)
151 -            ret = __GNUC__;
152 -        #endif
153 -    }
154 -    else
155 -    {
156 -        #if defined(__GNUC_MINOR__)
157 -            ret = __GNUC_MINOR__;
158 -        #endif
159 -    }
160 -    return ret;
161 -}
162 -EOF
163 -
164 -if $cc $CFLAGS $TMPC -o $TMPE ; then
165 -    $TMPE
166 -    GCC_MAJOR=$?
167 -    $TMPE "minor"
168 -    GCC_MINOR=$?
169 -fi
170 +gcc_version=$($cc -v 2>&1 | grep version | cut -s -d' ' -f 3) 
171 +GCC_MAJOR=$(echo ${gcc_version} | cut -s -d'.' -f1) 
172 +GCC_MINOR=$(echo ${gcc_version} | cut -s -d'.' -f2)
173  
174  if enabled symbol_visibility; then
175      if test x"$GCC_MAJOR" = x"4" ; then
176 @@ -2727,6 +2707,7 @@
177  
178  check_header GL/gl.h
179  has_library libGL || has_library libopengl32 || disable opengl
180 +enabled cross_compile && disable opengl
181  
182  VENDOR_XVMC_LIBS=""
183  check_header X11/extensions/XvMClib.h