mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Convert the configure.ac rules for zlib library to use pkg-config
This commit is contained in:
@@ -50,7 +50,8 @@ CINCLUDES = -I${srcdir}/include -I${srcdir}/unix/include -I. \
|
|||||||
${OPENSSL_CFLAGS} \
|
${OPENSSL_CFLAGS} \
|
||||||
${JSON_C_CFLAGS} \
|
${JSON_C_CFLAGS} \
|
||||||
${LIBXML2_CFLAGS} \
|
${LIBXML2_CFLAGS} \
|
||||||
${MAXMINDDB_CFLAGS}
|
${MAXMINDDB_CFLAGS} \
|
||||||
|
${ZLIB_CFLAGS}
|
||||||
|
|
||||||
CDEFINES = @CONTRIB_DLZ@
|
CDEFINES = @CONTRIB_DLZ@
|
||||||
|
|
||||||
@@ -59,8 +60,8 @@ CWARNINGS =
|
|||||||
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
DNSLIBS = ../../lib/dns/libdns.@A@ ${MAXMINDDB_LIBS} @DNS_CRYPTO_LIBS@
|
||||||
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
ISCCFGLIBS = ../../lib/isccfg/libisccfg.@A@
|
||||||
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
|
ISCCCLIBS = ../../lib/isccc/libisccc.@A@
|
||||||
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
|
ISCLIBS = ../../lib/isc/libisc.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
||||||
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS}
|
ISCNOSYMLIBS = ../../lib/isc/libisc-nosymtbl.@A@ ${OPENSSL_LIBS} ${JSON_C_LIBS} ${LIBXML2_LIBS} ${ZLIB_LIBS}
|
||||||
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
BIND9LIBS = ../../lib/bind9/libbind9.@A@
|
||||||
NSLIBS = ../../lib/ns/libns.@A@
|
NSLIBS = ../../lib/ns/libns.@A@
|
||||||
|
|
||||||
|
@@ -120,5 +120,6 @@ JSON_C_LIBS="@JSON_C_LIBS@"
|
|||||||
HAVEJSONSTATS=${JSON_C_LIBS:+1}
|
HAVEJSONSTATS=${JSON_C_LIBS:+1}
|
||||||
MAXMINDDB_LIBS="@MAXMINDDB_LIBS@"
|
MAXMINDDB_LIBS="@MAXMINDDB_LIBS@"
|
||||||
HAVEGEOIP2=${MAXMINDDB_LIBS:+1}
|
HAVEGEOIP2=${MAXMINDDB_LIBS:+1}
|
||||||
ZLIB=@ZLIB@
|
ZLIB_LIBS="@ZLIB_LIBS@"
|
||||||
|
HAVEZLIB=${ZLIB_LIBS:+1}
|
||||||
NZD=@NZD_TOOLS@
|
NZD=@NZD_TOOLS@
|
||||||
|
@@ -120,7 +120,7 @@ PYTHON=@PYTHON@
|
|||||||
#
|
#
|
||||||
HAVEXMLSTATS=@XMLSTATS@
|
HAVEXMLSTATS=@XMLSTATS@
|
||||||
HAVEJSONSTATS=@JSONSTATS@
|
HAVEJSONSTATS=@JSONSTATS@
|
||||||
ZLIB=@ZLIB@
|
HAVEZLIB=@ZLIB@
|
||||||
NZD=@NZD_TOOLS@
|
NZD=@NZD_TOOLS@
|
||||||
|
|
||||||
# The rest is shared between Windows and Unices
|
# The rest is shared between Windows and Unices
|
||||||
|
@@ -263,7 +263,7 @@ n=`expr $n + 1`
|
|||||||
|
|
||||||
ret=0
|
ret=0
|
||||||
echo_i "checking if compressed output is really compressed ($n)"
|
echo_i "checking if compressed output is really compressed ($n)"
|
||||||
if [ "$ZLIB" ];
|
if [ "$HAVEZLIB" ];
|
||||||
then
|
then
|
||||||
REGSIZE=`cat regular.headers | \
|
REGSIZE=`cat regular.headers | \
|
||||||
grep -i Content-Length | sed -e "s/.*: \([0-9]*\).*/\1/"`
|
grep -i Content-Length | sed -e "s/.*: \([0-9]*\).*/\1/"`
|
||||||
|
@@ -456,7 +456,7 @@
|
|||||||
/* Define to 1 if you have the `usleep' function. */
|
/* Define to 1 if you have the `usleep' function. */
|
||||||
#undef HAVE_USLEEP
|
#undef HAVE_USLEEP
|
||||||
|
|
||||||
/* Define if zlib was found */
|
/* Use zlib library */
|
||||||
#undef HAVE_ZLIB
|
#undef HAVE_ZLIB
|
||||||
|
|
||||||
/* define if __atomic builtins are not available */
|
/* define if __atomic builtins are not available */
|
||||||
|
271
configure
vendored
271
configure
vendored
@@ -725,7 +725,8 @@ purify_path
|
|||||||
MKDEPPROG
|
MKDEPPROG
|
||||||
MKDEPCFLAGS
|
MKDEPCFLAGS
|
||||||
MKDEPCC
|
MKDEPCC
|
||||||
ZLIB
|
ZLIB_LIBS
|
||||||
|
ZLIB_CFLAGS
|
||||||
JSON_C_LIBS
|
JSON_C_LIBS
|
||||||
JSON_C_CFLAGS
|
JSON_C_CFLAGS
|
||||||
LIBXML2_LIBS
|
LIBXML2_LIBS
|
||||||
@@ -975,6 +976,8 @@ LIBXML2_CFLAGS
|
|||||||
LIBXML2_LIBS
|
LIBXML2_LIBS
|
||||||
JSON_C_CFLAGS
|
JSON_C_CFLAGS
|
||||||
JSON_C_LIBS
|
JSON_C_LIBS
|
||||||
|
ZLIB_CFLAGS
|
||||||
|
ZLIB_LIBS
|
||||||
LIBIDN2_CFLAGS
|
LIBIDN2_CFLAGS
|
||||||
LIBIDN2_LIBS
|
LIBIDN2_LIBS
|
||||||
CMOCKA_CFLAGS
|
CMOCKA_CFLAGS
|
||||||
@@ -1671,7 +1674,7 @@ Optional Packages:
|
|||||||
--with-libjson deprecated, use --with-json-c
|
--with-libjson deprecated, use --with-json-c
|
||||||
--with-json-c build with json-c library [yes|no|detect] (default
|
--with-json-c build with json-c library [yes|no|detect] (default
|
||||||
is detect)
|
is detect)
|
||||||
--with-zlib=PATH build with zlib for HTTP compression [default=yes]
|
--with-zlib build with zlib for HTTP compression [default=yes]
|
||||||
--with-purify=PATH use Rational purify
|
--with-purify=PATH use Rational purify
|
||||||
--with-gperftools-profiler
|
--with-gperftools-profiler
|
||||||
use gperftools CPU profiler
|
use gperftools CPU profiler
|
||||||
@@ -1737,6 +1740,8 @@ Some influential environment variables:
|
|||||||
JSON_C_CFLAGS
|
JSON_C_CFLAGS
|
||||||
C compiler flags for JSON_C, overriding pkg-config
|
C compiler flags for JSON_C, overriding pkg-config
|
||||||
JSON_C_LIBS linker flags for JSON_C, overriding pkg-config
|
JSON_C_LIBS linker flags for JSON_C, overriding pkg-config
|
||||||
|
ZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-config
|
||||||
|
ZLIB_LIBS linker flags for ZLIB, overriding pkg-config
|
||||||
LIBIDN2_CFLAGS
|
LIBIDN2_CFLAGS
|
||||||
C compiler flags for LIBIDN2, overriding pkg-config
|
C compiler flags for LIBIDN2, overriding pkg-config
|
||||||
LIBIDN2_LIBS
|
LIBIDN2_LIBS
|
||||||
@@ -17898,134 +17903,190 @@ esac
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# was --with-zlib specified?
|
|
||||||
#
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib library" >&5
|
|
||||||
$as_echo_n "checking for zlib library... " >&6; }
|
|
||||||
|
|
||||||
# Check whether --with-zlib was given.
|
# Check whether --with-zlib was given.
|
||||||
if test "${with_zlib+set}" = set; then :
|
if test "${with_zlib+set}" = set; then :
|
||||||
withval=$with_zlib; with_zlib="$withval"
|
withval=$with_zlib;
|
||||||
else
|
else
|
||||||
with_zlib="auto"
|
with_zlib="auto"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
have_zlib=""
|
case $with_zlib in #(
|
||||||
case "$with_zlib" in
|
no) :
|
||||||
no)
|
;; #(
|
||||||
zlib_libs=""
|
auto) :
|
||||||
;;
|
|
||||||
auto|yes)
|
|
||||||
for d in /usr /usr/local /opt/local
|
|
||||||
do
|
|
||||||
if test -f "${d}/include/zlib.h"
|
|
||||||
then
|
|
||||||
if test ${d} != /usr
|
|
||||||
then
|
|
||||||
zlib_cflags="-I ${d}/include"
|
|
||||||
LIBS="$LIBS -L${d}/lib"
|
|
||||||
fi
|
|
||||||
have_zlib="yes"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
if test -f "${with_zlib}/include/zlib.h"
|
|
||||||
then
|
|
||||||
zlib_cflags="-I${with_zlib}/include"
|
|
||||||
LIBS="$LIBS -L${with_zlib}/lib"
|
|
||||||
have_zlib="yes"
|
|
||||||
else
|
|
||||||
as_fn_error $? "$with_zlib/include/zlib.h not found." "$LINENO" 5
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if test "X${have_zlib}" != "X"
|
pkg_failed=no
|
||||||
then
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
$as_echo_n "checking for zlib... " >&6; }
|
||||||
$as_echo "yes" >&6; }
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing deflate" >&5
|
if test -n "$ZLIB_CFLAGS"; then
|
||||||
$as_echo_n "checking for library containing deflate... " >&6; }
|
pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS"
|
||||||
if ${ac_cv_search_deflate+:} false; then :
|
elif test -n "$PKG_CONFIG"; then
|
||||||
$as_echo_n "(cached) " >&6
|
if test -n "$PKG_CONFIG" && \
|
||||||
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5
|
||||||
|
($PKG_CONFIG --exists --print-errors "zlib") 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||||
|
test $ac_status = 0; }; then
|
||||||
|
pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib" 2>/dev/null`
|
||||||
|
test "x$?" != "x0" && pkg_failed=yes
|
||||||
else
|
else
|
||||||
ac_func_search_save_LIBS=$LIBS
|
pkg_failed=yes
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
||||||
/* end confdefs.h. */
|
|
||||||
|
|
||||||
/* Override any GCC internal prototype to avoid an error.
|
|
||||||
Use char because int might match the return type of a GCC
|
|
||||||
builtin and then its argument prototype would still apply. */
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
#endif
|
|
||||||
char deflate ();
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
return deflate ();
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
|
||||||
for ac_lib in '' z; do
|
|
||||||
if test -z "$ac_lib"; then
|
|
||||||
ac_res="none required"
|
|
||||||
else
|
|
||||||
ac_res=-l$ac_lib
|
|
||||||
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
|
|
||||||
fi
|
|
||||||
if ac_fn_c_try_link "$LINENO"; then :
|
|
||||||
ac_cv_search_deflate=$ac_res
|
|
||||||
fi
|
fi
|
||||||
rm -f core conftest.err conftest.$ac_objext \
|
else
|
||||||
conftest$ac_exeext
|
pkg_failed=untried
|
||||||
if ${ac_cv_search_deflate+:} false; then :
|
|
||||||
break
|
|
||||||
fi
|
fi
|
||||||
done
|
if test -n "$ZLIB_LIBS"; then
|
||||||
if ${ac_cv_search_deflate+:} false; then :
|
pkg_cv_ZLIB_LIBS="$ZLIB_LIBS"
|
||||||
|
elif test -n "$PKG_CONFIG"; then
|
||||||
|
if test -n "$PKG_CONFIG" && \
|
||||||
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5
|
||||||
|
($PKG_CONFIG --exists --print-errors "zlib") 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||||
|
test $ac_status = 0; }; then
|
||||||
|
pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib" 2>/dev/null`
|
||||||
|
test "x$?" != "x0" && pkg_failed=yes
|
||||||
else
|
else
|
||||||
ac_cv_search_deflate=no
|
pkg_failed=yes
|
||||||
fi
|
fi
|
||||||
rm conftest.$ac_ext
|
else
|
||||||
LIBS=$ac_func_search_save_LIBS
|
pkg_failed=untried
|
||||||
fi
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_deflate" >&5
|
|
||||||
$as_echo "$ac_cv_search_deflate" >&6; }
|
|
||||||
ac_res=$ac_cv_search_deflate
|
|
||||||
if test "$ac_res" != no; then :
|
|
||||||
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
|
|
||||||
|
|
||||||
else
|
|
||||||
as_fn_error $? "found zlib include but not library." "$LINENO" 5
|
|
||||||
have_zlib=""
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif test "X$with_zlib" = Xyes
|
|
||||||
then
|
|
||||||
as_fn_error $? "include/zlib.h not found." "$LINENO" 5
|
if test $pkg_failed = yes; then
|
||||||
else
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
||||||
$as_echo "no" >&6; }
|
$as_echo "no" >&6; }
|
||||||
fi
|
|
||||||
|
|
||||||
ZLIB=
|
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||||
if test "X${have_zlib}" != "X"
|
_pkg_short_errors_supported=yes
|
||||||
then
|
else
|
||||||
CFLAGS="$CFLAGS $zlib_cflags"
|
_pkg_short_errors_supported=no
|
||||||
|
fi
|
||||||
|
if test $_pkg_short_errors_supported = yes; then
|
||||||
|
ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib" 2>&1`
|
||||||
|
else
|
||||||
|
ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib" 2>&1`
|
||||||
|
fi
|
||||||
|
# Put the nasty error message in config.log where it belongs
|
||||||
|
echo "$ZLIB_PKG_ERRORS" >&5
|
||||||
|
|
||||||
|
:
|
||||||
|
elif test $pkg_failed = untried; then
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
:
|
||||||
|
else
|
||||||
|
ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS
|
||||||
|
ZLIB_LIBS=$pkg_cv_ZLIB_LIBS
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
|
$as_echo "yes" >&6; }
|
||||||
|
|
||||||
$as_echo "#define HAVE_ZLIB 1" >>confdefs.h
|
$as_echo "#define HAVE_ZLIB 1" >>confdefs.h
|
||||||
|
|
||||||
ZLIB=1
|
fi ;; #(
|
||||||
|
yes) :
|
||||||
|
|
||||||
|
pkg_failed=no
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5
|
||||||
|
$as_echo_n "checking for zlib... " >&6; }
|
||||||
|
|
||||||
|
if test -n "$ZLIB_CFLAGS"; then
|
||||||
|
pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS"
|
||||||
|
elif test -n "$PKG_CONFIG"; then
|
||||||
|
if test -n "$PKG_CONFIG" && \
|
||||||
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5
|
||||||
|
($PKG_CONFIG --exists --print-errors "zlib") 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||||
|
test $ac_status = 0; }; then
|
||||||
|
pkg_cv_ZLIB_CFLAGS=`$PKG_CONFIG --cflags "zlib" 2>/dev/null`
|
||||||
|
test "x$?" != "x0" && pkg_failed=yes
|
||||||
|
else
|
||||||
|
pkg_failed=yes
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
pkg_failed=untried
|
||||||
|
fi
|
||||||
|
if test -n "$ZLIB_LIBS"; then
|
||||||
|
pkg_cv_ZLIB_LIBS="$ZLIB_LIBS"
|
||||||
|
elif test -n "$PKG_CONFIG"; then
|
||||||
|
if test -n "$PKG_CONFIG" && \
|
||||||
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"zlib\""; } >&5
|
||||||
|
($PKG_CONFIG --exists --print-errors "zlib") 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
||||||
|
test $ac_status = 0; }; then
|
||||||
|
pkg_cv_ZLIB_LIBS=`$PKG_CONFIG --libs "zlib" 2>/dev/null`
|
||||||
|
test "x$?" != "x0" && pkg_failed=yes
|
||||||
|
else
|
||||||
|
pkg_failed=yes
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
pkg_failed=untried
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if test $pkg_failed = yes; then
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
|
||||||
|
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
|
||||||
|
_pkg_short_errors_supported=yes
|
||||||
|
else
|
||||||
|
_pkg_short_errors_supported=no
|
||||||
|
fi
|
||||||
|
if test $_pkg_short_errors_supported = yes; then
|
||||||
|
ZLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "zlib" 2>&1`
|
||||||
|
else
|
||||||
|
ZLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "zlib" 2>&1`
|
||||||
|
fi
|
||||||
|
# Put the nasty error message in config.log where it belongs
|
||||||
|
echo "$ZLIB_PKG_ERRORS" >&5
|
||||||
|
|
||||||
|
as_fn_error $? "Package requirements (zlib) were not met:
|
||||||
|
|
||||||
|
$ZLIB_PKG_ERRORS
|
||||||
|
|
||||||
|
Consider adjusting the PKG_CONFIG_PATH environment variable if you
|
||||||
|
installed software in a non-standard prefix.
|
||||||
|
|
||||||
|
Alternatively, you may set the environment variables ZLIB_CFLAGS
|
||||||
|
and ZLIB_LIBS to avoid the need to call pkg-config.
|
||||||
|
See the pkg-config man page for more details." "$LINENO" 5
|
||||||
|
elif test $pkg_failed = untried; then
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
$as_echo "no" >&6; }
|
||||||
|
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||||
|
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||||
|
as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
|
||||||
|
is in your PATH or set the PKG_CONFIG environment variable to the full
|
||||||
|
path to pkg-config.
|
||||||
|
|
||||||
|
Alternatively, you may set the environment variables ZLIB_CFLAGS
|
||||||
|
and ZLIB_LIBS to avoid the need to call pkg-config.
|
||||||
|
See the pkg-config man page for more details.
|
||||||
|
|
||||||
|
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
|
||||||
|
See \`config.log' for more details" "$LINENO" 5; }
|
||||||
|
else
|
||||||
|
ZLIB_CFLAGS=$pkg_cv_ZLIB_CFLAGS
|
||||||
|
ZLIB_LIBS=$pkg_cv_ZLIB_LIBS
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
|
$as_echo "yes" >&6; }
|
||||||
|
|
||||||
|
$as_echo "#define HAVE_ZLIB 1" >>confdefs.h
|
||||||
|
|
||||||
|
fi ;; #(
|
||||||
|
*) :
|
||||||
|
as_fn_error $? "Specifying zlib installation path is not supported, adjust PKG_CONFIG_PATH instead" "$LINENO" 5 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
#
|
#
|
||||||
# In solaris 10, SMF can manage named service
|
# In solaris 10, SMF can manage named service
|
||||||
#
|
#
|
||||||
|
75
configure.ac
75
configure.ac
@@ -1281,69 +1281,20 @@ AS_CASE([$with_json_c],
|
|||||||
AC_SUBST([JSON_C_CFLAGS])
|
AC_SUBST([JSON_C_CFLAGS])
|
||||||
AC_SUBST([JSON_C_LIBS])
|
AC_SUBST([JSON_C_LIBS])
|
||||||
|
|
||||||
#
|
AC_ARG_WITH([zlib],
|
||||||
# was --with-zlib specified?
|
[AS_HELP_STRING([--with-zlib],
|
||||||
#
|
[build with zlib for HTTP compression
|
||||||
AC_MSG_CHECKING(for zlib library)
|
[default=yes]])],
|
||||||
AC_ARG_WITH(zlib,
|
[], with_zlib="auto")
|
||||||
AS_HELP_STRING([--with-zlib[=PATH]],
|
|
||||||
[build with zlib for HTTP compression
|
|
||||||
[default=yes]]),
|
|
||||||
with_zlib="$withval", with_zlib="auto")
|
|
||||||
|
|
||||||
have_zlib=""
|
|
||||||
case "$with_zlib" in
|
|
||||||
no)
|
|
||||||
zlib_libs=""
|
|
||||||
;;
|
|
||||||
auto|yes)
|
|
||||||
for d in /usr /usr/local /opt/local
|
|
||||||
do
|
|
||||||
if test -f "${d}/include/zlib.h"
|
|
||||||
then
|
|
||||||
if test ${d} != /usr
|
|
||||||
then
|
|
||||||
zlib_cflags="-I ${d}/include"
|
|
||||||
LIBS="$LIBS -L${d}/lib"
|
|
||||||
fi
|
|
||||||
have_zlib="yes"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
if test -f "${with_zlib}/include/zlib.h"
|
|
||||||
then
|
|
||||||
zlib_cflags="-I${with_zlib}/include"
|
|
||||||
LIBS="$LIBS -L${with_zlib}/lib"
|
|
||||||
have_zlib="yes"
|
|
||||||
else
|
|
||||||
AC_MSG_ERROR([$with_zlib/include/zlib.h not found.])
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if test "X${have_zlib}" != "X"
|
|
||||||
then
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_SEARCH_LIBS([deflate], [z], [],
|
|
||||||
[AC_MSG_ERROR([found zlib include but not library.])
|
|
||||||
have_zlib=""])
|
|
||||||
elif test "X$with_zlib" = Xyes
|
|
||||||
then
|
|
||||||
AC_MSG_ERROR([include/zlib.h not found.])
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
fi
|
|
||||||
|
|
||||||
ZLIB=
|
|
||||||
if test "X${have_zlib}" != "X"
|
|
||||||
then
|
|
||||||
CFLAGS="$CFLAGS $zlib_cflags"
|
|
||||||
AC_DEFINE(HAVE_ZLIB, 1, [Define if zlib was found])
|
|
||||||
ZLIB=1
|
|
||||||
fi
|
|
||||||
AC_SUBST(ZLIB)
|
|
||||||
|
|
||||||
|
AS_CASE([$with_zlib],
|
||||||
|
[no],[],
|
||||||
|
[auto],[PKG_CHECK_MODULES([ZLIB], [zlib],
|
||||||
|
[AC_DEFINE([HAVE_ZLIB], [1], [Use zlib library])],
|
||||||
|
[:])],
|
||||||
|
[yes],[PKG_CHECK_MODULES([ZLIB], [zlib],
|
||||||
|
[AC_DEFINE([HAVE_ZLIB], [1], [Use zlib library])])],
|
||||||
|
[AC_MSG_ERROR([Specifying zlib installation path is not supported, adjust PKG_CONFIG_PATH instead])])
|
||||||
|
|
||||||
#
|
#
|
||||||
# In solaris 10, SMF can manage named service
|
# In solaris 10, SMF can manage named service
|
||||||
|
@@ -23,7 +23,8 @@ CINCLUDES = -I${srcdir}/unix/include \
|
|||||||
-I${srcdir}/include ${DNS_INCLUDES} \
|
-I${srcdir}/include ${DNS_INCLUDES} \
|
||||||
${OPENSSL_CFLAGS} \
|
${OPENSSL_CFLAGS} \
|
||||||
${JSON_C_CFLAGS} \
|
${JSON_C_CFLAGS} \
|
||||||
${LIBXML2_CFLAGS}
|
${LIBXML2_CFLAGS} \
|
||||||
|
${ZLIB_CFLAGS}
|
||||||
CDEFINES =
|
CDEFINES =
|
||||||
CWARNINGS =
|
CWARNINGS =
|
||||||
|
|
||||||
|
@@ -132,6 +132,9 @@ LIBXML2_LIBS = @LIBXML2_LIBS@
|
|||||||
MAXMINDDB_CFLAGS = @MAXMINDDB_CFLAGS@
|
MAXMINDDB_CFLAGS = @MAXMINDDB_CFLAGS@
|
||||||
MAXMINDDB_LIBS = @MAXMINDDB_LIBS@
|
MAXMINDDB_LIBS = @MAXMINDDB_LIBS@
|
||||||
|
|
||||||
|
ZLIB_CFLAGS = @ZLIB_CFLAGS@
|
||||||
|
ZLIB_LIBS = @ZLIB_LIBS@
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .c .@O@
|
.SUFFIXES: .c .@O@
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user