BZLIB_LIBS
BZLIB_DELEGATE_FALSE
BZLIB_DELEGATE_TRUE
+TCMALLOC_LIBS
+HAVE_TCMALLOC_FALSE
+HAVE_TCMALLOC_TRUE
CCMALLOCDelegate
UMEM_LIBS
-HasUMEM_FALSE
-HasUMEM_TRUE
+HAVE_UMEM_FALSE
+HAVE_UMEM_TRUE
JEMALLOC_LIBS
HasJEMALLOC_FALSE
HasJEMALLOC_TRUE
enable_hugepages
enable_ccmalloc
enable_efence
+with_tcmalloc
enable_prof
enable_gprof
enable_gcov
--with-sysroot[=DIR] Search for dependent libraries within DIR (or the
compiler's sysroot if not specified).
--with-modules enable building dynamically loadable modules
+ --with-tcmalloc enable 'tcmalloc' memory debug support
--with-method-prefix=PREFIX
prefix MagickCore API methods
--with-utilities enable building command-line utilities (default yes)
MAGICK_VERSION=7.0.8-65
-MAGICK_GIT_REVISION=16093:031d3202e:20190908
+MAGICK_GIT_REVISION=16115:55abbb402:20190911
# Substitute library versioning
fi
+# Enable use of tcmalloc library.
+
+# Check whether --with-tcmalloc was given.
+if test "${with_tcmalloc+set}" = set; then :
+ withval=$with_tcmalloc; with_tcmalloc=$withval
+else
+ with_tcmalloc='no'
+fi
+
+if test "$with_tcmalloc" != 'no' ; then
+ DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-tcmalloc=$with_tcmalloc "
+fi
+
# Enable prof-based profiling support
# Check whether --enable-prof was given.
if test "${enable_prof+set}" = set; then :
UMEM_LIBS='-lumem'
LIBS="$UMEM_LIBS $LIBS"
-$as_echo "#define HasUMEM 1" >>confdefs.h
+$as_echo "#define HAVE_UMEM 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
fi
fi
if test "$have_umem" = 'yes'; then
- HasUMEM_TRUE=
- HasUMEM_FALSE='#'
+ HAVE_UMEM_TRUE=
+ HAVE_UMEM_FALSE='#'
else
- HasUMEM_TRUE='#'
- HasUMEM_FALSE=
+ HAVE_UMEM_TRUE='#'
+ HAVE_UMEM_FALSE=
fi
LIBS="$EFENCE_LIBS $LIBS"
fi
+#
+# Check for tcmalloc library
+#
+have_tcmalloc='no'
+TCMALLOC_LIBS=''
+OLIBS="$LIBS"
+if test "$have_threads" = 'yes' -a "$with_tcmalloc" != 'no'; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking tcmalloc library support " >&5
+$as_echo_n "checking tcmalloc library support ... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+$as_echo "" >&6; }
+ failed=0
+ passed=0
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mallinfo in -ltcmalloc_minimal" >&5
+$as_echo_n "checking for mallinfo in -ltcmalloc_minimal... " >&6; }
+if ${ac_cv_lib_tcmalloc_minimal_mallinfo+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltcmalloc_minimal $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char mallinfo ();
+int
+main ()
+{
+return mallinfo ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_tcmalloc_minimal_mallinfo=yes
+else
+ ac_cv_lib_tcmalloc_minimal_mallinfo=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tcmalloc_minimal_mallinfo" >&5
+$as_echo "$ac_cv_lib_tcmalloc_minimal_mallinfo" >&6; }
+if test "x$ac_cv_lib_tcmalloc_minimal_mallinfo" = xyes; then :
+ passed=`expr $passed + 1`
+else
+ failed=`expr $failed + 1`
+fi
+
+
+ if test $passed -gt 0; then
+ if test $failed -gt 0; then
+ have_tcmalloc='no (some components failed test)'
+ else
+ TCMALLOC_LIBS=-ltcmalloc_minimal
+ LIBS="$TCMALLOC_LIBS $LIBS"
+ CFLAGS="$CFLAGS -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free"
+
+$as_echo "#define HAVE_TCMALLOC 1" >>confdefs.h
+
+ have_tcmalloc='yes'
+ fi
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if tcmalloc memory allocation library is complete " >&5
+$as_echo_n "checking if tcmalloc memory allocation library is complete ... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_tcmalloc" >&5
+$as_echo "$have_tcmalloc" >&6; }
+fi
+ if test "$have_tcmalloc" = 'yes'; then
+ HAVE_TCMALLOC_TRUE=
+ HAVE_TCMALLOC_FALSE='#'
+else
+ HAVE_TCMALLOC_TRUE='#'
+ HAVE_TCMALLOC_FALSE=
+fi
+
+
+
#
# Check for BZLIB
#
if test "$build_modules" != 'no'; then
- MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $RAQM_LIBS $LQR_LIBS $FFTW_LIBS $XML_LIBS $FLIF_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $ZSTD_LIBS $LTDL_LIBS $GDI32_LIBS $WS2_32_LIBS $MATH_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS"
+ MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $RAQM_LIBS $LQR_LIBS $FFTW_LIBS $XML_LIBS $FLIF_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $ZSTD_LIBS $LTDL_LIBS $GDI32_LIBS $WS2_32_LIBS $MATH_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS $TCMALLOC_LIBS"
else
- MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $RAQM_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FLIF_LIBS $FPX_LIBS $FONTCONFIG_LIBS $HEIF_LIBS $WEBPMUX_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $LIBOPENJP2_LIBS $PANGO_LIBS $RAW_R_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $ZSTD_LIBS $LTDL_LIBS $GDI32_LIBS $WS2_32_LIBS $MATH_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS"
+ MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $RAQM_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FLIF_LIBS $FPX_LIBS $FONTCONFIG_LIBS $HEIF_LIBS $WEBPMUX_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $LIBOPENJP2_LIBS $PANGO_LIBS $RAW_R_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $ZSTD_LIBS $LTDL_LIBS $GDI32_LIBS $WS2_32_LIBS $MATH_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS $TCMALLOC_LIBS"
fi
MAGICK_EXTRA_DEP_LIBS="$GOMP_LIBS"
as_fn_error $? "conditional \"HasJEMALLOC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${HasUMEM_TRUE}" && test -z "${HasUMEM_FALSE}"; then
- as_fn_error $? "conditional \"HasUMEM\" was never defined.
+if test -z "${HAVE_UMEM_TRUE}" && test -z "${HAVE_UMEM_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_UMEM\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_TCMALLOC_TRUE}" && test -z "${HAVE_TCMALLOC_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_TCMALLOC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${BZLIB_DELEGATE_TRUE}" && test -z "${BZLIB_DELEGATE_FALSE}"; then
RAQM --with-raqm=$with_raqm $have_raqm
RAW --with-raw=$with_raw $have_raw
RSVG --with-rsvg=$with_rsvg $have_rsvg
+ TCMalloc --with-tcmalloc=$with_tcmalloc $have_tcmalloc
TIFF --with-tiff=$with_tiff $have_tiff
WEBP --with-webp=$with_webp $have_webp
WMF --with-wmf=$with_wmf $have_wmf
RAQM --with-raqm=$with_raqm $have_raqm
RAW --with-raw=$with_raw $have_raw
RSVG --with-rsvg=$with_rsvg $have_rsvg
+ TCMalloc --with-tcmalloc=$with_tcmalloc $have_tcmalloc
TIFF --with-tiff=$with_tiff $have_tiff
WEBP --with-webp=$with_webp $have_webp
WMF --with-wmf=$with_wmf $have_wmf
[enable_efence=$enableval],
[enable_efence='no'])
+# Enable use of tcmalloc library.
+AC_ARG_WITH(tcmalloc,
+ AS_HELP_STRING([--with-tcmalloc],
+ [enable 'tcmalloc' memory debug support]),
+ [with_tcmalloc=$withval],
+ [with_tcmalloc='no'])
+if test "$with_tcmalloc" != 'no' ; then
+ DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-tcmalloc=$with_tcmalloc "
+fi
+
# Enable prof-based profiling support
AC_ARG_ENABLE([prof],
[AC_HELP_STRING([--enable-prof],
else
UMEM_LIBS='-lumem'
LIBS="$UMEM_LIBS $LIBS"
- AC_DEFINE(HasUMEM,1,Define if you have umem memory allocation library)
+ AC_DEFINE(HAVE_UMEM,1,Define if you have umem memory allocation library)
AC_MSG_RESULT(yes)
have_umem='yes'
fi
AC_MSG_RESULT(no)
fi
fi
-AM_CONDITIONAL(HasUMEM, test "$have_umem" = 'yes')
+AM_CONDITIONAL(HAVE_UMEM, test "$have_umem" = 'yes')
AC_SUBST(UMEM_LIBS)
#
LIBS="$EFENCE_LIBS $LIBS"
fi
+#
+# Check for tcmalloc library
+#
+have_tcmalloc='no'
+TCMALLOC_LIBS=''
+OLIBS="$LIBS"
+if test "$have_threads" = 'yes' -a "$with_tcmalloc" != 'no'; then
+ AC_MSG_CHECKING([tcmalloc library support ])
+ AC_MSG_RESULT([])
+ failed=0
+ passed=0
+
+ AC_CHECK_LIB([tcmalloc_minimal],[mallinfo],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],[])
+
+ if test $passed -gt 0; then
+ if test $failed -gt 0; then
+ have_tcmalloc='no (some components failed test)'
+ else
+ TCMALLOC_LIBS=-ltcmalloc_minimal
+ LIBS="$TCMALLOC_LIBS $LIBS"
+ CFLAGS="$CFLAGS -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free"
+ AC_DEFINE([HAVE_TCMALLOC],[1],[Define if you have tcmalloc library])
+ have_tcmalloc='yes'
+ fi
+ fi
+ AC_MSG_CHECKING([if tcmalloc memory allocation library is complete ])
+ AC_MSG_RESULT([$have_tcmalloc])
+fi
+AM_CONDITIONAL([HAVE_TCMALLOC], [test "$have_tcmalloc" = 'yes'])
+AC_SUBST([TCMALLOC_LIBS])
+
dnl ===========================================================================
#
#
if test "$build_modules" != 'no'; then
- MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $RAQM_LIBS $LQR_LIBS $FFTW_LIBS $XML_LIBS $FLIF_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $ZSTD_LIBS $LTDL_LIBS $GDI32_LIBS $WS2_32_LIBS $MATH_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS"
+ MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $RAQM_LIBS $LQR_LIBS $FFTW_LIBS $XML_LIBS $FLIF_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $ZSTD_LIBS $LTDL_LIBS $GDI32_LIBS $WS2_32_LIBS $MATH_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS $TCMALLOC_LIBS"
else
- MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $RAQM_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FLIF_LIBS $FPX_LIBS $FONTCONFIG_LIBS $HEIF_LIBS $WEBPMUX_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $LIBOPENJP2_LIBS $PANGO_LIBS $RAW_R_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $ZSTD_LIBS $LTDL_LIBS $GDI32_LIBS $WS2_32_LIBS $MATH_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS"
+ MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $RAQM_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FLIF_LIBS $FPX_LIBS $FONTCONFIG_LIBS $HEIF_LIBS $WEBPMUX_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $LIBOPENJP2_LIBS $PANGO_LIBS $RAW_R_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $ZSTD_LIBS $LTDL_LIBS $GDI32_LIBS $WS2_32_LIBS $MATH_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS $TCMALLOC_LIBS"
fi
MAGICK_EXTRA_DEP_LIBS="$GOMP_LIBS"
AC_SUBST(MAGICK_DEP_LIBS)
RAQM --with-raqm=$with_raqm $have_raqm
RAW --with-raw=$with_raw $have_raw
RSVG --with-rsvg=$with_rsvg $have_rsvg
+ TCMalloc --with-tcmalloc=$with_tcmalloc $have_tcmalloc
TIFF --with-tiff=$with_tiff $have_tiff
WEBP --with-webp=$with_webp $have_webp
WMF --with-wmf=$with_wmf $have_wmf