build: use AC_ARG_WITH for zlib
Since it selects an external dependency for inclusion, AC_ARG_WITH
is preferred (autoconf.info 15.2 "Working with external software").
diff --git a/configure.ac b/configure.ac
index 21a63b7..46b535d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,10 +51,10 @@
AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
])
-AC_ARG_ENABLE([zlib],
- AS_HELP_STRING([--enable-zlib], [handle gzipped modules @<:@default=disabled@:>@]),
- [], enable_zlib=no)
-AS_IF([test "x$enable_zlib" != "xno"], [
+AC_ARG_WITH([zlib],
+ AS_HELP_STRING([--with-zlib], [handle gzipped modules @<:@default=disabled@:>@]),
+ [], [with_zlib=no])
+AS_IF([test "x$with_zlib" != "xno"], [
PKG_CHECK_MODULES([zlib], [zlib])
AC_DEFINE([ENABLE_ZLIB], [1], [Enable zlib for modules.])
], [
@@ -139,6 +139,6 @@
tools: ${enable_tools}
logging: ${enable_logging}
- zlib: ${enable_zlib}
+ zlib: ${with_zlib}
debug: ${enable_debug}
])