- acinclude/configure: some more minor format changes

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2017-12-09 13:01:37 +01:00
committed by Thilo Graf
parent 28450dcca0
commit c091bd6fc9
2 changed files with 36 additions and 31 deletions

View File

@@ -90,7 +90,8 @@ check_path() {
]) ])
dnl expand nested ${foo}/bar dnl expand nested ${foo}/bar
AC_DEFUN([TUXBOX_EXPAND_VARIABLE], [__$1="$2" AC_DEFUN([TUXBOX_EXPAND_VARIABLE], [
__$1="$2"
for __CNT in false false false false true; do dnl max 5 levels of indirection for __CNT in false false false false true; do dnl max 5 levels of indirection
$1=`eval echo "$__$1"` $1=`eval echo "$__$1"`
echo ${$1} | grep -q '\$' || break # 'grep -q' is POSIX, exit if no $ in variable echo ${$1} | grep -q '\$' || break # 'grep -q' is POSIX, exit if no $ in variable
@@ -312,9 +313,10 @@ AC_ARG_WITH(boxtype,
[case "${withval}" in [case "${withval}" in
tripledragon|coolstream|spark|azbox|generic|armbox) tripledragon|coolstream|spark|azbox|generic|armbox)
BOXTYPE="$withval" BOXTYPE="$withval"
;; ;;
*) *)
AC_MSG_ERROR([bad value $withval for --with-boxtype]) ;; AC_MSG_ERROR([bad value $withval for --with-boxtype])
;;
esac], esac],
[BOXTYPE="coolstream"]) [BOXTYPE="coolstream"])
@@ -329,7 +331,7 @@ AS_HELP_STRING([], [valid for generic: raspi]),
else else
AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE]) AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE])
fi fi
;; ;;
nevis|apollo) nevis|apollo)
if test "$BOXTYPE" = "coolstream"; then if test "$BOXTYPE" = "coolstream"; then
if test "$withval" = "nevis"; then if test "$withval" = "nevis"; then
@@ -341,24 +343,24 @@ AS_HELP_STRING([], [valid for generic: raspi]),
else else
AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE]) AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE])
fi fi
;; ;;
hd51) hd51)
if test "$BOXTYPE" = "armbox"; then if test "$BOXTYPE" = "armbox"; then
BOXMODEL="$withval" BOXMODEL="$withval"
else else
AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE]) AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE])
fi fi
;; ;;
raspi) raspi)
if test "$BOXTYPE" = "generic"; then if test "$BOXTYPE" = "generic"; then
BOXMODEL="$withval" BOXMODEL="$withval"
else else
AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE]) AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE])
fi fi
;; ;;
*) *)
AC_MSG_ERROR([unsupported value $withval for --with-boxmodel]) AC_MSG_ERROR([unsupported value $withval for --with-boxmodel])
;; ;;
esac], esac],
[test "$BOXTYPE" = "coolstream" && BOXMODEL="hd1" || true]) [test "$BOXTYPE" = "coolstream" && BOXMODEL="hd1" || true])

View File

@@ -81,7 +81,7 @@ if test -z "$OGG_CFLAGS" ; then
TUXBOX_APPS_LIB_PKGCONFIG(OGG,ogg) TUXBOX_APPS_LIB_PKGCONFIG(OGG,ogg)
fi fi
fi fi # test "$enable_ffmpegdec"
TUXBOX_APPS_LIB_PKGCONFIG(SWRESAMPLE,libswresample) TUXBOX_APPS_LIB_PKGCONFIG(SWRESAMPLE,libswresample)
@@ -96,14 +96,12 @@ TUXBOX_APPS_LIB_PKGCONFIG(CURL,libcurl)
## For the check you must use the corresponding libtool number as version number, ## For the check you must use the corresponding libtool number as version number,
## see freetype source code docs/VERSIONS.TXT ## see freetype source code docs/VERSIONS.TXT
PKG_CHECK_MODULES([FREETYPE], [freetype2 >= 16.2.10], PKG_CHECK_MODULES([FREETYPE], [freetype2 >= 16.2.10], [
[echo "freetype2 >= 2.5.0 found"], [ echo "freetype2 >= 2.5.0 found"
## If freetype is not found: ], [
## Activate this line if you want to search with freetype-config instead echo "freetype2 >= 2.5.0 not found, use alternative search method with freetype-config"
[echo "freetype2 >= 2.5.0 not found, use alternative search method with freetype-config"] #AC_MSG_ERROR([freetype2 >= 2.5.0 not found])
## Activate this line if you want to abort ])
# AC_MSG_ERROR([freetype2 >= 2.5.0 not found])
])
# fallback to curl-config (which is ugly for cross-compilation) # fallback to curl-config (which is ugly for cross-compilation)
if test -z "$CURL_LIBS" -a -z "$CURL_CFLAGS"; then if test -z "$CURL_LIBS" -a -z "$CURL_CFLAGS"; then
@@ -115,16 +113,17 @@ if test -z "$FREETYPE_LIBS" -a -z "$FREETYPE_CFLAGS"; then
TUXBOX_APPS_LIB_CONFIG(FREETYPE,freetype-config) TUXBOX_APPS_LIB_CONFIG(FREETYPE,freetype-config)
CPPFLAGS+=" $FREETYPE_CFLAGS" CPPFLAGS+=" $FREETYPE_CFLAGS"
AC_MSG_CHECKING([whether FreeType version is 2.5.0 or higher]) AC_MSG_CHECKING([whether FreeType version is 2.5.0 or higher])
AC_TRY_CPP([ AC_TRY_CPP([
#include <ft2build.h> #include <ft2build.h>
#include FT_FREETYPE_H #include FT_FREETYPE_H
#if FREETYPE_MAJOR < 2 || (FREETYPE_MAJOR == 2 && FREETYPE_MINOR < 5) #if FREETYPE_MAJOR < 2 || (FREETYPE_MAJOR == 2 && FREETYPE_MINOR < 5)
#error Freetype version too low. #error Freetype version too low.
#endif #endif
], ], [
[AC_MSG_RESULT(yes)], AC_MSG_RESULT(yes)
[AC_MSG_ERROR([Need FreeType library version 2.5.0 or higher]) ], [
]) AC_MSG_ERROR([Need FreeType library version 2.5.0 or higher])
])
fi fi
TUXBOX_APPS_LIB_PKGCONFIG(PNG,libpng) TUXBOX_APPS_LIB_PKGCONFIG(PNG,libpng)
@@ -206,11 +205,15 @@ AC_ARG_ENABLE(lua,
if test "$enable_lua" = "yes"; then if test "$enable_lua" = "yes"; then
AC_DEFINE(ENABLE_LUA, 1, [include Lua support]) AC_DEFINE(ENABLE_LUA, 1, [include Lua support])
PKG_CHECK_MODULES([LUA], [lua >= 5.2], echo "lua >= 5.2 found", [ PKG_CHECK_MODULES([LUA], [lua >= 5.2], [
PKG_CHECK_MODULES([LUA], [lua5.2 >= 5.2], echo "lua5.2 found", [ echo "lua >= 5.2 found"
echo "=> lualib not found, assuming static lua in linker path..." ], [
PKG_CHECK_MODULES([LUA], [lua5.2 >= 5.2], [
echo "lua5.2 found"
], [
echo "lualib not found, assuming static lua in linker path..."
LUA_LIBS="-llua -ldl" LUA_LIBS="-llua -ldl"
AC_DEFINE(STATIC_LUAPOSIX,1,[Define to 1 for static lua build.]) AC_DEFINE(STATIC_LUAPOSIX, 1, [Define to 1 for static lua build.])
]) ])
]) ])
# hack... # hack...