autogen.sh
author Sam Lantinga <slouken@libsdl.org>
Sun, 07 Jul 2019 09:10:56 -0700
changeset 12928 3c4a4b1077cd
parent 10722 30e271a26a02
permissions -rwxr-xr-x
Fixed bug 4710 - audio/alsa: avoid configuring hardware parameters with only a single period

Anthony Pesch

The previous code first configured the period size using snd_pcm_hw_par-
ams_set_period_size_near. Then, it further narrowed the configuration
space by calling snd_pcm_hw_params_set_buffer_size_near using a buffer
size of 2 times the _requested_ period size in order to try and get a
configuration with only 2 periods. If the configured period size was
larger than the requested size, the second call could inadvertently
narrow the configuration space to contain only a single period.

Rather than fixing the call to snd_pcm_hw_params_set_buffer_size_near
to use a size of 2 times the configured period size, the code has been
changed to use snd_pcm_hw_params_set_periods_min in order to more
clearly explain the intent.
slouken@0
     1
#!/bin/sh
slouken@0
     2
#
slouken@1376
     3
echo "Generating build information using autoconf"
slouken@0
     4
echo "This may take a while ..."
slouken@0
     5
hadess@10398
     6
srcdir=`dirname $0`
hadess@10398
     7
test -z "$srcdir" && srcdir=.
icculus@10722
     8
cd "$srcdir"
hadess@10398
     9
slouken@0
    10
# Regenerate configuration files
slouken@7232
    11
cat acinclude/* >aclocal.m4
slouken@1564
    12
found=false
slouken@1832
    13
for autoconf in autoconf autoconf259 autoconf-2.59
slouken@1564
    14
do if which $autoconf >/dev/null 2>&1; then $autoconf && found=true; break; fi
slouken@1563
    15
done
slouken@1564
    16
if test x$found = xfalse; then
slouken@1564
    17
    echo "Couldn't find autoconf, aborting"
slouken@1564
    18
    exit 1
slouken@1564
    19
fi
slouken@1380
    20
(cd test; sh autogen.sh)
slouken@0
    21
slouken@0
    22
# Run configure for this platform
slouken@0
    23
echo "Now you are ready to run ./configure"