Commit a9e64eb6 authored by cristy's avatar cristy

git-svn-id:...

git-svn-id: https://subversion.imagemagick.org/subversion/ImageMagick/trunk@1011 aa41f4f7-0bf4-0310-aa73-e5a19afd5a74
parent c129534f
......@@ -10,7 +10,7 @@
<configure name="LIB_VERSION" value="0x659"/>
<configure name="LIB_VERSION_NUMBER" value="6,5,9,1"/>
<configure name="RELEASE_DATE" value="2010-01-21"/>
<configure name="CONFIGURE" value="./configure "/>
<configure name="CONFIGURE" value="./configure '--enable-maintainer-mode'"/>
<configure name="PREFIX" value="/usr/local"/>
<configure name="EXEC-PREFIX" value="/usr/local"/>
<configure name="VERSION" value="6.5.9"/>
......
This diff is collapsed.
......@@ -335,7 +335,7 @@ case "$host" in
LDFLAGS="$LDFLAGS -L/sw/lib"
fi
dnl OS X universal binary support, requires --disable-dependency-tracking
AC_ARG_ENABLE(osx-universal-binary,
AC_ARG_ENABLE([osx-universal-binary],
AC_HELP_STRING([--enable-osx-universal-binary],
[build universal binary on OS X [[default=no]]]),
[build_osxuniversal="${enableval}"], [build_osxuniversal=no])
......@@ -386,7 +386,7 @@ MAGICK_PCFLAGS="$MAGICK_PCFLAGS $OPENMP_CFLAGS"
AC_SUBST(OPENMP_CFLAGS)
# Enable support for OpenCL
AX_CHECK_CL
AX_CHECK_CL([C])
CFLAGS="$CL_CFLAGS $CFLAGS"
LIBS="$CL_LIBS $LIBS"
AC_SUBST(CL_CFLAGS)
......
......@@ -39,72 +39,80 @@ AC_DEFUN([AX_CHECK_CL],
AC_REQUIRE([AC_PROG_SED])dnl
AC_REQUIRE([ACX_PTHREAD])dnl
AC_LANG_PUSH([C])
AX_LANG_COMPILER_MS
AS_IF([test X$ax_compiler_ms = Xno],
[CL_CFLAGS="${PTHREAD_CFLAGS}"; CL_LIBS="${PTHREAD_LIBS} -lm"])
ax_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CL_CFLAGS $CPPFLAGS"
AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h])
CPPFLAGS=$ax_save_CPPFLAGS
AC_CHECK_HEADERS([windows.h])
m4_define([AX_CHECK_CL_PROGRAM],
[AC_LANG_PROGRAM([[
# if defined(HAVE_WINDOWS_H) && defined(_WIN32)
# include <windows.h>
# endif
# ifdef HAVE_CL_CL_H
# include <CL/cl.h>
# elif defined(HAVE_OPENCL_CL_H)
# include <OpenCL/cl.h>
# else
# error no CL.h
# endif]],
[[clCreateContextFromType(0,0,0,0,0)]])])
AC_CACHE_CHECK([for OpenCL library], [ax_cv_check_cl_libcl],
[ax_cv_check_cl_libcl=no
case $host_cpu in
x86_64) ax_check_cl_libdir=lib64 ;;
*) ax_check_cl_libdir=lib ;;
esac
ax_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CL_CFLAGS $CPPFLAGS"
ax_save_LIBS=$LIBS
LIBS=""
ax_check_libs="-lOpenCL -lCL -lclparser"
for ax_lib in $ax_check_libs; do
AS_IF([test X$ax_compiler_ms = Xyes],
[ax_try_lib=`echo $ax_lib | $SED -e 's/^-l//' -e 's/$/.lib/'`],
[ax_try_lib=$ax_lib])
LIBS="$ax_try_lib $CL_LIBS $ax_save_LIBS"
AC_LINK_IFELSE([AX_CHECK_CL_PROGRAM],
[ax_cv_check_cl_libcl=$ax_try_lib; break],
[ax_check_cl_nvidia_flags="-L/usr/$ax_check_cl_libdir/nvidia" LIBS="$ax_try_lib $ax_check_cl_nvidia_flags $CL_LIBS $ax_save_LIBS"
AC_LINK_IFELSE([AX_CHECK_CL_PROGRAM],
[ax_cv_check_cl_libcl="$ax_try_lib $ax_check_cl_nvidia_flags"; break],
[ax_check_cl_dylib_flag='-framework OpenCL -L/System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries' LIBS="$ax_try_lib $ax_check_cl_dylib_flag $CL_LIBS $ax_save_LIBS"
AC_LINK_IFELSE([AX_CHECK_CL_PROGRAM],
[ax_cv_check_cl_libcl="$ax_try_lib $ax_check_cl_dylib_flag"; break])])])
done
AS_IF([test "X$ax_cv_check_cl_libcl" = Xno -a X$no_x = Xyes],
[LIBS='-framework OpenCL'
AC_LINK_IFELSE([AX_CHECK_CL_PROGRAM],
[ax_cv_check_cl_libcl=$LIBS])])
LIBS=$ax_save_LIBS
CPPFLAGS=$ax_save_CPPFLAGS])
AS_IF([test "X$ax_cv_check_cl_libcl" = Xno],
[no_cl=yes; CL_CFLAGS=""; CL_LIBS=""],
[CL_LIBS="$ax_cv_check_cl_libcl $CL_LIBS"; AC_DEFINE([_OPENCL], [1],
[Define this for the OpenCL Accelerator])])
AC_LANG_POP([C])
AC_ARG_ENABLE([opencl],
[AC_HELP_STRING([--disable-opencl],
[do not use OpenCL])],
[disable_opencl=$enableval],
[disable_opencl='yes'])
if test "$disable_opencl" = 'yes'; then
AC_LANG_PUSH([$1])
AX_LANG_COMPILER_MS
AS_IF([test X$ax_compiler_ms = Xno],
[CL_CFLAGS="${PTHREAD_CFLAGS}"; CL_LIBS="${PTHREAD_LIBS} -lm"])
ax_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CL_CFLAGS $CPPFLAGS"
AC_CHECK_HEADERS([CL/cl.h OpenCL/cl.h])
CPPFLAGS=$ax_save_CPPFLAGS
AC_CHECK_HEADERS([windows.h])
m4_define([AX_CHECK_CL_PROGRAM],
[AC_LANG_PROGRAM([[
# if defined(HAVE_WINDOWS_H) && defined(_WIN32)
# include <windows.h>
# endif
# ifdef HAVE_CL_CL_H
# include <CL/cl.h>
# elif defined(HAVE_OPENCL_CL_H)
# include <OpenCL/cl.h>
# else
# error no CL.h
# endif]],
[[clCreateContextFromType(0,0,0,0,0)]])])
AC_CACHE_CHECK([for OpenCL library], [ax_cv_check_cl_libcl],
[ax_cv_check_cl_libcl=no
case $host_cpu in
x86_64) ax_check_cl_libdir=lib64 ;;
*) ax_check_cl_libdir=lib ;;
esac
ax_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CL_CFLAGS $CPPFLAGS"
ax_save_LIBS=$LIBS
LIBS=""
ax_check_libs="-lOpenCL -lCL -lclparser"
for ax_lib in $ax_check_libs; do
AS_IF([test X$ax_compiler_ms = Xyes],
[ax_try_lib=`echo $ax_lib | $SED -e 's/^-l//' -e 's/$/.lib/'`],
[ax_try_lib=$ax_lib])
LIBS="$ax_try_lib $CL_LIBS $ax_save_LIBS"
AC_LINK_IFELSE([AX_CHECK_CL_PROGRAM],
[ax_cv_check_cl_libcl=$ax_try_lib; break],
[ax_check_cl_nvidia_flags="-L/usr/$ax_check_cl_libdir/nvidia" LIBS="$ax_try_lib $ax_check_cl_nvidia_flags $CL_LIBS $ax_save_LIBS"
AC_LINK_IFELSE([AX_CHECK_CL_PROGRAM],
[ax_cv_check_cl_libcl="$ax_try_lib $ax_check_cl_nvidia_flags"; break],
[ax_check_cl_dylib_flag='-framework OpenCL -L/System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries' LIBS="$ax_try_lib $ax_check_cl_dylib_flag $CL_LIBS $ax_save_LIBS"
AC_LINK_IFELSE([AX_CHECK_CL_PROGRAM],
[ax_cv_check_cl_libcl="$ax_try_lib $ax_check_cl_dylib_flag"; break])])])
done
AS_IF([test "X$ax_cv_check_cl_libcl" = Xno -a X$no_x = Xyes],
[LIBS='-framework OpenCL'
AC_LINK_IFELSE([AX_CHECK_CL_PROGRAM],
[ax_cv_check_cl_libcl=$LIBS])])
LIBS=$ax_save_LIBS
CPPFLAGS=$ax_save_CPPFLAGS])
AS_IF([test "X$ax_cv_check_cl_libcl" = Xno],
[no_cl=yes; CL_CFLAGS=""; CL_LIBS=""],
[CL_LIBS="$ax_cv_check_cl_libcl $CL_LIBS"; AC_DEFINE([_OPENCL], [1],
[Define this for the OpenCL Accelerator])])
AC_LANG_POP([$1])
fi
AC_SUBST([CL_CFLAGS])
AC_SUBST([CL_LIBS])
])dnl
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment