diff options
| author | Ken Brown | 2016-06-14 09:50:38 -0400 |
|---|---|---|
| committer | Ken Brown | 2016-06-14 13:41:18 -0400 |
| commit | 61cfd6acfe099bae4b743665d0a10c2ba55e7ff2 (patch) | |
| tree | f8826b807915c243a891f894fab77056d48344a6 | |
| parent | 2f523c15801366d269cb4a526906e018f8cd713f (diff) | |
| download | emacs-61cfd6acfe099bae4b743665d0a10c2ba55e7ff2.tar.gz emacs-61cfd6acfe099bae4b743665d0a10c2ba55e7ff2.zip | |
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.
| -rw-r--r-- | configure.ac | 13 | ||||
| -rw-r--r-- | src/image.c | 10 |
2 files changed, 10 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac index 069a7260e88..2674806cadc 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -3245,34 +3245,29 @@ fi | |||
| 3245 | 3245 | ||
| 3246 | ### Use -lXpm if available, unless '--with-xpm=no'. | 3246 | ### Use -lXpm if available, unless '--with-xpm=no'. |
| 3247 | ### mingw32 doesn't use -lXpm, since it loads the library dynamically. | 3247 | ### mingw32 doesn't use -lXpm, since it loads the library dynamically. |
| 3248 | ### In the Cygwin-w32 build, we need to use /usr/include/noX/X11/xpm.h | 3248 | ### The Cygwin-w32 build uses <noX/xpm.h> instead of <X11/xpm.h>, so |
| 3249 | ### rather than /usr/include/X11/xpm.h, so we set CPPFLAGS (and | 3249 | ### we need to set LDFLAGS accordingly. |
| 3250 | ### LDFLAGS) accordingly. | ||
| 3251 | HAVE_XPM=no | 3250 | HAVE_XPM=no |
| 3252 | LIBXPM= | 3251 | LIBXPM= |
| 3253 | if test "${HAVE_W32}" = "yes" && test "${opsys}" = "cygwin"; then | 3252 | if test "${HAVE_W32}" = "yes" && test "${opsys}" = "cygwin"; then |
| 3254 | if test "${with_xpm}" != "no"; then | 3253 | if test "${with_xpm}" != "no"; then |
| 3255 | SAVE_CPPFLAGS="$CPPFLAGS" | ||
| 3256 | SAVE_LDFLAGS="$LDFLAGS" | 3254 | SAVE_LDFLAGS="$LDFLAGS" |
| 3257 | CPPFLAGS="$CPPFLAGS -I/usr/include/noX" | ||
| 3258 | LDFLAGS="$LDFLAGS -L/usr/lib/noX" | 3255 | LDFLAGS="$LDFLAGS -L/usr/lib/noX" |
| 3259 | AC_CHECK_HEADER(X11/xpm.h, | 3256 | AC_CHECK_HEADER(noX/xpm.h, |
| 3260 | [AC_CHECK_LIB(Xpm, XpmReadFileToImage, HAVE_XPM=yes)]) | 3257 | [AC_CHECK_LIB(Xpm, XpmReadFileToImage, HAVE_XPM=yes)]) |
| 3261 | if test "${HAVE_XPM}" = "yes"; then | 3258 | if test "${HAVE_XPM}" = "yes"; then |
| 3262 | AC_MSG_CHECKING(for XpmReturnAllocPixels preprocessor define) | 3259 | AC_MSG_CHECKING(for XpmReturnAllocPixels preprocessor define) |
| 3263 | AC_EGREP_CPP(no_return_alloc_pixels, | 3260 | AC_EGREP_CPP(no_return_alloc_pixels, |
| 3264 | [#include "X11/xpm.h" | 3261 | [#include "noX/xpm.h" |
| 3265 | #ifndef XpmReturnAllocPixels | 3262 | #ifndef XpmReturnAllocPixels |
| 3266 | no_return_alloc_pixels | 3263 | no_return_alloc_pixels |
| 3267 | #endif | 3264 | #endif |
| 3268 | ], HAVE_XPM=no, HAVE_XPM=yes) | 3265 | ], HAVE_XPM=no, HAVE_XPM=yes) |
| 3269 | 3266 | ||
| 3270 | if test "${HAVE_XPM}" = "yes"; then | 3267 | if test "${HAVE_XPM}" = "yes"; then |
| 3271 | REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX" | ||
| 3272 | AC_MSG_RESULT(yes) | 3268 | AC_MSG_RESULT(yes) |
| 3273 | else | 3269 | else |
| 3274 | AC_MSG_RESULT(no) | 3270 | AC_MSG_RESULT(no) |
| 3275 | CPPFLAGS="$SAVE_CPPFLAGS" | ||
| 3276 | LDFLAGS="$SAVE_LDFLAGS" | 3271 | LDFLAGS="$SAVE_LDFLAGS" |
| 3277 | fi | 3272 | fi |
| 3278 | fi | 3273 | fi |
diff --git a/src/image.c b/src/image.c index 38866e08345..657852b1a80 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -3159,16 +3159,18 @@ static bool xpm_load (struct frame *f, struct image *img); | |||
| 3159 | #define XColor xpm_XColor | 3159 | #define XColor xpm_XColor |
| 3160 | #define XImage xpm_XImage | 3160 | #define XImage xpm_XImage |
| 3161 | #define Display xpm_Display | 3161 | #define Display xpm_Display |
| 3162 | #define PIXEL_ALREADY_TYPEDEFED | 3162 | #ifdef CYGWIN |
| 3163 | #include "noX/xpm.h" | ||
| 3164 | #else /* not CYGWIN */ | ||
| 3163 | #include "X11/xpm.h" | 3165 | #include "X11/xpm.h" |
| 3166 | #endif /* not CYGWIN */ | ||
| 3164 | #undef FOR_MSW | 3167 | #undef FOR_MSW |
| 3165 | #undef XColor | 3168 | #undef XColor |
| 3166 | #undef XImage | 3169 | #undef XImage |
| 3167 | #undef Display | 3170 | #undef Display |
| 3168 | #undef PIXEL_ALREADY_TYPEDEFED | 3171 | #else /* not HAVE_NTGUI */ |
| 3169 | #else | ||
| 3170 | #include "X11/xpm.h" | 3172 | #include "X11/xpm.h" |
| 3171 | #endif /* HAVE_NTGUI */ | 3173 | #endif /* not HAVE_NTGUI */ |
| 3172 | #endif /* HAVE_XPM */ | 3174 | #endif /* HAVE_XPM */ |
| 3173 | 3175 | ||
| 3174 | #if defined (HAVE_XPM) || defined (HAVE_NS) | 3176 | #if defined (HAVE_XPM) || defined (HAVE_NS) |