diff --git a/configure.ac b/configure.ac index 5c861dec5..b1a12c025 100644 --- a/configure.ac +++ b/configure.ac @@ -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) diff --git a/src/Objects/ssgEntityArray.cxx b/src/Objects/ssgEntityArray.cxx index 031499b51..d8ca2c64f 100644 --- a/src/Objects/ssgEntityArray.cxx +++ b/src/Objects/ssgEntityArray.cxx @@ -21,6 +21,9 @@ $Id$ */ +#ifdef HAVE_CONFIG_H +# include +#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 ) diff --git a/src/Objects/ssgEntityArray.hxx b/src/Objects/ssgEntityArray.hxx index f69832878..22612a4bd 100644 --- a/src/Objects/ssgEntityArray.hxx +++ b/src/Objects/ssgEntityArray.hxx @@ -1,6 +1,10 @@ #ifndef _SSG_ENTITY_ARRAY_HXX #define _SSG_ENTITY_ARRAY_HXX +#ifdef HAVE_CONFIG_H +# include +#endif + #include @@ -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 () ;