#!/bin/bash

libtoolize --force --copy --automake
aclocal $alsa_m4_flags $ACLOCAL_FLAGS
# save original files to avoid stupid modifications by gettextize
autoheader
automake --foreign --copy --add-missing
touch depcomp		# for older automake
autoconf
export CFLAGS='-O2 -Wall -pipe -g'
echo "CFLAGS=$CFLAGS"
echo "./configure $@"
./configure $@ || exit 1
unset CFLAGS
if [ -z "$GITCOMPILE_NO_MAKE" ]; then
  make
fi
