>>>> "Volker" == Volker Zell <Dr.> writes:
Volker> Hi I get the following error when trying to configure the
Volker> latest xemacs under cygwin as usual (this means for me the
Volker> following configure run):
Volker> [...]
Volker> `__STDC__' redefined configure: failed program was:
Volker> #line 6448 "configure" include "confdefs.h" include
Volker> #<X11/Intrinsic.h>
Volker> [...]
Volker> By the way I use:
Volker> gcc driver version 2.95.3-1 (cygwin special) executing gcc
Volker> version gcc-2.95.3-1
I see this problem too.
This is a result of interaction between four packages under cygwin: xemacs,
gcc, autoconf and x11.
The version of X11 that Volker and I have installed under cygwin contains
the following line in /usr/X11R6/lib/X11/config/cygwin.cf
#define StandardDefines -D__i386__ -DWIN32_LEAN_AND_MEAN -DX_LOCALE -D_MT -D_X86_
-D__STDC__ -DNO_TCP_H -D__CYGWIN__ -D_XOPEN_SOURCE -D_REENTRANT -D_POSIX_C_SOURCE=199309L
-D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE
(It seems totally bogus to me. Why are __STDC__ and __CYGWIN__ being -D'ed
from the command line?)
XEmacs's configure script takes the -D__STDC__ and transforms it into a
`#define __STDC__ 1' line in its confdefs.h.
gcc 2.95.2 did not complain about __STDC__ being redefined in confdefs.h
gcc 2.95.3 gives a warning. The configure script (autoconf, really)
interprets the warning as an indication that X11/Intrinsic.h doesn't exist.
Hence the error.
Off the top of my head, here are some ideas for fixing the problem,
- fix X11's cygwin.cf. Does cygwin-xfree have this problem?
- fix autoconf to ignore warnings when determining the existing of header
files.
- change XEmacs's configure script so that it doesn't add __STDC__ to
confdefs.h
===========================================================================
--- configure.in~ Mon Mar 19 14:09:20 2001
+++ configure.in Fri Mar 23 12:09:05 2001
@@ -2753,7 +2753,9 @@
cd ..
rm -fr conftestdir
for word in $xmkmf_defines; do
- case "$word" in -D* )
+ case "$word" in
+ -D__STDC__*) ;;
+ -D* )
sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
case "$word" in
-D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
===========================================================================
Does anyone have any other ideas? Does this problem show up on any systems
other than cygwin?