TERMUX_PKG_ESSENTIAL=""
TERMUX_PKG_CONFLICTS="" # https://www.debian.org/doc/debian-policy/ch-relationships.html#s-conflicts
TERMUX_PKG_CONFFILES=""
+TERMUX_PKG_INCLUDE_IN_DEVPACKAGE=""
# Set if a host build should be done in TERMUX_PKG_HOSTBUILD_DIR:
TERMUX_PKG_HOSTBUILD=""
TERMUX_PKG_MAINTAINER="Fredrik Fornwall <fredrik@fornwall.net>"
set -e -o pipefail
export PATH=$TERMUX_PKG_TMPDIR/config-scripts:$PATH
+ # See http://wiki.buici.com/xwiki/bin/view/Programing+C+and+C%2B%2B/Autoconf+and+RPL_MALLOC
+ # about this problem which may cause linker errors in test scripts not undef:ing malloc and
+ # also cause problems with e.g. malloc interceptors such as libgc:
+ local AVOID_AUTOCONF_WRAPPERS="ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes"
+
$TERMUX_PKG_SRCDIR/configure \
--disable-dependency-tracking \
--prefix=$TERMUX_PREFIX \
--disable-rpath --disable-rpath-hack \
$HOST_FLAG \
+ $AVOID_AUTOCONF_WRAPPERS \
$TERMUX_PKG_EXTRA_CONFIGURE_ARGS \
$DISABLE_NLS \
$ENABLE_SHARED \
if [ -d include -a -z "${TERMUX_PKG_NO_DEVELSPLIT}" ]; then
# Add virtual -dev sub package if there are include files:
_DEVEL_SUBPACKAGE_FILE=$TERMUX_PKG_TMPDIR/${TERMUX_PKG_NAME}-dev.subpackage.sh
- echo TERMUX_SUBPKG_INCLUDE=\"include share/man/man3 lib/pkgconfig share/aclocal\" > $_DEVEL_SUBPACKAGE_FILE
+ echo TERMUX_SUBPKG_INCLUDE=\"include share/man/man3 lib/pkgconfig share/aclocal $TERMUX_PKG_INCLUDE_IN_DEVPACKAGE\" > $_DEVEL_SUBPACKAGE_FILE
echo TERMUX_SUBPKG_DESCRIPTION=\"Development files for ${TERMUX_PKG_NAME}\" >> $_DEVEL_SUBPACKAGE_FILE
echo TERMUX_SUBPKG_DEPENDS=\"$TERMUX_PKG_NAME\" >> $_DEVEL_SUBPACKAGE_FILE
fi