Luna/tools/setup-autoconf.sh
apio 6761b3fcaf
Some checks failed
continuous-integration/drone/push Build is failing
tools: Finally a proper autoconf build?
2023-08-14 11:54:11 +02:00

41 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
set -e
source $(dirname $0)/setup-env.sh
cd $LUNA_ROOT
# libstdc++ needs autoconf (precisely version 2.69) so if the user has an older/more recent version, we must build autoconf from source.
export AUTOCONF_VERSION=2.69
mkdir -p toolchain/tarballs
mkdir -p toolchain/build
if [ ! -f toolchain/tarballs/autoconf-$AUTOCONF_VERSION.tar.gz ]; then
echo "Downloading autoconf (precisely version 2.69)..."
wget -Otoolchain/tarballs/autoconf-$AUTOCONF_VERSION.tar.gz https://ftp.gnu.org/gnu/autoconf/autoconf-$AUTOCONF_VERSION.tar.gz
fi
rm -rf toolchain/build/build-autoconf
rm -rf toolchain/build/autoconf-$AUTOCONF_VERSION
echo "Extracting autoconf (precisely version 2.69)..."
tar xf toolchain/tarballs/autoconf-$AUTOCONF_VERSION.tar.gz -C toolchain/build/
mkdir -p toolchain/build/build-autoconf
cd toolchain/build/build-autoconf
unset CC
unset CXX
unset LD
unset AR
echo "Building autoconf (precisely version 2.69)..."
../autoconf-$AUTOCONF_VERSION/configure --prefix=$LUNA_ROOT/toolchain
make
make install