Changeset 8324

Show
Ignore:
Timestamp:
05/08/08 00:17:55
Author:
eb
Message:

better fix for ticket:243

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gnuradio/trunk/configure.ac

    r8244 r8324  
    153153AC_CHECK_LIB(m, trunc, [AC_DEFINE([HAVE_TRUNC],[1],[Define to 1 if your system has `trunc'.])]) 
    154154AC_CHECK_LIB(m, exp10, [AC_DEFINE([HAVE_EXP10],[1],[Define to 1 if your system has 'exp10'.])]) 
     155AC_CHECK_LIB(m, log2, [AC_DEFINE([HAVE_LOG2],[1],[Define to 1 if your system has 'log2'.])]) 
    155156#AC_FUNC_MKTIME 
    156157 
  • gnuradio/trunk/gnuradio-core/src/lib/viterbi/metrics.c

    r8318 r8324  
    3131 */ 
    3232 
     33#ifdef HAVE_CONFIG_H 
     34#include <config.h> 
     35#endif 
     36 
    3337/* Symbols are offset-binary, with 128 corresponding to an erased (no 
    3438 * information) symbol 
     
    4145/* Normal function integrated from -Inf to x. Range: 0-1 */ 
    4246#define normal(x)       (0.5 + 0.5*erf((x)/M_SQRT2)) 
     47 
     48/* Logarithm base 2 */  
     49double log2(double);            /* declaration seems to be missing from some math.h's */ 
     50#if !defined(HAVE_LOG2) 
     51#define log2(x) (log(x)*M_LOG2E) 
     52#endif 
    4353 
    4454/* Generate log-likelihood metrics for 8-bit soft quantized channel