forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
devil-1.7.8-nvtt-glut.patch
83 lines (73 loc) · 2.43 KB
/
devil-1.7.8-nvtt-glut.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
From: Julian Ospald <[email protected]>
Date: Tue May 1 20:00:44 UTC 2012
Subject: build system
remove automagic handling of glut and add configure option
fix "header present but cannot be compiled" warning for nvtt
--- a/m4/ax_check_glut.m4
+++ b/m4/ax_check_glut.m4
@@ -114,4 +114,11 @@
AC_SUBST([GLUT_CFLAGS])
AC_SUBST([GLUT_LIBS])
+
+AC_ARG_ENABLE([glut],
+ [AS_HELP_STRING([--enable-glut],
+ [Enable support for glut (default=yes)]) ],
+ [enable_glut=$enableval],
+ [enable_glut="yes"])
+
])dnl
--- a/m4/devil-api_checks.m4
+++ b/m4/devil-api_checks.m4
@@ -31,8 +31,8 @@
AS_IF([test "x$no_gl" != "xyes" -a "x$no_glu" != "xyes"],
[use_ogl="yes"
ILUT_LIBS="$GLU_LIBS $GL_LIBS $ILUT_LIBS"
- AS_IF([test "x$no_glut" != "xyes"],
- [have_glut="yes"
+ AS_IF([test "x$no_glut" != "xyes" -a "x$enable_glut" = "xyes"],
+ [use_glut="yes"
ILUT_LIBS="$GLUT_LIBS $ILUT_LIBS"])
AC_DEFINE([ILUT_USE_OPENGL],
[1],
--- a/configure.ac
+++ b/configure.ac
@@ -343,8 +343,10 @@
[Do you want to use the Nvidia texture tools if possible? (enables GPU accelerated image manipulation, default="yes")]) ],
[],
[with_nvtt="yes"])
+AC_LANG_PUSH([C++])
AS_IF([test "x$with_nvtt" = "xyes"],
[DEVIL_CHECK_NVIDIA_TEXTOOLS])
+AC_LANG_POP
dnl
dnl ILUT APIs library checking
@@ -392,8 +394,8 @@
AM_CONDITIONAL([USE_OPENGL],
[test "x$use_ogl" = "xyes"])
-AM_CONDITIONAL([HAVE_GLUT],
- [test "x$have_glut" = "xyes"])
+AM_CONDITIONAL([USE_GLUT],
+ [test "x$use_glut" = "xyes"])
AM_CONDITIONAL([USE_SDL],
[test "x$use_sdl" = "xyes"])
@@ -410,7 +412,7 @@
AM_CONDITIONAL([USE_X11],
[test "x$use_x11" = "xyes"])
#this is instedad AM_COND_IF([USE_OPENGL && USE_X11])
-AS_IF([test "x$have_glut" = "xyes" -a "x$use_x11" = "xyes"],
+AS_IF([test "x$use_glut" = "xyes" -a "x$use_x11" = "xyes"],
[EXAMPLES_TO_BUILD="$EXAMPLES_TO_BUILD ILUT_gl ILUT_volume"])
dnl Win32
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -45,11 +45,11 @@
examples_PROGRAMS += ILUT_animation
endif #USE_W32
-if HAVE_GLUT
+if USE_GLUT
if USE_X11
examples_PROGRAMS += ILUT_gl ILUT_volume
endif #USE_X11
-endif #HAVE_GLUT
+endif #USE_GLUT
endif #BUILD_ILUT