[Plib-users] SUNWspro patch, questions
Brought to you by:
sjbaker
From: Loring H. <ls...@cs...> - 2000-06-16 13:29:36
|
This patch allows PLIB to be built under Solaris w/ the SUNWspro C++ compiler on a system without glut in the default place (ie, adds --with-glut and --with-glut-includes). Also - not sure if it is my version of automake or not (1.4), but automake creates PLIB Makefile's that assume you are using gcc (uses -Md to create dependencies). I didn't know of any easy way to fix this - it gives a warning message when compiling with SUNWspro 4.2, but builds fine. Other issues - the README in cvs is out of date (points to the wrong URL), and the documentation is out of date with the cvs source. Would it be possible to put the examples and docs in cvs so it would be easier to get the most recent versions (and give all the other benefits of cvs)? Thanks, Loring Index: configure.in =================================================================== RCS file: /cvsroot/plib/plib/configure.in,v retrieving revision 1.4 diff -u -r1.4 configure.in --- configure.in 2000/05/16 22:22:15 1.4 +++ configure.in 2000/06/16 13:14:12 @@ -27,6 +27,26 @@ AC_PROG_INSTALL AC_PROG_RANLIB +dnl Command line arguments +AC_ARG_WITH(glut, +[ --with-glut=DIR set the prefix directory where GLUT resides], +GLUT_PREFIX=$withval, GLUT_PREFIX=auto) + +AC_ARG_WITH(glut-includes, +[ --with-glut-includes=DIR + set the directory where GLUT include files reside], +GLUT_INCLUDES=$withval, GLUT_INCLUDES=auto) +if test "x$GLUT_INCLUDES" != "xauto"; then + CPPFLAGS="$CPPFLAGS -I$GLUT_INCLUDES" +else + if test "x$GLUT_PREFIX" != "xauto"; then + CPPFLAGS="$CPPFLAGS -I$GLUT_PREFIX/include" + fi +fi +if test "x$GLUT_PREFIX" != "xauto"; then + LIBS="$LIBS -L$GLUT_PREFIX/lib" +fi + dnl Checks for library functions. dnl check for OpenGL related libraries @@ -39,6 +59,9 @@ AC_PATH_XTRA x_suffix="$X_LIBS $X_PRE_LIBS -lX11 -lXi -lXext -lXmu $X_EXTRA_LIBS -lm" + if test "x$x_includes" != "x"; then + CPPFLAGS="$CPPFLAGS -I$x_includes" + fi dnl Reasonable stuff non-windoze variants ... :-) Index: src/sl/slPortability.h =================================================================== RCS file: /cvsroot/plib/plib/src/sl/slPortability.h,v retrieving revision 1.2 diff -u -r1.2 slPortability.h --- src/sl/slPortability.h 2000/02/20 00:54:23 1.2 +++ src/sl/slPortability.h 2000/06/16 13:14:13 @@ -66,7 +66,7 @@ # include <audio.h> #endif -#if defined(__svr4__) +#if defined(__svr4__) || defined(__SVR4) # include <sys/audioio.h> # include <sys/stropts.h> # define SOLARIS Index: src/ssg/ssg.h =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssg.h,v retrieving revision 1.20 diff -u -r1.20 ssg.h --- src/ssg/ssg.h 2000/05/16 21:58:27 1.20 +++ src/ssg/ssg.h 2000/06/16 13:14:13 @@ -21,6 +21,13 @@ #define FALSE 0 #endif +// SUNWspro 4.2 and earlier need bool to be defined +#if defined(__SUNPRO_CC) && __SUNPRO_CC < 0x500 +typedef int bool; +const int true = 1; +const int false = 0; +#endif + #ifndef _SSG_PUBLIC #define _SSG_PUBLIC protected #endif |