From e4d5844b5a2993dd04e3fc784f035b97c09bef7f Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Mon, 25 May 2015 18:00:05 +0000
Subject: Haiku patch


diff --git a/M4/lrint.m4 b/M4/lrint.m4
index 3e3319e..bd8be74 100644
--- a/M4/lrint.m4
+++ b/M4/lrint.m4
@@ -15,7 +15,7 @@ AC_DEFUN([AC_C99_FUNC_LRINT],
   ac_cv_c99_lrint,
 [
 lrint_save_CFLAGS=$CFLAGS
-CFLAGS="-lm"
+#CFLAGS="-lm"
 AC_TRY_LINK([
 #define		_ISOC9X_SOURCE	1
 #define 	_ISOC99_SOURCE	1
diff --git a/M4/lrintf.m4 b/M4/lrintf.m4
index f921e9e..d3fcf58 100644
--- a/M4/lrintf.m4
+++ b/M4/lrintf.m4
@@ -15,7 +15,7 @@ AC_DEFUN([AC_C99_FUNC_LRINTF],
   ac_cv_c99_lrintf,
 [
 lrintf_save_CFLAGS=$CFLAGS
-CFLAGS="-lm"
+#CFLAGS="-lm"
 AC_TRY_LINK([
 #define		_ISOC9X_SOURCE	1
 #define 	_ISOC99_SOURCE	1
diff --git a/configure.ac b/configure.ac
index 4a718c5..35506a9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -267,8 +267,8 @@ htmldocdir=$prefix/share/doc/libsamplerate0-dev/html
 if test $prefix = "NONE" ; then
 	htmldocdir=/usr/local/share/doc/libsamplerate0-dev/html
 else
-	htmldocdir=$prefix/share/doc/libsamplerate0-dev/html
-	fi
+	htmldocdir=$docdir/libsamplerate0-dev/html
+fi
 
 #====================================================================================
 # Now use the information from the checking stage.
-- 
1.8.3.4

