-EXTRA_DIST = mksymlinks.sh
+EXTRA_DIST = mksymlinks.sh acsite.m4 acconfig.h
dist-hook:
tar cf - src/metar | (cd $(distdir); tar xvf -)
/* Define if you have the wait3 system call. */
#undef HAVE_WAIT3
+/* Define if you have zlib installed system wide. */
+#undef HAVE_ZLIB
+
/* Define as __inline if that's what the C compiler calls it. */
#undef inline
AC_INIT(src/bucket/newbucket.cxx)
dnl Initialize the automake stuff
-AM_INIT_AUTOMAKE(SimGear, 0.0.2)
+AM_INIT_AUTOMAKE(SimGear, 0.0.3)
dnl Checks for programs.
AC_PROG_MAKE_SET
dnl Check for system installed zlib
AC_CHECK_HEADER(zlib.h)
-if test "x$ac_cv_header_zlib_h" != "xyes"; then
+if test "x$ac_cv_header_zlib_h" = "xyes"; then
+ AC_DEFINE( HAVE_ZLIB )
+else
echo "no zlib found, building."
fi
AM_CONDITIONAL(HAVE_ZLIB, test "x$ac_cv_header_zlib_h" = "xyes" )
ln -s ../../misc/zfstream.hxx src/simgear/misc/zfstream.hxx
ln -s ../../xgl/xgl.h src/simgear/xgl/xgl.h
+
+ln -s ../../zlib/zlib.h src/simgear/zlib/zlib.h
+ln -s ../../zlib/zconf.h src/simgear/zlib/zconf.h
includedir = @includedir@/math
+if HAVE_ZLIB
+ZLIB_INCL =
+else
+ZLIB_INCL = -I$(top_builddir)/src/zlib
+endif
+
lib_LIBRARIES = libsgmath.a
include_HEADERS = \
polar3d.cxx \
vector.cxx
-INCLUDES += -I$(top_builddir)/src
+INCLUDES += -I$(top_builddir)/src $(ZLIB_INCL)
if HAVE_ZLIB
ZLIB_INCL =
else
-ZLIB_INCL = -I$(top_builddir)/zlib
+ZLIB_INCL = -I$(top_builddir)/src/zlib
endif
lib_LIBRARIES = libsgmisc.a
texcoord.cxx \
zfstream.cxx
-INCLUDES += -I$(top_builddir)/src
+INCLUDES += -I$(top_builddir)/src $(ZLIB_INCL)
#include <simgear/compiler.h>
-#include <zlib.h>
+#ifdef HAVE_ZLIB
+# include <zlib.h>
+#else
+# include <simgear/zlib/zlib.h>
+#endif
#ifdef FG_HAVE_STD_INCLUDES