From fa640f9356208cbcbf66b6adbb79214e0b485cbb Mon Sep 17 00:00:00 2001 From: spanne Date: Wed, 13 Jul 2005 12:05:33 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@676 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/ChangeLog | 3 +++ freeglut/freeglut/configure.ac | 7 +++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/freeglut/freeglut/ChangeLog b/freeglut/freeglut/ChangeLog index a4a103a..e28f1e6 100644 --- a/freeglut/freeglut/ChangeLog +++ b/freeglut/freeglut/ChangeLog @@ -1123,3 +1123,6 @@ extensions. 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. diff --git a/freeglut/freeglut/configure.ac b/freeglut/freeglut/configure.ac index 440c2db..5daea87 100644 --- a/freeglut/freeglut/configure.ac +++ b/freeglut/freeglut/configure.ac @@ -40,13 +40,12 @@ AC_SUBST([EXPORT_FLAGS]) # 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 ]) -CFLAGS="$save_CFLAGS" +CPPFLAGS="$save_CPPFLAGS" # Checks for library functions. AC_PROG_GCC_TRADITIONAL