From 35beeb5513ddba1b78c65b38055826a976ff5c82 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Wed, 10 Nov 2010 15:08:37 +0100 Subject: [PATCH] add a hook to configure precision --- aucat/Makefile.in | 2 +- configure | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/aucat/Makefile.in b/aucat/Makefile.in index 4820c32..4301807 100644 --- a/aucat/Makefile.in +++ b/aucat/Makefile.in @@ -5,7 +5,7 @@ INCLUDE = -I../libsndio -I../bsd-compat LIB = -L../libsndio # extra defines (-D options) -DEFS = -DDEBUG @defs@ +DEFS = -DDEBUG -DADATA_BITS=@precision@ @defs@ # extra libraries (-l options) LDADD = -lsndio @ldadd@ diff --git a/configure b/configure index 33ee95d..8ede036 100755 --- a/configure +++ b/configure @@ -12,6 +12,7 @@ Usage: configure [options] --includedir=DIR install header files in DIR [\$prefix/include] --libdir=DIR install libraries in DIR [\$prefix/lib] --mandir=DIR install man pages in DIR [\$prefix/man] +--precision=NUMBER aucat processing precision [$precision] --enable-alsa enable alsa backend [$alsa] --disable-alsa disable alsa backend --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 alsa=no # do we want alsa support ? sun=no # do we want sun support ? +precision=16 # aucat arithmetic precision unset vars # variables passed as arguments unset bindir # path where to install binaries unset datadir # path where to install doc @@ -87,6 +89,13 @@ for i; do --disable-sun) sun=no 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=*) vars="$vars$i$nl" shift;; @@ -133,6 +142,7 @@ do -e "s:@ldadd@:$ldadd:" \ -e "s:@so@:$so:" \ -e "s:@vars@:${vars}:" \ + -e "s:@precision@:$precision:" \ < $makefile.in > $makefile done @@ -142,6 +152,7 @@ echo "datadir.................. $datadir" echo "includedir............... $includedir" echo "libdir................... $libdir" echo "mandir................... $mandir" +echo "precision................ $precision" echo "alsa..................... $alsa" echo "sun...................... $sun" echo