# Checks for programs.
AC_PROG_CC
+AC_PROG_AWK
AC_SET_MAKE
if test "x$GCC" = xyes; then
gcc_werror=-Werror
fi
AC_DEFINE_UNQUOTED([BROWSER],["$browser"],[HTML viewer])
+# Figure out what version of sox is installed
+AC_CACHE_CHECK([sox version],[rjk_cv_soxver],[
+ rjk_cv_soxver=UNKNOWN
+ if sox --version > /dev/null 2>&1; then
+ rjk_cv_soxver=`sox --version|$AWK '{ if(match($0, /[[0-9\.]]+/)) print substr($0,RSTART,RLENGTH)}'`
+ else
+ rjk_cv_soxver=`sox -h 2>&1|$AWK '/Version/ { if(match($0, /[[0-9\.]]+/)) print substr($0,RSTART,RLENGTH)}'`
+ fi
+])
+
+# Decide what command line options to use
+#
+# sox version endian bits deployed
+# 12.17.9 -x -[bwld] debian etch, ubuntu dapper
+# 14.0.0 -x/-[BL] -[bwld] ubuntu hardy
+# 14.0.1 -x/-[BL] -[1248] debian lenny
+# 14.2.0 -x/-[BL] -[1248] debian sid (at 2008-12)
+
+AC_CACHE_CHECK([default sox generation],[rjk_cv_soxgen],[
+ case $rjk_cv_soxver in
+ [[0-9]].* | 1[[0123]].* )
+ rjk_cv_soxgen=0
+ ;;
+ * )
+ rjk_cv_soxgen=1
+ ;;
+ esac
+])
+AC_DEFINE_UNQUOTED([DEFAULT_SOX_GENERATION],[$rjk_cv_soxgen],
+ [default sox generation])
+
AC_ARG_WITH([server],
[AS_HELP_STRING([--without-server],
[do not build server])],
the generation is 0) or \fB\-\fIbits\fR, \fB\-L\fR etc (if it is 1).
See the documentation for your installed copy of \fBsox\fR to determine
which you need.
-The default is 0.
+The default is set according to the version of sox found when DisOrder was
+built.
+If you run on a system with a different version of sox, you will need to
+set this option.
.TP
.B speaker_backend \fINAME
This is an alias for \fBapi\fR; see above.
c->reminder_interval = 600; /* 10m */
c->new_bias_age = 7 * 86400; /* 1 week */
c->new_bias = 4500000; /* 50 times the base weight */
+ c->sox_generation = DEFAULT_SOX_GENERATION;
/* Default stopwords */
if(config_set(&cs, (int)NDEFAULT_STOPWORDS, (char **)default_stopwords))
exit(1);