-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
474 lines (404 loc) · 15.1 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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
# explicit defines for separate revision handling
define(ver_major, 4)
define(ver_minor, 0)
define(ver_micro, 0)
AC_INIT(DDT-Neutrino, ver_major.ver_minor.ver_micro)
AM_INIT_AUTOMAKE([nostdinc foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
AC_DEFINE(RELEASE_CYCLE, "ver_major.0", [Release cycle information; used in update code])
TUXBOX_APPS
TUXBOX_APPS_DIRECTORY
TUXBOX_APPS_PKGCONFIG
TUXBOX_BOXTYPE
AC_PROG_CC
AC_PROG_CXX
AC_DISABLE_STATIC
AM_PROG_LIBTOOL
# Add build information to local_build_config.h.tmp
# -------------------------------------------------
rm -f local_build_config.h.tmp
cat > local_build_config.h.tmp << EOF
/* Build system under which the program was compiled on. */
#define USED_BUILD "$build"
/* Define to the used CXXFLAGS to compile this package. */
#define USED_CXXFLAGS "$CXXFLAGS"
EOF
if COMPILER=`$CC --version | head -n 1`; then
cat >> local_build_config.h.tmp <<-EOF
/* Define to name and version of used compiler */
#define USED_COMPILER "$COMPILER"
EOF
fi
# only update header if it differs to avoid unnecessary rebuilds
if ! diff local_build_config.h.tmp local_build_config.h >/dev/null 2>&1; then
rm -f local_build_config.h
mv local_build_config.h.tmp local_build_config.h
else
rm -f local_build_config.h.tmp
fi
AC_ARG_ENABLE(ffmpegdec,
AS_HELP_STRING([--enable-ffmpegdec], [enable ffmpeg decoder support @<:@default=no@:>@]),
AC_DEFINE(ENABLE_FFMPEGDEC, 1, [include ffmpeg decoder support]))
AM_CONDITIONAL(ENABLE_FFMPEGDEC, test "$enable_ffmpegdec" = "yes")
if test "$enable_ffmpegdec" != "yes"; then
AC_ARG_WITH(tremor,
AS_HELP_STRING([--with-tremor], [use libvorbisidec instead of libogg/libvorbis @<:@default=no@:>@]),
[TREMOR="$withval"],
[TREMOR=no])
AC_ARG_WITH(tremor-static,
AS_HELP_STRING([--with-tremor-static], [use statically linked libvorbisidec instead of libogg/libvorbis @<:@default=no@:>@]),
[TREMOR_STATIC="$withval"],
[TREMOR_STATIC=no])
if test "$TREMOR_STATIC" = "yes"; then
TREMOR=yes
fi
if test "$TREMOR" = "yes"; then
TUXBOX_APPS_LIB_PKGCONFIG(VORBISIDEC,vorbisidec)
AC_DEFINE(USE_TREMOR, 1, use libvorbisidec/tremor library)
fi
if test "$TREMOR_STATIC" = "yes"; then
# hack to get the static lib location from the pkg-config data
VORBISIDEC_LIBS="$(echo $VORBISIDEC_LIBS | sed 's@-L@@; s@ -l.*@/libvorbisidec.a@;')"
fi
TUXBOX_APPS_LIB_PKGCONFIG_CHECK(ID3TAG,libid3tag)
if test x"$ID3TAG_EXISTS" != xyes; then
TUXBOX_APPS_LIB_PKGCONFIG(ID3TAG,id3tag)
fi
TUXBOX_APPS_LIB_PKGCONFIG_CHECK(MAD,libmad)
if test x"$MAD_EXISTS" != xyes; then
TUXBOX_APPS_LIB_PKGCONFIG(MAD,mad)
fi
TUXBOX_APPS_LIB_PKGCONFIG_CHECK(OGG,ogg)
if test -z "$OGG_CFLAGS" ; then
TUXBOX_APPS_LIB_PKGCONFIG(OGG,ogg)
fi
fi # test "$enable_ffmpegdec"
TUXBOX_APPS_LIB_PKGCONFIG(SWRESAMPLE,libswresample)
AM_CONDITIONAL(USE_TREMOR, test "$TREMOR" = "yes")
# TUXBOX_APPS_LIB_PKGCONFIG(OPENSSL,openssl)
TUXBOX_APPS_LIB_PKGCONFIG(CURL,libcurl)
## For the check you must use the corresponding libtool number as version number,
## see freetype source code docs/VERSIONS.TXT
PKG_CHECK_MODULES([FREETYPE], [freetype2 >= 16.2.10], [
echo "freetype2 >= 2.5.0 found"
], [
echo "freetype2 >= 2.5.0 not found, use alternative search method with freetype-config"
#AC_MSG_ERROR([freetype2 >= 2.5.0 not found])
])
# fallback to curl-config (which is ugly for cross-compilation)
if test -z "$CURL_LIBS" -a -z "$CURL_CFLAGS"; then
TUXBOX_APPS_LIB_CONFIG(CURL,curl-config)
fi
# fallback to freetype-config (which is ugly for cross-compilation)
if test -z "$FREETYPE_LIBS" -a -z "$FREETYPE_CFLAGS"; then
TUXBOX_APPS_LIB_CONFIG(FREETYPE,freetype-config)
CPPFLAGS+=" $FREETYPE_CFLAGS"
AC_MSG_CHECKING([whether FreeType version is 2.5.0 or higher])
AC_TRY_CPP([
#include <ft2build.h>
#include FT_FREETYPE_H
#if FREETYPE_MAJOR < 2 || (FREETYPE_MAJOR == 2 && FREETYPE_MINOR < 5)
#error Freetype version too low.
#endif
], [
AC_MSG_RESULT(yes)
], [
AC_MSG_ERROR([Need FreeType library version 2.5.0 or higher])
])
fi
TUXBOX_APPS_LIB_PKGCONFIG(PNG,libpng)
TUXBOX_APPS_LIB_PKGCONFIG(AVFORMAT,libavformat)
TUXBOX_APPS_LIB_PKGCONFIG(AVCODEC,libavcodec)
TUXBOX_APPS_LIB_PKGCONFIG(AVUTIL,libavutil)
TUXBOX_APPS_LIB_PKGCONFIG(SIGC,sigc++-2.0)
TUXBOX_APPS_LIB_PKGCONFIG(SWRESAMPLE,libswresample)
TUXBOX_APPS_LIB_PKGCONFIG(SWSCALE,libswscale)
if test "$BOXTYPE" = "generic" ||
test "$BOXTYPE" = "duckbox" ||
test "$BOXTYPE" = "armbox" ||
test "$BOXTYPE" = "mipsbox" ||
test "$BOXTYPE" = "spark7162" ||
test "$BOXTYPE" = "spark"; then
AC_DEFINE(SCREENSHOT, 1, [Define to 1 if the platform supports screenshots])
fi
# lcd
AC_ARG_ENABLE(lcd,
AS_HELP_STRING(--enable-lcd,include lcd support),
,[enable_lcd=no])
AM_CONDITIONAL(ENABLE_LCD,test "$enable_lcd" = "yes")
if test "$enable_lcd" = "yes"; then
AC_DEFINE(ENABLE_LCD,1,[include lcd support])
fi
# lcd update
AM_CONDITIONAL(LCD_UPDATE,test "$enable_lcd_update" = "yes")
if test "$enable_lcd" = "yes"; then
AC_DEFINE(LCD_UPDATE,1,[include lcd update support])
fi
# lcdapi
AM_CONDITIONAL(ENABLE_LCDAPI,test "$enable_lcd" = "yes")
if test "$enable_lcd" = "yes"; then
AC_DEFINE(ENABLE_LCDAPI,1,[include lcd api support])
fi
AC_ARG_ENABLE(graphlcd,
AS_HELP_STRING([--enable-graphlcd], [enable GraphLCD support]),
,[enable_graphlcd=no])
AM_CONDITIONAL(ENABLE_GRAPHLCD, test "$enable_graphlcd" = "yes")
if test "$enable_graphlcd" = "yes"; then
AC_DEFINE(ENABLE_GRAPHLCD, 1, [include GraphLCD support])
fi
AC_ARG_ENABLE(lcd4linux,
AS_HELP_STRING([--enable-lcd4linux], [enable Lcd4Linux support]),
,[enable_lcd4linux=no])
AM_CONDITIONAL(ENABLE_LCD4LINUX, test "$enable_lcd4linux" = "yes")
if test "$enable_lcd4linux" = "yes"; then
AC_DEFINE(ENABLE_LCD4LINUX, 1, [include Lcd4Linux support])
fi
AC_ARG_ENABLE(aitscan,
AS_HELP_STRING([--enable-aitscan], [enable Application Information Table support @<:@default=no@:>@]),
AC_DEFINE(ENABLE_AITSCAN, 1, [enable Application Information Table support]))
AM_CONDITIONAL(ENABLE_AITSCAN, test "$enable_aitscan" = "yes")
AC_ARG_ENABLE(keyboard-no-rc,
AS_HELP_STRING([--enable-keyboard-no-rc], [enable keyboard control, disable rc control @<:@default=no@:>@]),
AC_DEFINE(KEYBOARD_INSTEAD_OF_REMOTE_CONTROL, 1, [enable keyboard control, disable rc control]))
AC_ARG_ENABLE(mdev,
AS_HELP_STRING([--enable-mdev], [use mdev instead of broken neutrino mount hack @<:@default=no@:>@]),
AC_DEFINE(ASSUME_MDEV, 1, [use mdev instead of broken neutrino mount hack]))
AC_ARG_ENABLE(freesatepg,
AS_HELP_STRING([--enable-freesatepg], [enable Freesat EPG code @<:@default=no@:>@]),
AC_DEFINE(ENABLE_FREESATEPG, 1, [enable Freesat EPG code]))
AC_ARG_ENABLE(viasatepg,
AS_HELP_STRING([--enable-viasatepg], [enable ViaSat EPG code @<:@default=no@:>@]),
AC_DEFINE(ENABLE_VIASATEPG, 1, [enable ViaSat EPG code]))
AC_ARG_ENABLE(fastscan,
AS_HELP_STRING([--enable-fastscan], [enable fastscan code @<:@default=no@:>@]),
AC_DEFINE(ENABLE_FASTSCAN, 1, [enable fastscan code]))
AM_CONDITIONAL(ENABLE_FASTSCAN, test "$enable_fastscan" = "yes")
AC_ARG_ENABLE(giflib,
AS_HELP_STRING([--enable-giflib], [use giflib instead of libungif @<:@default=no@:>@]),
AC_DEFINE(ENABLE_GIFLIB, 1, [use giflib instead of libungif]))
AM_CONDITIONAL(ENABLE_GIFLIB, test "$enable_giflib" = "yes")
AC_ARG_ENABLE(pugixml,
AS_HELP_STRING([--enable-pugixml], [use pugixml instead of xmltree @<:@default=no@:>@]),
AC_DEFINE(USE_PUGIXML, 1, [use pugixml instead of xmltree]))
AM_CONDITIONAL(USE_PUGIXML, test "$enable_pugixml" = "yes")
AC_ARG_ENABLE(flac,
AS_HELP_STRING([--enable-flac], [enable FLAC support @<:@default=no@:>@]),
AC_DEFINE(ENABLE_FLAC, 1, [enable FLAC support]))
AM_CONDITIONAL(ENABLE_FLAC, test "$enable_flac" = "yes")
AC_ARG_ENABLE(upnp,
AS_HELP_STRING([--enable-upnp], [enable UPNP support @<:@default=yes@:>@]),
[enable_upnp="$enableval"],
[enable_upnp="yes"])
if test "$enable_upnp" = "yes"; then
AC_DEFINE(ENABLE_UPNP, 1, [enable UPNP support])
fi
AM_CONDITIONAL(ENABLE_UPNP, test "$enable_upnp" = "yes")
AC_ARG_ENABLE(dynamicdemux,
AS_HELP_STRING(--enable-dynamicdemux,use dynamic demux),
,[enable_dynamicdemux=no])
AM_CONDITIONAL(DYNAMIC_DEMUX,test "$enable_dynamicdemux" = "yes")
if test "$enable_dynamicdemux" = "yes"; then
AC_DEFINE(DYNAMIC_DEMUX,1,[use dynamic demux])
fi
AC_ARG_ENABLE(arm-acc,
AS_HELP_STRING(--disable-arm-acc,disable arm hardware acceleration),
,[enable_arm_acc=yes])
AM_CONDITIONAL(ENABLE_ARM_ACC,test "$enable_arm_acc" = "yes")
if test "$enable_arm_acc" = "yes"; then
AC_DEFINE(ENABLE_ARM_ACC,1,[enable arm hardware acceleration])
fi
AC_ARG_ENABLE(mips-acc,
AS_HELP_STRING(--disable-mips-acc,disable mips hardware acceleration),
,[enable_mips_acc=yes])
AM_CONDITIONAL(ENABLE_MIPS_ACC,test "$enable_mips_acc" = "yes")
if test "$enable_mips_acc" = "yes"; then
AC_DEFINE(ENABLE_MIPS_ACC,1,[enable mips hardware acceleration])
fi
AC_ARG_ENABLE(lua,
AS_HELP_STRING([--enable-lua], [enable Lua support @<:@default=yes@:>@]),
[enable_lua="$enableval"])
if test "$enable_lua" = "yes"; then
AC_DEFINE(ENABLE_LUA, 1, [include Lua support])
PKG_CHECK_MODULES(LUA, lua, LLUA="yes", LLUA="no")
PKG_CHECK_MODULES(luajit, luajit, LLUAJIT="yes", LLUAJIT="no")
if test "x$LLUAJIT" = "xyes"; then
LUA_LIBS="-lluajit-5.1"
AC_DEFINE(LUA_COMPAT_5_2, 1, [needed for build with lua 5.1])
elif test "x$LLUA" = "xyes"; then
LUA_LIBS="-llua"
AC_DEFINE(LUA_COMPAT_5_2, 0, [needed for build with lua 5.1])
else
echo "lualib not found, assuming static lua in linker path..."
LUA_LIBS="-llua -ldl"
AC_DEFINE(STATIC_LUAPOSIX, 1, [Define to 1 for static lua build.])
AC_DEFINE(LUA_COMPAT_5_2, 0, [needed for build with lua 5.1])
fi
fi
AM_CONDITIONAL(ENABLE_LUA, test "$enable_lua" = "yes")
AC_ARG_ENABLE(cleanup,
AS_HELP_STRING([--enable-cleanup], [enable cleanup on exit @<:@default=no@:>@]),
AC_DEFINE(EXIT_CLEANUP, 1, [enable cleanup on exit]))
AC_ARG_ENABLE(pip,
AS_HELP_STRING([--enable-pip], [enable picture in picture support @<:@default=no@:>@]),
AC_DEFINE(ENABLE_PIP, 1, [enable picture in picture support]))
AM_CONDITIONAL(ENABLE_PIP, test "$enable_pip" = "yes")
case "$BOXMODEL" in
vusolo4k|vuduo4k|vuduo4kse|vuultimo4k|vuuno4kse|vuuno4k)
AC_ARG_ENABLE(quadpip,
AS_HELP_STRING([--enable-quadpip], [enable quad picture in picture support @<:@default=no@:>@]),
AC_DEFINE(ENABLE_QUADPIP, 1, [enable quad picture in picture support]))
AM_CONDITIONAL(ENABLE_QUADPIP, test "$enable_quadpip" = "yes")
if test "$enable_quadpip" = "yes" -a "$enable_pip" != "yes"; then
[enable_pip="yes"]
AC_DEFINE(ENABLE_PIP, 1, [enable picture in picture support])
AC_MSG_WARN([--enable-quadpip depends on --enable-pip -> now enabled])
AM_CONDITIONAL(ENABLE_PIP, test "$enable_pip" = "yes")
fi
;;
*)
[enable_quadpip="no"]
AC_MSG_WARN([--enable-quadpip not supported for $BOXMODEL -> now disabled])
;;
esac
AM_CONDITIONAL(ENABLE_QUADPIP, test "$enable_quadpip" = "yes")
AC_ARG_ENABLE(testing,
AS_HELP_STRING([--enable-testing], [enable development code @<:@default=no@:>@]),
AC_DEFINE(ENABLE_TESTING, 1, [enable development code]))
AM_CONDITIONAL(ENABLE_TESTING, test "$enable_testing" = "yes")
AC_ARG_ENABLE(fribidi,
AS_HELP_STRING([--enable-fribidi], [enable fribidi support @<:@default=no@:>@]),
AC_DEFINE(ENABLE_FRIBIDI, 1, [enable fribidi support]))
AM_CONDITIONAL(ENABLE_FRIBIDI, test "$enable_fribidi" = "yes")
AC_ARG_WITH(stb-hal-includes,
AS_HELP_STRING([--with-stb-hal-includes=PATH], [path for libstb-hal includes [[NONE]]]),
[STB_HAL_INC="$withval"],
[STB_HAL_INC=""])
AC_ARG_WITH(stb-hal-build,
AS_HELP_STRING([--with-stb-hal-build=PATH], [path where libstb-hal is built [[NONE]]]),
[STB_HAL_LIB="-L$withval"],
[STB_HAL_LIB=""])
AC_DEFINE(USE_STB_HAL, 1, [use libstb-hal])
if test "$STB_HAL_INC" = ""; then
AC_MSG_ERROR([need libstb-hal includes path with --with-stb-hal-includes=...])
fi
HWLIB_CFLAGS="-I$STB_HAL_INC"
AM_CONDITIONAL(USE_STB_HAL,
test "$BOXTYPE" = "generic" ||
test "$BOXTYPE" = "duckbox" ||
test "$BOXTYPE" = "armbox" ||
test "$BOXTYPE" = "mipsbox" ||
test "$BOXTYPE" = "spark7162" ||
test "$BOXTYPE" = "spark")
# hack, so that framebuffer.h does not need to be included everywhere...
AC_DEFINE(fb_pixel_t, uint32_t, [hack, so that framebuffer.h does not need to be included everywhere...])
# hack to define a short filename also for out-of-tree build
if test `dirname $0` = `pwd` || test "$0" = ./configure; then
HWLIB_CFLAGS="$HWLIB_CFLAGS "'-D__file__=__FILE__'
HWLIB_CFLAGS="$HWLIB_CFLAGS "'-D__path_file__=__FILE__'
else
HWLIB_CFLAGS="$HWLIB_CFLAGS "'-D__file__="\"$(subst $(srcdir)/,,$(abspath $<))\""'
HWLIB_CFLAGS="$HWLIB_CFLAGS "'-D__path_file__="\"$(subst $(top_srcdir)/,,$(abspath $<))\""'
fi
AC_ARG_WITH(lcddev,
AC_HELP_STRING([--with-lcddev=devicename], [use devicename for lcd framebuffer device, e.g. /dev/fb1 ]),
[[with_lcddev=$withval]],
[[with_lcddev=no]]
)
if test x"$with_lcddev" != xno ; then
AC_DEFINE_UNQUOTED(LCD_DEV, "$withval", [Defines which device to use for lcd (e.g. /dev/fb1)])
fi
AC_CHECK_PROG(AR, ar, , ar)
dnl Set default for ARFLAGS, since autoconf does not have a macro for it.
dnl This allows people to set it when running configure or make
test -n "$ARFLAGS" || ARFLAGS="cr"
AC_SUBST(AR)
AC_SUBST(ARFLAGS)
AC_SUBST(HWLIB_CFLAGS)
AC_SUBST(FREETYPE_CFLAGS)
AC_SUBST(FREETYPE_LIBS)
AC_SUBST(VORBISIDEC_CFLAGS)
AC_SUBST(VORBISIDEC_LIBS)
AC_SUBST(STB_HAL_INC)
AC_SUBST(STB_HAL_LIB)
AC_SUBST(LUA_CFLAGS)
AC_SUBST(LUA_LIBS)
AC_SUBST(BLURAY_LIBS)
AC_OUTPUT([
Makefile
data/Makefile
data/config/Makefile
data/control/Makefile
data/control-arm/Makefile
data/fonts/Makefile
data/icons/Makefile
data/icons/buttons/Makefile
data/icons/filetypes/Makefile
data/icons/headers/Makefile
data/icons/hints/Makefile
data/icons/locale/Makefile
data/icons/logo/Makefile
data/icons/movieplayer/Makefile
data/icons/radar/Makefile
data/icons/slider/Makefile
data/icons/status/Makefile
data/icons/status/ca/Makefile
data/icons/status/channel/Makefile
data/icons/status/markers/Makefile
data/icons/status/various/Makefile
data/icons/various/Makefile
data/inetradio/Makefile
data/iso-codes/Makefile
data/license/Makefile
data/locale/Makefile
data/pictures/Makefile
data/pictures/backgrounds/Makefile
data/pictures/screensaver/Makefile
data/scripts/Makefile
data/webradio/Makefile
data/webtv/Makefile
data/themes/Makefile
data/zapit/Makefile
data/y-web/Makefile
data/y-web/images/Makefile
data/y-web/languages/Makefile
data/y-web/scripts/Makefile
data/y-web/styles/Makefile
lib/Makefile
lib/connection/Makefile
lib/jsoncpp/Makefile
lib/libconfigfile/Makefile
lib/liblcddisplay/Makefile
lib/libdvbsub/Makefile
lib/libeventserver/Makefile
lib/libiw/Makefile
lib/libmd5sum/Makefile
lib/libnet/Makefile
lib/libtuxtxt/Makefile
lib/libupnpclient/Makefile
lib/luaclient/Makefile
lib/sectionsdclient/Makefile
lib/timerdclient/Makefile
lib/xmltree/Makefile
src/Makefile
src/daemonc/Makefile
src/driver/Makefile
src/driver/audiodec/Makefile
src/driver/pictureviewer/Makefile
src/eitd/Makefile
src/gui/Makefile
src/gui/bedit/Makefile
src/gui/components/Makefile
src/gui/lua/Makefile
src/gui/moviebrowser/Makefile
src/gui/widget/Makefile
src/nhttpd/Makefile
src/nhttpd/nhttpd.conf
src/nhttpd/tuxboxapi/Makefile
src/nhttpd/yhttpd_core/Makefile
src/nhttpd/yhttpd_mods/Makefile
src/system/Makefile
src/timerd/Makefile
src/zapit/Makefile
src/zapit/lib/Makefile
src/zapit/src/Makefile
])