diff --git a/acinclude.m4 b/acinclude.m4 index e2ca654b5..a0f5efb04 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -623,18 +623,6 @@ elif test "$BOXTYPE" = "mipsbox"; then AC_DEFINE(HAVE_MIPS_HARDWARE, 1, [building for an mipsbox]) fi -# BOXTYPEs that use libstb-hal -case "$BOXTYPE" in - coolstream) - libstb_hal=no - ;; - *) - AC_DEFINE(HAVE_LIBSTB_HAL, 1, [use libstb-hal]) - libstb_hal=yes - ;; -esac -AM_CONDITIONAL(HAVE_LIBSTB_HAL, test "$libstb_hal" = "yes") - # uclibc AM_CONDITIONAL(HAVE_UCLIBC, test "$targetlibdir/ld-uClibc.so.0") diff --git a/configure.ac b/configure.ac index e3ae955db..dde1f7fd3 100644 --- a/configure.ac +++ b/configure.ac @@ -351,24 +351,30 @@ AC_ARG_WITH(stb-hal-build, [STB_HAL_LIB="-L$withval"], [STB_HAL_LIB=""]) -if test "$BOXTYPE" != coolstream; then - AC_DEFINE(USE_STB_HAL, 1, [use libstb-hal]) +# BOXTYPEs that use libstb-hal +case "$BOXTYPE" in + coolstream) + libstb_hal=no + ;; + *) + libstb_hal=yes + AC_DEFINE(HAVE_LIBSTB_HAL, 1, [use libstb-hal]) + ;; +esac +AM_CONDITIONAL(HAVE_LIBSTB_HAL, test "$libstb_hal" = "yes") + +if test "$libstb_hal" = "yes"; then 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" -fi -AM_CONDITIONAL(USE_STB_HAL, test "$BOXTYPE" != "coolstream") - -if test "$BOXTYPE" = "coolstream"; then +else if test "$BOXMODEL" = "hd1"; then if test -e ${srcdir}/lib/hardware/coolstream/hd1/libcoolstream/nevis_ir.h; then AC_DEFINE(HAVE_COOLSTREAM_NEVIS_IR_H, 1, [Define to 1 if you have the header file.]) fi HWLIB_CFLAGS='-I$(top_srcdir)/lib/hardware/coolstream/hd1/libcoolstream' - fi - - if test "$BOXMODEL" = "hd2"; then + elif test "$BOXMODEL" = "hd2"; then if test -e ${srcdir}/lib/hardware/coolstream/hd2/libcoolstream/cs_ir_generic.h; then AC_DEFINE(HAVE_COOLSTREAM_CS_IR_GENERIC_H, 1, [Define to 1 if you have the header file.]) fi @@ -377,7 +383,6 @@ if test "$BOXTYPE" = "coolstream"; then fi HWLIB_CFLAGS='-I$(top_srcdir)/lib/hardware/coolstream/hd2/libcoolstream' fi - HWLIB_CFLAGS="$HWLIB_CFLAGS "'-I$(top_srcdir)/lib/hardware/coolstream' fi diff --git a/lib/hardware/audio.h b/lib/hardware/audio.h index a2d93938f..9a001205a 100644 --- a/lib/hardware/audio.h +++ b/lib/hardware/audio.h @@ -1,8 +1,8 @@ #if HAVE_CST_HARDWARE #include -#elif USE_STB_HAL +#elif HAVE_LIBSTB_HAL #include #else -#error neither HAVE_CST_HARDWARE nor USE_STB_HAL defined. +#error neither HAVE_CST_HARDWARE nor HAVE_LIBSTB_HAL defined. #error do you need to include config.h? #endif diff --git a/lib/hardware/ca.h b/lib/hardware/ca.h index dd9abf66b..8d6e2b277 100644 --- a/lib/hardware/ca.h +++ b/lib/hardware/ca.h @@ -1,8 +1,8 @@ #if HAVE_CST_HARDWARE #include -#elif USE_STB_HAL +#elif HAVE_LIBSTB_HAL #include #else -#error neither HAVE_CST_HARDWARE nor USE_STB_HAL defined. +#error neither HAVE_CST_HARDWARE nor HAVE_LIBSTB_HAL defined. #error do you need to include config.h? #endif diff --git a/lib/hardware/dmx.h b/lib/hardware/dmx.h index 20e7553a4..fca986dec 100644 --- a/lib/hardware/dmx.h +++ b/lib/hardware/dmx.h @@ -1,8 +1,8 @@ #if HAVE_CST_HARDWARE #include -#elif USE_STB_HAL +#elif HAVE_LIBSTB_HAL #include #else -#error neither HAVE_CST_HARDWARE nor USE_STB_HAL defined. +#error neither HAVE_CST_HARDWARE nor HAVE_LIBSTB_HAL defined. #error do you need to include config.h? #endif diff --git a/lib/hardware/playback.h b/lib/hardware/playback.h index 735a16103..5373eb8cb 100644 --- a/lib/hardware/playback.h +++ b/lib/hardware/playback.h @@ -1,8 +1,8 @@ #if HAVE_CST_HARDWARE #include -#elif USE_STB_HAL +#elif HAVE_LIBSTB_HAL #include #else -#error neither HAVE_CST_HARDWARE nor USE_STB_HAL defined. +#error neither HAVE_CST_HARDWARE nor HAVE_LIBSTB_HAL defined. #error do you need to include config.h? #endif diff --git a/lib/hardware/record.h b/lib/hardware/record.h index bb8313153..89130ca84 100644 --- a/lib/hardware/record.h +++ b/lib/hardware/record.h @@ -1,8 +1,8 @@ #if HAVE_CST_HARDWARE #include -#elif USE_STB_HAL +#elif HAVE_LIBSTB_HAL #include #else -#error neither HAVE_CST_HARDWARE nor USE_STB_HAL defined. +#error neither HAVE_CST_HARDWARE nor HAVE_LIBSTB_HAL defined. #error do you need to include config.h? #endif diff --git a/lib/hardware/video.h b/lib/hardware/video.h index 8493a1975..c476b6ea2 100644 --- a/lib/hardware/video.h +++ b/lib/hardware/video.h @@ -1,10 +1,10 @@ #if HAVE_CST_HARDWARE #include #include -#elif USE_STB_HAL +#elif HAVE_LIBSTB_HAL #include #include #else -#error neither HAVE_CST_HARDWARE nor USE_STB_HAL defined. +#error neither HAVE_CST_HARDWARE nor HAVE_LIBSTB_HAL defined. #error do you need to include config.h? #endif diff --git a/src/Makefile.am b/src/Makefile.am index 4d4e22383..78d5caf0f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -187,7 +187,7 @@ rcsim_SOURCES = rcsim.c rcsim.h bin_PROGRAMS += mdev_helper mdev_helper_SOURCES = mdev_helper.cpp -if USE_STB_HAL +if HAVE_LIBSTB_HAL neutrino_LDADD += \ -lstb-hal neutrino_LDFLAGS = \ diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 821c21630..c8caf2d48 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -247,7 +247,7 @@ CNeutrinoApp::CNeutrinoApp() : configfile('\t') { standby_pressed_at.tv_sec = 0; -#if USE_STB_HAL +#if HAVE_LIBSTB_HAL cCA *CA = NULL; if (!CA) { @@ -329,7 +329,7 @@ const lcd_setting_struct_t lcd_setting[SNeutrinoSettings::LCD_SETTING_COUNT] = {"lcd_show_volume" , DEFAULT_LCD_SHOW_VOLUME }, {"lcd_autodimm" , DEFAULT_LCD_AUTODIMM }, {"lcd_deepbrightness" , DEFAULT_VFD_STANDBYBRIGHTNESS } -#if USE_STB_HAL +#if HAVE_LIBSTB_HAL ,{ "lcd_epgmode" , 0 /*DEFAULT_LCD_EPGMODE*/ } #endif }; diff --git a/src/system/settings.h b/src/system/settings.h index e9eecca8a..d29d9c409 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -454,7 +454,7 @@ struct SNeutrinoSettings LCD_SHOW_VOLUME, LCD_AUTODIMM, LCD_DEEPSTANDBY_BRIGHTNESS, -#if USE_STB_HAL +#if HAVE_LIBSTB_HAL LCD_EPGMODE, #endif LCD_SETTING_COUNT