From: Ken Brown <kbrown@cornell.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: karol.ostrovsky@gmail.com, chriszheng99@gmail.com, 18302@debbugs.gnu.org
Subject: bug#18302: MSYS2 build issues
Date: Thu, 21 Aug 2014 17:29:51 -0400 [thread overview]
Message-ID: <53F664CF.1060705@cornell.edu> (raw)
In-Reply-To: <83iollbqbn.fsf@gnu.org>
On 8/21/2014 3:22 PM, Eli Zaretskii wrote:
>> Date: Thu, 21 Aug 2014 14:38:13 -0400
>> From: Ken Brown <kbrown@cornell.edu>
>> CC: chriszheng99@gmail.com, 18302@debbugs.gnu.org
>>
>>> I'd urge the Cygwin Emacs maintainers to revert that special case, but
>>> that's their call. For native Windows builds, I certainly object to
>>> introducing this deviation.
>>
>> The Cygwin situation is not comparable. The headers are installed in
>> the standard places. But Cygwin provides two versions of xpm.h, one in
>> /usr/include/X11 and one in /usr/include/noX. The Cygwin w32 build
>> needs to add -I/usr/include/noX to CPPFLAGS (and -L/usr/lib/noX to
>> LDFLAGS) in order to pick up the correct version.
>
> No, the solution is to use
>
> #if defined __CYGWIN__ && !defined HAVE_X_WINDOWS
> #include <noX/xpm.h>
> #else
> #include <xpm.h>
> #endif
I neglected to say that xpm.h in /usr/include/noX is actually a symlink
to /usr/include/noX/X11/xpm.h. The code that includes xpm.h (in
image.c) is '#include "X11/xpm.h"' on all platforms. For the native
Windows build and the Cygwin w32 build, this is done conditionally on
NTGUI, after first defining some macros. In order for "X11/xpm.h" to
produce the correct file, the include path has to be set up correctly.
I really don't want to rewrite all this for no good reason.
> The way we work around the problem now will break if someone installs
> the standard header files in a place other than /usr/include.
In the Cygwin case, I'm not sure what you mean by "someone". The
headers are provided by Cygwin packages, and package maintainers are
supposed to know where to put header files. In this case the package is
libXpm-noX-devel. I can't think of any reason why a future maintainer
would change the location of the headers; but if that happens, then
emacs will have to adapt.
> And if you disagree, then at least please put the above explanation in
> configure.ac, so that we won't need to have this discussion a year
> from now.
I don't necessarily disagree; it's just that I don't feel like fixing
something that isn't broken. If the relevant code in image.c has to be
rewritten at some point anyway, we could rethink how to best handle
xpm.h, but for now I prefer to leave it alone. I'll add a comment to
configure.ac on the trunk.
Ken
next prev parent reply other threads:[~2014-08-21 21:29 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-20 9:54 bug#18302: MSYS2 build issues Karol Ostrovsky
2014-08-20 16:26 ` Eli Zaretskii
2014-08-20 17:04 ` Glenn Morris
2014-08-20 17:20 ` Eli Zaretskii
2014-08-21 10:08 ` Karol Ostrovsky
2014-08-21 14:30 ` Eli Zaretskii
2014-08-21 16:00 ` Glenn Morris
2014-08-21 18:38 ` Ken Brown
2014-08-21 19:22 ` Eli Zaretskii
2014-08-21 19:33 ` Eli Zaretskii
2014-08-21 21:29 ` Ken Brown [this message]
2014-08-22 6:10 ` Eli Zaretskii
2014-08-22 13:04 ` Ken Brown
2014-08-22 13:33 ` Eli Zaretskii
2014-08-22 14:18 ` Karol Ostrovsky
2014-08-23 8:57 ` Eli Zaretskii
2014-08-25 8:18 ` Karol Ostrovsky
2014-08-25 14:56 ` Eli Zaretskii
2017-11-29 1:46 ` Noam Postavsky
2014-08-21 22:32 ` Angelo Graziosi
2014-08-22 6:30 ` Eli Zaretskii
2014-08-22 10:55 ` Angelo Graziosi
2014-08-22 13:25 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53F664CF.1060705@cornell.edu \
--to=kbrown@cornell.edu \
--cc=18302@debbugs.gnu.org \
--cc=chriszheng99@gmail.com \
--cc=eliz@gnu.org \
--cc=karol.ostrovsky@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).