# glib
AC_ARG_ENABLE(glib, [ --disable-glib don't build with external glib], glib=$enableval, glib=yes)
-if test x"${glib}" = "xyes"; then
+if test "x${glib}" = "xyes" -a "x${GLIB_CFLAGS}" = "x" -a "x${GLIB_LIBS}" = "x"; then
PKG_CHECK_MODULES(GLIB, [glib-2.0 gthread-2.0], [glib=yes],[glib=no])
fi
if test "x${glib}" = "xyes"; then
AM_CONDITIONAL(SUPPORT_GLIB, [test "x$glib" = "xno"])
AM_CONDITIONAL(SUPPORT_EZXML, [test "x$glib" = "xno"])
+if test "x${ZLIB_CFLAGS}" = "x" -a "x${ZLIB_LIBS}" = "x"; then
AC_CHECK_HEADER(
zlib.h,
AC_DEFINE(
ZLIB_LIBS="-L\$(top_builddir)/navit/support/zlib -lsupport_zlib"
zlib=no
)
+else
+ zlib=yes
+fi
AM_CONDITIONAL(SUPPORT_ZLIB, [test "x$zlib" = "xno"])
AC_SUBST(ZLIB_CFLAGS)
AC_SUBST(ZLIB_LIBS)