build-sys: use AS_IF

This commit is contained in:
Lucas De Marchi 2011-12-23 12:03:19 -02:00
parent 9b966da87e
commit cfb908bf66
1 changed files with 14 additions and 16 deletions

View File

@ -55,21 +55,19 @@ AS_IF([test "x$enable_logging" = "xyes"], [
AC_ARG_ENABLE([zlib],
AS_HELP_STRING([--enable-zlib], [handle gzipped modules @<:@default=disabled@:>@]),
[], enable_zlib=no)
if test "x$enable_zlib" != "xno"; then
AC_CHECK_LIB([z], [gzopen],
[
AS_IF([test "x$enable_zlib" != "xno"], [
AC_CHECK_LIB([z], [gzopen], [
zlib_libs="-lz"
required_private_libs="${required_private_libs} ${zlib_libs}"
AC_DEFINE(ENABLE_ZLIB, [1], [Enable zlib for modules.])
AC_SUBST(zlib_libs)
],
[AC_MSG_ERROR([zlib is not present])])
else
[AC_MSG_ERROR([zlib is not present])
])
], [
AC_MSG_NOTICE([zlib support not requested])
zlib_libs=""
fi
if test "x$zlib_libs" != "x"; then
AC_DEFINE(ENABLE_ZLIB, [1], [Enable zlib for modules.])
fi
AC_SUBST(zlib_libs)
])
AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),