[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10651: If mallinfo is used whenever
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10651: If mallinfo is used whenever HAVE_MALLINFO is defined, it also has to be |
Date: |
Wed, 04 Mar 2009 10:57:09 +0100 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10651
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Wed 2009-03-04 10:57:09 +0100
message:
If mallinfo is used whenever HAVE_MALLINFO is defined, it also has to be
linked.
modified:
configure.ac
------------------------------------------------------------
revno: 10648.1.1
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Wed 2009-03-04 10:35:50 +0100
message:
Fix mallinfo linker flags for libbase/gmemory.h, which is built
automatically
when HAVE_MALLINFO is defined. Fixes OpenSolaris build, though it might
also be better to make this part optional.
modified:
configure.ac
=== modified file 'configure.ac'
--- a/configure.ac 2009-02-27 06:46:40 +0000
+++ b/configure.ac 2009-03-04 09:35:50 +0000
@@ -249,15 +249,17 @@
jemalloc=no
fi
fi
-AC_TRY_COMPILE([#include <malloc.h>], [
- struct mallinfo x = mallinfo(); ],
- mallinfo=yes, mallinfo=no
-)
-if test x"${mallinfo}" = x"yes"; then
- AC_DEFINE(HAVE_MALLINFO, [1], [Has mallinfo()])
-fi
+
+dnl We can search libs for mallinfo to decide whether we have it or not.
+dnl This is added to the linker flags when it's found. Usually it's -lc, but
+dnl on OpenSolaris it's -lmalloc, so this fixes the build.
+AC_SEARCH_LIBS([mallinfo], [c malloc],
+ AC_DEFINE(HAVE_MALLINFO, [1], [Has mallinfo()])
+ mallinfo=yes
+ )
+
+AM_CONDITIONAL([HAVE_MALLINFO], test x$mallinfo = xyes)
AM_CONDITIONAL(JEMALLOC, test x$jemalloc = xyes)
-AM_CONDITIONAL(HAVE_MALLINFO, [test x$mallinfo = xyes])
AC_ARG_ENABLE(debugger,
AC_HELP_STRING([--enable-debugger],[Enable the Flash debugger]),
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10651: If mallinfo is used whenever HAVE_MALLINFO is defined, it also has to be,
Benjamin Wolsey <=