$OpenBSD: patch-configure,v 1.13 2016/05/25 20:53:45 landry Exp $

chunk 1&2: adapt paths for our openjp2 install

chunk 3: fix libqhull detection under /usr/local (https://trac.osgeo.org/gdal/ticket/6522)
--- configure.orig	Mon Apr 25 19:35:51 2016
+++ configure	Sun May 22 21:15:52 2016
@@ -23677,9 +23677,9 @@ fi
         LIBS="-lopenjp2 $LIBS"
     fi
   else
-    for ac_header in openjpeg-2.1/openjpeg.h
+    for ac_header in openjp2/openjpeg.h
 do :
-  ac_fn_c_check_header_mongrel "$LINENO" "openjpeg-2.1/openjpeg.h" "ac_cv_header_openjpeg_2_1_openjpeg_h" "$ac_includes_default"
+  ac_fn_c_check_header_mongrel "$LINENO" "openjp2/openjpeg.h" "ac_cv_header_openjpeg_2_1_openjpeg_h" "$ac_includes_default"
 if test "x$ac_cv_header_openjpeg_2_1_openjpeg_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_OPENJPEG_2_1_OPENJPEG_H 1
@@ -23743,7 +23743,7 @@ else
   HAVE_OPENJPEG=yes
   if test -r $with_openjpeg/include/openjpeg-2.0/openjpeg.h ; then
     EXTRA_INCLUDES="-I$with_openjpeg/include $EXTRA_INCLUDES"
-  elif test -r $with_openjpeg/include/openjpeg-2.1/openjpeg.h ; then
+  elif test -r $with_openjpeg/include/openjp2/openjpeg.h ; then
     OPENJPEG_VERSION=20100
     EXTRA_INCLUDES="-I$with_openjpeg/include $EXTRA_INCLUDES"
   else
@@ -29227,7 +29227,7 @@ fi
         if test -f /usr/include/libqhull/libqhull.h; then
             EXTRA_INCLUDES="-I/usr/include/libqhull $EXTRA_INCLUDES"
         else
-            EXTRA_INCLUDES="-I/usr/local/include/qhull $EXTRA_INCLUDES"
+            EXTRA_INCLUDES="-I/usr/local/include/libqhull $EXTRA_INCLUDES"
         fi
         LIBS="-lqhull $LIBS"
     fi
