#define MAGICKCORE_HAVE_J1 1
#endif
+/* Define to 1 if you have the <jemalloc/jemalloc.h> header file. */
+/* #undef HAVE_JEMALLOC_JEMALLOC_H */
+
/* Define if you have the <lcms2.h> header file. */
#ifndef MAGICKCORE_HAVE_LCMS2_H
#define MAGICKCORE_HAVE_LCMS2_H 1
/* Define to `int' if <sys/types.h> doesn't define. */
/* #undef gid_t */
+/* Link/compile against jemalloc */
+/* #undef has_jemalloc */
+
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* Define to `int' if <sys/types.h> does not define. */
/* #undef pid_t */
+/* jemalloc prefix */
+#ifndef _magickcore_prefix_jemalloc
+#define _magickcore_prefix_jemalloc
+#endif
+
/* Define to the equivalent of the C99 'restrict' keyword, or to
nothing if this is not supported. Do not define if restrict is
supported directly. */
*/
#define MagickPackageName "ImageMagick"
#define MagickCopyright "Copyright (C) 1999-2014 ImageMagick Studio LLC"
-#define MagickSVNRevision "16900:16901"
+#define MagickSVNRevision "16921:16931M"
#define MagickLibVersion 0x700
#define MagickLibVersionText "7.0.0"
#define MagickLibVersionNumber 1,0,0
#define MagickppLibAddendum "-0"
#define MagickppLibInterface 1
#define MagickppLibMinInterface 1
-#define MagickReleaseDate "2014-11-03"
+#define MagickReleaseDate "2014-11-04"
#define MagickChangeDate "20120427"
#define MagickAuthoritativeURL "http://www.imagemagick.org"
#define MagickFeatures "DPC HDRI OpenMP"
$(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/ax_require_defined.m4 \
$(top_srcdir)/m4/cxx_have_std_libs.m4 \
- $(top_srcdir)/m4/framework.m4 \
+ $(top_srcdir)/m4/framework.m4 $(top_srcdir)/m4/jemalloc.m4 \
$(top_srcdir)/m4/ld-version-script.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
dvidir = @dvidir@
exec_prefix = @exec_prefix@
ghostscript_font_dir = @ghostscript_font_dir@
+has_jemalloc = @has_jemalloc@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
m4_include([m4/ax_require_defined.m4])
m4_include([m4/cxx_have_std_libs.m4])
m4_include([m4/framework.m4])
+m4_include([m4/jemalloc.m4])
m4_include([m4/ld-version-script.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
/* Define to 1 if you have the `j1' function. */
#undef HAVE_J1
+/* Define to 1 if you have the <jemalloc/jemalloc.h> header file. */
+#undef HAVE_JEMALLOC_JEMALLOC_H
+
/* Define if you have the <lcms2.h> header file. */
#undef HAVE_LCMS2_H
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
+/* Link/compile against jemalloc */
+#undef has_jemalloc
+
/* Define to `__inline__' or `__inline' if that's what the C compiler
calls it, or to nothing if 'inline' is not supported under any name. */
#ifndef __cplusplus
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
+/* jemalloc prefix */
+#undef prefix_jemalloc
+
/* Define to the equivalent of the C99 'restrict' keyword, or to
nothing if this is not supported. Do not define if restrict is
supported directly. */
UMEM_LIBS
HasUMEM_FALSE
HasUMEM_TRUE
+has_jemalloc
GOMP_LIBS
WITH_MAGICK_PLUS_PLUS_FALSE
WITH_MAGICK_PLUS_PLUS_TRUE
with_perl_options
with_umem
with_libstdc
+with_jemalloc_prefix
+with_jemalloc
with_bzlib
with_x
with_zlib
PerlMagick build file
--with-umem enable umem memory allocation library support
--with-libstdc=DIR use libstdc++ in DIR (for GNU C++)
+ --with-jemalloc-prefix=PREFIX
+ Specify the jemalloc prefix [default=""]
+ --with-jemalloc=DIR use a specific jemalloc library
--without-bzlib disable BZLIB support
--with-x use the X Window System
--without-zlib disable ZLIB support
MAGICK_VERSION=7.0.0-0
-MAGICK_SVN_REVISION=16900:16901
+MAGICK_SVN_REVISION=16921:16931M
# Substitute library versioning
fi
+#
+# Check for jemalloc().
+#
+
+
+# Check whether --with-jemalloc-prefix was given.
+if test "${with_jemalloc_prefix+set}" = set; then :
+ withval=$with_jemalloc_prefix;
+ jemalloc_prefix="$withval"
+
+else
+
+ if test "`uname -s`" = "Darwin"; then
+ jemalloc_prefix="je_"
+ else
+ jemalloc_prefix=""
+ fi
+
+
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define prefix_jemalloc ${jemalloc_prefix}
+_ACEOF
+
+
+enable_jemalloc=no
+
+# Check whether --with-jemalloc was given.
+if test "${with_jemalloc+set}" = set; then :
+ withval=$with_jemalloc;
+ if test "$withval" != "no"; then
+ if test "x${enable_tcmalloc}" = "xyes"; then
+ as_fn_error $? "Cannot compile with both jemalloc and tcmalloc" "$LINENO" 5
+ fi
+ enable_jemalloc=yes
+ jemalloc_base_dir="$withval"
+ case "$withval" in
+ yes)
+ jemalloc_base_dir="/usr"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for jemalloc includes standard directories" >&5
+$as_echo_n "checking checking for jemalloc includes standard directories... " >&6; }
+ ;;
+ *":"*)
+ jemalloc_include="`echo $withval |sed -e 's/:.*$//'`"
+ jemalloc_ldflags="`echo $withval |sed -e 's/^.*://'`"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for jemalloc includes in $jemalloc_include libs in $jemalloc_ldflags" >&5
+$as_echo_n "checking checking for jemalloc includes in $jemalloc_include libs in $jemalloc_ldflags... " >&6; }
+ ;;
+ *)
+ jemalloc_include="$withval/include"
+ jemalloc_ldflags="$withval/lib"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for jemalloc includes in $withval" >&5
+$as_echo_n "checking checking for jemalloc includes in $withval... " >&6; }
+ ;;
+ esac
+ fi
+
+fi
+
+
+has_jemalloc=0
+if test "$enable_jemalloc" != "no"; then
+ jemalloc_have_headers=0
+ jemalloc_have_libs=0
+ if test "$jemalloc_base_dir" != "/usr"; then
+ CFLAGS="${CFLAGS} -I${jemalloc_include}"
+ LDFLAGS="${LDFLAGS} -L${jemalloc_ldflags}"
+ LIBTOOL_LINK_FLAGS="${LIBTOOL_LINK_FLAGS} -R${jemalloc_ldflags}"
+ fi
+ func="${jemalloc_prefix}malloc_stats_print"
+ as_ac_Lib=`$as_echo "ac_cv_lib_jemalloc_${func}" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${func} in -ljemalloc" >&5
+$as_echo_n "checking for ${func} in -ljemalloc... " >&6; }
+if eval \${$as_ac_Lib+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ljemalloc $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 ${func} ();
+int
+main ()
+{
+return ${func} ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$as_ac_Lib=yes"
+else
+ eval "$as_ac_Lib=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+eval ac_res=\$$as_ac_Lib
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
+ jemalloc_have_libs=1
+fi
+
+ if test "$jemalloc_have_libs" != "0"; then
+ for ac_header in jemalloc/jemalloc.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "jemalloc/jemalloc.h" "ac_cv_header_jemalloc_jemalloc_h" "$ac_includes_default"
+if test "x$ac_cv_header_jemalloc_jemalloc_h" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_JEMALLOC_JEMALLOC_H 1
+_ACEOF
+ jemalloc_have_headers=1
+fi
+
+done
+ fi
+ if test "$jemalloc_have_headers" != "0"; then
+ has_jemalloc=1
+ LIBS="${LIBS} -ljemalloc"
+
+$as_echo "#define has_jemalloc 1" >>confdefs.h
+
+ else
+ as_fn_error $? "Couldn't find a jemalloc installation" "$LINENO" 5
+ fi
+fi
+
+
+if test "x$jemalloc_have_libs" != "x0"; then :
+ JE_LIBS="-ljemalloc"
+fi
#
# Check for umem.
#
if test "$build_modules" != 'no'; then
- MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $LQR_LIBS $FFTW_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $LTDL_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $THREAD_LIBS"
+ MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $LQR_LIBS $FFTW_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $LTDL_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JE_LIBS $THREAD_LIBS"
else
- MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $OPENJPEG_LIBS $PANGO_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $THREAD_LIBS"
+ MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $OPENJPEG_LIBS $PANGO_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JE_LIBS $THREAD_LIBS"
fi
fi
AC_SUBST(GOMP_LIBS)
-
+#
+# Check for jemalloc().
+#
+TS_CHECK_JEMALLOC
+AS_IF([test "x$jemalloc_have_libs" != "x0"],[JE_LIBS="-ljemalloc"])
#
# Check for umem.
#
if test "$build_modules" != 'no'; then
- MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $LQR_LIBS $FFTW_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $LTDL_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $THREAD_LIBS"
+ MAGICK_DEP_LIBS="$USER_LIBS $LCMS_LIBS $FREETYPE_LIBS $LQR_LIBS $FFTW_LIBS $FONTCONFIG_LIBS $XEXT_LIBS $IPC_LIBS $X11_LIBS $XT_LIBS $LZMA_LIBS $BZLIB_LIBS $ZLIB_LIBS $LTDL_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JE_LIBS $THREAD_LIBS"
else
- MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $OPENJPEG_LIBS $PANGO_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $THREAD_LIBS"
+ MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $JPEG_LIBS $GS_LIBS $LQR_LIBS $PNG_LIBS $AUTOTRACE_LIBS $DJVU_LIBS $FFTW_LIBS $FPX_LIBS $FONTCONFIG_LIBS $WEBP_LIBS $WMF_LIBS $DPS_LIBS $XEXT_LIBS $XT_LIBS $IPC_LIBS $X11_LIBS $LZMA_LIBS $BZLIB_LIBS $OPENEXR_LIBS $OPENJPEG_LIBS $PANGO_LIBS $RSVG_LIBS $XML_LIBS $GVC_LIBS $ZLIB_LIBS $GDI32_LIBS $MATH_LIBS $GOMP_LIBS $CL_LIBS $UMEM_LIBS $JE_LIBS $THREAD_LIBS"
fi
AC_SUBST(MAGICK_DEP_LIBS)
--- /dev/null
+dnl -------------------------------------------------------- -*- autoconf -*-
+dnl Licensed to the Apache Software Foundation (ASF) under one or more
+dnl contributor license agreements. See the NOTICE file distributed with
+dnl this work for additional information regarding copyright ownership.
+dnl The ASF licenses this file to You under the Apache License, Version 2.0
+dnl (the "License"); you may not use this file except in compliance with
+dnl the License. You may obtain a copy of the License at
+dnl
+dnl http://www.apache.org/licenses/LICENSE-2.0
+dnl
+dnl Unless required by applicable law or agreed to in writing, software
+dnl distributed under the License is distributed on an "AS IS" BASIS,
+dnl WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+dnl See the License for the specific language governing permissions and
+dnl limitations under the License.
+
+dnl
+dnl jemalloc.m4: Trafficserver's jemalloc autoconf macros
+dnl modified to skip other TS_ helpers
+dnl
+
+AC_DEFUN([TS_CHECK_JEMALLOC], [
+AC_ARG_WITH([jemalloc-prefix],
+ [AS_HELP_STRING([--with-jemalloc-prefix=PREFIX],[Specify the jemalloc prefix [default=""]])],
+ [
+ jemalloc_prefix="$withval"
+ ],[
+ if test "`uname -s`" = "Darwin"; then
+ jemalloc_prefix="je_"
+ else
+ jemalloc_prefix=""
+ fi
+ ]
+)
+AC_DEFINE_UNQUOTED([prefix_jemalloc], [${jemalloc_prefix}], [jemalloc prefix])
+
+enable_jemalloc=no
+AC_ARG_WITH([jemalloc], [AS_HELP_STRING([--with-jemalloc=DIR], [use a specific jemalloc library])],
+[
+ if test "$withval" != "no"; then
+ if test "x${enable_tcmalloc}" = "xyes"; then
+ AC_MSG_ERROR([Cannot compile with both jemalloc and tcmalloc])
+ fi
+ enable_jemalloc=yes
+ jemalloc_base_dir="$withval"
+ case "$withval" in
+ yes)
+ jemalloc_base_dir="/usr"
+ AC_MSG_CHECKING(checking for jemalloc includes standard directories)
+ ;;
+ *":"*)
+ jemalloc_include="`echo $withval |sed -e 's/:.*$//'`"
+ jemalloc_ldflags="`echo $withval |sed -e 's/^.*://'`"
+ AC_MSG_CHECKING(checking for jemalloc includes in $jemalloc_include libs in $jemalloc_ldflags)
+ ;;
+ *)
+ jemalloc_include="$withval/include"
+ jemalloc_ldflags="$withval/lib"
+ AC_MSG_CHECKING(checking for jemalloc includes in $withval)
+ ;;
+ esac
+ fi
+])
+
+has_jemalloc=0
+if test "$enable_jemalloc" != "no"; then
+ jemalloc_have_headers=0
+ jemalloc_have_libs=0
+ if test "$jemalloc_base_dir" != "/usr"; then
+ CFLAGS="${CFLAGS} -I${jemalloc_include}"
+ LDFLAGS="${LDFLAGS} -L${jemalloc_ldflags}"
+ LIBTOOL_LINK_FLAGS="${LIBTOOL_LINK_FLAGS} -R${jemalloc_ldflags}"
+ fi
+ func="${jemalloc_prefix}malloc_stats_print"
+ AC_CHECK_LIB(jemalloc, ${func}, [jemalloc_have_libs=1])
+ if test "$jemalloc_have_libs" != "0"; then
+ AC_CHECK_HEADERS([jemalloc/jemalloc.h], [jemalloc_have_headers=1])
+ fi
+ if test "$jemalloc_have_headers" != "0"; then
+ has_jemalloc=1
+ LIBS="${LIBS} -ljemalloc"
+ AC_DEFINE(has_jemalloc, [1], [Link/compile against jemalloc])
+ else
+ AC_MSG_ERROR([Couldn't find a jemalloc installation])
+ fi
+fi
+AC_SUBST(has_jemalloc)
+])