acinclude: sync with neutrino

Origin commit data
------------------
Branch: master
Commit: 60857c44b6
Author: vanhofen <vanhofen@gmx.de>
Date: 2023-01-29 (Sun, 29 Jan 2023)

Origin message was:
------------------
- acinclude: sync with neutrino

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2023-01-29 19:18:46 +01:00
parent f070e63fda
commit d86fe853a0

View File

@@ -1,5 +1,5 @@
AC_DEFUN([TUXBOX_APPS], [ AC_DEFUN([TUXBOX_APPS], [
AM_CONFIG_HEADER(config.h) AC_CONFIG_HEADERS(config.h)
AM_MAINTAINER_MODE AM_MAINTAINER_MODE
AC_GNU_SOURCE AC_GNU_SOURCE
@@ -9,10 +9,15 @@ AC_ARG_WITH(target,
[TARGET="$withval"], [TARGET="$withval"],
[TARGET="native"]) [TARGET="native"])
AC_ARG_WITH(targetroot,
AS_HELP_STRING([--with-targetroot=PATH], [the target root (only applicable in native mode)]),
[TARGET_ROOT="$withval"],
[TARGET_ROOT="NONE"])
AC_ARG_WITH(targetprefix, AC_ARG_WITH(targetprefix,
AS_HELP_STRING([--with-targetprefix=PATH], [prefix relative to target root (only applicable in cdk mode)]), AS_HELP_STRING([--with-targetprefix=PATH], [prefix relative to target root, e.g. /usr (only applicable in cdk mode)]),
[TARGET_PREFIX="$withval"], [TARGET_PREFIX="$withval"],
[TARGET_PREFIX=""]) [TARGET_PREFIX="NONE"])
AC_ARG_WITH(debug, AC_ARG_WITH(debug,
AS_HELP_STRING([--without-debug], [disable debugging code @<:@default=no@:>@]), AS_HELP_STRING([--without-debug], [disable debugging code @<:@default=no@:>@]),
@@ -29,40 +34,48 @@ AC_MSG_CHECKING(target)
if test "$TARGET" = "native"; then if test "$TARGET" = "native"; then
AC_MSG_RESULT(native) AC_MSG_RESULT(native)
if test "$prefix" = "NONE"; then
prefix=/usr/local
fi
if test "$TARGET_ROOT" = "NONE"; then
AC_MSG_ERROR([invalid targetroot, you need to specify one in native mode])
TARGET_ROOT=""
fi
TARGET_PREFIX=$prefix
if test "$CFLAGS" = "" -a "$CXXFLAGS" = ""; then if test "$CFLAGS" = "" -a "$CXXFLAGS" = ""; then
CFLAGS="-Wall -O2 -pipe $DEBUG_CFLAGS" CFLAGS="-Wall -O2 -pipe $DEBUG_CFLAGS"
CXXFLAGS="-Wall -O2 -pipe $DEBUG_CFLAGS" CXXFLAGS="-Wall -O2 -pipe $DEBUG_CFLAGS"
fi fi
if test "$prefix" = "NONE"; then
prefix=/usr/local
fi
targetprefix=$prefix
TARGET_PREFIX=$prefix
AC_DEFINE_UNQUOTED(TARGET_PREFIX, "$TARGET_PREFIX", [The targets prefix])
elif test "$TARGET" = "cdk"; then elif test "$TARGET" = "cdk"; then
AC_MSG_RESULT(cdk) 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 if test "$prefix" = "NONE"; then
AC_MSG_ERROR([invalid prefix, you need to specify one in cdk mode]) AC_MSG_ERROR([invalid prefix, you need to specify one in cdk mode])
fi fi
if test "$TARGET_PREFIX" != "NONE"; then
AC_DEFINE_UNQUOTED(TARGET_PREFIX, "$TARGET_PREFIX", [The targets prefix]) TARGET_ROOT=""
fi
if test "$TARGET_PREFIX" = "NONE"; then if test "$TARGET_PREFIX" = "NONE"; then
AC_MSG_ERROR([invalid targetprefix, you need to specify one in cdk mode]) AC_MSG_ERROR([invalid targetprefix, you need to specify one in cdk mode])
TARGET_PREFIX="" TARGET_PREFIX=""
fi fi
if test "$CC" = "" -a "$CXX" = ""; then
AC_MSG_ERROR([you need to specify variables CC or CXX in cdk mode])
fi
if test "$CFLAGS" = "" -o "$CXXFLAGS" = ""; then
AC_MSG_ERROR([you need to specify variables CFLAGS and CXXFLAGS in cdk mode])
fi
else else
AC_MSG_RESULT(none) AC_MSG_RESULT(none)
AC_MSG_ERROR([invalid target $TARGET, choose on from native,cdk]); AC_MSG_ERROR([invalid target "$TARGET", choose "native" or "cdk"]);
fi fi
AC_DEFINE_UNQUOTED([TARGET], ["$TARGET"], [target for compilation])
AC_DEFINE_UNQUOTED([TARGET_ROOT], ["$TARGET_ROOT"], [native: the target root; cdk: empty])
AC_DEFINE_UNQUOTED([TARGET_PREFIX], ["$TARGET_PREFIX"], [native: auto-assigned path; cdk: path relative to target root])
if test "$exec_prefix" = "NONE"; then if test "$exec_prefix" = "NONE"; then
exec_prefix=$prefix exec_prefix=$prefix
fi fi