...
diff --git a/MagickCore/deprecate.c b/MagickCore/deprecate.c
index 966fb67..f21026c 100644
--- a/MagickCore/deprecate.c
+++ b/MagickCore/deprecate.c
@@ -128,7 +128,7 @@
MagickTrue);
}
-#if defined(MAGICKCORE_WINDOWS_SUPPORT)
+#if defined(MAGICKCORE_WINGDI32_DELEGATE)
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
@@ -286,7 +286,7 @@
}
#endif
-#if defined(MAGICKCORE_WINDOWS_SUPPORT)
+#if defined(MAGICKCORE_WINGDI32_DELEGATE)
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
diff --git a/MagickCore/deprecate.h b/MagickCore/deprecate.h
index 107e5e2..b2751be 100644
--- a/MagickCore/deprecate.h
+++ b/MagickCore/deprecate.h
@@ -32,9 +32,11 @@
extern MagickExport MagickBooleanType
GetMagickSeekableStream(const MagickInfo *);
+#if defined(MAGICKCORE_WINGDI32_DELEGATE)
extern MagickExport void
*CropImageToHBITMAP(Image *,const RectangleInfo *,ExceptionInfo *),
*ImageToHBITMAP(Image *,ExceptionInfo *);
+#endif
#endif
diff --git a/Makefile.in b/Makefile.in
index 74cb251..23c5a0a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1923,7 +1923,7 @@
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(coders_xps_la_LDFLAGS) $(LDFLAGS) -o $@
@WITH_MODULES_TRUE@am_coders_xps_la_rpath = -rpath $(codersdir)
-coders_xtrn_la_DEPENDENCIES = $(MAGICKCORE_LIBS) $(am__DEPENDENCIES_1)
+coders_xtrn_la_DEPENDENCIES = $(MAGICKCORE_LIBS)
am_coders_xtrn_la_OBJECTS = coders/xtrn_la-xtrn.lo
coders_xtrn_la_OBJECTS = $(am_coders_xtrn_la_OBJECTS)
coders_xtrn_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
@@ -3297,7 +3297,6 @@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-OLE_LIBS = @OLE_LIBS@
OPENEXR_CFLAGS = @OPENEXR_CFLAGS@
OPENEXR_LIBS = @OPENEXR_LIBS@
OPENMP_CFLAGS = @OPENMP_CFLAGS@
@@ -3389,7 +3388,6 @@
WEBP_LIBS = @WEBP_LIBS@
WMF_CFLAGS = @WMF_CFLAGS@
WMF_LIBS = @WMF_LIBS@
-WS2_32_LIBS = @WS2_32_LIBS@
WWWDecodeDelegate = @WWWDecodeDelegate@
WebPDecodeDelegate = @WebPDecodeDelegate@
WebPEncodeDelegate = @WebPEncodeDelegate@
diff --git a/configure b/configure
index 2422fb7..8d526c9 100755
--- a/configure
+++ b/configure
@@ -838,6 +838,9 @@
GS_LIBS
GS_DELEGATE_FALSE
GS_DELEGATE_TRUE
+GDI32_LIBS
+WINGDI32_DELEGATE_FALSE
+WINGDI32_DELEGATE_TRUE
RAQM_DELEGATE_FALSE
RAQM_DELEGATE_TRUE
RAQM_LIBS
@@ -911,8 +914,8 @@
HAVE_TCMALLOC_FALSE
HAVE_TCMALLOC_TRUE
JEMALLOC_LIBS
-HasJEMALLOC_FALSE
-HasJEMALLOC_TRUE
+HAVE_JEMALLOC_FALSE
+HAVE_JEMALLOC_TRUE
GOMP_LIBS
WITH_MAGICK_PLUS_PLUS_FALSE
WITH_MAGICK_PLUS_PLUS_TRUE
@@ -975,17 +978,10 @@
SHAREARCH_DIR
INCLUDEARCH_DIR
WinPathScript
-USING_CL_FALSE
-USING_CL_TRUE
CYGWIN_BUILD_FALSE
CYGWIN_BUILD_TRUE
WIN32_NATIVE_BUILD_FALSE
WIN32_NATIVE_BUILD_TRUE
-WINGDI32_DELEGATE_FALSE
-WINGDI32_DELEGATE_TRUE
-WS2_32_LIBS
-OLE_LIBS
-GDI32_LIBS
HAVE_LD_VERSION_SCRIPT_FALSE
HAVE_LD_VERSION_SCRIPT_TRUE
PKG_CONFIG_LIBDIR
@@ -1221,6 +1217,7 @@
with_fontconfig
with_freetype
with_raqm
+with_gdi32
with_gslib
with_fontpath
with_gs_font_dir
@@ -2040,6 +2037,7 @@
--without-fontconfig disable fontconfig support
--without-freetype disable Freetype support
--without-raqm disable Raqm support
+ --without-gdi32 disable Windows gdi32 support
--with-gslib enable Ghostscript library support
--with-fontpath=DIR prepend to default font search path
--with-gs-font-dir=DIR Ghostscript font directory
@@ -4576,7 +4574,7 @@
MAGICK_VERSION=7.0.10-54
-MAGICK_GIT_REVISION=18126:133411f2d:20201228
+MAGICK_GIT_REVISION=18132:a5b64ccc4:20201230
# Substitute library versioning
@@ -9084,38 +9082,16 @@
-GDI32_LIBS=''
-WS2_32_LIBS=''
native_win32_build='no'
cygwin_build='no'
case "${host_os}" in
cygwin* )
cygwin_build='yes'
- GDI32_LIBS='-lgdi32'
;;
mingw* )
native_win32_build='yes'
- GDI32_LIBS='-lgdi32'
- OLE_LIBS='-loleaut32'
- WS2_32_LIBS="-lws2_32"
;;
esac
-if test "${GDI32_LIBS}x" != 'x'; then
-
-$as_echo "#define WINGDI32_DELEGATE 1" >>confdefs.h
-
-fi
-
-
-
- if test "${GDI32_LIBS}x" != 'x' ; then
- WINGDI32_DELEGATE_TRUE=
- WINGDI32_DELEGATE_FALSE='#'
-else
- WINGDI32_DELEGATE_TRUE='#'
- WINGDI32_DELEGATE_FALSE=
-fi
-
if test "${native_win32_build}" = 'yes' ; then
WIN32_NATIVE_BUILD_TRUE=
WIN32_NATIVE_BUILD_FALSE='#'
@@ -9132,14 +9108,6 @@
CYGWIN_BUILD_FALSE=
fi
- if test "x${CC}" = 'xcl.exe' ; then
- USING_CL_TRUE=
- USING_CL_FALSE='#'
-else
- USING_CL_TRUE='#'
- USING_CL_FALSE=
-fi
-
WinPathScript="${srcdirfull}/winpath.sh"
@@ -26688,7 +26656,7 @@
JEMALLOC_LIBS='-ljemalloc'
LIBS="$JEMALLOC_LIBS $LIBS"
-$as_echo "#define HasJEMALLOC 1" >>confdefs.h
+$as_echo "#define HAVE_JEMALLOC 1" >>confdefs.h
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -26700,11 +26668,11 @@
fi
fi
if test "$have_jemalloc" = 'yes'; then
- HasJEMALLOC_TRUE=
- HasJEMALLOC_FALSE='#'
+ HAVE_JEMALLOC_TRUE=
+ HAVE_JEMALLOC_FALSE='#'
else
- HasJEMALLOC_TRUE='#'
- HasJEMALLOC_FALSE=
+ HAVE_JEMALLOC_TRUE='#'
+ HAVE_JEMALLOC_FALSE=
fi
@@ -29804,6 +29772,180 @@
#
+# Enable Windows gdi32 libraries
+#
+
+# Check whether --with-gdi32 was given.
+if test "${with_gdi32+set}" = set; then :
+ withval=$with_gdi32; with_gdi32=$withval
+else
+ with_gdi32='yes'
+fi
+
+if test "$with_gdi32" != 'yes' ; then
+ DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gdi32=$with_gdi32 "
+fi
+
+#
+# Check for Windows gdi32 library.
+#
+have_gdi32='no'
+if test "$with_gdi32" != 'no'; then
+ GDI32_LIBS=''
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Windows GDI32 support" >&5
+$as_echo_n "checking for Windows GDI32 support... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+$as_echo "" >&6; }
+ failed=0
+ passed=0
+ found_libuser32=0
+ found_libgdi32=0
+ ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default"
+if test "x$ac_cv_header_windows_h" = xyes; then :
+ passed=`expr $passed + 1`
+else
+ failed=`expr $failed + 1`
+fi
+
+
+ ac_fn_c_check_header_compile "$LINENO" "winuser.h" "ac_cv_header_winuser_h" "#include <windows.h>
+"
+if test "x$ac_cv_header_winuser_h" = xyes; then :
+ passed=`expr $passed + 1`
+else
+ failed=`expr $failed + 1`
+fi
+
+
+ ac_fn_c_check_header_compile "$LINENO" "wingdi.h" "ac_cv_header_wingdi_h" "#include <windows.h>
+"
+if test "x$ac_cv_header_wingdi_h" = xyes; then :
+ passed=`expr $passed + 1`
+else
+ failed=`expr $failed + 1`
+fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenClipboard in -luser32" >&5
+$as_echo_n "checking for OpenClipboard in -luser32... " >&6; }
+if ${ac_cv_lib_user32_OpenClipboard+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-luser32 $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 OpenClipboard ();
+int
+main ()
+{
+return OpenClipboard ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_user32_OpenClipboard=yes
+else
+ ac_cv_lib_user32_OpenClipboard=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_user32_OpenClipboard" >&5
+$as_echo "$ac_cv_lib_user32_OpenClipboard" >&6; }
+if test "x$ac_cv_lib_user32_OpenClipboard" = xyes; then :
+ found_libuser32=`expr $found_libuser32 + 1`
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CreateDIBSection in -lgdi32" >&5
+$as_echo_n "checking for CreateDIBSection in -lgdi32... " >&6; }
+if ${ac_cv_lib_gdi32_CreateDIBSection+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgdi32 -luser32 $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 CreateDIBSection ();
+int
+main ()
+{
+return CreateDIBSection ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_gdi32_CreateDIBSection=yes
+else
+ ac_cv_lib_gdi32_CreateDIBSection=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_gdi32_CreateDIBSection" >&5
+$as_echo "$ac_cv_lib_gdi32_CreateDIBSection" >&6; }
+if test "x$ac_cv_lib_gdi32_CreateDIBSection" = xyes; then :
+ found_libgdi32=`expr $found_libgdi32 + 1`
+fi
+
+ if test $found_libuser32 -gt 0 -a $found_libgdi32 -gt 0; then
+ passed=`expr $passed + 1`
+ else
+ failed=`expr $failed + 1`
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Windows GDI32 support is complete" >&5
+$as_echo_n "checking if Windows GDI32 support is complete... " >&6; }
+ if test $passed -gt 0; then
+ if test $failed -gt 0; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- some components failed test" >&5
+$as_echo "no -- some components failed test" >&6; }
+ have_gdi32='no (failed tests)'
+ else
+ GDI32_LIBS='-lgdi32 -luser32'
+ LIBS="$GDI32_LIBS $LIBS"
+
+$as_echo "#define WINGDI32_DELEGATE 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ have_gdi32='yes'
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+fi
+ if test "$have_gdi32" = 'yes'; then
+ WINGDI32_DELEGATE_TRUE=
+ WINGDI32_DELEGATE_FALSE='#'
+else
+ WINGDI32_DELEGATE_TRUE='#'
+ WINGDI32_DELEGATE_FALSE=
+fi
+
+
+
+
+
+#
# Check for Ghostscript library or framework.
#
# Test for iapi.h & test for gsapi_new_instance in -lgs
@@ -35793,9 +35935,9 @@
#
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 $ZIPLIB_LIBS $ZSTD_LIBS $LTDL_LIBS $GDI32_LIBS $WS2_32_LIBS $MATH_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS $TCMALLOC_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 $ZIPLIB_LIBS $ZSTD_LIBS $LTDL_LIBS $GDI32_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 $JXL_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 $ZLIB_LIBS $ZSTD_LIBS $LTDL_LIBS $GDI32_LIBS $WS2_32_LIBS $MATH_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS $TCMALLOC_LIBS"
+ MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $RAQM_LIBS $JPEG_LIBS $JXL_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 $ZLIB_LIBS $ZSTD_LIBS $LTDL_LIBS $GDI32_LIBS $MATH_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS $TCMALLOC_LIBS"
fi
MAGICK_EXTRA_DEP_LIBS="$GOMP_LIBS"
@@ -36020,10 +36162,6 @@
as_fn_error $? "conditional \"HAVE_LD_VERSION_SCRIPT\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${WINGDI32_DELEGATE_TRUE}" && test -z "${WINGDI32_DELEGATE_FALSE}"; then
- as_fn_error $? "conditional \"WINGDI32_DELEGATE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
if test -z "${WIN32_NATIVE_BUILD_TRUE}" && test -z "${WIN32_NATIVE_BUILD_FALSE}"; then
as_fn_error $? "conditional \"WIN32_NATIVE_BUILD\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -36032,10 +36170,6 @@
as_fn_error $? "conditional \"CYGWIN_BUILD\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${USING_CL_TRUE}" && test -z "${USING_CL_FALSE}"; then
- as_fn_error $? "conditional \"USING_CL\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -36073,8 +36207,8 @@
as_fn_error $? "conditional \"WITH_MAGICK_PLUS_PLUS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${HasJEMALLOC_TRUE}" && test -z "${HasJEMALLOC_FALSE}"; then
- as_fn_error $? "conditional \"HasJEMALLOC\" was never defined.
+if test -z "${HAVE_JEMALLOC_TRUE}" && test -z "${HAVE_JEMALLOC_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_JEMALLOC\" 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
@@ -36141,6 +36275,10 @@
as_fn_error $? "conditional \"RAQM_DELEGATE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${WINGDI32_DELEGATE_TRUE}" && test -z "${WINGDI32_DELEGATE_FALSE}"; then
+ as_fn_error $? "conditional \"WINGDI32_DELEGATE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${GS_DELEGATE_TRUE}" && test -z "${GS_DELEGATE_FALSE}"; then
as_fn_error $? "conditional \"GS_DELEGATE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/configure.ac b/configure.ac
index 3051ce8..9d41d4c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -342,32 +342,18 @@
AC_EXEEXT
AC_OBJEXT
-GDI32_LIBS=''
-WS2_32_LIBS=''
native_win32_build='no'
cygwin_build='no'
case "${host_os}" in
cygwin* )
cygwin_build='yes'
- GDI32_LIBS='-lgdi32'
;;
mingw* )
native_win32_build='yes'
- GDI32_LIBS='-lgdi32'
- OLE_LIBS='-loleaut32'
- WS2_32_LIBS="-lws2_32"
;;
esac
-if test "${GDI32_LIBS}x" != 'x'; then
- AC_DEFINE([WINGDI32_DELEGATE],[1],[Define to use the Windows GDI32 library])
-fi
-AC_SUBST([GDI32_LIBS])
-AC_SUBST([OLE_LIBS])
-AC_SUBST([WS2_32_LIBS])
-AM_CONDITIONAL([WINGDI32_DELEGATE],[ test "${GDI32_LIBS}x" != 'x' ])
AM_CONDITIONAL([WIN32_NATIVE_BUILD],[ test "${native_win32_build}" = 'yes' ])
AM_CONDITIONAL([CYGWIN_BUILD],[ test "${cygwin_build}" = 'yes' ])
-AM_CONDITIONAL([USING_CL],[ test "x${CC}" = 'xcl.exe' ])
WinPathScript="${srcdirfull}/winpath.sh"
AC_SUBST([WinPathScript])
@@ -1339,7 +1325,7 @@
else
JEMALLOC_LIBS='-ljemalloc'
LIBS="$JEMALLOC_LIBS $LIBS"
- AC_DEFINE([HasJEMALLOC],[1],[Define if you have jemalloc memory allocation library])
+ AC_DEFINE([HAVE_JEMALLOC],[1],[Define if you have jemalloc memory allocation library])
AC_MSG_RESULT([yes])
have_jemalloc='yes'
fi
@@ -1347,7 +1333,7 @@
AC_MSG_RESULT([no])
fi
fi
-AM_CONDITIONAL([HasJEMALLOC],[ test "$have_jemalloc" = 'yes'])
+AM_CONDITIONAL([HAVE_JEMALLOC],[ test "$have_jemalloc" = 'yes'])
AC_SUBST([JEMALLOC_LIBS])
#
@@ -2117,6 +2103,62 @@
dnl ===========================================================================
#
+# Enable Windows gdi32 libraries
+#
+AC_ARG_WITH([gdi32],
+ AS_HELP_STRING([--without-gdi32],
+ [disable Windows gdi32 support]),
+ [with_gdi32=$withval],
+ [with_gdi32='yes'])
+if test "$with_gdi32" != 'yes' ; then
+ DISTCHECK_CONFIG_FLAGS="${DISTCHECK_CONFIG_FLAGS} --with-gdi32=$with_gdi32 "
+fi
+
+#
+# Check for Windows gdi32 library.
+#
+have_gdi32='no'
+if test "$with_gdi32" != 'no'; then
+ GDI32_LIBS=''
+ AC_MSG_CHECKING([for Windows GDI32 support])
+ AC_MSG_RESULT()
+ failed=0
+ passed=0
+ found_libuser32=0
+ found_libgdi32=0
+ AC_CHECK_HEADER([windows.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`])
+ AC_CHECK_HEADER([winuser.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],[#include <windows.h>])
+ AC_CHECK_HEADER([wingdi.h],[passed=`expr $passed + 1`],[failed=`expr $failed + 1`],[#include <windows.h>])
+ AC_CHECK_LIB([user32],[OpenClipboard],[found_libuser32=`expr $found_libuser32 + 1`],[],)
+ AC_CHECK_LIB([gdi32],[CreateDIBSection],[found_libgdi32=`expr $found_libgdi32 + 1`],[],[-luser32])
+ if test $found_libuser32 -gt 0 -a $found_libgdi32 -gt 0; then
+ passed=`expr $passed + 1`
+ else
+ failed=`expr $failed + 1`
+ fi
+ AC_MSG_CHECKING([if Windows GDI32 support is complete])
+ if test $passed -gt 0; then
+ if test $failed -gt 0; then
+ AC_MSG_RESULT([no -- some components failed test])
+ have_gdi32='no (failed tests)'
+ else
+ GDI32_LIBS='-lgdi32 -luser32'
+ LIBS="$GDI32_LIBS $LIBS"
+ AC_DEFINE([WINGDI32_DELEGATE],[1],[Define to use the Windows GDI32 library])
+ AC_MSG_RESULT([yes])
+ have_gdi32='yes'
+ fi
+ else
+ AC_MSG_RESULT([no])
+ fi
+fi
+AM_CONDITIONAL([WINGDI32_DELEGATE], [test "$have_gdi32" = 'yes'])
+AC_SUBST([GDI32_LIBS])
+
+
+dnl ===========================================================================
+
+#
# Check for Ghostscript library or framework.
#
# Test for iapi.h & test for gsapi_new_instance in -lgs
@@ -3920,9 +3962,9 @@
#
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 $ZIPLIB_LIBS $ZSTD_LIBS $LTDL_LIBS $GDI32_LIBS $WS2_32_LIBS $MATH_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS $TCMALLOC_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 $ZIPLIB_LIBS $ZSTD_LIBS $LTDL_LIBS $GDI32_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 $JXL_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 $ZLIB_LIBS $ZSTD_LIBS $LTDL_LIBS $GDI32_LIBS $WS2_32_LIBS $MATH_LIBS $CL_LIBS $UMEM_LIBS $JEMALLOC_LIBS $THREAD_LIBS $TCMALLOC_LIBS"
+ MAGICK_DEP_LIBS="$USER_LIBS $JBIG_LIBS $LCMS_LIBS $TIFF_LIBS $FREETYPE_LIBS $RAQM_LIBS $JPEG_LIBS $JXL_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 $ZLIB_LIBS $ZSTD_LIBS $LTDL_LIBS $GDI32_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])