[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 61cfd6a: Remove system-specific -I switch from Cygw
From: |
Ken Brown |
Subject: |
[Emacs-diffs] master 61cfd6a: Remove system-specific -I switch from Cygwin-w32 build |
Date: |
Tue, 14 Jun 2016 17:46:57 +0000 (UTC) |
branch: master
commit 61cfd6acfe099bae4b743665d0a10c2ba55e7ff2
Author: Ken Brown <address@hidden>
Commit: Ken Brown <address@hidden>
Remove system-specific -I switch from Cygwin-w32 build
Suggested by Eli Zaretskii in discussion of bug#18302.
* src/image.c [HAVE_NTGUI]: Remove the unused macro
PIXEL_ALREADY_TYPEDEFED. On Cygwin, include "noX/xpm.h" instead of
"X11/xpm.h".
* configure.ac [CYGWIN && HAVE_W32]: Change the xpm test to use
"noX/xpm.h". Don't add a -I switch to CPPFLAGS.
---
configure.ac | 13 ++++---------
src/image.c | 10 ++++++----
2 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/configure.ac b/configure.ac
index 069a726..2674806 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3245,34 +3245,29 @@ fi
### Use -lXpm if available, unless '--with-xpm=no'.
### mingw32 doesn't use -lXpm, since it loads the library dynamically.
-### In the Cygwin-w32 build, we need to use /usr/include/noX/X11/xpm.h
-### rather than /usr/include/X11/xpm.h, so we set CPPFLAGS (and
-### LDFLAGS) accordingly.
+### The Cygwin-w32 build uses <noX/xpm.h> instead of <X11/xpm.h>, so
+### we need to set LDFLAGS accordingly.
HAVE_XPM=no
LIBXPM=
if test "${HAVE_W32}" = "yes" && test "${opsys}" = "cygwin"; then
if test "${with_xpm}" != "no"; then
- SAVE_CPPFLAGS="$CPPFLAGS"
SAVE_LDFLAGS="$LDFLAGS"
- CPPFLAGS="$CPPFLAGS -I/usr/include/noX"
LDFLAGS="$LDFLAGS -L/usr/lib/noX"
- AC_CHECK_HEADER(X11/xpm.h,
+ AC_CHECK_HEADER(noX/xpm.h,
[AC_CHECK_LIB(Xpm, XpmReadFileToImage, HAVE_XPM=yes)])
if test "${HAVE_XPM}" = "yes"; then
AC_MSG_CHECKING(for XpmReturnAllocPixels preprocessor define)
AC_EGREP_CPP(no_return_alloc_pixels,
- [#include "X11/xpm.h"
+ [#include "noX/xpm.h"
#ifndef XpmReturnAllocPixels
no_return_alloc_pixels
#endif
], HAVE_XPM=no, HAVE_XPM=yes)
if test "${HAVE_XPM}" = "yes"; then
- REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
- CPPFLAGS="$SAVE_CPPFLAGS"
LDFLAGS="$SAVE_LDFLAGS"
fi
fi
diff --git a/src/image.c b/src/image.c
index 38866e0..657852b 100644
--- a/src/image.c
+++ b/src/image.c
@@ -3159,16 +3159,18 @@ static bool xpm_load (struct frame *f, struct image
*img);
#define XColor xpm_XColor
#define XImage xpm_XImage
#define Display xpm_Display
-#define PIXEL_ALREADY_TYPEDEFED
+#ifdef CYGWIN
+#include "noX/xpm.h"
+#else /* not CYGWIN */
#include "X11/xpm.h"
+#endif /* not CYGWIN */
#undef FOR_MSW
#undef XColor
#undef XImage
#undef Display
-#undef PIXEL_ALREADY_TYPEDEFED
-#else
+#else /* not HAVE_NTGUI */
#include "X11/xpm.h"
-#endif /* HAVE_NTGUI */
+#endif /* not HAVE_NTGUI */
#endif /* HAVE_XPM */
#if defined (HAVE_XPM) || defined (HAVE_NS)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 61cfd6a: Remove system-specific -I switch from Cygwin-w32 build,
Ken Brown <=