* Oddities in ./configure --with-pgtk's output
@ 2021-12-19 10:15 Kévin Le Gouguec
2021-12-19 10:28 ` Po Lu
0 siblings, 1 reply; 9+ messages in thread
From: Kévin Le Gouguec @ 2021-12-19 10:15 UTC (permalink / raw)
To: emacs-devel
Hello folks,
I diff'ed the output of "./configure" and "./configure --with-pgtk" out
of curiosity; there are a couple of things that I found intriguing.
Some of them might warrant a bug report; since I could very well be
missing something, I thought I'd report here first.
(This is on openSUSE Tumbleweed, on commit 2021-12-19 "Add missing
implementation of `pgtk-menu-bar-open'" (579d7c20da))
> -checking for libwebp >= 0.6.0... yes
IIUC 'configure' guards WebP support behind several 'test "${HAVE_XXX}"'
clauses where XXX represents "something that supports displaying
images". Should this be extended to ${HAVE_PGTK}?
> +checking for pkg-config... (cached) /usr/bin/pkg-config
> +checking pkg-config is at least version 0.16... yes
Not sure why this check is only present --with-pgtk?
> @@ -619,9 +592,9 @@
> Does Emacs use -lxml2? yes
> Does Emacs use -lfreetype? yes
> Does Emacs use HarfBuzz? yes
> - Does Emacs use -lm17n-flt? yes
> + Does Emacs use -lm17n-flt?
> Does Emacs use -lotf? yes
> - Does Emacs use -lxft? no
> + Does Emacs use -lxft?
> Does Emacs use -lsystemd? yes
> Does Emacs use -ljansson? yes
> Does Emacs use the GMP library? yes
Should -lm17n-flt and -lxft say "no" instead of being empty?
At any rate, thanks for all the hard work.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Oddities in ./configure --with-pgtk's output
2021-12-19 10:15 Oddities in ./configure --with-pgtk's output Kévin Le Gouguec
@ 2021-12-19 10:28 ` Po Lu
2021-12-19 12:49 ` Kévin Le Gouguec
0 siblings, 1 reply; 9+ messages in thread
From: Po Lu @ 2021-12-19 10:28 UTC (permalink / raw)
To: Kévin Le Gouguec; +Cc: emacs-devel
Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:
> I diff'ed the output of "./configure" and "./configure --with-pgtk" out
> of curiosity; there are a couple of things that I found intriguing.
> Some of them might warrant a bug report; since I could very well be
> missing something, I thought I'd report here first.
>> -checking for libwebp >= 0.6.0... yes
> IIUC 'configure' guards WebP support behind several 'test "${HAVE_XXX}"'
> clauses where XXX represents "something that supports displaying
> images". Should this be extended to ${HAVE_PGTK}?
Could you try to extend it that way and test if the webp support works?
If it does, I will enable it for the PGTK build.
>> +checking for pkg-config... (cached) /usr/bin/pkg-config
>> +checking pkg-config is at least version 0.16... yes
> Not sure why this check is only present --with-pgtk?
I don't know either, but I'm not worried.
>> @@ -619,9 +592,9 @@
>> Does Emacs use -lxml2? yes
>> Does Emacs use -lfreetype? yes
>> Does Emacs use HarfBuzz? yes
>> - Does Emacs use -lm17n-flt? yes
>> + Does Emacs use -lm17n-flt?
>> Does Emacs use -lotf? yes
>> - Does Emacs use -lxft? no
>> + Does Emacs use -lxft?
>> Does Emacs use -lsystemd? yes
>> Does Emacs use -ljansson? yes
>> Does Emacs use the GMP library? yes
> Should -lm17n-flt and -lxft say "no" instead of being empty?
I think so, I'll fix that in a while.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Oddities in ./configure --with-pgtk's output
2021-12-19 10:28 ` Po Lu
@ 2021-12-19 12:49 ` Kévin Le Gouguec
2021-12-19 12:53 ` Po Lu
0 siblings, 1 reply; 9+ messages in thread
From: Kévin Le Gouguec @ 2021-12-19 12:49 UTC (permalink / raw)
To: Po Lu; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 905 bytes --]
Po Lu <luangruo@yahoo.com> writes:
>> IIUC 'configure' guards WebP support behind several 'test "${HAVE_XXX}"'
>> clauses where XXX represents "something that supports displaying
>> images". Should this be extended to ${HAVE_PGTK}?
>
> Could you try to extend it that way and test if the webp support works?
> If it does, I will enable it for the PGTK build.
Mmm. That was slightly more involved than I expected:
- HAVE_PGTK is defined way after HAVE_WEBP is computed,
- the HAVE_PGTK block seems to depend on $GTK_LIBS, so IIUC it should
come after AC_SUBST(GTK_LIBS),
- the part which performs AC_SUBST(GTK_LIBS) comes after the HAVE_WEBP
block as well.
The attached patch seems to work (I've ./configure'd --with-pgtk, webp
support was added automatically, and visiting a webp file with the
resulting Emacs successfully displays the image), but I have no idea how
idiomatic my tweaks are.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1055 bytes --]
diff --git a/configure.ac b/configure.ac
index 2e7ea2bd6f..d1a433a502 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2315,6 +2315,8 @@ AC_DEFUN
term_header=pgtkterm.h
with_gtk3=yes
USE_X_TOOLKIT=none
+ HAVE_PGTK=yes
+ AC_DEFINE([HAVE_PGTK], 1, [Define to 1 if you have pure Gtk+-3.])
;;
haiku )
term_header=haikuterm.h
@@ -2677,7 +2679,7 @@ AC_DEFUN
if test "${with_webp}" != "no"; then
if test "${HAVE_X11}" = "yes" || test "${opsys}" = "mingw32" \
|| test "${HAVE_W32}" = "yes" || test "${HAVE_NS}" = "yes" \
- || test "${HAVE_BE_APP}" = "yes"; then
+ || test "${HAVE_BE_APP}" = "yes" || test "${HAVE_PGTK}" = "yes"; then
WEBP_REQUIRED=0.6.0
WEBP_MODULE="libwebp >= $WEBP_REQUIRED"
@@ -2950,8 +2952,6 @@ AC_DEFUN
if test "$window_system" = "pgtk"; then
PGTK_OBJ="pgtkfns.o pgtkterm.o pgtkselect.o pgtkmenu.o pgtkim.o xsettings.o"
PGTK_LIBS="$GTK_LIBS"
- HAVE_PGTK=yes
- AC_DEFINE([HAVE_PGTK], 1, [Define to 1 if you have pure Gtk+-3.])
fi
AC_SUBST(PGTK_OBJ)
AC_SUBST(PGTK_LIBS)
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: Oddities in ./configure --with-pgtk's output
2021-12-19 12:49 ` Kévin Le Gouguec
@ 2021-12-19 12:53 ` Po Lu
2021-12-19 13:00 ` Lars Ingebrigtsen
2021-12-19 13:13 ` Eli Zaretskii
0 siblings, 2 replies; 9+ messages in thread
From: Po Lu @ 2021-12-19 12:53 UTC (permalink / raw)
To: Kévin Le Gouguec; +Cc: emacs-devel, Eli Zaretskii
Kévin Le Gouguec <kevin.legouguec@gmail.com> writes:
> Mmm. That was slightly more involved than I expected:
>
> - HAVE_PGTK is defined way after HAVE_WEBP is computed,
>
> - the HAVE_PGTK block seems to depend on $GTK_LIBS, so IIUC it should
> come after AC_SUBST(GTK_LIBS),
>
> - the part which performs AC_SUBST(GTK_LIBS) comes after the HAVE_WEBP
> block as well.
>
> The attached patch seems to work (I've ./configure'd --with-pgtk, webp
> support was added automatically, and visiting a webp file with the
> resulting Emacs successfully displays the image), but I have no idea how
> idiomatic my tweaks are.
> + HAVE_PGTK=yes
> + AC_DEFINE([HAVE_PGTK], 1, [Define to 1 if you have pure Gtk+-3.])
> @@ -2950,8 +2952,6 @@ AC_DEFUN
> if test "$window_system" = "pgtk"; then
> PGTK_OBJ="pgtkfns.o pgtkterm.o pgtkselect.o pgtkmenu.o pgtkim.o xsettings.o"
> PGTK_LIBS="$GTK_LIBS"
> - HAVE_PGTK=yes
> - AC_DEFINE([HAVE_PGTK], 1, [Define to 1 if you have pure Gtk+-3.])
Thanks, LGTM. While this contribution is small enough to not require
copyright assignment, your previous contributions under the 15-line
exemption may cause this patch to exceed its limit of total lines
contributed. If you haven't signed the copyright paperwork yet, now
would be a great time to get started!
Eli, has Kevin completed copyright assignment?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Oddities in ./configure --with-pgtk's output
2021-12-19 12:53 ` Po Lu
@ 2021-12-19 13:00 ` Lars Ingebrigtsen
2021-12-19 13:02 ` Po Lu
2021-12-19 13:13 ` Eli Zaretskii
1 sibling, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-12-19 13:00 UTC (permalink / raw)
To: Po Lu; +Cc: Eli Zaretskii, emacs-devel, Kévin Le Gouguec
Po Lu <luangruo@yahoo.com> writes:
> Eli, has Kevin completed copyright assignment?
Yes, his copyright assignment is on file.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Oddities in ./configure --with-pgtk's output
2021-12-19 12:53 ` Po Lu
2021-12-19 13:00 ` Lars Ingebrigtsen
@ 2021-12-19 13:13 ` Eli Zaretskii
1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2021-12-19 13:13 UTC (permalink / raw)
To: Po Lu; +Cc: emacs-devel, kevin.legouguec
> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org, Eli Zaretskii <eliz@gnu.org>
> Date: Sun, 19 Dec 2021 20:53:33 +0800
>
> Eli, has Kevin completed copyright assignment?
Yes, his assignment is on file.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-12-20 1:24 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-19 10:15 Oddities in ./configure --with-pgtk's output Kévin Le Gouguec
2021-12-19 10:28 ` Po Lu
2021-12-19 12:49 ` Kévin Le Gouguec
2021-12-19 12:53 ` Po Lu
2021-12-19 13:00 ` Lars Ingebrigtsen
2021-12-19 13:02 ` Po Lu
2021-12-19 13:59 ` Lars Ingebrigtsen
2021-12-20 1:24 ` Po Lu
2021-12-19 13:13 ` Eli Zaretskii
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).