[include] Add git version check to prerequisite check (#11229)
[openwrt.git] / tools / gmp / patches / 000-OE-configure.patch
1 --- a/acinclude.m4
2 +++ b/acinclude.m4
3 @@ -30,29 +30,29 @@ dnl a_out.exe - OpenVMS DEC C called
4 dnl conftest.exe - various DOS compilers
5
6
7 -define(IA64_PATTERN,
8 +define([IA64_PATTERN],
9 [[ia64*-*-* | itanium-*-* | itanium2-*-*]])
10
11 dnl Need to be careful not to match m6811, m6812, m68hc11 and m68hc12, all
12 dnl of which config.sub accepts. (Though none of which are likely to work
13 dnl with GMP.)
14 dnl
15 -define(M68K_PATTERN,
16 +define([M68K_PATTERN],
17 [[m68k-*-* | m68[0-9][0-9][0-9]-*-*]])
18
19 -define(POWERPC64_PATTERN,
20 +define([POWERPC64_PATTERN],
21 [[powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*]])
22
23 -define(S390_PATTERN,
24 +define([S390_PATTERN],
25 [[s390-*-* | z900esa-*-* | z990esa-*-* | z9esa-*-* | z10esa-*-* | z196esa-*-*]])
26
27 -define(S390X_PATTERN,
28 +define([S390X_PATTERN],
29 [[s390x-*-* | z900-*-* | z990-*-* | z9-*-* | z10-*-* | z196-*-*]])
30
31 -define(X86_PATTERN,
32 +define([X86_PATTERN],
33 [[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*]])
34
35 -define(X86_64_PATTERN,
36 +define([X86_64_PATTERN],
37 [[athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | bulldozer-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-*]])
38
39 dnl GMP_FAT_SUFFIX(DSTVAR, DIRECTORY)
40 @@ -70,7 +70,7 @@ dnl x86 -> x86
41 dnl x86/k6 -> k6
42 dnl x86/k6/mmx -> k6_mmx
43
44 -define(GMP_FAT_SUFFIX,
45 +define([GMP_FAT_SUFFIX],
46 [[$1=`echo $2 | sed -e '/\//s:^[^/]*/::' -e 's:[\\/]:_:g'`]])
47
48
49 @@ -79,7 +79,7 @@ dnl ----------------------------------
50 dnl Emit code to remove any occurrence of ITEM from $LISTVAR. ITEM can be a
51 dnl shell expression like $foo if desired.
52
53 -define(GMP_REMOVE_FROM_LIST,
54 +define([GMP_REMOVE_FROM_LIST],
55 [remove_from_list_tmp=
56 for remove_from_list_i in $[][$1]; do
57 if test $remove_from_list_i = [$2]; then :;
58 @@ -95,12 +95,12 @@ dnl GMP_STRIP_PATH(subdir)
59 dnl ----------------------
60 dnl Strip entries */subdir from $path and $fat_path.
61
62 -define(GMP_STRIP_PATH,
63 +define([GMP_STRIP_PATH],
64 [GMP_STRIP_PATH_VAR(path, [$1])
65 GMP_STRIP_PATH_VAR(fat_path, [$1])
66 ])
67
68 -define(GMP_STRIP_PATH_VAR,
69 +define([GMP_STRIP_PATH_VAR],
70 [tmp_path=
71 for i in $[][$1]; do
72 case $i in
73 @@ -121,7 +121,7 @@ dnl
74 dnl Dummy value for GMP_LIMB_BITS is enough
75 dnl for all current configure-time uses of gmp.h.
76
77 -define(GMP_INCLUDE_GMP_H,
78 +define([GMP_INCLUDE_GMP_H],
79 [[#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */
80 #define GMP_NAIL_BITS $GMP_NAIL_BITS
81 #define GMP_LIMB_BITS 123
82 @@ -136,7 +136,7 @@ dnl Expand at autoconf time to the valu
83 dnl FILE. The regexps here aren't very rugged, but are enough for gmp.
84 dnl /dev/null as a parameter prevents a hang if $2 is accidentally omitted.
85
86 -define(GMP_HEADER_GETVAL,
87 +define([GMP_HEADER_GETVAL],
88 [patsubst(patsubst(
89 esyscmd([grep "^#define $1 " $2 /dev/null 2>/dev/null]),
90 [^.*$1[ ]+],[]),
91 @@ -150,7 +150,7 @@ dnl The gmp version number, extracted f
92 dnl autoconf time. Two digits like 3.0 if patchlevel <= 0, or three digits
93 dnl like 3.0.1 if patchlevel > 0.
94
95 -define(GMP_VERSION,
96 +define([GMP_VERSION],
97 [GMP_HEADER_GETVAL(__GNU_MP_VERSION,gmp-h.in)[]dnl
98 .GMP_HEADER_GETVAL(__GNU_MP_VERSION_MINOR,gmp-h.in)[]dnl
99 .GMP_HEADER_GETVAL(__GNU_MP_VERSION_PATCHLEVEL,gmp-h.in)])
100 @@ -1512,7 +1512,9 @@ esac
101 echo ["define(<CONFIG_TOP_SRCDIR>,<\`$tmp'>)"] >>$gmp_tmpconfigm4
102
103 # All CPUs use asm-defs.m4
104 -echo ["include][(CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4')"] >>$gmp_tmpconfigm4i
105 +echo -n ["include("] >>$gmp_tmpconfigm4i
106 +echo -n ["CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4'"] >>$gmp_tmpconfigm4i
107 +echo [")"] >>$gmp_tmpconfigm4i
108 ])
109
110
111 --- a/configure.in
112 +++ b/configure.in
113 @@ -29,12 +29,6 @@ AC_REVISION($Revision$)
114 AC_PREREQ(2.59)
115 AC_INIT(GNU MP, GMP_VERSION, [gmp-bugs@gmplib.org, see http://gmplib.org/manual/Reporting-Bugs.html], gmp)
116 AC_CONFIG_SRCDIR(gmp-impl.h)
117 -m4_pattern_forbid([^[ \t]*GMP_])
118 -m4_pattern_allow(GMP_LDFLAGS)
119 -m4_pattern_allow(GMP_LIMB_BITS)
120 -m4_pattern_allow(GMP_MPARAM_H_SUGGEST)
121 -m4_pattern_allow(GMP_NAIL_BITS)
122 -m4_pattern_allow(GMP_NUMB_BITS)
123
124 # If --target is not used then $target_alias is empty, but if say
125 # "./configure athlon-pc-freebsd3.5" is used, then all three of
126 @@ -311,7 +305,7 @@ AH_VERBATIM([HAVE_HOST_CPU_1],
127 # After GMP specific searches and tests, the standard autoconf AC_PROG_CC is
128 # called. User selections of CC etc are respected.
129 #
130 -# Care is taken not to use macros like AC_TRY_COMPILE during the GMP
131 +# Care is taken not to use macros like AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) during the GMP
132 # pre-testing, since they of course depend on AC_PROG_CC, and also some of
133 # them cache their results, which is not wanted.
134 #
135 @@ -403,7 +397,7 @@ abilist="standard"
136 # FIXME: We'd like to prefer an ANSI compiler, perhaps by preferring
137 # c89 over cc here. But note that on HP-UX c89 provides a castrated
138 # environment, and would want to be excluded somehow. Maybe
139 -# AC_PROG_CC_STDC already does enough to stick cc into ANSI mode and
140 +# already does enough to stick cc into ANSI mode and
141 # we don't need to worry.
142 #
143 cclist="gcc cc"
144 @@ -1666,7 +1660,7 @@ esac
145 CFLAGS_or_unset=${CFLAGS-'(unset)'}
146 CPPFLAGS_or_unset=${CPPFLAGS-'(unset)'}
147
148 -cat >&AC_FD_CC <<EOF
149 +cat >&AS_MESSAGE_LOG_FD() <<EOF
150 User:
151 ABI=$ABI
152 CC=$CC
153 @@ -2073,7 +2067,6 @@ AC_SUBST(DEFN_LONG_LONG_LIMB)
154
155 # The C compiler and preprocessor, put into ANSI mode if possible.
156 AC_PROG_CC
157 -AC_PROG_CC_STDC
158 AC_PROG_CPP
159 GMP_H_ANSI
160
161 @@ -2096,11 +2089,11 @@ AC_SUBST(CCAS)
162
163 # The C++ compiler, if desired.
164 want_cxx=no
165 +AC_PROG_CXX
166 if test $enable_cxx != no; then
167 test_CXXFLAGS=${CXXFLAGS+set}
168 - AC_PROG_CXX
169
170 - echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AC_FD_CC
171 + echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AS_MESSAGE_LOG_FD()
172 cxxflags_ac_prog_cxx=$CXXFLAGS
173 cxxflags_list=ac_prog_cxx
174
175 @@ -2206,7 +2199,7 @@ case $host in
176 esac
177
178
179 -cat >&AC_FD_CC <<EOF
180 +cat >&AS_MESSAGE_LOG_FD() <<EOF
181 Decided:
182 ABI=$ABI
183 CC=$CC
184 @@ -3465,7 +3458,7 @@ GMP_FINISH
185 # FIXME: Upcoming version of autoconf/automake may not like broken lines.
186 # Right now automake isn't accepting the new AC_CONFIG_FILES scheme.
187
188 -AC_OUTPUT(Makefile \
189 +AC_CONFIG_FILES([Makefile \
190 mpbsd/Makefile mpf/Makefile mpn/Makefile mpq/Makefile \
191 mpz/Makefile printf/Makefile scanf/Makefile cxx/Makefile \
192 tests/Makefile tests/devel/Makefile tests/mpbsd/Makefile \
193 @@ -3474,4 +3467,5 @@ AC_OUTPUT(Makefile \
194 tests/cxx/Makefile \
195 doc/Makefile tune/Makefile \
196 demos/Makefile demos/calc/Makefile demos/expr/Makefile \
197 - gmp.h:gmp-h.in mp.h:mp-h.in)
198 + gmp.h:gmp-h.in mp.h:mp-h.in])
199 +AC_OUTPUT
This page took 0.04727 seconds and 5 git commands to generate.