diff options
author | Kevin Ryde <user42@zip.com.au> | 2001-06-20 00:10:19 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2001-06-20 00:10:19 +0200 |
commit | d3fd40bc3b79fc0bfb30ed1e52bd2cc1ee85c1a2 (patch) | |
tree | 08941880e3ccb1d91a321091015d4981871eb13d /aclocal.m4 | |
parent | 62b4dcf17e2b7d73f728b13109520a76ac8935a6 (diff) | |
download | gmp-d3fd40bc3b79fc0bfb30ed1e52bd2cc1ee85c1a2.tar.gz |
Regenerate for:
More of:
* acinclude.m4 (GMP_ASM_LSYM_PREFIX): AC_SUBST __GMP_LSYM_PREFIX
rather than AC_DEFINE LSYM_PREFIX.
More of:
* acinclude.m4, configure.in (GMP_C_ATTRIBUTE_MALLOC): New macro.
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index 1d0719b51..e6494f5c1 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -997,9 +997,9 @@ if test $gmp_found = no; then AC_MSG_WARN([cannot determine local label, using default $gmp_cv_asm_lsym_prefix]) fi ]) -AC_DEFINE_UNQUOTED(LSYM_PREFIX, "$gmp_cv_asm_lsym_prefix", - [Assembler local label prefix]) echo ["define(<LSYM_PREFIX>, <${gmp_cv_asm_lsym_prefix}>)"] >> $gmp_tmpconfigm4 +__GMP_LSYM_PREFIX="\"$gmp_cv_asm_lsym_prefix\"" +AC_SUBST(__GMP_LSYM_PREFIX) ]) @@ -1365,12 +1365,28 @@ fi dnl GMP_C_ATTRIBUTE_MALLOC dnl ---------------------- +dnl gcc 2.95.x accepts __attribute__ ((malloc)) but with a warning that +dnl it's ignored. Pretend it doesn't exist in this case, to avoid that +dnl warning. AC_DEFUN(GMP_C_ATTRIBUTE_MALLOC, [AC_CACHE_CHECK([whether gcc __attribute__ ((malloc)) works], gmp_cv_c_attribute_malloc, -[AC_TRY_COMPILE([void *foo (int x) __attribute__ ((malloc));], , - gmp_cv_c_attribute_malloc=yes, gmp_cv_c_attribute_malloc=no) +[cat >conftest.c <<EOF +void *foo (int x) __attribute__ ((malloc)); +EOF +gmp_compile="$CC $CFLAGS $CPPFLAGS -c conftest.c >conftest.out 2>&1" +if AC_TRY_EVAL(gmp_compile); then + if grep "attribute directive ignored" conftest.out >/dev/null; then + gmp_cv_c_attribute_malloc=no + else + gmp_cv_c_attribute_malloc=yes + fi +else + gmp_cv_c_attribute_malloc=no +fi +cat conftest.out >&AC_FD_CC +rm -f conftest* ]) if test $gmp_cv_c_attribute_malloc = yes; then AC_DEFINE(HAVE_ATTRIBUTE_MALLOC, 1, |