Recently (I assume due to the 1.5.19 release of cygwin), the output of
'gcc -print-file-name=libc.a' changed from
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../lib.a
to
/bin/../lib/gcc/i686-pc-cygwin/3.4.4/../../../libc.a
changing the effective path from /usr/lib to /lib. This change means
that the somewhat hokey way we were finding the noX version of the XPM
include files (and lib) no longer works, yielding compilation errors
in scrollbar-msw.c:
gcc -c -I/bin/../lib/gcc/i686-pc-cygwin/3.4.4/../../../../include/noX -g -O3 -Wall
-Wno-switch -Winline -Wmissing-prototypes -Wsign-compare -fno-strict-aliasing -Wshadow
-Wpointer-arith -Demacs -I. -DHAVE_CONFIG_H -Wno-sign-compare -fno-caller-saves
scrollbar-msw.c
In file included from console-msw.h:40,
from scrollbar-msw.c:29:
/usr/include/X11/xpm.h:71:63: simx.h: No such file or directory
The attached patch works for me. Volker, please review. I will
probably apply this to the 21.4 branch before 21.4.19 is released.
A similar patch is needed for 21.5.
- Vin
ChangeLog addition:
2006-01-23 Vin Shelton <acs(a)xemacs.org>
* configure.in: Simplify cygwin include and nox/Xpm handling.
As of cygwin-1.5.19, 'gcc -print-file-name=libc.a' (effectively)
returns '/lib' instead of '/usr/lib', so we'll use
'gcc -print-search-dirs' instead.
21.4 source patch:
Diff command: cvs -q diff -u
Files affected: configure.in
Index: configure.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/configure.in,v
retrieving revision 1.151.2.36
diff -a -u -u -r1.151.2.36 configure.in
--- configure.in 2005/12/24 00:48:14 1.151.2.36
+++ configure.in 2006/01/24 02:59:15
@@ -1895,9 +1895,9 @@
dnl XEmacs supported mingw and cygnus have made this incompatible change
dnl so we just go with the flow.
case "$opsys" in mingw* | cygwin*)
- cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
- cygwin_include=`eval "dirname $cygwin_include"` ;
- cygwin_include="-I$cygwin_include/../include" ;
+ cygwin_include=`eval gcc -print-search-dirs | sed -ne s'/install: //p'`
+ cygwin_include=`eval "cd $cygwin_include/../../../..; pwd"`
+ cygwin_include="-I$cygwin_include/include" ;
extra_includes="$cygwin_include/mingw $cygwin_include" ;
case "$opsys" in mingw*)
XE_APPEND($extra_includes, c_switch_system) ;;
@@ -3361,9 +3361,8 @@
incpath_xpm=
case "$opsys" in
cygwin*)
- cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
- cygwin_top=`eval "dirname ${cygwin_top}"`;
- cygwin_top="${cygwin_top}/..";
+ cygwin_top=`eval gcc -print-search-dirs | sed -ne s'/install: //p'`
+ cygwin_top=`eval "cd $cygwin_top/../../../..; pwd"`
case "$window_system" in
dnl use "standard" search pattern
x11) ;;