]> git.mxchange.org Git - flightgear.git/commitdiff
Attempt to work around a problem compiling ssgEntityArray.cxx against
authorcurt <curt>
Wed, 28 May 2003 16:57:24 +0000 (16:57 +0000)
committercurt <curt>
Wed, 28 May 2003 16:57:24 +0000 (16:57 +0000)
plib-1.6.0

configure.ac
src/Objects/ssgEntityArray.cxx
src/Objects/ssgEntityArray.hxx

index 5c861dec5967cbf6505589964aa303450b3d6865..b1a12c02546157b5a98723d09b35c44bab564ef1 100644 (file)
@@ -390,6 +390,10 @@ int main() {
   AC_MSG_RESULT(no)
 )
 AM_CONDITIONAL(HAVE_PLIB_PSL, test "x$have_plib_psl" = "xyes")
+if test "x$have_plib_psl" = "xyes"; then
+   AC_DEFINE([HAVE_PLIB_PSL], 1,
+             [Define if plib version is new enough to provide "PSL"])
+fi
 
 dnl Check for MetaKit
 AC_CHECK_HEADER(mk4.h)
index 031499b51bf634b19bf9aae72864bada5ce95eb6..d8ca2c64f37a2c8d58dff01cad50faa7094467cc 100644 (file)
@@ -21,6 +21,9 @@
      $Id$
 */
 
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
 
 #include "ssgEntityArray.hxx"
 
@@ -179,6 +182,7 @@ void ssgEntityArray::print ( FILE *fd, char *indent, int how_much )
 }
 
 
+#ifdef HAVE_PLIB_PSL
 void ssgEntityArray::getStats ( int *num_branches, int *num_leaves, int *num_tris, int *num_verts )
 {
   int nb, nl, nt, nv ;
@@ -194,6 +198,7 @@ void ssgEntityArray::getStats ( int *num_branches, int *num_leaves, int *num_tri
   *num_tris     += nt * locations->getNum() ;
   *num_verts    += nv * locations->getNum() ;
 }
+#endif
 
 
 void ssgEntityArray::cull ( sgFrustum *f, sgMat4 m, int test_needed )
index f69832878fcf67e4d5ef50c417ec673e986328ae..22612a4bd20352b8cc12b2be2a270e43e4829938 100644 (file)
@@ -1,6 +1,10 @@
 #ifndef _SSG_ENTITY_ARRAY_HXX
 #define _SSG_ENTITY_ARRAY_HXX
 
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
 #include <plib/ssg.h>
 
 
@@ -50,7 +54,9 @@ public:
     virtual void hot           ( sgVec3     s, sgMat4 m, int test_needed ) ;
     virtual void los           ( sgVec3     s, sgMat4 m, int test_needed ) ;
     virtual void print         ( FILE *fd = stderr, char *indent = "", int how_much = 2 ) ;
+#ifdef HAVE_PLIB_PSL
     virtual void getStats ( int *num_branches, int *num_leaves, int *num_tris, int *num_vertices ) ;
+#endif
     virtual int load ( FILE *fd ) ;
     virtual int save ( FILE *fd ) ;
     virtual void recalcBSphere () ;