summaryrefslogtreecommitdiff
path: root/archivers/zip/patches/patch-ab
blob: d470a5be436bb6c506d5c31926127d48fa9adc9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
$NetBSD: patch-ab,v 1.7 2015/08/28 08:17:38 richard 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
@@ -221,12 +217,12 @@ echo Check for the C preprocessor
 # on SVR4, cc -E does not produce correct assembler files. Need /lib/cpp.
 CPP="${CC} -E"
 # solaris as(1) needs -P, maybe others as well ?
-[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P"
-[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp
-[ -f /lib/cpp ] && CPP=/lib/cpp
-[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp
-[ -f /xenix ] && CPP="${CC} -E"
-[ -f /lynx.os ] && CPP="${CC} -E"
+#[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P"
+#[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp
+#[ -f /lib/cpp ] && CPP=/lib/cpp
+#[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp
+#[ -f /xenix ] && CPP="${CC} -E"
+#[ -f /lynx.os ] && CPP="${CC} -E"
 
 echo "#include <stdio.h>" > conftest.c
 $CPP conftest.c >/dev/null 2>/dev/null || CPP="${CC} -E"
@@ -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