diff -Nurd qhull-2012.1/Makefile qhull-2012.1.patched/Makefile
--- qhull-2012.1/Makefile	2012-02-19 21:55:57.000000000 -0500
+++ qhull-2012.1.patched/Makefile	2012-02-20 15:22:35.000000000 -0500
@@ -72,7 +72,7 @@
 # You may build the qhull programs without using a library
 # make qhullx
 
-DESTDIR = /usr/local
+DESTDIR = @INSTPREFIX@
 BINDIR	= $(DESTDIR)/bin
 INCDIR	= $(DESTDIR)/include
 LIBDIR	= $(DESTDIR)/lib
@@ -87,14 +87,15 @@
 
 #for Gnu's gcc compiler, -O2 for optimization, -g for debugging
 CC        = gcc
-CC_OPTS1  = -O2 -fPIC -ansi -Isrc/libqhull $(CC_WARNINGS)
+CC_OPTS1  = -O2 -fPIC -ansi -fno-common -Isrc/libqhull $(CC_WARNINGS)
 CXX       = g++
 
 # libqhullcpp must be before libqhull
 CXX_OPTS1 = -O2 -Dqh_QHpointer -Isrc/ -Isrc/libqhullcpp -Isrc/libqhull $(CXX_WARNINGS)
 
 # for shared library link
-CC_OPTS3  =
+CC_OPTS3  = -dynamiclib -install_name @FINKPREFIX@/lib/libqhull.6.3.1.dylib
+CC_OPTS4  = -dynamiclib -install_name @FINKPREFIX@/lib/libqhull_p.6.3.1.dylib
 
 # Define qhull_VERSION in CMakeLists.txt, Makefile, and qhull-warn.pri
 # Truncated version in qhull-exports.def, qhull_p-exports.def, 
@@ -102,7 +103,7 @@
 #  qhull_p.so -- allocated qh_qhT global data structure (qh_QHpointer=1).  Required for libqhullcpp
 #  qhull_m.so -- future version of Qhull with qh_qhT passed as an argument.
 qhull_SOVERSION=6
-SO  = so.6.3.1
+SO  = 6.3.1.dylib
 
 # On MinGW, 
 #   make SO=dll
@@ -515,11 +516,11 @@
 
 lib/libqhull.$(SO): $(LIBQHULLS_OBJS)
 	$(CC) -shared -o $@ $(CC_OPTS3) $^
-	cd lib && ln -f -s libqhull.$(SO) libqhull.so
+	cd lib && ln -f -s libqhull.$(SO) libqhull.dylib
 
 lib/libqhull_p.$(SO): $(LIBQHULLSP_OBJS)
-	$(CC) -shared -o $@ $(CC_OPTS3) $^
-	cd lib && ln -f -s libqhull_p.$(SO) libqhull_p.so
+	$(CC) -shared -o $@ $(CC_OPTS4) $^
+	cd lib && ln -f -s libqhull_p.$(SO) libqhull_p.dylib
 
 # don't use ../qconvex.	 Does not work on Red Hat Linux
 bin/qconvex: src/qconvex/qconvex.o lib/libqhullstatic.a
@@ -550,7 +551,7 @@
 	@echo -e '==   "make SO=dll" and copy lib/libqhull_p.dll to bin/'
 	@echo -e '== If user_eg fails to link, switch to -lqhullstatic_p'
 	@echo -e '===================================================\n'
-	$(CC) -o $@ $< -Dqh_QHpointer  $(CC_OPTS1) $(CC_OPTS3) -Llib -lqhull_p -lm
+	$(CC) -o $@ $< -Dqh_QHpointer  $(CC_OPTS1) -Llib -lqhull_p -lm
 
 # You may use  -lqhullstatic instead of -lqhull 
 bin/user_eg2: src/user_eg2/user_eg2.o lib/libqhull.$(SO)
diff -uNr qhull-2012.1.orig/src/libqhullcpp/QhullIterator.h qhull-2012.1/src/libqhullcpp/QhullIterator.h
--- qhull-2012.1.orig/src/libqhullcpp/QhullIterator.h	2012-01-25 22:32:05.000000000 -0500
+++ qhull-2012.1/src/libqhullcpp/QhullIterator.h	2015-04-11 09:04:07.000000000 -0400
@@ -16,8 +16,7 @@
 #include <assert.h>
 #include <string>
 #include <vector>
-//! Avoid dependence on <iterator>
-namespace std { struct bidirectional_iterator_tag; struct random_access_iterator_tag; }
+#include <iterator>
 
 namespace orgQhull {
 
diff -uNr qhull-2012.1.orig/src/libqhullcpp/QhullLinkedList.h qhull-2012.1/src/libqhullcpp/QhullLinkedList.h
--- qhull-2012.1.orig/src/libqhullcpp/QhullLinkedList.h	2012-01-25 22:32:05.000000000 -0500
+++ qhull-2012.1/src/libqhullcpp/QhullLinkedList.h	2015-04-11 09:05:18.000000000 -0400
@@ -9,7 +9,7 @@
 #ifndef QHULLLINKEDLIST_H
 #define QHULLLINKEDLIST_H
 
-namespace std { struct bidirectional_iterator_tag; struct random_access_iterator_tag; }
+#include <iterator>
 
 #include "QhullError.h"
 
