From 3060fd2a1e5918bc952a45dd832f28349cd0f78e Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 28 Jan 2023 12:06:17 +0100 Subject: [PATCH] acinclude/configure: rework HAVE_LIBSTB_HAL handling; drop USE_STB_HAL Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/b00ccf15a1c0e984b1ad97a2d8e07e2246d81e02 Author: vanhofen Date: 2023-01-28 (Sat, 28 Jan 2023) Origin message was: ------------------ - acinclude/configure: rework HAVE_LIBSTB_HAL handling; drop USE_STB_HAL ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- acinclude.m4 | 12 ------------ configure.ac | 25 +++++++++++++++---------- lib/hardware/audio.h | 4 ++-- lib/hardware/ca.h | 4 ++-- lib/hardware/dmx.h | 4 ++-- lib/hardware/playback.h | 4 ++-- lib/hardware/record.h | 4 ++-- lib/hardware/video.h | 4 ++-- src/Makefile.am | 2 +- src/gui/imageinfo.cpp | 4 ++-- src/gui/imageinfo_ni.cpp | 4 ++-- src/neutrino.cpp | 4 ++-- src/system/settings.h | 2 +- 13 files changed, 35 insertions(+), 42 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 3df70c318..7b238b934 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -594,18 +594,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 365b0e037..693423588 100644 --- a/configure.ac +++ b/configure.ac @@ -353,24 +353,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 @@ -379,7 +385,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 5a4c35812..e3643314e 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/gui/imageinfo.cpp b/src/gui/imageinfo.cpp index 913f6e8cb..b4f1b8194 100644 --- a/src/gui/imageinfo.cpp +++ b/src/gui/imageinfo.cpp @@ -25,7 +25,7 @@ #include #endif -#if USE_STB_HAL +#if HAVE_LIBSTB_HAL #include #endif @@ -399,7 +399,7 @@ void CImageInfo::initBuildDateInfo() void CImageInfo::initHalInfo() { -#if USE_STB_HAL +#if HAVE_LIBSTB_HAL hal_libversion_t ver; hal_get_lib_version(&ver); //libstb-hal version diff --git a/src/gui/imageinfo_ni.cpp b/src/gui/imageinfo_ni.cpp index db0392c57..05e31aede 100644 --- a/src/gui/imageinfo_ni.cpp +++ b/src/gui/imageinfo_ni.cpp @@ -25,7 +25,7 @@ #include #endif -#if USE_STB_HAL +#if HAVE_LIBSTB_HAL #include #endif @@ -331,7 +331,7 @@ void CImageInfoNI::paint() paintLine(xpos, font_info, g_Locale->getText(LOCALE_IMAGEINFO_GUI)); paintLine(xpos + offset, font_info, guiversion.str()); -#if USE_STB_HAL +#if HAVE_LIBSTB_HAL hal_libversion_t halver; hal_get_lib_version(&halver); diff --git a/src/neutrino.cpp b/src/neutrino.cpp index ccd46b5bf..c2c86b6dc 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -251,7 +251,7 @@ CNeutrinoApp::CNeutrinoApp() : configfile('\t') { standby_pressed_at.tv_sec = 0; -#if USE_STB_HAL +#if HAVE_LIBSTB_HAL cCA *CA = NULL; if (!CA) { @@ -333,7 +333,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 db7ba239c..62a8385a5 100644 --- a/src/system/settings.h +++ b/src/system/settings.h @@ -451,7 +451,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