diff --git a/dtool/Config.pp b/dtool/Config.pp index ec1a9863bf..6b12a060c9 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -478,19 +478,22 @@ #defer GL_IPATH /usr/include #defer GL_LPATH #defer GL_LIBS +#defer GLU_LIBS #if $[WINDOWS_PLATFORM] - #define GL_LIBS opengl32.lib $[if $[HAVE_GLU],glu32.lib] + #define GL_LIBS opengl32.lib + #define GLU_LIBS glu32.lib #elif $[OSX_PLATFORM] #defer GL_FRAMEWORK OpenGL #else #defer GL_LPATH /usr/X11R6/lib - #defer GL_LIBS GL $[if $[HAVE_GLU],GLU] + #defer GL_LIBS GL + #defer GLU_LIBS GLU #endif #defer HAVE_GL $[libtest $[GL_LPATH],$[GL_LIBS]] // GLU is an auxiliary library that is usually provided with OpenGL, // but is sometimes missing (e.g. the default FC5 installation). -#defer HAVE_GLU $[HAVE_GL] +#defer HAVE_GLU $[libtest $[GL_LPATH],$[GLU_LIBS]] // Is Mesa installed separately from OpenGL? Mesa is an open-source // software-only OpenGL renderer. Panda can link with it diff --git a/dtool/Package.pp b/dtool/Package.pp index 74969ee933..9cd9aff9bf 100644 --- a/dtool/Package.pp +++ b/dtool/Package.pp @@ -181,6 +181,7 @@ #set GL_IPATH $[unixfilename $[GL_IPATH]] #set GL_LPATH $[unixfilename $[GL_LPATH]] #set GL_LIBS $[GL_LIBS] +#set GLU_LIBS $[GLU_LIBS] #set HAVE_GL $[HAVE_GL] #set HAVE_GLU $[HAVE_GLU] diff --git a/dtool/pptempl/Global.pp b/dtool/pptempl/Global.pp index 50ad0252a5..a776b111e3 100644 --- a/dtool/pptempl/Global.pp +++ b/dtool/pptempl/Global.pp @@ -122,7 +122,7 @@ #define gl_ipath $[wildcard $[GL_IPATH]] #define gl_lpath $[wildcard $[GL_LPATH]] #define gl_cflags $[GL_CFLAGS] - #define gl_libs $[GL_LIBS] + #define gl_libs $[GL_LIBS] $[if $[HAVE_GLU],$[GLU_LIBS]] #define gl_framework $[GL_FRAMEWORK] #endif