From: Christian Kastner <debian@kvr.at>
Date: Fri, 4 Jun 2010 23:28:23 +0200
Subject: [PATCH] Link against libm

Upstream's autotools setup does not detect if linking against libm is
necessary, so we extend it to do that.

Forwarded: no
Last-Update: 2014-04-23

Index: libfann-2.1.0~beta~dfsg/configure.in
===================================================================
--- libfann-2.1.0~beta~dfsg.orig/configure.in	2014-04-23 02:04:47.842914729 +0200
+++ libfann-2.1.0~beta~dfsg/configure.in	2014-04-23 02:04:47.838914838 +0200
@@ -6,5 +6,7 @@
 AC_HEADER_STDC
 AC_C_CONST
 AC_HEADER_TIME
+AC_CHECK_LIBM
+AC_SUBST(LIBM)
 AC_CHECK_FUNCS(gettimeofday)
 AC_OUTPUT(Makefile src/Makefile src/include/Makefile fann.pc fann.spec)
Index: libfann-2.1.0~beta~dfsg/src/Makefile.am
===================================================================
--- libfann-2.1.0~beta~dfsg.orig/src/Makefile.am	2014-04-23 02:04:47.842914729 +0200
+++ libfann-2.1.0~beta~dfsg/src/Makefile.am	2014-04-23 02:04:47.838914838 +0200
@@ -10,4 +10,9 @@
 libfixedfann_la_SOURCES = fixedfann.c
 libfann_la_SOURCES = floatfann.c
 
+libfloatfann_la_LIBADD = $(LIBM)
+libdoublefann_la_LIBADD = $(LIBM)
+libfixedfann_la_LIBADD = $(LIBM)
+libfann_la_LIBADD = $(LIBM)
+
 EXTRA_DIST = fann.c fann_io.c fann_train.c fann_train_data.c fann_error.c fann_cascade.c
