-reporting dvd logic driven audio track changes to the gui
[libdreamdvd.git] / configure.ac
1 AC_INIT([libdreamdvd],[0.0.1],[seddi@i-have-a-dreambox.com],[libdreamdvd])
2 AM_INIT_AUTOMAKE([dist-bzip2])
3
4 AC_PROG_CXX
5 AC_PROG_LIBTOOL
6 AC_CHECK_HEADERS([byteswap.h endian.h])
7
8 AC_ARG_WITH(dvbincludes,
9         [  --with-dvbincludes=PATH  path for dvb includes [[NONE]]],
10         [DVBINCLUDES="$withval"],[DVBINCLUDES=""])
11
12 if test "$DVBINCLUDES"; then
13         CPPFLAGS="$CPPFLAGS -I$DVBINCLUDES"
14 fi
15
16 AC_CHECK_HEADERS(ost/dmx.h,[
17         DVB_API_VERSION=1
18         AC_MSG_NOTICE([found dvb version 1])
19 ])
20
21 if test -z "$DVB_API_VERSION"; then
22 AC_CHECK_HEADERS(linux/dvb/version.h,[
23         AC_LANG_PREPROC_REQUIRE()
24         AC_REQUIRE([AC_PROG_EGREP])
25         AC_LANG_CONFTEST([AC_LANG_SOURCE([[
26 #include <linux/dvb/version.h>
27 version DVB_API_VERSION
28         ]])])
29         DVB_API_VERSION=`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | $EGREP "^version" | sed "s,version\ ,,"`
30         rm -f conftest*
31
32         AC_MSG_NOTICE([found dvb version $DVB_API_VERSION])
33 ])
34 fi
35
36 if test "$DVB_API_VERSION"; then
37         AC_DEFINE(HAVE_DVB,1,[Define to 1 if you have the dvb includes])
38         AC_DEFINE_UNQUOTED(HAVE_DVB_API_VERSION,$DVB_API_VERSION,[Define to the version of the dvb api])
39 else
40         AC_MSG_ERROR([can't find dvb headers])
41 fi
42
43 AC_OUTPUT([
44 Makefile
45 libdreamdvd.pc
46 ])