necessary to temporarily use the X11 flags found by AC_PATH_XTRA.
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@676
7f0cb862-5218-0410-a997-
914c9d46530a
for some bit-fiddling, anyway.
(292) Avoid gcc warnings for some joystick code (e.g. on Solaris).
+
+(293) Improve autoconf magic: To detect headers like GL/gl.h, it might be
+necessary to temporarily use the X11 flags found by AC_PATH_XTRA.
# Checks for header files.
AC_HEADER_STDC
+save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $X_CFLAGS"
AC_CHECK_HEADERS([GL/gl.h GL/glu.h GL/glx.h fcntl.h limits.h sys/ioctl.h sys/param.h sys/time.h])
AC_HEADER_TIME
-
-save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS $X_CFLAGS"
AC_CHECK_HEADERS([X11/extensions/xf86vmode.h], [], [], [#include <X11/Xlib.h>])
-CFLAGS="$save_CFLAGS"
+CPPFLAGS="$save_CPPFLAGS"
# Checks for library functions.
AC_PROG_GCC_TRADITIONAL