<!-- $Id$ -->
<makefile>
-
+
<!-- ================================================================= -->
<!-- OpenGL canvas library -->
<!-- ================================================================= -->
-
+
<set var="WXLIBGLDEP_CORE">
<if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('core')))</if>
</set>
<set var="WXLIBGLDEP_BASE">
<if cond="MONOLITHIC=='0'">$(mk.evalExpr(wxwin.mkLibName('base')))</if>
</set>
-
+
+ <!--
+ When using makefile-based formats (so exclude all project files as well
+ as autoconf) we want to allow people to override the value of
+ wxUSE_GLCANVAS in setup.h by specifying USE_OPENGL=1 on make command
+ line so we predefine it as 1 on the compiler command line in this case
+ and only define it in setup.h if it han't been defined yet.
+ -->
+ <if cond="FORMAT in ['autoconf','msvc','msvc6prj','msvs2003prj','msvs2005prj','msvs2008prj']">
+ <set var="OPENGL_DEFINE"/>
+ </if>
+ <if cond="FORMAT not in ['autoconf','msvc','msvc6prj','msvs2003prj','msvs2005prj','msvs2008prj']">
+ <set var="OPENGL_DEFINE">
+ <if cond="USE_OPENGL=='1'">wxUSE_GLCANVAS=1</if>
+ </set>
+ </if>
+
<dll id="gldll" template="wx_dll"
cond="SHARED=='1' and USE_GUI=='1' and USE_OPENGL=='1'">
<define>WXUSINGDLL</define>
<define>WXMAKINGDLL_GL</define>
+ <define>$(OPENGL_DEFINE)</define>
<sources>$(OPENGL_SRC)</sources>
<msvc-headers>$(OPENGL_HDR)</msvc-headers>
- <!-- link against base and core libs in multilib build: -->
+ <!-- link against base and core libs in multilib build: -->
<sys-lib>$(WXLIBGLDEP_CORE)</sys-lib>
<sys-lib>$(WXLIBGLDEP_BASE)</sys-lib>
<depends>basedll</depends>
<ldlibs>$(EXTRALIBS_OPENGL)</ldlibs>
</dll>
-
+
<lib id="gllib" template="wx_lib"
cond="SHARED=='0' and USE_GUI=='1' and USE_OPENGL=='1'">
+ <define>$(OPENGL_DEFINE)</define>
<sources>$(OPENGL_SRC)</sources>
<msvc-headers>$(OPENGL_HDR)</msvc-headers>
</lib>
$(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
$(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I..\..\include -DWXBUILDING \
-I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \
- -I..\..\src\regex -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_GL -Hu \
- -H=$(OBJS)\wxprec_gldll.csm $(CPPFLAGS) $(CXXFLAGS)
+ -I..\..\src\regex -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_GL \
+ $(__OPENGL_DEFINE_p) -Hu -H=$(OBJS)\wxprec_gldll.csm $(CPPFLAGS) $(CXXFLAGS)
GLDLL_OBJECTS = \
$(OBJS)\gldll_dummy.obj \
$(OBJS)\gldll_glcmn.obj \
$(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) \
$(__GFXCTX_DEFINE_p) -I$(SETUPHDIR) -I..\..\include -DWXBUILDING \
-I..\..\src\tiff\libtiff -I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib \
- -I..\..\src\regex -I..\..\src\expat\lib -Hu -H=$(OBJS)\wxprec_gllib.csm \
- $(CPPFLAGS) $(CXXFLAGS)
+ -I..\..\src\regex -I..\..\src\expat\lib $(__OPENGL_DEFINE_p) -Hu \
+ -H=$(OBJS)\wxprec_gllib.csm $(CPPFLAGS) $(CXXFLAGS)
GLLIB_OBJECTS = \
$(OBJS)\gllib_dummy.obj \
$(OBJS)\gllib_glcmn.obj \
__gldll___depname = \
$(LIBDIRNAME)\wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl_bcc$(VENDORTAG).dll
!endif
+!if "$(USE_OPENGL)" == "1"
+__OPENGL_DEFINE_p_1 = -dwxUSE_GLCANVAS=1
+!endif
!if "$(MONOLITHIC)" == "0"
__WXLIBGLDEP_CORE_p = \
wx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core.lib
!if "$(USE_GDIPLUS)" == "1"
__GFXCTX_DEFINE_p = -DwxUSE_GRAPHICS_CONTEXT=1
!endif
+!if "$(USE_OPENGL)" == "1"
+__OPENGL_DEFINE_p = -DwxUSE_GLCANVAS=1
+!endif
!if "$(WXUNIV)" == "0"
__SETUP_H_SUBDIR_FILENAMES = msw
!endif
$(CXX) -q -c -P -o$@ $(GLDLL_CXXFLAGS) -H ..\..\src\common\dummy.cpp
$(OBJS)\gldll_version.res: ..\..\src\msw\version.rc
- brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_58) $(__DEBUG_DEFINE_p_57) $(__EXCEPTIONS_DEFINE_p_57) $(__RTTI_DEFINE_p_57) $(__THREAD_DEFINE_p_57) $(__UNICODE_DEFINE_p_58) $(__MSLU_DEFINE_p_57) $(__GFXCTX_DEFINE_p_57) -i$(SETUPHDIR) -i..\..\include -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl_bcc$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_GL ..\..\src\msw\version.rc
+ brcc32 -32 -r -fo$@ -i$(BCCDIR)\include -d__WXMSW__ $(__WXUNIV_DEFINE_p_58) $(__DEBUG_DEFINE_p_57) $(__EXCEPTIONS_DEFINE_p_57) $(__RTTI_DEFINE_p_57) $(__THREAD_DEFINE_p_57) $(__UNICODE_DEFINE_p_58) $(__MSLU_DEFINE_p_57) $(__GFXCTX_DEFINE_p_57) -i$(SETUPHDIR) -i..\..\include -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl_bcc$(VENDORTAG) -i..\..\src\tiff\libtiff -i..\..\src\jpeg -i..\..\src\png -i..\..\src\zlib -i..\..\src\regex -i..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_GL $(__OPENGL_DEFINE_p_1) ..\..\src\msw\version.rc
$(OBJS)\gldll_glcmn.obj: ..\..\src\common\glcmn.cpp
$(CXX) -q -c -P -o$@ $(GLDLL_CXXFLAGS) ..\..\src\common\glcmn.cpp
$(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) $(__GFXCTX_DEFINE_p) \
-I$(SETUPHDIR) -I..\..\include -W -Wall -DWXBUILDING -I..\..\src\tiff\libtiff \
-I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \
- -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_GL $(__RTTIFLAG) \
- $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
+ -I..\..\src\expat\lib -DWXUSINGDLL -DWXMAKINGDLL_GL $(__OPENGL_DEFINE_p) \
+ $(__RTTIFLAG) $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) \
+ $(CXXFLAGS)
GLDLL_OBJECTS = \
$(OBJS)\gldll_dummy.o \
$(OBJS)\gldll_version_rc.o \
$(__UNICODE_DEFINE_p) $(__MSLU_DEFINE_p) $(__GFXCTX_DEFINE_p) \
-I$(SETUPHDIR) -I..\..\include -W -Wall -DWXBUILDING -I..\..\src\tiff\libtiff \
-I..\..\src\jpeg -I..\..\src\png -I..\..\src\zlib -I..\..\src\regex \
- -I..\..\src\expat\lib $(__RTTIFLAG) $(__EXCEPTIONSFLAG) \
- -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
+ -I..\..\src\expat\lib $(__OPENGL_DEFINE_p) $(__RTTIFLAG) \
+ $(__EXCEPTIONSFLAG) -Wno-ctor-dtor-privacy $(CPPFLAGS) $(CXXFLAGS)
GLLIB_OBJECTS = \
$(OBJS)\gllib_dummy.o \
$(OBJS)\gllib_glcmn.o \
endif
endif
endif
+ifeq ($(USE_OPENGL),1)
+__OPENGL_DEFINE_p_1 = --define wxUSE_GLCANVAS=1
+endif
ifeq ($(MONOLITHIC),0)
__WXLIBGLDEP_CORE_p = \
-lwx$(PORTNAME)$(WXUNIVNAME)$(WX_RELEASE_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_core
ifeq ($(USE_GDIPLUS),1)
__GFXCTX_DEFINE_p = -DwxUSE_GRAPHICS_CONTEXT=1
endif
+ifeq ($(USE_OPENGL),1)
+__OPENGL_DEFINE_p = -DwxUSE_GLCANVAS=1
+endif
ifeq ($(WXUNIV),0)
__SETUP_H_SUBDIR_FILENAMES = msw
endif
$(CXX) -c -o $@ $(GLDLL_CXXFLAGS) $(CPPDEPS) $<
$(OBJS)\gldll_version_rc.o: ../../src/msw/version.rc
- windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_58) $(__DEBUG_DEFINE_p_57) $(__EXCEPTIONS_DEFINE_p_57) $(__RTTI_DEFINE_p_57) $(__THREAD_DEFINE_p_57) $(__UNICODE_DEFINE_p_58) $(__MSLU_DEFINE_p_57) $(__GFXCTX_DEFINE_p_57) --include-dir $(SETUPHDIR) --include-dir ../../include --define WXBUILDING --define WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl_gcc$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define WXUSINGDLL --define WXMAKINGDLL_GL
+ windres --use-temp-file -i$< -o$@ --define __WXMSW__ $(__WXUNIV_DEFINE_p_58) $(__DEBUG_DEFINE_p_57) $(__EXCEPTIONS_DEFINE_p_57) $(__RTTI_DEFINE_p_57) $(__THREAD_DEFINE_p_57) $(__UNICODE_DEFINE_p_58) $(__MSLU_DEFINE_p_57) $(__GFXCTX_DEFINE_p_57) --include-dir $(SETUPHDIR) --include-dir ../../include --define WXBUILDING --define WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl_gcc$(VENDORTAG) --include-dir ../../src/tiff/libtiff --include-dir ../../src/jpeg --include-dir ../../src/png --include-dir ../../src/zlib --include-dir ../../src/regex --include-dir ../../src/expat/lib --define WXUSINGDLL --define WXMAKINGDLL_GL $(__OPENGL_DEFINE_p_1)
$(OBJS)\gldll_glcmn.o: ../../src/common/glcmn.cpp
$(CXX) -c -o $@ $(GLDLL_CXXFLAGS) $(CPPDEPS) $<
$(CXX) /c /nologo /TP /Fo$@ $(GLDLL_CXXFLAGS) /Ycwx/wxprec.h ..\..\src\common\dummy.cpp
$(OBJS)\gldll_version.res: ..\..\src\msw\version.rc
- rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_4) $(__NO_VC_CRTDBG_p_64) /d __WXMSW__ $(__WXUNIV_DEFINE_p_58) $(__DEBUG_DEFINE_p_57) $(__EXCEPTIONS_DEFINE_p_57) $(__RTTI_DEFINE_p_57) $(__THREAD_DEFINE_p_57) $(__UNICODE_DEFINE_p_58) $(__MSLU_DEFINE_p_57) $(__GFXCTX_DEFINE_p_57) /i $(SETUPHDIR) /i ..\..\include /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl_vc$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_GL ..\..\src\msw\version.rc
+ rc /fo$@ /d WIN32 $(____DEBUGRUNTIME_4) $(__NO_VC_CRTDBG_p_64) /d __WXMSW__ $(__WXUNIV_DEFINE_p_58) $(__DEBUG_DEFINE_p_57) $(__EXCEPTIONS_DEFINE_p_57) $(__RTTI_DEFINE_p_57) $(__THREAD_DEFINE_p_57) $(__UNICODE_DEFINE_p_58) $(__MSLU_DEFINE_p_57) $(__GFXCTX_DEFINE_p_57) /i $(SETUPHDIR) /i ..\..\include /d WXBUILDING /d WXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl_vc$(VENDORTAG) /i ..\..\src\tiff\libtiff /i ..\..\src\jpeg /i ..\..\src\png /i ..\..\src\zlib /i ..\..\src\regex /i ..\..\src\expat\lib /d WXUSINGDLL /d WXMAKINGDLL_GL ..\..\src\msw\version.rc
$(OBJS)\gldll_glcmn.obj: ..\..\src\common\glcmn.cpp
$(CXX) /c /nologo /TP /Fo$@ $(GLDLL_CXXFLAGS) ..\..\src\common\glcmn.cpp
!ifeq USE_GDIPLUS 1
__GFXCTX_DEFINE_p = -dwxUSE_GRAPHICS_CONTEXT=1
!endif
+__OPENGL_DEFINE_p =
+!ifeq USE_OPENGL 1
+__OPENGL_DEFINE_p = -dwxUSE_GLCANVAS=1
+!endif
__SETUP_H_SUBDIR_FILENAMES =
!ifeq WXUNIV 0
__SETUP_H_SUBDIR_FILENAMES = msw
$(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include &
-wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 -dWXBUILDING -i=..\..\src\tiff\libtiff &
-i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex &
- -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_GL &
+ -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_GL $(__OPENGL_DEFINE_p) &
/fh=$(OBJS)\wxprec_gldll.pch $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) &
$(CXXFLAGS)
GLDLL_OBJECTS = &
$(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include &
-wx -wcd=549 -wcd=656 -wcd=657 -wcd=667 -dWXBUILDING -i=..\..\src\tiff\libtiff &
-i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex &
- -i=..\..\src\expat\lib /fh=$(OBJS)\wxprec_gllib.pch $(__RTTIFLAG) &
- $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS)
+ -i=..\..\src\expat\lib $(__OPENGL_DEFINE_p) /fh=$(OBJS)\wxprec_gllib.pch &
+ $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS)
GLLIB_OBJECTS = &
$(OBJS)\gllib_dummy.obj &
$(OBJS)\gllib_glcmn.obj &
$(CXX) -bt=nt -zq -fo=$^@ $(GLDLL_CXXFLAGS) $<
$(OBJS)\gldll_version.res : .AUTODEPEND ..\..\src\msw\version.rc
- wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl_wat$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_GL $<
+ wrc -q -ad -bt=nt -r -fo=$^@ -d__WXMSW__ $(__WXUNIV_DEFINE_p) $(__DEBUG_DEFINE_p) $(__EXCEPTIONS_DEFINE_p) $(__RTTI_DEFINE_p) $(__THREAD_DEFINE_p) $(__UNICODE_DEFINE_p) $(__GFXCTX_DEFINE_p) -i=$(SETUPHDIR) -i=..\..\include -dWXBUILDING -dWXDLLNAME=wx$(PORTNAME)$(WXUNIVNAME)$(WX_VERSION_NODOT)$(WXUNICODEFLAG)$(WXDEBUGFLAG)$(WX_LIB_FLAVOUR)_gl_wat$(VENDORTAG) -i=..\..\src\tiff\libtiff -i=..\..\src\jpeg -i=..\..\src\png -i=..\..\src\zlib -i=..\..\src\regex -i=..\..\src\expat\lib -dWXUSINGDLL -dWXMAKINGDLL_GL $(__OPENGL_DEFINE_p) $<
$(OBJS)\gldll_glcmn.obj : .AUTODEPEND ..\..\src\common\glcmn.cpp
$(CXX) -bt=nt -zq -fo=$^@ $(GLDLL_CXXFLAGS) $<
// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL
// headers and libraries to be able to compile the library with wxUSE_GLCANVAS
-// set to 1. Note that for some compilers (notably Microsoft Visual C++) you
-// will need to manually add opengl32.lib and glu32.lib to the list of
-// libraries linked with your program if you use OpenGL.
+// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the
+// list of libraries used to link your application (although this is done
+// implicitly for Microsoft Visual C++ users).
//
-// Default is 0.
+// Default is 0 unless USE_OPENGL was defined on make command line in which
+// case this is predefined as 1.
//
// Recommended setting: 1 if you intend to use OpenGL, 0 otherwise
-#define wxUSE_GLCANVAS 0
+#ifndef wxUSE_GLCANVAS
+ #define wxUSE_GLCANVAS 0
+#endif
// wxRichTextCtrl allows editing of styled text.
//
// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL
// headers and libraries to be able to compile the library with wxUSE_GLCANVAS
-// set to 1. Note that for some compilers (notably Microsoft Visual C++) you
-// will need to manually add opengl32.lib and glu32.lib to the list of
-// libraries linked with your program if you use OpenGL.
+// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the
+// list of libraries used to link your application (although this is done
+// implicitly for Microsoft Visual C++ users).
//
-// Default is 0.
+// Default is 0 unless USE_OPENGL was defined on make command line in which
+// case this is predefined as 1.
//
// Recommended setting: 1 if you intend to use OpenGL, 0 otherwise
-#define wxUSE_GLCANVAS 0
+#ifndef wxUSE_GLCANVAS
+ #define wxUSE_GLCANVAS 0
+#endif
// wxRichTextCtrl allows editing of styled text.
//
// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL
// headers and libraries to be able to compile the library with wxUSE_GLCANVAS
-// set to 1. Note that for some compilers (notably Microsoft Visual C++) you
-// will need to manually add opengl32.lib and glu32.lib to the list of
-// libraries linked with your program if you use OpenGL.
+// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the
+// list of libraries used to link your application (although this is done
+// implicitly for Microsoft Visual C++ users).
//
-// Default is 0.
+// Default is 0 unless USE_OPENGL was defined on make command line in which
+// case this is predefined as 1.
//
// Recommended setting: 1 if you intend to use OpenGL, 0 otherwise
-#define wxUSE_GLCANVAS 0
+#ifndef wxUSE_GLCANVAS
+ #define wxUSE_GLCANVAS 0
+#endif
// wxRichTextCtrl allows editing of styled text.
//
// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL
// headers and libraries to be able to compile the library with wxUSE_GLCANVAS
-// set to 1. Note that for some compilers (notably Microsoft Visual C++) you
-// will need to manually add opengl32.lib and glu32.lib to the list of
-// libraries linked with your program if you use OpenGL.
+// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the
+// list of libraries used to link your application (although this is done
+// implicitly for Microsoft Visual C++ users).
//
-// Default is 0.
+// Default is 0 unless USE_OPENGL was defined on make command line in which
+// case this is predefined as 1.
//
// Recommended setting: 1 if you intend to use OpenGL, 0 otherwise
-#define wxUSE_GLCANVAS 0
+#ifndef wxUSE_GLCANVAS
+ #define wxUSE_GLCANVAS 0
+#endif
// wxRichTextCtrl allows editing of styled text.
//
// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL
// headers and libraries to be able to compile the library with wxUSE_GLCANVAS
-// set to 1. Note that for some compilers (notably Microsoft Visual C++) you
-// will need to manually add opengl32.lib and glu32.lib to the list of
-// libraries linked with your program if you use OpenGL.
+// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the
+// list of libraries used to link your application (although this is done
+// implicitly for Microsoft Visual C++ users).
//
-// Default is 0.
+// Default is 0 unless USE_OPENGL was defined on make command line in which
+// case this is predefined as 1.
//
// Recommended setting: 1 if you intend to use OpenGL, 0 otherwise
-#define wxUSE_GLCANVAS 0
+#ifndef wxUSE_GLCANVAS
+ #define wxUSE_GLCANVAS 0
+#endif
// wxRichTextCtrl allows editing of styled text.
//
// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL
// headers and libraries to be able to compile the library with wxUSE_GLCANVAS
-// set to 1. Note that for some compilers (notably Microsoft Visual C++) you
-// will need to manually add opengl32.lib and glu32.lib to the list of
-// libraries linked with your program if you use OpenGL.
+// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the
+// list of libraries used to link your application (although this is done
+// implicitly for Microsoft Visual C++ users).
//
-// Default is 0.
+// Default is 0 unless USE_OPENGL was defined on make command line in which
+// case this is predefined as 1.
//
// Recommended setting: 1 if you intend to use OpenGL, 0 otherwise
-#define wxUSE_GLCANVAS 0
+#ifndef wxUSE_GLCANVAS
+ #define wxUSE_GLCANVAS 0
+#endif
// wxRichTextCtrl allows editing of styled text.
//
// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL
// headers and libraries to be able to compile the library with wxUSE_GLCANVAS
-// set to 1. Note that for some compilers (notably Microsoft Visual C++) you
-// will need to manually add opengl32.lib and glu32.lib to the list of
-// libraries linked with your program if you use OpenGL.
+// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the
+// list of libraries used to link your application (although this is done
+// implicitly for Microsoft Visual C++ users).
//
-// Default is 0.
+// Default is 0 unless USE_OPENGL was defined on make command line in which
+// case this is predefined as 1.
//
// Recommended setting: 1 if you intend to use OpenGL, 0 otherwise
-#define wxUSE_GLCANVAS 0
+#ifndef wxUSE_GLCANVAS
+ #define wxUSE_GLCANVAS 0
+#endif
// wxRichTextCtrl allows editing of styled text.
//
// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL
// headers and libraries to be able to compile the library with wxUSE_GLCANVAS
-// set to 1. Note that for some compilers (notably Microsoft Visual C++) you
-// will need to manually add opengl32.lib and glu32.lib to the list of
-// libraries linked with your program if you use OpenGL.
+// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the
+// list of libraries used to link your application (although this is done
+// implicitly for Microsoft Visual C++ users).
//
-// Default is 0.
+// Default is 0 unless USE_OPENGL was defined on make command line in which
+// case this is predefined as 1.
//
// Recommended setting: 1 if you intend to use OpenGL, 0 otherwise
-#define wxUSE_GLCANVAS 0
+#ifndef wxUSE_GLCANVAS
+ #define wxUSE_GLCANVAS 0
+#endif
// wxRichTextCtrl allows editing of styled text.
//