1 --- gmp-1.4.4/acinclude.m4.orig 2004-09-21 15:03:09.000000000 +0200
2 +++ gmp-1.4.4/acinclude.m4 2005-07-18 01:09:00.000000000 +0200
4 dnl MA 02111-1307, USA.
9 [[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-*]])
11 -define(POWERPC64_PATTERN,
12 +define([POWERPC64_PATTERN],
13 [[powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-*]])
17 dnl ----------------------
18 dnl Strip entries */subdir from $path.
20 -define(GMP_STRIP_PATH,
21 +define([GMP_STRIP_PATH],
26 dnl GMP_INCLUDE_GMP_H_BITS_PER_MP_LIMB starts as a dummy, but gets
27 dnl redefined in GMP_C_SIZES when the right value is known.
29 -define(GMP_INCLUDE_GMP_H,
30 +define([GMP_INCLUDE_GMP_H],
31 [[#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */
32 #define GMP_NAIL_BITS $GMP_NAIL_BITS]
33 GMP_INCLUDE_GMP_H_BITS_PER_MP_LIMB
35 #include "$srcdir/gmp-h.in"]
38 -define(GMP_INCLUDE_GMP_H_BITS_PER_MP_LIMB,
39 +define([GMP_INCLUDE_GMP_H_BITS_PER_MP_LIMB],
40 [[#define __GMP_BITS_PER_MP_LIMB 123 /* dummy for GMP_NUMB_BITS etc */
41 #define GMP_LIMB_BITS 123]])
44 dnl FILE. The regexps here aren't very rugged, but are enough for gmp.
45 dnl /dev/null as a parameter prevents a hang if $2 is accidentally omitted.
47 -define(GMP_HEADER_GETVAL,
48 +define([GMP_HEADER_GETVAL],
50 esyscmd([grep "^#define $1 " $2 /dev/null 2>/dev/null]),
53 dnl autoconf time. Two digits like 3.0 if patchlevel <= 0, or three digits
54 dnl like 3.0.1 if patchlevel > 0.
57 +define([GMP_VERSION],
58 [GMP_HEADER_GETVAL(__GNU_MP_VERSION,gmp-h.in)[]dnl
59 .GMP_HEADER_GETVAL(__GNU_MP_VERSION_MINOR,gmp-h.in)[]dnl
60 ifelse(m4_eval(GMP_HEADER_GETVAL(__GNU_MP_VERSION_PATCHLEVEL,gmp-h.in) > 0),1,
62 dnl ------------------------------
63 dnl Setup an AC_SUBST of HAVE_FUNC_01 for each argument.
65 -AC_DEFUN(GMP_SUBST_CHECK_FUNCS,
66 +AC_DEFUN([GMP_SUBST_CHECK_FUNCS],
68 [_GMP_SUBST_CHECK_FUNCS(ac_cv_func_[$1],HAVE_[]m4_translit([$1],[a-z],[A-Z])_01)
69 GMP_SUBST_CHECK_FUNCS(m4_shift($@))])])
71 dnl Called: _GMP_SUBST_CHECK_FUNCS(cachvar,substvar)
72 -AC_DEFUN(_GMP_SUBST_CHECK_FUNCS,
73 +AC_DEFUN([_GMP_SUBST_CHECK_FUNCS],
75 yes) AC_SUBST([$2],1) ;;
78 dnl ----------------------------------
79 dnl Setup an AC_SUBST of HAVE_FOO_H_01 for each argument.
81 -AC_DEFUN(GMP_SUBST_CHECK_HEADERS,
82 +AC_DEFUN([GMP_SUBST_CHECK_HEADERS],
84 [_GMP_SUBST_CHECK_HEADERS(ac_cv_header_[]m4_translit([$1],[./],[__]),
85 HAVE_[]m4_translit([$1],[a-z./],[A-Z__])_01)
86 GMP_SUBST_CHECK_HEADERS(m4_shift($@))])])
88 dnl Called: _GMP_SUBST_CHECK_HEADERS(cachvar,substvar)
89 -AC_DEFUN(_GMP_SUBST_CHECK_HEADERS,
90 +AC_DEFUN([_GMP_SUBST_CHECK_HEADERS],
92 yes) AC_SUBST([$2],1) ;;
95 dnl would test whether $major.$minor.$subminor is greater than or equal to
98 -AC_DEFUN(GMP_COMPARE_GE,
99 +AC_DEFUN([GMP_COMPARE_GE],
101 GMP_COMPARE_GE_INTERNAL($@)
104 -AC_DEFUN(GMP_COMPARE_GE_INTERNAL,
105 +AC_DEFUN([GMP_COMPARE_GE_INTERNAL],
107 [if test -n "$1" && test "$1" -ge $2; then
110 dnl for instance to random.o (and others) on vax-dec-ultrix4.5. Naturally
111 dnl a user-selected $AR_FLAGS is left unchanged.
113 -AC_DEFUN(GMP_PROG_AR,
114 +AC_DEFUN([GMP_PROG_AR],
115 [dnl Want to establish $AR before libtool initialization.
116 AC_BEFORE([$0],[AC_PROG_LIBTOOL])
119 dnl CC_FOR_BUILD is used without testing. CC_FOR_BUILD is the new name for
120 dnl a build system compiler, see configfsf.guess.
122 -AC_DEFUN(GMP_PROG_HOST_CC,
123 +AC_DEFUN([GMP_PROG_HOST_CC],
124 [AC_BEFORE([$0],[AC_PROG_LIBTOOL])
125 AC_REQUIRE([AC_PROG_CC])
126 AC_CACHE_CHECK([for HOST_CC build system compiler],
128 dnl FIXME: This can be removed and just AM_PROG_LEX used, one that macro
131 -AC_DEFUN(GMP_PROG_LEX,
132 +AC_DEFUN([GMP_PROG_LEX],
133 [AC_REQUIRE([AC_PROG_LEX])
134 if test "$LEX" = :; then
135 LEX=${am_missing_run}flex
138 dnl See mpn/asm-defs.m4 for details on the known bad m4s.
140 -AC_DEFUN(GMP_PROG_M4,
141 +AC_DEFUN([GMP_PROG_M4],
142 [AC_ARG_VAR(M4,[m4 macro processor])
143 AC_CACHE_CHECK([for suitable m4],
146 dnl Enhancement: Maybe this could be in GMP_PROG_M4, and attempt to prefer
147 dnl an m4 with a working m4wrap, if it can be found.
149 -AC_DEFUN(GMP_M4_M4WRAP_SPURIOUS,
150 +AC_DEFUN([GMP_M4_M4WRAP_SPURIOUS],
151 [AC_REQUIRE([GMP_PROG_M4])
152 AC_CACHE_CHECK([if m4wrap produces spurious output],
153 gmp_cv_m4_m4wrap_spurious,
155 dnl A user-selected $NM is always left unchanged. AC_PROG_NM is still run
156 dnl to get the "checking" message printed though.
158 -AC_DEFUN(GMP_PROG_NM,
159 +AC_DEFUN([GMP_PROG_NM],
160 [dnl Make sure we're the first to call AC_PROG_NM, so our extra flags are
161 dnl used by everyone.
162 AC_BEFORE([$0],[AC_PROG_NM])
164 dnl will run is that a plain native "./configure" falls back on ABI=32, but
165 dnl ABI=64 is still available as a cross-compile.
167 -AC_DEFUN(GMP_PROG_CC_WORKS,
168 +AC_DEFUN([GMP_PROG_CC_WORKS],
169 [AC_MSG_CHECKING([compiler $1])
170 cat >conftest.c <<EOF
173 dnl cache the result. The same "ifndef" style test is used, to avoid
174 dnl problems with syntax checking cpp's used on NeXT and Apple systems.
176 -AC_DEFUN(GMP_PROG_CC_IS_GNU,
177 +AC_DEFUN([GMP_PROG_CC_IS_GNU],
178 [cat >conftest.c <<EOF
182 dnl there is one then it's well hidden in xlc 3.1 on AIX 4.3, so just grep
183 dnl the man page printed when xlc is invoked with no arguments.
185 -AC_DEFUN(GMP_PROG_CC_IS_XLC,
186 +AC_DEFUN([GMP_PROG_CC_IS_XLC],
187 [gmp_command="$1 2>&1 | grep xlc >/dev/null"
188 if AC_TRY_EVAL(gmp_command); then
189 AC_MSG_CHECKING([whether $1 is xlc])
191 dnl This test might be repeated for different compilers, so the result is
194 -AC_DEFUN(GMP_HPC_HPPA_2_0,
195 +AC_DEFUN([GMP_HPC_HPPA_2_0],
196 [AC_MSG_CHECKING([whether HP compiler $1 is good for 64-bits])
197 # Bad compiler output:
198 # ccom: HP92453-01 G.10.32.05 HP C Compiler
201 dnl There's no caching here, so that different CC's can be tested.
203 -AC_DEFUN(GMP_GCC_VERSION_GE,
204 +AC_DEFUN([GMP_GCC_VERSION_GE],
205 [tmp_version=`($1 --version) 2>&AC_FD_CC`
206 echo "$1 --version '$tmp_version'" >&AC_FD_CC
209 dnl size==1 case in mpn/generic/mode1o.c, and this shows up in
210 dnl tests/mpz/t-jac.c as a wrong result from mpz_kronecker_ui.
212 -AC_DEFUN(GMP_GCC_ARM_UMODSI,
213 +AC_DEFUN([GMP_GCC_ARM_UMODSI],
214 [AC_MSG_CHECKING([whether ARM gcc unsigned division works])
215 tmp_version=`$1 --version`
216 echo "$tmp_version" >&AC_FD_CC
218 dnl This macro is used only once, after finalizing a choice of CC, so the
219 dnl result is cached.
221 -AC_DEFUN(GMP_GCC_MARCH_PENTIUMPRO,
222 +AC_DEFUN([GMP_GCC_MARCH_PENTIUMPRO],
223 [AC_CACHE_CHECK([whether gcc -march=pentiumpro is good],
224 gmp_cv_gcc_march_pentiumpro,
225 [GMP_GCC_VERSION_GE([$1], 2,95,4)
227 dnl gets rearranged or rewritten so the ICE doesn't happen then this can be
230 -AC_DEFUN(GMP_GCC_M68K_OPTIMIZE,
231 +AC_DEFUN([GMP_GCC_M68K_OPTIMIZE],
234 if test $1 = gcc; then
236 dnl gcc 2.95 accepts -mabi=32 but it only works on irix5, on irix6 it gives
237 dnl "cc1: The -mabi=32 support does not work yet".
239 -AC_DEFUN(GMP_GCC_MIPS_O32,
240 +AC_DEFUN([GMP_GCC_MIPS_O32],
241 [AC_MSG_CHECKING([whether gcc supports o32])
242 echo 'int x;' >conftest.c
243 echo "$1 -mabi=32 -c conftest.c" >&AC_FD_CC
245 dnl watch for that and decide against the option in that case, to avoid
246 dnl confusing the user.
248 -AC_DEFUN(GMP_GCC_NO_CPP_PRECOMP,
249 +AC_DEFUN([GMP_GCC_NO_CPP_PRECOMP],
250 [if test "$ccbase" = gcc; then
251 AC_MSG_CHECKING([compiler $2 $3 -no-cpp-precomp])
254 dnl This is intended for use on alpha, since only recent versions of gas
255 dnl accept -mev67, but there's nothing here that's alpha specific.
257 -AC_DEFUN(GMP_GCC_WA_MCPU,
258 +AC_DEFUN([GMP_GCC_WA_MCPU],
259 [AC_MSG_CHECKING([assembler $1 $2])
261 cat >conftest.c <<EOF
263 dnl This test is designed to be run repeatedly with different cxx/cxxflags
264 dnl selections, so the result is not cached.
266 -AC_DEFUN(GMP_PROG_CXX_WORKS,
267 +AC_DEFUN([GMP_PROG_CXX_WORKS],
268 [AC_MSG_CHECKING([C++ compiler $1])
269 cat >conftest.cc <<EOF
272 dnl FIXME: The generated config.m4 doesn't get recreated by config.status.
273 dnl Maybe the relevant "echo"s should go through AC_CONFIG_COMMANDS.
276 +AC_DEFUN([GMP_INIT],
277 [ifelse([$1], , gmp_configm4=config.m4, gmp_configm4="[$1]")
278 gmp_tmpconfigm4=cnfm4.tmp
279 gmp_tmpconfigm4i=cnfm4i.tmp
281 echo ["define(<CONFIG_TOP_SRCDIR>,<\`$tmp'>)"] >>$gmp_tmpconfigm4
283 # All CPUs use asm-defs.m4
284 -echo ["include(CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4')"] >>$gmp_tmpconfigm4i
285 +echo -n ["include("] >>$gmp_tmpconfigm4i
286 +echo -n ["CONFIG_TOP_SRCDIR\`/mpn/asm-defs.m4'"] >>$gmp_tmpconfigm4i
287 +echo [")"] >>$gmp_tmpconfigm4i
292 dnl having a whole file as a macro argument would overflow the string space
295 -AC_DEFUN(GMP_FINISH,
296 +AC_DEFUN([GMP_FINISH],
297 [AC_REQUIRE([GMP_INIT])
298 echo "creating $gmp_configm4"
299 echo ["d""nl $gmp_configm4. Generated automatically by configure."] > $gmp_configm4
301 dnl GMP_INCLUDE_MPN(`x86/x86-defs.m4')
304 -AC_DEFUN(GMP_INCLUDE_MPN,
305 +AC_DEFUN([GMP_INCLUDE_MPN],
306 [AC_REQUIRE([GMP_INIT])
307 echo ["include_mpn(\`$1')"] >> $gmp_tmpconfigm4i
310 dnl create file config.m4. config.m4 uses `<' and '>' as quote characters
313 -AC_DEFUN(GMP_DEFINE,
314 +AC_DEFUN([GMP_DEFINE],
315 [AC_REQUIRE([GMP_INIT])
316 echo ['define(<$1>, <$2>)'] >>ifelse([$3], [POST],
317 $gmp_tmpconfigm4p, $gmp_tmpconfigm4)
319 dnl directives inserted by GMP_INCLUDE. Don't forget to invoke GMP_FINISH
320 dnl to create file config.m4.
322 -AC_DEFUN(GMP_DEFINE_RAW,
323 +AC_DEFUN([GMP_DEFINE_RAW],
324 [AC_REQUIRE([GMP_INIT])
325 echo [$1] >> ifelse([$2], [POST], $gmp_tmpconfigm4p, $gmp_tmpconfigm4)
328 dnl This is not unlike AC_TRY_COMPILE, but there's no default includes or
329 dnl anything in "asm-code", everything wanted must be given explicitly.
331 -AC_DEFUN(GMP_TRY_ASSEMBLE,
332 +AC_DEFUN([GMP_TRY_ASSEMBLE],
333 [cat >conftest.s <<EOF
337 dnl --------------------
338 dnl Should a label have a colon or not?
340 -AC_DEFUN(GMP_ASM_LABEL_SUFFIX,
341 +AC_DEFUN([GMP_ASM_LABEL_SUFFIX],
342 [AC_CACHE_CHECK([what assembly label suffix to use],
343 gmp_cv_asm_label_suffix,
346 dnl in particular that grepping doesn't work with SunOS 4 native grep since
347 dnl that grep seems to have trouble with '\0's in files.
349 -AC_DEFUN(GMP_ASM_UNDERSCORE,
350 +AC_DEFUN([GMP_ASM_UNDERSCORE],
351 [AC_REQUIRE([GMP_ASM_TEXT])
352 AC_REQUIRE([GMP_ASM_GLOBL])
353 AC_REQUIRE([GMP_ASM_LABEL_SUFFIX])
354 @@ -1045,7 +1047,7 @@
355 dnl -----------------
356 dnl Is parameter to `.align' logarithmic?
358 -AC_DEFUN(GMP_ASM_ALIGN_LOG,
359 +AC_DEFUN([GMP_ASM_ALIGN_LOG],
360 [AC_REQUIRE([GMP_ASM_GLOBL])
361 AC_REQUIRE([GMP_ASM_DATA])
362 AC_REQUIRE([GMP_ASM_LABEL_SUFFIX])
363 @@ -1103,7 +1105,7 @@
364 dnl The warning from solaris 2.8 is supressed to stop anyone worrying that
365 dnl something might be wrong.
367 -AC_DEFUN(GMP_ASM_ALIGN_FILL_0x90,
368 +AC_DEFUN([GMP_ASM_ALIGN_FILL_0x90],
369 [AC_REQUIRE([GMP_ASM_TEXT])
370 AC_CACHE_CHECK([if the .align directive accepts an 0x90 fill in .text],
371 gmp_cv_asm_align_fill_0x90,
372 @@ -1127,7 +1129,7 @@
376 -AC_DEFUN(GMP_ASM_TEXT,
377 +AC_DEFUN([GMP_ASM_TEXT],
378 [AC_CACHE_CHECK([how to switch to text section],
381 @@ -1144,7 +1146,7 @@
383 dnl Can we say `.data'?
385 -AC_DEFUN(GMP_ASM_DATA,
386 +AC_DEFUN([GMP_ASM_DATA],
387 [AC_CACHE_CHECK([how to switch to data section],
390 @@ -1172,7 +1174,7 @@
391 dnl where foo is the object file. Might need to check for that if we use
394 -AC_DEFUN(GMP_ASM_RODATA,
395 +AC_DEFUN([GMP_ASM_RODATA],
396 [AC_REQUIRE([GMP_ASM_TEXT])
397 AC_REQUIRE([GMP_ASM_DATA])
398 AC_REQUIRE([GMP_ASM_LABEL_SUFFIX])
399 @@ -1229,7 +1231,7 @@
401 dnl Can we say `.global'?
403 -AC_DEFUN(GMP_ASM_GLOBL,
404 +AC_DEFUN([GMP_ASM_GLOBL],
405 [AC_CACHE_CHECK([how to export a symbol],
408 @@ -1245,7 +1247,7 @@
409 dnl ------------------
410 dnl Do we need something after `.global symbol'?
412 -AC_DEFUN(GMP_ASM_GLOBL_ATTR,
413 +AC_DEFUN([GMP_ASM_GLOBL_ATTR],
414 [AC_CACHE_CHECK([if the export directive needs an attribute],
415 gmp_cv_asm_globl_attr,
417 @@ -1276,7 +1278,7 @@
418 dnl letting the problem go unnoticed. tests/mpn/t-asmtype.c aims to check
421 -AC_DEFUN(GMP_ASM_TYPE,
422 +AC_DEFUN([GMP_ASM_TYPE],
423 [AC_CACHE_CHECK([for assembler .type directive],
426 @@ -1298,7 +1300,7 @@
428 dnl Can we say `.size'?
430 -AC_DEFUN(GMP_ASM_SIZE,
431 +AC_DEFUN([GMP_ASM_SIZE],
432 [AC_CACHE_CHECK([for assembler .size directive],
435 @@ -1341,7 +1343,7 @@
436 dnl HP-UX nm prints an error message (though seems to give a 0 exit) if
437 dnl there's no symbols at all in an object file, hence the use of "dummy".
439 -AC_DEFUN(GMP_ASM_LSYM_PREFIX,
440 +AC_DEFUN([GMP_ASM_LSYM_PREFIX],
441 [AC_REQUIRE([GMP_ASM_LABEL_SUFFIX])
442 AC_REQUIRE([GMP_PROG_NM])
443 AC_CACHE_CHECK([what prefix to use for a local label],
444 @@ -1386,7 +1388,7 @@
446 dnl How to define a 32-bit word.
448 -AC_DEFUN(GMP_ASM_W32,
449 +AC_DEFUN([GMP_ASM_W32],
450 [AC_REQUIRE([GMP_ASM_DATA])
451 AC_REQUIRE([GMP_ASM_GLOBL])
452 AC_REQUIRE([GMP_ASM_LABEL_SUFFIX])
453 @@ -1443,7 +1445,7 @@
454 dnl %mm1, %mm0"). It seems more trouble than it's worth to work around
455 dnl this in the code, so just detect and reject.
457 -AC_DEFUN(GMP_ASM_X86_MMX,
458 +AC_DEFUN([GMP_ASM_X86_MMX],
459 [AC_CACHE_CHECK([if the assembler knows about MMX instructions],
462 @@ -1495,7 +1497,7 @@
463 dnl GMP_ASM_X86_SHLDL_CL
464 dnl --------------------
466 -AC_DEFUN(GMP_ASM_X86_SHLDL_CL,
467 +AC_DEFUN([GMP_ASM_X86_SHLDL_CL],
468 [AC_REQUIRE([GMP_ASM_TEXT])
469 AC_CACHE_CHECK([if the assembler takes cl with shldl],
470 gmp_cv_asm_x86_shldl_cl,
471 @@ -1522,7 +1524,7 @@
472 dnl it's all GMP_ASM_TEXT gives currently. Actually ".text" probably isn't
473 dnl needed at all, at least for just checking instruction syntax.
475 -AC_DEFUN(GMP_ASM_X86_SSE2,
476 +AC_DEFUN([GMP_ASM_X86_SSE2],
477 [AC_CACHE_CHECK([if the assembler knows about SSE2 instructions],
480 @@ -1585,7 +1587,7 @@
481 dnl to get two variables (mcount_nonpic_reg and mcount_nonpic_call say) set
482 dnl from one block of commands?
484 -AC_DEFUN(GMP_ASM_X86_MCOUNT,
485 +AC_DEFUN([GMP_ASM_X86_MCOUNT],
486 [AC_REQUIRE([AC_ENABLE_SHARED])
487 AC_REQUIRE([AC_PROG_LIBTOOL])
488 AC_MSG_CHECKING([how to call x86 mcount])
489 @@ -1655,7 +1657,7 @@
490 dnl instruction. It takes registers without "%", but a single operand
491 dnl "clrl %d0" only gives a warning, not an error.
493 -AC_DEFUN(GMP_ASM_M68K_INSTRUCTION,
494 +AC_DEFUN([GMP_ASM_M68K_INSTRUCTION],
495 [AC_REQUIRE([GMP_ASM_TEXT])
496 AC_CACHE_CHECK([assembler instruction and register style],
497 gmp_cv_asm_m68k_instruction,
498 @@ -1684,7 +1686,7 @@
499 dnl GMP_ASM_M68K_ADDRESSING
500 dnl -----------------------
502 -AC_DEFUN(GMP_ASM_M68K_ADDRESSING,
503 +AC_DEFUN([GMP_ASM_M68K_ADDRESSING],
504 [AC_REQUIRE([GMP_ASM_TEXT])
505 AC_REQUIRE([GMP_ASM_M68K_INSTRUCTION])
506 AC_CACHE_CHECK([assembler addressing style],
507 @@ -1721,7 +1723,7 @@
508 dnl 16-bits. This applies to the conditional branches "bcc" etc too.
509 dnl However "dbcc" etc on gas are already only as big as they need to be.
511 -AC_DEFUN(GMP_ASM_M68K_BRANCHES,
512 +AC_DEFUN([GMP_ASM_M68K_BRANCHES],
513 [AC_REQUIRE([GMP_ASM_TEXT])
514 AC_CACHE_CHECK([assembler shortest branches],
515 gmp_cv_asm_m68k_branches,
516 @@ -1752,7 +1754,7 @@
517 dnl See also mpn/powerpc32/powerpc-defs.m4 which uses the result of this
520 -AC_DEFUN(GMP_ASM_POWERPC_R_REGISTERS,
521 +AC_DEFUN([GMP_ASM_POWERPC_R_REGISTERS],
522 [AC_REQUIRE([GMP_ASM_TEXT])
523 AC_CACHE_CHECK([if the assembler needs r on registers],
524 gmp_cv_asm_powerpc_r_registers,
525 @@ -1777,7 +1779,7 @@
527 dnl See also mpn/sparc32/sparc-defs.m4 which uses the result of this test.
529 -AC_DEFUN(GMP_ASM_SPARC_REGISTER,
530 +AC_DEFUN([GMP_ASM_SPARC_REGISTER],
531 [AC_REQUIRE([GMP_ASM_TEXT])
532 AC_CACHE_CHECK([if the assembler accepts ".register"],
533 gmp_cv_asm_sparc_register,
534 @@ -1795,7 +1797,7 @@
535 dnl GMP_C_ATTRIBUTE_CONST
536 dnl ---------------------
538 -AC_DEFUN(GMP_C_ATTRIBUTE_CONST,
539 +AC_DEFUN([GMP_C_ATTRIBUTE_CONST],
540 [AC_CACHE_CHECK([whether gcc __attribute__ ((const)) works],
541 gmp_cv_c_attribute_const,
542 [AC_TRY_COMPILE([int foo (int x) __attribute__ ((const));], ,
543 @@ -1814,7 +1816,7 @@
544 dnl it's ignored. Pretend it doesn't exist in this case, to avoid that
547 -AC_DEFUN(GMP_C_ATTRIBUTE_MALLOC,
548 +AC_DEFUN([GMP_C_ATTRIBUTE_MALLOC],
549 [AC_CACHE_CHECK([whether gcc __attribute__ ((malloc)) works],
550 gmp_cv_c_attribute_malloc,
551 [cat >conftest.c <<EOF
552 @@ -1844,7 +1846,7 @@
553 dnl --------------------
554 dnl Introduced in gcc 2.2, but perhaps not in all Apple derived versions.
556 -AC_DEFUN(GMP_C_ATTRIBUTE_MODE,
557 +AC_DEFUN([GMP_C_ATTRIBUTE_MODE],
558 [AC_CACHE_CHECK([whether gcc __attribute__ ((mode (XX))) works],
559 gmp_cv_c_attribute_mode,
560 [AC_TRY_COMPILE([typedef int SItype __attribute__ ((mode (SI)));], ,
561 @@ -1860,7 +1862,7 @@
562 dnl GMP_C_ATTRIBUTE_NORETURN
563 dnl ------------------------
565 -AC_DEFUN(GMP_C_ATTRIBUTE_NORETURN,
566 +AC_DEFUN([GMP_C_ATTRIBUTE_NORETURN],
567 [AC_CACHE_CHECK([whether gcc __attribute__ ((noreturn)) works],
568 gmp_cv_c_attribute_noreturn,
569 [AC_TRY_COMPILE([void foo (int x) __attribute__ ((noreturn));], ,
570 @@ -1887,7 +1889,7 @@
571 dnl used doesn't have functions or anything, so even an "old" awk should
574 -AC_DEFUN(GMP_C_DOUBLE_FORMAT,
575 +AC_DEFUN([GMP_C_DOUBLE_FORMAT],
576 [AC_REQUIRE([AC_PROG_CC])
577 AC_REQUIRE([AC_PROG_AWK])
578 AC_CACHE_CHECK([format of `double' floating point],
579 @@ -2089,7 +2091,7 @@
581 dnl FIXME: Hopefully autoconf will do this extra itself one day.
583 -AC_DEFUN(GMP_C_INLINE,
584 +AC_DEFUN([GMP_C_INLINE],
585 [AC_CACHE_CHECK([for inline], gmp_cv_c_inline,
587 for i in inline __inline__ __inline; do
588 @@ -2129,7 +2131,7 @@
589 dnl "yes" is used in the cache variable if plain "restrict" works, to make
590 dnl the configure message look nicer.
592 -AC_DEFUN(GMP_C_RESTRICT,
593 +AC_DEFUN([GMP_C_RESTRICT],
594 [AC_CACHE_CHECK([for restrict], gmp_cv_c_restrict,
595 [gmp_cv_c_restrict=no
596 for r in restrict __restrict__ __restrict; do
597 @@ -2178,7 +2180,7 @@
598 dnl ulongs with bits=8*sizeof, so it's academic. Strange systems can
599 dnl always have the right values put in gmp-mparam.h explicitly.
601 -AC_DEFUN(GMP_C_SIZES,
602 +AC_DEFUN([GMP_C_SIZES],
603 [BITS_PER_MP_LIMB=[`sed -n 's/^#define BITS_PER_MP_LIMB[ ][ ]*\([0-9]*\).*$/\1/p' $gmp_mparam_source`]
604 if test -n "$BITS_PER_MP_LIMB" \
605 && grep "^#define BYTES_PER_MP_LIMB" $gmp_mparam_source >/dev/null; then : ;
606 @@ -2199,7 +2201,7 @@
609 AC_SUBST(BITS_PER_MP_LIMB)
610 -define([GMP_INCLUDE_GMP_H_BITS_PER_MP_LIMB],
611 +define([[GMP_INCLUDE_GMP_H_BITS_PER_MP_LIMB]],
612 [[#define __GMP_BITS_PER_MP_LIMB $BITS_PER_MP_LIMB
613 #define GMP_LIMB_BITS $BITS_PER_MP_LIMB]])
615 @@ -2232,7 +2234,7 @@
616 dnl or very likely by the setups for _PROTO in gmp.h. On the other hand
617 dnl this test is nice and direct, being what we're going to actually use.
619 -AC_DEFUN(GMP_C_STDARG,
620 +AC_DEFUN([GMP_C_STDARG],
621 [AC_CACHE_CHECK([whether <stdarg.h> exists and works],
624 @@ -2261,7 +2263,7 @@
625 dnl available, and also to use gmp-impl.h for the conditionals detecting
626 dnl compiler builtin alloca's.
628 -AC_DEFUN(GMP_FUNC_ALLOCA,
629 +AC_DEFUN([GMP_FUNC_ALLOCA],
630 [AC_REQUIRE([GMP_HEADER_ALLOCA])
631 AC_CACHE_CHECK([for alloca (via gmp-impl.h)],
633 @@ -2278,7 +2280,7 @@
637 -AC_DEFUN(GMP_HEADER_ALLOCA,
638 +AC_DEFUN([GMP_HEADER_ALLOCA],
639 [# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
640 # for constant arguments. Useless!
641 AC_CACHE_CHECK([for working alloca.h],
642 @@ -2299,7 +2301,7 @@
643 dnl Decide what to do about --enable-alloca from the user.
644 dnl This is a macro so it can require GMP_FUNC_ALLOCA.
646 -AC_DEFUN(GMP_OPTION_ALLOCA,
647 +AC_DEFUN([GMP_OPTION_ALLOCA],
648 [AC_REQUIRE([GMP_FUNC_ALLOCA])
649 AC_CACHE_CHECK([how to allocate temporary memory],
650 gmp_cv_option_alloca,
651 @@ -2355,7 +2357,7 @@
653 dnl FIXME: Run a program to try this, when doing a native build.
655 -AC_DEFUN(GMP_FUNC_SSCANF_WRITABLE_INPUT,
656 +AC_DEFUN([GMP_FUNC_SSCANF_WRITABLE_INPUT],
657 [AC_CACHE_CHECK([whether sscanf needs writable input],
658 gmp_cv_func_sscanf_writable_input,
660 @@ -2391,7 +2393,7 @@
661 dnl not sure which 2.0.x does which), but still puts the correct null
662 dnl terminated result into the buffer.
664 -AC_DEFUN(GMP_FUNC_VSNPRINTF,
665 +AC_DEFUN([GMP_FUNC_VSNPRINTF],
666 [AC_REQUIRE([GMP_C_STDARG])
667 AC_CHECK_FUNC(vsnprintf,
668 [gmp_vsnprintf_exists=yes],
669 @@ -2472,7 +2474,7 @@
671 dnl Check whether gmp.h recognises the compiler as ANSI capable.
673 -AC_DEFUN(GMP_H_ANSI,
674 +AC_DEFUN([GMP_H_ANSI],
675 [AC_REQUIRE([AC_PROG_CC_STDC])
676 case $ac_cv_prog_cc_stdc in
678 @@ -2495,7 +2497,7 @@
679 dnl If the compiler has an "inline" of some sort, check whether the
680 dnl #ifdef's in gmp.h recognise it.
682 -AC_DEFUN(GMP_H_EXTERN_INLINE,
683 +AC_DEFUN([GMP_H_EXTERN_INLINE],
684 [AC_REQUIRE([GMP_C_INLINE])
685 case $gmp_cv_c_inline in
687 @@ -2522,7 +2524,7 @@
688 dnl Check whether the #ifdef's in gmp.h recognise when stdio.h has been
689 dnl included to get FILE.
691 -AC_DEFUN(GMP_H_HAVE_FILE,
692 +AC_DEFUN([GMP_H_HAVE_FILE],
696 @@ -2539,7 +2541,7 @@
697 dnl Check whether the #ifdef's in gmp-impl.h recognise IEEE format and
700 -AC_DEFUN(GMP_IMPL_H_IEEE_FLOATS,
701 +AC_DEFUN([GMP_IMPL_H_IEEE_FLOATS],
704 # not IEEE (neither D nor G formats are IEEE)
705 --- gmp-1.4.4/configure.in.orig 2004-09-21 15:02:43.000000000 +0200
706 +++ gmp-1.4.4/configure.in 2005-07-18 01:08:34.000000000 +0200
710 AC_REVISION($Revision: 1.425.2.25 $)
713 -m4_pattern_forbid([^[ \t]*GMP_])
714 -m4_pattern_forbid([^[ \t]*MPFR_CONFIGS])
715 -m4_pattern_allow(GMP_LDFLAGS)
716 -m4_pattern_allow(GMP_LIMB_BITS)
717 -m4_pattern_allow(GMP_MPARAM_H_SUGGEST)
718 -m4_pattern_allow(GMP_NAIL_BITS)
719 -m4_pattern_allow(GMP_NUMB_BITS)
722 +AC_CONFIG_SRCDIR([gmp-impl.h])
731 # If --target is not used then $target_alias is empty, but if say
732 # "./configure athlon-pc-freebsd3.5" is used, then all three of
734 GMP_DEFINE_RAW("define_not_for_expansion(\`HAVE_HOST_CPU_$tmp_host')", POST)
736 AM_INIT_AUTOMAKE(gmp, GMP_VERSION)
737 -AM_CONFIG_HEADER(config.h:config.in)
738 +AC_CONFIG_HEADERS([config.h:config.in])
743 # After GMP specific searches and tests, the standard autoconf AC_PROG_CC is
744 # called. User selections of CC etc are respected.
746 -# Care is taken not to use macros like AC_TRY_COMPILE during the GMP
747 +# Care is taken not to use macros like AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) during the GMP
748 # pre-testing, since they of course depend on AC_PROG_CC, and also some of
749 # them cache their results, which is not wanted.
752 # FIXME: We'd like to prefer an ANSI compiler, perhaps by preferring
753 # c89 over cc here. But note that on HP-UX c89 provides a castrated
754 # environment, and would want to be excluded somehow. Maybe
755 -# AC_PROG_CC_STDC already does enough to stick cc into ANSI mode and
756 +# already does enough to stick cc into ANSI mode and
757 # we don't need to worry.
760 @@ -1079,7 +1080,7 @@
761 CFLAGS_or_unset=${CFLAGS-'(unset)'}
762 CPPFLAGS_or_unset=${CPPFLAGS-'(unset)'}
764 -cat >&AC_FD_CC <<EOF
765 +cat >&AS_MESSAGE_LOG_FD() <<EOF
766 configure:__line__: User:
769 @@ -1391,18 +1392,18 @@
771 # The C compiler and preprocessor, put into ANSI mode if possible.
779 # The C++ compiler, if desired.
782 if test $enable_cxx != no; then
783 test_CXXFLAGS=${CXXFLAGS+set}
786 - echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AC_FD_CC
787 + echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AS_MESSAGE_LOG_FD()
788 cxxflags_ac_prog_cxx=$CXXFLAGS
789 cxxflags_list=ac_prog_cxx
791 @@ -1478,7 +1479,7 @@
795 -cat >&AC_FD_CC <<EOF
796 +cat >&AS_MESSAGE_LOG_FD() <<EOF
797 configure:__line__: Decided:
800 @@ -1720,9 +1721,9 @@
802 # FIXME: Autoconf 2.52 AC_C_BIGENDIAN bombs when cross compiling, but in the
803 # future the probes will be better and this override can be removed.
804 -if test "$cross_compiling" = yes; then
805 - ac_cv_c_bigendian=unknown
807 +#if test "$cross_compiling" = yes; then
808 +# ac_cv_c_bigendian=unknown
811 # Enhancement: In the future AC_C_BIGENDIAN will accept these actions as
813 @@ -2168,7 +2169,7 @@
815 # Configs for demos/calc directory
817 -# AC_SUBST is used here since with AM_CONFIG_HEADER automake would put
818 +# AC_SUBST is used here since with AC_CONFIG_HEADERS([]) automake would put
819 # demos/calc in the default $(DEFAULT_INCLUDES) for every directory,
820 # which would look very strange. Likewise demos/expr below.
822 @@ -2207,7 +2208,7 @@
823 # FIXME: Upcoming version of autoconf/automake may not like broken lines.
824 # Right now automake isn't accepting the new AC_CONFIG_FILES scheme.
826 -AC_OUTPUT(Makefile \
827 +AC_CONFIG_FILES([Makefile \
828 mpbsd/Makefile mpf/Makefile mpn/Makefile mpq/Makefile \
829 mpz/Makefile printf/Makefile scanf/Makefile cxx/Makefile \
830 tests/Makefile tests/devel/Makefile tests/mpbsd/Makefile \
831 @@ -2217,4 +2218,5 @@
832 mpfr/Makefile mpfr/tests/Makefile \
834 demos/Makefile demos/calc/Makefile demos/expr/Makefile \
835 - gmp.h:gmp-h.in mp.h:mp-h.in)
836 + gmp.h:gmp-h.in mp.h:mp-h.in])