From a1a4855588d674e61491802fc9d4f8131d3c377b Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Fri, 22 Aug 2014 16:28:23 +0000
Subject: Haiku patch


diff --git a/configure.ac b/configure.ac
index 7172bee..28e1906 100644
--- a/configure.ac
+++ b/configure.ac
@@ -125,7 +125,7 @@ if test "$with_zip" != "" -a "x$with_zip" != "xno" ; then
     AC_CHECK_HEADERS([zlib.h],, [AC_MSG_ERROR([cannot find zlib.h, bailing out])])
     AC_SEARCH_LIBS([inflateInit_], [z],
                  [ZIP_CONFIG=yes], [ZIP_CONFIG=no],
-                 [-L$with_zip/lib -lm])
+                 [-L$with_zip/lib])
 
 else
     AC_MSG_CHECKING([for zlib])
@@ -167,7 +167,7 @@ if test "$with_jpeg" = "no" -o "$with_jpeg" = "" ; then
 else
     AC_SEARCH_LIBS([jinit_compress_master], [jpeg],
                  [JPEG_CONFIG=yes], [JPEG_CONFIG=no],
-                 [-L$with_jpeg/lib -lm])
+                 [-L$with_jpeg/lib])
 fi
 
 if test "${JPEG_CONFIG}" != "no" ; then
@@ -208,19 +208,19 @@ if test "$with_libtiff" != "" ; then
   fi
   LIBS_SAVED="$LIBS"
   AC_CHECK_LIB(tiff,TIFFOpen,[TIFF_CONFIG=yes],
-               AC_MSG_ERROR([failed to link with -ltiff to find TIFFOpen]),-lm)
+               AC_MSG_ERROR([failed to link with -ltiff to find TIFFOpen]),)
   AC_CHECK_LIB(tiff,TIFFMergeFieldInfo,[TIFF_CONFIG=yes],
                AC_MSG_ERROR([Libtiff 3.6.0 Beta or later required for this version of
-libgeotiff. Please upgrade or use an older version of libgeotiff.]),-lm)
+libgeotiff. Please upgrade or use an older version of libgeotiff.]),)
   LIBS="$LIBS_SAVED"
 else
   AC_CHECK_LIB(tiff,TIFFOpen,[TIFF_CONFIG=yes],
                AC_MSG_ERROR([You will need to substantially rewrite libxtiff to
-build libgeotiff without libtiff]),-lm)
+build libgeotiff without libtiff]),)
   LIBS_SAVED="$LIBS"
   AC_CHECK_LIB(tiff,TIFFMergeFieldInfo,[TIFF_CONFIG=yes],
                AC_MSG_ERROR([Libtiff 3.6.0 Beta or later required for this version of
-libgeotiff. Please upgrade libtiff or use an older version of libgeotiff.]),-lm)
+libgeotiff. Please upgrade libtiff or use an older version of libgeotiff.]),)
   LIBS="$LIBS -ltiff"
   TIFF_INC=
   TIFF_CONFIG="yes"
@@ -280,13 +280,13 @@ elif test "$PROJ_LIB" != "" -a "$PROJ_INC" != "" ; then
   PROJ_INC=-I$PROJ_INC
 
   AC_SUBST(PROJ_INC,$PROJ_INC)
-  AC_DEFINE(HAVE_PROJECTS_H)
-  AC_DEFINE(HAVE_LIBPROJ)
+  AC_DEFINE([HAVE_PROJECTS_H], [], [Description])
+  AC_DEFINE([HAVE_LIBPROJ], [], [Description])
   AC_SUBST([HAVE_LIBPROJ])
   PROJ_CONFIG="yes"
 
 else
-  AC_CHECK_LIB(proj,pj_init,,,-lm)
+  AC_CHECK_LIB(proj,pj_init,,,)
   AC_CHECK_HEADERS(proj_api.h,,)
   PROJ_CONFIG="yes"
 fi
-- 
1.8.3.4

