hdajackretask: Use autotools

Start to use autotools as build system, just like the other programs
in the alsa-tools suite.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
David Henningsson 2012-04-13 11:49:21 +02:00
parent 7aa4a74f88
commit d06008f397
7 changed files with 62 additions and 20 deletions

View file

@ -1,3 +1,30 @@
#!/bin/sh
#!/bin/bash
make GITCOMPILE_ARGS="$*"
if test -z "$AUTOMAKE_DIR"; then
if test -d /usr/local/share/automake; then
AUTOMAKE_DIR=/usr/local/share/automake
fi
if test -d /usr/share/automake; then
AUTOMAKE_DIR="/usr/share/automake"
fi
if test -z "$AUTOMAKE_DIR"; then
AUTOMAKE_DIR=/usr/share/`ls /usr/share | grep automake | tail -n 1`
fi
fi
for f in install-sh mkinstalldirs missing; do
cp -av $AUTOMAKE_DIR/$f . || exit 1
done
aclocal $ACLOCAL_FLAGS || exit 1
automake --add-missing --copy || exit 1
touch depcomp || exit 1
autoconf || exit 1
export CFLAGS='-O2 -Wall -pipe -g'
echo "CFLAGS=$CFLAGS"
echo "./configure $@"
./configure $@ || exit 1
unset CFLAGS
if [ -z "$GITCOMPILE_NO_MAKE" ]; then
make || exit 1
fi