libdvdread detection

parent 008eee56
......@@ -50,7 +50,7 @@ INPUT_LCFLAGS= @INPUT_LCFLAGS@
# Common options
#
HAVE_DVDREAD=0
HAVE_DVDREAD=@HAVE_DVDREAD@
CCFLAGS+=-DBUGGY_VLC
......
......@@ -2642,15 +2642,56 @@ else
fi
done
for ac_hdr in dvdread/dvd_reader.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2650: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2655 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
eval "ac_cv_header_$ac_safe=yes"
else
echo "$ac_err" >&5
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
eval "ac_cv_header_$ac_safe=no"
fi
rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
HAVE_DVDREAD=1
else
echo "$ac_t""no" 1>&6
HAVE_DVDREAD=0
fi
done
echo $ac_n "checking whether setsockopt accepts SO_BINDTODEVICE""... $ac_c" 1>&6
echo "configure:2648: checking whether setsockopt accepts SO_BINDTODEVICE" >&5
echo "configure:2689: checking whether setsockopt accepts SO_BINDTODEVICE" >&5
if eval "test \"`echo '$''{'ac_cv_c_so_bindtodevice'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS} -Wall -Werror"
cat > conftest.$ac_ext <<EOF
#line 2654 "configure"
#line 2695 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
......@@ -2658,7 +2699,7 @@ int main() {
int optname(void) { return SO_BINDTODEVICE; }
; return 0; }
EOF
if { (eval echo configure:2662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_so_bindtodevice=yes
else
......@@ -2679,20 +2720,20 @@ EOF
fi
echo $ac_n "checking if \$CC accepts -shared""... $ac_c" 1>&6
echo "configure:2683: checking if \$CC accepts -shared" >&5
echo "configure:2724: checking if \$CC accepts -shared" >&5
if eval "test \"`echo '$''{'ac_cv_ld_plugins'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS} -shared"
cat > conftest.$ac_ext <<EOF
#line 2689 "configure"
#line 2730 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:2696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_ld_plugins=yes
else
......@@ -2710,20 +2751,20 @@ if test x"$ac_cv_ld_plugins" != x"no"; then
fi
echo $ac_n "checking if \$CC accepts -rdynamic""... $ac_c" 1>&6
echo "configure:2714: checking if \$CC accepts -rdynamic" >&5
echo "configure:2755: checking if \$CC accepts -rdynamic" >&5
if eval "test \"`echo '$''{'ac_cv_ld_rdynamic'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
CFLAGS="${save_CFLAGS} -rdynamic"
cat > conftest.$ac_ext <<EOF
#line 2720 "configure"
#line 2761 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
if { (eval echo configure:2727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_ld_rdynamic=yes
else
......@@ -2745,12 +2786,12 @@ LDFLAGS="${save_LDFLAGS}"
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:2749: checking for working const" >&5
echo "configure:2790: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2754 "configure"
#line 2795 "configure"
#include "confdefs.h"
int main() {
......@@ -2799,7 +2840,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if { (eval echo configure:2803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2844: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
......@@ -2820,12 +2861,12 @@ EOF
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:2824: checking for ANSI C header files" >&5
echo "configure:2865: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2829 "configure"
#line 2870 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
......@@ -2833,7 +2874,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
......@@ -2850,7 +2891,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 2854 "configure"
#line 2895 "configure"
#include "confdefs.h"
#include <string.h>
EOF
......@@ -2868,7 +2909,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 2872 "configure"
#line 2913 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
......@@ -2889,7 +2930,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 2893 "configure"
#line 2934 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
......@@ -2900,7 +2941,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:2904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
......@@ -2924,12 +2965,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
echo "configure:2928: checking for size_t" >&5
echo "configure:2969: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2933 "configure"
#line 2974 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
......@@ -2957,12 +2998,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:2961: checking whether time.h and sys/time.h may both be included" >&5
echo "configure:3002: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2966 "configure"
#line 3007 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
......@@ -2971,7 +3012,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:2975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:3016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
......@@ -3038,6 +3079,8 @@ fi
trap '' 1 2 15
cat > confcache <<\EOF
# This file is a shell script that caches the results of configure
......@@ -3203,6 +3246,7 @@ s%@LCFLAGS@%$LCFLAGS%g
s%@INPUT_LCFLAGS@%$INPUT_LCFLAGS%g
s%@VLS_LCFLAGS@%$VLS_LCFLAGS%g
s%@VLS_LIB@%$VLS_LIB%g
s%@HAVE_DVDREAD@%$HAVE_DVDREAD%g
CEOF
EOF
......@@ -3435,5 +3479,9 @@ vls configuration
-----------------
vls version : ${VLS_VERSION}
debug mode : ${DEBUG}
misc configuration
------------------
libdvdread present : ${HAVE_DVDREAD}
"
......@@ -162,6 +162,7 @@ AC_CHECK_HEADERS(stddef.h getopt.h strings.h)
AC_CHECK_HEADERS(sys/sockio.h fcntl.h sys/time.h sys/times.h)
AC_CHECK_HEADERS(dlfcn.h regex.h)
AC_CHECK_HEADERS(arpa/inet.h net/if.h netinet/in.h sys/socket.h)
AC_CHECK_HEADERS(dvdread/dvd_reader.h, HAVE_DVDREAD=1, HAVE_DVDREAD=0)
dnl Check for SO_BINDTODEVICE
AC_CACHE_CHECK([whether setsockopt accepts SO_BINDTODEVICE],
......@@ -257,6 +258,8 @@ AC_SUBST(INPUT_LCFLAGS)
AC_SUBST(VLS_LCFLAGS)
AC_SUBST(VLS_LIB)
AC_SUBST(HAVE_DVDREAD)
AC_OUTPUT([Makefile.opts src/server/config.h])
echo "
......@@ -271,5 +274,9 @@ vls configuration
-----------------
vls version : ${VLS_VERSION}
debug mode : ${DEBUG}
misc configuration
------------------
libdvdread present : ${HAVE_DVDREAD}
"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment