-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
251 lines (211 loc) · 8.68 KB
/
configure.ac
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
AC_INIT([OpenMAX Bellagio], [0.9.3], [giulio.urlini@st.com], [libomxil-bellagio])
AM_INIT_AUTOMAKE()
# Prerequisite autoconf version
AC_PREREQ([2.59])
AC_CONFIG_HEADERS([config.h])
CFLAGS="${CFLAGS} -Wall -Werror"
################################################################################
# Set the shared versioning info, according to section 6.3 of the libtool info #
# pages. CURRENT:REVISION:AGE must be updated immediately before each release: #
# #
# * If the library source code has changed at all since the last #
# update, then increment REVISION (`C:R:A' becomes `C:r+1:A'). #
# #
# * If any interfaces have been added, removed, or changed since the #
# last update, increment CURRENT, and set REVISION to 0. #
# #
# * If any interfaces have been added since the last public release, #
# then increment AGE. #
# #
# * If any interfaces have been removed since the last public release, #
# then set AGE to 0. #
# #
################################################################################
SHARED_VERSION_INFO="0:0:0"
AC_SUBST(SHARED_VERSION_INFO)
# Check if the OMX_Core.h file is present
AC_CONFIG_SRCDIR([include/OMX_Core.h])
# Set to 'm4' the directory where the extra autoconf macros are stored
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_FILES([
Makefile
libomxil-bellagio.pc
libomxil-bellagio.spec
doc/Doxyfile
doc/footer_SF.html
doc/omxregister-bellagio.1
doc/Makefile
include/Makefile
src/Makefile
src/base/Makefile
src/core_extensions/Makefile
src/components/Makefile
src/components/audio_effects/Makefile
src/components/clocksrc/Makefile
src/components/videoscheduler/Makefile
src/dynamic_loader/Makefile
m4/Makefile
test/Makefile
test/components/Makefile
test/components/common/Makefile
test/components/audio_effects/Makefile
test/components/resource_manager/Makefile
])
################################################################################
# Define the extra arguments the user can pass to the configure script #
################################################################################
# Check whether volume/mixer components has been requested
AC_ARG_ENABLE(
[audioeffects],
[AC_HELP_STRING(
[--disable-audioeffects],
[whether to disable the audio effects components compilation])],
[with_audioeffects=$enableval],
[with_audioeffects=yes])
#Check whether clock component has been requested
AC_ARG_ENABLE(
[clocksrc],
[AC_HELP_STRING(
[--disable-clocksrc],
[whether to disable the clocksrc compilation])],
[with_clocksrc=$enableval],
[with_clocksrc=yes]) dnl default
#Check whether xvideosink component has been requested
AC_ARG_ENABLE(
[videoscheduler],
[AC_HELP_STRING(
[--disable-videoscheduler],
[whether to disable the video scheduler component])],
[with_videoscheduler=$enableval],
[with_videoscheduler=yes])
#Check whether to disable all components
AC_ARG_ENABLE(
[components],
[AC_HELP_STRING(
[--disable-components],
[whether to disable all the components])],
[with_components=$enableval],
[with_components=yes])
#Check whether to create documentation
AC_ARG_ENABLE(
[doc],
[AC_HELP_STRING(
[--disable-doc],
[whether to enable documentation generation])],
[with_doc=$enableval],
[with_doc=yes])
AC_ARG_ENABLE(
[debug],
[AC_HELP_STRING(
[--enable-debug],
[whether to enable an x debug level])],
[with_debug_level=$enableval],
[with_debug_level=no])
AC_ARG_ENABLE(
[android],
[AC_HELP_STRING(
[--enable-android],
[whether to enable android compilation])],
[with_android=$enableval],
[with_android=no])
################################################################################
# Check for programs #
################################################################################
# Check for a working C compiler
AC_PROG_CXX
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
# Check for libtool
AM_PROG_LIBTOOL
# Check for doxygen
AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false)
AM_CONDITIONAL(HAVE_DOXYGEN,($HAVE_DOXYGEN) && (test x$with_doc = xyes))
if (test $HAVE_DOXYGEN = "false"); then
AC_MSG_WARN([*** doxygen not found, docs will not be built])
fi
################################################################################
# Check for libraries #
################################################################################
AC_CHECK_LIB([pthread], [pthread_create])
# Check for libdl
AC_SEARCH_LIBS([dlopen], [dl], [], [AC_MSG_ERROR([libdl is required])])
if test "x$with_components" = "xno"; then
with_audioeffects=no
with_clocksrc=no
with_videoscheduler=no
fi
# Define components default ldflags (man ld)
PLUGIN_LDFLAGS="-module -avoid-version -no-undefined -as-needed"
AC_SUBST(PLUGIN_LDFLAGS)
AX_SET_PLUGINDIR
CFG_DEBUG_LEVEL=0
# Define debug messages level
if test "x$with_debug_level" = "xno"; then
CFG_DEBUG_LEVEL=0
fi
if test "x$with_debug_level" = "xyes"; then
CFG_DEBUG_LEVEL=255
fi
if test "x$with_debug_level" = "x1"; then
CFG_DEBUG_LEVEL=2
fi
if test "x$with_debug_level" = "x2"; then
CFG_DEBUG_LEVEL=4
fi
if test "x$with_debug_level" = "x3"; then
CFG_DEBUG_LEVEL=8
fi
if test "x$with_debug_level" = "x4"; then
CFG_DEBUG_LEVEL=16
fi
if test "x$with_debug_level" = "x5"; then
CFG_DEBUG_LEVEL=32
fi
if test "x$with_debug_level" = "x6"; then
CFG_DEBUG_LEVEL=255
fi
AC_SUBST(CFG_DEBUG_LEVEL)
CFLAGS="${CFLAGS} -DCONFIG_DEBUG_LEVEL=$CFG_DEBUG_LEVEL"
if test "x$with_android" = "xyes"; then
CFLAGS="${CFLAGS} -DANDROID_COMPILATION"
fi
################################################################################
# Check for header files #
################################################################################
AC_CHECK_HEADERS([fcntl.h malloc.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/socket.h sys/time.h unistd.h])
################################################################################
# Check for pkg-config modules #
################################################################################
################################################################################
# Check for types #
################################################################################
AC_TYPE_SIZE_T
################################################################################
# Check for structures #
################################################################################
# unused
################################################################################
# Check for compiler characteristics #
################################################################################
# unused
################################################################################
# Check for library functions #
################################################################################
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_CHECK_FUNCS([gethostbyname gettimeofday memset mkdir socket strdup strerror strndup strrchr])
################################################################################
# Check for system services #
################################################################################
# unused
################################################################################
# Conditionals and file output #
################################################################################
AM_CONDITIONAL([WITH_AUDIOEFFECTS], [test x$with_audioeffects = xyes])
AM_CONDITIONAL([WITH_CLOCKSRC], [test x$with_clocksrc = xyes])
AM_CONDITIONAL([WITH_VIDEOSCHEDULER],[test x$with_videoscheduler = xyes])
AC_OUTPUT