3 @@ -30,29 +30,29 @@ dnl a_out.exe - OpenVMS DEC C called
4 dnl conftest.exe - various DOS compilers
8 +define([IA64_PATTERN],
9 [[ia64*-*-* | itanium-*-* | itanium2-*-*]])
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
16 +define([M68K_PATTERN],
17 [[m68k-*-* | m68[0-9][0-9][0-9]-*-*]])
19 -define(POWERPC64_PATTERN,
20 +define([POWERPC64_PATTERN],
21 [[powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*]])
24 +define([S390_PATTERN],
25 [[s390-*-* | z900esa-*-* | z990esa-*-* | z9esa-*-* | z10esa-*-* | z196esa-*-*]])
27 -define(S390X_PATTERN,
28 +define([S390X_PATTERN],
29 [[s390x-*-* | z900-*-* | z990-*-* | z9-*-* | z10-*-* | z196-*-*]])
32 +define([X86_PATTERN],
33 [[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*]])
35 -define(X86_64_PATTERN,
36 +define([X86_64_PATTERN],
37 [[athlon64-*-* | k8-*-* | k10-*-* | bobcat-*-* | bulldozer-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei*-*-* | x86_64-*-* | nano-*-*]])
39 dnl GMP_FAT_SUFFIX(DSTVAR, DIRECTORY)
40 @@ -70,7 +70,7 @@ dnl x86 -> x86
42 dnl x86/k6/mmx -> k6_mmx
44 -define(GMP_FAT_SUFFIX,
45 +define([GMP_FAT_SUFFIX],
46 [[$1=`echo $2 | sed -e '/\//s:^[^/]*/::' -e 's:[\\/]:_:g'`]])
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.
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.
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])
68 -define(GMP_STRIP_PATH_VAR,
69 +define([GMP_STRIP_PATH_VAR],
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.
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.
86 -define(GMP_HEADER_GETVAL,
87 +define([GMP_HEADER_GETVAL],
89 esyscmd([grep "^#define $1 " $2 /dev/null 2>/dev/null]),
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.
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
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
113 @@ -29,12 +29,6 @@ AC_REVISION($Revision$)
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)
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.
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.
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.
144 @@ -1666,7 +1660,7 @@ esac
145 CFLAGS_or_unset=${CFLAGS-'(unset)'}
146 CPPFLAGS_or_unset=${CPPFLAGS-'(unset)'}
148 -cat >&AC_FD_CC <<EOF
149 +cat >&AS_MESSAGE_LOG_FD() <<EOF
153 @@ -2073,7 +2067,6 @@ AC_SUBST(DEFN_LONG_LONG_LIMB)
155 # The C compiler and preprocessor, put into ANSI mode if possible.
161 @@ -2096,11 +2089,11 @@ AC_SUBST(CCAS)
163 # The C++ compiler, if desired.
166 if test $enable_cxx != no; then
167 test_CXXFLAGS=${CXXFLAGS+set}
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
175 @@ -2206,7 +2199,7 @@ case $host in
179 -cat >&AC_FD_CC <<EOF
180 +cat >&AS_MESSAGE_LOG_FD() <<EOF
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.
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 \
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])