Fix for Accepted by compiler / rejected by the preprocessor issue ?

Burt Holzman <[email protected]>
Newsgroups gmane.network.instant-messaging.ayttm.user
Message-ID <[email protected]>
Users in the past have reported this behavior with autoconf 2.57-3:

checking X11/Xft/Xft.h usability... yes
checking X11/Xft/Xft.h presence... no
configure: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by
the preprocessor!
configure: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor"s
result
configure: WARNING:     ## ------------------------------------ ##
configure: WARNING:     ## Report this to [email protected] ##
configure: WARNING:     ## ------------------------------------ ##
checking for X11/Xft/Xft.h... no

I don't know much about autconf, but the issue seems to be that 
xft-config --cflags gets passed as CFLAGS in configure, but not 
CPPFLAGS, and autoconf tries to compile with both the preprocessor and 
the compiler.

If you've had this problem, you can try this patch against CVS and see 
if it works for you.

- B

--- configure.ac.old    16 Jun 2004 08:24:29 -0000      1.500
+++ configure.ac        25 Jun 2004 15:52:30 -0000
@@ -284,7 +284,7 @@
         have_xft=no
      XFT_CFLAGS=`xft-config --cflags`
      XFT_LDFLAGS=`xft-config --libs`
-    CFLAGS="$CFLAGS $XFT_CFLAGS"
+    CPPFLAGS="$CFLAGS $XFT_CFLAGS"
      LDFLAGS="$LDFLAGS $XFT_LDFLAGS"
      AC_CHECK_HEADER(X11/Xft/Xft.h, [
         AC_CHECK_LIB(Xft, XftFontOpen,



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.