detect absence of fmax() in libm and activate fallback for generic_set_frequency()

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1282 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Arnim Läuger 17 years ago
parent 9caaa3dbc8
commit 100f135525

@ -1,5 +1,9 @@
2008-06-11 Arnim Laeuger <arniml@users.sourceforge.net>
* src/tap/cable/generic.c (fmax): define fallback in case libm doesn't
provide fmax()
* configure.ac: detect availability of fmax() in libm
* src/bus/bf548_ezkit.c, src/bus/ppc405ep.c, src/bus/sh7727.c,
src/bus/sa1110.c, src/bus/ppc440gx_ebc8.c, src/bus/tx4925.c,
src/bus/sh7750r.c, src/bus/pxa2x0.c, src/bus/bf533_stamp.c,

@ -540,6 +540,13 @@ AS_IF([test "x$relocatable" = xyes], [
AM_CONDITIONAL(JTAG_RELOCATABLE, false)
])
dnl Is fmax() provided by libm?
AC_CHECK_LIB([m], [fmax], [
AC_DEFINE(HAVE_FMAX, 1, [Define if -lm provides fmax()])
])
AC_OUTPUT
dnl

@ -39,6 +39,13 @@
#include <cmd.h>
#ifndef HAVE_FMAX
/* workaround for libm implementations that don't provide the fmax() function */
#define fmax(_f1_,_f2_) ( (_f1_) > (_f2_) ? (_f1_) : (_f2_) )
#endif
#undef VERBOSE
#ifdef VERBOSE

Loading…
Cancel
Save