2009-06-01 Jeffrey Stedfast <fejj@novell.com>
[moon.git] / m4 / codecs.m4
blobcd2336b4968025576bd4ddea4704440269264c4f
1 AC_DEFUN([MOONLIGHT_CHECK_CODECS],
3         dnl Do we know of a way to detect when the GCC ABI breaks? 
4         dnl will it ever again? we'll hardcode this for now
5         MOONLIGHT_CODEC_GCC_ABI_VERSION="1"
6         MOONLIGHT_CODEC_OSTYPE="unknown"
7         MOONLIGHT_CODEC_ARCH="unknown"
8         CODECS_SUPPORTED="no"
9         CODECS_ARCH_SUPPORTED="no"
10         CODECS_OS_SUPPORTED="no"
12         case "$host" in
13                 i*86-*-*)
14                         MOONLIGHT_CODEC_ARCH=x86
15                         CODECS_ARCH_SUPPORTED="yes"
16                         ;;
17                 x86_64-*-* | amd64-*-*)
18                         MOONLIGHT_CODEC_ARCH=x64
19                         CODECS_ARCH_SUPPORTED="yes"
20                         ;;
21         esac
22         
23         case "$host" in
24                 *-*-*linux*)
25                         MOONLIGHT_CODEC_OSTYPE=linux
26                         CODECS_OS_SUPPORTED="yes"
27                         ;;
28         esac
30         if test ${MOONLIGHT_CODEC_ARCH} = unknown; then
31                 AC_WARN([The codecs have not been configured to build on this architecture yet])
32         fi
33         
34         if test ${MOONLIGHT_CODEC_OSTYPE} = unknown; then
35                 AC_WARN([The codecs have not been configured to build on this operating system yet])
36         fi
38         if test x$CODECS_ARCH_SUPPORTED = xyes; then
39                 if test x$CODECS_OS_SUPPORTED = xyes; then
40                         CODECS_SUPPORTED="yes"
41                 fi
42         fi
44         AM_CONDITIONAL(CODECS_SUPPORTED, test x$CODECS_SUPPORTED = xyes)
46         AC_SUBST(MOONLIGHT_CODEC_OSTYPE)
47         AC_SUBST(MOONLIGHT_CODEC_ARCH)
48         AC_SUBST(MOONLIGHT_CODEC_GCC_ABI_VERSION)