From 4369b2c61e2bd8f97d80081fa0bcb7b05bba9762 Mon Sep 17 00:00:00 2001
From: Slaven Rezic <slaven@rezic.de>
Date: Sun, 27 Dec 2015 12:46:22 +0100
Subject: [PATCH] fix build for FreeBSD (RT #110653)

---
 Makefile.PL | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile.PL b/Makefile.PL
index d7fb3dd..eac28c2 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -358,8 +358,8 @@ end
     print $log $stdout;
     if ($ok) {
         for my $cmd (["cd", $gdal],
-                     ["./configure"],
-                     ["make", "-j4"],
+                     ["./configure", ($^O eq 'freebsd' ? ("--with-geotiff=/usr/local") : ())],
+                     [($^O eq 'freebsd' ? "gmake" : "make"), "-j4"],
                      ["cd", ".."]) 
         {
             $ok = $step->(@$cmd);
-- 
2.1.2