$NetBSD: patch-configure,v 1.4 2017/06/19 20:14:45 adam Exp $

Remove unwanted compiler flags.

--- configure.orig	2017-04-05 16:21:29.000000000 +0000
+++ configure
@@ -2,7 +2,7 @@
 
 CONFIG="config.mk"
 PREFIX="/usr/local"
-VERSION=$(grep LIQ_VERSION_STRING libimagequant.h | grep -Eo "2\.[0-9.]+")
+VERSION=$(awk -F\" '/LIQ_VERSION_STRING/ {print $2}' libimagequant.h)
 
 DEBUG=
 SSE=auto
@@ -125,7 +125,7 @@ cflags "-std=c99 -I."
 
 # DEBUG
 if [ -z "$DEBUG" ]; then
-    cflags "-O3 -DNDEBUG"
+    cflags "-DNDEBUG"
     status "Debug" "no"
 else
     cflags "-O1 -g"
@@ -163,15 +163,9 @@ if [ -n "$OPENMP" ]; then
     else
         OPENMPFLAGS="-fopenmp"
     fi
-    if [[ "$("$CC" -xc -E $OPENMPFLAGS <(echo "#ifdef _OPENMP
-           #include <omp.h>
-           #endif") 2>&1)" =~ "omp_get_thread_num" ]]; then
         cflags "$OPENMPFLAGS"
         lflags "$OPENMPFLAGS"
         status "OpenMP" "yes"
-    else
-        error "OpenMP" "not supported by compiler (please install a compiler that supports OpenMP (e.g. gcc) and specify it with the CC= argument)"
-    fi
 else
     # silence warnings about omp pragmas
     cflags "-Wno-unknown-pragmas"
@@ -179,20 +173,10 @@ else
     status "OpenMP" "no"
 fi
 
-# Cocoa
-if [[ "$OSTYPE" =~ "darwin" ]]; then
-    cflags "-mmacosx-version-min=10.6"
-    lflags "-mmacosx-version-min=10.6"
-fi
 
 if [[ "$OSTYPE" =~ "darwin" ]]; then
     SOLIBSUFFIX=dylib
 
-    # Search Developer SDK paths, since Apple seems to have dropped the standard Unixy ones
-    XCODE_CMD="xcode-select"
-    XCODE_PATH=$($XCODE_CMD -p)
-    DIRS+=("$XCODE_PATH/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include $XCODE_PATH/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/lib")
-    DIRS+=("$XCODE_PATH/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include $XCODE_PATH/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib")
 elif [[ "$OSTYPE" =~ "msys" ]]; then
     SOLIBSUFFIX=dll
 else
