$NetBSD: patch-ab,v 1.6 2013/04/16 10:49:31 adam Exp $

Use CPPFLAGS during configuration.
Don't force compiler optimization flags.
Introduce DISABLE_ASM

--- unix/configure.orig	2008-06-20 03:32:20.000000000 +0000
+++ unix/configure
@@ -16,7 +16,7 @@
 
 trap "rm -f conftest* core a.out; exit 1" 1 2 3 15
 
-CC=${1-cc}
+CC="${1-cc} $CPPFLAGS"
 CFLAGS=${2-"-I. -DUNIX"}
 LFLAGS1=''
 LFLAGS2=''
@@ -118,10 +118,6 @@ _EOF_
 fi
 
 # optimization flags
-if test -n "${CFLAGS_OPT}"; then
-  CFLAGS="${CFLAGS} ${CFLAGS_OPT}"
-  CFLAGS_BZ="${CFLAGS_BZ} ${CFLAGS_OPT}"
-fi
 
 
 # bzip2
@@ -235,6 +231,7 @@ $CPP conftest.c >/dev/null 2>/dev/null |
 echo Check if we can use asm code
 OBJA=""
 OCRCU8=""
+if [ -z "$DISABLE_ASM" ]; then
 if eval "$CPP match.S > _match.s 2>/dev/null"; then
   if test ! -s _match.s || grep error < _match.s > /dev/null; then
     :
@@ -257,6 +254,7 @@ if eval "$CPP match.S > _match.s 2>/dev/
   fi
 fi
 rm -f _match.s _match.o _crc_i386.s _crc_i386.o
+fi
 
 
 # ANSI options for compilers that don't have __STDC__ defined by default
