mirror of https://github.com/ericonr/sndio.git
add a hook to configure precision
This commit is contained in:
parent
6b391a082b
commit
35beeb5513
|
@ -5,7 +5,7 @@ INCLUDE = -I../libsndio -I../bsd-compat
|
||||||
LIB = -L../libsndio
|
LIB = -L../libsndio
|
||||||
|
|
||||||
# extra defines (-D options)
|
# extra defines (-D options)
|
||||||
DEFS = -DDEBUG @defs@
|
DEFS = -DDEBUG -DADATA_BITS=@precision@ @defs@
|
||||||
|
|
||||||
# extra libraries (-l options)
|
# extra libraries (-l options)
|
||||||
LDADD = -lsndio @ldadd@
|
LDADD = -lsndio @ldadd@
|
||||||
|
|
|
@ -12,6 +12,7 @@ Usage: configure [options]
|
||||||
--includedir=DIR install header files in DIR [\$prefix/include]
|
--includedir=DIR install header files in DIR [\$prefix/include]
|
||||||
--libdir=DIR install libraries in DIR [\$prefix/lib]
|
--libdir=DIR install libraries in DIR [\$prefix/lib]
|
||||||
--mandir=DIR install man pages in DIR [\$prefix/man]
|
--mandir=DIR install man pages in DIR [\$prefix/man]
|
||||||
|
--precision=NUMBER aucat processing precision [$precision]
|
||||||
--enable-alsa enable alsa backend [$alsa]
|
--enable-alsa enable alsa backend [$alsa]
|
||||||
--disable-alsa disable alsa backend
|
--disable-alsa disable alsa backend
|
||||||
--enable-sun enable sun backend [$sun]
|
--enable-sun enable sun backend [$sun]
|
||||||
|
@ -26,6 +27,7 @@ prefix=/usr/local # where to install sndio
|
||||||
so="libsndio.so.\${MAJ}.\${MIN}" # shared libs to build
|
so="libsndio.so.\${MAJ}.\${MIN}" # shared libs to build
|
||||||
alsa=no # do we want alsa support ?
|
alsa=no # do we want alsa support ?
|
||||||
sun=no # do we want sun support ?
|
sun=no # do we want sun support ?
|
||||||
|
precision=16 # aucat arithmetic precision
|
||||||
unset vars # variables passed as arguments
|
unset vars # variables passed as arguments
|
||||||
unset bindir # path where to install binaries
|
unset bindir # path where to install binaries
|
||||||
unset datadir # path where to install doc
|
unset datadir # path where to install doc
|
||||||
|
@ -87,6 +89,13 @@ for i; do
|
||||||
--disable-sun)
|
--disable-sun)
|
||||||
sun=no
|
sun=no
|
||||||
shift;;
|
shift;;
|
||||||
|
--precision=*)
|
||||||
|
precision="${i#--precision=}"
|
||||||
|
if [ "$precision" != 16 -a "$precision" != 24 ]; then
|
||||||
|
echo "$i: only 16 and 24 are supported" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
shift;;
|
||||||
CC=*|CFLAGS=*|LDFLAGS=*)
|
CC=*|CFLAGS=*|LDFLAGS=*)
|
||||||
vars="$vars$i$nl"
|
vars="$vars$i$nl"
|
||||||
shift;;
|
shift;;
|
||||||
|
@ -133,6 +142,7 @@ do
|
||||||
-e "s:@ldadd@:$ldadd:" \
|
-e "s:@ldadd@:$ldadd:" \
|
||||||
-e "s:@so@:$so:" \
|
-e "s:@so@:$so:" \
|
||||||
-e "s:@vars@:${vars}:" \
|
-e "s:@vars@:${vars}:" \
|
||||||
|
-e "s:@precision@:$precision:" \
|
||||||
< $makefile.in > $makefile
|
< $makefile.in > $makefile
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -142,6 +152,7 @@ echo "datadir.................. $datadir"
|
||||||
echo "includedir............... $includedir"
|
echo "includedir............... $includedir"
|
||||||
echo "libdir................... $libdir"
|
echo "libdir................... $libdir"
|
||||||
echo "mandir................... $mandir"
|
echo "mandir................... $mandir"
|
||||||
|
echo "precision................ $precision"
|
||||||
echo "alsa..................... $alsa"
|
echo "alsa..................... $alsa"
|
||||||
echo "sun...................... $sun"
|
echo "sun...................... $sun"
|
||||||
echo
|
echo
|
||||||
|
|
Loading…
Reference in New Issue