[Plib-devel] Patch
Brought to you by:
sjbaker
From: Loring H. <ls...@cs...> - 2000-03-03 04:02:20
|
Hope this is the right place to send patches. The following is a patch to the cvs tree for core plib, I also have a patch for plib_examples, but I didn't see that in the cvs tree - should I just send the patch relative to the tarball? This patch allows plib to be compiled when: * Using a an old version of g++ that does not define FLT_EPSILON * glut is installed in a non-standard place * X11 include files and libraries are not in the standard location * X11 include files/libraries are in a non-standard location and GL include files and libraries are located in the same place (/usr/X11R6/include/GL, for example) With these changes I was able to build plib and the examples under Solaris, Linux, and AIX (except for the sound library under AIX). Loring RCS file: /cvsroot/plib/plib/configure.in,v retrieving revision 1.2 diff -u -r1.2 configure.in --- configure.in 2000/02/15 23:28:50 1.2 +++ configure.in 2000/03/02 22:52:38 @@ -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/sg/sgIsect.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/sg/sgIsect.cxx,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 sgIsect.cxx --- src/sg/sgIsect.cxx 2000/02/01 05:52:26 1.1.1.1 +++ src/sg/sgIsect.cxx 2000/03/02 22:52:38 @@ -7,6 +7,11 @@ #define FALSE 0 #endif +/* Defined in float.h in later versions of egcs */ +#ifndef FLT_EPSILON +#define FLT_EPSILON 1.19209290e-07f +#endif + /* Determine the origin and unit direction vector of a line formed by the intersection of two planes. |