]> git.pld-linux.org Git - packages/djvu.git/blame - djvu-config.patch
- enhanced config patch, added c++ patch to make it buildable again
[packages/djvu.git] / djvu-config.patch
CommitLineData
1aac2a37
JB
1diff -Nur DjVu3.orig/config/cc.sh DjVu3/config/cc.sh
2--- DjVu3.orig/config/cc.sh Tue Jan 9 18:29:22 2001
3+++ DjVu3/config/cc.sh Mon Jul 9 00:58:27 2001
2048019f
JB
4@@ -46,7 +46,7 @@
5 EGCS="egcs"
6 if [ -z "$CC_SET" ]
7 then
8- (echo '#include <stdio.h>';echo 'int main(void) {puts("Hello World\n");return 0;}')|testfile $temp.c
9+ (echo '#include <stdio.h>';echo 'int main(void) {puts("Hello World\\n");return 0;}')|testfile $temp.c
10 CCPIC_SET=""
11 CCFLAGS=""
12 CCSYMBOLIC=""
1aac2a37
JB
13@@ -89,27 +89,6 @@
14 fi
15 CCFLAGS=`echo "${CCPIPE}" "${CCFLAGS}"`
16
17- CCMMX=""
18- m=`${uname} -m`
19- if [ "${m}" = i686 ]
20- then
21- echon "Chesking whether ${CC} -mpentiumpro and -mmx work ... "
22- if ( run $CC ${CCFLAGS} -mpentiumpro -c $temp.c)
23- then
24- CCMMX="-mpentiumpro"
25- if ( run $CC ${CCFLAGS} ${CCMMX} -mmx -c $temp.c )
26- then
27- CCMMX="$CCMMX -mmx"
28- echo "yes, both work"
29- else
30- echo "just $CCMMX works"
31- fi
32- else
33- echo no
34- fi
35- CCFLAGS=`echo "${CCMMX}" "${CCFLAGS}"`
36- fi
37-
38 echon "Checking whether ${CC} is gcc ... "
39 echo 'int main(void) { return __GNUC__;}' | testfile $temp.c
40 CCOPT=""
41@@ -120,19 +99,11 @@
42 echo yes
43 cc_is_gcc=yes
44 CCWARN="-Wall"
45- echon "Checking whether ${CC} -O3 works ... "
46- if ( run $CC ${CCFLAGS} -O3 -c $temp.c )
47- then
48- echo yes
49- CCOPT="-O3"
50- else
51- echo no
52- fi
53- echon "Checking whether ${CC} -funroll-loops works ... "
54- if ( run $CC ${CCFLAGS} ${CCOPT} -funroll-loops -c $temp.c )
55+ echon "Checking whether ${CC} ${OPT} works ... "
56+ if ( run $CC ${CCFLAGS} ${OPT} -c $temp.c )
57 then
58 echo yes
59- CCUNROLL="-funroll-loops"
60+ CCOPT="${OPT}"
61 else
62 echo no
63 fi
2048019f
JB
64--- DjVu3/config/ccpic.sh.orig 2001-01-09 18:29:22.000000000 +0100
65+++ DjVu3/config/ccpic.sh 2021-03-28 17:10:41.502783064 +0200
66@@ -48,7 +48,7 @@
67 then
68 CCSYMBOLIC=""
69 CCPIC=""
70- (echo '#include <stdio.h>';echo 'int main(void) {puts("Hello World\n");return 0;}')|testfile $temp.c
71+ (echo '#include <stdio.h>';echo 'int main(void) {puts("Hello World\\n");return 0;}')|testfile $temp.c
72
73 echon "Checking ${CC} symbolic option ... "
74 CCSYMBOLIC=""
1aac2a37
JB
75diff -Nur DjVu3.orig/config/cxx.sh DjVu3/config/cxx.sh
76--- DjVu3.orig/config/cxx.sh Tue Jan 9 18:29:22 2001
77+++ DjVu3/config/cxx.sh Mon Jul 9 01:00:18 2001
78@@ -94,19 +94,6 @@
79 fi
80 CXXFLAGS=`echo "${CXXPIPE}" "${CXXFLAGS}"`
81
82- CXXMMX=""
83- if [ `uname -m` = i686 ]
84- then
85- echon "Checking ${CXX} supports pentium optimizations ... "
86- check_compile_flags CXXMMX $temp.cpp "-mpentiumpro -mmx" "-mpentiumpro"
87- if [ -z "$CXXMMX" ] ; then
88- echo "none"
89- else
90- echo "$CXXMMX"
91- CXXFLAGS="${CXXMMX} ${CXXFLAGS}"
92- fi
93- fi
94-
95 echon "Checking whether ${CXX} is gcc ... "
96 echo 'int main(void) { return __GNUG__;}' | testfile $temp.cpp
97 CXXOPT=""
98@@ -117,18 +104,10 @@
99 echo yes
100 cxx_is_gcc=yes
101 CXXWARN="-Wall"
102- echon "Checking whether ${CXX} -O3 works ... "
103- if ( run $CXX ${CXXFLAGS} -O3 -c $temp.cpp ) ; then
104- echo yes
105- CXXOPT="-O3"
106- else
107- echo no
108- fi
109- echon "Checking whether ${CXX} -funroll-loops works ... "
110- if ( run $CXX ${CXXFLAGS} ${CXXOPT} -funroll-loops -c $temp.cpp )
111- then
112+ echon "Checking whether ${CXX} ${OPTXX} works ... "
113+ if ( run $CXX ${CXXFLAGS} ${OPTXX} -c $temp.cpp ) ; then
114 echo yes
115- CXXUNROLL="-funroll-loops"
116+ CXXOPT="${OPTXX}"
117 else
118 echo no
119 fi
120diff -Nur DjVu3.orig/configure DjVu3/configure
121--- DjVu3.orig/configure Thu Nov 9 21:15:05 2000
122+++ DjVu3/configure Mon Jul 9 00:56:09 2001
123@@ -1,4 +1,4 @@
124-#!/bin/ksh
125+#!/bin/sh
126 #C-
127