Use GLUT_CFLAGS when building glut
authorJohn Hein <5qgu8gvshg@snkmail.com>
Thu, 1 Jul 2010 19:53:28 +0000 (12:53 -0700)
committerDan Nicholson <dbn.lists@gmail.com>
Thu, 1 Jul 2010 20:00:02 +0000 (13:00 -0700)
Fix this build error (in MesaGLUT-7.6.1)...
glut_cmap.c:23:66: error: X11/Xmu/StdCmap.h: No such file or directory

...by not preventing the cflags that pkg-config finds for glut dependencies
(including 'xmu') from being used.

Defining GLUT_CFLAGS before running the pkg-config prevents the
cflags found by pkg-config from being used.

This patch lets GLUT_CFLAGS that configure & pkg-config work
so hard to set actually get used.

Also make sure the generated configs/autoconf defines GLUT_CFLAGS
used in (at least) src/glut/glx/Makefile.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
configs/autoconf.in
configure.ac

index 417138b2a1f58ba04824bb859d596239366265ef..4a86dc1bb5cc6d68cc3c75bfa856054943436fd9 100644 (file)
@@ -31,6 +31,7 @@ X11_CFLAGS = @X11_CFLAGS@
 LLVM_CFLAGS = @LLVM_CFLAGS@
 LLVM_LDFLAGS = @LLVM_LDFLAGS@
 LLVM_LIBS = @LLVM_LIBS@
+GLUT_CFLAGS = @GLUT_CFLAGS@
 
 
 # Source selection
index 7583ab8595ea4209a27574d05e99b4de37474713..16fd1e43bb8481e0089568fb1368745552e04330 100644 (file)
@@ -1118,10 +1118,6 @@ fi
 
 if test "x$enable_glut" = xyes; then
     SRC_DIRS="$SRC_DIRS glut/glx"
-    GLUT_CFLAGS=""
-    if test "x$GCC" = xyes; then
-        GLUT_CFLAGS="-fexceptions"
-    fi
     if test "$x11_pkgconfig" = yes; then
         PKG_CHECK_MODULES([GLUT],[x11 xmu xi])
         GLUT_PC_REQ_PRIV="x11 xmu xi"
@@ -1132,6 +1128,9 @@ if test "x$enable_glut" = xyes; then
         GLUT_PC_LIB_PRIV="$GLUT_LIB_DEPS"
         GLUT_PC_CFLAGS="$X11_INCLUDES"
     fi
+    if test "x$GCC" = xyes; then
+        GLUT_CFLAGS="$GLUT_CFLAGS -fexceptions"
+    fi
     GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm"
     GLUT_PC_LIB_PRIV="$GLUT_PC_LIB_PRIV -lm"