summaryrefslogtreecommitdiff
path: root/net/vls/files/patch-configure
blob: ca3e09c5d08a5bc52514d0fdc936828707b41512 (plain) (blame)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
--- configure.in.orig	Fri Nov 28 22:54:25 2003
+++ configure.in	Sat Dec 27 17:35:05 2003
@@ -309,8 +309,17 @@
 dnl
 AC_ARG_ENABLE(dvd,
 AC_HELP_STRING(--disable-dvd, DVD support (default enabled)))
+AC_ARG_WITH(dvdread,
+AC_HELP_STRING(--with-dvdread=[PATH], path to libdvdread))
 if test x$enable_dvd != xno
 then
+  if test "x$with_dvdread" != x
+  then
+    test_CFLAGS="-I${with_dvdread}/include"
+  fi
+  save_CPPFLAGS=$CPPFLAGS
+  save_CFLAGS=$CFLAGS
+  CPPFLAGS="$save_CPPFLAGS $test_CFLAGS $DVBINPUT_CCFLAGS"
   AC_CHECK_HEADER(dvdread/dvd_reader.h,
                   HAVE_LIBDVDREAD=1, HAVE_LIBDVDREAD=0)
   if test ${HAVE_LIBDVDREAD} = 1
@@ -318,16 +327,17 @@
     if test ${SYS} != mingw32
     then
       PLUGINS="${PLUGINS} dvdreader"
-      DVDREADER_LIB="${DVDREADER_LIB} -ldvdread"
+      DVDREADER_LIB="${DVDREADER_LIB} -ldvdread -L${with_dvdread}/lib"
     else
       BUILTINS="${BUILTINS} dvdreader"
-      DVDREADER_LIB="${DVDREADER_LIB} -ldvdread -ldvdcss"
+      DVDREADER_LIB="${DVDREADER_LIB} -ldvdread -ldvdcss -L${with_dvdread}/lib"
     fi
   else
     AC_MSG_ERROR([The development package for libdvdread is not installed.
 Please install it and try again. Alternatively you can also configure with
 --disable-dvd.])
   fi
+  CPPFLAGS="$save_CPPFLAGS"
 fi
 
 dnl
@@ -373,11 +383,11 @@
     CPPFLAGS="$save_CPPFLAGS"
 
     dnl Test for the lib existence
-    if test -f "${with_libdvb}/libdvb.a"
+    if test -f "${with_libdvb}/lib/libdvb.a"
     then
       DVBINPUT_LIB="${DVBINPUT_LIB} -ldvb"
-      DVBINPUT_DCFLAGS="${DVBINPUT_DCFLAGS} -I${with_libdvb}"
-      DVBINPUT_LCFLAGS="${DVBINPUT_LCFLAGS} -L${with_libdvb}"
+      DVBINPUT_DCFLAGS="${DVBINPUT_DCFLAGS} -I${with_libdvb}/include"
+      DVBINPUT_LCFLAGS="${DVBINPUT_LCFLAGS} -L${with_libdvb}/lib"
       PLUGINS="${PLUGINS} dvbinput dvbreader"
     else
       AC_MSG_ERROR([cannot find ${with_libdvb}/libdvb.a, make sure you compiled libdvb in ${with_libdvb}])
@@ -440,7 +450,7 @@
     save_CPPFLAGS=$CPPFLAGS
     CPPFLAGS="$save_CPPFLAGS $test_CFLAGS"
     AC_CHECK_HEADERS([dvbpsi/dvbpsi.h],[
-      VLS_LIB="${VLS_LIB} -ldvbpsi"
+      VLS_LIB="${VLS_LIB} -ldvbpsi -L${with_dvbpsi}/lib"
       CCFLAGS="${CCFLAGS} ${test_CFLAGS}"
       DCFLAGS="${DCFLAGS} ${test_CFLAGS}"
       ],[
--- configure.orig	Fri Nov 28 22:54:25 2003
+++ configure	Sat Dec 27 17:36:08 2003
@@ -846,6 +846,7 @@
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-dvb=PATH         path to DVB driver header files
+  --with-dvdread=PATH     path to libdvdread
   --with-libdvb=PATH      path to libdvb
   --with-dvbpsi=PATH      libdvbpsi headers and libraries
   --with-dvbpsi-tree=PATH libdvbpsi tree for static linking
@@ -6522,8 +6523,21 @@
   enableval="$enable_dvd"
 
 fi;
+
+# Check whether --with-dvdread or --without-dvdread was given.
+if test "${with_dvdread+set}" = set; then
+  withval="$with_dvdread"
+
+fi;
 if test x$enable_dvd != xno
 then
+  if test "x$with_dvdread" != x
+  then
+    test_CFLAGS="-I${with_dvdread}/include"
+  fi
+  save_CPPFLAGS=$CPPFLAGS
+  save_CFLAGS=$CFLAGS
+  CPPFLAGS="$save_CPPFLAGS $test_CFLAGS $DVBINPUT_CCFLAGS"
   if test "${ac_cv_header_dvdread_dvd_reader_h+set}" = set; then
   echo "$as_me:$LINENO: checking for dvdread/dvd_reader.h" >&5
 echo $ECHO_N "checking for dvdread/dvd_reader.h... $ECHO_C" >&6
@@ -6637,10 +6651,10 @@
     if test ${SYS} != mingw32
     then
       PLUGINS="${PLUGINS} dvdreader"
-      DVDREADER_LIB="${DVDREADER_LIB} -ldvdread"
+      DVDREADER_LIB="${DVDREADER_LIB} -ldvdread -L${with_dvdread}/lib"
     else
       BUILTINS="${BUILTINS} dvdreader"
-      DVDREADER_LIB="${DVDREADER_LIB} -ldvdread -ldvdcss"
+      DVDREADER_LIB="${DVDREADER_LIB} -ldvdread -ldvdcss -L${with_dvdread}/lib"
     fi
   else
     { { echo "$as_me:$LINENO: error: The development package for libdvdread is not installed.
@@ -6651,6 +6665,7 @@
 --disable-dvd." >&2;}
    { (exit 1); exit 1; }; }
   fi
+  CPPFLAGS="$save_CPPFLAGS"
 fi
 
 # Check whether --enable-dvb or --disable-dvb was given.
@@ -6935,11 +6950,11 @@
 
     CPPFLAGS="$save_CPPFLAGS"
 
-        if test -f "${with_libdvb}/libdvb.a"
+        if test -f "${with_libdvb}/lib/libdvb.a"
     then
       DVBINPUT_LIB="${DVBINPUT_LIB} -ldvb"
-      DVBINPUT_DCFLAGS="${DVBINPUT_DCFLAGS} -I${with_libdvb}"
-      DVBINPUT_LCFLAGS="${DVBINPUT_LCFLAGS} -L${with_libdvb}"
+      DVBINPUT_DCFLAGS="${DVBINPUT_DCFLAGS} -I${with_libdvb}/include"
+      DVBINPUT_LCFLAGS="${DVBINPUT_LCFLAGS} -L${with_libdvb}/lib"
       PLUGINS="${PLUGINS} dvbinput dvbreader"
     else
       { { echo "$as_me:$LINENO: error: cannot find ${with_libdvb}/libdvb.a, make sure you compiled libdvb in ${with_libdvb}" >&5
@@ -7236,7 +7251,7 @@
 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
-      VLS_LIB="${VLS_LIB} -ldvbpsi"
+      VLS_LIB="${VLS_LIB} -ldvbpsi -L${with_dvbpsi}/lib"
       CCFLAGS="${CCFLAGS} ${test_CFLAGS}"
       DCFLAGS="${DCFLAGS} ${test_CFLAGS}"