diff options
author | Eli Zaretskii <eliz@gnu.org> | 2020-04-14 18:10:41 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2020-04-14 18:10:41 +0300 |
commit | e94206aaf608a899c81bb07fe91d26439f51b3f8 (patch) | |
tree | a4a24407f1ba3d70ae192a1aad954a2bed3e91e1 /configure.ac | |
parent | df254a7445a86dc25d133f2d79be8096190a8b96 (diff) | |
download | emacs-e94206aaf608a899c81bb07fe91d26439f51b3f8.tar.gz |
Make use of MS-Windows native image API be selectable at run time
* configure.ac: Minor cleanup in how w32image.o is added to the
build when native image APIs are requested.
* src/w32gui.h (w32_load_image, w32_can_use_native_image_api)
(w32_gdiplus_shutdown): Move prototypes from w32term.h here, since
w32.c doesn't include w32term.h.
* src/image.c (struct image_type): No need to pass TYPE to the
'valid_p' method. All callers changed.
(initialize_image_type) [HAVE_NATIVE_IMAGE_API]: Call
'image_can_use_native_api' before trying image-specific methods.
(image_can_use_native_api): New function.
(image_types): Remove the native_image_type parts.
(syms_of_image): New symbol 'native-image'.
(parse_image_spec): Accept native-image "type" for any image type.
* src/w32term.c (syms_of_w32term): New variable
'w32-use-native-image-API'.
* src/w32image.c: (w32_can_use_native_image_api): New function.
(gdiplus_init): Rename from w32_gdiplus_startup. Simplify code.
Move the call to GdiplusStartup to a separate function. Use
ordinal number for SHCreateMemStream if cannot load it by name.
(w32_load_image): Ignore Win32Error status from
w32_select_active_frame.
Move DEFSYMs from here...
* src/image.c (syms_of_image) [HAVE_NATIVE_IMAGE_API]: ...to here.
* etc/NEWS: Update the entry about native image API use.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 41a1860493a..b0a2cc466b9 100644 --- a/configure.ac +++ b/configure.ac @@ -433,7 +433,7 @@ OPTION_DEFAULT_ON([libsystemd],[don't compile with libsystemd support]) OPTION_DEFAULT_ON([cairo],[don't compile with Cairo drawing]) OPTION_DEFAULT_ON([xml2],[don't compile with XML parsing support]) OPTION_DEFAULT_OFF([imagemagick],[compile with ImageMagick image support]) -OPTION_DEFAULT_OFF([native-image-api], [use native API's (GDI+ on Windows) for JPEG/TIFF/GIFF/PNG]) +OPTION_DEFAULT_ON([native-image-api], [use native image APIs (GDI+ on Windows)]) OPTION_DEFAULT_ON([json], [don't compile with native JSON support]) OPTION_DEFAULT_ON([xft],[don't use XFT for anti aliased fonts]) @@ -2127,7 +2127,7 @@ LIB_WSOCK32= NTLIB= CM_OBJ="cm.o" XARGS_LIMIT= -HAVE_NATIVE_IMAGE_API=no +NATIVE_IMAGE_API=no if test "${HAVE_W32}" = "yes"; then AC_DEFINE(HAVE_NTGUI, 1, [Define to use native MS Windows GUI.]) if test "$with_toolkit_scroll_bars" = "no"; then @@ -2156,12 +2156,14 @@ if test "${HAVE_W32}" = "yes"; then # the rc file), not a linker script. W32_RES_LINK="-Wl,emacs.res" else + W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o" + dnl FIXME: This should probably be supported for Cygwin/w32 as + dnl well, but the Cygwin build needs to link against -lgdiplus if test "${with_native_image_api}" = yes; then - AC_DEFINE(HAVE_NATIVE_IMAGE_API, 1, [Define to use MS Windows GDI+ for images.]) - HAVE_NATIVE_IMAGE_API=yes - W32_NATIVE_IMAGE_API="w32image.o" + AC_DEFINE(HAVE_NATIVE_IMAGE_API, 1, [Define to use native OS APIs for images.]) + NATIVE_IMAGE_API="yes (w32)" + W32_OBJ="$W32_OBJ w32image.o" fi - W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o $W32_NATIVE_IMAGE_API" W32_LIBS="$W32_LIBS -lwinmm -lusp10 -lgdi32 -lcomdlg32" W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32" W32_RES_LINK="\$(EMACSRES)" @@ -5710,7 +5712,7 @@ AS_ECHO([" Does Emacs use -lXaw3d? ${HAVE_XAW3D Does Emacs use cairo? ${HAVE_CAIRO} Does Emacs use -llcms2? ${HAVE_LCMS2} Does Emacs use imagemagick? ${HAVE_IMAGEMAGICK} - Does Emacs use native API for images? ${HAVE_NATIVE_IMAGE_API} + Does Emacs use native APIs for images? ${NATIVE_IMAGE_API} Does Emacs support sound? ${HAVE_SOUND} Does Emacs use -lgpm? ${HAVE_GPM} Does Emacs use -ldbus? ${HAVE_DBUS} |