]> git.sesse.net Git - vlc/blob - debian/patches/20_configure.dpatch
* debian/rules:
[vlc] / debian / patches / 20_configure.dpatch
1 #! /bin/sh -e
2 ## 20_configure.dpatch by  <sam+deb@zoy.org>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: No description.
6
7 if [ $# -lt 1 ]; then
8     echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
9     exit 1
10 fi
11
12 [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
13 patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
14
15 case "$1" in
16     -patch) patch -p1 ${patch_opts} < $0;;
17     -unpatch) patch -R -p1 ${patch_opts} < $0;;
18     *)
19         echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
20         exit 1;;
21 esac
22
23 exit 0
24
25 @DPATCH@
26 diff -urNad /home/sam/debian/official/vlc/debian/vlc-0.7.2.final/configure vlc-0.7.2.final/configure
27 --- /home/sam/debian/official/vlc/debian/vlc-0.7.2.final/configure      2004-05-21 14:09:58.000000000 +0200
28 +++ vlc-0.7.2.final/configure   2004-07-29 17:15:04.000000000 +0200
29 @@ -17850,7 +17850,8 @@
30    ac_status=$?
31    echo "$as_me:$LINENO: \$? = $ac_status" >&5
32    (exit $ac_status); }; }; then
33 -  ac_cv_c_altivec="-maltivec -mabi=altivec"
34 +  ac_cv_c_altivec=""
35 +           ac_cv_c_altivec_abi="-maltivec -mabi=altivec"
36  else
37    echo "$as_me: failed program was:" >&5
38  sed 's/^/| /' conftest.$ac_ext >&5
39 @@ -17919,12 +17920,9 @@
40  #define CAN_COMPILE_C_ALTIVEC 1
41  _ACEOF
42  
43 -
44 -  for element in vlc idctaltivec motionaltivec memcpyaltivec deinterlace i420_yuy2_altivec; do
45 -    eval "CFLAGS_${element}="'"$'"{CFLAGS_${element}} ${ac_cv_c_altivec}"'"'
46 -    am_modules_with_cflags="${am_modules_with_cflags} ${element}"
47 -  done
48 -
49 +  VLC_ADD_CFLAGS(vlc,${ac_cv_c_altivec})
50 +  VLC_ADD_CFLAGS(idctaltivec motionaltivec memcpyaltivec deinterlace,${ac_cv_c_altivec})
51 +  VLC_ADD_CFLAGS(i420_yuy2_altivec,${ac_cv_c_altivec} ${ac_cv_c_altivec_abi})
52    ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
53  fi
54  
55 @@ -25153,13 +25151,13 @@
56  #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
57  _ACEOF
58  
59 -      echo "$as_me:$LINENO: checking for dts_free in -ldts" >&5
60 -echo $ECHO_N "checking for dts_free in -ldts... $ECHO_C" >&6
61 -if test "${ac_cv_lib_dts_dts_free+set}" = set; then
62 +      echo "$as_me:$LINENO: checking for dts_free in -ldts_pic" >&5
63 +echo $ECHO_N "checking for dts_free in -ldts_pic... $ECHO_C" >&6
64 +if test "${ac_cv_lib_dts_pic_dts_free+set}" = set; then
65    echo $ECHO_N "(cached) $ECHO_C" >&6
66  else
67    ac_check_lib_save_LIBS=$LIBS
68 -LIBS="-ldts  $LIBS"
69 +LIBS="-ldts_pic  $LIBS"
70  cat >conftest.$ac_ext <<_ACEOF
71  /* confdefs.h.  */
72  _ACEOF
73 @@ -25203,27 +25201,27 @@
74    ac_status=$?
75    echo "$as_me:$LINENO: \$? = $ac_status" >&5
76    (exit $ac_status); }; }; then
77 -  ac_cv_lib_dts_dts_free=yes
78 +  ac_cv_lib_dts_pic_dts_free=yes
79  else
80    echo "$as_me: failed program was:" >&5
81  sed 's/^/| /' conftest.$ac_ext >&5
82  
83 -ac_cv_lib_dts_dts_free=no
84 +ac_cv_lib_dts_pic_dts_free=no
85  fi
86  rm -f conftest.err conftest.$ac_objext \
87        conftest$ac_exeext conftest.$ac_ext
88  LIBS=$ac_check_lib_save_LIBS
89  fi
90 -echo "$as_me:$LINENO: result: $ac_cv_lib_dts_dts_free" >&5
91 -echo "${ECHO_T}$ac_cv_lib_dts_dts_free" >&6
92 -if test $ac_cv_lib_dts_dts_free = yes; then
93 +echo "$as_me:$LINENO: result: $ac_cv_lib_dts_pic_dts_free" >&5
94 +echo "${ECHO_T}$ac_cv_lib_dts_pic_dts_free" >&6
95 +if test $ac_cv_lib_dts_pic_dts_free = yes; then
96  
97  
98    PLUGINS="${PLUGINS} dtstofloat32"
99  
100  
101    for element in dtstofloat32; do
102 -    eval "LDFLAGS_${element}="'"'"-ldts "'$'"{LDFLAGS_${element}} "'"'
103 +    eval "LDFLAGS_${element}="'"'"-ldts_pic "'$'"{LDFLAGS_${element}} "'"'
104      am_modules_with_ldflags="${am_modules_with_ldflags} ${element}"
105    done
106  
107 diff -urNad /home/sam/debian/official/vlc/debian/vlc-0.7.2.final/configure.ac vlc-0.7.2.final/configure.ac
108 --- /home/sam/debian/official/vlc/debian/vlc-0.7.2.final/configure.ac   2004-05-21 13:54:55.000000000 +0200
109 +++ vlc-0.7.2.final/configure.ac        2004-07-29 17:14:51.000000000 +0200
110 @@ -1011,7 +1011,8 @@
111                          #include <altivec.h>
112                          #endif],
113            [vec_ld(0, (unsigned char *)0);],
114 -          [ac_cv_c_altivec="-maltivec -mabi=altivec"],
115 +          [ac_cv_c_altivec=""
116 +           ac_cv_c_altivec_abi="-maltivec -mabi=altivec"],
117            [# Linux/PPC test (old GCC versions)
118             CFLAGS="${CFLAGS_save} ${CFLAGS_idctaltivec} -fvec"
119             AC_TRY_COMPILE([#ifdef HAVE_ALTIVEC_H
120 @@ -1025,7 +1026,9 @@
121       CFLAGS="${CFLAGS_save}"])
122  if test "${ac_cv_c_altivec}" != "no"; then
123    AC_DEFINE(CAN_COMPILE_C_ALTIVEC, 1, Define if your compiler groks C AltiVec extensions.)
124 -  AX_ADD_CFLAGS([vlc idctaltivec motionaltivec memcpyaltivec deinterlace i420_yuy2_altivec],[${ac_cv_c_altivec}])
125 +  VLC_ADD_CFLAGS([vlc],[${ac_cv_c_altivec}])
126 +  VLC_ADD_CFLAGS([idctaltivec motionaltivec memcpyaltivec deinterlace],[${ac_cv_c_altivec}])
127 +  VLC_ADD_CFLAGS([i420_yuy2_altivec],[${ac_cv_c_altivec} ${ac_cv_c_altivec_abi}])
128    ACCEL_MODULES="${ACCEL_MODULES} ${ALTIVEC_MODULES}"
129  fi
130  
131 @@ -2178,9 +2181,9 @@
132    else
133      LDFLAGS="${LDFLAGS_save} ${LDFLAGS_dtstofloat32}"
134      AC_CHECK_HEADERS(dts.h, [
135 -      AC_CHECK_LIB(dts, dts_free, [
136 +      AC_CHECK_LIB(dts_pic, dts_free, [
137          AX_ADD_PLUGINS([dtstofloat32])
138 -        AX_ADD_LDFLAGS([dtstofloat32],[-ldts])
139 +        AX_ADD_LDFLAGS([dtstofloat32],[-ldts_pic])
140        ],[
141          if test "${enable_dts}" = "yes"; then
142            AC_MSG_ERROR([Could not find libdts on your system: you may get it from http://www.videolan.org/dtsdec.html])