alsa-utils/gitcompile
Marc Herbert 5b511024e9 gitcompile: restore ACLOCAL_FLAGS ability to use
Fixes cryptic "error macro 'AM_PATH_ALSA' not found in library
configure.ac:22" when attempting a local install as described at
https://thesofproject.github.io/latest/getting_started/build-guide/build-from-scratch.html#build-alsa-lib-and-alsa-utils-from-source

Fixes giant commit f9e6010d5e ("topology: plugins - add Intel nhlt
encoder plugin") which added a second invocation of `aclocal` in 2021
but forgot the extra `$alsa_m4_flags`.

To avoid duplication, do not fix by adding the missing `$alsa_m4_flags`
to the second aclocal invocation. Instead, drop that variable and append
`-I ../alsa-lib/utils` directly to $ACLOCAL_FLAGS

Closes: https://github.com/alsa-project/alsa-utils/pull/272
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2024-08-06 18:39:20 +02:00

28 lines
809 B
Bash
Executable file

#!/bin/bash
if test -d ../alsa-lib/utils && ! test -r `aclocal --print-ac-dir`/alsa.m4; then
ACLOCAL_FLAGS="$ACLOCAL_FLAGS -I ../alsa-lib/utils"
fi
aclocal $ACLOCAL_FLAGS
# save original files to avoid stupid modifications by gettextize
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 $ACLOCAL_FLAGS
autoheader
automake --foreign --copy --add-missing
touch depcomp # for older automake
autoconf
export CFLAGS='-O2 -Wall -W -Wunused-const-variable=0 -pipe -g'
echo "CFLAGS=$CFLAGS"
echo "./configure $@"
./configure $@ || exit 1
unset CFLAGS
if [ -z "$GITCOMPILE_NO_MAKE" ]; then
make
fi