diff --git a/acconfig.h b/acconfig.h index 4e22afc2..b8fd2efe 100644 --- a/acconfig.h +++ b/acconfig.h @@ -181,6 +181,9 @@ /* Define if you have the wait3 system call. */ #undef HAVE_WAIT3 +/* Define if you have the wait3 system call. */ +#undef HAVE_ZLIB + /* Define as __inline if that's what the C compiler calls it. */ #undef inline diff --git a/configure.in b/configure.in index b475cc16..d0f2a71f 100644 --- a/configure.in +++ b/configure.in @@ -211,6 +211,14 @@ AC_CHECK_HEADERS( \ fcntl.h getopt.h malloc.h memory.h stdlib.h sys/param.h sys/stat.h \ sys/time.h sys/timeb.h unistd.h windows.h winbase.h values.h ) +# Check for system installed zlib +AC_CHECK_HEADER(zlib.h) +if test "x$ac_cv_header_zlib_h" = "xyes"; then + AC_DEFINE( HAVE_ZLIB ) +else + echo "no zlib found, using version provided by SimGear." +fi + dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T diff --git a/src/BuildTiles/Main/Makefile.am b/src/BuildTiles/Main/Makefile.am index 8f78f563..9bbbbe97 100644 --- a/src/BuildTiles/Main/Makefile.am +++ b/src/BuildTiles/Main/Makefile.am @@ -15,7 +15,7 @@ fgfs_construct_LDADD = \ $(top_builddir)/src/Lib/Polygon/libPolygon.a \ $(top_builddir)/src/Lib/poly2tri/libpoly2tri.a \ $(top_builddir)/src/Lib/Triangle/libTriangle.a \ - -lsgbucket -lsgmath -lsgmisc -lsgdebug -lz -lgpc + -lsgbucket -lsgmath -lsgmisc -lsgdebug -lplibsg -lz -lgpc fgfs_master_SOURCES = master.cxx diff --git a/src/BuildTiles/Main/main.cxx b/src/BuildTiles/Main/main.cxx index e700736e..183b602d 100644 --- a/src/BuildTiles/Main/main.cxx +++ b/src/BuildTiles/Main/main.cxx @@ -397,7 +397,7 @@ static Point3D calc_normal( FGConstruct& c, int i ) { v1[0] = p2.x() - p1.x(); v1[1] = p2.y() - p1.y(); v1[2] = p2.z() - p1.z(); v2[0] = p3.x() - p1.x(); v2[1] = p3.y() - p1.y(); v2[2] = p3.z() - p1.z(); - sgVectorProduct( normal, v1, v2 ); + sgVectorProductVec3( normal, v1, v2 ); sgNormalizeVec3( normal ); return Point3D( normal[0], normal[1], normal[2] ); @@ -665,7 +665,7 @@ void usage( const string name ) { } -main(int argc, char **argv) { +int main(int argc, char **argv) { double lon, lat; fglog().setLogLevels( FG_ALL, FG_DEBUG ); @@ -791,4 +791,5 @@ main(int argc, char **argv) { } cout << "[Finished successfully]" << endl; + return 0; } diff --git a/src/BuildTiles/Main/master.cxx b/src/BuildTiles/Main/master.cxx index 69841421..135bd024 100644 --- a/src/BuildTiles/Main/master.cxx +++ b/src/BuildTiles/Main/master.cxx @@ -103,7 +103,7 @@ void usage( const string name ) { } -main(int argc, char **argv) { +int main(int argc, char **argv) { double lon, lat; if ( argc < 3 ) { @@ -147,6 +147,8 @@ main(int argc, char **argv) { lat += dy; } + + return 0; } diff --git a/src/Include/config.h.in b/src/Include/config.h.in index b8b419d0..96fdb02a 100644 --- a/src/Include/config.h.in +++ b/src/Include/config.h.in @@ -47,6 +47,9 @@ /* Define if you have the vprintf function. */ #undef HAVE_VPRINTF +/* Define if you have the wait3 system call. */ +#undef HAVE_ZLIB + /* Define as the return type of signal handlers (int or void). */ #undef RETSIGTYPE