aboutsummaryrefslogtreecommitdiffstats
blob: 72430cba5713ae6d83dac8c6f486c0032ef1d442 (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
142
143
144
145
146
147
148
AC_PREREQ(2.52)

dnl initialize autoconf
AC_INIT([libdce], [1.0.0], [http://www.ti.com])

dnl define PACKAGE_VERSION_* variables
dnl AS_VERSION

dnl can autoconf find the source ?
AC_CONFIG_SRCDIR([libdce.c])

dnl set the autotools aux directory
AC_CONFIG_AUX_DIR([config])

dnl AM_MAINTAINER_MODE only provides the option to configure to enable it
AM_MAINTAINER_MODE

dnl sets host_*, target_ variables
AC_CANONICAL_SYSTEM

dnl initialize automake
AM_INIT_AUTOMAKE([foreign])

dnl use pretty build output with automake >= 1.11
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],
  [AM_DEFAULT_VERBOSITY=1
   AC_SUBST(AM_DEFAULT_VERBOSITY)])

dnl find a compiler
AC_PROG_CC
AM_PROG_AS
AM_PROG_LIBTOOL

dnl *** autotools stuff ***
dnl allow for different autotools
dnl AS_AUTOTOOLS_ALTERNATE

dnl *** checks for platform ***
AC_DEFINE_UNQUOTED(CPU_`echo $target_cpu | tr a-z- A-Z_`,[1])
AC_DEFINE_UNQUOTED(OS_` echo $target_os  | tr a-z- A-Z_`,[1])

dnl *** checks for programs ***
AC_PROG_INSTALL

dnl Check for pkgconfig first
AC_CHECK_PROG([HAVE_PKGCONFIG], [pkg-config], [yes], [no])

dnl *** checks for libraries ***
dnl Check for libdrm
PKG_CHECK_MODULES(DRM, libdrm libdrm_omap)

dnl *** checks for libraries ***
dnl Check for libmmrpc
PKG_CHECK_MODULES(MMRPC, libmmrpc)

dnl Check for X11/libdri2
PKG_CHECK_MODULES(X11, x11 dri2, [HAVE_X11=yes], [HAVE_X11=no])
if test "x$HAVE_X11" = "xyes"; then
  AC_DEFINE(HAVE_X11, 1, [Have X11 support])
else
  AC_MSG_WARN([Building without X11 support])
fi
AM_CONDITIONAL(ENABLE_X11, [test "x$HAVE_X11" = xyes])

dnl Check for wayland
PKG_CHECK_MODULES(WAYLAND, wayland-client >= 0.95.0, [HAVE_WAYLAND=yes], [HAVE_WAYLAND=no])
if test "x$HAVE_WAYLAND" = "xyes"; then
  AC_DEFINE(HAVE_WAYLAND, 1, [Have Wayland support])
else
  AC_MSG_WARN([Building without Wayland support])
fi
AM_CONDITIONAL(ENABLE_WAYLAND, [test "x$HAVE_WAYLAND" = xyes])

dnl *** checks for header files ***
dnl check if we have ANSI C header files
AC_HEADER_STDC

dnl *** checks for types/defines ***

dnl *** checks for structures ***

dnl *** checks for compiler characteristics ***

dnl *** checks for library functions ***

dnl *** checks for dependancy libraries ***

dnl *** set variables based on configure arguments ***


if test "$CODEC_ENGINE" != "" ; then
	AC_MSG_NOTICE([Checking component : CODEC_ENGINE])
	AC_CHECK_FILES(["$CODEC_ENGINE"],,[AC_MSG_ERROR(["$CODEC_ENGINE" not found Set path variable CODEC_ENGINE])])
	AC_SUBST(CODEC_ENGINE)
else
	AC_MSG_ERROR([Set path variable CODEC_ENGINE])
fi

if test "$FRAMEWORK_COMPONENTS" != "" ; then
	AC_MSG_NOTICE([Checking component : FRAMEWORK_COMPONENTS])
        AC_CHECK_FILES(["$FRAMEWORK_COMPONENTS"],,[AC_MSG_ERROR(["$FRAMEWORK_COMPONENTS" not found Set path variable FRAMEWORK_COMPONENTS])])
	AC_SUBST(FRAMEWORK_COMPONENTS)
else
        AC_MSG_ERROR([Set path variable FRAMEWORK_COMPONENTS])
fi

if test "$IVAHD_CODECS" != "" ; then
	AC_MSG_NOTICE([Checking component : IVAHD_CODECS])
        AC_CHECK_FILES(["$IVAHD_CODECS"],,[AC_MSG_ERROR(["$IVAHD_CODECS" not fou nd Set path variable IVAHD_CODECS])])
	AC_SUBST(IVAHD_CODECS)
else
        AC_MSG_ERROR([Set path variable IVAHD_CODECS])
fi

if test "$XDAIAS" != "" ; then
	AC_MSG_NOTICE([Checking component : XDAIAS])
        AC_CHECK_FILES(["$XDAIAS"],,[AC_MSG_ERROR(["$XDAIAS" not found Set path variable XDAIAS])])
	AC_SUBST(XDAIAS)
else
        AC_MSG_ERROR([Set path variable XDAIAS])
fi

if test "$XDCTOOLS" != "" ; then
        AC_MSG_NOTICE([Checking component : XDCTOOLS])
        AC_CHECK_FILES(["$XDCTOOLS"],,[AC_MSG_ERROR(["$XDCTOOLS" not found Set path variable XDCTOOLS])])
	AC_SUBST(XDCTOOLS)
else
        AC_MSG_ERROR([Set path variable XDCTOOLS])
fi

if test "$IPC" != "" ; then
        AC_MSG_NOTICE([Checking component : IPC])
        AC_CHECK_FILES(["$IPC"],,[AC_MSG_ERROR(["$IPC" not found Set path variable IPC])])
        AC_SUBST(IPC)
else
        AC_MSG_ERROR([Set path variable IPC])
fi






AC_CONFIG_FILES([
libdce.pc
Makefile
])
AC_OUTPUT