diff options
author | Timur I. Bakeyev <timur@com.bat.ru> | 2009-06-07 12:50:15 +0000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-06-08 13:20:52 +0200 |
commit | 16f5aedea0cd05113b5fbed06e140d7fedbad095 (patch) | |
tree | 1fa32275d604e1cf866e76aa39a0232bd00ec87a | |
parent | 40178dd81e829878bbc7dcbb51184f747421e84b (diff) | |
download | samba-16f5aedea0cd05113b5fbed06e140d7fedbad095.tar.gz samba-16f5aedea0cd05113b5fbed06e140d7fedbad095.tar.bz2 samba-16f5aedea0cd05113b5fbed06e140d7fedbad095.zip |
Check for dmalloc at the end of the configure
Enabling dmalloc in Samba3 build leads to the wrong detection of the
strndup() function - there isn't one in FreeBSD prior to 7.2, but
dmalloc defines it, so, farther tests with -ldmalloc added wrongly
find it. the cheapest fix is to move dmalloc detection and inclusion
to the bottom of configure, so it can't affect detection of the system
capabilities.
Here is the patch.
With regards,
Timur Bakeyev.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r-- | source3/configure.in | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source3/configure.in b/source3/configure.in index bbd40dbefe..5ea214b6f5 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -216,16 +216,6 @@ if test x"$ac_cv_prog_gcc" = x"yes" ; then fi fi -AC_ARG_ENABLE(dmalloc, [AS_HELP_STRING([--enable-dmalloc], [Enable heap debugging [default=no]])]) - -if test "x$enable_dmalloc" = xyes -then - AC_DEFINE(ENABLE_DMALLOC, 1, [Define to turn on dmalloc debugging]) - AC_DEFINE(DMALLOC_FUNC_CHECK, 1, - [Define to check invariants around some common functions]) - LIBS="$LIBS -ldmalloc" -fi - ################################################# # check for a shared memory profiling support AC_MSG_CHECKING(whether to use profiling) @@ -6459,6 +6449,16 @@ AC_ZLIB([ZLIB_OBJS=""], [ CFLAGS="-I../lib/zlib $CFLAGS" ]) +AC_ARG_ENABLE(dmalloc, [AS_HELP_STRING([--enable-dmalloc], [Enable heap debugging [default=no]])]) + +if test "x$enable_dmalloc" = xyes +then + AC_DEFINE(ENABLE_DMALLOC, 1, [Define to turn on dmalloc debugging]) + AC_DEFINE(DMALLOC_FUNC_CHECK, 1, + [Define to check invariants around some common functions]) + LIBS="$LIBS -ldmalloc" +fi + dnl Remove -L/usr/lib/? from LDFLAGS and LIBS LIB_REMOVE_USR_LIB(LDFLAGS) LIB_REMOVE_USR_LIB(LIBS) |