From 161b926f220cb71b1a0efc7c0b54c0aa37a676ed Mon Sep 17 00:00:00 2001 From: cristy Date: Sat, 20 Mar 2010 19:34:32 +0000 Subject: [PATCH] --- config/config.h.in | 9 +++- config/configure.xml | 2 +- configure | 98 +++++++++++++++++++++--------------------- configure.ac | 18 ++++---- magick/fx.c | 4 ++ magick/magick-config.h | 25 ++++++++--- magick/version.h | 4 +- 7 files changed, 92 insertions(+), 68 deletions(-) diff --git a/config/config.h.in b/config/config.h.in index 741adcd0a..80a2415c3 100644 --- a/config/config.h.in +++ b/config/config.h.in @@ -43,8 +43,7 @@ /* Define if you have Display Postscript */ #undef DPS_DELEGATE -/* Build self-contained, embeddable, zero-configuration ImageMagick - (experimental) */ +/* Build self-contained, embeddable, zero-configuration ImageMagick */ #undef EMBEDDABLE_SUPPORT /* exclude deprecated methods in MagickCore API */ @@ -239,6 +238,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the `j0' function. */ +#undef HAVE_J0 + +/* Define to 1 if you have the `j1' function. */ +#undef HAVE_J1 + /* Define if you have the header file. */ #undef HAVE_LCMS_H diff --git a/config/configure.xml b/config/configure.xml index d78339587..e8afd9731 100644 --- a/config/configure.xml +++ b/config/configure.xml @@ -9,7 +9,7 @@ - + diff --git a/configure b/configure index a2121cfae..25a4c29a7 100755 --- a/configure +++ b/configure @@ -948,7 +948,6 @@ XMKMF BZLIB_LIBS BZLIB_DELEGATE_FALSE BZLIB_DELEGATE_TRUE -MATH_LIBS CCMALLOCDelegate UMEM_LIBS HasUMEM_FALSE @@ -958,6 +957,7 @@ GOMP_LIBS WITH_MAGICK_PLUS_PLUS_FALSE WITH_MAGICK_PLUS_PLUS_TRUE OPENMP_CXXFLAGS +MATH_LIBS POW_LIB LIBOBJS UINTPTR_T @@ -22644,7 +22644,54 @@ done -for ac_func in _exit atexit clock directio execvp fchmod floor fork ftime ftruncate getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r localtime_r lstat memmove memset mkstemp munmap _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign pow pread pwrite raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times usleep utime vsprintf vsnprintf waitpid _wfopen _wstat +# +# Find math library +# +MATH_LIBS='' +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 +$as_echo_n "checking for sqrt in -lm... " >&6; } +if test "${ac_cv_lib_m_sqrt+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lm $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 sqrt (); +int +main () +{ +return sqrt (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_m_sqrt=yes +else + ac_cv_lib_m_sqrt=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_m_sqrt" >&5 +$as_echo "$ac_cv_lib_m_sqrt" >&6; } +if test "x$ac_cv_lib_m_sqrt" = x""yes; then : + MATH_LIBS="-lm" +fi + +LIBS="$MATH_LIBS $LIBS" + + +for ac_func in _exit atexit clock directio execvp fchmod floor fork ftime ftruncate getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r j0 j1 localtime_r lstat memmove memset mkstemp munmap _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign pow pread pwrite raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times usleep utime vsprintf vsnprintf waitpid _wfopen _wstat do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" @@ -24233,53 +24280,6 @@ if test "$enable_efence" = 'yes'; then LIBS="$EFENCE_LIBS $LIBS" fi -# -# Find math library -# -MATH_LIBS='' -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 -$as_echo_n "checking for sqrt in -lm... " >&6; } -if test "${ac_cv_lib_m_sqrt+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lm $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 sqrt (); -int -main () -{ -return sqrt (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_m_sqrt=yes -else - ac_cv_lib_m_sqrt=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_m_sqrt" >&5 -$as_echo "$ac_cv_lib_m_sqrt" >&6; } -if test "x$ac_cv_lib_m_sqrt" = x""yes; then : - MATH_LIBS="-lm" -fi - -LIBS="$MATH_LIBS $LIBS" - - # # Check for BZLIB diff --git a/configure.ac b/configure.ac index 451c251a6..fcf456464 100755 --- a/configure.ac +++ b/configure.ac @@ -977,7 +977,15 @@ AC_TYPE_SIGNAL AC_FUNC_STRTOD AC_FUNC_VPRINTF -AC_CHECK_FUNCS([_exit atexit clock directio execvp fchmod floor fork ftime ftruncate getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r localtime_r lstat memmove memset mkstemp munmap _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign pow pread pwrite raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times usleep utime vsprintf vsnprintf waitpid _wfopen _wstat]) +# +# Find math library +# +MATH_LIBS='' +AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,) +LIBS="$MATH_LIBS $LIBS" +AC_SUBST(MATH_LIBS) + +AC_CHECK_FUNCS([_exit atexit clock directio execvp fchmod floor fork ftime ftruncate getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r j0 j1 localtime_r lstat memmove memset mkstemp munmap _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign pow pread pwrite raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times usleep utime vsprintf vsnprintf waitpid _wfopen _wstat]) # # Check for clock_gettime(). @@ -1263,14 +1271,6 @@ if test "$enable_efence" = 'yes'; then LIBS="$EFENCE_LIBS $LIBS" fi -# -# Find math library -# -MATH_LIBS='' -AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,) -LIBS="$MATH_LIBS $LIBS" -AC_SUBST(MATH_LIBS) - dnl =========================================================================== # diff --git a/magick/fx.c b/magick/fx.c index 2e0a37636..14b73e554 100644 --- a/magick/fx.c +++ b/magick/fx.c @@ -2262,18 +2262,22 @@ static MagickRealType FxEvaluateSubexpression(FxInfo *fx_info, { if (LocaleCompare(expression,"j") == 0) return(FxGetSymbol(fx_info,channel,x,y,expression,exception)); +#if defined(MAGICKCORE_HAVE_J0) if (LocaleNCompare(expression,"j0",2) == 0) { alpha=FxEvaluateSubexpression(fx_info,channel,x,y,expression+2,beta, exception); return((MagickRealType) j0((double) alpha)); } +#endif +#if defined(MAGICKCORE_HAVE_J1) if (LocaleNCompare(expression,"j1",2) == 0) { alpha=FxEvaluateSubexpression(fx_info,channel,x,y,expression+2,beta, exception); return((MagickRealType) j1((double) alpha)); } +#endif if (LocaleNCompare(expression,"jinc",4) == 0) { alpha=FxEvaluateSubexpression(fx_info,channel,x,y,expression+4,beta, diff --git a/magick/magick-config.h b/magick/magick-config.h index a05320de8..c522a289d 100644 --- a/magick/magick-config.h +++ b/magick/magick-config.h @@ -66,8 +66,7 @@ /* Define if you have Display Postscript */ /* #undef DPS_DELEGATE */ -/* Build self-contained, embeddable, zero-configuration ImageMagick - (experimental) */ +/* Build self-contained, embeddable, zero-configuration ImageMagick */ /* #undef EMBEDDABLE_SUPPORT */ /* exclude deprecated methods in MagickCore API */ @@ -281,7 +280,9 @@ #endif /* Define to 1 if you have the `floor' function. */ -/* #undef HAVE_FLOOR */ +#ifndef MAGICKCORE_HAVE_FLOOR +#define MAGICKCORE_HAVE_FLOOR 1 +#endif /* Define to 1 if you have the `fork' function. */ #ifndef MAGICKCORE_HAVE_FORK @@ -356,6 +357,16 @@ #define MAGICKCORE_HAVE_INTTYPES_H 1 #endif +/* Define to 1 if you have the `j0' function. */ +#ifndef MAGICKCORE_HAVE_J0 +#define MAGICKCORE_HAVE_J0 1 +#endif + +/* Define to 1 if you have the `j1' function. */ +#ifndef MAGICKCORE_HAVE_J1 +#define MAGICKCORE_HAVE_J1 1 +#endif + /* Define if you have the header file. */ #ifndef MAGICKCORE_HAVE_LCMS_H #define MAGICKCORE_HAVE_LCMS_H 1 @@ -514,7 +525,9 @@ #endif /* Define to 1 if you have the `pow' function. */ -/* #undef HAVE_POW */ +#ifndef MAGICKCORE_HAVE_POW +#define MAGICKCORE_HAVE_POW 1 +#endif /* Define to 1 if you have the `pread' function. */ #ifndef MAGICKCORE_HAVE_PREAD @@ -616,7 +629,9 @@ /* #undef HAVE_SPAWNVP */ /* Define to 1 if you have the `sqrt' function. */ -/* #undef HAVE_SQRT */ +#ifndef MAGICKCORE_HAVE_SQRT +#define MAGICKCORE_HAVE_SQRT 1 +#endif /* Define to 1 if you have the `stat' function. */ #ifndef MAGICKCORE_HAVE_STAT diff --git a/magick/version.h b/magick/version.h index b477b363b..3ebc1f395 100644 --- a/magick/version.h +++ b/magick/version.h @@ -33,8 +33,8 @@ extern "C" { #define MagickLibAddendum "-8" #define MagickLibInterface 3 #define MagickLibMinInterface 3 -#define MagickReleaseDate "2010-03-18" -#define MagickChangeDate "20100317" +#define MagickReleaseDate "2010-03-20" +#define MagickChangeDate "20100318" #define MagickAuthoritativeURL "http://www.imagemagick.org" #define MagickHomeURL "file:///usr/local/share/doc/ImageMagick-6.6.0/index.html" #if (MAGICKCORE_QUANTUM_DEPTH == 8) -- 2.50.1