From a41930ed17ee8d2e028f6e6963e972ff37b1a581 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 23 Jul 2002 13:30:47 +0000 Subject: [PATCH] Support added for Gnu C++ under Solaris. --- Make/makedefs | 39 ++++++++++++++++++++++++++++++++++ src/osgPlugins/dx/DXWriter.cpp | 8 ++++--- 2 files changed, 44 insertions(+), 3 deletions(-) diff --git a/Make/makedefs b/Make/makedefs index 90a6889d2..020bcad1e 100644 --- a/Make/makedefs +++ b/Make/makedefs @@ -91,6 +91,43 @@ RECURSIVE_TARGETS = \ #### SUN OS Specific definitions ifeq ($(OS),SunOS) +#### if useing g++ on a sun +ifeq ($(COMPILER),gnu) + + C++ = g++ + DEPARG = -M + INC += -I/usr/local/glut-3.7/include + DEF += -W -Wall -fPIC -fpermissive + OPTF = -O2 + DBGF = -g + SHARED = -shared -fPIC +ifeq ($(ARCH),64) + ARCHARGS = -m64 +else + ARCHARGS = +endif + LINKARGS = + DYNAMICLIBRARYLIB = -ldl + OSG_LIBS = -losgGLUT -losgGA -losgDB -losgUtil -losg + FREETYPE_LIB = -L/usr/local/lib -lfreetype + GLUT_LIB = -L/usr/local/glut-3.7/lib/glut -lglut + GL_LIBS = -lGLU -lGL + X_LIBS = -lXext -lXmu -lXi -lX11 + SOCKET_LIBS = -lsocket -lnsl + OTHER_LIBS = + TIFF_LIB = -ltiff + + INSTBINCMD = cp + INSTDEVCMD = cp + + INST_SYS_PREFIX = /opt/OpenSceneGraph + INST_SHARE_PREFIX = /opt + + MAKEDIST = $(TOPDIR)/Make/makepkg + +#### using forte compilers (default) +else + C++ = CC DEPARG = -xM1 INC += @@ -123,6 +160,8 @@ endif MAKEDIST = $(TOPDIR)/Make/makepkg endif +endif + #### IRIX Specific definitions ifeq ($(OS),IRIX) diff --git a/src/osgPlugins/dx/DXWriter.cpp b/src/osgPlugins/dx/DXWriter.cpp index 969f6a6f0..5eb95676a 100644 --- a/src/osgPlugins/dx/DXWriter.cpp +++ b/src/osgPlugins/dx/DXWriter.cpp @@ -129,15 +129,15 @@ #include "StateSetStr.h" #if defined(__sgi) || defined(__FreeBSD__) - #include + #include #include #else #include #if (defined(WIN32) || defined (macintosh)) && !defined(__CYGWIN__) #include #else - #include - #endif + #include + #endif #endif #if defined(WIN32) && !defined(__CYGWIN__) @@ -603,6 +603,8 @@ inline int IsNaNorInf( float f ) } #elif defined(__FreeBSD__) || defined(__linux) || defined(__CYGWIN__) || defined(__DARWIN_OSX__) return isnanf(f) || isinf(f); +#elif defined(__sun) + return isnan(f); // KLUDGE - hack to get this to compile w/g++. #elif defined(WIN32) return _isnan(f) || !_finite(f); #elif defined(__hpux__)