-
Notifications
You must be signed in to change notification settings - Fork 7
/
acinclude.m4
500 lines (458 loc) · 17.8 KB
/
acinclude.m4
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
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
AC_DEFUN([TUXBOX_APPS], [
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
AC_GNU_SOURCE
AC_ARG_WITH(target,
AS_HELP_STRING([--with-target=TARGET], [target for compilation [[native,cdk]]]),
[TARGET="$withval"],
[TARGET="native"])
AC_ARG_WITH(targetprefix,
AS_HELP_STRING([--with-targetprefix=PATH], [prefix relative to target root (only applicable in cdk mode)]),
[TARGET_PREFIX="$withval"],
[TARGET_PREFIX=""])
AC_ARG_WITH(debug,
AS_HELP_STRING([--without-debug], [disable debugging code @<:@default=no@:>@]),
[DEBUG="$withval"],
[DEBUG="yes"])
if test "$DEBUG" = "yes"; then
DEBUG_CFLAGS="-g3 -ggdb"
AC_DEFINE(DEBUG, 1, [enable debugging code])
fi
AC_MSG_CHECKING(target)
if test "$TARGET" = "native"; then
AC_MSG_RESULT(native)
if test "$CFLAGS" = "" -a "$CXXFLAGS" = ""; then
CFLAGS="-Wall -O2 -pipe $DEBUG_CFLAGS"
CXXFLAGS="-Wall -O2 -pipe $DEBUG_CFLAGS"
fi
if test "$prefix" = "NONE"; then
prefix=/usr/local
fi
TARGET_PREFIX=$prefix
if test "$exec_prefix" = "NONE"; then
exec_prefix=$prefix
fi
targetprefix=$prefix
elif test "$TARGET" = "cdk"; then
AC_MSG_RESULT(cdk)
if test "$CC" = "" -a "$CXX" = ""; then
AC_MSG_ERROR([you need to specify variables CC or CXX in cdk])
fi
if test "$CFLAGS" = "" -o "$CXXFLAGS" = ""; then
AC_MSG_ERROR([you need to specify variables CFLAGS and CXXFLAGS in cdk])
fi
if test "$prefix" = "NONE"; then
AC_MSG_ERROR([invalid prefix, you need to specify one in cdk mode])
fi
if test "$TARGET_PREFIX" != "NONE"; then
AC_DEFINE_UNQUOTED(TARGET_PREFIX, "$TARGET_PREFIX", [The targets prefix])
fi
if test "$TARGET_PREFIX" = "NONE"; then
AC_MSG_ERROR([invalid targetprefix, you need to specify one in cdk mode])
TARGET_PREFIX=""
fi
else
AC_MSG_RESULT(none)
AC_MSG_ERROR([invalid target $TARGET, choose on from native,cdk]);
fi
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_SYS_LARGEFILE
])
dnl expand nested ${foo}/bar
AC_DEFUN([TUXBOX_EXPAND_VARIABLE], [
__$1="$2"
for __CNT in false false false false true; do dnl max 5 levels of indirection
$1=`eval echo "$__$1"`
echo ${$1} | grep -q '\$' || break # 'grep -q' is POSIX, exit if no $ in variable
__$1="${$1}"
done
$__CNT && AC_MSG_ERROR([can't expand variable $1=$2]) dnl bail out if we did not expand
])
AC_DEFUN([TUXBOX_APPS_DIRECTORY_ONE], [
AC_ARG_WITH($1, AS_HELP_STRING([$6], [$7 [[PREFIX$4$5]]], [32], [79]), [
_$2=$withval
if test "$TARGET" = "cdk"; then
$2=`eval echo "$TARGET_PREFIX$withval"` # no indirection possible IMNSHO
else
$2=$withval
fi
TARGET_$2=${$2}
], [
# RFC 1925: "you can always add another level of indirection..."
TUXBOX_EXPAND_VARIABLE($2,"${$3}$5")
if test "$TARGET" = "cdk"; then
TUXBOX_EXPAND_VARIABLE(_$2,"${target$3}$5")
else
_$2=${$2}
fi
TARGET_$2=$_$2
])
dnl AC_SUBST($2)
AC_DEFINE_UNQUOTED($2,"$_$2",$7)
AC_SUBST(TARGET_$2)
])
AC_DEFUN([TUXBOX_APPS_DIRECTORY], [
AC_REQUIRE([TUXBOX_APPS])
if test "$TARGET" = "cdk"; then
datadir="\${prefix}/share"
sysconfdir="\${prefix}/etc"
localstatedir="\${prefix}/var"
libdir="\${prefix}/lib"
targetdatadir="\${TARGET_PREFIX}/share"
targetsysconfdir="\${TARGET_PREFIX}/etc"
targetlocalstatedir="\${TARGET_PREFIX}/var"
targetlibdir="\${TARGET_PREFIX}/lib"
fi
TUXBOX_APPS_DIRECTORY_ONE(configdir, CONFIGDIR, localstatedir, /var, /tuxbox/config,
[--with-configdir=PATH], [where to find config files])
TUXBOX_APPS_DIRECTORY_ONE(datadir, DATADIR, datadir, /share, /tuxbox,
[--with-datadir=PATH], [where to find data files])
TUXBOX_APPS_DIRECTORY_ONE(fontdir, FONTDIR, datadir, /share, /fonts,
[--with-fontdir=PATH], [where to find fonts])
TUXBOX_APPS_DIRECTORY_ONE(libdir, LIBDIR, libdir, /lib, /tuxbox,
[--with-libdir=PATH], [where to find internal libs])
TUXBOX_APPS_DIRECTORY_ONE(plugindir, PLUGINDIR, localstatedir, /var, /tuxbox/plugins,
[--with-plugindir=PATH], [where to find plugins in /var])
TUXBOX_APPS_DIRECTORY_ONE(themesdir, THEMESDIR, datadir, /share, /tuxbox/neutrino/themes,
[--with-themesdir=PATH], [where to find themes])
])
dnl automake <= 1.6 needs this specifications
AC_SUBST(CONFIGDIR)
AC_SUBST(DATADIR)
AC_SUBST(FONTDIR)
AC_SUBST(LIBDIR)
AC_SUBST(PLUGINDIR)
AC_SUBST(THEMESDIR)
dnl end workaround
AC_DEFUN([TUXBOX_BOXTYPE], [
AC_ARG_WITH(boxtype,
AS_HELP_STRING([--with-boxtype], [valid values: spark, generic, armbox, duckbox, spark7162, mipsbox]),
[case "${withval}" in
generic|armbox|mipsbox)
BOXTYPE="$withval"
;;
spark|spark7162)
BOXTYPE="spark"
BOXMODEL="$withval"
;;
ufs*)
BOXTYPE="duckbox"
BOXMODEL="$withval"
;;
atevio*)
BOXTYPE="duckbox"
BOXMODEL="$withval"
;;
fortis*)
BOXTYPE="duckbox"
BOXMODEL="$withval"
;;
octagon*)
BOXTYPE="duckbox"
BOXMODEL="$withval"
;;
hs7*)
BOXTYPE="duckbox"
BOXMODEL="$withval"
;;
cuberevo*)
BOXTYPE="duckbox"
BOXMODEL="$withval"
;;
ipbox*)
BOXTYPE="duckbox"
BOXMODEL="$withval"
;;
tf*)
BOXTYPE="duckbox"
BOXMODEL="$withval"
;;
hd51|hd60|hd61|bre2ze4k|e4hdultra|vusolo4k|vuduo4k|vuduo4kse|vuultimo4k|vuzero4k|vuuno4kse|vuuno4k|h7|osmio4k|osmio4kplus|dm900|dm920)
BOXTYPE="armbox"
BOXMODEL="$withval"
;;
vuduo|vuduo2|vuuno|vuultimo|dm7020hd|dm820|dm7080|dm8000|dm800se|dm800sev2)
BOXTYPE="mipsbox"
BOXMODEL="$withval"
;;
*)
AC_MSG_ERROR([bad value $withval for --with-boxtype])
;;
esac],
[BOXTYPE="generic"])
AC_ARG_WITH(boxmodel,
AS_HELP_STRING([--with-boxmodel], [valid for generic: raspi])
AS_HELP_STRING([], [valid for duckbox: ufs910, ufs912, ufs913, ufs922, atevio7500, fortis_hdbox, octagon1008, cuberevo, cuberevo_mini, cuberevo_mini2, cuberevo_250hd, cuberevo_2000hd, cuberevo_3000hd, ipbox9900, ipbox99, ipbox55, tf7700])
AS_HELP_STRING([], [valid for spark: spark, spark7162])
AS_HELP_STRING([], [valid for armbox: bre2ze4k, hd51, hd60, hd61, vusolo4k, vuduo4k, vuduo4kse, vuultimo4k, vuzero4k, vuuno4kse, vuuno4k, h7, osmio4k, osmio4kplus, e4hdultra, dm900, dm920])
AS_HELP_STRING([], [valid for mipsbox: vuduo, vuduo2, vuuno, vuultimo, dm7020hd, dm820, dm7080, dm8000, dm800se, dm800sev2]),
[case "${withval}" in
ufs910|ufs912|ufs913|ufs922|atevio7500|fortis_hdbox|octagon1008|cuberevo|cuberevo_mini|cuberevo_mini2|cuberevo_250hd|cuberevo_2000hd|cuberevo_3000hd|ipbox9900|ipbox99|ipbox55|tf7700)
if test "$BOXTYPE" = "duckbox"; then
BOXMODEL="$withval"
else
AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE])
fi
;;
spark|spark7162)
if test "$BOXTYPE" = "spark"; then
BOXMODEL="$withval"
else
AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE])
fi
;;
hd51|hd60|hd61|bre2ze4k|e4hdultra|vusolo4k|vuduo4k|vuduo4kse|vuultimo4k|vuzero4k|vuuno4kse|vuuno4k|h7|osmio4k|osmio4kplus|dm900|dm920)
if test "$BOXTYPE" = "armbox"; then
BOXMODEL="$withval"
else
AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE])
fi
;;
vuduo|vuduo2|vuuno|vuultimo|dm7020hd|dm820|dm7080|dm8000|dm800se|dm800sev2)
if test "$BOXTYPE" = "mipsbox"; then
BOXMODEL="$withval"
else
AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE])
fi
;;
raspi)
if test "$BOXTYPE" = "generic"; then
BOXMODEL="$withval"
else
AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE])
fi
;;
*)
AC_MSG_ERROR([unsupported value $withval for --with-boxmodel])
;;
esac])
AC_SUBST(BOXTYPE)
AC_SUBST(BOXMODEL)
AM_CONDITIONAL(BOXTYPE_SPARK, test "$BOXTYPE" = "spark")
AM_CONDITIONAL(BOXTYPE_GENERIC, test "$BOXTYPE" = "generic")
AM_CONDITIONAL(BOXTYPE_DUCKBOX, test "$BOXTYPE" = "duckbox")
AM_CONDITIONAL(BOXTYPE_ARMBOX, test "$BOXTYPE" = "armbox")
AM_CONDITIONAL(BOXTYPE_MIPSBOX, test "$BOXTYPE" = "mipsbox")
AM_CONDITIONAL(BOXMODEL_UFS910, test "$BOXMODEL" = "ufs910")
AM_CONDITIONAL(BOXMODEL_UFS912, test "$BOXMODEL" = "ufs912")
AM_CONDITIONAL(BOXMODEL_UFS913, test "$BOXMODEL" = "ufs913")
AM_CONDITIONAL(BOXMODEL_UFS922, test "$BOXMODEL" = "ufs922")
AM_CONDITIONAL(BOXMODEL_SPARK, test "$BOXMODEL" = "spark")
AM_CONDITIONAL(BOXMODEL_SPARK7162, test "$BOXMODEL" = "spark7162")
AM_CONDITIONAL(BOXMODEL_ATEVIO7500, test "$BOXMODEL" = "atevio7500")
AM_CONDITIONAL(BOXMODEL_FORTIS_HDBOX, test "$BOXMODEL" = "fortis_hdbox")
AM_CONDITIONAL(BOXMODEL_OCTAGON1008, test "$BOXMODEL" = "octagon1008")
AM_CONDITIONAL(BOXMODEL_CUBEREVO, test "$BOXMODEL" = "cuberevo")
AM_CONDITIONAL(BOXMODEL_CUBEREVO_MINI, test "$BOXMODEL" = "cuberevo_mini")
AM_CONDITIONAL(BOXMODEL_CUBEREVO_MINI2, test "$BOXMODEL" = "cuberevo_mini2")
AM_CONDITIONAL(BOXMODEL_CUBEREVO_250HD, test "$BOXMODEL" = "cuberevo_250hd")
AM_CONDITIONAL(BOXMODEL_CUBEREVO_2000HD, test "$BOXMODEL" = "cuberevo_2000hd")
AM_CONDITIONAL(BOXMODEL_CUBEREVO_3000HD, test "$BOXMODEL" = "cuberevo_3000hd")
AM_CONDITIONAL(BOXMODEL_IPBOX9900, test "$BOXMODEL" = "ipbox9900")
AM_CONDITIONAL(BOXMODEL_IPBOX99, test "$BOXMODEL" = "ipbox99")
AM_CONDITIONAL(BOXMODEL_IPBOX55, test "$BOXMODEL" = "ipbox55")
AM_CONDITIONAL(BOXMODEL_TF7700, test "$BOXMODEL" = "tf7700")
AM_CONDITIONAL(BOXMODEL_HD51, test "$BOXMODEL" = "hd51")
AM_CONDITIONAL(BOXMODEL_HD60, test "$BOXMODEL" = "hd60")
AM_CONDITIONAL(BOXMODEL_HD61, test "$BOXMODEL" = "hd61")
AM_CONDITIONAL(BOXMODEL_BRE2ZE4K, test "$BOXMODEL" = "bre2ze4k")
AM_CONDITIONAL(BOXMODEL_E4HDULTRA, test "$BOXMODEL" = "e4hdultra")
AM_CONDITIONAL(BOXMODEL_VUSOLO4K, test "$BOXMODEL" = "vusolo4k")
AM_CONDITIONAL(BOXMODEL_VUDUO4K, test "$BOXMODEL" = "vuduo4k")
AM_CONDITIONAL(BOXMODEL_VUDUO4KSE, test "$BOXMODEL" = "vuduo4kse")
AM_CONDITIONAL(BOXMODEL_VUULTIMO4K, test "$BOXMODEL" = "vuultimo4k")
AM_CONDITIONAL(BOXMODEL_VUZERO4K, test "$BOXMODEL" = "vuzero4k")
AM_CONDITIONAL(BOXMODEL_VUUNO4KSE, test "$BOXMODEL" = "vuuno4kse")
AM_CONDITIONAL(BOXMODEL_VUUNO4K, test "$BOXMODEL" = "vuuno4k")
AM_CONDITIONAL(BOXMODEL_VUDUO, test "$BOXMODEL" = "vuduo")
AM_CONDITIONAL(BOXMODEL_VUDUO2, test "$BOXMODEL" = "vuduo2")
AM_CONDITIONAL(BOXMODEL_VUUNO, test "$BOXMODEL" = "vuuno")
AM_CONDITIONAL(BOXMODEL_VUULTIMO, test "$BOXMODEL" = "vuultimo")
AM_CONDITIONAL(BOXMODEL_DM7020HD, test "$BOXMODEL" = "dm7020hd")
AM_CONDITIONAL(BOXMODEL_DM820, test "$BOXMODEL" = "dm820")
AM_CONDITIONAL(BOXMODEL_DM7080, test "$BOXMODEL" = "dm7080")
AM_CONDITIONAL(BOXMODEL_DM900, test "$BOXMODEL" = "dm900")
AM_CONDITIONAL(BOXMODEL_DM920, test "$BOXMODEL" = "dm920")
AM_CONDITIONAL(BOXMODEL_DM8000, test "$BOXMODEL" = "dm8000")
AM_CONDITIONAL(BOXMODEL_DM800SE, test "$BOXMODEL" = "dm800se")
AM_CONDITIONAL(BOXMODEL_DM800SEV2, test "$BOXMODEL" = "dm800sev2")
AM_CONDITIONAL(BOXMODEL_H7, test "$BOXMODEL" = "h7")
AM_CONDITIONAL(BOXMODEL_OSMIO4K, test "$BOXMODEL" = "osmio4k")
AM_CONDITIONAL(BOXMODEL_OSMIO4KPLUS, test "$BOXMODEL" = "osmio4kplus")
AM_CONDITIONAL(BOXMODEL_RASPI, test "$BOXMODEL" = "raspi")
AM_CONDITIONAL(BOXMODEL_VUPLUS_ALL, test "$BOXMODEL" = "vusolo4k" -o "$BOXMODEL" = "vuduo4k" -o "$BOXMODEL" = "vuduo4kse" -o "$BOXMODEL" = "vuultimo4k" -o "$BOXMODEL" = "vuzero4k" -o "$BOXMODEL" = "vuuno4kse" -o "$BOXMODEL" = "vuuno4k" -o "$BOXMODEL" = "vuduo" -o "$BOXMODEL" = "vuduo2" -o "$BOXMODEL" = "vuuno" -o "$BOXMODEL" = "vuultimo")
AM_CONDITIONAL(BOXMODEL_VUPLUS_ARM, test "$BOXMODEL" = "vusolo4k" -o "$BOXMODEL" = "vuduo4k" -o "$BOXMODEL" = "vuduo4kse" -o "$BOXMODEL" = "vuultimo4k" -o "$BOXMODEL" = "vuzero4k" -o "$BOXMODEL" = "vuuno4kse" -o "$BOXMODEL" = "vuuno4k")
AM_CONDITIONAL(BOXMODEL_VUPLUS_MIPS, test "$BOXMODEL" = "vuduo" -o "$BOXMODEL" = "vuduo2" -o "$BOXMODEL" = "vuuno" -o "$BOXMODEL" = "vuultimo")
AM_CONDITIONAL(BOXMODEL_DREAMBOX_ALL, test "$BOXMODEL" = "dm7020hd" -o "$BOXMODEL" = "dm8000" -o "$BOXMODEL" = "dm800se" -o "$BOXMODEL" = "dm800sev2" -o "$BOXMODEL" = "dm820" -o "$BOXMODEL" = "dm7080" -o "$BOXMODEL" = "dm900" -o "$BOXMODEL" = "dm920")
AM_CONDITIONAL(BOXMODEL_DREAMBOX_ARM, test "$BOXMODEL" = "dm900" -o "$BOXMODEL" = "dm920")
AM_CONDITIONAL(BOXMODEL_DREAMBOX_MIPS, test "$BOXMODEL" = "dm7020hd" -o "$BOXMODEL" = "dm8000" -o "$BOXMODEL" = "dm800se" -o "$BOXMODEL" = "dm800sev2" -o "$BOXMODEL" = "dm820" -o "$BOXMODEL" = "dm7080")
if test "$BOXTYPE" = "spark"; then
AC_DEFINE(HAVE_SPARK_HARDWARE, 1, [building for a goldenmedia 990 or edision pingulux])
AC_DEFINE(HAVE_SH4_HARDWARE, 1, [building for a sh4 box])
elif test "$BOXTYPE" = "duckbox"; then
AC_DEFINE(HAVE_DUCKBOX_HARDWARE, 1, [building for a duckbox])
AC_DEFINE(HAVE_SH4_HARDWARE, 1, [building for a sh4 box])
elif test "$BOXTYPE" = "generic"; then
AC_DEFINE(HAVE_GENERIC_HARDWARE, 1, [building for a generic device like a standard PC])
elif test "$BOXTYPE" = "armbox"; then
AC_DEFINE(HAVE_ARM_HARDWARE, 1, [building for an armbox])
elif test "$BOXTYPE" = "mipsbox"; then
AC_DEFINE(HAVE_MIPS_HARDWARE, 1, [building for an mipsbox])
fi
# TODO: do we need more defines?
if test "$BOXMODEL" = "ufs910"; then
AC_DEFINE(BOXMODEL_UFS910, 1, [ufs910])
elif test "$BOXMODEL" = "ufs912"; then
AC_DEFINE(BOXMODEL_UFS912, 1, [ufs912])
elif test "$BOXMODEL" = "ufs913"; then
AC_DEFINE(BOXMODEL_UFS913, 1, [ufs913])
elif test "$BOXMODEL" = "ufs922"; then
AC_DEFINE(BOXMODEL_UFS922, 1, [ufs922])
elif test "$BOXMODEL" = "spark"; then
AC_DEFINE(BOXMODEL_SPARK, 1, [spark])
elif test "$BOXMODEL" = "spark7162"; then
AC_DEFINE(BOXMODEL_SPARK7162, 1, [spark7162])
elif test "$BOXMODEL" = "atevio7500"; then
AC_DEFINE(BOXMODEL_ATEVIO7500, 1, [atevio7500])
elif test "$BOXMODEL" = "fortis_hdbox"; then
AC_DEFINE(BOXMODEL_FORTIS_HDBOX, 1, [fortis_hdbox])
elif test "$BOXMODEL" = "octagon1008"; then
AC_DEFINE(BOXMODEL_OCTAGON1008, 1, [octagon1008])
elif test "$BOXMODEL" = "cuberevo"; then
AC_DEFINE(BOXMODEL_CUBEREVO, 1, [cuberevo])
elif test "$BOXMODEL" = "cuberevo_mini"; then
AC_DEFINE(BOXMODEL_CUBEREVO_MINI, 1, [cuberevo_mini])
elif test "$BOXMODEL" = "cuberevo_mini2"; then
AC_DEFINE(BOXMODEL_CUBEREVO_MINI2, 1, [cuberevo_mini2])
elif test "$BOXMODEL" = "cuberevo_250hd"; then
AC_DEFINE(BOXMODEL_CUBEREVO_250HD, 1, [cuberevo_250hd])
elif test "$BOXMODEL" = "cuberevo_2000hd"; then
AC_DEFINE(BOXMODEL_CUBEREVO_2000HD, 1, [cuberevo_2000hd])
elif test "$BOXMODEL" = "cuberevo_3000hd"; then
AC_DEFINE(BOXMODEL_CUBEREVO_3000HD, 1, [cuberevo_3000hd])
elif test "$BOXMODEL" = "ipbox9900"; then
AC_DEFINE(BOXMODEL_IPBOX9900, 1, [ipbox9900])
elif test "$BOXMODEL" = "ipbox99"; then
AC_DEFINE(BOXMODEL_IPBOX99, 1, [ipbox99])
elif test "$BOXMODEL" = "ipbox55"; then
AC_DEFINE(BOXMODEL_IPBOX55, 1, [ipbox55])
elif test "$BOXMODEL" = "tf7700"; then
AC_DEFINE(BOXMODEL_TF7700, 1, [tf7700])
elif test "$BOXMODEL" = "bre2ze4k"; then
AC_DEFINE(BOXMODEL_BRE2ZE4K, 1, [bre2ze4k])
elif test "$BOXMODEL" = "e4hdultra"; then
AC_DEFINE(BOXMODEL_E4HDULTRA, 1, [e4hdultra])
elif test "$BOXMODEL" = "hd51"; then
AC_DEFINE(BOXMODEL_HD51, 1, [hd51])
elif test "$BOXMODEL" = "hd60"; then
AC_DEFINE(BOXMODEL_HD60, 1, [hd60])
elif test "$BOXMODEL" = "hd61"; then
AC_DEFINE(BOXMODEL_HD61, 1, [hd61])
elif test "$BOXMODEL" = "vusolo4k"; then
AC_DEFINE(BOXMODEL_VUSOLO4K, 1, [vusolo4k])
elif test "$BOXMODEL" = "vuduo4k"; then
AC_DEFINE(BOXMODEL_VUDUO4K, 1, [vuduo4k])
elif test "$BOXMODEL" = "vuduo4kse"; then
AC_DEFINE(BOXMODEL_VUDUO4KSE, 1, [vuduo4kse])
elif test "$BOXMODEL" = "vuultimo4k"; then
AC_DEFINE(BOXMODEL_VUULTIMO4K, 1, [vuultimo4k])
elif test "$BOXMODEL" = "vuzero4k"; then
AC_DEFINE(BOXMODEL_VUZERO4K, 1, [vuzero4k])
elif test "$BOXMODEL" = "vuuno4kse"; then
AC_DEFINE(BOXMODEL_VUUNO4KSE, 1, [vuuno4kse])
elif test "$BOXMODEL" = "vuuno4k"; then
AC_DEFINE(BOXMODEL_VUUNO4K, 1, [vuuno4k])
elif test "$BOXMODEL" = "vuduo"; then
AC_DEFINE(BOXMODEL_VUDUO, 1, [vuduo])
elif test "$BOXMODEL" = "vuduo2"; then
AC_DEFINE(BOXMODEL_VUDUO2, 1, [vuduo2])
elif test "$BOXMODEL" = "vuuno"; then
AC_DEFINE(BOXMODEL_VUUNO, 1, [vuuno])
elif test "$BOXMODEL" = "vuultimo"; then
AC_DEFINE(BOXMODEL_VUULTIMO, 1, [vuultimo])
elif test "$BOXMODEL" = "dm7020hd"; then
AC_DEFINE(BOXMODEL_DM7020HD, 1, [dm7020hd])
elif test "$BOXMODEL" = "dm820"; then
AC_DEFINE(BOXMODEL_DM820, 1, [dm820])
elif test "$BOXMODEL" = "dm7080"; then
AC_DEFINE(BOXMODEL_DM7080, 1, [dm7080])
elif test "$BOXMODEL" = "dm900"; then
AC_DEFINE(BOXMODEL_DM900, 1, [dm900])
elif test "$BOXMODEL" = "dm920"; then
AC_DEFINE(BOXMODEL_DM920, 1, [dm920])
elif test "$BOXMODEL" = "dm8000"; then
AC_DEFINE(BOXMODEL_DM8000, 1, [dm8000])
elif test "$BOXMODEL" = "dm800se"; then
AC_DEFINE(BOXMODEL_DM800SE, 1, [dm800se])
elif test "$BOXMODEL" = "dm800sev2"; then
AC_DEFINE(BOXMODEL_DM800SEV2, 1, [dm800sev2])
elif test "$BOXMODEL" = "h7"; then
AC_DEFINE(BOXMODEL_H7, 1, [h7])
elif test "$BOXMODEL" = "osmio4k"; then
AC_DEFINE(BOXMODEL_OSMIO4K, 1, [osmio4k])
elif test "$BOXMODEL" = "osmio4kplus"; then
AC_DEFINE(BOXMODEL_OSMIO4KPLUS, 1, [osmio4kplus])
elif test "$BOXMODEL" = "raspi"; then
AC_DEFINE(BOXMODEL_RASPI, 1, [raspberry pi])
fi
# all vuplus BOXMODELs
case "$BOXMODEL" in
vusolo4k|vuduo4k|vuduo4kse|vuultimo4k|vuuno4k|vuuno4kse|vuzero4k|vuduo|vuduo2|vuuno|vuultimo)
AC_DEFINE(BOXMODEL_VUPLUS_ALL, 1, [vuplus_all])
;;
esac
# all vuplus arm BOXMODELs
case "$BOXMODEL" in
vusolo4k|vuduo4k|vuduo4kse|vuultimo4k|vuuno4k|vuuno4kse|vuzero4k)
AC_DEFINE(BOXMODEL_VUPLUS_ARM, 1, [vuplus_arm])
;;
esac
# all vuplus mips BOXMODELs
case "$BOXMODEL" in
vuduo|vuduo2|vuuno|vuultimo)
AC_DEFINE(BOXMODEL_VUPLUS_MIPS, 1, [vuplus_mips])
;;
esac
# all dreambox BOXMODELs
case "$BOXMODEL" in
dm7020hd|dm8000|dm800se|dm800sev2|dm820|dm7080|dm900|dm920)
AC_DEFINE(BOXMODEL_DREAMBOX_ALL, 1, [dreambox_all])
;;
esac
# all dreambox arm BOXMODELs
case "$BOXMODEL" in
dm900|dm920)
AC_DEFINE(BOXMODEL_DREAMBOX_ARM, 1, [dreambox_arm])
;;
esac
# all dreambox mips BOXMODELs
case "$BOXMODEL" in
dm7020hd|dm8000|dm800se|dm800sev2|dm820|dm7080)
AC_DEFINE(BOXMODEL_DREAMBOX_MIPS, 1, [dreambox_mips])
;;
esac
])
dnl backward compatiblity
AC_DEFUN([AC_GNU_SOURCE], [
AH_VERBATIM([_GNU_SOURCE], [
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
])dnl
AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
AC_DEFINE([_GNU_SOURCE])
])
AC_DEFUN([AC_PROG_EGREP], [
AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [
if echo a | (grep -E '(a|b)') >/dev/null 2>&1; then
ac_cv_prog_egrep='grep -E'
else
ac_cv_prog_egrep='egrep'
fi
])
EGREP=$ac_cv_prog_egrep
AC_SUBST([EGREP])
])