Support added for Gnu C++ under Solaris.

This commit is contained in:
Robert Osfield 2002-07-23 13:30:47 +00:00
parent 80afddc08d
commit a41930ed17
2 changed files with 44 additions and 3 deletions

View File

@ -91,6 +91,43 @@ RECURSIVE_TARGETS = \
#### SUN OS Specific definitions #### SUN OS Specific definitions
ifeq ($(OS),SunOS) 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 C++ = CC
DEPARG = -xM1 DEPARG = -xM1
INC += INC +=
@ -123,6 +160,8 @@ endif
MAKEDIST = $(TOPDIR)/Make/makepkg MAKEDIST = $(TOPDIR)/Make/makepkg
endif endif
endif
#### IRIX Specific definitions #### IRIX Specific definitions
ifeq ($(OS),IRIX) ifeq ($(OS),IRIX)

View File

@ -129,15 +129,15 @@
#include "StateSetStr.h" #include "StateSetStr.h"
#if defined(__sgi) || defined(__FreeBSD__) #if defined(__sgi) || defined(__FreeBSD__)
#include <unistd.h> #include <unistd.h>
#include <ieeefp.h> #include <ieeefp.h>
#else #else
#include <math.h> #include <math.h>
#if (defined(WIN32) || defined (macintosh)) && !defined(__CYGWIN__) #if (defined(WIN32) || defined (macintosh)) && !defined(__CYGWIN__)
#include <float.h> #include <float.h>
#else #else
#include <unistd.h> #include <unistd.h>
#endif #endif
#endif #endif
#if defined(WIN32) && !defined(__CYGWIN__) #if defined(WIN32) && !defined(__CYGWIN__)
@ -603,6 +603,8 @@ inline int IsNaNorInf( float f )
} }
#elif defined(__FreeBSD__) || defined(__linux) || defined(__CYGWIN__) || defined(__DARWIN_OSX__) #elif defined(__FreeBSD__) || defined(__linux) || defined(__CYGWIN__) || defined(__DARWIN_OSX__)
return isnanf(f) || isinf(f); return isnanf(f) || isinf(f);
#elif defined(__sun)
return isnan(f); // KLUDGE - hack to get this to compile w/g++.
#elif defined(WIN32) #elif defined(WIN32)
return _isnan(f) || !_finite(f); return _isnan(f) || !_finite(f);
#elif defined(__hpux__) #elif defined(__hpux__)