diff --git a/configure-android b/configure-android new file mode 100755 index 0000000..30dc1b2 --- /dev/null +++ b/configure-android @@ -0,0 +1,75 @@ +#!/bin/bash + +# +# Copyright (C) 2025 KonstaKANG +# +# SPDX-License-Identifier: GPL-2.0-or-later +# + +if [ ! -d "$ANDROID_NDK_HOME" ]; then + echo "ANDROID_NDK_HOME environment variable is not properly set!" + exit 1 +fi + +export TOOLCHAIN=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64 + +export TARGET=aarch64-linux-android +export API=35 +export CC="$TOOLCHAIN/bin/clang --target=$TARGET$API" +export CXX="$TOOLCHAIN/bin/clang++ --target=$TARGET$API" +export AR=$TOOLCHAIN/bin/llvm-ar +export AS=$CC +export LD=$TOOLCHAIN/bin/ld +export RANLIB=$TOOLCHAIN/bin/llvm-ranlib +export STRIP=$TOOLCHAIN/bin/llvm-strip + +echo "Running autoconf..." +aclocal -I ../alsa-lib/utils +cp Makefile.am Makefile.am.ok +cp configure.ac configure.ac.ok +gettextize -c -f --no-changelog +echo "EXTRA_DIST = gettext.m4" > m4/Makefile.am +cp Makefile.am.ok Makefile.am +cp configure.ac.ok configure.ac +touch ltconfig +libtoolize --force --copy --automake +aclocal -I ../alsa-lib/utils +autoheader +automake --foreign --copy --add-missing +touch depcomp +autoconf + +ALSA_CONFIG=" \ +--datadir=/vendor/usr/share \ +--disable-alsatest \ +--host=aarch64-linux" + +echo "Generating configuration..." +echo "./configure $ALSA_CONFIG $TARGET" +./configure $ALSA_CONFIG $TARGET + +cat > include/version.h <