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
  
AC_INIT(dvb.c) 
AC_CONFIG_HEADER(config.h) 
 
PIKE_FEATURE_WITHOUT(DVB) 
 
AC_ARG_WITH(dvb,     [  --with(out)-dvb       Support DVB],[],[with_dvb=yes]) 
AC_ARG_WITH(dvb-include-dir, 
    [  --with-dvb-include-dir        DVB headers directory root location], 
        [pike_dvb_include_dir=$withval]) 
 
AC_MODULE_INIT() 
if test x$with_dvb = xyes ; then 
  PIKE_FEATURE_NODEP(DVB) 
 
  AC_MSG_CHECKING(for DVB include files location) 
  if test x$pike_dvb_include_dir != x; then 
    AC_MSG_RESULT(user-provided: $pike_dvb_include_dir) 
  else 
    AC_MSG_RESULT(include dir was not specified.) 
  fi 
 
  if test x$pike_dvb_include_dir != x; then 
    CPPFLAGS="-I$pike_dvb_include_dir $CPPFLAGS" 
  fi 
 
dnl linux 2.6 has dvb/version.h but not linux/dvb/sec.h, 
dnl which dvb.c needs; this should probably be updated 
dnl some better way: FIXME!!1!ยก /Mirar 
 
  dnl Checking for version 2+ API 
  AC_CHECK_HEADERS(linux/dvb/version.h, 
      [[ 
        AC_CHECK_HEADERS(linux/dvb/sec.h, 
              [PIKE_FEATURE(DVB,[yes (version 2 api)])], 
              [PIKE_FEATURE(DVB,[no (missing linux/dvb/sec.h - version 3 api?)]) ]) 
      ]]) 
 
 
  AC_CHECK_HEADERS(ost/frontend.h, 
      [ PIKE_FEATURE(DVB,[yes (version 1 api)]) ]) 
 
 
fi 
 
AC_OUTPUT(Makefile,echo FOO >stamp-h )